@yongdall/web 0.4.2 → 0.4.4

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
@@ -741,10 +741,23 @@ type PageConfiguration = {
741
741
  };
742
742
  //#endregion
743
743
  //#region packages/web/route/route.d.mts
744
+ /**
745
+ * @param {PageIdent} page
746
+ * @param {...string | null | undefined} paths
747
+ * @returns {string}
748
+ */
749
+ declare function stringify$1(page: PageIdent, ...paths: (string | null | undefined)[]): string;
750
+ /**
751
+ * @param {PageIdent} page
752
+ * @param {...string | null | undefined} paths
753
+ * @returns {string}
754
+ */
755
+ declare function toHref(page: PageIdent, ...paths: (string | null | undefined)[]): string;
744
756
  type PageIdent = PageIdent.Model | PageIdent.Organization | PageIdent.User | PageIdent.Workspace | PageIdent.Page | PageIdent.Configuration;
745
757
  declare const PageIdent: {
746
758
  readonly parse: PageIdent.Parser;
747
- readonly stringify: (page: PageIdent, ...paths: (string | null | undefined)[]) => string;
759
+ readonly stringify: typeof stringify$1;
760
+ readonly toHref: typeof toHref;
748
761
  };
749
762
  declare namespace PageIdent {
750
763
  type Router = {
@@ -1029,6 +1042,7 @@ type FieldScript = {
1029
1042
  //#region packages/web/route/PageHandle.d.mts
1030
1043
  /**
1031
1044
  * @typedef {object} RootPageExt
1045
+ * @property {() => { path: string; search: string; hash: string; }} get
1032
1046
  * @property {(path: string,search: string, hash: string) => void} update
1033
1047
  */
1034
1048
  declare class PageHandle extends GeneralContext {
@@ -1146,6 +1160,11 @@ declare class PageHandle extends GeneralContext {
1146
1160
  #private;
1147
1161
  }
1148
1162
  type RootPageExt = {
1163
+ get: () => {
1164
+ path: string;
1165
+ search: string;
1166
+ hash: string;
1167
+ };
1149
1168
  update: (path: string, search: string, hash: string) => void;
1150
1169
  };
1151
1170
  //#endregion
@@ -1326,6 +1345,62 @@ type DataSource = {
1326
1345
  })[];
1327
1346
  map: Record<string, any>;
1328
1347
  model?: string | null | undefined;
1348
+ service?: {
1349
+ then<TResult1 = ModelConfiguration | null, TResult2 = never>(onfulfilled?: ((value: ModelConfiguration | null) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined): Promise<TResult1 | TResult2>;
1350
+ catch<TResult2 = never>(onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined): Promise<ModelConfiguration | TResult2 | null>;
1351
+ finally(onfinally?: (() => void) | null | undefined): Promise<ModelConfiguration | null>;
1352
+ query({
1353
+ values,
1354
+ where,
1355
+ orWhere,
1356
+ sort,
1357
+ limit,
1358
+ page,
1359
+ offset,
1360
+ select,
1361
+ total,
1362
+ primary
1363
+ }?: Search.Param): Promise<{
1364
+ documents: any[];
1365
+ total: number;
1366
+ }>;
1367
+ getOptions(): Record<string, any>[];
1368
+ /**
1369
+ * @overload
1370
+ * @param {boolean} [options]
1371
+ * @returns {Promise<Record<string, any>[]>}
1372
+ */
1373
+ options(options?: boolean | undefined): Promise<Record<string, any>[]>;
1374
+ /**
1375
+ * @overload
1376
+ * @param {Search.Param} options
1377
+ * @returns {Promise<{options: Record<string, any>[]; total: number}>}
1378
+ */
1379
+ options(options: Search.Param): Promise<{
1380
+ options: Record<string, any>[];
1381
+ total: number;
1382
+ }>;
1383
+ option(id: string | number): Promise<any>;
1384
+ create(data: Record<string, any>): Promise<any>;
1385
+ document(id: string | number): {
1386
+ then<TResult1 = Record<string, any>, TResult2 = never>(onfulfilled?: ((value: Record<string, any>) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined): Promise<TResult1 | TResult2>;
1387
+ catch<TResult2 = never>(onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined): Promise<Record<string, any> | TResult2>;
1388
+ finally(onfinally?: (() => void) | null | undefined): Promise<Record<string, any>>;
1389
+ get: () => Promise<Record<string, any>>;
1390
+ update(data: Record<string, any>): Promise<any>;
1391
+ delete(): Promise<void>;
1392
+ field(field: string): {
1393
+ then<TResult1 = any, TResult2 = never>(onfulfilled?: ((value: any) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined): Promise<TResult1 | TResult2>;
1394
+ catch<TResult2 = never>(onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined): Promise<any>;
1395
+ finally(onfinally?: (() => void) | null | undefined): Promise<any>;
1396
+ get: () => Promise<any>;
1397
+ };
1398
+ };
1399
+ loadModel: (force?: boolean) => Promise<ModelConfiguration | null>;
1400
+ loadScript: (force?: boolean) => Promise<ModelScriptConfiguration | null>;
1401
+ getModel: () => ModelConfiguration | null;
1402
+ getScript: () => ModelScriptConfiguration | null;
1403
+ } | null | undefined;
1329
1404
  where: (Search.Match | Search.Children)[];
1330
1405
  orWhere: (Search.Match | Search.Children | Search.Or)[];
1331
1406
  };
@@ -2130,10 +2205,10 @@ declare function toId(document: Record<string, any>, model: ModelConfiguration |
2130
2205
  //#region packages/web/icons/index.d.mts
2131
2206
  /**
2132
2207
  *
2133
- * @param {string} key
2208
+ * @param {string | string[]} key
2134
2209
  * @param {AbortSignal | boolean} [signal]
2135
2210
  */
2136
- declare function createIcon(key: string, signal?: AbortSignal | boolean): SVGSVGElement;
2211
+ declare function createIcon(key: string | string[], signal?: AbortSignal | boolean): SVGSVGElement;
2137
2212
  //#endregion
2138
2213
  //#region packages/web/file.d.mts
2139
2214
  /**