From f7210a878375967466bdf8a4ab8e942f54750108 Mon Sep 17 00:00:00 2001 From: zsmj Date: Wed, 10 May 2023 20:30:38 +0800 Subject: [PATCH 1/2] =?UTF-8?q?KERNEL-15181=20feat:=20typescript=20?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E6=8F=8F=E8=BF=B0=E6=96=87=E4=BB=B6=E9=80=82?= =?UTF-8?q?=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/fineui/package.json | 4 +- packages/fineui/src/core/4.widget.js | 180 ++-- packages/fineui/src/fix/fix.compact.js | 2 +- packages/fineui/tsconfig.json | 3 +- packages/fineui/types/globals.d.ts | 6 +- packages/fineui/typescript/base/base.ts | 6 +- .../typescript/base/foundation/message.ts | 17 +- .../base/single/button/buttons/button.text.ts | 2 +- .../base/single/button/buttons/button.ts | 8 +- packages/fineui/typescript/core/base.ts | 423 +++++---- packages/fineui/typescript/core/func/array.ts | 11 +- packages/fineui/typescript/core/func/date.ts | 154 ++-- .../fineui/typescript/core/func/function.ts | 79 +- packages/fineui/typescript/core/func/index.ts | 15 +- .../fineui/typescript/core/func/number.ts | 59 +- .../fineui/typescript/core/func/string.ts | 104 ++- packages/fineui/typescript/core/i18n.ts | 9 +- packages/fineui/typescript/core/inject.ts | 63 +- .../typescript/core/loader/loader.style.ts | 12 + .../core/platform/web/detectElementResize.ts | 9 +- .../typescript/core/platform/web/dom.ts | 183 ++-- .../core/platform/web/eventListener.ts | 10 +- .../typescript/core/platform/web/function.ts | 34 +- .../typescript/core/platform/web/index.ts | 16 +- .../typescript/core/platform/web/load.ts | 4 +- packages/fineui/typescript/core/plugin.ts | 12 +- packages/fineui/typescript/core/utils/aes.ts | 7 +- .../fineui/typescript/core/utils/aspect.ts | 15 +- .../fineui/typescript/core/utils/base64.ts | 7 +- .../fineui/typescript/core/utils/cache.ts | 37 +- .../fineui/typescript/core/utils/chinesePY.ts | 4 +- .../fineui/typescript/core/utils/index.ts | 50 +- packages/fineui/typescript/core/var.ts | 264 +++--- packages/fineui/typescript/core/widget.ts | 2 +- .../worker/controller/worker.controller.ts | 16 +- packages/fineui/typescript/fix/fix.ts | 18 + packages/fineui/typescript/index.old.ts | 597 +++++++++++++ packages/fineui/typescript/index.ts | 802 +++++------------- packages/fineui/webpack/attachments.js | 40 +- 39 files changed, 1781 insertions(+), 1503 deletions(-) create mode 100644 packages/fineui/typescript/core/loader/loader.style.ts create mode 100644 packages/fineui/typescript/fix/fix.ts create mode 100644 packages/fineui/typescript/index.old.ts diff --git a/packages/fineui/package.json b/packages/fineui/package.json index 6b1ef8068..325ce2849 100644 --- a/packages/fineui/package.json +++ b/packages/fineui/package.json @@ -23,7 +23,9 @@ "dev:fineui": "webpack-dev-server --progress --config=webpack/webpack.dev.js", "build": "tsc && run-p build:*", "build:es": "babel src -d dist/es --config-file ./esm.babel.js", - "build:fineui": "webpack --progress --config=webpack/webpack.prod.js" + "build:fineui": "webpack --progress --config=webpack/webpack.prod.js", + "link": "pnpm link --global", + "tsc": "tsc" }, "files": [ "dist", diff --git a/packages/fineui/src/core/4.widget.js b/packages/fineui/src/core/4.widget.js index 0f22ebc19..49dfef990 100644 --- a/packages/fineui/src/core/4.widget.js +++ b/packages/fineui/src/core/4.widget.js @@ -62,7 +62,59 @@ function callLifeHook(self, life) { }); } +let context = null, + current = null; +const contextStack = [], + currentStack = []; + + export class Widget extends OB { + + static _renderEngine = { + createElement(widget) { + if (isWidget(widget)) { + const o = widget.options; + if (o.element) { + return $(o.element); + } + if (o.tagName) { + return $(document.createElement(o.tagName)); + } + + return $(document.createDocumentFragment()); + } + + return $(widget); + }, + createFragment() { + return document.createDocumentFragment(); + } + }; + + static registerRenderEngine(engine) { + Widget._renderEngine = engine; + } + + static pushContext(_context) { + if (context) contextStack.push(context); + Widget.context = context = _context; + } + + static popContext() { + Widget.context = context = contextStack.pop(); + } + + static execWithContext(context, execFunc) { + Widget.pushContext(context); + try { + execFunc(); + } catch (e) { + throw e; + } finally { + Widget.popContext(); + } + } + _defaultConfig() { return extend(super._defaultConfig(), { root: false, @@ -86,7 +138,8 @@ export class Widget extends OB { }); } - _constructor() {} + _constructor() { + } // 覆盖父类的_constructor方法,widget不走ob的生命周期 _constructed() { @@ -157,9 +210,9 @@ export class Widget extends OB { // 加个保险 if (initCallbackCalled === true) { _global.console && - console.error( - "widget: please check the beforeInit method. The callback can only be executed once" - ); + console.error( + "widget: please check the beforeInit method. The callback can only be executed once" + ); return; } @@ -169,9 +222,9 @@ export class Widget extends OB { // 加个保险 if (renderCallbackCalled === true) { _global.console && - console.error( - "widget: please check the beforeRender method. The callback can only be executed once" - ); + console.error( + "widget: please check the beforeRender method. The callback can only be executed once" + ); return; } @@ -293,7 +346,7 @@ export class Widget extends OB { ((v) => { handler.call(this, this, v); })) || - emptyFn, + emptyFn, extend({ deep: true }, options) ); this._watchers.push(() => { @@ -319,7 +372,7 @@ export class Widget extends OB { this.element = this.options.element.element; this._parent = o.element; this._parent._children && - this._parent.addWidget(this.widgetName, this); + this._parent.addWidget(this.widgetName, this); } else if (o.element) { this.element = Widget._renderEngine.createElement(this); this._isRoot = true; @@ -352,8 +405,8 @@ export class Widget extends OB { if (o.invisible) { const invisible = (o.invisible = isFunction(o.invisible) ? this.__watch(o.invisible, (context, newValue) => { - this.setVisible(!newValue); - }) + this.setVisible(!newValue); + }) : o.invisible); if (invisible) { // 用display属性做显示和隐藏,否则jquery会在显示时将display设为block会覆盖掉display:flex属性 @@ -368,8 +421,8 @@ export class Widget extends OB { if (this.options.disabled) { const disabled = (o.disabled = isFunction(o.disabled) ? this.__watch(o.disabled, (context, newValue) => { - this.setEnable(!newValue); - }) + this.setEnable(!newValue); + }) : o.disabled); if (disabled) { this.setEnable(false); @@ -378,8 +431,8 @@ export class Widget extends OB { if (this.options.invalid) { const invalid = (o.invalid = isFunction(o.invalid) ? this.__watch(o.invalid, (context, newValue) => { - this.setValid(!newValue); - }) + this.setValid(!newValue); + }) : o.invalid); if (invalid) { this.setValid(false); @@ -418,8 +471,8 @@ export class Widget extends OB { const render = isFunction(this.options.render) ? this.options.render : workerMode - ? this.$render || this.render - : this.render; + ? this.$render || this.render + : this.render; let els = render && render.call(this); els = this.options.configRender ? this.options.configRender.call(this, els) @@ -469,20 +522,20 @@ export class Widget extends OB { } layer = layer || 0; lifeHook !== false && - !this.__async && - callLifeHook(this, "beforeMount"); + !this.__async && + callLifeHook(this, "beforeMount"); this._isMounted = true; this.__isMounting = false; for (const key in this._children) { const child = this._children[key]; child._mount && - child._mount( - deep ? force : false, - deep, - lifeHook, - predicate, - layer + 1 - ); + child._mount( + deep ? force : false, + deep, + lifeHook, + predicate, + layer + 1 + ); } if (this._parent) { if (!this._parent.isEnabled()) { @@ -558,8 +611,8 @@ export class Widget extends OB { // 递归将所有子组件使能 each(this._children, (i, child) => { !child._manualSetEnable && - child._setEnable && - child._setEnable(enable); + child._setEnable && + child._setEnable(enable); }); } @@ -701,7 +754,7 @@ export class Widget extends OB { throw new Error("widget: widget name already exists, cannot be added"); } widget._setParent && widget._setParent(this); - widget.on(Events.DESTROY, function () { + widget.on(Events.DESTROY, function() { // TODO: self待删 remove(self._children, this); }); @@ -772,13 +825,17 @@ export class Widget extends OB { return this.element.css(name, value); } - getText() {} + getText() { + } - setText(text) {} + setText(text) { + } - getValue() {} + getValue() { + } - setValue(value) {} + setValue(value) { + } isEnabled() { return this.options.disabled === true ? false : !this.options._disabled; @@ -928,31 +985,6 @@ export class Widget extends OB { } } -let context = null, - current = null; -const contextStack = [], - currentStack = []; - -Widget.pushContext = function (_context) { - if (context) contextStack.push(context); - Widget.context = context = _context; -}; - -Widget.popContext = function () { - Widget.context = context = contextStack.pop(); -}; - -Widget.execWithContext = function (context, execFunc) { - Widget.pushContext(context); - try { - execFunc(); - } catch (e) { - throw e; - } finally { - Widget.popContext(); - } -}; - function pushTarget(_current) { if (current) currentStack.push(current); Widget.current = current = _current; @@ -982,7 +1014,7 @@ export function useStore(_store) { return Reflect.set(origin, key, value); } }); - current._store = function () { + current._store = function() { origin = (_store || currentStore).apply(this, arguments); delegate.$delegate = origin; @@ -992,7 +1024,7 @@ export function useStore(_store) { return current.$storeDelegate; } - current._store = function () { + current._store = function() { const st = (_store || currentStore).apply(this, arguments); extend(delegate, st); @@ -1070,7 +1102,7 @@ export function watch(vm, watch, handler) { handler = watch; watch = vm; Widget.current.$watchDelayCallbacks || - (Widget.current.$watchDelayCallbacks = []); + (Widget.current.$watchDelayCallbacks = []); Widget.current.$watchDelayCallbacks.push([watch, handler]); } } @@ -1129,35 +1161,11 @@ export function onUnmounted(destroyed) { } } -Widget.registerRenderEngine = function (engine) { - Widget._renderEngine = engine; -}; -Widget.registerRenderEngine({ - createElement(widget) { - if (isWidget(widget)) { - const o = widget.options; - if (o.element) { - return $(o.element); - } - if (o.tagName) { - return $(document.createElement(o.tagName)); - } - - return $(document.createDocumentFragment()); - } - - return $(widget); - }, - createFragment() { - return document.createDocumentFragment(); - } -}); - export function mount(widget, container, predicate, hydrate) { if (hydrate === true) { // 将widget的element元素都挂载好,并建立相互关系 widget.element.data("__widgets", [widget]); - const res = widget._mount(true, false, false, function (w) { + const res = widget._mount(true, false, false, function(w) { each(w._children, (i, child) => { let ws = child.element.data("__widgets"); if (!ws) { diff --git a/packages/fineui/src/fix/fix.compact.js b/packages/fineui/src/fix/fix.compact.js index 4cae6dd0d..66aae8fc0 100644 --- a/packages/fineui/src/fix/fix.compact.js +++ b/packages/fineui/src/fix/fix.compact.js @@ -127,7 +127,7 @@ Widget.findStore = function findStore(widget) { } }; -function createStore() { +export function createStore() { let needPop = false; const workerMode = Providers.getProvider("bi.provider.system").getWorkerMode(); diff --git a/packages/fineui/tsconfig.json b/packages/fineui/tsconfig.json index 5a888d48a..26425a5c4 100644 --- a/packages/fineui/tsconfig.json +++ b/packages/fineui/tsconfig.json @@ -25,5 +25,6 @@ "@": ["src"] } }, - "include": ["typescript/*.ts", "typescript/**/*.ts", "types/*.d.ts", "src/*.js", "src/**/*.js"] + "include": ["typescript/*.ts", "typescript/**/*.ts", "types/*.d.ts", "src/*.js", "src/**/*.js"], + "exclude": ["typescript/index.old.ts"] } diff --git a/packages/fineui/types/globals.d.ts b/packages/fineui/types/globals.d.ts index 0b5805aa0..00b1613f0 100644 --- a/packages/fineui/types/globals.d.ts +++ b/packages/fineui/types/globals.d.ts @@ -2,11 +2,11 @@ interface Obj { [key: string]: any; } -declare let BI: Obj & import("../typescript/index").BI; +// declare let BI: Obj & import("../typescript/index").BI; -// declare let BI: Obj; +declare let BI: Obj; -declare const Fix: Obj; +// declare const Fix: Obj; declare interface String { replaceAll(regx: string, callback: (str: string) => void): string; diff --git a/packages/fineui/typescript/base/base.ts b/packages/fineui/typescript/base/base.ts index b6dfd4240..f5aacbfd5 100644 --- a/packages/fineui/typescript/base/base.ts +++ b/packages/fineui/typescript/base/base.ts @@ -1,7 +1,9 @@ import { LayerController } from "../core/controller/controller.layer"; import { BroadcastController } from "../core/controller/controller.broadcast"; +import { StyleLoaderManager } from "../core/loader/loader.style"; -export type Layers = LayerController; +export const Layers = new LayerController(); -export type Broadcasts = BroadcastController; +export const Broadcasts = new BroadcastController(); +export const StyleLoaders = new StyleLoaderManager(); diff --git a/packages/fineui/typescript/base/foundation/message.ts b/packages/fineui/typescript/base/foundation/message.ts index ad0e7bac0..2094d7fea 100644 --- a/packages/fineui/typescript/base/foundation/message.ts +++ b/packages/fineui/typescript/base/foundation/message.ts @@ -5,9 +5,16 @@ type toastOptions = { closable?: boolean } -export type _msg = { - alert: (title: string, message?: string | { [key: string]: any }, callback?: (result?: boolean) => void) => void - confirm: (title: string, message?: string | { [key: string]: any }, callback?: (result: boolean) => void) => void - prompt: (title: string, message?: string, value?: any, callback?: (result: string) => void, minWidth?: number) => void - toast: (message: string | Obj, options?: toastOptions | string, context?: HTMLElement) => Function +export declare namespace Msg { + function alert(title: string, message?: string | { + [key: string]: any + }, callback?: (result?: boolean) => void): void + + function confirm(title: string, message?: string | { + [key: string]: any + }, callback?: (result: boolean) => void): void + + function prompt(title: string, message?: string, value?: any, callback?: (result: string) => void, minWidth?: number): void + + function toast(message: string | Obj, options?: toastOptions | string, context?: HTMLElement): Function } diff --git a/packages/fineui/typescript/base/single/button/buttons/button.text.ts b/packages/fineui/typescript/base/single/button/buttons/button.text.ts index e9c4c2ce3..30ae7380e 100644 --- a/packages/fineui/typescript/base/single/button/buttons/button.text.ts +++ b/packages/fineui/typescript/base/single/button/buttons/button.text.ts @@ -1,4 +1,4 @@ -import { Label } from "../../../.."; +import { Label } from "../../label/label"; import { BasicButton } from "../button.basic"; export declare class TextButton extends BasicButton { diff --git a/packages/fineui/typescript/base/single/button/buttons/button.ts b/packages/fineui/typescript/base/single/button/buttons/button.ts index 102db20cb..f77d0e1ea 100644 --- a/packages/fineui/typescript/base/single/button/buttons/button.ts +++ b/packages/fineui/typescript/base/single/button/buttons/button.ts @@ -1,4 +1,6 @@ -import { AbstractLabel, IconLabel, Label } from "../../../.."; +import { Label } from "../../label/label"; +import { AbstractLabel } from "../../label/abstract.label"; +import { IconLabel } from "../../label/icon.label"; import { BasicButton } from "../button.basic"; export declare class Button extends BasicButton { @@ -10,7 +12,7 @@ export declare class Button extends BasicButton { minWidth?: number; readonly?: boolean; iconCls?: string; - level?: 'common' | 'success' | 'warning' | 'error' | 'ignore', + level?: "common" | "success" | "warning" | "error" | "ignore", block?: boolean; // 是否块状显示,即不显示边框,没有最小宽度的限制 loading?: boolean, // 是否处于加载中 light?: boolean, // 是否使用浅色 @@ -20,7 +22,7 @@ export declare class Button extends BasicButton { iconGap?: number; iconPosition?: string; textWidth?: number; - } & AbstractLabel['props'] & IconLabel['props'] & BasicButton['props']; + } & AbstractLabel["props"] & IconLabel["props"] & BasicButton["props"]; text: Label; icon?: IconLabel; diff --git a/packages/fineui/typescript/core/base.ts b/packages/fineui/typescript/core/base.ts index 5cc0a010c..225b79d5c 100644 --- a/packages/fineui/typescript/core/base.ts +++ b/packages/fineui/typescript/core/base.ts @@ -1,410 +1,405 @@ import { Widget } from "./widget"; -export interface _base { - assert: (v: any, is: Function) => Boolean; +type UnionToIntersection = ( + Union extends unknown + ? (x: Union) => void + : never + ) extends ((x: infer Intersection) => void) + ? Intersection + : never; - warn: (message: any) => Boolean; - UUID: () => string; +export declare function assert(v: any, is: Function): Boolean; - isWidget: (widget: any) => widget is Widget; +export declare function warn(message: any): Boolean; - createWidgets: (items: any, options: any, context: any) => any; +export declare function UUID(): string; - createItems: (data: T[], innerAttr?: U, outerAttr?: K) => (U & T & K)[]; +export declare function isWidget(widget: any): widget is Widget; - packageItems: (items: any[], layouts: any[]) => any[]; +export declare function createWidgets(items: any, options: any, context: any): any; - formatEL: (obj: T) => { el: T } | T; +export declare function createItems(data: T[], innerAttr?: U, outerAttr?: K): (U & T & K)[]; - stripEL: (obj: { el: T } | T) => T; +export declare function packageItems(items: any[], layouts: any[]): any[]; - trans2Element: (widgets: any[]) => any[]; +export declare function formatEL(obj: T): { el: T } | T; - // 集合相关方法 - where: (collection: any[] | object | string, source: object) => any[]; +export declare function stripEL(obj: { el: T } | T): T; - findWhere: (collection: any[] | object | string, callback?: Function | object | string, thisArg?: any) => object | undefined; +export declare function trans2Element(widgets: any[]): any[]; - invoke: (collection: any[] | object | string, methodName: Function | string, arg?: any) => any[]; +// 集合相关方法 +export declare function where(collection: any[] | object | string, source: object): any[]; - pluck: (collection: any[] | object | string, property: string) => any[]; +export declare function findWhere(collection: any[] | object | string, callback?: Function | object | string, thisArg?: any): object | undefined; - shuffle: (collection: any[] | object | string) => any[]; +export declare function invoke(collection: any[] | object | string, methodName: Function | string, arg?: any): any[]; - sample: (collection: any[] | object | string, n?: number) => any[]; +export declare function pluck(collection: any[] | object | string, property: string): any[]; - toArray: (collection: any[] | object | string) => any[]; +export declare function shuffle(collection: any[] | object | string): any[]; - size: (collection: any) => number; +export declare function sample(collection: any[] | object | string, n?: number): any[]; - each(collection: ArrayLike, iteratee?: (index: number, value: T) => void, thisArg?: any): ArrayLike; - each(collection: T, iteratee?: (index: K, value: T[K]) => void, thisArg?: any): T; - each(collection: T, iteratee?: any, thisArg?: any): T; +export declare function toArray(collection: any[] | object | string): any[]; - map: (collection: T[] | object | string | null | undefined, callback?: ((index: number, value: T) => U) | object | string, thisArg?: any) => U[]; +export declare function size(collection: any): number; - reduce: (collection: T[] | object | string, callback?: ((total: U extends T ? U : T, currentValue: T, currentIndex: number) => U extends T ? U : T) | object | string, initialValue?: U | T) => U extends T ? U : T; +export declare function each(collection: ArrayLike, iteratee?: (index: number, value: T) => void, thisArg?: any): ArrayLike; +export declare function each(collection: T, iteratee?: (index: K, value: T[K]) => void, thisArg?: any): T; +export declare function each(collection: T, iteratee?: any, thisArg?: any): T; - reduceRight: (collection: T[] | object | string, callback?: ((total: U extends T ? U : T, currentValue: T, currentIndex: number) => U extends T ? U : T) | object | string, initialValue?: U | T) => U extends T ? U : T; +export declare function map(collection: T[] | object | string | null | undefined, callback?: ((index: number, value: T) => U) | object | string, thisArg?: any): U[]; - find: (collection: T[] | object | string, callback?: ((index: number, value: T) => boolean) | object | string, thisArg?: any) => T | undefined; +export declare function reduce(collection: T[] | object | string, callback?: ((total: U extends T ? U : T, currentValue: T, currentIndex: number) => U extends T ? U : T) | object | string, initialValue?: U | T): U extends T ? U : T; - filter: (collection: T[] | object | string, callback?: ((index: number, value: T) => boolean) | object | string, thisArg?: any) => T[]; +export declare function reduceRight(collection: T[] | object | string, callback?: ((total: U extends T ? U : T, currentValue: T, currentIndex: number) => U extends T ? U : T) | object | string, initialValue?: U | T): U extends T ? U : T; - reject: (collection: T[] | object | string, callback?: ((index: number, value: T) => boolean) | object | string, thisArg?: any) => T[]; +export declare function find(collection: T[] | object | string, callback?: ((index: number, value: T) => boolean) | object | string, thisArg?: any): T | undefined; - every: (collection: T[] | object | string, callback?: ((index: number, value: T) => boolean) | object | string, thisArg?: any) => boolean; +export declare function filter(collection: T[] | object | string, callback?: ((index: number, value: T) => boolean) | object | string, thisArg?: any): T[]; - all: (collection: T[] | object | string, callback?: ((index: number, value: T) => boolean) | object | string, thisArg?: any) => boolean; +export declare function reject(collection: T[] | object | string, callback?: ((index: number, value: T) => boolean) | object | string, thisArg?: any): T[]; - some: (collection: T[] | object | string, callback?: ((index: number, value: T) => boolean) | object | string, thisArg?: any) => boolean; +export declare function every(collection: T[] | object | string, callback?: ((index: number, value: T) => boolean) | object | string, thisArg?: any): boolean; - any: (collection: T[] | object | string, callback?: ((index: number, value: T) => boolean) | object | string, thisArg?: any) => boolean; +export declare function all(collection: T[] | object | string, callback?: ((index: number, value: T) => boolean) | object | string, thisArg?: any): boolean; - max: (collection: T[]) => T; +export declare function some(collection: T[] | object | string, callback?: ((index: number, value: T) => boolean) | object | string, thisArg?: any): boolean; - min: (collection: T[]) => T; +export declare function any(collection: T[] | object | string, callback?: ((index: number, value: T) => boolean) | object | string, thisArg?: any): boolean; - sortBy: (collection: any[] | object | string, callback?: ((index: number, value: T) => number) | object | string, thisArg?: any) => any[]; +export declare function max(collection: T[]): T; - groupBy: (collection: any[] | object | string, callback?: ((index: number, value: T) => any) | object | string, thisArg?: any) => object; +export declare function min(collection: T[]): T; - indexBy: (collection: any[] | object | string, callback?: ((index: number, value: T) => any) | object | string, thisArg?: any) => object; +export declare function sortBy(collection: any[] | object | string, callback?: ((index: number, value: T) => number) | object | string, thisArg?: any): any[]; - countBy: (collection: any[] | object | string, callback?: ((index: number, value: T) => any) | object | string, thisArg?: any) => object; +export declare function groupBy(collection: any[] | object | string, callback?: ((index: number, value: T) => any) | object | string, thisArg?: any): object; +export declare function indexBy(collection: any[] | object | string, callback?: ((index: number, value: T) => any) | object | string, thisArg?: any): object; - count: (from: number, to: number, predicate: Function) => number; +export declare function countBy(collection: any[] | object | string, callback?: ((index: number, value: T) => any) | object | string, thisArg?: any): object; - inverse: (from: number, to: number, predicate: Function) => number; - firstKey: (obj: object) => string; +export declare function count(from: number, to: number, predicate: Function): number; - lastKey: (obj: object) => string; +export declare function inverse(from: number, to: number, predicate: Function): number; - firstObject: (obj: object) => any; +export declare function firstKey(obj: object): string; - lastObject: (obj: object) => any; +export declare function lastKey(obj: object): string; - concat: (obj1: any, obj2: any, ...args: any[]) => any; +export declare function firstObject(obj: object): any; - backEach: (obj: any, predicate: Function, context?: any) => boolean; +export declare function lastObject(obj: object): any; - backAny: (obj: any, predicate: Function, context?: any) => boolean; +export declare function concat(obj1: any, obj2: any, ...args: any[]): any; - backEvery: (obj: any, predicate: Function, context?: any) => boolean; +export declare function backEach(obj: any, predicate: Function, context?: any): boolean; - backFindKey: (obj: any, predicate: Function, context?: any) => string; +export declare function backAny(obj: any, predicate: Function, context?: any): boolean; - backFind: (obj: any, predicate: Function, context?: any) => any; +export declare function backEvery(obj: any, predicate: Function, context?: any): boolean; - remove: (obj: any, predicate: any, context?: any) => void; +export declare function backFindKey(obj: any, predicate: Function, context?: any): string; - removeAt: (obj: any, index: number | number[]) => void; +export declare function backFind(obj: any, predicate: Function, context?: any): any; - string2Array: (str: string) => string[]; +export declare function remove(obj: any, predicate: any, context?: any): void; - array2String: (array: any[]) => string; +export declare function removeAt(obj: any, index: number | number[]): void; - abc2Int: (str: string) => number; +export declare function string2Array(str: string): string[]; - int2Abc: (num: number) => string; +export declare function array2String(array: any[]): string; - // 数组相关的方法 - first: (array: T[], callback?: Function | object | number | string, thisArg?: any) => T; +export declare function abc2Int(str: string): number; - initial: (array: T[], callback?: Function | object | number | string, thisArg?: any) => T[]; +export declare function int2Abc(num: number): string; - last: (array: T[], callback?: Function | object | number | string, thisArg?: any) => T; +// 数组相关的方法 +export declare function first(array: T[], callback?: Function | object | number | string, thisArg?: any): T; - rest: (array: T[], callback?: Function | object | number | string, thisArg?: any) => T[]; +export declare function initial(array: T[], callback?: Function | object | number | string, thisArg?: any): T[]; - compact: (array: any[]) => any[]; +export declare function last(array: T[], callback?: Function | object | number | string, thisArg?: any): T; - flatten: (array: any[], isShallow?: boolean, callback?: Function | object | string, thisArg?: any) => any[]; +export declare function rest(array: T[], callback?: Function | object | number | string, thisArg?: any): T[]; - without: (array: any[], value?: any) => any[]; +export declare function compact(array: any[]): any[]; - union: (...array: any[]) => any[]; +export declare function flatten(array: any[], isShallow?: boolean, callback?: Function | object | string, thisArg?: any): any[]; - intersection: (...array: any[]) => any[]; +export declare function without(array: any[], value?: any): any[]; - difference: (...array: any[]) => any[]; +export declare function union(...array: any[]): any[]; - zip: (...array: any[]) => any[]; +export declare function intersection(...array: any[]): any[]; - unzip: (...array: any[]) => any[]; +export declare function difference(...array: any[]): any[]; - object: (keys: string[], values?: any[]) => any[]; +export declare function zip(...array: any[]): any[]; - indexOf: (array: any[], value: any, fromIndex?: number) => number; +export declare function unzip(...array: any[]): any[]; - lastIndexOf: (array: any[], value: any, fromIndex?: number) => number; +export declare function object(keys: string[], values?: any[]): any[]; - sortedIndex: (array: any[], value: any, callback?: Function | object | string, thisArg?: any) => number; +export declare function indexOf(array: any[], value: any, fromIndex?: number): number; - range: (start: number, end: number, step: number) => number[]; +export declare function lastIndexOf(array: any[], value: any, fromIndex?: number): number; - take: (array: T[], n: number) => T[]; +export declare function sortedIndex(array: any[], value: any, callback?: Function | object | string, thisArg?: any): number; - takeRight: (array: T[], n: number) => T[]; +export declare function range(start: number, end: number, step: number): number[]; - findIndex: (array: T[], predicate?: ((index: number, item: T, array: T[]) => any) | object | string, thisArg?: any) => number; +export declare function take(array: T[], n: number): T[]; - findLastIndex: (array: T[], predicate?: ((index: number, item: T, array: T[]) => any) | object | string, thisArg?: any) => number; +export declare function takeRight(array: T[], n: number): T[]; - makeArray: (length: number, value?: T) => number[] | T[]; +export declare function findIndex(array: T[], predicate?: ((index: number, item: T, array: T[]) => any) | object | string, thisArg?: any): number; - makeObject: (array: any[], value: any) => any; +export declare function findLastIndex(array: T[], predicate?: ((index: number, item: T, array: T[]) => any) | object | string, thisArg?: any): number; - makeArrayByArray: (array: any[], value: T) => T[]; +export declare function makeArray(length: number, value?: T): number[] | T[]; - uniq: (array: T[], isSorted?: boolean, iteratee?: any, context?: any) => T[]; +export declare function makeObject(array: any[], value: any): any; - // 对象相关方法 - keys: (object: object) => string[]; +export declare function makeArrayByArray(array: any[], value: T): T[]; - allKeys: (object: object) => string[]; +export declare function uniq(array: T[], isSorted?: boolean, iteratee?: any, context?: any): T[]; - values: (object: object) => any[]; +// 对象相关方法 +export declare function keys(object: object): string[]; - pairs: (object: object) => any[]; +export declare function allKeys(object: object): string[]; - invert: (object: object, multiValue: boolean) => object; +export declare function values(object: object): any[]; - create: (prototype: object, properties?: object) => object; +export declare function pairs(object: object): any[]; - functions: (object: object) => string[]; +export declare function invert(object: object, multiValue: boolean): object; - extend(object: T): T; - extend(object: T, ...sources: U): T & UnionToIntersection>; +export declare function create(prototype: object, properties?: object): object; - defaults: (object: object, ...sources: any[]) => object; +export declare function functions(object: object): string[]; - clone: (object: T) => T; +export declare function extend(object: T): T; +export declare function extend(object: T, ...sources: U): T & UnionToIntersection>; - property: (path: any[] | string) => Function; +export declare function defaults(object: object, ...sources: any[]): object; - propertyOf: (object: object) => Function; +export declare function clone(object: T): T; - isEqual: (value: any, other: any, customizer?: Function, thisArg?: any) => boolean; +export declare function property(path: any[] | string): Function; - isMatch: (object: object, source: object, customizer?: Function, thisArg?: any) => boolean; +export declare function propertyOf(object: object): Function; - isEmpty: (value: any[] | object | string | null | undefined | number) => boolean; +export declare function isEqual(value: any, other: any, customizer?: Function, thisArg?: any): boolean; - isElement: (value: any) => boolean; +export declare function isMatch(object: object, source: object, customizer?: Function, thisArg?: any): boolean; - isNumber: (value: any) => value is number; +export declare function isEmpty(value: any[] | object | string | null | undefined | number): boolean; - isString: (value: any) => value is string; +export declare function isElement(value: any): boolean; - isArray: (value: T[] | any) => value is T[]; +export declare function isNumber(value: any): value is number; - isObject: (value: any) => value is object; +export declare function isString(value: any): value is string; - isPlainObject: (value: any) => value is object; +export declare function isArray(value: T[] | any): value is T[]; - isArguments: (value: any) => boolean; +export declare function isObject(value: any): value is object; - isFunction: (value: any) => value is Function; +export declare function isPlainObject(value: any): value is object; - isFinite: (value: any) => value is number; +export declare function isArguments(value: any): boolean; - isBoolean: (value: any) => value is boolean; +export declare function isFunction(value: any): value is Function; - isDate: (value: any) => value is Date; +export declare function isFinite(value: any): value is number; - isRegExp: (value: any) => value is RegExp; +export declare function isBoolean(value: any): value is boolean; - isError: (value: any) => value is Error; +export declare function isDate(value: any): value is Date; - isNaN: (value: any) => value is number; +export declare function isRegExp(value: any): value is RegExp; - isUndefined: (value: any) => value is undefined; +export declare function isError(value: any): value is Error; - zipObject: (props: any[], values?: any[]) => object; +export declare function isNaN(value: any): value is number; - cloneDeep: (value: T) => T; +export declare function isUndefined(value: any): value is undefined; - findKey: (object: object, predicate?: Function | object | string, thisArg?: any) => any; +export declare function zipObject(props: any[], values?: any[]): object; - pick: (object: object, predicate?: Function | string | string[], thisArg?: any) => object; +export declare function cloneDeep(value: T): T; - omit: (object: object, predicate?: Function | string | string[], thisArg?: any) => object; +export declare function findKey(object: object, predicate?: Function | object | string, thisArg?: any): any; - tap: (value: any, interceptor: Function, thisArg?: any) => any; +export declare function pick(object: object, predicate?: Function | string | string[], thisArg?: any): object; - inherit: (sb: any, sp: any, overrides?: any) => any; +export declare function omit(object: object, predicate?: Function | string | string[], thisArg?: any): object; - init: () => void; +export declare function tap(value: any, interceptor: Function, thisArg?: any): any; - has: (obj: object, keys: string | string[]) => boolean; +export declare function inherit(sb: any, sp: any, overrides?: any): any; - freeze: (value: T) => T; +export declare function init(): void; - isKey: (key: any) => key is (number | string); +export declare function has(obj: object, keys: string | string[]): boolean; - isCapitalEqual: (a: string | null | undefined, b: string | null | undefined) => boolean; +export declare function freeze(value: T): T; - isWidthOrHeight: (w: number | string) => boolean; +export declare function isKey(key: any): key is (number | string); - isNotNull: (obj: T) => obj is NonNullable; +export declare function isCapitalEqual(a: string | null | undefined, b: string | null | undefined): boolean; - isNull: (obj: any) => obj is (undefined | null); +export declare function isWidthOrHeight(w: number | string): boolean; - isEmptyArray: (arr: T[] | U) => arr is T[] & { length: 0 }; +export declare function isNotNull(obj: T): obj is NonNullable; - isNotEmptyArray: (arr: T[] | U) => arr is [T, ...T[]]; +export declare function isNull(obj: any): obj is (undefined | null); - isEmptyObject: (obj: any) => boolean; +export declare function isEmptyArray(arr: T[] | U): arr is T[] & { length: 0 }; - isNotEmptyObject: (obj: any) => obj is object; +export declare function isNotEmptyArray(arr: T[] | U): arr is [T, ...T[]]; - isWindow: (obj: any) => obj is Window; +export declare function isEmptyObject(obj: any): boolean; - deepClone: (obj: T) => T; +export declare function isNotEmptyObject(obj: any): obj is object; - deepExtend: merge["deepExtend"]; +export declare function isWindow(obj: any): obj is Window; - isDeepMatch: (object: any, attrs: any) => boolean; +export declare function deepClone(obj: T): T; - contains: (obj: any[], target: any, fromIndex?: number) => boolean; +export declare function deepExtend(object: TObject, source: TSource): TObject & TSource; - deepContains: (obj: any[], copy: any) => boolean; +export declare function deepExtend(object: TObject, source1: TSource1, source2: TSource2): TObject & TSource1 & TSource2; - deepIndexOf: (obj: any[], target: any) => number; +export declare function deepExtend(object: TObject, source1: TSource1, source2: TSource2): TObject & TSource1 & TSource2; - deepRemove: (obj: any[], target: any) => boolean; +export declare function deepExtend(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3): TObject & TSource1 & TSource2 & TSource3; - deepWithout: (obj: any[], target: any) => any[]; +export declare function deepExtend(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): TObject & TSource1 & TSource2 & TSource3 & TSource4; - deepUnique: (array: any[]) => any[]; +export declare function deepExtend(object: any, ...otherArgs: any[]): any; - deepDiff: (object: any, other: any) => string[]; +export declare function isDeepMatch(object: any, attrs: any): boolean; - uniqueId: (prefix?: string) => string; +export declare function contains(obj: any[], target: any, fromIndex?: number): boolean; - result: (object: any, key: string) => any; +export declare function deepContains(obj: any[], copy: any): boolean; - chain: (value: any) => any; +export declare function deepIndexOf(obj: any[], target: any): number; - iteratee: (func?: Function, thisArg?: any) => Function; +export declare function deepRemove(obj: any[], target: any): boolean; - unescape: (str?: string) => string; +export declare function deepWithout(obj: any[], target: any): any[]; - bind: (func: T, thisArg: any, ...partials: any) => T; +export declare function deepUnique(array: any[]): any[]; - once: (func: Function) => Function; +export declare function deepDiff(object: any, other: any): string[]; - partial: (func: Function, ...partials: any) => Function; +export declare function uniqueId(prefix?: string): string; - debounce: (func: T, wait?: number, options?: any) => T; +export declare function result(object: any, key: string): any; - throttle: (func: T, wait?: number, options?: any) => T; +export declare function chain(value: any): any; - delay: (func: Function, wait: number, ...args: any[]) => number; +export declare function iteratee(func?: Function, thisArg?: any): Function; - defer: (func: Function, ...args: any[]) => number; +export declare function unescape(str?: string): string; - wrap: (value: any, wrapper: Function) => Function; +export declare function bind(func: T, thisArg: any, ...partials: any): T; - nextTick: (func?: Function) => Promise; +export declare function once(func: Function): Function; - random: (min?: number, max?: number, floating?: boolean) => number; +export declare function partial(func: Function, ...partials: any): Function; - parseInt: (s: string | number) => number; +export declare function debounce(func: T, wait?: number, options?: any): T; - parseSafeInt: (s: string) => number; +export declare function throttle(func: T, wait?: number, options?: any): T; - parseFloat: (string: string) => number; +export declare function delay(func: Function, wait: number, ...args: any[]): number; - isNaturalNumber: (value: string | number) => boolean; +export declare function defer(func: Function, ...args: any[]): number; - isPositiveInteger: (value: string | number) => boolean; +export declare function wrap(value: any, wrapper: Function): Function; - isNegativeInteger: (value: string | number) => boolean; +export declare function nextTick(func?: Function): Promise; - isInteger: (value: string | number) => boolean; +export declare function random(min?: number, max?: number, floating?: boolean): number; - isNumeric: (value: string | number) => boolean; +export declare function parseInt(s: string | number): number; - isFloat: (value: string | number) => boolean; +export declare function parseSafeInt(s: string): number; - isOdd: (value: string | number) => boolean; +export declare function parseFloat(string: string): number; - isEven: (value: string | number) => boolean; +export declare function isNaturalNumber(value: string | number): boolean; - sum: (array: any[], iteratee?: Function, context?: any) => number; +export declare function isPositiveInteger(value: string | number): boolean; - average: (array: any[], iteratee?: Function, context?: any) => number; +export declare function isNegativeInteger(value: string | number): boolean; - trim: (string?: string, chars?: string) => string; +export declare function isInteger(value: string | number): boolean; - toUpperCase: (string: string) => string; +export declare function isNumeric(value: string | number): boolean; - toLowerCase: (string: string) => string; +export declare function isFloat(value: string | number): boolean; - isEndWithBlank: (string: string) => boolean; +export declare function isOdd(value: string | number): boolean; - isLiteral: (string: string) => boolean; +export declare function isEven(value: string | number): boolean; - stripQuotes: (string: string) => string; +export declare function sum(array: any[], iteratee?: Function, context?: any): number; - camelize: (string: string) => string; +export declare function average(array: any[], iteratee?: Function, context?: any): number; - hyphenate: (string: string) => string; +export declare function trim(string?: string, chars?: string): string; - isNotEmptyString: (string: any) => boolean; +export declare function toUpperCase(string: string): string; - isEmptyString: (str: any) => str is ""; +export declare function toLowerCase(string: string): string; - encrypt: (type: string, text: string, key: string) => string; +export declare function isEndWithBlank(string: string): boolean; - escape: (string: string) => string; +export declare function isLiteral(string: string): boolean; - leftPad: (val: string, size: number, ch: string) => string; +export declare function stripQuotes(string: string): string; - format: (format: string, ...str: string[]) => string; +export declare function camelize(string: string): string; - isLeapYear: (year: number) => boolean; +export declare function hyphenate(string: string): string; - checkDateVoid: (YY: string | number, MM: string | number, DD: string | number, minDate: string, maxDate: string) => (number | string)[]; +export declare function isNotEmptyString(string: any): boolean; - checkDateLegal: (str: string) => boolean; +export declare function isEmptyString(str: any): str is ""; - parseDateTime: (str: string, fmt: string) => Date; +export declare function encrypt(type: string, text: string, key: string): string; - getDate: (...args: (number | string)[]) => Date; +export declare function escape(string: string): string; - getTime: (...args: any[]) => number; +export declare function leftPad(val: string, size: number, ch: string): string; - /** - * 判断一个对象是不是promise - * @param obj 对象 - */ - isPromise: (obj: any) => obj is Promise; -} +export declare function format(format: string, ...str: string[]): string; -type merge = { - deepExtend(object: TObject, source: TSource): TObject & TSource; +export declare function isLeapYear(year: number): boolean; - deepExtend(object: TObject, source1: TSource1, source2: TSource2): TObject & TSource1 & TSource2; +export declare function checkDateVoid(YY: string | number, MM: string | number, DD: string | number, minDate: string, maxDate: string): (number | string)[]; - deepExtend(object: TObject, source1: TSource1, source2: TSource2): TObject & TSource1 & TSource2; +export declare function checkDateLegal(str: string): boolean; - deepExtend(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3): TObject & TSource1 & TSource2 & TSource3; +export declare function parseDateTime(str: string, fmt: string): Date; - deepExtend(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): TObject & TSource1 & TSource2 & TSource3 & TSource4; +export declare function getDate(...args: (number | string)[]): Date; - deepExtend(object: any, ...otherArgs: any[]): any; -} +export declare function getTime(...args: any[]): number; -type UnionToIntersection = ( - Union extends unknown - ? (x: Union) => void - : never -) extends ((x: infer Intersection) => void) - ? Intersection - : never; +/** + * 判断一个对象是不是promise + * @param obj 对象 + */ +export declare function isPromise(obj: any): obj is Promise; diff --git a/packages/fineui/typescript/core/func/array.ts b/packages/fineui/typescript/core/func/array.ts index e27e400bb..cece77dc4 100644 --- a/packages/fineui/typescript/core/func/array.ts +++ b/packages/fineui/typescript/core/func/array.ts @@ -1,5 +1,6 @@ -export type _array = { - pushArray: (sArray: any[], array: any[]) => void; - pushDistinct: (sArray: any[], obj: any) => void; - pushDistinctArray: (sArray: any[], array: any[]) => void; -} +export declare function pushArray(sArray: any[], array: any[]): void; + +export declare function pushDistinct(sArray: any[], obj: any): void; + +export declare function pushDistinctArray(sArray: any[], array: any[]): void; + diff --git a/packages/fineui/typescript/core/func/date.ts b/packages/fineui/typescript/core/func/date.ts index 93e004f8c..a65bc1523 100644 --- a/packages/fineui/typescript/core/func/date.ts +++ b/packages/fineui/typescript/core/func/date.ts @@ -1,4 +1,4 @@ -export type _Date = { +export interface Date { SECOND: number; MINUTE: number; HOUR: number; @@ -14,80 +14,78 @@ export type _Date = { _OFFSET: number[]; } -export type _date = { - - /** - * 获取时区 - */ - getTimezone: (date: Date) => string; - - /** - * 获取指定月共有多少天 - */ - getMonthDays: (date: Date, month: number) => number; - - /** - * 获取指定月的最后一天 - */ - getLastDateOfMonth: (data: Date) => Date; - - /** - * 获取指定时间距离当年已经过了多少天 - */ - getDayOfYear: (data: Date) => number; - - /** - * 获取指定时间距离当年已经过了多少周 - */ - getWeekNumber: (data: Date) => number; - - /** - * 获取指定时间的所处季度 - */ - getQuarter: (date: Date) => number; - - /** - * 离当前时间多少天的时间 - */ - getOffsetDate: (date: Date, offset: number) => Date; - - /** - * 离当前时间多少天季度的时间 - */ - getOffsetQuarter: (date: Date, n: number) => Date; - - /** - * 得到本季度的起始月份 - */ - getQuarterStartMonth: (date: Date) => number; - - /** - * 获得本季度的起始日期 - */ - getQuarterStartDate: (date: Date) => number; - - /** - * 获取本季度的其实日期 - */ - getQuarterEndDate: (date: Date) => number; - - /** - * 指定日期n个月之前或之后的日期 - */ - getOffsetMonth: (date: Date, n: number) => Date; - - /** - * 获取本周的起始日期 - */ - getWeekStartDate: (date: Date) => Date; - - /** - * 获取本周的结束日期 - */ - getWeekEndDate: (date: Date) => Date; - - /** - * 格式化打印日期 - */ - print: (date: Date, str: string) => string; -} +/** + * 获取时区 + */ +export declare function getTimezone(date: Date): string; + +/** + * 获取指定月共有多少天 + */ +export declare function getMonthDays(date: Date, month: number): number; + +/** + * 获取指定月的最后一天 + */ +export declare function getLastDateOfMonth(data: Date): Date; + +/** + * 获取指定时间距离当年已经过了多少天 + */ +export declare function getDayOfYear(data: Date): number; + +/** + * 获取指定时间距离当年已经过了多少周 + */ +export declare function getWeekNumber(data: Date): number; + +/** + * 获取指定时间的所处季度 + */ +export declare function getQuarter(date: Date): number; + +/** + * 离当前时间多少天的时间 + */ +export declare function getOffsetDate(date: Date, offset: number): Date; + +/** + * 离当前时间多少天季度的时间 + */ +export declare function getOffsetQuarter(date: Date, n: number): Date; + +/** + * 得到本季度的起始月份 + */ +export declare function getQuarterStartMonth(date: Date): number; + +/** + * 获得本季度的起始日期 + */ +export declare function getQuarterStartDate(date: Date): number; + +/** + * 获取本季度的其实日期 + */ +export declare function getQuarterEndDate(date: Date): number; + +/** + * 指定日期n个月之前或之后的日期 + */ +export declare function getOffsetMonth(date: Date, n: number): Date; + +/** + * 获取本周的起始日期 + */ +export declare function getWeekStartDate(date: Date): Date; + +/** + * 获取本周的结束日期 + */ +export declare function getWeekEndDate(date: Date): Date; + +/** + * 格式化打印日期 + */ +export declare function print(date: Date, str: string): string; + diff --git a/packages/fineui/typescript/core/func/function.ts b/packages/fineui/typescript/core/func/function.ts index 4da9ab104..fe6117901 100644 --- a/packages/fineui/typescript/core/func/function.ts +++ b/packages/fineui/typescript/core/func/function.ts @@ -1,46 +1,43 @@ -export type _function = { +/** + * 创建唯一的名字 + * @param array 已有的名字集合 + * @param name 待生成的名字 + * @return 生成后的名字 + */ +export declare function createDistinctName(array: any[], name: string): string; - /** - * 创建唯一的名字 - * @param array 已有的名字集合 - * @param name 待生成的名字 - * @return 生成后的名字 - */ - createDistinctName: (array: any[], name: string) => string; +/** + * 获取搜索结果 + * @param items 待搜索的数据 + * @param keyword 关键字 + * @param param 搜索哪个属性 + */ +export declare function getSearchResult(items: any, keyword: any, param?: string): { find: any[], match: any[] }; - /** - * 获取搜索结果 - * @param items 待搜索的数据 - * @param keyword 关键字 - * @param param 搜索哪个属性 - */ - getSearchResult: (items: any, keyword: any, param?: string) => { find: any[], match: any[] }; +/** + * 获取编码后的url + * @param urlTemplate url模板 + * @param param 参数 + */ +export declare function getEncodeURL(urlTemplate: string, param: any): string; - /** - * 获取编码后的url - * @param urlTemplate url模板 - * @param param 参数 - */ - getEncodeURL: (urlTemplate: string, param: any) => string; +/** + * 获取按GB2312排序的结果 + * @param items + * @param key + */ +export declare function getSortedResult(items: T[], key?: string | Function): T[]; - /** - * 获取按GB2312排序的结果 - * @param items - * @param key - */ - getSortedResult: (items: T[], key?: string | Function) => T[]; +/** + * 在方法A执行之前执行方法B + * @param sFunc 方法A + * @param func 方法B + */ +export declare function beforeFunc(sFunc: Function, func: Function): Function; - /** - * 在方法A执行之前执行方法B - * @param sFunc 方法A - * @param func 方法B - */ - beforeFunc: (sFunc: Function, func: Function) => Function; - - /** - * 在方法A执行之后执行方法B - * @param sFunc 方法A - * @param func 方法B - */ - afterFunc: (sFunc: Function, func: Function) => Function; -} +/** + * 在方法A执行之后执行方法B + * @param sFunc 方法A + * @param func 方法B + */ +export declare function afterFunc(sFunc: Function, func: Function): Function; diff --git a/packages/fineui/typescript/core/func/index.ts b/packages/fineui/typescript/core/func/index.ts index 7aca32af5..49b6cebc9 100644 --- a/packages/fineui/typescript/core/func/index.ts +++ b/packages/fineui/typescript/core/func/index.ts @@ -1,10 +1,5 @@ -import { _array } from "./array"; -import { _string } from "./string"; -import { _number } from "./number"; -import { _function } from "./function"; -import { _Date, _date } from "./date"; - -export interface _func extends _array, _string, _number, _date { - Date: _Date; - Func: _function; -} +export * from "./array"; +export * from "./string"; +export * from "./number"; +export * from "./function"; +export * from "./date"; diff --git a/packages/fineui/typescript/core/func/number.ts b/packages/fineui/typescript/core/func/number.ts index 9831185bd..eab11a8f7 100644 --- a/packages/fineui/typescript/core/func/number.ts +++ b/packages/fineui/typescript/core/func/number.ts @@ -1,34 +1,31 @@ -export type _number = { +/** + * 加法函数,用来得到精确的加法结果 + * @param {Number} num 被加数 + * @param {Number} arg 加数 + * @return {Number} 两个数字相加后的结果 + */ +export declare function add(num: number, arg: number): number; - /** - * 加法函数,用来得到精确的加法结果 - * @param {Number} num 被加数 - * @param {Number} arg 加数 - * @return {Number} 两个数字相加后的结果 - */ - add: (num: number, arg: number) => number; +/** + * 减法函数,用来得到精确的减法结果 + * @param {Number} num 被减数 + * @param {Number} arg 减数 + * @return {Number} 两个数字相减后的结果 + */ +export declare function sub(num: number, arg: number): number; - /** - * 减法函数,用来得到精确的减法结果 - * @param {Number} num 被减数 - * @param {Number} arg 减数 - * @return {Number} 两个数字相减后的结果 - */ - sub: (num: number, arg: number) => number; +/** + * 乘法函数,用来得到精确的乘法结果 + * @param {Number} num 被乘数 + * @param {Number} arg 乘数 + * @return {Number} 两个数字相乘后的结果 + */ +export declare function mul(num: number, arg: number): number; - /** - * 乘法函数,用来得到精确的乘法结果 - * @param {Number} num 被乘数 - * @param {Number} arg 乘数 - * @return {Number} 两个数字相乘后的结果 - */ - mul: (num: number, arg: number) => number; - - /** - * 除法函数,用来得到精确的除法结果 - * @param {Number} num 被除数 - * @param {Number} arg 除数 - * @return {Number} 两个数字相除后的结果 - */ - div: (num: number, arg: number) => number; -} +/** + * 除法函数,用来得到精确的除法结果 + * @param {Number} num 被除数 + * @param {Number} arg 除数 + * @return {Number} 两个数字相除后的结果 + */ +export declare function div(num: number, arg: number): number; diff --git a/packages/fineui/typescript/core/func/string.ts b/packages/fineui/typescript/core/func/string.ts index 02df541a5..1d45839a6 100644 --- a/packages/fineui/typescript/core/func/string.ts +++ b/packages/fineui/typescript/core/func/string.ts @@ -1,59 +1,57 @@ -export type _string = { - - /** - * 判断字符串是否已指定的字符串开始 - * @param str source字符串 - * @param {String} startTag 指定的开始字符串 - * @return {Boolean} 如果字符串以指定字符串开始则返回true,否则返回false - */ - startWith: (str: string, startTag: string) => boolean; +/** + * 判断字符串是否已指定的字符串开始 + * @param str source字符串 + * @param {String} startTag 指定的开始字符串 + * @return {Boolean} 如果字符串以指定字符串开始则返回true,否则返回false + */ +export declare function startWith(str: string, startTag: string): boolean; - /** - * 判断字符串是否以指定的字符串结束 - * @param str source字符串 - * @param {String} endTag 指定的字符串 - * @return {Boolean} 如果字符串以指定字符串结束则返回true,否则返回false - */ - endWith: (str: string, endTag: string) => boolean; +/** + * 判断字符串是否以指定的字符串结束 + * @deprecated 废弃了,用原生的endsWith吧 + * @param str source字符串 + * @param {String} endTag 指定的字符串 + * @return {Boolean} 如果字符串以指定字符串结束则返回true,否则返回false + */ +export declare function endWith(str: string, endTag: string): boolean; - /** - * 获取url中指定名字的参数 - * @param str source字符串 - * @param {String} name 参数的名字 - * @return {String} 参数的值 - */ - getQuery: (str: string, name: string) => string|null; +/** + * 获取url中指定名字的参数 + * @param str source字符串 + * @param {String} name 参数的名字 + * @return {String} 参数的值 + */ +export declare function getQuery(str: string, name: string): string | null; - /** - * 给url加上给定的参数 - * @param str source字符串 - * @param {Object} paras 参数对象,是一个键值对对象 - * @return {String} 添加了给定参数的url - */ - appendQuery: (str: string, paras: {[key: string]: string|number}) => string; +/** + * 给url加上给定的参数 + * @param str source字符串 + * @param {Object} paras 参数对象,是一个键值对对象 + * @return {String} 添加了给定参数的url + */ +export declare function appendQuery(str: string, paras: { [key: string]: string | number }): string; - /** - * 将所有符合第一个字符串所表示的字符串替换成为第二个字符串 - * @param str source字符串 - * @param {String} s1 要替换的字符串的正则表达式 - * @param {String} s2 替换的结果字符串 - * @returns {String} 替换后的字符串 - */ - replaceAll: (str: string, s1: string, s2: string) => string; +/** + * 将所有符合第一个字符串所表示的字符串替换成为第二个字符串 + * @param str source字符串 + * @param {String} s1 要替换的字符串的正则表达式 + * @param {String} s2 替换的结果字符串 + * @returns {String} 替换后的字符串 + */ +export declare function replaceAll(str: string, s1: string, s2: string): string; - /** - * 总是让字符串以指定的字符开头 - * @param str source字符串 - * @param {String} start 指定的字符 - * @returns {String} 以指定字符开头的字符串 - */ - perfectStart: (str: string, start: string) => string; +/** + * 总是让字符串以指定的字符开头 + * @param str source字符串 + * @param {String} start 指定的字符 + * @returns {String} 以指定字符开头的字符串 + */ +export declare function perfectStart(str: string, start: string): string; - /** - * 获取字符串中某字符串的所有项位置数组 - * @param str source字符串 - * @param {String} sub 子字符串 - * @return {Number[]} 子字符串在父字符串中出现的所有位置组成的数组 - */ - allIndexOf: (str: string, sub: string) => number[]; -} +/** + * 获取字符串中某字符串的所有项位置数组 + * @param str source字符串 + * @param {String} sub 子字符串 + * @return {Number[]} 子字符串在父字符串中出现的所有位置组成的数组 + */ +export declare function allIndexOf(str: string, sub: string): number[]; diff --git a/packages/fineui/typescript/core/i18n.ts b/packages/fineui/typescript/core/i18n.ts index 79903578a..fbf04617a 100644 --- a/packages/fineui/typescript/core/i18n.ts +++ b/packages/fineui/typescript/core/i18n.ts @@ -1,8 +1,3 @@ -export type _addI18n = (v: string | object) => string; +export declare function addI18n(v: string | object): string; -export type _i18nText = (key: string, ..._args: any[]) => string; - -export type _i18n = { - addI18n: _addI18n; - i18nText: _i18nText; -} \ No newline at end of file +export declare function i18nText(key: string, ..._args: any[]): string; diff --git a/packages/fineui/typescript/core/inject.ts b/packages/fineui/typescript/core/inject.ts index e199b06f5..cd8001e69 100644 --- a/packages/fineui/typescript/core/inject.ts +++ b/packages/fineui/typescript/core/inject.ts @@ -1,47 +1,42 @@ -type _module = (xtype: string, cls: any) => void; -type _constant = (xtype: string, cls: T) => (() => T); -type _model = (xtype: string, cls: any) => Function; -type _store = (xtype: string, cls: any) => Function; -type _service = (xtype: string, cls: any) => Function; -type _provider = (xtype: string, cls: any) => Function; - -interface _modules { - getModule: (type: string) => any; - getAllModules: () => any; +export declare function module(xtype: string, cls: any): void; + +export declare function constant(xtype: string, cls: T): (() => T); + +export declare function model(xtype: string, cls: any): Function; + +export declare function store(xtype: string, cls: any): Function; + +export declare function service(xtype: string, cls: any): Function; + +export declare function provider(xtype: string, cls: any): Function; + +export declare namespace Modules { + function getModule(type: string): any; + + function getAllModules(): any; } -interface _constants { - getConstant: (type: string) => any; +export declare namespace Constants { + function getConstant(type: string): any; } -interface _models { - getModel: (type: string, options?: any) => any; +export declare namespace Models { + function getModel(type: string, options?: any): any; } -interface _stores { - getStore: (type: string, options?: any) => any; +export declare namespace Stores { + function getStore(type: string, options?: any): any; } -interface _providers { - getProvider: (type: string, options?: any) => any; +export declare namespace Providers { + function getProvider(type: string, options?: any): any; } -interface _services { - getService: (type: string, options?: any) => any; +export declare namespace Services { + function getService(type: string, options?: any): any; } -export type _inject = { - module: _module; - constant: _constant; - model: _model; - store: _store; - provider: _provider; - service: _service; - Modules: _modules; - Constants: _constants; - Models: _models; - Stores: _stores; - Providers: _providers; - Services: _services; -} +// export declare function shortcut(xtype: string, cls: any): void + +// export declare function component(xtype: string, cls: any): void diff --git a/packages/fineui/typescript/core/loader/loader.style.ts b/packages/fineui/typescript/core/loader/loader.style.ts new file mode 100644 index 000000000..6ec21ccdd --- /dev/null +++ b/packages/fineui/typescript/core/loader/loader.style.ts @@ -0,0 +1,12 @@ +import { OB } from "../ob"; + +export declare class StyleLoaderManager extends OB { + + loadStyle(name: string, styleString: string): void + + get(name: string): HTMLElement + + has(name: string): boolean + + removeStyle(name: string): void +} diff --git a/packages/fineui/typescript/core/platform/web/detectElementResize.ts b/packages/fineui/typescript/core/platform/web/detectElementResize.ts index 8e1566ce9..1c15161db 100644 --- a/packages/fineui/typescript/core/platform/web/detectElementResize.ts +++ b/packages/fineui/typescript/core/platform/web/detectElementResize.ts @@ -1,6 +1,5 @@ -import { Widget } from "../../../core/widget"; +import { Widget } from "../../widget"; -export type _DetectElementResize = { - addResizeListener: (widget: Widget, fn: Function) => Function - removeResizeListener: (widget: Widget, fn?: Function) => void -} +export declare function addResizeListener(widget: Widget, fn: Function): Function + +export declare function removeResizeListener(widget: Widget, fn?: Function): void diff --git a/packages/fineui/typescript/core/platform/web/dom.ts b/packages/fineui/typescript/core/platform/web/dom.ts index fbb7e8cf9..de155ec8d 100644 --- a/packages/fineui/typescript/core/platform/web/dom.ts +++ b/packages/fineui/typescript/core/platform/web/dom.ts @@ -1,58 +1,125 @@ -import { Widget } from "../../../core/widget"; - - -export type _DOM = { - ready: (fn: Function) => void - - // TODO: 引入jquery描述后处理 - patchProps: (fromElement: any, toElement: any) => void - - hang: (doms: Widget[]) => DocumentFragment - isExist: (obj: Widget) => boolean - preloadImages: (srcArray: string[], onload: Function) => void - getTextSizeWidth: (text: string, fontSize?: number) => number - getTextSizeHeight: (text: string, fontSize?: number) => number - getScrollWidth: () => number - getImage: (param: string, fillStyle?: string, backgroundColor?: string) => { width: number, height: number, src: string, style: string, param: string } - - isColor: (color: string) => boolean - isRGBColor: (color: string) => boolean - isHexColor: (color: string) => boolean - isDarkColor: (hex: string) => boolean - getContrastColor: (color: string) => string - rgb2hex: (rgbColour: string) => string - rgb2json: (rgbColour: string) => { r: number, g: number, b: number } - rgba2json: (rgbColour: string) => { r: number, g: number, b: number, a:number } - json2rgb: (rgb: { r: number, g: number, b: number }) => string - json2rgba: (rgba: { r: number, g: number, b: number, a:number }) => string - int2hex: (strNum: number) => string - hex2rgb: (color: string) => string - rgba2rgb: (rgbColor: string, bgColor?:string) => string - - getLeftPosition: (combo: Widget, popup: Widget, extraWidth?: number) => { left: number} - getInnerLeftPosition: (combo: Widget, popup?: Widget, extraWidth?: number) => { left: number} - getRightPosition: (combo: Widget, popup?: Widget, extraWidth?: number) => { left: number} - getInnerRightPosition: (combo: Widget, popup: Widget, extraWidth?: number) => { left: number} - getTopPosition: (combo: Widget, popup: Widget, extraHeight?: number) => { top: number} - getBottomPosition: (combo: Widget, popup?: Widget, extraHeight?: number) => { top: number} - isLeftSpaceEnough: (combo: Widget, popup: Widget, extraWidth?: number) => boolean - isInnerLeftSpaceEnough: (combo: Widget, popup: Widget, extraWidth?: number) => boolean - isRightSpaceEnough: (combo: Widget, popup: Widget, extraWidth?: number) => boolean - isInnerRightSpaceEnough: (combo: Widget, popup: Widget, extraWidth?: number) => boolean - isTopSpaceEnough: (combo: Widget, popup?: Widget, extraHeight?: number) => boolean - isBottomSpaceEnough: (combo: Widget, popup?: Widget, extraHeight?: number) => boolean - isRightSpaceLarger: (combo: Widget) => boolean - isBottomSpaceLarger: (combo: Widget) => boolean - getLeftAlignPosition: (combo: Widget, popup: Widget, extraWidth?: number) => { left: number} - getLeftAdaptPosition: (combo: Widget, popup: Widget, extraWidth?: number) => { left: number} - getRightAlignPosition: (combo: Widget, popup: Widget, extraWidth?: number) => { left: number} - getRightAdaptPosition: (combo: Widget, popup: Widget, extraWidth?: number) => { left: number} - getTopAlignPosition: (combo: Widget, popup: Widget, extraHeight?:number, needAdaptHeight?:boolean) => { top: number, adaptHeight?: number} - getTopAdaptPosition: (combo: Widget, popup: Widget, extraHeight?:number, needAdaptHeight?:boolean) => { top: number, adaptHeight?: number} - getBottomAlignPosition: (combo: Widget, popup: Widget, extraHeight?:number, needAdaptHeight?:boolean) => { top: number, adaptHeight?: number} - getBottomAdaptPosition: (combo: Widget, popup: Widget, extraHeight?:number, needAdaptHeight?:boolean) => { top: number, adaptHeight?: number} - getCenterAdaptPosition: (combo: Widget, popup: Widget) => { left: number } - getMiddleAdaptPosition: (combo: Widget, popup: Widget) => { top: number } - getComboPositionByDirections: (combo: Widget, popup: Widget, extraWidth?:number, extraHeight?:number, needAdaptHeight?:number, directions?:number) => { dir: string, left?: number, top?: number, change?: string} - getComboPosition: (combo: Widget, popup: Widget, extraWidth?:number, extraHeight?:number, needAdaptHeight?:number, directions?:number) => { dir: string, left?: number, top?: number, change?: string} -} \ No newline at end of file +import { Widget } from "../../widget"; + +export declare function ready(fn: Function): void + +export declare function patchProps(fromElement: any, toElement: any): void + +export declare function hang(doms: Widget[]): DocumentFragment + +export declare function isExist(obj: Widget): boolean + +export declare function preloadImages(srcArray: string[], onload: Function): void + +export declare function getTextSizeWidth(text: string, fontSize?: number): number + +export declare function getTextSizeHeight(text: string, fontSize?: number): number + +export declare function getScrollWidth(): number + +export declare function getImage(param: string, fillStyle?: string, backgroundColor?: string): { + width: number, + height: number, + src: string, + style: string, + param: string +} + +export declare function isColor(color: string): boolean + +export declare function isRGBColor(color: string): boolean + +export declare function isHexColor(color: string): boolean + +export declare function isDarkColor(hex: string): boolean + +export declare function getContrastColor(color: string): string + +export declare function rgb2hex(rgbColour: string): string + +export declare function rgb2json(rgbColour: string): { r: number, g: number, b: number } + +export declare function rgba2json(rgbColour: string): { r: number, g: number, b: number, a: number } + +export declare function json2rgb(rgb: { r: number, g: number, b: number }): string + +export declare function json2rgba(rgba: { r: number, g: number, b: number, a: number }): string + +export declare function int2hex(strNum: number): string + +export declare function hex2rgb(color: string): string + +export declare function rgba2rgb(rgbColor: string, bgColor?: string): string + +export declare function getLeftPosition(combo: Widget, popup: Widget, extraWidth?: number): { left: number } + +export declare function getInnerLeftPosition(combo: Widget, popup?: Widget, extraWidth?: number): { left: number } + +export declare function getRightPosition(combo: Widget, popup?: Widget, extraWidth?: number): { left: number } + +export declare function getInnerRightPosition(combo: Widget, popup: Widget, extraWidth?: number): { left: number } + +export declare function getTopPosition(combo: Widget, popup: Widget, extraHeight?: number): { top: number } + +export declare function getBottomPosition(combo: Widget, popup?: Widget, extraHeight?: number): { top: number } + +export declare function isLeftSpaceEnough(combo: Widget, popup: Widget, extraWidth?: number): boolean + +export declare function isInnerLeftSpaceEnough(combo: Widget, popup: Widget, extraWidth?: number): boolean + +export declare function isRightSpaceEnough(combo: Widget, popup: Widget, extraWidth?: number): boolean + +export declare function isInnerRightSpaceEnough(combo: Widget, popup: Widget, extraWidth?: number): boolean + +export declare function isTopSpaceEnough(combo: Widget, popup?: Widget, extraHeight?: number): boolean + +export declare function isBottomSpaceEnough(combo: Widget, popup?: Widget, extraHeight?: number): boolean + +export declare function isRightSpaceLarger(combo: Widget): boolean + +export declare function isBottomSpaceLarger(combo: Widget): boolean + +export declare function getLeftAlignPosition(combo: Widget, popup: Widget, extraWidth?: number): { left: number } + +export declare function getLeftAdaptPosition(combo: Widget, popup: Widget, extraWidth?: number): { left: number } + +export declare function getRightAlignPosition(combo: Widget, popup: Widget, extraWidth?: number): { left: number } + +export declare function getRightAdaptPosition(combo: Widget, popup: Widget, extraWidth?: number): { left: number } + +export declare function getTopAlignPosition(combo: Widget, popup: Widget, extraHeight?: number, needAdaptHeight?: boolean): { + top: number, + adaptHeight?: number +} + +export declare function getTopAdaptPosition(combo: Widget, popup: Widget, extraHeight?: number, needAdaptHeight?: boolean): { + top: number, + adaptHeight?: number +} + +export declare function getBottomAlignPosition(combo: Widget, popup: Widget, extraHeight?: number, needAdaptHeight?: boolean): { + top: number, + adaptHeight?: number +} + +export declare function getBottomAdaptPosition(combo: Widget, popup: Widget, extraHeight?: number, needAdaptHeight?: boolean): { + top: number, + adaptHeight?: number +} + +export declare function getCenterAdaptPosition(combo: Widget, popup: Widget): { left: number } + +export declare function getMiddleAdaptPosition(combo: Widget, popup: Widget): { top: number } + +export declare function getComboPositionByDirections(combo: Widget, popup: Widget, extraWidth?: number, extraHeight?: number, needAdaptHeight?: number, directions?: number): { + dir: string, + left?: number, + top?: number, + change?: string +} + +export declare function getComboPosition(combo: Widget, popup: Widget, extraWidth?: number, extraHeight?: number, needAdaptHeight?: number, directions?: number): { + dir: string, + left?: number, + top?: number, + change?: string +} diff --git a/packages/fineui/typescript/core/platform/web/eventListener.ts b/packages/fineui/typescript/core/platform/web/eventListener.ts index d50aa7da1..335d39637 100644 --- a/packages/fineui/typescript/core/platform/web/eventListener.ts +++ b/packages/fineui/typescript/core/platform/web/eventListener.ts @@ -1,5 +1,5 @@ -export type _EventListener = { - listen: (target: EventTarget, eventType: string, callback: Function) => { remove: () => void } - capture: (target: EventTarget, eventType: string, callback: Function) => { remove: () => void } - registerDefault: () => void -} \ No newline at end of file +export declare function listen(target: EventTarget, eventType: string, callback: Function): { remove: () => void } + +export declare function capture(target: EventTarget, eventType: string, callback: Function): { remove: () => void } + +export declare function registerDefault(): void diff --git a/packages/fineui/typescript/core/platform/web/function.ts b/packages/fineui/typescript/core/platform/web/function.ts index 406eb95ee..ab3190757 100644 --- a/packages/fineui/typescript/core/platform/web/function.ts +++ b/packages/fineui/typescript/core/platform/web/function.ts @@ -1,13 +1,21 @@ -export type _function = { - isIE: () => boolean; - getIEVersion: () => number; - isEdge: () => boolean; - isChrome: () => boolean; - isFireFox: () => boolean; - isOpera: () => boolean; - isSafari: () => boolean; - isMac: () => boolean; - isWindows: () => boolean; - isSupportCss3: (style: any) => boolean; - getSafariVersion: () => number; -} \ No newline at end of file +export declare function isIE(): boolean; + +export declare function getIEVersion(): number; + +export declare function isEdge(): boolean; + +export declare function isChrome(): boolean; + +export declare function isFireFox(): boolean; + +export declare function isOpera(): boolean; + +export declare function isSafari(): boolean; + +export declare function isMac(): boolean; + +export declare function isWindows(): boolean; + +export declare function isSupportCss3(style: any): boolean; + +export declare function getSafariVersion(): number; diff --git a/packages/fineui/typescript/core/platform/web/index.ts b/packages/fineui/typescript/core/platform/web/index.ts index 79b2a19c5..2aadb120a 100644 --- a/packages/fineui/typescript/core/platform/web/index.ts +++ b/packages/fineui/typescript/core/platform/web/index.ts @@ -1,11 +1,5 @@ -import { _function } from "./function"; -import { _EventListener } from './eventListener'; -import { _DetectElementResize } from './detectElementResize'; -import { _load } from './load'; -import { _DOM } from './dom'; - -export interface _web extends _function, _load { - EventListener: _EventListener, - ResizeDetector: _DetectElementResize, - DOM: _DOM -} \ No newline at end of file +export * from "./function"; +export * as EventListener from "./eventListener"; +export * as ResizeDetector from "./detectElementResize"; +export * from "./load"; +export * as DOM from "./dom"; diff --git a/packages/fineui/typescript/core/platform/web/load.ts b/packages/fineui/typescript/core/platform/web/load.ts index 4d49d2aeb..144150ff5 100644 --- a/packages/fineui/typescript/core/platform/web/load.ts +++ b/packages/fineui/typescript/core/platform/web/load.ts @@ -1,3 +1 @@ -export type _load = { - $import: (src: string, ext?: string, must?: boolean) => void -} \ No newline at end of file +export declare function $import(src: string, ext?: string, must?: boolean): void diff --git a/packages/fineui/typescript/core/plugin.ts b/packages/fineui/typescript/core/plugin.ts index afae32a91..b5b3e98b7 100644 --- a/packages/fineui/typescript/core/plugin.ts +++ b/packages/fineui/typescript/core/plugin.ts @@ -3,14 +3,8 @@ import { Widget } from "./widget"; type configWidgetFn = (type: string, options: Obj) => void type configObjectFn = (type: string, widget: Widget) => void -export type _config = (widgetFunction: configWidgetFn | configWidgetFn[], objectFunction: configObjectFn | configObjectFn[]) => void +export declare function config(widgetFunction: configWidgetFn | configWidgetFn[], objectFunction: configObjectFn | configObjectFn[]): void -export type _configWidget = (shortcut: string, widgetFunction: configWidgetFn) => void +export declare function configWidget(shortcut: string, widgetFunction: configWidgetFn): void -export type _registerObject = (shortcut: string, objectFunction: configObjectFn) => void - -export type _Plugin = { - config: _config; - configWidget: _configWidget; - registerObject: _registerObject; -} +export declare function registerObject(shortcut: string, objectFunction: configObjectFn): void diff --git a/packages/fineui/typescript/core/utils/aes.ts b/packages/fineui/typescript/core/utils/aes.ts index d6e93a497..88d4efa92 100644 --- a/packages/fineui/typescript/core/utils/aes.ts +++ b/packages/fineui/typescript/core/utils/aes.ts @@ -1,4 +1,3 @@ -export type _aes = { - aesEncrypt: (text: string, key:string) => string - aesDecrypt: (text: string, key:string) => string -} \ No newline at end of file +export declare function aesEncrypt(text: string, key: string): string + +export declare function aesDecrypt(text: string, key: string): string diff --git a/packages/fineui/typescript/core/utils/aspect.ts b/packages/fineui/typescript/core/utils/aspect.ts index 94b4eed10..6dfdbc888 100644 --- a/packages/fineui/typescript/core/utils/aspect.ts +++ b/packages/fineui/typescript/core/utils/aspect.ts @@ -1,4 +1,11 @@ -export type _aspect = { - before: (target: object, methodName: string, advice: Function) => { advice: Function, index: number, remove: () => void} - after: (target: object, methodName: string, advice: Function) => { advice: Function, index: number, remove: () => void} -} \ No newline at end of file +export declare function before(target: object, methodName: string, advice: Function): { + advice: Function, + index: number, + remove: () => void +} + +export declare function after(target: object, methodName: string, advice: Function): { + advice: Function, + index: number, + remove: () => void +} diff --git a/packages/fineui/typescript/core/utils/base64.ts b/packages/fineui/typescript/core/utils/base64.ts index 3bbfefcf4..04b7c2fc4 100644 --- a/packages/fineui/typescript/core/utils/base64.ts +++ b/packages/fineui/typescript/core/utils/base64.ts @@ -1,4 +1,3 @@ -export type _base64 = { - encode: (input: string) => string - decode: (text: string) => string -} \ No newline at end of file +export declare function encode(input: string): string + +export declare function decode(text: string): string diff --git a/packages/fineui/typescript/core/utils/cache.ts b/packages/fineui/typescript/core/utils/cache.ts index 3f1b788e2..af0130637 100644 --- a/packages/fineui/typescript/core/utils/cache.ts +++ b/packages/fineui/typescript/core/utils/cache.ts @@ -1,14 +1,23 @@ -export type _cache = { - setUsername: (username: string) => void - getUsername: () => string - _getKeyPrefix: () => string - _generateKey: (key?: string) => void - getItem: (key?: string) => string - setItem: (key: string, value: any) => void - removeItem: (key: string) => void - clear: () => void - keys: () => string[] - addCookie: (name: string, value: any, path?: string, expiresHours?: number) => void - getCookie: (name: string) => string - deleteCookie: (name: string, path?: string) => void -} \ No newline at end of file +export declare function setUsername(username: string): void + +export declare function getUsername(): string + +export declare function _getKeyPrefix(): string + +export declare function _generateKey(key?: string): void + +export declare function getItem(key?: string): string + +export declare function setItem(key: string, value: any): void + +export declare function removeItem(key: string): void + +export declare function clear(): void + +export declare function keys(): string[] + +export declare function addCookie(name: string, value: any, path?: string, expiresHours?: number): void + +export declare function getCookie(name: string): string + +export declare function deleteCookie(name: string, path?: string): void diff --git a/packages/fineui/typescript/core/utils/chinesePY.ts b/packages/fineui/typescript/core/utils/chinesePY.ts index 54ba50141..c7b5a0df0 100644 --- a/packages/fineui/typescript/core/utils/chinesePY.ts +++ b/packages/fineui/typescript/core/utils/chinesePY.ts @@ -1,3 +1 @@ -export type _chinesePY = { - makeFirstPY: (str: string, options?: { ignoreMulti?: boolean, splitChar?: string }) => string -} +export declare function makeFirstPY(str: string, options?: { ignoreMulti?: boolean, splitChar?: string }): string diff --git a/packages/fineui/typescript/core/utils/index.ts b/packages/fineui/typescript/core/utils/index.ts index 42b340588..8982a20f2 100644 --- a/packages/fineui/typescript/core/utils/index.ts +++ b/packages/fineui/typescript/core/utils/index.ts @@ -1,34 +1,16 @@ -import { _aes } from './aes'; -import { _aspect } from './aspect'; -import { _base64 } from './base64'; -import { _cache } from './cache'; -import { _chinesePY } from './chinesePY'; -import { MouseMoveTracker } from './events/mousemovetracker'; -import { WheelHandler } from './events/wheelhandler'; -import { CellSizeAndPositionManager, ScalingCellSizeAndPositionManager } from './cellSizeAndPositionManager'; -import { Heap } from './heap'; -import { LinkedHashMap } from './linkedHashMap'; -import { LRU } from './lru'; -import { PrefixIntervalTree } from './prefixIntervalTree'; -import { Queue } from './queue'; -import { Section } from './sectionManager'; -import { Tree } from './tree'; -import { Vector, Region } from './vector'; - -export interface _utils extends _aes, _base64, _chinesePY { - aspect: _aspect - Cache: _cache - MouseMoveTracker: typeof MouseMoveTracker - WheelHandler: typeof WheelHandler - CellSizeAndPositionManager: typeof CellSizeAndPositionManager - ScalingCellSizeAndPositionManager: typeof ScalingCellSizeAndPositionManager - Heap: typeof Heap - LinkedHashMap: typeof LinkedHashMap - LRU: typeof LRU - PrefixIntervalTree: typeof PrefixIntervalTree - Queue: typeof Queue - Section: typeof Section - Tree: typeof Tree - Vector: typeof Vector - Region: typeof Region -} +export * from "./aes"; +export * as aspect from "./aspect"; +export * from "./base64"; +export * as Cache from "./cache"; +export * from "./chinesePY"; +export * from "./events/mousemovetracker"; +export * from "./events/wheelhandler"; +export * from "./cellSizeAndPositionManager"; +export * from "./heap"; +export * from "./linkedHashMap"; +export * from "./lru"; +export * from "./prefixIntervalTree"; +export * from "./queue"; +export * from "./sectionManager"; +export * from "./tree"; +export * from "./vector"; diff --git a/packages/fineui/typescript/core/var.ts b/packages/fineui/typescript/core/var.ts index 626c8272b..d3e956ccc 100644 --- a/packages/fineui/typescript/core/var.ts +++ b/packages/fineui/typescript/core/var.ts @@ -1,133 +1,131 @@ -export interface _var { - MAX: number; - MIN: number; - EVENT_RESPONSE_TIME: number; - zIndex_layer: number; - zIndex_popover: number; - zIndex_popup: number; - zIndex_masker: number; - zIndex_tip: number; - emptyStr: string; - emptyFn: Function; - empty: null, - Key: { - 48: string; - 49: string; - 50: string; - 51: string; - 52: string; - 53: string; - 54: string; - 55: string; - 56: string; - 57: string; - 65: string; - 66: string; - 67: string; - 68: string; - 69: string; - 70: string; - 71: string; - 72: string; - 73: string; - 74: string; - 75: string; - 76: string; - 77: string; - 78: string; - 79: string; - 80: string; - 81: string; - 82: string; - 83: string; - 84: string; - 85: string; - 86: string; - 87: string; - 88: string; - 89: string; - 90: string; - 96: string; - 97: string; - 98: string; - 99: string; - 100: string; - 101: string; - 102: string; - 103: string; - 104: string; - 105: string; - 106: string; - 107: string; - 109: string; - 110: string; - 111: string; - }, - KeyCode: { - BACKSPACE: number; - COMMA: number; - DELETE: number; - DOWN: number; - END: number; - ENTER: number; - ESCAPE: number; - HOME: number; - LEFT: number; - NUMPAD_ADD: number; - NUMPAD_DECIMAL: number; - NUMPAD_DIVIDE: number; - NUMPAD_ENTER: number; - NUMPAD_MULTIPLY: number; - NUMPAD_SUBTRACT: number; - PAGE_DOWN: number; - PAGE_UP: number; - PERIOD: number; - RIGHT: number; - SPACE: number; - TAB: number; - UP: number; - }, - Status: { - SUCCESS: number; - WRONG: number; - START: number; - END: number; - WAITING: number; - READY: number; - RUNNING: number; - OUTOFBOUNDS: number; - NULL: number; - }, - Direction: { - Top: string; - Bottom: string; - Left: string; - Right: string; - Custom: string; - }, - Axis: { - Vertical: string; - Horizontal: string; - }, - Selection: { - Default: number; - None: number; - Single: number; - Multi: number; - All: number; - }, - HorizontalAlign: { - Left: string; - Right: string; - Center: string; - Stretch: string; - }, - VerticalAlign: { - Middle: string; - Top: string; - Bottom: string; - Stretch: string; - }, - StartOfWeek: number; - BlankSplitChar: string; -} +export declare const MAX: number; +export declare const MIN: number; +export declare const EVENT_RESPONSE_TIME: number; +export declare const zIndex_layer: number; +export declare const zIndex_popover: number; +export declare const zIndex_popup: number; +export declare const zIndex_masker: number; +export declare const zIndex_tip: number; +export declare const emptyStr: string; +export declare const emptyFn: Function; +export declare const empty: null; +export declare const Key: { + 48: string; + 49: string; + 50: string; + 51: string; + 52: string; + 53: string; + 54: string; + 55: string; + 56: string; + 57: string; + 65: string; + 66: string; + 67: string; + 68: string; + 69: string; + 70: string; + 71: string; + 72: string; + 73: string; + 74: string; + 75: string; + 76: string; + 77: string; + 78: string; + 79: string; + 80: string; + 81: string; + 82: string; + 83: string; + 84: string; + 85: string; + 86: string; + 87: string; + 88: string; + 89: string; + 90: string; + 96: string; + 97: string; + 98: string; + 99: string; + 100: string; + 101: string; + 102: string; + 103: string; + 104: string; + 105: string; + 106: string; + 107: string; + 109: string; + 110: string; + 111: string; +}; +export declare const KeyCode: { + BACKSPACE: number; + COMMA: number; + DELETE: number; + DOWN: number; + END: number; + ENTER: number; + ESCAPE: number; + HOME: number; + LEFT: number; + NUMPAD_ADD: number; + NUMPAD_DECIMAL: number; + NUMPAD_DIVIDE: number; + NUMPAD_ENTER: number; + NUMPAD_MULTIPLY: number; + NUMPAD_SUBTRACT: number; + PAGE_DOWN: number; + PAGE_UP: number; + PERIOD: number; + RIGHT: number; + SPACE: number; + TAB: number; + UP: number; +}; +export declare const Status: { + SUCCESS: number; + WRONG: number; + START: number; + END: number; + WAITING: number; + READY: number; + RUNNING: number; + OUTOFBOUNDS: number; + NULL: number; +}; +export declare const Direction: { + Top: string; + Bottom: string; + Left: string; + Right: string; + Custom: string; +}; +export declare const Axis: { + Vertical: string; + Horizontal: string; +}; +export declare const Selection: { + Default: number; + None: number; + Single: number; + Multi: number; + All: number; +}; +export declare const HorizontalAlign: { + Left: string; + Right: string; + Center: string; + Stretch: string; +}; +export declare const VerticalAlign: { + Middle: string; + Top: string; + Bottom: string; + Stretch: string; +}; +export declare const StartOfWeek: number; +export declare const BlankSplitChar: string; diff --git a/packages/fineui/typescript/core/widget.ts b/packages/fineui/typescript/core/widget.ts index 3cd8f175e..7ab2e84ce 100644 --- a/packages/fineui/typescript/core/widget.ts +++ b/packages/fineui/typescript/core/widget.ts @@ -1,4 +1,4 @@ -import { OB, _OB } from "./ob"; +import { OB } from "./ob"; interface RenderEngine { // TODO: 完成jquery文件夹后把这块改了 diff --git a/packages/fineui/typescript/core/worker/controller/worker.controller.ts b/packages/fineui/typescript/core/worker/controller/worker.controller.ts index 123bba98a..d4b913a13 100644 --- a/packages/fineui/typescript/core/worker/controller/worker.controller.ts +++ b/packages/fineui/typescript/core/worker/controller/worker.controller.ts @@ -1,5 +1,5 @@ -import type { IWorkerController, IWorkerMessage } from '../worker.core'; -import { WorkerChannel } from '../worker.channel'; +import type { IWorkerController, IWorkerMessage } from "../worker.core"; +import { WorkerChannel } from "../worker.channel"; /** * 通信控制器 @@ -39,7 +39,7 @@ export class WorkerBaseController implements IWorkerController { return this.channel.request(actionType, payload); } - console.error('No channel.'); + console.error("No channel."); return; } @@ -51,14 +51,14 @@ export class WorkerBaseController implements IWorkerController { * @param payload 负载 * @param [timeout] 响应的超时; Worker 通道是可靠的, 超时后只上报, 不阻止当前请求 */ - public requestPromise(actionType: string, payload: any = '', timeout?: number): Promise { + public requestPromise(actionType: string, payload: any = "", timeout?: number): Promise { // 有 Channel 实例才能进行通信, 此时还没有实例化是浏览器不支持创建 worker if (this.channel) { return this.channel.requestPromise(actionType, payload, timeout); } // 兼容上层调用的 .then().catch() - return Promise.reject(new Error('No channel.')); + return Promise.reject(new Error("No channel.")); } /** @@ -90,7 +90,7 @@ export class WorkerBaseController implements IWorkerController { // 对于 Promise 形式的结果, 需要进行 Promise 错误捕获 if (BI.isPromise(actionResult)) { - return actionResult.catch(error => Promise.reject(error)); + return actionResult.catch((error: any) => Promise.reject(error)); } // 对数据结果, 包装为 Promise @@ -111,11 +111,11 @@ export class WorkerBaseController implements IWorkerController { * @returns {() => void} 移除监听函数 */ public addOnmessageListener(onmessage: (event: any) => void): () => void { - this.worker.addEventListener('message', onmessage); + this.worker.addEventListener("message", onmessage); // 返回移除监听函数 return () => { - this.worker.removeEventListener('message', onmessage); + this.worker.removeEventListener("message", onmessage); }; } diff --git a/packages/fineui/typescript/fix/fix.ts b/packages/fineui/typescript/fix/fix.ts new file mode 100644 index 000000000..7f60d7495 --- /dev/null +++ b/packages/fineui/typescript/fix/fix.ts @@ -0,0 +1,18 @@ +declare namespace Fix { + function define(model: any): any + + function watch(model: any, expOrFn: string | Function, cb: Function, options: Obj): Function[] + + function set(target: any, key: string, val: any): void + + function del(target: any, key: string): void + + function toJSON(model: any): any + + function mixin(xtype: string, mixin: any): void + + class Model { + + } + +} diff --git a/packages/fineui/typescript/index.old.ts b/packages/fineui/typescript/index.old.ts new file mode 100644 index 000000000..b45e94dfb --- /dev/null +++ b/packages/fineui/typescript/index.old.ts @@ -0,0 +1,597 @@ +// import { Combo } from "./base/combination/combo"; +// import { ButtonGroup } from "./base/combination/group.button"; +// import { Tab } from "./base/combination/tab"; +// import { Pane } from "./base/pane"; +// import { BasicButton } from "./base/single/button/button.basic"; +// import { NodeButton } from "./base/single/button/button.node"; +// import { Button } from "./base/single/button/buttons/button"; +// import { TextButton } from "./base/single/button/buttons/button.text"; +// import { IconTextItem } from "./base/single/button/listitem/icontextitem"; +// import { Editor } from "./base/single/editor/editor"; +// import { Iframe } from "./base/single/iframe/iframe"; +// import { Checkbox } from "./base/single/input/checkbox"; +// import { Input } from "./base/single/input/input"; +// import { AbstractLabel } from "./base/single/label/abstract.label"; +// import { Label } from "./base/single/label/label"; +// import { Single } from "./base/single/single"; +// import { Text } from "./base/single/text"; +// import { Trigger } from "./base/single/trigger/trigger"; +// import { IconChangeButton } from "./case/button/icon/icon.change"; +// import { MultiSelectItem } from "./case/button/item.multiselect"; +// import { BubbleCombo } from "./case/combo/bubblecombo/combo.bubble"; +// import { TextValueCombo } from "./case/combo/combo.textvalue"; +// import { TextValueComboPopup } from "./case/combo/popup.textvalue"; +// import { SmallTextValueCombo } from "./case/combo/combo.textvaluesmall"; +// import { SearchTextValueCombo } from "./case/combo/searchtextvaluecombo/combo.searchtextvalue"; +// import { SignEditor } from "./case/editor/editor.sign"; +// import { StateEditor } from "./case/editor/editor.state"; +// import { AllValueMultiTextValueCombo } from "./component/allvaluemultitextvaluecombo/allvalue.multitextvalue.combo"; +// import { Form } from "./component/form/form"; +// import { AbstractTreeValueChooser } from "./component/treevaluechooser/abstract.treevaluechooser"; +// import { AbstractListTreeValueChooser } from "./component/treevaluechooser/abstract.treevaluechooser.list"; +// import { Action, ActionFactory } from "./core/action/action"; +// import { ShowAction } from "./core/action/action.show"; +// import { _base } from "./core/base"; +// import { Behavior, BehaviorFactory } from "./core/behavior/behavior"; +// import { HighlightBehavior } from "./core/behavior/behavior.highlight"; +// import { RedMarkBehavior } from "./core/behavior/behavior.redmark"; +// import * as decorator from "./core/decorator/decorator"; +// import { _func } from "./core/func"; +// import { _i18n } from "./core/i18n"; +// import { _Plugin } from "./core/plugin"; +// import { _var } from "./core/var"; +// import { OB } from "./core/ob"; +// import { Widget } from "./core/widget"; +// import { _inject } from "./core/inject"; +// import { Layout } from "./core/wrapper/layout"; +// import { AbsoluteLayout } from "./core/wrapper/layout/layout.absolute"; +// import { HTapeLayout, VTapeLayout } from "./core/wrapper/layout/layout.tape"; +// import { HorizontalFillLayout } from "./core/wrapper/layout/fill/fill.horizontal"; +// import { VerticalFillLayout } from "./core/wrapper/layout/fill/fill.vertical"; +// import { VerticalLayout } from "./core/wrapper/layout/layout.vertical"; +// import { DefaultLayout } from "./core/wrapper/layout/layout.default"; +// import { DownListCombo } from "./widget/downlist/combo.downlist"; +// import { DownListPopup } from "./widget/downlist/popup.downlist"; +// import { Icon } from "./base/single/icon/icon"; +// import { LeftVerticalAdaptLayout } from "./core/wrapper/layout/adapt/adapt.leftvertical"; +// import { +// LeftRightVerticalAdaptLayout, +// RightVerticalAdaptLayout, +// } from "./core/wrapper/layout/adapt/adapt.leftrightvertical"; +// import { IconTextIconItem } from "./base/single/button/listitem/icontexticonitem"; +// import { HorizontalAutoLayout } from "./core/wrapper/layout/adapt/auto.horizontal"; +// import { InlineVerticalAdaptLayout } from "./core/wrapper/layout/adapt/inline.vertical"; +// import { TableAdaptLayout } from "./core/wrapper/layout/adapt/adapt.table"; +// import { IconButton } from "./base/single/button/buttons/button.icon"; +// import { TextEditor } from "./widget/editor/editor.text"; +// import { IconLabel } from "./base/single/label/icon.label"; +// import { Popover, BarPopover } from "./base/layer/layer.popover"; +// import { IconCombo } from "./case/combo/iconcombo/combo.icon"; +// import { DynamicDateCombo } from "./widget/dynamicdate/dynamicdate.combo"; +// import { CustomTree } from "./base/tree/customtree"; +// import { ButtonTree } from "./base/combination/tree.button"; +// import { IconArrowNode } from "./case/button/node/node.icon.arrow"; +// import { MidTreeLeafItem } from "./case/button/treeitem/item.mid.treeleaf"; +// import { FirstTreeLeafItem } from "./case/button/treeitem/item.first.treeleaf"; +// import { LastTreeLeafItem } from "./case/button/treeitem/item.last.treeleaf"; +// import { SmallTextEditor } from "./widget/editor/editor.text.small"; +// import { MultifileEditor } from "./widget/editor/editor.multifile"; +// import { AbsoluteCenterLayout } from "./core/wrapper/layout/adapt/absolute.center"; +// import { HorizontalAdaptLayout } from "./core/wrapper/layout/adapt/adapt.horizontal"; +// import { FloatLeftLayout, FloatRightLayout } from "./core/wrapper/layout/layout.flow"; +// import { CenterAdaptLayout } from "./core/wrapper/layout/adapt/adapt.center"; +// import { VerticalAdaptLayout } from "./core/wrapper/layout/adapt/adapt.vertical"; +// import { MultiSelectInsertCombo } from "./widget/multiselect/multiselect.insert.combo"; +// import { MultiSelectCombo } from "./widget/multiselect/multiselect.combo"; +// import { SearchEditor } from "./widget/editor/editor.search"; +// import { MultiLayerSingleLevelTree } from "./widget/multilayersingletree/multilayersingletree.leveltree"; +// import { SimpleColorChooser } from "./case/colorchooser/colorchooser.simple"; +// import { ColorChooser } from "./case/colorchooser/colorchooser"; +// import { A } from "./base/a/a"; +// import { Html } from "./base/single/html/html"; +// import { Switcher } from "./base/combination/switcher"; +// import { Expander } from "./base/combination/expander"; +// import { Loader } from "./base/combination/loader"; +// import { ListPane } from "./case/layer/pane.list"; +// import { MultiPopupView } from "./case/layer/layer.multipopup"; +// import { MultiSelectBar } from "./case/toolbar/toolbar.multiselect"; +// import { SelectList } from "./case/list/list.select"; +// import { AbstractAllValueChooser } from "./component/allvaluechooser/abstract.allvaluechooser"; +// import { AllValueChooserCombo } from "./component/allvaluechooser/combo.allvaluechooser"; +// import { TextAreaEditor } from "./base/single/editor/editor.textarea"; +// import { SingleSelectItem } from "./case/button/item.singleselect"; +// import { DynamicDateTimeCombo } from "./widget/dynamicdatetime/dynamicdatetime.combo"; +// import { MultiTreeCombo } from "./widget/multitree/multi.tree.combo"; +// import { CenterLayout } from "./core/wrapper/layout/middle/middle.center"; +// import { VirtualGroup } from "./base/combination/group.virtual"; +// import { GridLayout } from "./core/wrapper/layout/layout.grid"; +// import { TriggerIconButton } from "./case/button/icon/icon.trigger"; +// import { Searcher } from "./base/combination/searcher"; +// import { ListTreeValueChooserInsertCombo } from "./component/treevaluechooser/combo.listtreevaluechooser"; +// import { TreeValueChooserCombo } from "./component/treevaluechooser/combo.treevaluechooser"; +// import { TreeValueChooserInsertCombo } from "./component/treevaluechooser/combo.treevaluechooser.insert"; +// import { Radio } from "./base/single/input/radio/radio"; +// import { MultiLayerSelectTreePopup } from "./widget/multilayerselecttree/multilayerselecttree.popup"; +// import { MultiLayerSingleTreePopup } from "./widget/multilayersingletree/multilayersingletree.popup"; +// import { MultiLayerDownListPopup } from "./widget/multilayerdownlist/multilayerdownlist.popup"; +// import { TreeView } from "./base/tree/ztree/treeview"; +// import { MultiTreePopup } from "./widget/multitree/multi.tree.popup"; +// import { SingleSelectRadioItem } from "./case/button/item.singleselect.radio"; +// import { SingleSelectInsertCombo } from "./widget/singleselect/singleselect.insert.combo"; +// import { SingleSelectCombo } from "./widget/singleselect/singleselect.combo"; +// import { CardLayout } from "./core/wrapper/layout/layout.card"; +// import { DynamicYearMonthCombo } from "./widget/yearmonth/combo.yearmonth"; +// import { TimeCombo } from "./widget/time/time.combo"; +// import { ListTreeView } from "./base/tree/ztree/list/listtreeview"; +// import { ListAsyncTree } from "./base/tree/ztree/list/listasynctree"; +// import { AsyncTree } from "./base/tree/ztree/asynctree"; +// import { MultiLayerSingleTreeCombo } from "./widget/multilayersingletree/multilayersingletree.combo"; +// import { MultiLayerSelectTreeCombo } from "./widget/multilayerselecttree/multilayerselecttree.combo"; +// import { MultiLayerDownListCombo } from "./widget/multilayerdownlist/multilayerdownlist.combo"; +// import { MultiTreeListCombo } from "./widget/multitree/multi.tree.list.combo"; +// import { MultiTreeInsertCombo } from "./widget/multitree/multi.tree.insert.combo"; +// import { TextValueDownListCombo } from "./widget/textvaluedownlistcombo/combo.textvaluedownlist"; +// import { Switch } from "./case/button/switch"; +// import { HorizontalLayout } from "./core/wrapper/layout/layout.horizontal"; +// import { ShelterEditor } from "./case/editor/editor.shelter"; +// import { TextTrigger } from "./case/trigger/trigger.text"; +// import { SelectTextTrigger } from "./case/trigger/trigger.text.select"; +// import { DateInterval } from "./widget/timeinterval/dateinterval"; +// import { DynamicDatePane } from "./widget/datepane/datepane"; +// import { AllCountPager } from "./case/pager/pager.all.count"; +// import { DirectionPager } from "./case/pager/pager.direction"; +// import { PopupView } from "./base/layer/layer.popup"; +// import { BubblePopupView, BubblePopupBarView, TextBubblePopupBarView } from "./case/combo/bubblecombo/popup.bubble"; +// import { ArrowTreeGroupNodeCheckbox } from "./case/checkbox/check.arrownode"; +// import { NumberInterval } from "./widget/numberinterval/numberinterval"; +// import { DynamicYearQuarterCombo } from "./widget/yearquarter/combo.yearquarter"; +// import { DynamicYearCombo } from "./widget/year/combo.year"; +// import { DynamicYearPopup } from "./widget/year/popup.year"; +// import { IntervalSlider } from "./widget/intervalslider/intervalslider"; +// import { MultiSelectInsertList } from "./widget/multiselectlist/multiselectlist.insert"; +// import { YearMonthInterval } from "./widget/yearmonthinterval/yearmonthinterval"; +// import { NumberEditor } from "./widget/numbereditor/numbereditor"; +// import { TextValueCheckCombo } from "./case/combo/textvaluecheckcombo/combo.textvaluecheck"; +// import { Segment } from "./case/segment/segment"; +// import { LinearSegment } from "./case/linersegment/linear.segment"; +// import { Img } from "./base/single/img/img"; +// import { EditorIconCheckCombo } from "./case/combo/editoriconcheckcombo/combo.editiconcheck"; +// import { IconTextValueCombo } from "./case/combo/icontextvaluecombo/combo.icontextvalue"; +// import { ListView } from "./base/list/listview"; +// import { VirtualList } from "./base/list/virtuallist"; +// import { VirtualGroupList } from "./base/list/virtualgrouplist"; +// import { FloatCenterLayout } from "./core/wrapper/layout/middle/middle.float.center"; +// import { _msg } from "./base/foundation/message"; +// import { _web } from "./core/platform/web"; +// import { DynamicYearMonthPopup } from "./widget/yearmonth/popup.yearmonth"; +// import { _utils } from "./core/utils"; +// import { Controller } from "./core/controller/controller"; +// import { LayerController } from "./core/controller/controller.layer"; +// import { DateCalendarPopup } from "./widget/date/calendar/popup.calendar.date"; +// import { Tree, Node } from "./core/utils/tree"; +// import { TextNode } from "./base/single/button/node/textnode"; +// import { TextValueCheckComboPopup } from "./case/combo/textvaluecheckcombo/popup.textvaluecheck"; +// import { ImageButton } from "./base/single/button/buttons/button.image"; +// import { History, Router } from "./router/router"; +// import { DateTimeCombo } from "./widget/datetime/datetime.combo"; +// import { FloatHorizontalLayout } from "./core/wrapper/layout/adapt/float.horizontal"; +// import { AdaptiveLayout } from "./core/wrapper/layout/layout.adaptive"; +// import { HexColorChooserPopup } from "./case/colorchooser/colorchooser.popup.hex"; +// import { BlankIconTextItem } from "./base/single/button/listitem/blankicontextitem"; +// import { Broadcasts, Layers } from "./base/base"; +// import { BroadcastController } from "./core/controller/controller.broadcast"; +// import { Pager } from "./base/pager/pager"; +// import { TimeInterval } from "./widget/timeinterval/timeinterval"; +// import { DynamicDateTimePane } from "./widget/datetimepane/datetimepane"; +// import { SingleSelectInsertList } from "./widget/singleselect/singleselectlist.insert"; +// import { MultiSelectTree } from "./widget/multiselecttree/multiselecttree"; +// import { HtmlLabel } from "./base/single/label/html.label"; +// import { TreeValueChooserPane } from "./component/treevaluechooser/pane.treevaluechooser"; +// import { TdLayout } from "./core/wrapper/layout/layout.td"; +// import { MultiLayerSelectLevelTree } from "./widget/multilayerselecttree/multilayerselecttree.leveltree"; +// import { SelectTreeExpander } from "./widget/selecttree/selecttree.expander"; +// import { DownListGroupItem } from "./widget/downlist/item.downlistgroup"; +// import { VerticalStickyLayout } from "./core/wrapper/layout/sticky/sticky.vertical"; +// import { HorizontalStickyLayout } from "./core/wrapper/layout/sticky/sticky.horizontal"; +// import { TableLayout } from "./core/wrapper/layout/layout.table"; +// import "./shims-tsx"; +// import { Workers } from "./core/worker/workers"; +// +// +// export interface BI extends _func, _i18n, _base, _inject, _var, _web, _utils { +// OB: typeof OB; +// Plugin: _Plugin; +// Widget: typeof Widget; +// Single: typeof Single; +// BasicButton: typeof BasicButton; +// NodeButton: typeof NodeButton; +// Checkbox: typeof Checkbox; +// Button: typeof Button; +// TextButton: typeof TextButton; +// IconChangeButton: typeof IconChangeButton; +// Trigger: typeof Trigger; +// Action: typeof Action; +// ActionFactory: typeof ActionFactory; +// ShowAction: typeof ShowAction; +// Controller: typeof Controller; +// Layers: Layers; +// LayerController: typeof LayerController; +// Broadcasts: Broadcasts; +// BroadcastController: typeof BroadcastController; +// Behavior: typeof Behavior; +// BehaviorFactory: typeof BehaviorFactory; +// HighlightBehavior: typeof HighlightBehavior; +// RedMarkBehavior: typeof RedMarkBehavior; +// Pane: typeof Pane; +// Tab: typeof Tab; +// ButtonGroup: typeof ButtonGroup; +// Combo: typeof Combo; +// TextValueCombo: typeof TextValueCombo; +// TextValueComboPopup: typeof TextValueComboPopup; +// SmallTextValueCombo: typeof SmallTextValueCombo; +// BubbleCombo: typeof BubbleCombo; +// AllValueMultiTextValueCombo: typeof AllValueMultiTextValueCombo; +// Form: typeof Form; +// IconTextItem: typeof IconTextItem; +// MultiSelectItem: typeof MultiSelectItem; +// AbstractLabel: typeof AbstractLabel; +// Label: typeof Label; +// Text: typeof Text; +// Editor: typeof Editor; +// SignEditor: typeof SignEditor; +// StateEditor: typeof StateEditor; +// Layout: typeof Layout; +// HTapeLayout: typeof HTapeLayout; +// VTapeLayout: typeof VTapeLayout; +// AbstractTreeValueChooser: typeof AbstractTreeValueChooser; +// AbstractListTreeValueChooser: typeof AbstractListTreeValueChooser; +// ListTreeValueChooserInsertCombo: typeof ListTreeValueChooserInsertCombo; +// TreeValueChooserCombo: typeof TreeValueChooserCombo; +// TreeValueChooserInsertCombo: typeof TreeValueChooserInsertCombo; +// MultiLayerSelectTreePopup: typeof MultiLayerSelectTreePopup; +// MultiLayerSingleTreePopup: typeof MultiLayerSingleTreePopup; +// MultiLayerDownListPopup: typeof MultiLayerDownListPopup; +// TreeView: typeof TreeView; +// ListTreeView: typeof ListTreeView; +// ListAsyncTree: typeof ListAsyncTree; +// AsyncTree: typeof AsyncTree; +// MultiLayerSingleTreeCombo: typeof MultiLayerSingleTreeCombo; +// MultiLayerSelectTreeCombo: typeof MultiLayerSelectTreeCombo; +// MultiLayerDownListCombo: typeof MultiLayerDownListCombo; +// MultiTreeListCombo: typeof MultiTreeListCombo; +// MultiTreeInsertCombo: typeof MultiTreeInsertCombo; +// Decorators: typeof decorator; +// DownListCombo: typeof DownListCombo; +// DownListPopup: typeof DownListPopup; +// Iframe: typeof Iframe; +// AbsoluteLayout: typeof AbsoluteLayout; +// HorizontalFillLayout: typeof HorizontalFillLayout; +// VerticalFillLayout: typeof VerticalFillLayout; +// VerticalLayout: typeof VerticalLayout; +// DefaultLayout: typeof DefaultLayout; +// Input: typeof Input; +// SearchTextValueCombo: typeof SearchTextValueCombo; +// Icon: typeof Icon; +// LeftVerticalAdaptLayout: typeof LeftVerticalAdaptLayout; +// LeftRightVerticalAdaptLayout: typeof LeftRightVerticalAdaptLayout; +// IconTextIconItem: typeof IconTextIconItem; +// HorizontalAutoLayout: typeof HorizontalAutoLayout; +// InlineVerticalAdaptLayout: typeof InlineVerticalAdaptLayout; +// RightVerticalAdaptLayout: typeof RightVerticalAdaptLayout; +// TableAdaptLayout: typeof TableAdaptLayout; +// AbsoluteCenterLayout: typeof AbsoluteCenterLayout; +// HorizontalAdaptLayout: typeof HorizontalAdaptLayout; +// FloatLeftLayout: typeof FloatLeftLayout; +// FloatRightLayout: typeof FloatRightLayout; +// CenterAdaptLayout: typeof CenterAdaptLayout; +// VerticalAdaptLayout: typeof VerticalAdaptLayout; +// IconButton: typeof IconButton; +// TriggerIconButton: typeof TriggerIconButton; +// Searcher: typeof Searcher; +// TextEditor: typeof TextEditor; +// Radio: typeof Radio; +// A: typeof A; +// Html: typeof Html; +// Switcher: typeof Switcher; +// Expander: typeof Expander; +// Loader: typeof Loader; +// ListPane: typeof ListPane; +// MultiPopupView: typeof MultiPopupView; +// MultiSelectBar: typeof MultiSelectBar; +// SelectList: typeof SelectList; +// IconLabel: typeof IconLabel; +// Popover: typeof Popover; +// BarPopover: typeof BarPopover; +// IconCombo: typeof IconCombo; +// DynamicDateCombo: typeof DynamicDateCombo; +// CustomTree: typeof CustomTree; +// ButtonTree: typeof ButtonTree; +// IconArrowNode: typeof IconArrowNode; +// MidTreeLeafItem: typeof MidTreeLeafItem; +// FirstTreeLeafItem: typeof FirstTreeLeafItem; +// LastTreeLeafItem: typeof LastTreeLeafItem; +// SmallTextEditor: typeof SmallTextEditor; +// MultifileEditor: typeof MultifileEditor; +// MultiSelectInsertCombo: typeof MultiSelectInsertCombo; +// MultiSelectCombo: typeof MultiSelectCombo; +// SearchEditor: typeof SearchEditor; +// MultiLayerSingleLevelTree: typeof MultiLayerSingleLevelTree; +// SimpleColorChooser: typeof SimpleColorChooser; +// ColorChooser: typeof ColorChooser; +// AbstractAllValueChooser: typeof AbstractAllValueChooser; +// AllValueChooserCombo: typeof AllValueChooserCombo; +// TextAreaEditor: typeof TextAreaEditor; +// SingleSelectItem: typeof SingleSelectItem; +// DynamicDateTimeCombo: typeof DynamicDateTimeCombo; +// MultiTreeCombo: typeof MultiTreeCombo; +// CenterLayout: typeof CenterLayout; +// VirtualGroup: typeof VirtualGroup; +// GridLayout: typeof GridLayout; +// MultiTreePopup: typeof MultiTreePopup; +// SingleSelectRadioItem: typeof SingleSelectRadioItem; +// SingleSelectInsertCombo: typeof SingleSelectInsertCombo; +// SingleSelectCombo: typeof SingleSelectCombo; +// CardLayout: typeof CardLayout; +// DynamicYearMonthCombo: typeof DynamicYearMonthCombo; +// TimeCombo: typeof TimeCombo; +// TextValueDownListCombo: typeof TextValueDownListCombo; +// Switch: typeof Switch; +// HorizontalLayout: typeof HorizontalLayout; +// ShelterEditor: typeof ShelterEditor; +// TextTrigger: typeof TextTrigger; +// SelectTextTrigger: typeof SelectTextTrigger; +// DateInterval: typeof DateInterval; +// DynamicDatePane: typeof DynamicDatePane; +// AllCountPager: typeof AllCountPager; +// DirectionPager: typeof DirectionPager; +// Pager: typeof Pager; +// PopupView: typeof PopupView; +// BubblePopupView: typeof BubblePopupView; +// BubblePopupBarView: typeof BubblePopupBarView; +// TextBubblePopupBarView: typeof TextBubblePopupBarView; +// ArrowTreeGroupNodeCheckbox: typeof ArrowTreeGroupNodeCheckbox; +// NumberInterval: typeof NumberInterval; +// DynamicYearQuarterCombo: typeof DynamicYearQuarterCombo; +// DynamicYearCombo: typeof DynamicYearCombo; +// DynamicYearPopup: typeof DynamicYearPopup; +// IntervalSlider: typeof IntervalSlider; +// MultiSelectInsertList: typeof MultiSelectInsertList; +// YearMonthInterval: typeof YearMonthInterval; +// TextValueCheckCombo: typeof TextValueCheckCombo; +// NumberEditor: typeof NumberEditor; +// Segment: typeof Segment; +// LinearSegment: typeof LinearSegment; +// Img: typeof Img; +// EditorIconCheckCombo: typeof EditorIconCheckCombo; +// IconTextValueCombo: typeof IconTextValueCombo; +// ListView: typeof ListView; +// VirtualList: typeof VirtualList; +// VirtualGroupList: typeof VirtualGroupList; +// FloatCenterLayout: typeof FloatCenterLayout; +// Msg: _msg; +// DynamicYearMonthPopup: typeof DynamicYearMonthPopup; +// DateCalendarPopup: typeof DateCalendarPopup; +// TextNode: typeof TextNode; +// TextValueCheckComboPopup: typeof TextValueCheckComboPopup; +// ImageButton: typeof ImageButton; +// Router: typeof Router; +// history: History, +// DateTimeCombo: typeof DateTimeCombo; +// FloatHorizontalLayout: typeof FloatHorizontalLayout; +// AdaptiveLayout: typeof AdaptiveLayout; +// HexColorChooserPopup: typeof HexColorChooserPopup; +// BlankIconTextItem: typeof BlankIconTextItem; +// TimeInterval: typeof TimeInterval; +// DynamicDateTimePane: typeof DynamicDateTimePane; +// SingleSelectInsertList: typeof SingleSelectInsertList; +// MultiSelectTree: typeof MultiSelectTree; +// HtmlLabel: typeof HtmlLabel; +// TreeValueChooserPane: typeof TreeValueChooserPane; +// TdLayout: typeof TdLayout; +// MultiLayerSelectLevelTree: typeof MultiLayerSelectLevelTree; +// SelectTreeExpander: typeof SelectTreeExpander; +// DownListGroupItem: typeof DownListGroupItem; +// VerticalStickyLayout: typeof VerticalStickyLayout; +// HorizontalStickyLayout: typeof HorizontalStickyLayout; +// TableLayout: typeof TableLayout; +// Workers: typeof Workers; +// } +// +// export default { +// Decorators: decorator, +// Workers, +// }; +// export { +// OB, +// Widget, +// Single, +// BasicButton, +// Checkbox, +// Icon, +// LeftVerticalAdaptLayout, +// LeftRightVerticalAdaptLayout, +// SearchTextValueCombo, +// Input, +// IconTextItem, +// AllValueMultiTextValueCombo, +// IconTextIconItem, +// Layout, +// HorizontalAutoLayout, +// InlineVerticalAdaptLayout, +// RightVerticalAdaptLayout, +// TableAdaptLayout, +// AbsoluteCenterLayout, +// HorizontalAdaptLayout, +// FloatLeftLayout, +// FloatRightLayout, +// HorizontalFillLayout, +// VerticalFillLayout, +// VerticalLayout, +// AbsoluteLayout, +// DefaultLayout, +// HTapeLayout, +// CenterAdaptLayout, +// VTapeLayout, +// VerticalAdaptLayout, +// IconButton, +// Trigger, +// TriggerIconButton, +// Action, +// ActionFactory, +// ShowAction, +// Controller, +// LayerController, +// BroadcastController, +// Behavior, +// BehaviorFactory, +// RedMarkBehavior, +// HighlightBehavior, +// Searcher, +// AbstractLabel, +// Label, +// TextButton, +// DownListCombo, +// DownListPopup, +// IconChangeButton, +// Button, +// TextEditor, +// A, +// Html, +// Switcher, +// Expander, +// BubbleCombo, +// Loader, +// ListPane, +// MultiPopupView, +// MultiSelectBar, +// SelectList, +// TextValueCombo, +// TextValueComboPopup, +// SmallTextValueCombo, +// Editor, +// IconLabel, +// Popover, +// BarPopover, +// Tab, +// AbstractTreeValueChooser, +// AbstractListTreeValueChooser, +// ListTreeValueChooserInsertCombo, +// TreeValueChooserCombo, +// TreeValueChooserInsertCombo, +// MultiLayerSelectTreePopup, +// MultiLayerSingleTreePopup, +// MultiLayerDownListPopup, +// TreeView, +// ListTreeView, +// ListAsyncTree, +// AsyncTree, +// MultiLayerSingleTreeCombo, +// MultiLayerSelectTreeCombo, +// MultiLayerDownListCombo, +// MultiTreeListCombo, +// MultiTreeInsertCombo, +// Combo, +// IconCombo, +// DynamicDateCombo, +// Radio, +// MultiSelectItem, +// CustomTree, +// ButtonGroup, +// ButtonTree, +// NodeButton, +// IconArrowNode, +// MidTreeLeafItem, +// FirstTreeLeafItem, +// LastTreeLeafItem, +// SmallTextEditor, +// MultifileEditor, +// SignEditor, +// StateEditor, +// MultiSelectInsertCombo, +// MultiSelectCombo, +// SearchEditor, +// Text, +// Pane, +// MultiLayerSingleLevelTree, +// ColorChooser, +// SimpleColorChooser, +// AbstractAllValueChooser, +// AllValueChooserCombo, +// TextAreaEditor, +// SingleSelectItem, +// DynamicDateTimeCombo, +// MultiTreeCombo, +// CenterLayout, +// VirtualGroup, +// GridLayout, +// MultiTreePopup, +// SingleSelectRadioItem, +// SingleSelectInsertCombo, +// SingleSelectCombo, +// CardLayout, +// DynamicYearMonthCombo, +// TimeCombo, +// Iframe, +// TextValueDownListCombo, +// Switch, +// HorizontalLayout, +// ShelterEditor, +// Form, +// TextTrigger, +// SelectTextTrigger, +// DateInterval, +// DynamicDatePane, +// AllCountPager, +// Pager, +// PopupView, +// BubblePopupView, +// BubblePopupBarView, +// TextBubblePopupBarView, +// ArrowTreeGroupNodeCheckbox, +// NumberInterval, +// DynamicYearQuarterCombo, +// DynamicYearCombo, +// DynamicYearPopup, +// IntervalSlider, +// MultiSelectInsertList, +// YearMonthInterval, +// TextValueCheckCombo, +// NumberEditor, +// Segment, +// LinearSegment, +// Img, +// EditorIconCheckCombo, +// IconTextValueCombo, +// ListView, +// VirtualList, +// VirtualGroupList, +// FloatCenterLayout, +// DynamicYearMonthPopup, +// DateCalendarPopup, +// Tree, +// Node, +// TextNode, +// TextValueCheckComboPopup, +// ImageButton, +// Router, +// History, +// DateTimeCombo, +// FloatHorizontalLayout, +// AdaptiveLayout, +// HexColorChooserPopup, +// BlankIconTextItem, +// TimeInterval, +// DynamicDateTimePane, +// SingleSelectInsertList, +// MultiSelectTree, +// HtmlLabel, +// TreeValueChooserPane, +// TdLayout, +// MultiLayerSelectLevelTree, +// SelectTreeExpander, +// DirectionPager, +// DownListGroupItem, +// HorizontalStickyLayout, +// VerticalStickyLayout, +// TableLayout, +// }; diff --git a/packages/fineui/typescript/index.ts b/packages/fineui/typescript/index.ts index cf63c604d..edabf6532 100644 --- a/packages/fineui/typescript/index.ts +++ b/packages/fineui/typescript/index.ts @@ -1,597 +1,211 @@ -import { Combo } from "./base/combination/combo"; -import { ButtonGroup } from "./base/combination/group.button"; -import { Tab } from "./base/combination/tab"; -import { Pane } from "./base/pane"; -import { BasicButton } from "./base/single/button/button.basic"; -import { NodeButton } from "./base/single/button/button.node"; -import { Button } from "./base/single/button/buttons/button"; -import { TextButton } from "./base/single/button/buttons/button.text"; -import { IconTextItem } from "./base/single/button/listitem/icontextitem"; -import { Editor } from "./base/single/editor/editor"; -import { Iframe } from "./base/single/iframe/iframe"; -import { Checkbox } from "./base/single/input/checkbox"; -import { Input } from "./base/single/input/input"; -import { AbstractLabel } from "./base/single/label/abstract.label"; -import { Label } from "./base/single/label/label"; -import { Single } from "./base/single/single"; -import { Text } from "./base/single/text"; -import { Trigger } from "./base/single/trigger/trigger"; -import { IconChangeButton } from "./case/button/icon/icon.change"; -import { MultiSelectItem } from "./case/button/item.multiselect"; -import { BubbleCombo } from "./case/combo/bubblecombo/combo.bubble"; -import { TextValueCombo } from "./case/combo/combo.textvalue"; -import { TextValueComboPopup } from "./case/combo/popup.textvalue"; -import { SmallTextValueCombo } from "./case/combo/combo.textvaluesmall"; -import { SearchTextValueCombo } from "./case/combo/searchtextvaluecombo/combo.searchtextvalue"; -import { SignEditor } from "./case/editor/editor.sign"; -import { StateEditor } from "./case/editor/editor.state"; -import { AllValueMultiTextValueCombo } from "./component/allvaluemultitextvaluecombo/allvalue.multitextvalue.combo"; -import { Form } from "./component/form/form"; -import { AbstractTreeValueChooser } from "./component/treevaluechooser/abstract.treevaluechooser"; -import { AbstractListTreeValueChooser } from "./component/treevaluechooser/abstract.treevaluechooser.list"; -import { Action, ActionFactory } from "./core/action/action"; -import { ShowAction } from "./core/action/action.show"; -import { _base } from "./core/base"; -import { Behavior, BehaviorFactory } from "./core/behavior/behavior"; -import { HighlightBehavior } from "./core/behavior/behavior.highlight"; -import { RedMarkBehavior } from "./core/behavior/behavior.redmark"; -import * as decorator from "./core/decorator/decorator"; -import { _func } from "./core/func"; -import { _i18n } from "./core/i18n"; -import { _Plugin } from "./core/plugin"; -import { _var } from "./core/var"; -import { OB } from "./core/ob"; -import { Widget } from "./core/widget"; -import { _inject } from "./core/inject"; -import { Layout } from "./core/wrapper/layout"; -import { AbsoluteLayout } from "./core/wrapper/layout/layout.absolute"; -import { HTapeLayout, VTapeLayout } from "./core/wrapper/layout/layout.tape"; -import { HorizontalFillLayout } from "./core/wrapper/layout/fill/fill.horizontal"; -import { VerticalFillLayout } from "./core/wrapper/layout/fill/fill.vertical"; -import { VerticalLayout } from "./core/wrapper/layout/layout.vertical"; -import { DefaultLayout } from "./core/wrapper/layout/layout.default"; -import { DownListCombo } from "./widget/downlist/combo.downlist"; -import { DownListPopup } from "./widget/downlist/popup.downlist"; -import { Icon } from "./base/single/icon/icon"; -import { LeftVerticalAdaptLayout } from "./core/wrapper/layout/adapt/adapt.leftvertical"; -import { - LeftRightVerticalAdaptLayout, - RightVerticalAdaptLayout, -} from "./core/wrapper/layout/adapt/adapt.leftrightvertical"; -import { IconTextIconItem } from "./base/single/button/listitem/icontexticonitem"; -import { HorizontalAutoLayout } from "./core/wrapper/layout/adapt/auto.horizontal"; -import { InlineVerticalAdaptLayout } from "./core/wrapper/layout/adapt/inline.vertical"; -import { TableAdaptLayout } from "./core/wrapper/layout/adapt/adapt.table"; -import { IconButton } from "./base/single/button/buttons/button.icon"; -import { TextEditor } from "./widget/editor/editor.text"; -import { IconLabel } from "./base/single/label/icon.label"; -import { Popover, BarPopover } from "./base/layer/layer.popover"; -import { IconCombo } from "./case/combo/iconcombo/combo.icon"; -import { DynamicDateCombo } from "./widget/dynamicdate/dynamicdate.combo"; -import { CustomTree } from "./base/tree/customtree"; -import { ButtonTree } from "./base/combination/tree.button"; -import { IconArrowNode } from "./case/button/node/node.icon.arrow"; -import { MidTreeLeafItem } from "./case/button/treeitem/item.mid.treeleaf"; -import { FirstTreeLeafItem } from "./case/button/treeitem/item.first.treeleaf"; -import { LastTreeLeafItem } from "./case/button/treeitem/item.last.treeleaf"; -import { SmallTextEditor } from "./widget/editor/editor.text.small"; -import { MultifileEditor } from "./widget/editor/editor.multifile"; -import { AbsoluteCenterLayout } from "./core/wrapper/layout/adapt/absolute.center"; -import { HorizontalAdaptLayout } from "./core/wrapper/layout/adapt/adapt.horizontal"; -import { FloatLeftLayout, FloatRightLayout } from "./core/wrapper/layout/layout.flow"; -import { CenterAdaptLayout } from "./core/wrapper/layout/adapt/adapt.center"; -import { VerticalAdaptLayout } from "./core/wrapper/layout/adapt/adapt.vertical"; -import { MultiSelectInsertCombo } from "./widget/multiselect/multiselect.insert.combo"; -import { MultiSelectCombo } from "./widget/multiselect/multiselect.combo"; -import { SearchEditor } from "./widget/editor/editor.search"; -import { MultiLayerSingleLevelTree } from "./widget/multilayersingletree/multilayersingletree.leveltree"; -import { SimpleColorChooser } from "./case/colorchooser/colorchooser.simple"; -import { ColorChooser } from "./case/colorchooser/colorchooser"; -import { A } from "./base/a/a"; -import { Html } from "./base/single/html/html"; -import { Switcher } from "./base/combination/switcher"; -import { Expander } from "./base/combination/expander"; -import { Loader } from "./base/combination/loader"; -import { ListPane } from "./case/layer/pane.list"; -import { MultiPopupView } from "./case/layer/layer.multipopup"; -import { MultiSelectBar } from "./case/toolbar/toolbar.multiselect"; -import { SelectList } from "./case/list/list.select"; -import { AbstractAllValueChooser } from "./component/allvaluechooser/abstract.allvaluechooser"; -import { AllValueChooserCombo } from "./component/allvaluechooser/combo.allvaluechooser"; -import { TextAreaEditor } from "./base/single/editor/editor.textarea"; -import { SingleSelectItem } from "./case/button/item.singleselect"; -import { DynamicDateTimeCombo } from "./widget/dynamicdatetime/dynamicdatetime.combo"; -import { MultiTreeCombo } from "./widget/multitree/multi.tree.combo"; -import { CenterLayout } from "./core/wrapper/layout/middle/middle.center"; -import { VirtualGroup } from "./base/combination/group.virtual"; -import { GridLayout } from "./core/wrapper/layout/layout.grid"; -import { TriggerIconButton } from "./case/button/icon/icon.trigger"; -import { Searcher } from "./base/combination/searcher"; -import { ListTreeValueChooserInsertCombo } from "./component/treevaluechooser/combo.listtreevaluechooser"; -import { TreeValueChooserCombo } from "./component/treevaluechooser/combo.treevaluechooser"; -import { TreeValueChooserInsertCombo } from "./component/treevaluechooser/combo.treevaluechooser.insert"; -import { Radio } from "./base/single/input/radio/radio"; -import { MultiLayerSelectTreePopup } from "./widget/multilayerselecttree/multilayerselecttree.popup"; -import { MultiLayerSingleTreePopup } from "./widget/multilayersingletree/multilayersingletree.popup"; -import { MultiLayerDownListPopup } from "./widget/multilayerdownlist/multilayerdownlist.popup"; -import { TreeView } from "./base/tree/ztree/treeview"; -import { MultiTreePopup } from "./widget/multitree/multi.tree.popup"; -import { SingleSelectRadioItem } from "./case/button/item.singleselect.radio"; -import { SingleSelectInsertCombo } from "./widget/singleselect/singleselect.insert.combo"; -import { SingleSelectCombo } from "./widget/singleselect/singleselect.combo"; -import { CardLayout } from "./core/wrapper/layout/layout.card"; -import { DynamicYearMonthCombo } from "./widget/yearmonth/combo.yearmonth"; -import { TimeCombo } from "./widget/time/time.combo"; -import { ListTreeView } from "./base/tree/ztree/list/listtreeview"; -import { ListAsyncTree } from "./base/tree/ztree/list/listasynctree"; -import { AsyncTree } from "./base/tree/ztree/asynctree"; -import { MultiLayerSingleTreeCombo } from "./widget/multilayersingletree/multilayersingletree.combo"; -import { MultiLayerSelectTreeCombo } from "./widget/multilayerselecttree/multilayerselecttree.combo"; -import { MultiLayerDownListCombo } from "./widget/multilayerdownlist/multilayerdownlist.combo"; -import { MultiTreeListCombo } from "./widget/multitree/multi.tree.list.combo"; -import { MultiTreeInsertCombo } from "./widget/multitree/multi.tree.insert.combo"; -import { TextValueDownListCombo } from "./widget/textvaluedownlistcombo/combo.textvaluedownlist"; -import { Switch } from "./case/button/switch"; -import { HorizontalLayout } from "./core/wrapper/layout/layout.horizontal"; -import { ShelterEditor } from "./case/editor/editor.shelter"; -import { TextTrigger } from "./case/trigger/trigger.text"; -import { SelectTextTrigger } from "./case/trigger/trigger.text.select"; -import { DateInterval } from "./widget/timeinterval/dateinterval"; -import { DynamicDatePane } from "./widget/datepane/datepane"; -import { AllCountPager } from "./case/pager/pager.all.count"; -import { DirectionPager } from "./case/pager/pager.direction"; -import { PopupView } from "./base/layer/layer.popup"; -import { BubblePopupView, BubblePopupBarView, TextBubblePopupBarView } from "./case/combo/bubblecombo/popup.bubble"; -import { ArrowTreeGroupNodeCheckbox } from "./case/checkbox/check.arrownode"; -import { NumberInterval } from "./widget/numberinterval/numberinterval"; -import { DynamicYearQuarterCombo } from "./widget/yearquarter/combo.yearquarter"; -import { DynamicYearCombo } from "./widget/year/combo.year"; -import { DynamicYearPopup } from "./widget/year/popup.year"; -import { IntervalSlider } from "./widget/intervalslider/intervalslider"; -import { MultiSelectInsertList } from "./widget/multiselectlist/multiselectlist.insert"; -import { YearMonthInterval } from "./widget/yearmonthinterval/yearmonthinterval"; -import { NumberEditor } from "./widget/numbereditor/numbereditor"; -import { TextValueCheckCombo } from "./case/combo/textvaluecheckcombo/combo.textvaluecheck"; -import { Segment } from "./case/segment/segment"; -import { LinearSegment } from "./case/linersegment/linear.segment"; -import { Img } from "./base/single/img/img"; -import { EditorIconCheckCombo } from "./case/combo/editoriconcheckcombo/combo.editiconcheck"; -import { IconTextValueCombo } from "./case/combo/icontextvaluecombo/combo.icontextvalue"; -import { ListView } from "./base/list/listview"; -import { VirtualList } from "./base/list/virtuallist"; -import { VirtualGroupList } from "./base/list/virtualgrouplist"; -import { FloatCenterLayout } from "./core/wrapper/layout/middle/middle.float.center"; -import { _msg } from "./base/foundation/message"; -import { _web } from "./core/platform/web"; -import { DynamicYearMonthPopup } from "./widget/yearmonth/popup.yearmonth"; -import { _utils } from "./core/utils"; -import { Controller } from "./core/controller/controller"; -import { LayerController } from "./core/controller/controller.layer"; -import { DateCalendarPopup } from "./widget/date/calendar/popup.calendar.date"; -import { Tree, Node } from "./core/utils/tree"; -import { TextNode } from "./base/single/button/node/textnode"; -import { TextValueCheckComboPopup } from "./case/combo/textvaluecheckcombo/popup.textvaluecheck"; -import { ImageButton } from "./base/single/button/buttons/button.image"; -import { History, Router } from "./router/router"; -import { DateTimeCombo } from "./widget/datetime/datetime.combo"; -import { FloatHorizontalLayout } from "./core/wrapper/layout/adapt/float.horizontal"; -import { AdaptiveLayout } from "./core/wrapper/layout/layout.adaptive"; -import { HexColorChooserPopup } from "./case/colorchooser/colorchooser.popup.hex"; -import { BlankIconTextItem } from "./base/single/button/listitem/blankicontextitem"; -import { Broadcasts, Layers } from "./base/base"; -import { BroadcastController } from "./core/controller/controller.broadcast"; -import { Pager } from "./base/pager/pager"; -import { TimeInterval } from "./widget/timeinterval/timeinterval"; -import { DynamicDateTimePane } from "./widget/datetimepane/datetimepane"; -import { SingleSelectInsertList } from "./widget/singleselect/singleselectlist.insert"; -import { MultiSelectTree } from "./widget/multiselecttree/multiselecttree"; -import { HtmlLabel } from "./base/single/label/html.label"; -import { TreeValueChooserPane } from "./component/treevaluechooser/pane.treevaluechooser"; -import { TdLayout } from "./core/wrapper/layout/layout.td"; -import { MultiLayerSelectLevelTree } from "./widget/multilayerselecttree/multilayerselecttree.leveltree"; -import { SelectTreeExpander } from "./widget/selecttree/selecttree.expander"; -import { DownListGroupItem } from "./widget/downlist/item.downlistgroup"; -import { VerticalStickyLayout } from "./core/wrapper/layout/sticky/sticky.vertical"; -import { HorizontalStickyLayout } from "./core/wrapper/layout/sticky/sticky.horizontal"; -import { TableLayout } from "./core/wrapper/layout/layout.table"; -import "./shims-tsx"; -import { Workers } from "./core/worker/workers"; - +export * from "./core/action/action.show"; +export * from "./core/action/action"; +export * from "./core/behavior/behavior"; +export * from "./core/behavior/behavior.highlight"; +export * from "./core/behavior/behavior.redmark"; +export * from "./core/controller/controller.broadcast"; +export * from "./core/controller/controller"; +export * from "./core/controller/controller.layer"; +export * as Decorators from "./core/decorator/decorator"; +export * from "./core/base"; +export * from "./core/i18n"; +export * from "./core/func"; +export * from "./core/inject"; +export * from "./core/ob"; +export * from "./core/plugin"; +export * from "./core/var"; +export * from "./core/widget"; +export * from "./core/utils"; +export * from "./core/platform/web"; +export * from "./core/worker/workers"; +export { Combo } from "./base/combination/combo"; +export { ButtonGroup } from "./base/combination/group.button"; +export { Tab } from "./base/combination/tab"; +export { Pane } from "./base/pane"; +export { BasicButton } from "./base/single/button/button.basic"; +export { NodeButton } from "./base/single/button/button.node"; +export { Button } from "./base/single/button/buttons/button"; +export { TextButton } from "./base/single/button/buttons/button.text"; +export { IconTextItem } from "./base/single/button/listitem/icontextitem"; +export { Editor } from "./base/single/editor/editor"; +export { Iframe } from "./base/single/iframe/iframe"; +export { Checkbox } from "./base/single/input/checkbox"; +export { Input } from "./base/single/input/input"; +export { AbstractLabel } from "./base/single/label/abstract.label"; +export { Label } from "./base/single/label/label"; +export { Single } from "./base/single/single"; +export { Text } from "./base/single/text"; +export { Trigger } from "./base/single/trigger/trigger"; +export { IconChangeButton } from "./case/button/icon/icon.change"; +export { MultiSelectItem } from "./case/button/item.multiselect"; +export { BubbleCombo } from "./case/combo/bubblecombo/combo.bubble"; +export { TextValueCombo } from "./case/combo/combo.textvalue"; +export { TextValueComboPopup } from "./case/combo/popup.textvalue"; +export { SmallTextValueCombo } from "./case/combo/combo.textvaluesmall"; +export { SearchTextValueCombo } from "./case/combo/searchtextvaluecombo/combo.searchtextvalue"; +export { SignEditor } from "./case/editor/editor.sign"; +export { StateEditor } from "./case/editor/editor.state"; +export { AllValueMultiTextValueCombo } from "./component/allvaluemultitextvaluecombo/allvalue.multitextvalue.combo"; +export { Form } from "./component/form/form"; +export { AbstractTreeValueChooser } from "./component/treevaluechooser/abstract.treevaluechooser"; +export { AbstractListTreeValueChooser } from "./component/treevaluechooser/abstract.treevaluechooser.list"; +export { Action, ActionFactory } from "./core/action/action"; +export { ShowAction } from "./core/action/action.show"; +export { Behavior, BehaviorFactory } from "./core/behavior/behavior"; +export { HighlightBehavior } from "./core/behavior/behavior.highlight"; +export { RedMarkBehavior } from "./core/behavior/behavior.redmark"; -export interface BI extends _func, _i18n, _base, _inject, _var, _web, _utils { - OB: typeof OB; - Plugin: _Plugin; - Widget: typeof Widget; - Single: typeof Single; - BasicButton: typeof BasicButton; - NodeButton: typeof NodeButton; - Checkbox: typeof Checkbox; - Button: typeof Button; - TextButton: typeof TextButton; - IconChangeButton: typeof IconChangeButton; - Trigger: typeof Trigger; - Action: typeof Action; - ActionFactory: typeof ActionFactory; - ShowAction: typeof ShowAction; - Controller: typeof Controller; - Layers: Layers; - LayerController: typeof LayerController; - Broadcasts: Broadcasts; - BroadcastController: typeof BroadcastController; - Behavior: typeof Behavior; - BehaviorFactory: typeof BehaviorFactory; - HighlightBehavior: typeof HighlightBehavior; - RedMarkBehavior: typeof RedMarkBehavior; - Pane: typeof Pane; - Tab: typeof Tab; - ButtonGroup: typeof ButtonGroup; - Combo: typeof Combo; - TextValueCombo: typeof TextValueCombo; - TextValueComboPopup: typeof TextValueComboPopup; - SmallTextValueCombo: typeof SmallTextValueCombo; - BubbleCombo: typeof BubbleCombo; - AllValueMultiTextValueCombo: typeof AllValueMultiTextValueCombo; - Form: typeof Form; - IconTextItem: typeof IconTextItem; - MultiSelectItem: typeof MultiSelectItem; - AbstractLabel: typeof AbstractLabel; - Label: typeof Label; - Text: typeof Text; - Editor: typeof Editor; - SignEditor: typeof SignEditor; - StateEditor: typeof StateEditor; - Layout: typeof Layout; - HTapeLayout: typeof HTapeLayout; - VTapeLayout: typeof VTapeLayout; - AbstractTreeValueChooser: typeof AbstractTreeValueChooser; - AbstractListTreeValueChooser: typeof AbstractListTreeValueChooser; - ListTreeValueChooserInsertCombo: typeof ListTreeValueChooserInsertCombo; - TreeValueChooserCombo: typeof TreeValueChooserCombo; - TreeValueChooserInsertCombo: typeof TreeValueChooserInsertCombo; - MultiLayerSelectTreePopup: typeof MultiLayerSelectTreePopup; - MultiLayerSingleTreePopup: typeof MultiLayerSingleTreePopup; - MultiLayerDownListPopup: typeof MultiLayerDownListPopup; - TreeView: typeof TreeView; - ListTreeView: typeof ListTreeView; - ListAsyncTree: typeof ListAsyncTree; - AsyncTree: typeof AsyncTree; - MultiLayerSingleTreeCombo: typeof MultiLayerSingleTreeCombo; - MultiLayerSelectTreeCombo: typeof MultiLayerSelectTreeCombo; - MultiLayerDownListCombo: typeof MultiLayerDownListCombo; - MultiTreeListCombo: typeof MultiTreeListCombo; - MultiTreeInsertCombo: typeof MultiTreeInsertCombo; - Decorators: typeof decorator; - DownListCombo: typeof DownListCombo; - DownListPopup: typeof DownListPopup; - Iframe: typeof Iframe; - AbsoluteLayout: typeof AbsoluteLayout; - HorizontalFillLayout: typeof HorizontalFillLayout; - VerticalFillLayout: typeof VerticalFillLayout; - VerticalLayout: typeof VerticalLayout; - DefaultLayout: typeof DefaultLayout; - Input: typeof Input; - SearchTextValueCombo: typeof SearchTextValueCombo; - Icon: typeof Icon; - LeftVerticalAdaptLayout: typeof LeftVerticalAdaptLayout; - LeftRightVerticalAdaptLayout: typeof LeftRightVerticalAdaptLayout; - IconTextIconItem: typeof IconTextIconItem; - HorizontalAutoLayout: typeof HorizontalAutoLayout; - InlineVerticalAdaptLayout: typeof InlineVerticalAdaptLayout; - RightVerticalAdaptLayout: typeof RightVerticalAdaptLayout; - TableAdaptLayout: typeof TableAdaptLayout; - AbsoluteCenterLayout: typeof AbsoluteCenterLayout; - HorizontalAdaptLayout: typeof HorizontalAdaptLayout; - FloatLeftLayout: typeof FloatLeftLayout; - FloatRightLayout: typeof FloatRightLayout; - CenterAdaptLayout: typeof CenterAdaptLayout; - VerticalAdaptLayout: typeof VerticalAdaptLayout; - IconButton: typeof IconButton; - TriggerIconButton: typeof TriggerIconButton; - Searcher: typeof Searcher; - TextEditor: typeof TextEditor; - Radio: typeof Radio; - A: typeof A; - Html: typeof Html; - Switcher: typeof Switcher; - Expander: typeof Expander; - Loader: typeof Loader; - ListPane: typeof ListPane; - MultiPopupView: typeof MultiPopupView; - MultiSelectBar: typeof MultiSelectBar; - SelectList: typeof SelectList; - IconLabel: typeof IconLabel; - Popover: typeof Popover; - BarPopover: typeof BarPopover; - IconCombo: typeof IconCombo; - DynamicDateCombo: typeof DynamicDateCombo; - CustomTree: typeof CustomTree; - ButtonTree: typeof ButtonTree; - IconArrowNode: typeof IconArrowNode; - MidTreeLeafItem: typeof MidTreeLeafItem; - FirstTreeLeafItem: typeof FirstTreeLeafItem; - LastTreeLeafItem: typeof LastTreeLeafItem; - SmallTextEditor: typeof SmallTextEditor; - MultifileEditor: typeof MultifileEditor; - MultiSelectInsertCombo: typeof MultiSelectInsertCombo; - MultiSelectCombo: typeof MultiSelectCombo; - SearchEditor: typeof SearchEditor; - MultiLayerSingleLevelTree: typeof MultiLayerSingleLevelTree; - SimpleColorChooser: typeof SimpleColorChooser; - ColorChooser: typeof ColorChooser; - AbstractAllValueChooser: typeof AbstractAllValueChooser; - AllValueChooserCombo: typeof AllValueChooserCombo; - TextAreaEditor: typeof TextAreaEditor; - SingleSelectItem: typeof SingleSelectItem; - DynamicDateTimeCombo: typeof DynamicDateTimeCombo; - MultiTreeCombo: typeof MultiTreeCombo; - CenterLayout: typeof CenterLayout; - VirtualGroup: typeof VirtualGroup; - GridLayout: typeof GridLayout; - MultiTreePopup: typeof MultiTreePopup; - SingleSelectRadioItem: typeof SingleSelectRadioItem; - SingleSelectInsertCombo: typeof SingleSelectInsertCombo; - SingleSelectCombo: typeof SingleSelectCombo; - CardLayout: typeof CardLayout; - DynamicYearMonthCombo: typeof DynamicYearMonthCombo; - TimeCombo: typeof TimeCombo; - TextValueDownListCombo: typeof TextValueDownListCombo; - Switch: typeof Switch; - HorizontalLayout: typeof HorizontalLayout; - ShelterEditor: typeof ShelterEditor; - TextTrigger: typeof TextTrigger; - SelectTextTrigger: typeof SelectTextTrigger; - DateInterval: typeof DateInterval; - DynamicDatePane: typeof DynamicDatePane; - AllCountPager: typeof AllCountPager; - DirectionPager: typeof DirectionPager; - Pager: typeof Pager; - PopupView: typeof PopupView; - BubblePopupView: typeof BubblePopupView; - BubblePopupBarView: typeof BubblePopupBarView; - TextBubblePopupBarView: typeof TextBubblePopupBarView; - ArrowTreeGroupNodeCheckbox: typeof ArrowTreeGroupNodeCheckbox; - NumberInterval: typeof NumberInterval; - DynamicYearQuarterCombo: typeof DynamicYearQuarterCombo; - DynamicYearCombo: typeof DynamicYearCombo; - DynamicYearPopup: typeof DynamicYearPopup; - IntervalSlider: typeof IntervalSlider; - MultiSelectInsertList: typeof MultiSelectInsertList; - YearMonthInterval: typeof YearMonthInterval; - TextValueCheckCombo: typeof TextValueCheckCombo; - NumberEditor: typeof NumberEditor; - Segment: typeof Segment; - LinearSegment: typeof LinearSegment; - Img: typeof Img; - EditorIconCheckCombo: typeof EditorIconCheckCombo; - IconTextValueCombo: typeof IconTextValueCombo; - ListView: typeof ListView; - VirtualList: typeof VirtualList; - VirtualGroupList: typeof VirtualGroupList; - FloatCenterLayout: typeof FloatCenterLayout; - Msg: _msg; - DynamicYearMonthPopup: typeof DynamicYearMonthPopup; - DateCalendarPopup: typeof DateCalendarPopup; - TextNode: typeof TextNode; - TextValueCheckComboPopup: typeof TextValueCheckComboPopup; - ImageButton: typeof ImageButton; - Router: typeof Router; - history: History, - DateTimeCombo: typeof DateTimeCombo; - FloatHorizontalLayout: typeof FloatHorizontalLayout; - AdaptiveLayout: typeof AdaptiveLayout; - HexColorChooserPopup: typeof HexColorChooserPopup; - BlankIconTextItem: typeof BlankIconTextItem; - TimeInterval: typeof TimeInterval; - DynamicDateTimePane: typeof DynamicDateTimePane; - SingleSelectInsertList: typeof SingleSelectInsertList; - MultiSelectTree: typeof MultiSelectTree; - HtmlLabel: typeof HtmlLabel; - TreeValueChooserPane: typeof TreeValueChooserPane; - TdLayout: typeof TdLayout; - MultiLayerSelectLevelTree: typeof MultiLayerSelectLevelTree; - SelectTreeExpander: typeof SelectTreeExpander; - DownListGroupItem: typeof DownListGroupItem; - VerticalStickyLayout: typeof VerticalStickyLayout; - HorizontalStickyLayout: typeof HorizontalStickyLayout; - TableLayout: typeof TableLayout; - Workers: typeof Workers; -} - -export default { - Decorators: decorator, - Workers, -}; +export { OB } from "./core/ob"; +export { Widget } from "./core/widget"; +export { Layout } from "./core/wrapper/layout"; +export { AbsoluteLayout } from "./core/wrapper/layout/layout.absolute"; +export { HTapeLayout, VTapeLayout } from "./core/wrapper/layout/layout.tape"; +export { HorizontalFillLayout } from "./core/wrapper/layout/fill/fill.horizontal"; +export { VerticalFillLayout } from "./core/wrapper/layout/fill/fill.vertical"; +export { VerticalLayout } from "./core/wrapper/layout/layout.vertical"; +export { DefaultLayout } from "./core/wrapper/layout/layout.default"; +export { DownListCombo } from "./widget/downlist/combo.downlist"; +export { DownListPopup } from "./widget/downlist/popup.downlist"; +export { Icon } from "./base/single/icon/icon"; +export { LeftVerticalAdaptLayout } from "./core/wrapper/layout/adapt/adapt.leftvertical"; export { - OB, - Widget, - Single, - BasicButton, - Checkbox, - Icon, - LeftVerticalAdaptLayout, LeftRightVerticalAdaptLayout, - SearchTextValueCombo, - Input, - IconTextItem, - AllValueMultiTextValueCombo, - IconTextIconItem, - Layout, - HorizontalAutoLayout, - InlineVerticalAdaptLayout, - RightVerticalAdaptLayout, - TableAdaptLayout, - AbsoluteCenterLayout, - HorizontalAdaptLayout, - FloatLeftLayout, - FloatRightLayout, - HorizontalFillLayout, - VerticalFillLayout, - VerticalLayout, - AbsoluteLayout, - DefaultLayout, - HTapeLayout, - CenterAdaptLayout, - VTapeLayout, - VerticalAdaptLayout, - IconButton, - Trigger, - TriggerIconButton, - Action, - ActionFactory, - ShowAction, - Controller, - LayerController, - BroadcastController, - Behavior, - BehaviorFactory, - RedMarkBehavior, - HighlightBehavior, - Searcher, - AbstractLabel, - Label, - TextButton, - DownListCombo, - DownListPopup, - IconChangeButton, - Button, - TextEditor, - A, - Html, - Switcher, - Expander, - BubbleCombo, - Loader, - ListPane, - MultiPopupView, - MultiSelectBar, - SelectList, - TextValueCombo, - TextValueComboPopup, - SmallTextValueCombo, - Editor, - IconLabel, - Popover, - BarPopover, - Tab, - AbstractTreeValueChooser, - AbstractListTreeValueChooser, - ListTreeValueChooserInsertCombo, - TreeValueChooserCombo, - TreeValueChooserInsertCombo, - MultiLayerSelectTreePopup, - MultiLayerSingleTreePopup, - MultiLayerDownListPopup, - TreeView, - ListTreeView, - ListAsyncTree, - AsyncTree, - MultiLayerSingleTreeCombo, - MultiLayerSelectTreeCombo, - MultiLayerDownListCombo, - MultiTreeListCombo, - MultiTreeInsertCombo, - Combo, - IconCombo, - DynamicDateCombo, - Radio, - MultiSelectItem, - CustomTree, - ButtonGroup, - ButtonTree, - NodeButton, - IconArrowNode, - MidTreeLeafItem, - FirstTreeLeafItem, - LastTreeLeafItem, - SmallTextEditor, - MultifileEditor, - SignEditor, - StateEditor, - MultiSelectInsertCombo, - MultiSelectCombo, - SearchEditor, - Text, - Pane, - MultiLayerSingleLevelTree, - ColorChooser, - SimpleColorChooser, - AbstractAllValueChooser, - AllValueChooserCombo, - TextAreaEditor, - SingleSelectItem, - DynamicDateTimeCombo, - MultiTreeCombo, - CenterLayout, - VirtualGroup, - GridLayout, - MultiTreePopup, - SingleSelectRadioItem, - SingleSelectInsertCombo, - SingleSelectCombo, - CardLayout, - DynamicYearMonthCombo, - TimeCombo, - Iframe, - TextValueDownListCombo, - Switch, - HorizontalLayout, - ShelterEditor, - Form, - TextTrigger, - SelectTextTrigger, - DateInterval, - DynamicDatePane, - AllCountPager, - Pager, - PopupView, - BubblePopupView, - BubblePopupBarView, - TextBubblePopupBarView, - ArrowTreeGroupNodeCheckbox, - NumberInterval, - DynamicYearQuarterCombo, - DynamicYearCombo, - DynamicYearPopup, - IntervalSlider, - MultiSelectInsertList, - YearMonthInterval, - TextValueCheckCombo, - NumberEditor, - Segment, - LinearSegment, - Img, - EditorIconCheckCombo, - IconTextValueCombo, - ListView, - VirtualList, - VirtualGroupList, - FloatCenterLayout, - DynamicYearMonthPopup, - DateCalendarPopup, - Tree, - Node, - TextNode, - TextValueCheckComboPopup, - ImageButton, - Router, - History, - DateTimeCombo, - FloatHorizontalLayout, - AdaptiveLayout, - HexColorChooserPopup, - BlankIconTextItem, - TimeInterval, - DynamicDateTimePane, - SingleSelectInsertList, - MultiSelectTree, - HtmlLabel, - TreeValueChooserPane, - TdLayout, - MultiLayerSelectLevelTree, - SelectTreeExpander, - DirectionPager, - DownListGroupItem, - HorizontalStickyLayout, - VerticalStickyLayout, - TableLayout, -}; + RightVerticalAdaptLayout +} from "./core/wrapper/layout/adapt/adapt.leftrightvertical"; +export { IconTextIconItem } from "./base/single/button/listitem/icontexticonitem"; +export { HorizontalAutoLayout } from "./core/wrapper/layout/adapt/auto.horizontal"; +export { InlineVerticalAdaptLayout } from "./core/wrapper/layout/adapt/inline.vertical"; +export { TableAdaptLayout } from "./core/wrapper/layout/adapt/adapt.table"; +export { IconButton } from "./base/single/button/buttons/button.icon"; +export { TextEditor } from "./widget/editor/editor.text"; +export { IconLabel } from "./base/single/label/icon.label"; +export { Popover, BarPopover } from "./base/layer/layer.popover"; +export { IconCombo } from "./case/combo/iconcombo/combo.icon"; +export { DynamicDateCombo } from "./widget/dynamicdate/dynamicdate.combo"; +export { CustomTree } from "./base/tree/customtree"; +export { ButtonTree } from "./base/combination/tree.button"; +export { IconArrowNode } from "./case/button/node/node.icon.arrow"; +export { MidTreeLeafItem } from "./case/button/treeitem/item.mid.treeleaf"; +export { FirstTreeLeafItem } from "./case/button/treeitem/item.first.treeleaf"; +export { LastTreeLeafItem } from "./case/button/treeitem/item.last.treeleaf"; +export { SmallTextEditor } from "./widget/editor/editor.text.small"; +export { MultifileEditor } from "./widget/editor/editor.multifile"; +export { AbsoluteCenterLayout } from "./core/wrapper/layout/adapt/absolute.center"; +export { HorizontalAdaptLayout } from "./core/wrapper/layout/adapt/adapt.horizontal"; +export { FloatLeftLayout, FloatRightLayout } from "./core/wrapper/layout/layout.flow"; +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 { SearchEditor } from "./widget/editor/editor.search"; +export { MultiLayerSingleLevelTree } from "./widget/multilayersingletree/multilayersingletree.leveltree"; +export { SimpleColorChooser } from "./case/colorchooser/colorchooser.simple"; +export { ColorChooser } from "./case/colorchooser/colorchooser"; +export { A } from "./base/a/a"; +export { Html } from "./base/single/html/html"; +export { Switcher } from "./base/combination/switcher"; +export { Expander } from "./base/combination/expander"; +export { Loader } from "./base/combination/loader"; +export { ListPane } from "./case/layer/pane.list"; +export { MultiPopupView } from "./case/layer/layer.multipopup"; +export { MultiSelectBar } from "./case/toolbar/toolbar.multiselect"; +export { SelectList } from "./case/list/list.select"; +export { AbstractAllValueChooser } from "./component/allvaluechooser/abstract.allvaluechooser"; +export { AllValueChooserCombo } from "./component/allvaluechooser/combo.allvaluechooser"; +export { TextAreaEditor } from "./base/single/editor/editor.textarea"; +export { SingleSelectItem } from "./case/button/item.singleselect"; +export { DynamicDateTimeCombo } from "./widget/dynamicdatetime/dynamicdatetime.combo"; +export { MultiTreeCombo } from "./widget/multitree/multi.tree.combo"; +export { CenterLayout } from "./core/wrapper/layout/middle/middle.center"; +export { VirtualGroup } from "./base/combination/group.virtual"; +export { GridLayout } from "./core/wrapper/layout/layout.grid"; +export { TriggerIconButton } from "./case/button/icon/icon.trigger"; +export { Searcher } from "./base/combination/searcher"; +export { ListTreeValueChooserInsertCombo } from "./component/treevaluechooser/combo.listtreevaluechooser"; +export { TreeValueChooserCombo } from "./component/treevaluechooser/combo.treevaluechooser"; +export { TreeValueChooserInsertCombo } from "./component/treevaluechooser/combo.treevaluechooser.insert"; +export { Radio } from "./base/single/input/radio/radio"; +export { MultiLayerSelectTreePopup } from "./widget/multilayerselecttree/multilayerselecttree.popup"; +export { MultiLayerSingleTreePopup } from "./widget/multilayersingletree/multilayersingletree.popup"; +export { MultiLayerDownListPopup } from "./widget/multilayerdownlist/multilayerdownlist.popup"; +export { TreeView } from "./base/tree/ztree/treeview"; +export { MultiTreePopup } from "./widget/multitree/multi.tree.popup"; +export { SingleSelectRadioItem } from "./case/button/item.singleselect.radio"; +export { SingleSelectInsertCombo } from "./widget/singleselect/singleselect.insert.combo"; +export { SingleSelectCombo } from "./widget/singleselect/singleselect.combo"; +export { CardLayout } from "./core/wrapper/layout/layout.card"; +export { DynamicYearMonthCombo } from "./widget/yearmonth/combo.yearmonth"; +export { TimeCombo } from "./widget/time/time.combo"; +export { ListTreeView } from "./base/tree/ztree/list/listtreeview"; +export { ListAsyncTree } from "./base/tree/ztree/list/listasynctree"; +export { AsyncTree } from "./base/tree/ztree/asynctree"; +export { MultiLayerSingleTreeCombo } from "./widget/multilayersingletree/multilayersingletree.combo"; +export { MultiLayerSelectTreeCombo } from "./widget/multilayerselecttree/multilayerselecttree.combo"; +export { MultiLayerDownListCombo } from "./widget/multilayerdownlist/multilayerdownlist.combo"; +export { MultiTreeListCombo } from "./widget/multitree/multi.tree.list.combo"; +export { MultiTreeInsertCombo } from "./widget/multitree/multi.tree.insert.combo"; +export { TextValueDownListCombo } from "./widget/textvaluedownlistcombo/combo.textvaluedownlist"; +export { Switch } from "./case/button/switch"; +export { HorizontalLayout } from "./core/wrapper/layout/layout.horizontal"; +export { ShelterEditor } from "./case/editor/editor.shelter"; +export { TextTrigger } from "./case/trigger/trigger.text"; +export { SelectTextTrigger } from "./case/trigger/trigger.text.select"; +export { DateInterval } from "./widget/timeinterval/dateinterval"; +export { DynamicDatePane } from "./widget/datepane/datepane"; +export { AllCountPager } from "./case/pager/pager.all.count"; +export { DirectionPager } from "./case/pager/pager.direction"; +export { PopupView } from "./base/layer/layer.popup"; +export { BubblePopupView, BubblePopupBarView, TextBubblePopupBarView } from "./case/combo/bubblecombo/popup.bubble"; +export { ArrowTreeGroupNodeCheckbox } from "./case/checkbox/check.arrownode"; +export { NumberInterval } from "./widget/numberinterval/numberinterval"; +export { DynamicYearQuarterCombo } from "./widget/yearquarter/combo.yearquarter"; +export { DynamicYearCombo } from "./widget/year/combo.year"; +export { DynamicYearPopup } from "./widget/year/popup.year"; +export { IntervalSlider } from "./widget/intervalslider/intervalslider"; +export { MultiSelectInsertList } from "./widget/multiselectlist/multiselectlist.insert"; +export { YearMonthInterval } from "./widget/yearmonthinterval/yearmonthinterval"; +export { NumberEditor } from "./widget/numbereditor/numbereditor"; +export { TextValueCheckCombo } from "./case/combo/textvaluecheckcombo/combo.textvaluecheck"; +export { Segment } from "./case/segment/segment"; +export { LinearSegment } from "./case/linersegment/linear.segment"; +export { Img } from "./base/single/img/img"; +export { EditorIconCheckCombo } from "./case/combo/editoriconcheckcombo/combo.editiconcheck"; +export { IconTextValueCombo } from "./case/combo/icontextvaluecombo/combo.icontextvalue"; +export { ListView } from "./base/list/listview"; +export { VirtualList } from "./base/list/virtuallist"; +export { VirtualGroupList } from "./base/list/virtualgrouplist"; +export { FloatCenterLayout } from "./core/wrapper/layout/middle/middle.float.center"; +export { Msg } from "./base/foundation/message"; +export { DynamicYearMonthPopup } from "./widget/yearmonth/popup.yearmonth"; +export { Controller } from "./core/controller/controller"; +export { LayerController } from "./core/controller/controller.layer"; +export { DateCalendarPopup } from "./widget/date/calendar/popup.calendar.date"; +export { Tree, Node } from "./core/utils/tree"; +export { TextNode } from "./base/single/button/node/textnode"; +export { TextValueCheckComboPopup } from "./case/combo/textvaluecheckcombo/popup.textvaluecheck"; +export { ImageButton } from "./base/single/button/buttons/button.image"; +export { History, Router } from "./router/router"; +export { DateTimeCombo } from "./widget/datetime/datetime.combo"; +export { FloatHorizontalLayout } from "./core/wrapper/layout/adapt/float.horizontal"; +export { AdaptiveLayout } from "./core/wrapper/layout/layout.adaptive"; +export { HexColorChooserPopup } from "./case/colorchooser/colorchooser.popup.hex"; +export { BlankIconTextItem } from "./base/single/button/listitem/blankicontextitem"; +export { Broadcasts, Layers, StyleLoaders } from "./base/base"; +export { BroadcastController } from "./core/controller/controller.broadcast"; +export { Pager } from "./base/pager/pager"; +export { TimeInterval } from "./widget/timeinterval/timeinterval"; +export { DynamicDateTimePane } from "./widget/datetimepane/datetimepane"; +export { SingleSelectInsertList } from "./widget/singleselect/singleselectlist.insert"; +export { MultiSelectTree } from "./widget/multiselecttree/multiselecttree"; +export { HtmlLabel } from "./base/single/label/html.label"; +export { TreeValueChooserPane } from "./component/treevaluechooser/pane.treevaluechooser"; +export { TdLayout } from "./core/wrapper/layout/layout.td"; +export { MultiLayerSelectLevelTree } from "./widget/multilayerselecttree/multilayerselecttree.leveltree"; +export { SelectTreeExpander } from "./widget/selecttree/selecttree.expander"; +export { DownListGroupItem } from "./widget/downlist/item.downlistgroup"; +export { VerticalStickyLayout } from "./core/wrapper/layout/sticky/sticky.vertical"; +export { HorizontalStickyLayout } from "./core/wrapper/layout/sticky/sticky.horizontal"; +export { TableLayout } from "./core/wrapper/layout/layout.table"; +export { Workers } from "./core/worker/workers"; + +import "./fix/fix"; diff --git a/packages/fineui/webpack/attachments.js b/packages/fineui/webpack/attachments.js index 57f0bbd72..ae6c8f070 100644 --- a/packages/fineui/webpack/attachments.js +++ b/packages/fineui/webpack/attachments.js @@ -1,20 +1,17 @@ const { sync, uniq } = require("./utils"); -const fixJs = "./dist/fix/fix.js"; -const fixProxyJs = "./dist/fix/fix.proxy.js"; -const fixCompact = "./dist/fix/fix.compact.js"; const workerCompact = "./dist/fix/worker.compact.js"; const lodashJs = "src/core/1.lodash.js"; const jqueryPolyfill = "./src/core/platform/web/jquery/jquery.polyfill.js"; const configJS = "./src/core/platform/web/config.js"; -const runtimePolyfill = []; +const runtimePolyfill = ["core-js/stable"]; const basicAttachmentMap = { polyfill: sync(["src/core/0.foundation.js", "src/polyfill/**/*.js"]).concat(runtimePolyfill), core: sync([ "src/less/core/**/*.less", - "src/less/theme/**/*.less", + "src/less/theme/**/*.less" // lodashJs, // jqueryJs, // "src/core/**/*.js", @@ -22,18 +19,18 @@ const basicAttachmentMap = { ]), // 最基础的控件 base: sync([ - "src/less/base/**/*.less", + "src/less/base/**/*.less" // "src/third/**/*.js", // "src/base/**/*.js", ]), // 实现好的一些基础实例 case: sync([ // "src/case/**/*.js", - "src/less/case/**/*.less", + "src/less/case/**/*.less" ]), widget: sync([ "src/less/widget/**/*.less", - "src/less/component/**/*.less", + "src/less/component/**/*.less" // "src/widget/**/*.js", // "src/component/**/*.js", ]), @@ -66,19 +63,17 @@ const basicAttachmentMap = { "src/core/utils/*.js", "i18n/i18n.cn.js", "_mobile/date.i18n.cn.js", - "src/data/**/*.js", + "src/data/**/*.js" ]), - fix: [fixJs], - fixProxy: [fixProxyJs], less: sync([ "src/less/core/**/*.less", "src/less/theme/**/*.less", "src/less/base/**/*.less", "src/less/case/**/*.less", "src/less/widget/**/*.less", - "src/less/component/**/*.less", + "src/less/component/**/*.less" ]), - js_bundle: sync(["src/bundle.js"]), + js_bundle: sync(["src/bundle.js"]) }; const bundle = [].concat( @@ -89,7 +84,7 @@ const bundle = [].concat( basicAttachmentMap.case, basicAttachmentMap.widget, sync(["public/less/app.less", "public/less/**/*.less"]), - [fixCompact, workerCompact], + [workerCompact], basicAttachmentMap.router, sync(["public/js/**/*.js", "public/js/index.js", "i18n/i18n.cn.js"]), basicAttachmentMap.ts @@ -109,7 +104,6 @@ const coreJs = [].concat( basicAttachmentMap.base, basicAttachmentMap.case, basicAttachmentMap.widget, - ["./dist/fix/fix.compact.js"], basicAttachmentMap.router, basicAttachmentMap.ts ); @@ -126,7 +120,7 @@ const bundleWithoutNormalize = [].concat( "src/less/case/**/*.less", "src/less/widget/**/*.less", "src/less/component/**/*.less", - "public/less/**/*.less", + "public/less/**/*.less" // ts的less ], ["public/less/app.less"] @@ -141,7 +135,7 @@ const fineuiWithoutNormalize = [].concat( "src/less/widget/**/*.less", "src/less/component/**/*.less", "ui/less/app.less", - "ui/less/**/*.less", + "ui/less/**/*.less" ]) ); @@ -151,7 +145,7 @@ const fineui = [].concat( basicAttachmentMap.js_bundle, basicAttachmentMap.ui, basicAttachmentMap.ts, - configJS, + configJS ); const fineuiForWorker = [].concat( @@ -168,7 +162,7 @@ const fineuiWithoutConflict = [].concat( basicAttachmentMap.case, basicAttachmentMap.widget, basicAttachmentMap.router, - [fixCompact, workerCompact], + [workerCompact], basicAttachmentMap.ui, basicAttachmentMap.ts, basicAttachmentMap.polyfill @@ -190,7 +184,7 @@ const fineuiProxy = [].concat( basicAttachmentMap.case, basicAttachmentMap.widget, basicAttachmentMap.router, - [fixCompact, workerCompact], + [workerCompact], basicAttachmentMap.ui, basicAttachmentMap.ts ); @@ -205,14 +199,12 @@ const demo = [].concat( basicAttachmentMap.widget, basicAttachmentMap.router, sync(["public/less/app.less", "public/less/**/*.less"]), - [fixCompact, workerCompact], + [workerCompact], basicAttachmentMap.ts, sync(["demo/less/*.less", "demo/less/**/*.less", "demo/app.js", "demo/js/**/*.js", "demo/config.js"]) ); module.exports = { - fix: fixJs, - fixProxy: fixProxyJs, lodash: lodashJs, font: basicAttachmentMap.font, bundle: uniq(bundle), @@ -228,5 +220,5 @@ module.exports = { coreJs: uniq(coreJs), resource: uniq(resource), config: uniq(config), - bundleCss: uniq(bundleCss), + bundleCss: uniq(bundleCss) }; From 17639a7aef4e12c8aa0c33a0802e7d3f8c7c9381 Mon Sep 17 00:00:00 2001 From: zsmj Date: Thu, 11 May 2023 11:04:54 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=97=A0JIRA=20=E5=A4=9A=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/fineui/webpack/attachments.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/fineui/webpack/attachments.js b/packages/fineui/webpack/attachments.js index ae6c8f070..cbb87e3f1 100644 --- a/packages/fineui/webpack/attachments.js +++ b/packages/fineui/webpack/attachments.js @@ -5,7 +5,7 @@ const lodashJs = "src/core/1.lodash.js"; const jqueryPolyfill = "./src/core/platform/web/jquery/jquery.polyfill.js"; const configJS = "./src/core/platform/web/config.js"; -const runtimePolyfill = ["core-js/stable"]; +const runtimePolyfill = []; const basicAttachmentMap = { polyfill: sync(["src/core/0.foundation.js", "src/polyfill/**/*.js"]).concat(runtimePolyfill),