@yongdall/web 0.4.0 → 0.4.1

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 CHANGED
@@ -711,12 +711,7 @@ type PageConfiguration = {
711
711
  title?: string | undefined;
712
712
  titlePattern?: string | undefined;
713
713
  config?: Record<string, any> | undefined;
714
- fields?: {
715
- field?: string;
716
- label?: string;
717
- width?: number;
718
- pattern?: string;
719
- }[] | undefined;
714
+ fields?: PageConfiguration.Field[] | undefined;
720
715
  sides?: {
721
716
  widget: string;
722
717
  options: string;
@@ -738,6 +733,16 @@ type PageConfiguration = {
738
733
  operator: string;
739
734
  }[] | undefined;
740
735
  };
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
+ }
741
746
  //#endregion
742
747
  //#region packages/web/route/route.d.mts
743
748
  type PageIdent = PageIdent.Model | PageIdent.Organization | PageIdent.User | PageIdent.Workspace | PageIdent.Page | PageIdent.Configuration;
@@ -1022,17 +1027,7 @@ type FieldScript = {
1022
1027
  label?: ((store: Store$1) => string) | null | undefined;
1023
1028
  description?: ((store: Store$1) => string) | null | undefined;
1024
1029
  placeholder?: ((store: Store$1) => string) | null | undefined;
1025
- step?: ((store: Store$1) => string) | null | undefined;
1026
- max?: ((store: Store$1) => string) | null | undefined;
1027
- min?: ((store: Store$1) => string) | null | undefined;
1028
1030
  validator?: Schema$1.Validator | Schema$1.Validator[] | null | undefined;
1029
- validators?: {
1030
- input?: Schema$1.AsyncValidator | Schema$1.AsyncValidator[] | null | undefined;
1031
- change?: Schema$1.AsyncValidator | Schema$1.AsyncValidator[] | null | undefined;
1032
- click?: Schema$1.AsyncValidator | Schema$1.AsyncValidator[] | null | undefined;
1033
- focus?: Schema$1.AsyncValidator | Schema$1.AsyncValidator[] | null | undefined;
1034
- blur?: Schema$1.AsyncValidator | Schema$1.AsyncValidator[] | null | undefined;
1035
- } | undefined;
1036
1031
  };
1037
1032
  //#endregion
1038
1033
  //#region packages/web/route/PageHandle.d.mts
@@ -1272,9 +1267,17 @@ declare namespace Command {
1272
1267
  };
1273
1268
  }
1274
1269
  //#endregion
1275
- //#region packages/web/form/buildSource/index.d.mts
1276
- type Source = Field.Source & Source.Extends;
1277
- declare namespace Source {
1270
+ //#region packages/web/DataSource/index.d.mts
1271
+ /**
1272
+ *
1273
+ * @param {any[] | Field.Source | null} [source]
1274
+ * @param {string | null} [model]
1275
+ * @param {Store | null} [store]
1276
+ * @returns {DataSource}
1277
+ */
1278
+ declare function buildDataSource(source?: any[] | Field.Source | null, model?: string | null, store?: Store$1 | null): DataSource;
1279
+ type DataSource = Field.Source & DataSource.Extends;
1280
+ declare namespace DataSource {
1278
1281
  type Option = {
1279
1282
  id: string | number;
1280
1283
  value: string | number;
@@ -1282,18 +1285,18 @@ declare namespace Source {
1282
1285
  data: any;
1283
1286
  parentId?: string | number | undefined;
1284
1287
  disabled?: boolean | undefined;
1285
- children: Source.Option[];
1288
+ children: DataSource.Option[];
1286
1289
  };
1287
- type Load = () => State<Source.Option[]>;
1288
1290
  type Extends = {
1289
1291
  labels: {
1290
1292
  [x: string]: string;
1291
1293
  };
1292
- options: Source.Option[];
1293
- levelTree: (Source.Option & {
1294
+ options: DataSource.Option[];
1295
+ levelTree: (DataSource.Option & {
1294
1296
  level: number;
1295
1297
  })[];
1296
1298
  map: Record<string, any>;
1299
+ model?: string | null | undefined;
1297
1300
  };
1298
1301
  }
1299
1302
  //#endregion
@@ -1335,7 +1338,7 @@ interface FieldContext {
1335
1338
  readonly placeholder: string;
1336
1339
  readonly description: string;
1337
1340
  readonly signal: AbortSignal;
1338
- readonly source: Source;
1341
+ readonly source: DataSource;
1339
1342
  listen<K extends keyof FieldComponentEvent>(event: K, listen: FieldComponentEvent[K]): () => void;
1340
1343
  emit(event: string, e: any): void;
1341
1344
  readonly bind?: ((data: any) => void) | null;
@@ -1397,7 +1400,7 @@ interface FieldFilterContext {
1397
1400
  readonly operator: string;
1398
1401
  value: any;
1399
1402
  readonly signal: AbortSignal;
1400
- readonly source: Source;
1403
+ readonly source: DataSource;
1401
1404
  readonly destroyed: boolean;
1402
1405
  }
1403
1406
  interface FieldFilterComponent<T extends Record<string, any> = Record<string, any>> {
@@ -1869,13 +1872,13 @@ declare function showFilterDialog(modelDefine: ModelScriptConfiguration, value?:
1869
1872
  //#region packages/web/form/createStoreField.d.mts
1870
1873
  /**
1871
1874
  *
1872
- * @param {Store} store
1875
+ * @param {Store<any, Field?, any>} store
1873
1876
  * @param {FieldStyle} style
1874
1877
  * @param {any} [renderer]
1875
1878
  * @param {StoreLayout.Options?} [options]
1876
1879
  * @returns {HTMLElement?}
1877
1880
  */
1878
- declare function createStoreField(store: Store$1, style: FieldStyle, renderer?: any, options?: StoreLayout$1.Options | null): HTMLElement | null;
1881
+ declare function createStoreField(store: Store$1<any, Field | null, any>, style: FieldStyle, renderer?: any, options?: StoreLayout$1.Options | null): HTMLElement | null;
1879
1882
  //#endregion
1880
1883
  //#region packages/web/utils/toUrl.d.mts
1881
1884
  /**
@@ -1952,25 +1955,37 @@ declare function formLayoutsService(layout: string): {
1952
1955
  then<TResult1 = {
1953
1956
  layout: any;
1954
1957
  type?: string;
1958
+ enableLink?: boolean;
1959
+ enableLinkEditable?: boolean;
1955
1960
  } | null, TResult2 = never>(onfulfilled?: ((value: {
1956
1961
  layout: any;
1957
1962
  type?: string;
1963
+ enableLink?: boolean;
1964
+ enableLinkEditable?: boolean;
1958
1965
  } | null) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined): Promise<TResult1 | TResult2>;
1959
1966
  catch<TResult2 = never>(onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined): Promise<{
1960
1967
  layout: any;
1961
1968
  type?: string;
1969
+ enableLink?: boolean;
1970
+ enableLinkEditable?: boolean;
1962
1971
  } | TResult2 | null>;
1963
1972
  finally(onfinally?: (() => void) | null | undefined): Promise<{
1964
1973
  layout: any;
1965
1974
  type?: string;
1975
+ enableLink?: boolean;
1976
+ enableLinkEditable?: boolean;
1966
1977
  } | null>;
1967
1978
  load: (force?: boolean) => Promise<{
1968
1979
  layout: any;
1969
1980
  type?: string;
1981
+ enableLink?: boolean;
1982
+ enableLinkEditable?: boolean;
1970
1983
  } | null>;
1971
1984
  get: () => {
1972
1985
  layout: any;
1973
1986
  type?: string;
1987
+ enableLink?: boolean;
1988
+ enableLinkEditable?: boolean;
1974
1989
  } | null;
1975
1990
  };
1976
1991
  //#endregion
@@ -2429,4 +2444,4 @@ declare function updateHooks(hooks: Record<string, Hook.Define<Hooks>>): void;
2429
2444
  /** @type {Hook<Hooks>} */
2430
2445
  declare const allHooks: Hook<Hooks>;
2431
2446
  //#endregion
2432
- export { ArrayStore, Authenticator, BindObjectStore, code128_d_exports as Code128, Command, ConfiguratorComponent, ConfiguratorContext, type ContinuationDefine, CurrentPage, 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 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, type Source, State, Store, type StoreLayout, SubmodelsLayoutEvent, Theme, User, UserHook, VerifyContext, VerifyError, type WorkspaceDefine, addManager, allHooks, application, 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 };
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 };