@yongdall/web 0.5.0 → 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 +143 -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;
|
|
@@ -794,6 +841,8 @@ type PageConfiguration = {
|
|
|
794
841
|
forms?: Record<string, PageForm | null> | undefined;
|
|
795
842
|
where?: Search.AndList | undefined;
|
|
796
843
|
orWhere?: Search.OrList | undefined;
|
|
844
|
+
sort?: [field: string, desc?: boolean | undefined][] | undefined;
|
|
845
|
+
limit?: number | undefined;
|
|
797
846
|
defaultQuery?: string | undefined;
|
|
798
847
|
/**
|
|
799
848
|
* // TODO: 是否分页
|
|
@@ -950,6 +999,23 @@ declare class PageHeader extends GeneralContext {
|
|
|
950
999
|
* @returns {Modal}
|
|
951
1000
|
*/
|
|
952
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>[]>;
|
|
953
1019
|
set sticky(sticky: boolean);
|
|
954
1020
|
get sticky(): boolean;
|
|
955
1021
|
set panel(panel: boolean);
|
|
@@ -1004,6 +1070,23 @@ declare class PageFooter extends GeneralContext {
|
|
|
1004
1070
|
* @returns {Modal}
|
|
1005
1071
|
*/
|
|
1006
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>[]>;
|
|
1007
1090
|
set sticky(sticky: boolean);
|
|
1008
1091
|
get sticky(): boolean;
|
|
1009
1092
|
set panel(panel: boolean);
|
|
@@ -1053,6 +1136,23 @@ declare class PageSection extends GeneralContext {
|
|
|
1053
1136
|
* @returns {Modal}
|
|
1054
1137
|
*/
|
|
1055
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>[]>;
|
|
1056
1156
|
get container(): HTMLDivElement;
|
|
1057
1157
|
set unprintable(unprintable: boolean);
|
|
1058
1158
|
get unprintable(): boolean;
|
|
@@ -1253,6 +1353,8 @@ type FieldScript = {
|
|
|
1253
1353
|
description?: ((store: Store$1) => string) | null | undefined;
|
|
1254
1354
|
placeholder?: ((store: Store$1) => string) | null | undefined;
|
|
1255
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;
|
|
1256
1358
|
};
|
|
1257
1359
|
//#endregion
|
|
1258
1360
|
//#region packages/web/route/PageHandle.d.mts
|
|
@@ -1432,6 +1534,23 @@ declare class Page {
|
|
|
1432
1534
|
* @returns {Modal}
|
|
1433
1535
|
*/
|
|
1434
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>[]>;
|
|
1435
1554
|
get destroyed(): boolean;
|
|
1436
1555
|
get container(): HTMLDivElement;
|
|
1437
1556
|
set mode(mode: "scroll" | "flex");
|
|
@@ -1586,9 +1705,11 @@ declare namespace Command {
|
|
|
1586
1705
|
* @param {any[] | Field.Source | null} [source]
|
|
1587
1706
|
* @param {string | null} [model]
|
|
1588
1707
|
* @param {Store | null} [store]
|
|
1708
|
+
* @param {((store?: Store?) => Iterable<Record<string, any>>)?} [sourceFn]
|
|
1709
|
+
* @param {((item: Record<string, any>, store?: Store?) => boolean)?} [filter]
|
|
1589
1710
|
* @returns {DataSource}
|
|
1590
1711
|
*/
|
|
1591
|
-
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;
|
|
1592
1713
|
type DataSource = {
|
|
1593
1714
|
/**
|
|
1594
1715
|
* id字段(或模式)
|
|
@@ -1701,6 +1822,8 @@ type DataSource = {
|
|
|
1701
1822
|
} | null | undefined;
|
|
1702
1823
|
where: (Search.Match | Search.Children)[];
|
|
1703
1824
|
orWhere: (Search.Match | Search.Children | Search.Or)[];
|
|
1825
|
+
sort: [field: string, desc?: boolean | undefined][];
|
|
1826
|
+
limit: number;
|
|
1704
1827
|
};
|
|
1705
1828
|
declare namespace DataSource {
|
|
1706
1829
|
type Option = {
|
|
@@ -1805,7 +1928,7 @@ interface FieldStyle {
|
|
|
1805
1928
|
design?: boolean;
|
|
1806
1929
|
}
|
|
1807
1930
|
interface FieldShowHandle {
|
|
1808
|
-
readonly root:
|
|
1931
|
+
readonly root: Element;
|
|
1809
1932
|
destroy(): void;
|
|
1810
1933
|
value: any;
|
|
1811
1934
|
}
|
|
@@ -2043,6 +2166,23 @@ declare class PageContext extends GeneralContext {
|
|
|
2043
2166
|
* @returns {Modal}
|
|
2044
2167
|
*/
|
|
2045
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>[]>;
|
|
2046
2186
|
/**
|
|
2047
2187
|
*
|
|
2048
2188
|
* @param {AbortSignal} [signal]
|
|
@@ -2947,4 +3087,4 @@ declare function updateHooks(hooks: Record<string, Hook.Define<Hooks>>): void;
|
|
|
2947
3087
|
/** @type {Hook<Hooks>} */
|
|
2948
3088
|
declare const allHooks: Hook<Hooks>;
|
|
2949
3089
|
//#endregion
|
|
2950
|
-
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 };
|