From 4ffa2a0cc2d0e1c87990ef3d851b5118a3075a5b Mon Sep 17 00:00:00 2001 From: zsmj Date: Tue, 6 Jun 2023 19:52:18 +0800 Subject: [PATCH 01/14] =?UTF-8?q?BI-127907=20fix:=20=E3=80=906.0.11?= =?UTF-8?q?=E3=80=91=E4=BB=AA=E8=A1=A8=E6=9D=BF=E8=AE=BE=E7=BD=AE=E5=8A=A8?= =?UTF-8?q?=E6=80=81=E5=8F=AF=E9=80=89=E5=8C=BA=E9=97=B4=EF=BC=8C=E8=BF=98?= =?UTF-8?q?=E6=98=AF=E5=8F=AF=E4=BB=A5=E9=80=89=E5=88=B0=E5=B7=A6=E5=8C=BA?= =?UTF-8?q?=E9=97=B4=E5=89=8D=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/fineui/src/core/2.base.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/fineui/src/core/2.base.js b/packages/fineui/src/core/2.base.js index 0c8e5f61c..23fc68095 100644 --- a/packages/fineui/src/core/2.base.js +++ b/packages/fineui/src/core/2.base.js @@ -1227,19 +1227,19 @@ export function checkDateVoid(YY, MM, DD, minDate, maxDate) { } else if (YY > maxDate[0]) { back = ["y", 1]; } else if (YY >= minDate[0] && YY <= maxDate[0]) { - if (YY === minDate[0]) { + if (YY == minDate[0]) { if (MM < minDate[1]) { back = ["m"]; - } else if (MM === minDate[1]) { + } else if (MM == minDate[1]) { if (DD < minDate[2]) { back = ["d"]; } } } - if (YY === maxDate[0]) { + if (YY == maxDate[0]) { if (MM > maxDate[1]) { back = ["m", 1]; - } else if (MM === maxDate[1]) { + } else if (MM == maxDate[1]) { if (DD > maxDate[2]) { back = ["d", 1]; } From 34081cd5bfe7c17c5c5022629b4f187ba5f304b9 Mon Sep 17 00:00:00 2001 From: zsmj Date: Wed, 7 Jun 2023 12:01:08 +0800 Subject: [PATCH 02/14] =?UTF-8?q?REPORT-97634=20fix:=20BI=E7=A7=BB?= =?UTF-8?q?=E5=8A=A8=E7=AB=AF=E7=9A=84=E6=B5=8B=E8=AF=95=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E4=B9=8B=E5=89=8D=E6=B7=BB=E5=8A=A0=E5=A5=BD=E7=9A=84=E9=92=89?= =?UTF-8?q?=E9=92=89=E3=80=81=E5=BE=AE=E4=BF=A1=E5=BA=94=E7=94=A8=E9=83=BD?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=A4=B1=E8=B4=A5=EF=BC=8C=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E7=A9=BA=E6=8C=87=E9=92=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/fineui/src/core/func/alias.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/fineui/src/core/func/alias.js b/packages/fineui/src/core/func/alias.js index c334caf00..c2ddbb28f 100644 --- a/packages/fineui/src/core/func/alias.js +++ b/packages/fineui/src/core/func/alias.js @@ -456,7 +456,7 @@ export const htmlDecode = function(text) { export const cjkEncodeDO = function(o) { if (isPlainObject(o)) { const result = {}; - each(o, (v, k) => { + each(o, (k, v) => { if (!(typeof v === "string")) { v = jsonEncode(v); } From f887e9dfbd94e460587526a188ac87b7f8250a16 Mon Sep 17 00:00:00 2001 From: zsmj Date: Wed, 7 Jun 2023 16:04:45 +0800 Subject: [PATCH 03/14] update --- packages/fineui/typescript/core/base.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/fineui/typescript/core/base.ts b/packages/fineui/typescript/core/base.ts index be506f32c..e347747cf 100644 --- a/packages/fineui/typescript/core/base.ts +++ b/packages/fineui/typescript/core/base.ts @@ -400,6 +400,8 @@ export declare function getDate(...args: (number | string)[]): Date; export declare function getTime(...args: any[]): number; +export declare function clamp(number: number, lower: number, upper: number): number; + /** * 判断一个对象是不是promise * @param obj 对象 From dddd317a70cfad5b2f25ecf5a62514ca34141137 Mon Sep 17 00:00:00 2001 From: zsmj Date: Thu, 8 Jun 2023 11:14:32 +0800 Subject: [PATCH 04/14] update --- packages/fineui/package.json | 2 +- packages/fineui/typescript/base/base.ts | 3 +++ .../typescript/core/controller/controller.masker.ts | 5 +++++ packages/fineui/typescript/core/func/alias.ts | 8 ++++++++ packages/fineui/typescript/core/platform/web/index.ts | 1 + 5 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 packages/fineui/typescript/core/controller/controller.masker.ts diff --git a/packages/fineui/package.json b/packages/fineui/package.json index 9623a14a2..f318922a7 100644 --- a/packages/fineui/package.json +++ b/packages/fineui/package.json @@ -1,6 +1,6 @@ { "name": "@fui/core", - "version": "3.0.20230606133653", + "version": "3.0.20230608105923", "description": "fineui", "main": "dist/fineui.min.js", "module": "dist/lib/index.js", diff --git a/packages/fineui/typescript/base/base.ts b/packages/fineui/typescript/base/base.ts index 98fa0e790..0a89024d6 100644 --- a/packages/fineui/typescript/base/base.ts +++ b/packages/fineui/typescript/base/base.ts @@ -3,9 +3,12 @@ import { BroadcastController } from "../core/controller/controller.broadcast"; import { StyleLoaderManager } from "../core/loader/loader.style"; import { BubblesController } from "../core/controller/controller.bubbles"; import { PopoverController } from "../core/controller/controller.popovers"; +import { MaskersController } from "../core/controller/controller.masker"; export const Layers = new LayerController(); +export const Maskers = new MaskersController(); + export const Bubbles = new BubblesController(); export const Broadcasts = new BroadcastController(); diff --git a/packages/fineui/typescript/core/controller/controller.masker.ts b/packages/fineui/typescript/core/controller/controller.masker.ts new file mode 100644 index 000000000..dfed62baa --- /dev/null +++ b/packages/fineui/typescript/core/controller/controller.masker.ts @@ -0,0 +1,5 @@ +import { LayerController } from "./controller.layer"; + +export declare class MaskersController extends LayerController { + +} diff --git a/packages/fineui/typescript/core/func/alias.ts b/packages/fineui/typescript/core/func/alias.ts index 08035c6ff..ac7232101 100644 --- a/packages/fineui/typescript/core/func/alias.ts +++ b/packages/fineui/typescript/core/func/alias.ts @@ -1,3 +1,11 @@ export declare function jsonDecode(text: string): any; export declare function jsonEncode(json: any): any; + +export declare function contentFormat(cv: any, fmt: string): string; + +export declare function htmlDecode(text: string): string; + +export declare function htmlEncode(text: string): string; + + diff --git a/packages/fineui/typescript/core/platform/web/index.ts b/packages/fineui/typescript/core/platform/web/index.ts index 2aadb120a..f9146475b 100644 --- a/packages/fineui/typescript/core/platform/web/index.ts +++ b/packages/fineui/typescript/core/platform/web/index.ts @@ -3,3 +3,4 @@ export * as EventListener from "./eventListener"; export * as ResizeDetector from "./detectElementResize"; export * from "./load"; export * as DOM from "./dom"; +export declare var $: any; From 9f90f07ab30055afb3e8a40145652c99c001b5cd Mon Sep 17 00:00:00 2001 From: zsmj Date: Thu, 8 Jun 2023 14:27:49 +0800 Subject: [PATCH 05/14] update --- packages/fineui/package.json | 2 +- packages/fineui/typescript/core/func/alias.ts | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/fineui/package.json b/packages/fineui/package.json index f318922a7..5814ce396 100644 --- a/packages/fineui/package.json +++ b/packages/fineui/package.json @@ -1,6 +1,6 @@ { "name": "@fui/core", - "version": "3.0.20230608105923", + "version": "3.0.20230608111542", "description": "fineui", "main": "dist/fineui.min.js", "module": "dist/lib/index.js", diff --git a/packages/fineui/typescript/core/func/alias.ts b/packages/fineui/typescript/core/func/alias.ts index ac7232101..36f865eb9 100644 --- a/packages/fineui/typescript/core/func/alias.ts +++ b/packages/fineui/typescript/core/func/alias.ts @@ -8,4 +8,10 @@ export declare function htmlDecode(text: string): string; export declare function htmlEncode(text: string): string; +export declare function getEncodeURL(urlTemplate: string, param: any): string; + +export declare function encodeURIComponent(url: string): string; + +export declare function decodeURIComponent(url: string): string; + From 12b35fbd0ca953693b9abbbd574a860d68758bf8 Mon Sep 17 00:00:00 2001 From: zsmj Date: Mon, 12 Jun 2023 17:08:17 +0800 Subject: [PATCH 06/14] update --- packages/fineui/src/core/constant/writable.var.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/fineui/src/core/constant/writable.var.js b/packages/fineui/src/core/constant/writable.var.js index 1de6b3a79..3bca927e5 100644 --- a/packages/fineui/src/core/constant/writable.var.js +++ b/packages/fineui/src/core/constant/writable.var.js @@ -130,7 +130,7 @@ const getCacheItem = key => { export let EVENT_BLUR = _global.localStorage ? getCacheItem("event.blur") : true; export const setEventBlur = v => { EVENT_BLUR = v; - Cache.setItem("event.blur", newVal); + Cache.setItem("event.blur", v); }; PropertyDescriptors["EVENT_BLUR"] = { enumerable: true, From 9efe3a1ad72ec2924294028f0b7f74b3093fb6d4 Mon Sep 17 00:00:00 2001 From: zsmj Date: Tue, 13 Jun 2023 15:03:24 +0800 Subject: [PATCH 07/14] =?UTF-8?q?BI-128204=20fix:=20=E3=80=906.0.12?= =?UTF-8?q?=E5=8F=91=E6=95=A3=E3=80=91=E8=87=AA=E9=80=82=E5=BA=94=E5=B8=83?= =?UTF-8?q?=E5=B1=80=E5=8F=8A=E5=86=85=E5=AE=B9=E7=BC=A9=E6=94=BE=E4=B8=8B?= =?UTF-8?q?=EF=BC=8C=E7=BC=A9=E5=B0=8F=E6=B5=8F=E8=A7=88=E5=99=A8=E7=AA=97?= =?UTF-8?q?=E5=8F=A3=EF=BC=8C=E8=BF=87=E6=BB=A4=E6=9F=A5=E7=9C=8B=E5=B7=B2?= =?UTF-8?q?=E9=80=89=E4=B8=8B=E6=96=B9=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fineui/src/base/combination/switcher.js | 5 ++-- .../widget/multiselect/multiselect.combo.js | 20 ++++------------ .../multiselect/multiselect.combo.nobar.js | 20 ++++------------ .../multiselect/multiselect.insert.combo.js | 23 ++++--------------- .../multiselect.insert.combo.nobar.js | 23 ++++--------------- .../multiselect/multiselect.popup.view.js | 4 ++++ .../multiselect.popup.view.nobar.js | 4 ++++ 7 files changed, 29 insertions(+), 70 deletions(-) diff --git a/packages/fineui/src/base/combination/switcher.js b/packages/fineui/src/base/combination/switcher.js index 518690ca0..85e4a8083 100644 --- a/packages/fineui/src/base/combination/switcher.js +++ b/packages/fineui/src/base/combination/switcher.js @@ -11,7 +11,7 @@ import { isNull, Events, Direction, - EVENT_RESPONSE_TIME + EVENT_RESPONSE_TIME, isFunction } from "@/core"; import { ButtonGroup } from "./group.button"; import { Maskers } from "@/base/0.base"; @@ -188,7 +188,8 @@ export class Switcher extends Widget { } _assertPopupView() { - const { popup, adapter, masker, value, direction } = this.options; + const { popup, masker, value, direction } = this.options; + const adapter = isFunction(this.options.adapter) ? this.options.adapter() : this.options.adapter; if (!this._created) { this.popupView = createWidget( popup, diff --git a/packages/fineui/src/widget/multiselect/multiselect.combo.js b/packages/fineui/src/widget/multiselect/multiselect.combo.js index 2c807beac..c4b2445cf 100644 --- a/packages/fineui/src/widget/multiselect/multiselect.combo.js +++ b/packages/fineui/src/widget/multiselect/multiselect.combo.js @@ -99,13 +99,8 @@ export class MultiSelectCombo extends Single { height: toPix(o.height, o.simple ? 1 : 2), text: o.text, defaultText: o.defaultText, - masker: { - offset: { - left: 0, - top: 0, - right: 0, - bottom: SIZE_CONSANTS.LIST_ITEM_HEIGHT + 1, - }, + adapter: () => { + return this.popup.getView(); }, valueFormatter: o.valueFormatter, itemFormatter: o.itemFormatter, @@ -185,8 +180,6 @@ export class MultiSelectCombo extends Single { type: MultiSelectPopupView.xtype, ref() { self.popup = this; - self.trigger.setAdapter(this); - self.numberCounter.setAdapter(this); }, listeners: [ { @@ -269,13 +262,8 @@ export class MultiSelectCombo extends Single { this.numberCounter = createWidget({ type: MultiSelectCheckSelectedSwitcher.xtype, - masker: { - offset: { - left: 0, - top: 0, - right: 0, - bottom: SIZE_CONSANTS.LIST_ITEM_HEIGHT + 1, - }, + adapter: () => { + return this.popup.getView(); }, valueFormatter: o.valueFormatter, itemsCreator: bind(this._itemsCreator4Trigger, this), diff --git a/packages/fineui/src/widget/multiselect/multiselect.combo.nobar.js b/packages/fineui/src/widget/multiselect/multiselect.combo.nobar.js index cc1a1196a..3c9bb5689 100644 --- a/packages/fineui/src/widget/multiselect/multiselect.combo.nobar.js +++ b/packages/fineui/src/widget/multiselect/multiselect.combo.nobar.js @@ -97,13 +97,8 @@ export class MultiSelectNoBarCombo extends Single { height: toPix(o.height, o.simple ? 1 : 2), text: o.text, defaultText: o.defaultText, - masker: { - offset: { - left: 0, - top: 0, - right: 0, - bottom: SIZE_CONSANTS.LIST_ITEM_HEIGHT + 1, - }, + adapter: () => { + return this.popup.getView(); }, valueFormatter: o.valueFormatter, itemsCreator: bind(this._itemsCreator4Trigger, this), @@ -185,8 +180,6 @@ export class MultiSelectNoBarCombo extends Single { type: MultiSelectNoBarPopupView.xtype, ref() { self.popup = this; - self.trigger.setAdapter(this); - self.numberCounter.setAdapter(this); }, listeners: [ { @@ -272,13 +265,8 @@ export class MultiSelectNoBarCombo extends Single { this.numberCounter = createWidget({ type: MultiSelectCheckSelectedSwitcher.xtype, - masker: { - offset: { - left: 0, - top: 0, - right: 0, - bottom: SIZE_CONSANTS.LIST_ITEM_HEIGHT + 1, - }, + adapter: () => { + return this.popup.getView(); }, valueFormatter: o.valueFormatter, itemsCreator: bind(this._itemsCreator4Trigger, this), diff --git a/packages/fineui/src/widget/multiselect/multiselect.insert.combo.js b/packages/fineui/src/widget/multiselect/multiselect.insert.combo.js index 008d1039b..8a9ef9546 100644 --- a/packages/fineui/src/widget/multiselect/multiselect.insert.combo.js +++ b/packages/fineui/src/widget/multiselect/multiselect.insert.combo.js @@ -99,14 +99,8 @@ export class MultiSelectInsertCombo extends Single { text: o.text, watermark: o.watermark, defaultText: o.defaultText, - // adapter: this.popup, - masker: { - offset: { - left: 0, - top: 0, - right: 0, - bottom: SIZE_CONSANTS.LIST_ITEM_HEIGHT + 1, - }, + adapter: () => { + return this.popup.getView(); }, valueFormatter: o.valueFormatter, itemsCreator: bind(this._itemsCreator4Trigger, this), @@ -151,7 +145,7 @@ 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")); + Msg.alert(i18nText("BI-Basic_Prompt"), i18nText("BI-Basic_Too_Much_Value_Get_Two_Thousand")); } self.fireEvent(MultiSelectInsertCombo.EVENT_SEARCHING); }); @@ -192,8 +186,6 @@ export class MultiSelectInsertCombo extends Single { type: MultiSelectPopupView.xtype, ref() { self.popup = this; - self.trigger.setAdapter(this); - self.numberCounter.setAdapter(this); }, listeners: [ { @@ -276,13 +268,8 @@ export class MultiSelectInsertCombo extends Single { this.numberCounter = createWidget({ type: MultiSelectCheckSelectedSwitcher.xtype, - masker: { - offset: { - left: 0, - top: 0, - right: 0, - bottom: SIZE_CONSANTS.LIST_ITEM_HEIGHT + 1, - }, + adapter: () => { + return this.popup.getView(); }, valueFormatter: o.valueFormatter, itemsCreator: bind(this._itemsCreator4Trigger, this), 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 0110bc518..4a20ef6fd 100644 --- a/packages/fineui/src/widget/multiselect/multiselect.insert.combo.nobar.js +++ b/packages/fineui/src/widget/multiselect/multiselect.insert.combo.nobar.js @@ -93,14 +93,8 @@ export class MultiSelectInsertNoBarCombo extends Single { type: MultiSelectInsertTrigger.xtype, height: toPix(o.height, o.simple ? 1 : 2), text: o.text, - // adapter: this.popup, - masker: { - offset: { - left: 0, - top: 0, - right: 0, - bottom: SIZE_CONSANTS.LIST_ITEM_HEIGHT + 1, - }, + adapter: () => { + return this.popup.getView(); }, valueFormatter: o.valueFormatter, itemsCreator: bind(this._itemsCreator4Trigger, this), @@ -140,7 +134,7 @@ 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")); + Msg.alert(i18nText("BI-Basic_Prompt"), i18nText("BI-Basic_Too_Much_Value_Get_Two_Thousand")); } }); @@ -178,8 +172,6 @@ export class MultiSelectInsertNoBarCombo extends Single { type: MultiSelectNoBarPopupView.xtype, ref() { self.popup = this; - self.trigger.setAdapter(this); - self.numberCounter.setAdapter(this); }, listeners: [ { @@ -263,13 +255,8 @@ export class MultiSelectInsertNoBarCombo extends Single { this.numberCounter = createWidget({ type: MultiSelectCheckSelectedSwitcher.xtype, - masker: { - offset: { - left: 0, - top: 0, - right: 0, - bottom: SIZE_CONSANTS.LIST_ITEM_HEIGHT + 1, - }, + adapter: () => { + return this.popup.getView(); }, valueFormatter: o.valueFormatter, itemsCreator: bind(this._itemsCreator4Trigger, this), diff --git a/packages/fineui/src/widget/multiselect/multiselect.popup.view.js b/packages/fineui/src/widget/multiselect/multiselect.popup.view.js index 2a833446e..84e3faf58 100644 --- a/packages/fineui/src/widget/multiselect/multiselect.popup.view.js +++ b/packages/fineui/src/widget/multiselect/multiselect.popup.view.js @@ -98,4 +98,8 @@ export class MultiSelectPopupView extends Widget { setDirection(direction, position) { this.popupView.setDirection(direction, position); } + + getView() { + return this.popupView.getView(); + } } diff --git a/packages/fineui/src/widget/multiselect/multiselect.popup.view.nobar.js b/packages/fineui/src/widget/multiselect/multiselect.popup.view.nobar.js index 1ba871201..728ccf50c 100644 --- a/packages/fineui/src/widget/multiselect/multiselect.popup.view.nobar.js +++ b/packages/fineui/src/widget/multiselect/multiselect.popup.view.nobar.js @@ -93,4 +93,8 @@ export class MultiSelectNoBarPopupView extends Widget { setDirection(direction, position) { this.popupView.setDirection(direction, position); } + + getView() { + return this.popupView.getView(); + } } From fd3d8bd77d38b86f8746fc3fa2218d7891bf677f Mon Sep 17 00:00:00 2001 From: zsmj Date: Tue, 13 Jun 2023 15:10:01 +0800 Subject: [PATCH 08/14] =?UTF-8?q?BI-128204=20fix:=20=E3=80=906.0.12?= =?UTF-8?q?=E5=8F=91=E6=95=A3=E3=80=91=E8=87=AA=E9=80=82=E5=BA=94=E5=B8=83?= =?UTF-8?q?=E5=B1=80=E5=8F=8A=E5=86=85=E5=AE=B9=E7=BC=A9=E6=94=BE=E4=B8=8B?= =?UTF-8?q?=EF=BC=8C=E7=BC=A9=E5=B0=8F=E6=B5=8F=E8=A7=88=E5=99=A8=E7=AA=97?= =?UTF-8?q?=E5=8F=A3=EF=BC=8C=E8=BF=87=E6=BB=A4=E6=9F=A5=E7=9C=8B=E5=B7=B2?= =?UTF-8?q?=E9=80=89=E4=B8=8B=E6=96=B9=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/fineui/src/base/combination/searcher.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/fineui/src/base/combination/searcher.js b/packages/fineui/src/base/combination/searcher.js index 9cf9f17c0..5f1fa86c6 100644 --- a/packages/fineui/src/base/combination/searcher.js +++ b/packages/fineui/src/base/combination/searcher.js @@ -17,7 +17,8 @@ import { BlankSplitChar, Events, EVENT_RESPONSE_TIME, - Func + Func, + isFunction, } from "@/core"; import { ButtonGroup } from "./group.button"; import { Maskers } from "@/base/0.base"; @@ -127,7 +128,8 @@ export class Searcher extends Widget { } _assertPopupView() { - const { masker, popup, chooseType, isAutoSync, adapter } = this.options; + const { masker, popup, chooseType, isAutoSync } = this.options; + const adapter = isFunction(this.options.adapter) ? this.options.adapter() : this.options.adapter; if ((masker && !Maskers.has(this.getName())) || (masker === false && !this.popupView)) { this.popupView = createWidget(popup, { type: SearcherView.xtype, From 36c68ed5981f553e1cc2ba9be4b3341f549052bd Mon Sep 17 00:00:00 2001 From: zsmj Date: Tue, 13 Jun 2023 15:12:37 +0800 Subject: [PATCH 09/14] =?UTF-8?q?BI-128204=20fix:=20=E3=80=906.0.12?= =?UTF-8?q?=E5=8F=91=E6=95=A3=E3=80=91=E8=87=AA=E9=80=82=E5=BA=94=E5=B8=83?= =?UTF-8?q?=E5=B1=80=E5=8F=8A=E5=86=85=E5=AE=B9=E7=BC=A9=E6=94=BE=E4=B8=8B?= =?UTF-8?q?=EF=BC=8C=E7=BC=A9=E5=B0=8F=E6=B5=8F=E8=A7=88=E5=99=A8=E7=AA=97?= =?UTF-8?q?=E5=8F=A3=EF=BC=8C=E8=BF=87=E6=BB=A4=E6=9F=A5=E7=9C=8B=E5=B7=B2?= =?UTF-8?q?=E9=80=89=E4=B8=8B=E6=96=B9=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/fineui/src/base/combination/searcher.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/fineui/src/base/combination/searcher.js b/packages/fineui/src/base/combination/searcher.js index 5f1fa86c6..bd161c7ef 100644 --- a/packages/fineui/src/base/combination/searcher.js +++ b/packages/fineui/src/base/combination/searcher.js @@ -215,7 +215,8 @@ export class Searcher extends Widget { } _search() { - const { isAutoSearch, adapter, isAutoSync, onSearch } = this.options; + const { isAutoSearch, isAutoSync, onSearch } = this.options; + const adapter = isFunction(this.options.adapter) ? this.options.adapter() : this.options.adapter; const keyword = this.editor.getValue(); if (keyword === "" || this._stop) { return; @@ -335,7 +336,8 @@ export class Searcher extends Widget { } getValue() { - const { isAutoSync, adapter, popup } = this.options; + const { isAutoSync, popup } = this.options; + const adapter = isFunction(this.options.adapter) ? this.options.adapter() : this.options.adapter; if (isAutoSync && adapter && adapter.getValue) { return adapter.getValue(); } @@ -352,7 +354,8 @@ export class Searcher extends Widget { } populate(result, searchResult, keyword) { - const { isAutoSync, adapter } = this.options; + const { isAutoSync } = this.options; + const adapter = isFunction(this.options.adapter) ? this.options.adapter() : this.options.adapter; this._assertPopupView(); this.popupView.populate(...arguments); if (isAutoSync && adapter && adapter.getValue) { From 717249cb7cce6010c34df7c095a925039d0bc95b Mon Sep 17 00:00:00 2001 From: dailer Date: Thu, 15 Jun 2023 14:08:40 +0800 Subject: [PATCH 10/14] update --- packages/fineui/package.json | 2 +- packages/fineui/src/widget/multitree/multi.tree.combo.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/fineui/package.json b/packages/fineui/package.json index 5814ce396..d075c41e1 100644 --- a/packages/fineui/package.json +++ b/packages/fineui/package.json @@ -1,6 +1,6 @@ { "name": "@fui/core", - "version": "3.0.20230608111542", + "version": "3.0.20230615140705", "description": "fineui", "main": "dist/fineui.min.js", "module": "dist/lib/index.js", diff --git a/packages/fineui/src/widget/multitree/multi.tree.combo.js b/packages/fineui/src/widget/multitree/multi.tree.combo.js index 198aa591f..7d61b6e9d 100644 --- a/packages/fineui/src/widget/multitree/multi.tree.combo.js +++ b/packages/fineui/src/widget/multitree/multi.tree.combo.js @@ -101,7 +101,7 @@ export class MultiTreeCombo extends Single { el: this.trigger, adjustLength: 1, popup: { - type: "bi.multi_tree_popup_view", + type: MultiTreePopup.xtype, ref() { self.popup = this; self.trigger.setAdapter(this); From 50ebdd650f0c446b2be4ee963b573d752f568127 Mon Sep 17 00:00:00 2001 From: jian Date: Thu, 15 Jun 2023 15:14:31 +0800 Subject: [PATCH 11/14] =?UTF-8?q?=E6=97=A0jira=E4=BB=BB=E5=8A=A1=20?= =?UTF-8?q?=E8=A1=A5=E5=85=85=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/fineui/typescript/core/base.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/fineui/typescript/core/base.ts b/packages/fineui/typescript/core/base.ts index e347747cf..1ff0d2868 100644 --- a/packages/fineui/typescript/core/base.ts +++ b/packages/fineui/typescript/core/base.ts @@ -1,3 +1,4 @@ +import { LodashDebounce } from 'lodash/fp'; import { Widget } from "./widget"; type UnionToIntersection = ( @@ -320,7 +321,14 @@ export declare function once(func: Function): Function; export declare function partial(func: Function, ...partials: any): Function; -export declare function debounce(func: T, wait?: number, options?: any): T; +// from @types/lodash +interface DebouncedFunc any> { + (...args: Parameters): ReturnType | undefined; + cancel(): void; + flush(): ReturnType | undefined; +} + +export declare function debounce any>(func: T, wait?: number, options?: any): DebouncedFunc; export declare function throttle(func: T, wait?: number, options?: any): T; From 300118024ba956236102be8614a362dbad4379d8 Mon Sep 17 00:00:00 2001 From: jian Date: Thu, 15 Jun 2023 15:14:56 +0800 Subject: [PATCH 12/14] =?UTF-8?q?=E6=97=A0jira=E4=BB=BB=E5=8A=A1=20?= =?UTF-8?q?=E8=A1=A5=E5=85=85=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/fineui/typescript/core/base.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/fineui/typescript/core/base.ts b/packages/fineui/typescript/core/base.ts index 1ff0d2868..4453188b3 100644 --- a/packages/fineui/typescript/core/base.ts +++ b/packages/fineui/typescript/core/base.ts @@ -1,4 +1,3 @@ -import { LodashDebounce } from 'lodash/fp'; import { Widget } from "./widget"; type UnionToIntersection = ( From b0c7b59eee7ed2a5581de58ba906f65f7651fa01 Mon Sep 17 00:00:00 2001 From: jian Date: Thu, 15 Jun 2023 15:39:27 +0800 Subject: [PATCH 13/14] =?UTF-8?q?=E8=A1=A5=E5=85=85routerView=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 3 ++- packages/fineui/typescript/router/router.ts | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 1878b8ae7..3235a2151 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,8 @@ "dev:demo": "pnpm --dir packages/demo dev", "dev:fineui": "pnpm --dir packages/fineui dev", "build": "pnpm --dir packages/fineui build", - "build:demo": "pnpm --dir packages/demo build" + "build:demo": "pnpm --dir packages/demo build", + "tsc": "pnpm --dir packages/fineui tsc" }, "devDependencies": { "@babel/cli": "^7.21.0", diff --git a/packages/fineui/typescript/router/router.ts b/packages/fineui/typescript/router/router.ts index 5db2af9ee..1ac76c266 100644 --- a/packages/fineui/typescript/router/router.ts +++ b/packages/fineui/typescript/router/router.ts @@ -1,3 +1,5 @@ +import { Widget } from '../core/widget'; + type Component = any type Dictionary = { [key: string]: T } type ErrorHandler = (err: Error) => void @@ -244,6 +246,6 @@ export declare class RouterWidget { static xtype: string; } -export declare class RouterView { +export declare class RouterView extends Widget { static xtype: string; } From d355e5113ac9c9437c3320c18d37188f02ae2da3 Mon Sep 17 00:00:00 2001 From: jian Date: Thu, 15 Jun 2023 15:59:13 +0800 Subject: [PATCH 14/14] =?UTF-8?q?=E6=97=A0jira=E4=BB=BB=E5=8A=A1=20?= =?UTF-8?q?=E8=A1=A5=E5=85=85=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/fineui/typescript/core/base.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/packages/fineui/typescript/core/base.ts b/packages/fineui/typescript/core/base.ts index 4453188b3..e347747cf 100644 --- a/packages/fineui/typescript/core/base.ts +++ b/packages/fineui/typescript/core/base.ts @@ -320,14 +320,7 @@ export declare function once(func: Function): Function; export declare function partial(func: Function, ...partials: any): Function; -// from @types/lodash -interface DebouncedFunc any> { - (...args: Parameters): ReturnType | undefined; - cancel(): void; - flush(): ReturnType | undefined; -} - -export declare function debounce any>(func: T, wait?: number, options?: any): DebouncedFunc; +export declare function debounce(func: T, wait?: number, options?: any): T; export declare function throttle(func: T, wait?: number, options?: any): T;