@yongdall/web 0.5.1 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.mts +139 -3
- package/index.mjs +14 -14
- package/index.mjs.map +1 -1
- package/package.json +2 -3
package/index.d.mts
CHANGED
|
@@ -660,7 +660,16 @@ declare class Modal extends GeneralContext {
|
|
|
660
660
|
signal?: AbortSignal | undefined;
|
|
661
661
|
parent?: HTMLElement | undefined;
|
|
662
662
|
});
|
|
663
|
+
set cancelable(cancelable: boolean | (() => boolean));
|
|
664
|
+
get cancelable(): boolean | (() => boolean);
|
|
665
|
+
set size(size: string);
|
|
666
|
+
get size(): string;
|
|
667
|
+
set maxSize(size: string);
|
|
668
|
+
get maxSize(): string;
|
|
669
|
+
set minSize(size: string);
|
|
670
|
+
get minSize(): string;
|
|
663
671
|
get container(): HTMLDivElement;
|
|
672
|
+
close(): void;
|
|
664
673
|
/**
|
|
665
674
|
* @template T
|
|
666
675
|
* @param {(dialog: this) => PromiseLike<T> | T} exec
|
|
@@ -708,6 +717,27 @@ declare function createModal(options?: {
|
|
|
708
717
|
parent?: HTMLElement | undefined;
|
|
709
718
|
} | undefined): Modal;
|
|
710
719
|
//#endregion
|
|
720
|
+
//#region packages/web/dom/createProgressModal.d.mts
|
|
721
|
+
/**
|
|
722
|
+
* @template T
|
|
723
|
+
* @template R
|
|
724
|
+
* @param {T[]} list
|
|
725
|
+
* @param {(item: T, signal: AbortSignal) => PromiseLike<R> | R} exec
|
|
726
|
+
* @param {object} [options]
|
|
727
|
+
* @param {AbortSignal} [options.signal]
|
|
728
|
+
* @param {HTMLElement} [options.parent]
|
|
729
|
+
* @param {boolean} [options.abortable]
|
|
730
|
+
* @param {string} [options.label]
|
|
731
|
+
* @param {string} [options.title]
|
|
732
|
+
*/
|
|
733
|
+
declare function createProgressModal<T, R>(list: T[], exec: (item: T, signal: AbortSignal) => PromiseLike<R> | R, options?: {
|
|
734
|
+
signal?: AbortSignal | undefined;
|
|
735
|
+
parent?: HTMLElement | undefined;
|
|
736
|
+
abortable?: boolean | undefined;
|
|
737
|
+
label?: string | undefined;
|
|
738
|
+
title?: string | undefined;
|
|
739
|
+
}): Promise<PromiseSettledResult<R>[]>;
|
|
740
|
+
//#endregion
|
|
711
741
|
//#region packages/web/dom/index.d.mts
|
|
712
742
|
declare const isMac: boolean;
|
|
713
743
|
//#endregion
|
|
@@ -750,6 +780,23 @@ declare class PageSider extends GeneralContext {
|
|
|
750
780
|
* @returns {Modal}
|
|
751
781
|
*/
|
|
752
782
|
createModal(signal?: AbortSignal | undefined): Modal;
|
|
783
|
+
/**
|
|
784
|
+
* @template T
|
|
785
|
+
* @template R
|
|
786
|
+
* @param {T[]} list
|
|
787
|
+
* @param {(item: T, signal: AbortSignal) => PromiseLike<R> | R} exec
|
|
788
|
+
* @param {object} [options]
|
|
789
|
+
* @param {AbortSignal} [options.signal]
|
|
790
|
+
* @param {boolean} [options.abortable]
|
|
791
|
+
* @param {string} [options.label]
|
|
792
|
+
* @param {string} [options.title]
|
|
793
|
+
*/
|
|
794
|
+
createProgressModal<T, R>(list: T[], exec: (item: T, signal: AbortSignal) => PromiseLike<R> | R, options?: {
|
|
795
|
+
signal?: AbortSignal | undefined;
|
|
796
|
+
abortable?: boolean | undefined;
|
|
797
|
+
label?: string | undefined;
|
|
798
|
+
title?: string | undefined;
|
|
799
|
+
}): Promise<PromiseSettledResult<R>[]>;
|
|
753
800
|
get container(): HTMLDivElement;
|
|
754
801
|
set unprintable(unprintable: boolean);
|
|
755
802
|
get unprintable(): boolean;
|
|
@@ -952,6 +999,23 @@ declare class PageHeader extends GeneralContext {
|
|
|
952
999
|
* @returns {Modal}
|
|
953
1000
|
*/
|
|
954
1001
|
createModal(signal?: AbortSignal | undefined): Modal;
|
|
1002
|
+
/**
|
|
1003
|
+
* @template T
|
|
1004
|
+
* @template R
|
|
1005
|
+
* @param {T[]} list
|
|
1006
|
+
* @param {(item: T, signal: AbortSignal) => PromiseLike<R> | R} exec
|
|
1007
|
+
* @param {object} [options]
|
|
1008
|
+
* @param {AbortSignal} [options.signal]
|
|
1009
|
+
* @param {boolean} [options.abortable]
|
|
1010
|
+
* @param {string} [options.label]
|
|
1011
|
+
* @param {string} [options.title]
|
|
1012
|
+
*/
|
|
1013
|
+
createProgressModal<T, R>(list: T[], exec: (item: T, signal: AbortSignal) => PromiseLike<R> | R, options?: {
|
|
1014
|
+
signal?: AbortSignal | undefined;
|
|
1015
|
+
abortable?: boolean | undefined;
|
|
1016
|
+
label?: string | undefined;
|
|
1017
|
+
title?: string | undefined;
|
|
1018
|
+
}): Promise<PromiseSettledResult<R>[]>;
|
|
955
1019
|
set sticky(sticky: boolean);
|
|
956
1020
|
get sticky(): boolean;
|
|
957
1021
|
set panel(panel: boolean);
|
|
@@ -1006,6 +1070,23 @@ declare class PageFooter extends GeneralContext {
|
|
|
1006
1070
|
* @returns {Modal}
|
|
1007
1071
|
*/
|
|
1008
1072
|
createModal(signal?: AbortSignal | undefined): Modal;
|
|
1073
|
+
/**
|
|
1074
|
+
* @template T
|
|
1075
|
+
* @template R
|
|
1076
|
+
* @param {T[]} list
|
|
1077
|
+
* @param {(item: T, signal: AbortSignal) => PromiseLike<R> | R} exec
|
|
1078
|
+
* @param {object} [options]
|
|
1079
|
+
* @param {AbortSignal} [options.signal]
|
|
1080
|
+
* @param {boolean} [options.abortable]
|
|
1081
|
+
* @param {string} [options.label]
|
|
1082
|
+
* @param {string} [options.title]
|
|
1083
|
+
*/
|
|
1084
|
+
createProgressModal<T, R>(list: T[], exec: (item: T, signal: AbortSignal) => PromiseLike<R> | R, options?: {
|
|
1085
|
+
signal?: AbortSignal | undefined;
|
|
1086
|
+
abortable?: boolean | undefined;
|
|
1087
|
+
label?: string | undefined;
|
|
1088
|
+
title?: string | undefined;
|
|
1089
|
+
}): Promise<PromiseSettledResult<R>[]>;
|
|
1009
1090
|
set sticky(sticky: boolean);
|
|
1010
1091
|
get sticky(): boolean;
|
|
1011
1092
|
set panel(panel: boolean);
|
|
@@ -1055,6 +1136,23 @@ declare class PageSection extends GeneralContext {
|
|
|
1055
1136
|
* @returns {Modal}
|
|
1056
1137
|
*/
|
|
1057
1138
|
createModal(signal?: AbortSignal | undefined): Modal;
|
|
1139
|
+
/**
|
|
1140
|
+
* @template T
|
|
1141
|
+
* @template R
|
|
1142
|
+
* @param {T[]} list
|
|
1143
|
+
* @param {(item: T, signal: AbortSignal) => PromiseLike<R> | R} exec
|
|
1144
|
+
* @param {object} [options]
|
|
1145
|
+
* @param {AbortSignal} [options.signal]
|
|
1146
|
+
* @param {boolean} [options.abortable]
|
|
1147
|
+
* @param {string} [options.label]
|
|
1148
|
+
* @param {string} [options.title]
|
|
1149
|
+
*/
|
|
1150
|
+
createProgressModal<T, R>(list: T[], exec: (item: T, signal: AbortSignal) => PromiseLike<R> | R, options?: {
|
|
1151
|
+
signal?: AbortSignal | undefined;
|
|
1152
|
+
abortable?: boolean | undefined;
|
|
1153
|
+
label?: string | undefined;
|
|
1154
|
+
title?: string | undefined;
|
|
1155
|
+
}): Promise<PromiseSettledResult<R>[]>;
|
|
1058
1156
|
get container(): HTMLDivElement;
|
|
1059
1157
|
set unprintable(unprintable: boolean);
|
|
1060
1158
|
get unprintable(): boolean;
|
|
@@ -1255,6 +1353,8 @@ type FieldScript = {
|
|
|
1255
1353
|
description?: ((store: Store$1) => string) | null | undefined;
|
|
1256
1354
|
placeholder?: ((store: Store$1) => string) | null | undefined;
|
|
1257
1355
|
validator?: Schema$1.Validator | Schema$1.Validator[] | null | undefined;
|
|
1356
|
+
source?: ((store?: Store$1 | null) => Iterable<Record<string, any>>) | null | undefined;
|
|
1357
|
+
filter?: ((item: Record<string, any>, store?: Store$1 | null) => boolean) | null | undefined;
|
|
1258
1358
|
};
|
|
1259
1359
|
//#endregion
|
|
1260
1360
|
//#region packages/web/route/PageHandle.d.mts
|
|
@@ -1434,6 +1534,23 @@ declare class Page {
|
|
|
1434
1534
|
* @returns {Modal}
|
|
1435
1535
|
*/
|
|
1436
1536
|
createModal(signal?: AbortSignal | undefined): Modal;
|
|
1537
|
+
/**
|
|
1538
|
+
* @template T
|
|
1539
|
+
* @template R
|
|
1540
|
+
* @param {T[]} list
|
|
1541
|
+
* @param {(item: T, signal: AbortSignal) => PromiseLike<R> | R} exec
|
|
1542
|
+
* @param {object} [options]
|
|
1543
|
+
* @param {AbortSignal} [options.signal]
|
|
1544
|
+
* @param {boolean} [options.abortable]
|
|
1545
|
+
* @param {string} [options.label]
|
|
1546
|
+
* @param {string} [options.title]
|
|
1547
|
+
*/
|
|
1548
|
+
createProgressModal<T, R>(list: T[], exec: (item: T, signal: AbortSignal) => PromiseLike<R> | R, options?: {
|
|
1549
|
+
signal?: AbortSignal | undefined;
|
|
1550
|
+
abortable?: boolean | undefined;
|
|
1551
|
+
label?: string | undefined;
|
|
1552
|
+
title?: string | undefined;
|
|
1553
|
+
}): Promise<PromiseSettledResult<R>[]>;
|
|
1437
1554
|
get destroyed(): boolean;
|
|
1438
1555
|
get container(): HTMLDivElement;
|
|
1439
1556
|
set mode(mode: "scroll" | "flex");
|
|
@@ -1588,9 +1705,11 @@ declare namespace Command {
|
|
|
1588
1705
|
* @param {any[] | Field.Source | null} [source]
|
|
1589
1706
|
* @param {string | null} [model]
|
|
1590
1707
|
* @param {Store | null} [store]
|
|
1708
|
+
* @param {((store?: Store?) => Iterable<Record<string, any>>)?} [sourceFn]
|
|
1709
|
+
* @param {((item: Record<string, any>, store?: Store?) => boolean)?} [filter]
|
|
1591
1710
|
* @returns {DataSource}
|
|
1592
1711
|
*/
|
|
1593
|
-
declare function buildDataSource(source?: any[] | Field.Source | null, model?: string | null, store?: Store$1 | null): DataSource;
|
|
1712
|
+
declare function buildDataSource(source?: any[] | Field.Source | null, model?: string | null, store?: Store$1 | null, sourceFn?: ((store?: Store$1 | null) => Iterable<Record<string, any>>) | null, filter?: ((item: Record<string, any>, store?: Store$1 | null) => boolean) | null): DataSource;
|
|
1594
1713
|
type DataSource = {
|
|
1595
1714
|
/**
|
|
1596
1715
|
* id字段(或模式)
|
|
@@ -1809,7 +1928,7 @@ interface FieldStyle {
|
|
|
1809
1928
|
design?: boolean;
|
|
1810
1929
|
}
|
|
1811
1930
|
interface FieldShowHandle {
|
|
1812
|
-
readonly root:
|
|
1931
|
+
readonly root: Element;
|
|
1813
1932
|
destroy(): void;
|
|
1814
1933
|
value: any;
|
|
1815
1934
|
}
|
|
@@ -2047,6 +2166,23 @@ declare class PageContext extends GeneralContext {
|
|
|
2047
2166
|
* @returns {Modal}
|
|
2048
2167
|
*/
|
|
2049
2168
|
createModal(signal?: AbortSignal | undefined): Modal;
|
|
2169
|
+
/**
|
|
2170
|
+
* @template T
|
|
2171
|
+
* @template R
|
|
2172
|
+
* @param {T[]} list
|
|
2173
|
+
* @param {(item: T, signal: AbortSignal) => PromiseLike<R> | R} exec
|
|
2174
|
+
* @param {object} [options]
|
|
2175
|
+
* @param {AbortSignal} [options.signal]
|
|
2176
|
+
* @param {boolean} [options.abortable]
|
|
2177
|
+
* @param {string} [options.label]
|
|
2178
|
+
* @param {string} [options.title]
|
|
2179
|
+
*/
|
|
2180
|
+
createProgressModal<T, R>(list: T[], exec: (item: T, signal: AbortSignal) => PromiseLike<R> | R, options?: {
|
|
2181
|
+
signal?: AbortSignal | undefined;
|
|
2182
|
+
abortable?: boolean | undefined;
|
|
2183
|
+
label?: string | undefined;
|
|
2184
|
+
title?: string | undefined;
|
|
2185
|
+
}): Promise<PromiseSettledResult<R>[]>;
|
|
2050
2186
|
/**
|
|
2051
2187
|
*
|
|
2052
2188
|
* @param {AbortSignal} [signal]
|
|
@@ -2951,4 +3087,4 @@ declare function updateHooks(hooks: Record<string, Hook.Define<Hooks>>): void;
|
|
|
2951
3087
|
/** @type {Hook<Hooks>} */
|
|
2952
3088
|
declare const allHooks: Hook<Hooks>;
|
|
2953
3089
|
//#endregion
|
|
2954
|
-
export { ArrayStore, Authenticator, BindObjectStore, code128_d_exports as Code128, Command, ConfiguratorComponent, ConfiguratorContext, type ContinuationDefine, CurrentPage, type DataSource, DotRequest, ErrorAlerter, FieldComponent, FieldComponentEvent, FieldComponents, FieldContext, FieldDefine, FieldFilter, FieldFilterComponent, FieldFilterContext, FieldFilterFns, FieldFilterOptions, FieldFilterStyle, type FieldScript, type FieldScriptConfiguration, FieldShowHandle, FieldStyle, FilterFns, FormFieldHook, FromRenderer, GeneralContext, type HomeContext, Hooks, IconDefine, Ident_d_exports as Ident, List, type Match, Menu, Modal, ModalFooter, ModalHeader, type ModelConfiguration, ModelIndicator, type ModelScript, type ModelScriptConfiguration, ObjectStore, Page, type PageConfiguration, type PageContext, type PageError, PageFooter, PageFrame, type PageHandle, PageHeader, PageIdent, type PageManager, type PageRenderer, PageSection, PageSectionParam, PageSider, Pagination, type Print, ResponseError, type Schema, Signal$1 as Signal, State, Store, type StoreLayout, SubmodelsLayoutEvent, Theme, User, UserHook, VerifyContext, VerifyError, type WorkspaceDefine, addManager, allHooks, application, buildDataSource, buildPlugin, createComputed, createDeeply, createDialog, createDocumentInModal, createFilters, createFrame, createIcon, createModal, createModelDefault, createQuickFilters, createShowField, createState, createStore, createStoreField, createTick, effect, enumerationsService, execScript, filterPermission, flatPermission, formLayoutsService, getAllFilterFns, getAuthorizations, getField, getFieldFilter, getFieldFilterOperators, getFilterFns, getPages, getPermissionFields, getPrimaryFields, hasField, hasFieldFilter, importStyle, importWidget, isMac, isPluginId, loadMenu, modelService, neverAbortedSignal, pathRoots, _default as permissionsService, plugins, _default$1 as renderForm, renderStore, _default$2 as renderStoreForm, request, root$1 as root, selectFile, setIcon, showDocumentInModal, showFilterDialog, start, testPermission, testPermissionConstraints, testPermissions, toFileLink, toFileURL, toId, toPermissionFilter, toSchema, toUrl, updateHooks, waitAbortSignal, watch };
|
|
3090
|
+
export { ArrayStore, Authenticator, BindObjectStore, code128_d_exports as Code128, Command, ConfiguratorComponent, ConfiguratorContext, type ContinuationDefine, CurrentPage, type DataSource, DotRequest, ErrorAlerter, FieldComponent, FieldComponentEvent, FieldComponents, FieldContext, FieldDefine, FieldFilter, FieldFilterComponent, FieldFilterContext, FieldFilterFns, FieldFilterOptions, FieldFilterStyle, type FieldScript, type FieldScriptConfiguration, FieldShowHandle, FieldStyle, FilterFns, FormFieldHook, FromRenderer, GeneralContext, type HomeContext, Hooks, IconDefine, Ident_d_exports as Ident, List, type Match, Menu, Modal, ModalFooter, ModalHeader, type ModelConfiguration, ModelIndicator, type ModelScript, type ModelScriptConfiguration, ObjectStore, Page, type PageConfiguration, type PageContext, type PageError, PageFooter, PageFrame, type PageHandle, PageHeader, PageIdent, type PageManager, type PageRenderer, PageSection, PageSectionParam, PageSider, Pagination, type Print, ResponseError, type Schema, Signal$1 as Signal, State, Store, type StoreLayout, SubmodelsLayoutEvent, Theme, User, UserHook, VerifyContext, VerifyError, type WorkspaceDefine, addManager, allHooks, application, buildDataSource, buildPlugin, createComputed, createDeeply, createDialog, createDocumentInModal, createFilters, createFrame, createIcon, createModal, createModelDefault, createProgressModal, createQuickFilters, createShowField, createState, createStore, createStoreField, createTick, effect, enumerationsService, execScript, filterPermission, flatPermission, formLayoutsService, getAllFilterFns, getAuthorizations, getField, getFieldFilter, getFieldFilterOperators, getFilterFns, getPages, getPermissionFields, getPrimaryFields, hasField, hasFieldFilter, importStyle, importWidget, isMac, isPluginId, loadMenu, modelService, neverAbortedSignal, pathRoots, _default as permissionsService, plugins, _default$1 as renderForm, renderStore, _default$2 as renderStoreForm, request, root$1 as root, selectFile, setIcon, showDocumentInModal, showFilterDialog, start, testPermission, testPermissionConstraints, testPermissions, toFileLink, toFileURL, toId, toPermissionFilter, toSchema, toUrl, updateHooks, waitAbortSignal, watch };
|