@windwalker-io/unicorn-next 0.1.5 → 0.1.7

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.
@@ -1,4 +1,4 @@
1
- import { a as useUniDirective, x as getBoundedInstance, v as selectOne, a7 as mergeDeep, w as selectAll, ai as trans, aj as useUITheme, B as html } from "./unicorn.js";
1
+ import { a as useUniDirective, x as getBoundedInstance, v as selectOne, a7 as mergeDeep, w as selectAll, aj as trans, ak as useUITheme, B as html } from "./unicorn.js";
2
2
  const maxInt = 2147483647;
3
3
  const base = 36;
4
4
  const tMin = 1;
package/dist/index.d.ts CHANGED
@@ -31,8 +31,8 @@ import { tid } from '@lyrasoft/ts-toolkit/generic';
31
31
  import { TinyMCE } from 'tinymce';
32
32
  import { Tooltip } from 'bootstrap';
33
33
  import { uid } from '@lyrasoft/ts-toolkit/generic';
34
- import { WebDirectiveHandler } from 'web-directive/src/types';
35
- import { WebDirectiveOptions } from 'web-directive/src/types';
34
+ import { WebDirectiveHandler } from 'web-directive';
35
+ import { WebDirectiveOptions } from 'web-directive';
36
36
 
37
37
  export declare function __(id: string, ...args: any[]): string;
38
38
 
@@ -1094,6 +1094,14 @@ declare class UnicornGridElement {
1094
1094
  * Batch update items.
1095
1095
  */
1096
1096
  updateListByTask(task: string, url?: Nullable<string>, data?: Nullable<Record<string, any>>): boolean;
1097
+ /**
1098
+ * @deprecated Use updateListByTask() instead.
1099
+ */
1100
+ batch(task: string, url?: Nullable<string>, data?: Nullable<Record<string, any>>): boolean;
1101
+ /**
1102
+ * @deprecated Use updateListByTask() instead.
1103
+ */
1104
+ updateByTask(task: string, url?: Nullable<string>, data?: Nullable<Record<string, any>>): boolean;
1097
1105
  /**
1098
1106
  * Copy a row.
1099
1107
  */
@@ -1348,9 +1356,11 @@ export declare function useSystemUri(): UnicornSystemUri;
1348
1356
 
1349
1357
  export declare function useSystemUri(type: UriTypes): string;
1350
1358
 
1351
- declare function useTinymce(): Promise<TinymceModule>;
1359
+ export declare function useTinymce(): Promise<TinymceModule>;
1360
+
1361
+ export declare function useTinymce(selector?: string, options?: Record<string, any>): Promise<TinymceController>;
1352
1362
 
1353
- declare function useTinymce(selector?: string, options?: Record<string, any>): Promise<TinymceController>;
1363
+ export declare function useTinymceHook(handler: ((tinymce: TinyMCE) => MaybePromise<any>)): Promise<void>;
1354
1364
 
1355
1365
  /**
1356
1366
  * @see https://tom-select.js.org/
@@ -1394,14 +1404,16 @@ export declare function useUnicornPhpAdapter(app?: UnicornApp): {
1394
1404
  };
1395
1405
  };
1396
1406
 
1397
- export declare function useUniDirective<T extends Element = HTMLElement>(name: string, handler: WebDirectiveHandler<T>, wdInstance?: default_3 | string): Promise<void>;
1407
+ export declare function useUniDirective<T extends Element = HTMLElement, M extends Record<string, boolean> = Record<string, boolean>>(name: string, handler: WebDirectiveHandler<T, M>, wdInstance?: default_3 | string): Promise<void>;
1398
1408
 
1399
1409
  /**
1400
1410
  * Vue component field.
1401
1411
  */
1402
1412
  export declare function useVueComponentField(selector?: Nullable<string | HTMLElement>, value?: any, options?: Record<string, any>): Promise<any>;
1403
1413
 
1404
- export declare function useWebDirective(name?: string, options?: Partial<WebDirectiveOptions>): Promise<default_3>;
1414
+ export declare function useWebDirective(name: string, options: false): Promise<void>;
1415
+
1416
+ export declare function useWebDirective(name: string, options?: Partial<WebDirectiveOptions>): Promise<default_3>;
1405
1417
 
1406
1418
  export declare type ValidationHandler<V = any, E = HTMLElement, P = Record<string, any>> = (value: V, input: E, options?: ValidatorOptions<E, P>, fv?: UnicornFieldValidation) => any;
1407
1419
 
@@ -1457,10 +1469,6 @@ declare module '@windwalker-io/unicorn-next' {
1457
1469
  }
1458
1470
  }
1459
1471
 
1460
- declare global {
1461
- var S: any;
1462
- }
1463
-
1464
1472
 
1465
1473
  declare module 'axios' {
1466
1474
  interface AxiosRequestConfig {
@@ -1472,14 +1480,18 @@ declare module 'axios' {
1472
1480
  }
1473
1481
  }
1474
1482
 
1475
-
1476
1483
  declare global {
1477
- export interface Window {
1478
- bootstrap: typeof bootstrap;
1479
- }
1484
+ var S: any;
1480
1485
  }
1481
1486
 
1482
1487
 
1483
1488
  declare global {
1484
1489
  var tinymce: TinyMCE;
1485
1490
  }
1491
+
1492
+
1493
+ declare global {
1494
+ export interface Window {
1495
+ bootstrap: typeof bootstrap;
1496
+ }
1497
+ }
package/dist/unicorn.js CHANGED
@@ -1,9 +1,9 @@
1
- import { aw, ag, aJ, b5, aI, aF, _, h, aM, aK, aH, b, J, I, aO, d, e, ah, b1, am, an, ac, D, C, ae, aA, t, T, S, ad, x, y, A, aL, U, B, f, a8, i, l, N, z, ax, aN, p, a6, aq, au, av, at, c, r, w, v, M, G, F, s, al, Q, R, P, E, L, ai, K, aD, q, a0, $, a1, Y, V, ab, aC, X, W, aP, aQ, aR, aS, aT, aU, aV, j, a4, a2, aW, g, k, a5, a3, aX, u, aY, aa, ap, Z, az, as, aZ, ar, n, a$, a_, ak, aB, b0, m, o, O, aE, b2, aj, a, ao, b4, aG, b3, ay, a9 } from "./chunks/unicorn.js";
1
+ import { aw, ag, aJ, b7, aI, aF, _, h, aM, aK, aH, b, J, I, aO, d, e, ah, b1, am, an, ac, D, C, ae, aA, t, T, S, ad, x, y, A, aL, U, B, f, a8, i, l, N, z, ax, aN, p, a6, aq, au, av, at, c, r, w, v, M, G, F, s, al, Q, R, P, E, L, aj, K, aD, q, a0, $, a1, Y, V, ab, aC, X, W, aP, aQ, aR, aS, aT, aU, aV, j, a4, a2, aW, g, k, a5, a3, aX, u, aY, aa, ap, Z, az, as, aZ, ar, n, a$, a_, ai, aB, b0, m, o, b2, b3, O, aE, b4, ak, a, ao, b6, aG, b5, ay, a9 } from "./chunks/unicorn.js";
2
2
  export {
3
3
  aw as AttributeMutationObserver,
4
4
  ag as EventMixin,
5
5
  aJ as UnicornAssetUri,
6
- b5 as UnicornPhpAdapter,
6
+ b7 as UnicornPhpAdapter,
7
7
  aI as UnicornSystemUri,
8
8
  aF as UnicornUI,
9
9
  _ as __,
@@ -64,7 +64,7 @@ export {
64
64
  P as slideUp,
65
65
  E as throttle,
66
66
  L as tid,
67
- ai as trans,
67
+ aj as trans,
68
68
  K as uid,
69
69
  aD as useAlertAdapter,
70
70
  q as useAssetUri,
@@ -105,20 +105,22 @@ export {
105
105
  n as useQueue,
106
106
  a$ as useS3MultipartUploader,
107
107
  a_ as useS3Uploader,
108
- ak as useScriptImport,
108
+ ai as useScriptImport,
109
109
  aB as useSeriesImport,
110
110
  b0 as useShowOn,
111
111
  m as useStack,
112
112
  o as useSystemUri,
113
+ b2 as useTinymce,
114
+ b3 as useTinymceHook,
113
115
  O as useTomSelect,
114
116
  aE as useUI,
115
- b2 as useUIBootstrap5,
116
- aj as useUITheme,
117
+ b4 as useUIBootstrap5,
118
+ ak as useUITheme,
117
119
  a as useUniDirective,
118
120
  ao as useUnicorn,
119
- b4 as useUnicornPhpAdapter,
121
+ b6 as useUnicornPhpAdapter,
120
122
  aG as useVueComponentField,
121
- b3 as useWebDirective,
123
+ b5 as useWebDirective,
122
124
  ay as wait,
123
125
  a9 as watchAttributes
124
126
  };