@yongdall/web 0.4.1 → 0.4.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 +74 -31
- package/index.mjs +16 -16
- package/index.mjs.map +1 -1
- package/package.json +1 -1
package/index.d.mts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as dot_request1 from "dot-request";
|
|
2
2
|
import DotRequest, { default as DotRequest$1 } from "dot-request";
|
|
3
3
|
import { ArrayStore, BindObjectStore, ObjectStore, Schema, Schema as Schema$1, Store, Store as Store$1, StoreLayout, StoreLayout as StoreLayout$1, renderStore } from "@neeloong/form";
|
|
4
|
-
import { Hook, Indicator, Plugin, Search } from "@yongdall/common";
|
|
5
4
|
import { Field, MaybePromise, Permission, Permissions } from "@yongdall/types";
|
|
5
|
+
import { Hook, Indicator, Plugin, Search } from "@yongdall/common";
|
|
6
6
|
import { Signal as Signal$1 } from "signal-polyfill";
|
|
7
|
-
export * from "@yongdall/common";
|
|
8
7
|
export * from "@yongdall/types";
|
|
8
|
+
export * from "@yongdall/common";
|
|
9
9
|
|
|
10
10
|
//#region \0rolldown/runtime.js
|
|
11
11
|
//#endregion
|
|
@@ -97,6 +97,12 @@ declare function createComputed<T>(get: () => T, set?: (newValue: T) => void): S
|
|
|
97
97
|
* @returns {T}
|
|
98
98
|
*/
|
|
99
99
|
declare function createDeeply<T extends Record<string, any>>(state: State<T>, struct: Record<string, any>): T;
|
|
100
|
+
/**
|
|
101
|
+
*
|
|
102
|
+
* @param {number} interval
|
|
103
|
+
* @param {AbortSignal} [signal]
|
|
104
|
+
*/
|
|
105
|
+
declare function createTick(interval: number, signal?: AbortSignal): State<number>;
|
|
100
106
|
type State<T> = {
|
|
101
107
|
get: () => T;
|
|
102
108
|
set: (newValue: T) => void;
|
|
@@ -597,7 +603,7 @@ declare namespace Print {
|
|
|
597
603
|
/**
|
|
598
604
|
* - 文本对齐
|
|
599
605
|
*/
|
|
600
|
-
textAlign?: "left" | "
|
|
606
|
+
textAlign?: "left" | "center" | "right" | "justify" | "start" | "end" | undefined;
|
|
601
607
|
/**
|
|
602
608
|
* - 垂直对齐
|
|
603
609
|
*/
|
|
@@ -711,7 +717,7 @@ type PageConfiguration = {
|
|
|
711
717
|
title?: string | undefined;
|
|
712
718
|
titlePattern?: string | undefined;
|
|
713
719
|
config?: Record<string, any> | undefined;
|
|
714
|
-
fields?:
|
|
720
|
+
fields?: Field.Show[] | undefined;
|
|
715
721
|
sides?: {
|
|
716
722
|
widget: string;
|
|
717
723
|
options: string;
|
|
@@ -733,16 +739,6 @@ type PageConfiguration = {
|
|
|
733
739
|
operator: string;
|
|
734
740
|
}[] | undefined;
|
|
735
741
|
};
|
|
736
|
-
declare namespace PageConfiguration {
|
|
737
|
-
type Field = {
|
|
738
|
-
field?: string | undefined;
|
|
739
|
-
label?: string | undefined;
|
|
740
|
-
width?: number | undefined;
|
|
741
|
-
pattern?: string | undefined;
|
|
742
|
-
align?: "" | "left" | "right" | "center" | undefined;
|
|
743
|
-
enableLink?: boolean | undefined;
|
|
744
|
-
};
|
|
745
|
-
}
|
|
746
742
|
//#endregion
|
|
747
743
|
//#region packages/web/route/route.d.mts
|
|
748
744
|
type PageIdent = PageIdent.Model | PageIdent.Organization | PageIdent.User | PageIdent.Workspace | PageIdent.Page | PageIdent.Configuration;
|
|
@@ -1276,7 +1272,63 @@ declare namespace Command {
|
|
|
1276
1272
|
* @returns {DataSource}
|
|
1277
1273
|
*/
|
|
1278
1274
|
declare function buildDataSource(source?: any[] | Field.Source | null, model?: string | null, store?: Store$1 | null): DataSource;
|
|
1279
|
-
type DataSource =
|
|
1275
|
+
type DataSource = {
|
|
1276
|
+
/**
|
|
1277
|
+
* id字段(或模式)
|
|
1278
|
+
*/
|
|
1279
|
+
id?: string | null | undefined;
|
|
1280
|
+
/**
|
|
1281
|
+
* 标签字段(或模式)
|
|
1282
|
+
*/
|
|
1283
|
+
label?: string | null | undefined;
|
|
1284
|
+
/**
|
|
1285
|
+
* 值字段(或模式)
|
|
1286
|
+
*/
|
|
1287
|
+
value?: string | null | undefined;
|
|
1288
|
+
/**
|
|
1289
|
+
* 父节点字段(或模式)
|
|
1290
|
+
*/
|
|
1291
|
+
parent?: string | null | undefined;
|
|
1292
|
+
/**
|
|
1293
|
+
* 子列表
|
|
1294
|
+
*/
|
|
1295
|
+
children?: string | null | undefined;
|
|
1296
|
+
/**
|
|
1297
|
+
* 序列字段
|
|
1298
|
+
*/
|
|
1299
|
+
sequence?: string | null | undefined;
|
|
1300
|
+
/**
|
|
1301
|
+
* 禁用字段
|
|
1302
|
+
*/
|
|
1303
|
+
disabled?: string | null | undefined;
|
|
1304
|
+
/**
|
|
1305
|
+
* 显示字段
|
|
1306
|
+
*/
|
|
1307
|
+
fields?: Field.Show[] | null | undefined;
|
|
1308
|
+
/**
|
|
1309
|
+
* 快速过滤字段
|
|
1310
|
+
*/
|
|
1311
|
+
queryFilters?: {
|
|
1312
|
+
field: string;
|
|
1313
|
+
label?: string;
|
|
1314
|
+
operator: string;
|
|
1315
|
+
}[] | null | undefined;
|
|
1316
|
+
/**
|
|
1317
|
+
* 字段配置信息
|
|
1318
|
+
*/
|
|
1319
|
+
configurator: any;
|
|
1320
|
+
labels: {
|
|
1321
|
+
[x: string]: string;
|
|
1322
|
+
};
|
|
1323
|
+
options: DataSource.Option[];
|
|
1324
|
+
levelTree: (DataSource.Option & {
|
|
1325
|
+
level: number;
|
|
1326
|
+
})[];
|
|
1327
|
+
map: Record<string, any>;
|
|
1328
|
+
model?: string | null | undefined;
|
|
1329
|
+
where: (Search.Match | Search.Children)[];
|
|
1330
|
+
orWhere: (Search.Match | Search.Children | Search.Or)[];
|
|
1331
|
+
};
|
|
1280
1332
|
declare namespace DataSource {
|
|
1281
1333
|
type Option = {
|
|
1282
1334
|
id: string | number;
|
|
@@ -1287,17 +1339,6 @@ declare namespace DataSource {
|
|
|
1287
1339
|
disabled?: boolean | undefined;
|
|
1288
1340
|
children: DataSource.Option[];
|
|
1289
1341
|
};
|
|
1290
|
-
type Extends = {
|
|
1291
|
-
labels: {
|
|
1292
|
-
[x: string]: string;
|
|
1293
|
-
};
|
|
1294
|
-
options: DataSource.Option[];
|
|
1295
|
-
levelTree: (DataSource.Option & {
|
|
1296
|
-
level: number;
|
|
1297
|
-
})[];
|
|
1298
|
-
map: Record<string, any>;
|
|
1299
|
-
model?: string | null | undefined;
|
|
1300
|
-
};
|
|
1301
1342
|
}
|
|
1302
1343
|
//#endregion
|
|
1303
1344
|
//#region packages/web/typesDefine.d.mts
|
|
@@ -1305,6 +1346,8 @@ interface CurrentPage {
|
|
|
1305
1346
|
title: string;
|
|
1306
1347
|
icon: string;
|
|
1307
1348
|
print: Print;
|
|
1349
|
+
unsaved: boolean;
|
|
1350
|
+
loading: boolean;
|
|
1308
1351
|
}
|
|
1309
1352
|
interface VerifyError {
|
|
1310
1353
|
focus(): void;
|
|
@@ -1347,7 +1390,7 @@ interface ConfiguratorContext extends FieldContext {
|
|
|
1347
1390
|
root: HTMLElement;
|
|
1348
1391
|
}
|
|
1349
1392
|
interface FieldComponent<T extends Record<string, any> = Record<string, any>> {
|
|
1350
|
-
(ctx: FieldContext, options?: T):
|
|
1393
|
+
(ctx: FieldContext, options?: T): Element;
|
|
1351
1394
|
}
|
|
1352
1395
|
interface ConfiguratorComponent<T extends Record<string, any> = Record<string, any>> {
|
|
1353
1396
|
(ctx: ConfiguratorContext, options?: T): void;
|
|
@@ -1876,9 +1919,9 @@ declare function showFilterDialog(modelDefine: ModelScriptConfiguration, value?:
|
|
|
1876
1919
|
* @param {FieldStyle} style
|
|
1877
1920
|
* @param {any} [renderer]
|
|
1878
1921
|
* @param {StoreLayout.Options?} [options]
|
|
1879
|
-
* @returns {
|
|
1922
|
+
* @returns {Element?}
|
|
1880
1923
|
*/
|
|
1881
|
-
declare function createStoreField(store: Store$1<any, Field | null, any>, style: FieldStyle, renderer?: any, options?: StoreLayout$1.Options | null):
|
|
1924
|
+
declare function createStoreField(store: Store$1<any, Field | null, any>, style: FieldStyle, renderer?: any, options?: StoreLayout$1.Options | null): Element | null;
|
|
1882
1925
|
//#endregion
|
|
1883
1926
|
//#region packages/web/utils/toUrl.d.mts
|
|
1884
1927
|
/**
|
|
@@ -1920,7 +1963,7 @@ declare namespace code128_d_exports {
|
|
|
1920
1963
|
*
|
|
1921
1964
|
* @param {string} text
|
|
1922
1965
|
*/
|
|
1923
|
-
declare function encode$1(text: string):
|
|
1966
|
+
declare function encode$1(text: string): (0 | 1)[];
|
|
1924
1967
|
//#endregion
|
|
1925
1968
|
//#region packages/web/script/index.d.mts
|
|
1926
1969
|
/**
|
|
@@ -2444,4 +2487,4 @@ declare function updateHooks(hooks: Record<string, Hook.Define<Hooks>>): void;
|
|
|
2444
2487
|
/** @type {Hook<Hooks>} */
|
|
2445
2488
|
declare const allHooks: Hook<Hooks>;
|
|
2446
2489
|
//#endregion
|
|
2447
|
-
export { ArrayStore, Authenticator, BindObjectStore, code128_d_exports as Code128, Command, ConfiguratorComponent, ConfiguratorContext, type ContinuationDefine, CurrentPage, type DataSource, DotRequest, 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, type ModelConfiguration, ModelIndicator, type ModelScript, type ModelScriptConfiguration, ObjectStore, Page, type PageConfiguration, type PageContext, type PageError, PageFooter, 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, createFilters, createIcon, createQuickFilters, createShowField, createState, createStore, createStoreField, effect, enumerationsService, execScript, filterPermission, formLayoutsService, getAllFilterFns, getAuthorizations, getField, getFieldFilter, getFieldFilterOperators, getFilterFns, getPages, getPermissionFields, getPrimaryFields, hasField, hasFieldFilter, importStyle, importWidget, 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, showFilterDialog, start, testPermission, testPermissionConstraints, testPermissions, toFileLink, toFileURL, toId, toSchema, toUrl, updateHooks, waitAbortSignal, watch };
|
|
2490
|
+
export { ArrayStore, Authenticator, BindObjectStore, code128_d_exports as Code128, Command, ConfiguratorComponent, ConfiguratorContext, type ContinuationDefine, CurrentPage, type DataSource, DotRequest, 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, type ModelConfiguration, ModelIndicator, type ModelScript, type ModelScriptConfiguration, ObjectStore, Page, type PageConfiguration, type PageContext, type PageError, PageFooter, 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, createFilters, createIcon, createQuickFilters, createShowField, createState, createStore, createStoreField, createTick, effect, enumerationsService, execScript, filterPermission, formLayoutsService, getAllFilterFns, getAuthorizations, getField, getFieldFilter, getFieldFilterOperators, getFilterFns, getPages, getPermissionFields, getPrimaryFields, hasField, hasFieldFilter, importStyle, importWidget, 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, showFilterDialog, start, testPermission, testPermissionConstraints, testPermissions, toFileLink, toFileURL, toId, toSchema, toUrl, updateHooks, waitAbortSignal, watch };
|