diff --git a/packages/fineui/bi.lessconfig.json b/packages/fineui/bi.lessconfig.json
index e46fb6e34..037d218ec 100644
--- a/packages/fineui/bi.lessconfig.json
+++ b/packages/fineui/bi.lessconfig.json
@@ -23,8 +23,8 @@
"@color-bi-border-disabled-radio": "rgba(9, 30, 64, 0.19)",
"@color-bi-background-active-radio-content": "#2C60DB",
"@color-bi-border-checkbox-theme-dark": "rgba(255, 255, 255, 0.37)",
- "@color-bi-border-hover-active-radio-theme-dark": "#3869DC",
- "@color-bi-background-active-radio-content-theme-dark": "#3869DC",
+ "@color-bi-border-hover-active-radio-theme-dark": "#497FFD",
+ "@color-bi-background-active-radio-content-theme-dark": "#497FFD",
"@color-bi-background-disabled-active-radio-content": "#FFFFFF",
"@color-bi-background-disabled-active-radio-content-theme-dark": "#606479",
"@color-bi-background-disabled-active-checkbox-content": "#FFFFFF",
@@ -48,5 +48,17 @@
"@font-solid-bottom": "e905",
"@font-solid-right": "e906",
"@font-dot": "e762",
- "@font-down-triangle": "e70b"
+ "@font-down-triangle": "e70b",
+ "@color-bi-background-theme-dark": "#1B1F31",
+ "@border-color-light-line-theme-dark": "#30364B",
+ "@color-bi-background-header-background": "#F8F9FC",
+ "@color-bi-background-header-background-theme-dark": "#1B1F31",
+ "@color-bi-background-common-light-button": "#E5EFFF",
+ "@color-bi-background-common-light-button-theme-dark": "#0F2A62",
+ "@color-bi-text-highlight-theme-dark": "#497FFD",
+ "@color-bi-border-active-chooser-show-button-theme-dark": "#497FFD",
+ "@color-bi-background-button-theme-dark": "#497FFD",
+ "@color-bi-background-active-switch-theme-dark": "#497FFD",
+ "@color-bi-text-common-light-button-theme-dark": "#497FFD",
+ "@color-bi-text-common-light-button": "#2c60db"
}
diff --git a/packages/fineui/dist/font/iconfont.eot b/packages/fineui/dist/font/iconfont.eot
index ee4462ec3..cb92e239c 100644
Binary files a/packages/fineui/dist/font/iconfont.eot and b/packages/fineui/dist/font/iconfont.eot differ
diff --git a/packages/fineui/dist/font/iconfont.svg b/packages/fineui/dist/font/iconfont.svg
index 7e2b17d8c..bf6e0058b 100644
--- a/packages/fineui/dist/font/iconfont.svg
+++ b/packages/fineui/dist/font/iconfont.svg
@@ -14,6 +14,144 @@
/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -24,15 +162,15 @@
-
+
-
+
-
+
@@ -638,7 +776,7 @@
-
+
@@ -686,7 +824,7 @@
-
+
@@ -1038,19 +1176,19 @@
-
+
-
+
-
+
-
+
-
+
@@ -1246,11 +1384,11 @@
-
+
-
+
@@ -1262,11 +1400,11 @@
-
+
-
+
@@ -1292,93 +1430,93 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -1390,139 +1528,139 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -1534,43 +1672,43 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -2026,13 +2164,13 @@
-
+
-
+
diff --git a/packages/fineui/dist/font/iconfont.ttf b/packages/fineui/dist/font/iconfont.ttf
index 2392fc12c..c1245be37 100644
Binary files a/packages/fineui/dist/font/iconfont.ttf and b/packages/fineui/dist/font/iconfont.ttf differ
diff --git a/packages/fineui/dist/font/iconfont.woff b/packages/fineui/dist/font/iconfont.woff
index 08821e186..a05e760b9 100644
Binary files a/packages/fineui/dist/font/iconfont.woff and b/packages/fineui/dist/font/iconfont.woff differ
diff --git a/packages/fineui/dist/font/iconfont.woff2 b/packages/fineui/dist/font/iconfont.woff2
index 7339acab5..91697cc4c 100644
Binary files a/packages/fineui/dist/font/iconfont.woff2 and b/packages/fineui/dist/font/iconfont.woff2 differ
diff --git a/packages/fineui/package.json b/packages/fineui/package.json
index f467aa097..17ef6a00a 100644
--- a/packages/fineui/package.json
+++ b/packages/fineui/package.json
@@ -57,7 +57,7 @@
"jquery": "3.6.3"
},
"devDependencies": {
- "core-js": "^3.30.2",
+ "core-js": "^3.37.1",
"cross-env": "^7.0.3"
}
-}
\ No newline at end of file
+}
diff --git a/packages/fineui/src/base/combination/tab.js b/packages/fineui/src/base/combination/tab.js
index c9f79278a..8c6da9f4d 100644
--- a/packages/fineui/src/base/combination/tab.js
+++ b/packages/fineui/src/base/combination/tab.js
@@ -13,7 +13,8 @@ import {
contains,
any,
isEqual,
- LogicFactory
+ LogicFactory,
+ Events,
} from "@/core";
/**
@@ -106,7 +107,11 @@ export class Tab extends Widget {
Widget.execWithContext(this, () => {
this.cardMap[v] = cardCreator(v);
});
- this.layout.addCardByName(v, this.cardMap[v]);
+ const card = this.layout.addCardByName(v, this.cardMap[v]);
+ card.on(Events.DESTROY, () => {
+ this.layout.deleteCardByName(v);
+ delete this.cardMap[v];
+ });
}
}
diff --git a/packages/fineui/src/base/single/input/radio/radio.js b/packages/fineui/src/base/single/input/radio/radio.js
index fa6a10401..aa9eae19b 100644
--- a/packages/fineui/src/base/single/input/radio/radio.js
+++ b/packages/fineui/src/base/single/input/radio/radio.js
@@ -56,13 +56,4 @@ export class Radio extends BasicButton {
this.fireEvent(Radio.EVENT_CHANGE);
}
}
-
- setSelected(b) {
- super.setSelected(b);
- if (b) {
- this.radio.element.addClass("bi-high-light-background");
- } else {
- this.radio.element.removeClass("bi-high-light-background");
- }
- }
}
diff --git a/packages/fineui/src/base/tree/customtree.js b/packages/fineui/src/base/tree/customtree.js
index 349ae0912..eb774edfc 100644
--- a/packages/fineui/src/base/tree/customtree.js
+++ b/packages/fineui/src/base/tree/customtree.js
@@ -16,7 +16,8 @@ import {
isNull,
createWidget,
Controller,
- Events
+ Events,
+ omit,
} from "@/core";
/**
@@ -104,7 +105,7 @@ export class CustomTree extends Widget {
return itemsCreator.apply(this, args);
};
- isNull(item.popup.el) && (item.popup.el = deepClone(this.options.el));
+ isNull(item.popup.el) && (item.popup.el = deepClone(omit(this.options.el, "node")));
item.popup.el.node = item.el;
items.push(item);
} else {
diff --git a/packages/fineui/src/case/toolbar/toolbar.multiselect.js b/packages/fineui/src/case/toolbar/toolbar.multiselect.js
index f0df9ce78..9ca7281de 100644
--- a/packages/fineui/src/case/toolbar/toolbar.multiselect.js
+++ b/packages/fineui/src/case/toolbar/toolbar.multiselect.js
@@ -126,6 +126,7 @@ export class MultiSelectBar extends BasicButton {
}
setSelected(v) {
+ super.setSelected(v);
this.checkbox.setSelected(v);
this.setHalfSelected(false);
}
diff --git a/packages/fineui/src/case/ztree/asynctree.js b/packages/fineui/src/case/ztree/asynctree.js
index 7921ef821..7c6efe09c 100644
--- a/packages/fineui/src/case/ztree/asynctree.js
+++ b/packages/fineui/src/case/ztree/asynctree.js
@@ -221,15 +221,11 @@ export class AsyncTree extends TreeView {
{
el: {
type: IconLabel.xtype,
- width: 20,
- height: 20,
cls: "button-loading-font anim-rotate bi-card",
ref: ref => {
loadingIcon = ref;
},
},
- left: 5,
- top: 5,
},
],
});
diff --git a/packages/fineui/src/core/2.base.js b/packages/fineui/src/core/2.base.js
index fe07103c6..fe0c611f2 100644
--- a/packages/fineui/src/core/2.base.js
+++ b/packages/fineui/src/core/2.base.js
@@ -1518,7 +1518,7 @@ export function getTime() {
}
if (isNotNull(BI.timeZone)) {
// BI-33791 1901年以前的东8区标准是GMT+0805, 统一无论是什么时间,都以整的0800这样的为基准
- return dt.getTime() + BI.timeZone + new Date().getTimezoneOffset() * 60000;
+ return dt.getTime() - BI.timeZone - new Date().getTimezoneOffset() * 60000;
}
return dt.getTime();
diff --git a/packages/fineui/src/core/5.inject.js b/packages/fineui/src/core/5.inject.js
index f9aeacd07..6f8182ee2 100644
--- a/packages/fineui/src/core/5.inject.js
+++ b/packages/fineui/src/core/5.inject.js
@@ -62,7 +62,7 @@ const constantInjection = {};
export function constant(xtype, cls) {
if (isNotNull(constantInjection[xtype])) {
- _global.console && console.error(`constant: [${xtype}]already registered`);
+ _global.console && console.warn(`constant: [${xtype}]already registered`);
} else {
constantInjection[xtype] = cls;
}
@@ -427,7 +427,7 @@ const providers = {},
export const Providers = {
getProvider: (type, config) => {
if (!providerInjection[type]) {
- _global.console && console.error(`provider: [${type}] undefined`);
+ _global.console && console.warn(`provider: [${type}] undefined`);
}
runConfigFunction(type);
if (!providers[type]) {
diff --git a/packages/fineui/src/core/constant/writable.var.js b/packages/fineui/src/core/constant/writable.var.js
index d8a503c29..16fb88042 100644
--- a/packages/fineui/src/core/constant/writable.var.js
+++ b/packages/fineui/src/core/constant/writable.var.js
@@ -138,4 +138,13 @@ addDescriptor("DOM", {
addDescriptor("nextTick", {
get: () => nextTick,
set: setNextTick,
-});
\ No newline at end of file
+});
+
+export let PasteLimit = 2000;
+export const setPasteLimit = v => {
+ PasteLimit = v;
+};
+addDescriptor("PasteLimit", {
+ get: () => PasteLimit,
+ set: setPasteLimit,
+});
diff --git a/packages/fineui/src/core/controller/controller.layer.js b/packages/fineui/src/core/controller/controller.layer.js
index 9dcac7f83..1ad1001b8 100644
--- a/packages/fineui/src/core/controller/controller.layer.js
+++ b/packages/fineui/src/core/controller/controller.layer.js
@@ -108,7 +108,7 @@ export class LayerController extends Controller {
height: offset.height || (w.outerHeight() - (offset.top || 0) - (offset.bottom || 0)) || "",
};
- const { top, left, scaleY, scaleX } = getPositionRelativeContainingBlockRect(layout.element[0]);
+ const { top, left, scaleY, scaleX } = getPositionRelativeContainingBlockRect(layout.element[0].parentNode || layout.element[0]);
css.top = (css.top - top) / scaleY;
css.left = (css.left - left) / scaleX;
diff --git a/packages/fineui/src/core/func/alias.js b/packages/fineui/src/core/func/alias.js
index fc0eaa772..94f12a814 100644
--- a/packages/fineui/src/core/func/alias.js
+++ b/packages/fineui/src/core/func/alias.js
@@ -9,7 +9,8 @@ import {
leftPad,
parseDateTime,
values,
- isArray
+ isArray,
+ getDate
} from "../2.base";
import { replaceAll } from "./string";
import { getFullDayName, getMonthName, getTimezone } from "./date";
@@ -680,10 +681,10 @@ export const contentFormat = function(cv, fmt) {
if (!(cv instanceof Date)) {
if (typeof cv === "number") {
// 毫秒数类型
- cv = new Date(cv);
+ cv = getDate(cv);
} else {
// 字符串类型转化为date类型
- cv = new Date(Date.parse((`${cv}`).replace(/-|\./g, "/")));
+ cv = getDate(Date.parse((`${cv}`).replace(/-|\./g, "/")));
}
}
if (!isInvalidDate(cv) && !isNull(cv)) {
diff --git a/packages/fineui/src/core/utils/dom.js b/packages/fineui/src/core/utils/dom.js
index fbee6b287..275aa3adf 100644
--- a/packages/fineui/src/core/utils/dom.js
+++ b/packages/fineui/src/core/utils/dom.js
@@ -743,11 +743,13 @@ export function getComboPosition(combo, popup, extraWidth, extraHeight, needAdap
}
if (needAdaptHeight === true && popup.resetHeight) {
const comboRect = combo.element[0].getBoundingClientRect();
+ const scale = comboRect.height === 0 ? 1 : comboRect.height / combo.element.height();
const relativeOffset = positionRelativeElement ? positionRelativeElement.getBoundingClientRect().top : 0;
- if (position.top < comboRect.top) {
- popup.resetHeight(Math.min(viewportBounds.height - position.top - relativeOffset, comboRect.top, maxHeight));
- } else if (position.top >= comboRect.bottom) {
- popup.resetHeight(Math.min(viewportBounds.height - position.top - relativeOffset, viewportBounds.height - comboRect.bottom, maxHeight));
+ const positionTop = position.top + relativeOffset;
+ if (positionTop < comboRect.top) {
+ popup.resetHeight(Math.min((viewportBounds.height - positionTop) / scale, comboRect.top / scale, maxHeight));
+ } else if (positionTop >= comboRect.bottom) {
+ popup.resetHeight(Math.min((viewportBounds.height - positionTop) / scale, (viewportBounds.height - comboRect.bottom) / scale, maxHeight));
}
}
diff --git a/packages/fineui/src/less/base/colorchooser/colorpicker/button.colorshow.less b/packages/fineui/src/less/base/colorchooser/colorpicker/button.colorshow.less
index c754a42cd..05baf6639 100644
--- a/packages/fineui/src/less/base/colorchooser/colorpicker/button.colorshow.less
+++ b/packages/fineui/src/less/base/colorchooser/colorpicker/button.colorshow.less
@@ -4,4 +4,12 @@
&.active, &:active {
border-color: @color-bi-border-active-chooser-show-button;
}
+}
+
+.bi-theme-dark {
+ .bi-color-chooser-show-button {
+ &.active, &:active {
+ border-color: @color-bi-border-active-chooser-show-button-theme-dark;
+ }
+ }
}
\ No newline at end of file
diff --git a/packages/fineui/src/less/base/single/button/button.less b/packages/fineui/src/less/base/single/button/button.less
index 6f186ef0f..e352d4c3c 100644
--- a/packages/fineui/src/less/base/single/button/button.less
+++ b/packages/fineui/src/less/base/single/button/button.less
@@ -578,6 +578,8 @@ body .bi-button, #body .bi-button {
.bi-theme-dark, #body .bi-theme-dark {
.bi-button {
+ background-color: @color-bi-background-button-theme-dark;
+
&.button-ignore {
background-color: @color-bi-background-ignore-button-theme-dark;
@@ -643,5 +645,15 @@ body .bi-button, #body .bi-button {
}
}
}
+
+ &.button-common {
+ &.light {
+ background-color: @color-bi-background-common-light-button-theme-dark;
+
+ &, & .b-font:before {
+ color: @color-bi-text-common-light-button-theme-dark;
+ }
+ }
+ }
}
}
diff --git a/packages/fineui/src/less/base/single/button/switch.less b/packages/fineui/src/less/base/single/button/switch.less
index f7101201a..bf5f4e921 100644
--- a/packages/fineui/src/less/base/single/button/switch.less
+++ b/packages/fineui/src/less/base/single/button/switch.less
@@ -25,7 +25,7 @@
.bi-switch {
background-color: @color-bi-background-switch-theme-dark;
&.active {
- background-color: @color-bi-background-active-switch;
+ background-color: @color-bi-background-active-switch-theme-dark;
}
}
}
diff --git a/packages/fineui/src/less/base/tree/ztree.less b/packages/fineui/src/less/base/tree/ztree.less
index e7869baae..4932e49ef 100644
--- a/packages/fineui/src/less/base/tree/ztree.less
+++ b/packages/fineui/src/less/base/tree/ztree.less
@@ -335,3 +335,10 @@
margin-right: 2px;
vertical-align: top;
}
+
+.ztree .button-loading-font {
+ .use-scale(width, 20px);
+ .use-scale(height, 20px);
+ .use-scale(left, 5px);
+ .use-scale(top, 5px);
+}
\ No newline at end of file
diff --git a/packages/fineui/src/less/core/utils/common.less b/packages/fineui/src/less/core/utils/common.less
index 3da0ab1c0..ee7cc0d27 100644
--- a/packages/fineui/src/less/core/utils/common.less
+++ b/packages/fineui/src/less/core/utils/common.less
@@ -104,6 +104,10 @@
.bi-theme-dark {
.bi-focus-shadow {
+ &:focus, &:hover {
+ border-color: @color-bi-border-highlight-theme-dark;
+ }
+
&.disabled {
&:hover {
border-color: @border-color-line-theme-dark;
@@ -142,7 +146,7 @@
.bi-theme-dark {
.bi-background {
- background-color: @color-bi-background-normal-theme-dark;
+ background-color: @color-bi-background-theme-dark;
color: @color-bi-text-background-theme-dark;
& .bi-input {
diff --git a/packages/fineui/src/less/core/utils/list-item.less b/packages/fineui/src/less/core/utils/list-item.less
index ce5b6abb1..c61035316 100644
--- a/packages/fineui/src/less/core/utils/list-item.less
+++ b/packages/fineui/src/less/core/utils/list-item.less
@@ -161,12 +161,12 @@
}
}
&.active, &:active {
- color: @color-bi-text-highlight;
+ color: @color-bi-text-highlight-theme-dark;
& .bi-input {
- color: @color-bi-text-highlight;
+ color: @color-bi-text-highlight-theme-dark;
}
& .bi-textarea {
- color: @color-bi-text-highlight;
+ color: @color-bi-text-highlight-theme-dark;
}
}
&.disabled {
diff --git a/packages/fineui/src/less/lib/colors.less b/packages/fineui/src/less/lib/colors.less
index 810745b94..478597e26 100644
--- a/packages/fineui/src/less/lib/colors.less
+++ b/packages/fineui/src/less/lib/colors.less
@@ -38,6 +38,7 @@
//基本提亮颜色
@color-bi-text-highlight: @font-color-highlight;
+@color-bi-text-highlight-theme-dark: @font-color-highlight;
//标红色
@color-bi-text-redmark: @font-color-warning;
@@ -50,6 +51,7 @@
@color-bi-background-normal: @background-color-normal;
//深色主题普通背景
@color-bi-background-normal-theme-dark: @background-color-normal-theme-dark;
+@color-bi-background-theme-dark: @background-color-normal-theme-dark;
//默认背景
@color-bi-background-default: @background-color-default;
//深色主题默认背景
@@ -132,5 +134,6 @@
@color-bi-border-warning: @border-color-warning;
//边框提亮
@color-bi-border-highlight: @border-color-highlight;
+@color-bi-border-highlight-theme-dark: @border-color-highlight;
@color-bi-alert-warning: @color-bi-orange;
diff --git a/packages/fineui/src/less/lib/theme.less b/packages/fineui/src/less/lib/theme.less
index 50339345c..28aa355e9 100644
--- a/packages/fineui/src/less/lib/theme.less
+++ b/packages/fineui/src/less/lib/theme.less
@@ -62,6 +62,7 @@
// 按钮
@color-bi-border-button: @color-bi-border-highlight;
@color-bi-background-button: @color-bi-background-highlight;
+@color-bi-background-button-theme-dark: @color-bi-background-highlight;
@color-bi-text-common-button: @color-bi-text;
@color-bi-text-common-clear-button: @color-bi-text-highlight;
@color-bi-text-common-plain-button: @color-bi-text-highlight;
@@ -75,7 +76,9 @@
@color-bi-background-hover-common-ghost-button-theme-dark: @color-bi-background-default;
@color-bi-text-common-light-button: @color-bi-text-highlight;
+@color-bi-text-common-light-button-theme-dark: @color-bi-text-highlight;
@color-bi-background-common-light-button: @color-bi-background-light-blue;
+@color-bi-background-common-light-button-theme-dark: @color-bi-background-light-blue;
@color-bi-background-hover-common-light-button: @color-bi-background-light-blue;
@color-bi-background-active-common-light-button: @color-bi-background-light-blue;
@color-bi-background-hover-plain-button: @color-black-5;
@@ -202,6 +205,7 @@
@color-bi-border-picker-button-mask: @color-bi-border-black;
@color-bi-border-picker-button-mask-theme-dark: @color-bi-border-default;
@color-bi-border-active-chooser-show-button: @color-bi-border-highlight;
+@color-bi-border-active-chooser-show-button-theme-dark: @color-bi-border-highlight;
@color-bi-background-disabled-chooser-popup-mask: @color-bi-background-default;
// combo
@color-bi-border-hover-combo: @color-bi-border-highlight;
diff --git a/packages/fineui/src/widget/downlist/combo.downlist.js b/packages/fineui/src/widget/downlist/combo.downlist.js
index 341372724..eb65d8758 100644
--- a/packages/fineui/src/widget/downlist/combo.downlist.js
+++ b/packages/fineui/src/widget/downlist/combo.downlist.js
@@ -108,6 +108,9 @@ export class DownListCombo extends Widget {
stopPropagation: o.stopPropagation,
maxHeight: o.maxHeight,
minWidth: o.minWidth,
+ ref: (ref) => {
+ this.popup = ref;
+ },
...o.popup,
},
});
@@ -125,6 +128,10 @@ export class DownListCombo extends Widget {
this.downlistcombo.showView(e);
}
+ getPopup() {
+ return this.popup;
+ }
+
populate(items) {
this.popupView.populate(items);
}
diff --git a/packages/fineui/src/widget/dynamicdate/dynamicdate.combo.js b/packages/fineui/src/widget/dynamicdate/dynamicdate.combo.js
index 3fa097e55..27e0caae0 100644
--- a/packages/fineui/src/widget/dynamicdate/dynamicdate.combo.js
+++ b/packages/fineui/src/widget/dynamicdate/dynamicdate.combo.js
@@ -208,7 +208,7 @@ export class DynamicDateCombo extends Single {
min: opts.minDate,
max: opts.maxDate,
ref: _ref => {
- this.popup = _ref;
+ this.popupEl = _ref;
},
listeners: [
{
@@ -238,7 +238,7 @@ export class DynamicDateCombo extends Single {
{
eventName: DynamicDatePopup.BUTTON_OK_EVENT_CHANGE,
action: () => {
- const value = this.popup.getValue();
+ const value = this.popupEl.getValue();
if (this._checkValue(value)) {
this.setValue(value);
}
@@ -249,7 +249,7 @@ export class DynamicDateCombo extends Single {
{
eventName: DynamicDatePopup.EVENT_CHANGE,
action: () => {
- this.setValue(this.popup.getValue());
+ this.setValue(this.popupEl.getValue());
this.combo.hideView();
this.fireEvent(DynamicDateCombo.EVENT_CONFIRM);
},
@@ -262,6 +262,10 @@ export class DynamicDateCombo extends Single {
}
],
},
+ ref: (ref) => {
+ this.popup = ref;
+ },
+ ...opts.popup,
},
// // DEC-4250 和复选下拉一样,点击triggerBtn不默认收起
// hideChecker: function (e) {
@@ -271,9 +275,9 @@ export class DynamicDateCombo extends Single {
{
eventName: Combo.EVENT_BEFORE_POPUPVIEW,
action: () => {
- this.popup.setMinDate(opts.minDate);
- this.popup.setMaxDate(opts.maxDate);
- this.popup.setValue(this.storeValue);
+ this.popupEl.setMinDate(opts.minDate);
+ this.popupEl.setMaxDate(opts.maxDate);
+ this.popupEl.setValue(this.storeValue);
this.fireEvent(DynamicDateCombo.EVENT_BEFORE_POPUPVIEW);
},
}
@@ -332,14 +336,14 @@ export class DynamicDateCombo extends Single {
const o = this.options;
o.minDate = minDate;
this.trigger.setMinDate(minDate);
- this.popup && this.popup.setMinDate(minDate);
+ this.popupEl && this.popupEl.setMinDate(minDate);
}
setMaxDate(maxDate) {
const o = this.options;
o.maxDate = maxDate;
this.trigger.setMaxDate(maxDate);
- this.popup && this.popup.setMaxDate(maxDate);
+ this.popupEl && this.popupEl.setMaxDate(maxDate);
}
setValue(v) {
@@ -356,6 +360,10 @@ export class DynamicDateCombo extends Single {
return this.trigger.getKey();
}
+ getPopup() {
+ return this.popup;
+ }
+
hidePopupView() {
this.combo.hideView();
}
diff --git a/packages/fineui/src/widget/dynamicdatetime/dynamicdatetime.combo.js b/packages/fineui/src/widget/dynamicdatetime/dynamicdatetime.combo.js
index e65e12768..3be733631 100644
--- a/packages/fineui/src/widget/dynamicdatetime/dynamicdatetime.combo.js
+++ b/packages/fineui/src/widget/dynamicdatetime/dynamicdatetime.combo.js
@@ -216,7 +216,7 @@ export class DynamicDateTimeCombo extends Single {
min: opts.minDate,
max: opts.maxDate,
ref: _ref => {
- this.popup = _ref;
+ this.popupEl = _ref;
},
listeners: [
{
@@ -249,7 +249,7 @@ export class DynamicDateTimeCombo extends Single {
{
eventName: DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE,
action: () => {
- const value = this.popup.getValue();
+ const value = this.popupEl.getValue();
if (this._checkValue(value)) {
this.setValue(value);
}
@@ -260,7 +260,7 @@ export class DynamicDateTimeCombo extends Single {
{
eventName: DynamicDateTimePopup.EVENT_CHANGE,
action: () => {
- this.setValue(this.popup.getValue());
+ this.setValue(this.popupEl.getValue());
this.combo.hideView();
this.fireEvent(DynamicDateTimeCombo.EVENT_CONFIRM);
}
@@ -271,16 +271,20 @@ export class DynamicDateTimeCombo extends Single {
this.fireEvent(DynamicDateTimeCombo.EVENT_BEFORE_YEAR_MONTH_POPUPVIEW);
}
}
- ]
- }
+ ],
+ },
+ ref: (ref) => {
+ this.popup = ref;
+ },
+ ...opts.popup,
},
listeners: [
{
eventName: Combo.EVENT_BEFORE_POPUPVIEW,
action: () => {
- this.popup.setMinDate(opts.minDate);
- this.popup.setMaxDate(opts.maxDate);
- this.popup.setValue(this.storeValue);
+ this.popupEl.setMinDate(opts.minDate);
+ this.popupEl.setMaxDate(opts.maxDate);
+ this.popupEl.setValue(this.storeValue);
this.fireEvent(DynamicDateTimeCombo.EVENT_BEFORE_POPUPVIEW);
}
}
@@ -339,14 +343,14 @@ export class DynamicDateTimeCombo extends Single {
const o = this.options;
o.minDate = minDate;
this.trigger.setMinDate(minDate);
- this.popup && this.popup.setMinDate(minDate);
+ this.popupEl && this.popupEl.setMinDate(minDate);
}
setMaxDate(maxDate) {
const o = this.options;
o.maxDate = maxDate;
this.trigger.setMaxDate(maxDate);
- this.popup && this.popup.setMaxDate(maxDate);
+ this.popupEl && this.popupEl.setMaxDate(maxDate);
}
setValue(v) {
@@ -363,6 +367,10 @@ export class DynamicDateTimeCombo extends Single {
return this.trigger.getKey();
}
+ getPopup() {
+ return this.popup;
+ }
+
hidePopupView() {
this.combo.hideView();
}
diff --git a/packages/fineui/src/widget/multiselect/loader.js b/packages/fineui/src/widget/multiselect/loader.js
index 933c96e43..589b205e7 100644
--- a/packages/fineui/src/widget/multiselect/loader.js
+++ b/packages/fineui/src/widget/multiselect/loader.js
@@ -74,7 +74,7 @@ export class MultiSelectInnerLoader extends Widget {
this.next.setLoaded();
const items = this._composeItems(this.cachItems.slice(0, 100));
this.cachItems = this.cachItems.slice(100);
- this.addItems(items);
+ this.addItems(items, true);
return;
}
@@ -183,7 +183,7 @@ export class MultiSelectInnerLoader extends Widget {
]);
}
- addItems(items) {
+ addItems(items, isFromCache = false) {
this.count += items.length;
if (isObject(this.next)) {
if (this.hasNext()) {
@@ -194,7 +194,7 @@ export class MultiSelectInnerLoader extends Widget {
}
}
// cacheGroup渲染的是全量的,如果这次加载更多add的items是从cacheItems里面拿的,那不用再add了
- if (this.cachItems.length > 0) {
+ if (isFromCache) {
this.button_group.addItems(...arguments);
return;
}
diff --git a/packages/fineui/src/widget/multiselect/multiselect.insert.combo.js b/packages/fineui/src/widget/multiselect/multiselect.insert.combo.js
index 25ebc9feb..4cf2d8dfd 100644
--- a/packages/fineui/src/widget/multiselect/multiselect.insert.combo.js
+++ b/packages/fineui/src/widget/multiselect/multiselect.insert.combo.js
@@ -33,6 +33,7 @@ import {
SIZE_CONSANTS,
BlankSplitChar,
size,
+ PasteLimit,
} from "@/core";
import { Single, Combo, Msg } from "@/base";
import { MultiSelectBar, TriggerIconButton } from "@/case";
@@ -46,12 +47,15 @@ export class MultiSelectInsertCombo extends Single {
static REQ_GET_ALL_DATA = "-1";
static EVENT_FOCUS = "EVENT_FOCUS";
static EVENT_BLUR = "EVENT_BLUR";
+ static EVENT_START = "EVENT_START";
static EVENT_STOP = "EVENT_STOP";
static EVENT_SEARCHING = "EVENT_SEARCHING";
static EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM";
static EVENT_CONFIRM = "EVENT_CONFIRM";
static EVENT_ADD_ITEM = "EVENT_ADD_ITEM";
static EVENT_AFTER_HIDEVIEW = "EVENT_AFTER_HIDEVIEW";
+ static EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW";
+ static EVENT_BEFORE_NUMBER_COUNTER_POPUPVIEW = "EVENT_BEFORE_NUMBER_COUNTER_POPUPVIEW";
_defaultConfig() {
return extend(super._defaultConfig(...arguments), {
@@ -61,6 +65,8 @@ export class MultiSelectInsertCombo extends Single {
height: 24,
itemHeight: SIZE_CONSANTS.LIST_ITEM_HEIGHT,
allowEdit: true,
+ popup: {},
+ masker: {},
});
}
@@ -96,6 +102,8 @@ export class MultiSelectInsertCombo extends Single {
this.trigger = createWidget({
type: MultiSelectInsertTrigger.xtype,
+ popup: o.popup,
+ masker: o.masker,
allowEdit: o.allowEdit,
height: toPix(o.height, o.simple ? 1 : 2),
text: o.text,
@@ -121,6 +129,7 @@ export class MultiSelectInsertCombo extends Single {
this.trigger.on(MultiSelectInsertTrigger.EVENT_START, function() {
self._setStartValue("");
this.getSearcher().setValue(self.storeValue);
+ self.fireEvent(MultiSelectInsertCombo.EVENT_START);
});
this.trigger.on(MultiSelectInsertTrigger.EVENT_STOP, () => {
self._setStartValue("");
@@ -146,8 +155,8 @@ export class MultiSelectInsertCombo extends Single {
}
self._dataChange = true;
});
- this.getSearcher().getKeywordsLength() > 2000 &&
- Msg.alert(i18nText("BI-Basic_Prompt"), i18nText("BI-Basic_Too_Much_Value_Get_Two_Thousand"));
+ this.getSearcher().getKeywordsLength() > PasteLimit &&
+ Msg.alert(i18nText("BI-Basic_Prompt"), i18nText("BI-Basic_Paste_Too_Much_Value", PasteLimit));
}
self.fireEvent(MultiSelectInsertCombo.EVENT_SEARCHING);
});
@@ -240,12 +249,14 @@ export class MultiSelectInsertCombo extends Single {
self.trigger.getSearcher().adjustView();
});
},
+ ...o.popup,
},
value: o.value,
hideChecker(e) {
return (
triggerBtn.element.find(e.target).length === 0 &&
- self.numberCounter.element.find(e.target).length === 0
+ size(self.numberCounter.getView()?.element.find(e.target)) === 0 &&
+ size(self.trigger.getSearcher().getSearcher().getView()?.element.find(e.target)) === 0
);
},
});
@@ -258,6 +269,7 @@ export class MultiSelectInsertCombo extends Single {
nextTick(() => {
self._populate();
});
+ self.fireEvent(MultiSelectInsertCombo.EVENT_BEFORE_POPUPVIEW);
});
// 当退出的时候如果还在处理请求,则等请求结束后再对外发确定事件
this.wants2Quit = false;
@@ -289,6 +301,8 @@ export class MultiSelectInsertCombo extends Single {
valueFormatter: o.valueFormatter,
itemsCreator: bind(this._itemsCreator4Trigger, this),
value: o.value,
+ masker: o.masker,
+ popup: o.popup,
});
this.numberCounter.on(MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE, () => {
if (!self.combo.isViewVisible()) {
@@ -297,6 +311,7 @@ export class MultiSelectInsertCombo extends Single {
});
this.numberCounter.on(MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW, function() {
this.updateSelectedValue(self.storeValue);
+ self.fireEvent(MultiSelectInsertCombo.EVENT_BEFORE_NUMBER_COUNTER_POPUPVIEW);
});
this.numberCounter.on(Events.VIEW, b => {
@@ -554,4 +569,16 @@ export class MultiSelectInsertCombo extends Single {
this._populate(...arguments);
this.numberCounter.populateSwitcher(...arguments);
}
+
+ getPopup() {
+ return this.popup;
+ }
+
+ getNumberCounter() {
+ return this.numberCounter;
+ }
+
+ getTrigger() {
+ return this.trigger;
+ }
}
diff --git a/packages/fineui/src/widget/multiselect/multiselect.insert.combo.nobar.js b/packages/fineui/src/widget/multiselect/multiselect.insert.combo.nobar.js
index 03300f29c..3c782b9e9 100644
--- a/packages/fineui/src/widget/multiselect/multiselect.insert.combo.nobar.js
+++ b/packages/fineui/src/widget/multiselect/multiselect.insert.combo.nobar.js
@@ -29,7 +29,8 @@ import {
pushDistinct,
Selection,
BlankSplitChar,
- SIZE_CONSANTS
+ SIZE_CONSANTS,
+ PasteLimit,
} from "@/core";
import { Single, Combo, Msg } from "@/base";
import { MultiSelectInsertTrigger } from "./multiselect.insert.trigger";
@@ -134,8 +135,8 @@ export class MultiSelectInsertNoBarCombo extends Single {
}
self._dataChange = true;
});
- this.getSearcher().getKeywordsLength() > 2000 &&
- Msg.alert(i18nText("BI-Basic_Prompt"), i18nText("BI-Basic_Too_Much_Value_Get_Two_Thousand"));
+ this.getSearcher().getKeywordsLength() > PasteLimit &&
+ Msg.alert(i18nText("BI-Basic_Prompt"), i18nText("BI-Basic_Paste_Too_Much_Value", PasteLimit));
}
});
diff --git a/packages/fineui/src/widget/multiselect/multiselect.insert.trigger.js b/packages/fineui/src/widget/multiselect/multiselect.insert.trigger.js
index b7be3abf6..d292971c0 100644
--- a/packages/fineui/src/widget/multiselect/multiselect.insert.trigger.js
+++ b/packages/fineui/src/widget/multiselect/multiselect.insert.trigger.js
@@ -50,7 +50,7 @@ export class MultiSelectInsertTrigger extends Trigger {
itemFormatter: o.itemFormatter,
itemHeight: o.itemHeight,
watermark: o.watermark,
- popup: {},
+ popup: o.popup,
adapter: o.adapter,
masker: o.masker,
value: o.value,
diff --git a/packages/fineui/src/widget/multiselect/multiselect.trigger.js b/packages/fineui/src/widget/multiselect/multiselect.trigger.js
index d0666731d..8bfcfb6f7 100644
--- a/packages/fineui/src/widget/multiselect/multiselect.trigger.js
+++ b/packages/fineui/src/widget/multiselect/multiselect.trigger.js
@@ -50,7 +50,7 @@ export class MultiSelectTrigger extends Trigger {
valueFormatter: o.valueFormatter,
itemFormatter: o.itemFormatter,
watermark: o.watermark,
- popup: {},
+ popup: o.popup,
adapter: o.adapter,
masker: o.masker,
value: o.value,
diff --git a/packages/fineui/src/widget/multiselect/trigger/searcher.multiselect.insert.js b/packages/fineui/src/widget/multiselect/trigger/searcher.multiselect.insert.js
index c54bba3c8..cb948a7ac 100644
--- a/packages/fineui/src/widget/multiselect/trigger/searcher.multiselect.insert.js
+++ b/packages/fineui/src/widget/multiselect/trigger/searcher.multiselect.insert.js
@@ -10,7 +10,8 @@ import {
size,
each,
BlankSplitChar,
- Selection
+ Selection,
+ PasteLimit,
} from "@/core";
import { MultiSelectEditor } from "./editor.multiselect";
import { Searcher } from "@/base";
@@ -123,7 +124,7 @@ export class MultiSelectInsertSearcher extends Widget {
const keywords = this.getKeywords();
self.fireEvent(
MultiSelectInsertSearcher.EVENT_SEARCHING,
- keywords.length > 2000 ? keywords.slice(0, 2000).concat([BlankSplitChar]) : keywords.slice(0, 2000)
+ keywords.length > PasteLimit ? keywords.slice(0, PasteLimit).concat([BlankSplitChar]) : keywords.slice(0, PasteLimit)
);
});
if (isNotNull(o.value)) {
@@ -131,6 +132,10 @@ export class MultiSelectInsertSearcher extends Widget {
}
}
+ getSearcher() {
+ return this.searcher;
+ }
+
adjustView() {
this.searcher.adjustView();
}
@@ -150,7 +155,7 @@ export class MultiSelectInsertSearcher extends Widget {
}
getKeyword() {
- let keywords = this.editor.getKeywords().slice(0, 2000);
+ let keywords = this.editor.getKeywords().slice(0, PasteLimit);
if (keywords[keywords.length - 1] === BlankSplitChar) {
keywords = keywords.slice(0, keywords.length - 1);
}
diff --git a/packages/fineui/src/widget/multiselect/trigger/switcher.checkselected.js b/packages/fineui/src/widget/multiselect/trigger/switcher.checkselected.js
index 4d5bab1da..c4773e549 100644
--- a/packages/fineui/src/widget/multiselect/trigger/switcher.checkselected.js
+++ b/packages/fineui/src/widget/multiselect/trigger/switcher.checkselected.js
@@ -80,6 +80,10 @@ export class MultiSelectCheckSelectedSwitcher extends Widget {
this.switcher.adjustView();
}
+ getView() {
+ return this.switcher.getView();
+ }
+
hideView() {
this.switcher.empty();
this.switcher.hideView();
diff --git a/packages/fineui/src/widget/multiselectlist/multiselectlist.insert.js b/packages/fineui/src/widget/multiselectlist/multiselectlist.insert.js
index e0e4aac3b..a7b52fc2e 100644
--- a/packages/fineui/src/widget/multiselectlist/multiselectlist.insert.js
+++ b/packages/fineui/src/widget/multiselectlist/multiselectlist.insert.js
@@ -28,7 +28,8 @@ import {
isNull,
VerticalFillLayout,
SIZE_CONSANTS,
- BlankSplitChar
+ BlankSplitChar,
+ PasteLimit,
} from "@/core";
import { Single, Searcher, Msg } from "@/base";
import { MultiSelectBar } from "@/case";
@@ -200,10 +201,10 @@ export class MultiSelectInsertList extends Single {
}
self.fireEvent(MultiSelectInsertList.EVENT_CHANGE);
});
- self._getKeywordsLength() > 2000 &&
+ self._getKeywordsLength() > PasteLimit &&
Msg.alert(
i18nText("BI-Basic_Prompt"),
- i18nText("BI-Basic_Too_Much_Value_Get_Two_Thousand")
+ i18nText("BI-Basic_Paste_Too_Much_Value", PasteLimit)
);
}
},
@@ -266,7 +267,7 @@ export class MultiSelectInsertList extends Single {
keywords = keywords.concat([BlankSplitChar]);
}
- return keywords.length > 2000 ? keywords.slice(0, 2000).concat([BlankSplitChar]) : keywords.slice(0, 2000);
+ return keywords.length > PasteLimit ? keywords.slice(0, PasteLimit).concat([BlankSplitChar]) : keywords.slice(0, PasteLimit);
}
_getKeywordsLength() {
diff --git a/packages/fineui/src/widget/multiselectlist/multiselectlist.insert.nobar.js b/packages/fineui/src/widget/multiselectlist/multiselectlist.insert.nobar.js
index 1bca0a442..c166b8224 100644
--- a/packages/fineui/src/widget/multiselectlist/multiselectlist.insert.nobar.js
+++ b/packages/fineui/src/widget/multiselectlist/multiselectlist.insert.nobar.js
@@ -28,7 +28,8 @@ import {
isNull,
VTapeLayout,
BlankSplitChar,
- SIZE_CONSANTS
+ SIZE_CONSANTS,
+ PasteLimit,
} from "@/core";
import { Single, Searcher, Msg } from "@/base";
import { MultiSelectBar } from "@/case";
@@ -201,10 +202,10 @@ export class MultiSelectInsertNoBarList extends Single {
}
self.fireEvent(MultiSelectInsertNoBarList.EVENT_CHANGE);
});
- self._getKeywordsLength() > 2000 &&
+ self._getKeywordsLength() > PasteLimit &&
Msg.alert(
i18nText("BI-Basic_Prompt"),
- i18nText("BI-Basic_Too_Much_Value_Get_Two_Thousand")
+ i18nText("BI-Basic_Paste_Too_Much_Value", PasteLimit)
);
}
},
@@ -271,7 +272,7 @@ export class MultiSelectInsertNoBarList extends Single {
keywords = keywords.concat([BlankSplitChar]);
}
- return keywords.length > 2000 ? keywords.slice(0, 2000).concat([BlankSplitChar]) : keywords.slice(0, 2000);
+ return keywords.length > PasteLimit ? keywords.slice(0, PasteLimit).concat([BlankSplitChar]) : keywords.slice(0, PasteLimit);
}
_getKeywordsLength() {
diff --git a/packages/fineui/src/widget/multitree/multi.tree.combo.js b/packages/fineui/src/widget/multitree/multi.tree.combo.js
index 7d61b6e9d..8edab4f41 100644
--- a/packages/fineui/src/widget/multitree/multi.tree.combo.js
+++ b/packages/fineui/src/widget/multitree/multi.tree.combo.js
@@ -10,7 +10,7 @@ import {
VerticalAdaptLayout,
deepClone,
Selection,
- SIZE_CONSANTS
+ size
} from "@/core";
import { Single, Combo } from "@/base";
import { MultiTreeSearcher } from "./trigger/searcher.multi.tree";
@@ -27,12 +27,14 @@ export class MultiTreeCombo extends Single {
static EVENT_FOCUS = "EVENT_FOCUS";
static EVENT_BLUR = "EVENT_BLUR";
+ static EVENT_START = "EVENT_START";
static EVENT_STOP = "EVENT_STOP";
static EVENT_SEARCHING = "EVENT_SEARCHING";
static EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM";
static EVENT_CONFIRM = "EVENT_CONFIRM";
static EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW";
static EVENT_AFTER_HIDEVIEW = "EVENT_AFTER_HIDEVIEW";
+ static EVENT_BEFORE_NUMBER_COUNTER_POPUPVIEW = "EVENT_BEFORE_NUMBER_COUNTER_POPUPVIEW";
_defaultConfig() {
return extend(super._defaultConfig(...arguments), {
@@ -42,6 +44,8 @@ export class MultiTreeCombo extends Single {
height: 24,
allowEdit: true,
isNeedAdjustWidth: true,
+ popup: {},
+ masker: {},
});
}
@@ -63,23 +67,20 @@ export class MultiTreeCombo extends Single {
this.storeValue = { value: o.value || {} };
this.trigger = createWidget({
- type: "bi.multi_select_trigger",
+ type: MultiSelectTrigger.xtype,
+ popup: o.popup,
+ masker: o.masker,
allowEdit: o.allowEdit,
height: toPix(o.height, o.simple ? 1 : 2),
valueFormatter: o.valueFormatter,
text: o.text,
defaultText: o.defaultText,
watermark: o.watermark,
- masker: {
- offset: {
- left: 0,
- top: 0,
- right: 0,
- bottom: SIZE_CONSANTS.LIST_ITEM_HEIGHT + 1,
- },
+ adapter: () => {
+ return this.popup.getView();
},
searcher: {
- type: "bi.multi_tree_searcher",
+ type: MultiTreeSearcher.xtype,
itemsCreator: o.itemsCreator,
listeners: [
{
@@ -104,8 +105,6 @@ export class MultiTreeCombo extends Single {
type: MultiTreePopup.xtype,
ref() {
self.popup = this;
- self.trigger.setAdapter(this);
- self.numberCounter.setAdapter(this);
},
listeners: [
{
@@ -160,13 +159,16 @@ export class MultiTreeCombo extends Single {
});
},
maxWidth: o.isNeedAdjustWidth ? "auto" : 500,
+ ...o.popup,
},
isNeedAdjustWidth: o.isNeedAdjustWidth,
value: { value: o.value || {} },
hideChecker(e) {
return (
triggerBtn.element.find(e.target).length === 0 &&
- self.numberCounter.element.find(e.target).length === 0
+ size(self.numberCounter.getView()?.element.find(e.target)) === 0 &&
+ size(self.trigger.getSearcher().getSearcher().getView()?.element.find(e.target)) === 0 &&
+ self.trigger.getSearcher().getSearcher().getView()?.element[0] !== e.target
);
},
});
@@ -193,6 +195,7 @@ export class MultiTreeCombo extends Single {
self.storeValue = { value: self.combo.getValue() };
this.setValue(self.storeValue);
self.numberCounter.setValue(self.storeValue);
+ self.fireEvent(MultiTreeCombo.EVENT_START);
});
this.trigger.on(MultiSelectTrigger.EVENT_STOP, function () {
self.storeValue = { value: this.getValue() };
@@ -295,23 +298,18 @@ export class MultiTreeCombo extends Single {
});
this.numberCounter = createWidget({
- type: "bi.multi_select_check_selected_switcher",
+ type: MultiSelectCheckSelectedSwitcher,
el: {
- // type: "bi.multi_tree_check_selected_button",
type: MultiTreeCheckSelectedButton.xtype,
},
popup: {
- // type: "bi.multi_tree_check_pane",
type: MultiTreeCheckPane.xtype,
+ ...o.popup,
},
- masker: {
- offset: {
- left: 0,
- top: 0,
- right: 0,
- bottom: SIZE_CONSANTS.LIST_ITEM_HEIGHT + 1,
- },
+ adapter: () => {
+ return this.popup.getView();
},
+ masker: o.masker,
itemsCreator: o.itemsCreator,
valueFormatter: o.valueFormatter,
value: { value: o.value || {} },
@@ -334,6 +332,7 @@ export class MultiTreeCombo extends Single {
want2showCounter = null;
showCounter();
}
+ this.fireEvent(MultiTreeCombo.EVENT_BEFORE_NUMBER_COUNTER_POPUPVIEW);
}
);
@@ -443,4 +442,16 @@ export class MultiTreeCombo extends Single {
setWaterMark(v) {
this.trigger.setWaterMark(v);
}
+
+ getPopup() {
+ return this.popup;
+ }
+
+ getNumberCounter() {
+ return this.numberCounter;
+ }
+
+ getTrigger() {
+ return this.trigger;
+ }
}
diff --git a/packages/fineui/src/widget/multitree/multi.tree.popup.js b/packages/fineui/src/widget/multitree/multi.tree.popup.js
index 44c91a591..4bd078ab1 100644
--- a/packages/fineui/src/widget/multitree/multi.tree.popup.js
+++ b/packages/fineui/src/widget/multitree/multi.tree.popup.js
@@ -105,4 +105,8 @@ export class MultiTreePopup extends Pane {
resetWidth(w) {
this.popupView.resetWidth(w);
}
+
+ getView() {
+ return this.popupView.getView();
+ }
}
diff --git a/packages/fineui/src/widget/multitree/trigger/searcher.multi.tree.js b/packages/fineui/src/widget/multitree/trigger/searcher.multi.tree.js
index 518dff408..972f8ac15 100644
--- a/packages/fineui/src/widget/multitree/trigger/searcher.multi.tree.js
+++ b/packages/fineui/src/widget/multitree/trigger/searcher.multi.tree.js
@@ -220,6 +220,10 @@ export class MultiTreeSearcher extends Widget {
return this.editor.getState();
}
+ getSearcher() {
+ return this.searcher;
+ }
+
setValue(ob) {
this.setState(ob);
this.searcher.setValue(ob);
diff --git a/packages/fineui/src/widget/singleselect/singleselect.insert.combo.js b/packages/fineui/src/widget/singleselect/singleselect.insert.combo.js
index eb528ec7a..8b07ee6ec 100644
--- a/packages/fineui/src/widget/singleselect/singleselect.insert.combo.js
+++ b/packages/fineui/src/widget/singleselect/singleselect.insert.combo.js
@@ -10,7 +10,8 @@ import {
isNotNull,
nextTick,
AbsoluteLayout,
- makeObject
+ makeObject,
+ size
} from "@/core";
import { Single, Combo } from "@/base";
import { SingleSelectTrigger } from "./singleselect.trigger";
@@ -25,10 +26,12 @@ export class SingleSelectInsertCombo extends Single {
static REQ_GET_ALL_DATA = -1;
static EVENT_FOCUS = "EVENT_FOCUS";
static EVENT_BLUR = "EVENT_BLUR";
+ static EVENT_START = "EVENT_START";
static EVENT_STOP = "EVENT_STOP";
static EVENT_SEARCHING = "EVENT_SEARCHING";
static EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM";
static EVENT_CONFIRM = "EVENT_CONFIRM";
+ static EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"
_defaultConfig() {
return extend(super._defaultConfig(...arguments), {
@@ -40,6 +43,8 @@ export class SingleSelectInsertCombo extends Single {
height: 24,
allowEdit: true,
watermark: i18nText("BI-Basic_Search_And_Patch_Paste"),
+ popup: {},
+ masker: {},
});
}
@@ -57,6 +62,7 @@ export class SingleSelectInsertCombo extends Single {
this.trigger = createWidget({
type: SingleSelectTrigger.xtype,
+ masker: o.masker,
watermark: o.watermark,
height: toPix(o.height, o.simple ? 1 : 2),
allowNoSelect: o.allowNoSelect,
@@ -77,6 +83,7 @@ export class SingleSelectInsertCombo extends Single {
searcher: {
popup: {
type: SingleSelectSearchInsertPane.xtype,
+ ...o.popup,
},
},
});
@@ -91,6 +98,7 @@ export class SingleSelectInsertCombo extends Single {
this.trigger.on(SingleSelectTrigger.EVENT_START, function () {
self._setStartValue();
this.getSearcher().setValue(self.storeValue);
+ self.fireEvent(SingleSelectInsertCombo.EVENT_START);
});
this.trigger.on(SingleSelectTrigger.EVENT_STOP, () => {
self._setStartValue();
@@ -156,9 +164,13 @@ export class SingleSelectInsertCombo extends Single {
self.trigger.getSearcher().adjustView();
});
},
+ ...o.popup,
},
hideChecker(e) {
- return triggerBtn.element.find(e.target).length === 0;
+ return (
+ triggerBtn.element.find(e.target).length === 0 &&
+ size(self.trigger.getSearcher().getSearcher().getView()?.element.find(e.target)) === 0
+ );
},
value: o.value,
});
@@ -171,6 +183,7 @@ export class SingleSelectInsertCombo extends Single {
nextTick(() => {
self.populate();
});
+ self.fireEvent(SingleSelectInsertCombo .EVENT_BEFORE_POPUPVIEW);
});
// 当退出的时候如果还在处理请求,则等请求结束后再对外发确定事件
this.wants2Quit = false;
@@ -261,4 +274,12 @@ export class SingleSelectInsertCombo extends Single {
populate() {
this.combo.populate(...arguments);
}
+
+ getPopup() {
+ return this.popup;
+ }
+
+ getTrigger() {
+ return this.trigger;
+ }
}
diff --git a/packages/fineui/src/widget/singleselect/trigger/searcher.singleselect.js b/packages/fineui/src/widget/singleselect/trigger/searcher.singleselect.js
index 31ebc6f67..c9df1bde1 100644
--- a/packages/fineui/src/widget/singleselect/trigger/searcher.singleselect.js
+++ b/packages/fineui/src/widget/singleselect/trigger/searcher.singleselect.js
@@ -131,6 +131,10 @@ export class SingleSelectSearcher extends Widget {
return this.searcher.getView() && this.searcher.getView().hasChecked();
}
+ getSearcher() {
+ return this.searcher;
+ }
+
setAdapter(adapter) {
this.searcher.setAdapter(adapter);
}
diff --git a/packages/fineui/src/widget/textvaluedownlistcombo/combo.textvaluedownlist.js b/packages/fineui/src/widget/textvaluedownlistcombo/combo.textvaluedownlist.js
index 398888e25..617ce13f3 100644
--- a/packages/fineui/src/widget/textvaluedownlistcombo/combo.textvaluedownlist.js
+++ b/packages/fineui/src/widget/textvaluedownlistcombo/combo.textvaluedownlist.js
@@ -20,6 +20,7 @@ export class TextValueDownListCombo extends Widget {
static xtype = "bi.text_value_down_list_combo";
static EVENT_CHANGE = "EVENT_CHANGE";
+ static EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW";
_defaultConfig(config) {
return extend(super._defaultConfig(...arguments), {
@@ -42,6 +43,7 @@ export class TextValueDownListCombo extends Widget {
this.combo = createWidget({
type: DownListCombo.xtype,
element: this,
+ container: o.container,
chooseType: Selection.Single,
adjustLength: 2,
width: toPix(o.width, 2),
@@ -59,6 +61,7 @@ export class TextValueDownListCombo extends Widget {
},
value: isNull(value) ? [] : [value],
items: deepClone(o.items),
+ popup: o.popup,
});
this.combo.on(DownListCombo.EVENT_CHANGE, () => {
@@ -76,6 +79,10 @@ export class TextValueDownListCombo extends Widget {
this.fireEvent(TextValueDownListCombo.EVENT_CHANGE);
}
});
+
+ this.combo.on(DownListCombo.EVENT_BEFORE_POPUPVIEW, () => {
+ this.fireEvent(TextValueDownListCombo.EVENT_BEFORE_POPUPVIEW);
+ });
}
_createValueMap() {
@@ -114,4 +121,8 @@ export class TextValueDownListCombo extends Widget {
this.combo.populate(items);
this._createValueMap();
}
+
+ getPopup() {
+ return this.combo.getPopup();
+ }
}
diff --git a/packages/fineui/src/widget/timeinterval/dateinterval.js b/packages/fineui/src/widget/timeinterval/dateinterval.js
index 4c7f784da..d98510c7b 100644
--- a/packages/fineui/src/widget/timeinterval/dateinterval.js
+++ b/packages/fineui/src/widget/timeinterval/dateinterval.js
@@ -30,6 +30,8 @@ export class DateInterval extends Single {
static EVENT_ERROR = "EVENT_ERROR";
static EVENT_CHANGE = "EVENT_CHANGE";
static EVENT_BEFORE_YEAR_MONTH_POPUPVIEW = "EVENT_BEFORE_YEAR_MONTH_POPUPVIEW";
+ static EVENT_BEFORE_START_POPUPVIEW = "EVENT_BEFORE_START_POPUPVIEW";
+ static EVENT_BEFORE_END_POPUPVIEW = "EVENT_BEFORE_END_POPUPVIEW";
_defaultConfig() {
const conf = super._defaultConfig(...arguments);
@@ -50,6 +52,13 @@ export class DateInterval extends Single {
this.left = this._createCombo(o.value.start, o.watermark?.start);
this.right = this._createCombo(o.value.end, o.watermark?.end);
+ this.left.on(DynamicDateCombo.EVENT_BEFORE_POPUPVIEW, () => {
+ this.fireEvent(DateInterval.EVENT_BEFORE_START_POPUPVIEW);
+ })
+ this.right.on(DynamicDateCombo.EVENT_BEFORE_POPUPVIEW, () => {
+ this.fireEvent(DateInterval.EVENT_BEFORE_END_POPUPVIEW);
+ })
+
return {
type: HorizontalFillLayout.xtype,
columnSize: ["fill", "", "fill"],
@@ -79,6 +88,8 @@ export class DateInterval extends Single {
const o = this.options;
const combo = createWidget({
type: DynamicDateCombo.xtype,
+ container: o.container,
+ popup: o.popup,
isPreview: o.isPreview,
supportDynamic: o.supportDynamic,
minDate: o.minDate,
@@ -243,4 +254,11 @@ export class DateInterval extends Single {
end: this.right.getValue(),
};
}
+
+ getPopup() {
+ return {
+ start: this.left.getPopup(),
+ end: this.right.getPopup(),
+ };
+ }
}
diff --git a/packages/fineui/src/widget/timeinterval/timeinterval.js b/packages/fineui/src/widget/timeinterval/timeinterval.js
index 85deda173..4ae530169 100644
--- a/packages/fineui/src/widget/timeinterval/timeinterval.js
+++ b/packages/fineui/src/widget/timeinterval/timeinterval.js
@@ -29,6 +29,8 @@ export class TimeInterval extends Single {
static EVENT_VALID = "EVENT_VALID";
static EVENT_ERROR = "EVENT_ERROR";
static EVENT_CHANGE = "EVENT_CHANGE";
+ static EVENT_BEFORE_START_POPUPVIEW = "EVENT_BEFORE_START_POPUPVIEW";
+ static EVENT_BEFORE_END_POPUPVIEW = "EVENT_BEFORE_END_POPUPVIEW";
_defaultConfig() {
const conf = super._defaultConfig(...arguments);
@@ -48,6 +50,13 @@ export class TimeInterval extends Single {
this.left = this._createCombo(o.value.start, o.watermark?.start);
this.right = this._createCombo(o.value.end, o.watermark?.end);
+ this.left.on(DynamicDateTimeCombo.EVENT_BEFORE_POPUPVIEW, () => {
+ this.fireEvent(TimeInterval.EVENT_BEFORE_START_POPUPVIEW);
+ })
+ this.right.on(DynamicDateTimeCombo.EVENT_BEFORE_POPUPVIEW, () => {
+ this.fireEvent(TimeInterval.EVENT_BEFORE_END_POPUPVIEW);
+ })
+
return {
type: HorizontalFillLayout.xtype,
columnSize: ["fill", "", "fill"],
@@ -77,6 +86,8 @@ export class TimeInterval extends Single {
const o = this.options;
const combo = createWidget({
type: DynamicDateTimeCombo.xtype,
+ container: o.container,
+ popup: o.popup,
isPreview: o.isPreview,
timeSelectTypes: o.timeSelectTypes,
simple: o.simple,
@@ -250,4 +261,11 @@ export class TimeInterval extends Single {
end: this.right.getValue(),
};
}
+
+ getPopup() {
+ return {
+ start: this.left.getPopup(),
+ end: this.right.getPopup(),
+ };
+ }
}
diff --git a/packages/fineui/src/widget/year/combo.year.js b/packages/fineui/src/widget/year/combo.year.js
index 50056e22e..1bf7e11e6 100644
--- a/packages/fineui/src/widget/year/combo.year.js
+++ b/packages/fineui/src/widget/year/combo.year.js
@@ -98,13 +98,13 @@ export class DynamicYearCombo extends Widget {
supportDynamic: o.supportDynamic,
isPreview: o.isPreview,
ref: _ref => {
- this.popup = _ref;
+ this.popupEl = _ref;
},
listeners: [
{
eventName: DynamicYearPopup.EVENT_CHANGE,
action: () => {
- this.setValue(this.popup.getValue());
+ this.setValue(this.popupEl.getValue());
this.combo.hideView();
this.fireEvent(DynamicYearCombo.EVENT_CONFIRM);
},
@@ -129,7 +129,7 @@ export class DynamicYearCombo extends Widget {
{
eventName: DynamicYearPopup.BUTTON_OK_EVENT_CHANGE,
action: () => {
- this.setValue(this.popup.getValue());
+ this.setValue(this.popupEl.getValue());
this.combo.hideView();
this.fireEvent(DynamicDateCombo.EVENT_CONFIRM);
},
@@ -140,12 +140,16 @@ export class DynamicYearCombo extends Widget {
max: o.maxDate,
},
value: o.value || "",
+ ref: (ref) => {
+ this.popup = ref;
+ },
+ ...o.popup,
},
});
this.combo.on(Combo.EVENT_BEFORE_POPUPVIEW, () => {
- this.popup.setMinDate(o.minDate);
- this.popup.setMaxDate(o.maxDate);
- this.popup.setValue(this.storeValue);
+ this.popupEl.setMinDate(o.minDate);
+ this.popupEl.setMaxDate(o.maxDate);
+ this.popupEl.setValue(this.storeValue);
this.fireEvent(DynamicYearCombo.EVENT_BEFORE_POPUPVIEW);
});
@@ -205,14 +209,14 @@ export class DynamicYearCombo extends Widget {
const o = this.options;
o.minDate = minDate;
this.trigger.setMinDate(minDate);
- this.popup && this.popup.setMinDate(minDate);
+ this.popupEl && this.popupEl.setMinDate(minDate);
}
setMaxDate(maxDate) {
const o = this.options;
o.maxDate = maxDate;
this.trigger.setMaxDate(maxDate);
- this.popup && this.popup.setMaxDate(maxDate);
+ this.popupEl && this.popupEl.setMaxDate(maxDate);
}
hideView() {
@@ -240,6 +244,10 @@ export class DynamicYearCombo extends Widget {
setWaterMark(v) {
this.trigger.setWaterMark(v);
}
+
+ getPopup() {
+ return this.popup;
+ }
}
extend(DynamicYearCombo, {
Static: 1,
diff --git a/packages/fineui/src/widget/yearmonth/combo.yearmonth.js b/packages/fineui/src/widget/yearmonth/combo.yearmonth.js
index 79dfa5da8..de524f2b8 100644
--- a/packages/fineui/src/widget/yearmonth/combo.yearmonth.js
+++ b/packages/fineui/src/widget/yearmonth/combo.yearmonth.js
@@ -109,13 +109,13 @@ export class DynamicYearMonthCombo extends Single {
supportDynamic: o.supportDynamic,
isPreview: o.isPreview,
ref: _ref => {
- this.popup = _ref;
+ this.popupEl = _ref;
},
listeners: [
{
eventName: DynamicYearMonthPopup.EVENT_CHANGE,
action: () => {
- this.setValue(this.popup.getValue());
+ this.setValue(this.popupEl.getValue());
this.combo.hideView();
this.fireEvent(DynamicYearMonthCombo.EVENT_CONFIRM);
},
@@ -147,7 +147,7 @@ export class DynamicYearMonthCombo extends Single {
{
eventName: DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE,
action: () => {
- const value = this.popup.getValue();
+ const value = this.popupEl.getValue();
if (this._checkValue(value)) {
this.setValue(value);
}
@@ -161,12 +161,16 @@ export class DynamicYearMonthCombo extends Single {
max: o.maxDate,
},
value: o.value || "",
+ ref: (ref) => {
+ this.popup = ref;
+ },
+ ...o.popup,
},
});
this.combo.on(Combo.EVENT_BEFORE_POPUPVIEW, () => {
- this.popup.setMinDate(o.minDate);
- this.popup.setMaxDate(o.maxDate);
- this.popup.setValue(this.storeValue);
+ this.popupEl.setMinDate(o.minDate);
+ this.popupEl.setMaxDate(o.maxDate);
+ this.popupEl.setValue(this.storeValue);
this.fireEvent(DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW);
});
@@ -241,14 +245,18 @@ export class DynamicYearMonthCombo extends Single {
const o = this.options;
o.minDate = minDate;
this.trigger.setMinDate(minDate);
- this.popup && this.popup.setMinDate(minDate);
+ this.popupEl && this.popupEl.setMinDate(minDate);
}
setMaxDate(maxDate) {
const o = this.options;
o.maxDate = maxDate;
this.trigger.setMaxDate(maxDate);
- this.popup && this.popup.setMaxDate(maxDate);
+ this.popupEl && this.popupEl.setMaxDate(maxDate);
+ }
+
+ getPopup() {
+ return this.popup;
}
hideView() {
diff --git a/packages/fineui/src/widget/yearmonthinterval/yearmonthinterval.js b/packages/fineui/src/widget/yearmonthinterval/yearmonthinterval.js
index c6bc874bb..c7abfff4e 100644
--- a/packages/fineui/src/widget/yearmonthinterval/yearmonthinterval.js
+++ b/packages/fineui/src/widget/yearmonthinterval/yearmonthinterval.js
@@ -20,6 +20,8 @@ export class YearMonthInterval extends Single {
static EVENT_ERROR = "EVENT_ERROR";
static EVENT_CHANGE = "EVENT_CHANGE";
static EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW";
+ static EVENT_BEFORE_START_POPUPVIEW = "EVENT_BEFORE_START_POPUPVIEW";
+ static EVENT_BEFORE_END_POPUPVIEW = "EVENT_BEFORE_END_POPUPVIEW";
constants = {
width: 25,
@@ -43,6 +45,13 @@ export class YearMonthInterval extends Single {
this.left = this._createCombo(o.value.start, o.watermark?.start);
this.right = this._createCombo(o.value.end, o.watermark?.end);
+ this.left.on(DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW, () => {
+ this.fireEvent(YearMonthInterval.EVENT_BEFORE_START_POPUPVIEW);
+ })
+ this.right.on(DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW, () => {
+ this.fireEvent(YearMonthInterval.EVENT_BEFORE_END_POPUPVIEW);
+ })
+
return {
type: HorizontalFillLayout.xtype,
columnSize: ["fill", "", "fill"],
@@ -72,6 +81,8 @@ export class YearMonthInterval extends Single {
const o = this.options;
const combo = createWidget({
type: DynamicYearMonthCombo.xtype,
+ container: o.container,
+ popup: o.popup,
isPreview: o.isPreview,
simple: o.simple,
supportDynamic: o.supportDynamic,
@@ -235,4 +246,11 @@ export class YearMonthInterval extends Single {
getValue() {
return { start: this.left.getValue(), end: this.right.getValue() };
}
+
+ getPopup() {
+ return {
+ start: this.left.getPopup(),
+ end: this.right.getPopup(),
+ };
+ }
}
diff --git a/packages/fineui/src/widget/yearquarter/combo.yearquarter.js b/packages/fineui/src/widget/yearquarter/combo.yearquarter.js
index c14100a38..0f9c473c1 100644
--- a/packages/fineui/src/widget/yearquarter/combo.yearquarter.js
+++ b/packages/fineui/src/widget/yearquarter/combo.yearquarter.js
@@ -112,13 +112,13 @@ export class DynamicYearQuarterCombo extends Widget {
supportDynamic: o.supportDynamic,
isPreview: o.isPreview,
ref: _ref => {
- this.popup = _ref;
+ this.popupEl = _ref;
},
listeners: [
{
eventName: DynamicYearQuarterPopup.EVENT_CHANGE,
action: () => {
- this.setValue(this.popup.getValue());
+ this.setValue(this.popupEl.getValue());
this.combo.hideView();
this.fireEvent(DynamicYearQuarterCombo.EVENT_CONFIRM);
},
@@ -150,7 +150,7 @@ export class DynamicYearQuarterCombo extends Widget {
{
eventName: DynamicYearQuarterPopup.BUTTON_OK_EVENT_CHANGE,
action: () => {
- const value = this.popup.getValue();
+ const value = this.popupEl.getValue();
if (this._checkValue(value)) {
this.setValue(value);
}
@@ -164,12 +164,16 @@ export class DynamicYearQuarterCombo extends Widget {
max: o.maxDate,
},
value: o.value || "",
+ ref: (ref) => {
+ this.popup = ref;
+ },
+ ...o.popup,
},
});
this.combo.on(Combo.EVENT_BEFORE_POPUPVIEW, () => {
- this.popup.setMinDate(o.minDate);
- this.popup.setMaxDate(o.maxDate);
- this.popup.setValue(this.storeValue);
+ this.popupEl.setMinDate(o.minDate);
+ this.popupEl.setMaxDate(o.maxDate);
+ this.popupEl.setValue(this.storeValue);
this.fireEvent(DynamicYearQuarterCombo.EVENT_BEFORE_POPUPVIEW);
});
@@ -244,14 +248,18 @@ export class DynamicYearQuarterCombo extends Widget {
const o = this.options;
o.minDate = minDate;
this.trigger.setMinDate(minDate);
- this.popup && this.popup.setMinDate(minDate);
+ this.popupEl && this.popupEl.setMinDate(minDate);
}
setMaxDate(maxDate) {
const o = this.options;
o.maxDate = maxDate;
this.trigger.setMaxDate(maxDate);
- this.popup && this.popup.setMaxDate(maxDate);
+ this.popupEl && this.popupEl.setMaxDate(maxDate);
+ }
+
+ getPopup() {
+ return this.popup;
}
hideView() {
diff --git a/packages/fineui/typescript/core/var.ts b/packages/fineui/typescript/core/var.ts
index 580091fb2..09e5c89e9 100644
--- a/packages/fineui/typescript/core/var.ts
+++ b/packages/fineui/typescript/core/var.ts
@@ -130,6 +130,7 @@ export declare const VerticalAlign: {
export declare const StartOfWeek: number;
export declare const BlankSplitChar: string;
export declare const Events: Record;
+export declare const PasteLimit: number;
type SetFunc = (value: any) => void;
@@ -141,3 +142,4 @@ export declare const setBlankSplitChar: SetFunc;
export declare const setPixFormat: SetFunc;
export declare const setToPix: SetFunc;
export declare const setEventBlur: SetFunc;
+export declare const setPasteLimit: SetFunc;
diff --git a/packages/fineui/typescript/index.ts b/packages/fineui/typescript/index.ts
index 97de6153e..acb087f20 100644
--- a/packages/fineui/typescript/index.ts
+++ b/packages/fineui/typescript/index.ts
@@ -103,6 +103,7 @@ export { CenterAdaptLayout } from "./core/wrapper/layout/adapt/adapt.center";
export { VerticalAdaptLayout } from "./core/wrapper/layout/adapt/adapt.vertical";
export { MultiSelectInsertCombo } from "./widget/multiselect/multiselect.insert.combo";
export { MultiSelectCombo } from "./widget/multiselect/multiselect.combo";
+export { MultiSelectCheckSelectedSwitcher } from "./widget/multiselect/switcher.checkselected";
export { SearchEditor } from "./widget/editor/editor.search";
export { MultiLayerSingleLevelTree } from "./widget/multilayersingletree/multilayersingletree.leveltree";
export { SimpleColorChooser } from "./case/colorchooser/colorchooser.simple";
diff --git a/packages/fineui/typescript/widget/downlist/combo.downlist.ts b/packages/fineui/typescript/widget/downlist/combo.downlist.ts
index 6cc88db52..4eed3e1f7 100644
--- a/packages/fineui/typescript/widget/downlist/combo.downlist.ts
+++ b/packages/fineui/typescript/widget/downlist/combo.downlist.ts
@@ -1,3 +1,4 @@
+import { PopupView } from "../../base/layer/layer.popup";
import { Widget } from "../../core/widget";
export declare class DownListCombo extends Widget {
@@ -15,4 +16,6 @@ export declare class DownListCombo extends Widget {
adjustWidth: (e?: MouseEvent) => void;
adjustHeight: (e?: MouseEvent) => void;
+
+ getPopup(): PopupView;
}
diff --git a/packages/fineui/typescript/widget/dynamicdate/dynamicdate.combo.ts b/packages/fineui/typescript/widget/dynamicdate/dynamicdate.combo.ts
index e9a54490a..a4f82a741 100644
--- a/packages/fineui/typescript/widget/dynamicdate/dynamicdate.combo.ts
+++ b/packages/fineui/typescript/widget/dynamicdate/dynamicdate.combo.ts
@@ -1,4 +1,5 @@
-import { Single } from '../../base/single/single';
+import { PopupView } from "../../base/layer/layer.popup";
+import { Single } from "../../base/single/single";
export declare class DynamicDateCombo extends Single {
static xtype: string;
@@ -26,6 +27,7 @@ export declare class DynamicDateCombo extends Single {
};
watermark?: string;
simple?: boolean;
+ popup?: any;
} & Single['props']
setMinDate(minDate: string): void;
@@ -43,6 +45,8 @@ export declare class DynamicDateCombo extends Single {
blur(): void;
setWaterMark(v: string): void;
+
+ getPopup(): PopupView;
}
export interface DynamicDataComboValue {
diff --git a/packages/fineui/typescript/widget/dynamicdatetime/dynamicdatetime.combo.ts b/packages/fineui/typescript/widget/dynamicdatetime/dynamicdatetime.combo.ts
index 120f38ef3..7ef1abc68 100644
--- a/packages/fineui/typescript/widget/dynamicdatetime/dynamicdatetime.combo.ts
+++ b/packages/fineui/typescript/widget/dynamicdatetime/dynamicdatetime.combo.ts
@@ -1,3 +1,4 @@
+import { PopupView } from '../../base/layer/layer.popup';
import { Single } from '../../base/single/single';
export declare class DynamicDateTimeCombo extends Single {
@@ -23,6 +24,7 @@ export declare class DynamicDateTimeCombo extends Single {
tabIndex?: number;
};
watermark?: string;
+ popup?: any;
} & Single['props'];
getValue(): DynamicDateTimeComboValue;
@@ -40,6 +42,8 @@ export declare class DynamicDateTimeCombo extends Single {
blur(): void;
setWaterMark(v: string): void
+
+ getPopup(): PopupView;
}
export interface DynamicDateTimeComboValue {
diff --git a/packages/fineui/typescript/widget/multiselect/multiselect.insert.combo.ts b/packages/fineui/typescript/widget/multiselect/multiselect.insert.combo.ts
index bd0a75ece..6aef0a5c5 100644
--- a/packages/fineui/typescript/widget/multiselect/multiselect.insert.combo.ts
+++ b/packages/fineui/typescript/widget/multiselect/multiselect.insert.combo.ts
@@ -1,4 +1,6 @@
+import { PopupView } from "../../base/layer/layer.popup";
import { Single } from "../../base/single/single";
+import { MultiSelectCheckSelectedSwitcher } from "./switcher.checkselected";
export declare class MultiSelectInsertCombo extends Single {
static xtype: string;
@@ -12,6 +14,8 @@ export declare class MultiSelectInsertCombo extends Single {
static REQ_GET_DATA_LENGTH: 1;
static REQ_GET_ALL_DATA: -1;
static EVENT_AFTER_HIDEVIEW: string;
+ static EVENT_BEFORE_POPUPVIEW: string;
+ static EVENT_BEFORE_NUMBER_COUNTER_POPUPVIEW: string;
props: {
itemsCreator?: Function;
@@ -21,6 +25,8 @@ export declare class MultiSelectInsertCombo extends Single {
text?: string;
watermark?: string;
container?: any;
+ popup?: any;
+ masker?: any;
} & Single["props"];
_itemsCreator4Trigger(op: any, callback: Function): void;
@@ -67,5 +73,9 @@ export declare class MultiSelectInsertCombo extends Single {
assist: string[];
};
+ getPopup(): PopupView;
+
+ getNumberCounter(): MultiSelectCheckSelectedSwitcher;
+
populate(...args: any[]): void;
}
diff --git a/packages/fineui/typescript/widget/multiselect/switcher.checkselected.ts b/packages/fineui/typescript/widget/multiselect/switcher.checkselected.ts
new file mode 100644
index 000000000..8e6e83a6e
--- /dev/null
+++ b/packages/fineui/typescript/widget/multiselect/switcher.checkselected.ts
@@ -0,0 +1,19 @@
+import { Widget } from '../../core/widget';
+
+export declare class MultiSelectCheckSelectedSwitcher extends Widget {
+ static xtype: string;
+ static EVENT_TRIGGER_CHANGE: string;
+ static EVENT_BEFORE_POPUPVIEW: string;
+ static EVENT_AFTER_HIDEVIEW: string;
+
+ props: {
+ itemsCreator?: Function;
+ valueFormatter?: Function;
+ };
+
+ adjustView(): void;
+
+ hideView(): void;
+
+ getView(): Widget;
+}
diff --git a/packages/fineui/typescript/widget/multitree/multi.tree.combo.ts b/packages/fineui/typescript/widget/multitree/multi.tree.combo.ts
index 3fe60ebed..944397695 100644
--- a/packages/fineui/typescript/widget/multitree/multi.tree.combo.ts
+++ b/packages/fineui/typescript/widget/multitree/multi.tree.combo.ts
@@ -1,5 +1,7 @@
+import { PopupView } from "../../base/layer/layer.popup";
import { Single } from "../../base/single/single";
import { Widget } from "../../core/widget";
+import { MultiSelectCheckSelectedSwitcher } from "../multiselect/switcher.checkselected";
export declare class MultiTreeCombo extends Single {
static xtype: string;
@@ -10,6 +12,12 @@ export declare class MultiTreeCombo extends Single {
static EVENT_CLICK_ITEM: string;
static EVENT_CONFIRM: string;
static EVENT_BEFORE_POPUPVIEW: string;
+ static EVENT_BEFORE_NUMBER_COUNTER_POPUPVIEW: string;
+
+ props: {
+ popup?: any;
+ masker?: any;
+ } & Single["props"];
showView(): void;
hideView(): void;
@@ -21,4 +29,8 @@ export declare class MultiTreeCombo extends Single {
blur(): void;
setWaterMark(v: string): void;
+
+ getPopup(): PopupView;
+
+ getNumberCounter(): MultiSelectCheckSelectedSwitcher;
}
diff --git a/packages/fineui/typescript/widget/multitree/multi.tree.popup.ts b/packages/fineui/typescript/widget/multitree/multi.tree.popup.ts
index 68f8f65a2..3c7506623 100644
--- a/packages/fineui/typescript/widget/multitree/multi.tree.popup.ts
+++ b/packages/fineui/typescript/widget/multitree/multi.tree.popup.ts
@@ -1,3 +1,4 @@
+import { ButtonGroup } from "../../base/combination/group.button";
import { Pane } from "../../base/pane";
export declare class MultiTreePopup extends Pane {
@@ -12,4 +13,6 @@ export declare class MultiTreePopup extends Pane {
resetHeight(h: number): void;
resetWidth(w: number): void;
+
+ getView(): ButtonGroup;
}
diff --git a/packages/fineui/typescript/widget/singleselect/singleselect.insert.combo.ts b/packages/fineui/typescript/widget/singleselect/singleselect.insert.combo.ts
index 5c9f5d934..d153b952a 100644
--- a/packages/fineui/typescript/widget/singleselect/singleselect.insert.combo.ts
+++ b/packages/fineui/typescript/widget/singleselect/singleselect.insert.combo.ts
@@ -1,3 +1,4 @@
+import { PopupView } from "../../base/layer/layer.popup";
import { Single } from "../../base/single/single";
export declare class SingleSelectInsertCombo extends Single {
@@ -8,6 +9,7 @@ export declare class SingleSelectInsertCombo extends Single {
static EVENT_SEARCHING: string;
static EVENT_CLICK_ITEM: string;
static EVENT_CONFIRM: string;
+ static EVENT_BEFORE_POPUPVIEW: string;
props: {
text?: string,
@@ -16,5 +18,8 @@ export declare class SingleSelectInsertCombo extends Single {
valueFormatter?: Function,
allowEdit?: boolean,
watermark?: string,
+ popup?: any;
} & Single['props']
+
+ getPopup(): PopupView;
}
diff --git a/packages/fineui/typescript/widget/textvaluedownlistcombo/combo.textvaluedownlist.ts b/packages/fineui/typescript/widget/textvaluedownlistcombo/combo.textvaluedownlist.ts
index e3387f30d..d351e5f33 100644
--- a/packages/fineui/typescript/widget/textvaluedownlistcombo/combo.textvaluedownlist.ts
+++ b/packages/fineui/typescript/widget/textvaluedownlistcombo/combo.textvaluedownlist.ts
@@ -1,8 +1,17 @@
+import { PopupView } from "../../base/layer/layer.popup";
import { Widget } from "../../core/widget";
export declare class TextValueDownListCombo extends Widget {
static xtype: string;
static EVENT_CHANGE: string;
+ static EVENT_BEFORE_POPUPVIEW: string;
+
+ props: {
+ container?: string;
+ popup?: any;
+ };
getValue(): [T];
+
+ getPopup(): PopupView;
}
diff --git a/packages/fineui/typescript/widget/timeinterval/dateinterval.ts b/packages/fineui/typescript/widget/timeinterval/dateinterval.ts
index 31001fe6a..27ca6f787 100644
--- a/packages/fineui/typescript/widget/timeinterval/dateinterval.ts
+++ b/packages/fineui/typescript/widget/timeinterval/dateinterval.ts
@@ -1,5 +1,5 @@
import { Single } from "../../base/single/single";
-import { DynamicDataComboValue } from "../dynamicdate/dynamicdate.combo";
+import { DynamicDataComboValue, DynamicDateCombo } from "../dynamicdate/dynamicdate.combo";
export declare class DateInterval extends Single {
static xtype: string;
@@ -7,13 +7,17 @@ export declare class DateInterval extends Single {
static EVENT_VALID: string;
static EVENT_ERROR: string;
static EVENT_BEFORE_YEAR_MONTH_POPUPVIEW: string;
+ static EVENT_BEFORE_START_POPUPVIEW: string;
+ static EVENT_BEFORE_END_POPUPVIEW: string;
props: {
minDate?: string;
maxDate?: string;
supportDynamic?: boolean;
watermark?: string;
- } & Single['props']
+ container?: string;
+ popup?: any;
+ } & Single["props"];
getValue(): {
start: DynamicDataComboValue;
@@ -23,4 +27,9 @@ export declare class DateInterval extends Single {
setMinDate(minDate: string): void;
setMaxDate(minDate: string): void;
+
+ getPopup(): {
+ start: DynamicDateCombo;
+ end: DynamicDateCombo;
+ };
}
diff --git a/packages/fineui/typescript/widget/timeinterval/timeinterval.ts b/packages/fineui/typescript/widget/timeinterval/timeinterval.ts
index 87d4fd977..e7a72f9af 100644
--- a/packages/fineui/typescript/widget/timeinterval/timeinterval.ts
+++ b/packages/fineui/typescript/widget/timeinterval/timeinterval.ts
@@ -1,11 +1,13 @@
import { Single } from "../../base/single/single";
-import { DynamicDateTimeComboValue } from "../dynamicdatetime/dynamicdatetime.combo";
+import { DynamicDateTimeCombo, DynamicDateTimeComboValue } from "../dynamicdatetime/dynamicdatetime.combo";
export declare class TimeInterval extends Single {
static xtype: string;
static EVENT_CHANGE: string;
static EVENT_VALID: string;
static EVENT_ERROR: string;
+ static EVENT_BEFORE_START_POPUPVIEW: string;
+ static EVENT_BEFORE_END_POPUPVIEW: string;
props: {
minDate?: string;
@@ -13,6 +15,8 @@ export declare class TimeInterval extends Single {
supportDynamic?: boolean;
watermark?: string;
simple?: boolean;
+ container?: string;
+ popup?: any;
} & Single['props'];
getValue(): {
@@ -23,4 +27,9 @@ export declare class TimeInterval extends Single {
setMinDate(minDate: string): void;
setMaxDate(minDate: string): void;
+
+ getPopup(): {
+ start: DynamicDateTimeCombo;
+ end: DynamicDateTimeCombo;
+ };
}
diff --git a/packages/fineui/typescript/widget/year/combo.year.ts b/packages/fineui/typescript/widget/year/combo.year.ts
index 5b9b21acb..78917340b 100644
--- a/packages/fineui/typescript/widget/year/combo.year.ts
+++ b/packages/fineui/typescript/widget/year/combo.year.ts
@@ -1,3 +1,4 @@
+import { PopupView } from "../../base/layer/layer.popup";
import { Widget } from "../../core/widget";
export declare class DynamicYearCombo extends Widget {
@@ -7,11 +8,17 @@ export declare class DynamicYearCombo extends Widget {
static EVENT_CONFIRM: string;
static EVENT_BEFORE_POPUPVIEW: string;
+ props: {
+ popup?: any;
+ };
+
getValue(): DynamicYearComboValue;
setMinDate(minDate: string): void;
setMaxDate(maxDate: string): void;
+
+ getPopup(): PopupView;
}
export interface DynamicYearComboValue {
diff --git a/packages/fineui/typescript/widget/yearmonth/combo.yearmonth.ts b/packages/fineui/typescript/widget/yearmonth/combo.yearmonth.ts
index 10f198e46..36a75cbff 100644
--- a/packages/fineui/typescript/widget/yearmonth/combo.yearmonth.ts
+++ b/packages/fineui/typescript/widget/yearmonth/combo.yearmonth.ts
@@ -1,3 +1,4 @@
+import { PopupView } from "../../base/layer/layer.popup";
import { Single } from "../../base/single/single";
export declare class DynamicYearMonthCombo extends Single {
@@ -8,6 +9,10 @@ export declare class DynamicYearMonthCombo extends Single {
static EVENT_CONFIRM: string;
static EVENT_BEFORE_POPUPVIEW: string;
+ props: {
+ popup?: any;
+ } & Single["props"];
+
hideView(): void;
getKey(): string;
@@ -17,6 +22,8 @@ export declare class DynamicYearMonthCombo extends Single {
setMinDate(minDate: string): void;
setMaxDate(maxDate: string): void;
+
+ getPopup(): PopupView;
}
export interface DynamicYearMonthComboValue {
diff --git a/packages/fineui/typescript/widget/yearmonthinterval/yearmonthinterval.ts b/packages/fineui/typescript/widget/yearmonthinterval/yearmonthinterval.ts
index 9da536c22..a17c5d36e 100644
--- a/packages/fineui/typescript/widget/yearmonthinterval/yearmonthinterval.ts
+++ b/packages/fineui/typescript/widget/yearmonthinterval/yearmonthinterval.ts
@@ -1,5 +1,5 @@
import { Single } from '../../base/single/single';
-import { DynamicYearMonthComboValue } from '../yearmonth/combo.yearmonth';
+import { DynamicYearMonthCombo, DynamicYearMonthComboValue } from '../yearmonth/combo.yearmonth';
export declare class YearMonthInterval extends Single {
static xtype: string;
@@ -7,9 +7,13 @@ export declare class YearMonthInterval extends Single {
static EVENT_ERROR: string;
static EVENT_CHANGE: string;
static EVENT_BEFORE_POPUPVIEW: string;
+ static EVENT_BEFORE_START_POPUPVIEW: string;
+ static EVENT_BEFORE_END_POPUPVIEW: string;
props: {
simple?: boolean;
+ container?: string;
+ popup?: any;
} & Single['props'];
getValue(): {
@@ -20,4 +24,9 @@ export declare class YearMonthInterval extends Single {
setMinDate(minDate: string): void;
setMaxDate(maxDate: string): void;
+
+ getPopup(): {
+ start: DynamicYearMonthCombo;
+ end: DynamicYearMonthCombo;
+ };
}
diff --git a/packages/fineui/typescript/widget/yearquarter/combo.yearquarter.ts b/packages/fineui/typescript/widget/yearquarter/combo.yearquarter.ts
index f1a07770b..de9564b3e 100644
--- a/packages/fineui/typescript/widget/yearquarter/combo.yearquarter.ts
+++ b/packages/fineui/typescript/widget/yearquarter/combo.yearquarter.ts
@@ -1,3 +1,4 @@
+import { PopupView } from "../../base/layer/layer.popup";
import { Widget } from "../../core/widget";
export declare class DynamicYearQuarterCombo extends Widget {
@@ -5,11 +6,17 @@ export declare class DynamicYearQuarterCombo extends Widget {
static EVENT_CONFIRM: string;
static EVENT_BEFORE_POPUPVIEW: string;
+ props: {
+ popup?: any;
+ };
+
getValue(): DynamicYearQuarterComboValue;
setMinDate(minDate: string): void;
setMaxDate(maxDate: string): void;
+
+ getPopup(): PopupView;
}
export interface DynamicYearQuarterComboValue {
diff --git a/scripts/lib/fui.export.txt b/scripts/lib/fui.export.txt
index b04b355ce..b24fd652c 100644
--- a/scripts/lib/fui.export.txt
+++ b/scripts/lib/fui.export.txt
@@ -295,6 +295,7 @@ Pager
Pane
Panel
PartTree
+PasteLimit
Plugin
PlusGroupNode
Popover