@mono-lit/utility 0.0.0-stage → 0.0.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.
Files changed (54) hide show
  1. package/LICENSE.md +54 -0
  2. package/README.md +157 -3
  3. package/dist/app-roots-CvJnmXcs.js +128 -0
  4. package/dist/app-roots-DK41xMWj.d.ts +90 -0
  5. package/dist/config-node-UzJrXg0Z.js +76 -0
  6. package/dist/config-node.d.ts +923 -0
  7. package/dist/config-node.js +7 -0
  8. package/dist/config.d.ts +2 -0
  9. package/dist/config.js +3 -0
  10. package/dist/create-config-B8IhX4ht.d.ts +735 -0
  11. package/dist/create-config-DdL3Fh6T.js +357 -0
  12. package/dist/fetching.d.ts +244 -0
  13. package/dist/fetching.js +1015 -0
  14. package/dist/generate-CJ7MtcDd.js +291 -0
  15. package/dist/index-BAy6tbOG.d.ts +371 -0
  16. package/dist/index-DYlzhHq7.d.ts +514 -0
  17. package/dist/index.d.ts +25 -0
  18. package/dist/index.js +941 -0
  19. package/dist/merge-file-CLc3wxY4.d.ts +99 -0
  20. package/dist/merge-file-CtyKTu5L.js +133 -0
  21. package/dist/mock-db-4tTWrF-P.js +1282 -0
  22. package/dist/mock-db.d.ts +2 -0
  23. package/dist/mock-db.js +4 -0
  24. package/dist/mono-alias-DNDm-jB_.js +508 -0
  25. package/dist/mono-clone.mjs +958 -0
  26. package/dist/mono-db.d.ts +1 -0
  27. package/dist/mono-db.js +158 -0
  28. package/dist/mono-env.mjs +231 -0
  29. package/dist/mono-git.mjs +798 -0
  30. package/dist/mono-link-YlOQ2PVS.js +488 -0
  31. package/dist/mono-prepare.d.ts +1 -0
  32. package/dist/mono-prepare.js +28 -0
  33. package/dist/mono-skills.d.ts +1 -0
  34. package/dist/mono-skills.js +837 -0
  35. package/dist/mono-tsconfig-D2qRL9_R.js +204 -0
  36. package/dist/mono.mjs +34 -0
  37. package/dist/nuxt-layers-DP1m7f1-.js +176 -0
  38. package/dist/nuxt-layers.d.ts +36 -0
  39. package/dist/nuxt-layers.js +3 -0
  40. package/dist/nuxt-runtime.d.ts +17 -0
  41. package/dist/nuxt-runtime.js +102 -0
  42. package/dist/nuxt.d.ts +390 -0
  43. package/dist/nuxt.js +737 -0
  44. package/dist/runtime-vs7U9Ed4.js +6054 -0
  45. package/dist/runtime.d.ts +2518 -0
  46. package/dist/runtime.js +4 -0
  47. package/dist/session-Bcig-rPi.js +1721 -0
  48. package/dist/types-B6FdB7LJ.d.ts +57 -0
  49. package/dist/universal-BR0O7Qwk.d.ts +59 -0
  50. package/dist/universal-DIVEzCvN.js +600 -0
  51. package/dist/virtual-mono-apps.d.ts +16 -0
  52. package/dist/vite.d.ts +943 -0
  53. package/dist/vite.js +1132 -0
  54. package/package.json +141 -3
@@ -0,0 +1,514 @@
1
+ import { a as MonoFetchCookieOptions } from "./types-B6FdB7LJ.js";
2
+ import { NotivueItem, PushOptions } from "notivue";
3
+ import { RouteLocationNormalizedLoadedGeneric, Router } from "vue-router";
4
+ import DataSource, { DataSourceOptions } from "devextreme/data/data_source";
5
+ import CustomStore, { CustomStoreOptions } from "devextreme/data/custom_store";
6
+ import { FetchRequestConfig } from "@odata2ts/http-client-fetch";
7
+ import ODataStore, { ODataStoreOptions } from "devextreme/data/odata/store";
8
+ import { DxColumn, DxDataGrid, DxDataGridTypes } from "devextreme-vue/data-grid";
9
+ import { ObjectSchema } from "yup";
10
+ import { QBooleanPath, QDateTimeOffsetPath, QEntityCollectionPath, QEntityPath, QNumberPath, QStringPath } from "@odata2ts/odata-query-objects";
11
+ import { LoadOptions } from "devextreme/data";
12
+ //#region src/core/composables/use-static-datasource.d.ts
13
+ type AnyObj = Record<string, any>;
14
+ type DxFilter = [string, '=' | '<>' | '>' | '>=' | '<' | '<=' | 'contains' | 'notcontains' | 'startswith' | 'endswith', any] | ['!', DxFilter] | [DxFilter, 'and' | 'or', DxFilter] | any[];
15
+ type OdataParams = {
16
+ $filter?: string | DxFilter;
17
+ $orderby?: string;
18
+ $select?: string | string[];
19
+ $skip?: number;
20
+ $top?: number;
21
+ $search?: string;
22
+ };
23
+ type UseOdataStaticOpts<T extends AnyObj> = {
24
+ data: T[] | (() => T[]);
25
+ key?: keyof T | string;
26
+ params?: OdataParams;
27
+ searchFields?: (keyof T | string)[];
28
+ caseInsensitive?: boolean;
29
+ keepKeyOnSelect?: boolean;
30
+ source: {
31
+ DataSource: typeof DataSource;
32
+ CustomStore: typeof CustomStore;
33
+ };
34
+ };
35
+ type Result<T> = {
36
+ dataSource: DataSource<T>;
37
+ data: T[] | null;
38
+ statusCode: number;
39
+ error: null | {
40
+ message: string;
41
+ stack: string;
42
+ response: any;
43
+ };
44
+ };
45
+ declare function createStaticDatasource<T extends AnyObj>(opts: UseOdataStaticOpts<T>): Promise<Result<T>>;
46
+ //#endregion
47
+ //#region src/core/types/notif-action.d.ts
48
+ /** Relaxed button descriptor — no Vuetify dependency. */
49
+ interface MonoNotifButton {
50
+ text?: string;
51
+ label?: string;
52
+ to?: string | Record<string, any>;
53
+ color?: string;
54
+ variant?: string;
55
+ class?: string;
56
+ disabled?: boolean;
57
+ [key: string]: any;
58
+ }
59
+ /** `item` prop type for MonoNotifAction (self-contained). */
60
+ type MonoNotifActionTypes = NotivueItem & {
61
+ props: NotifProps['props'];
62
+ };
63
+ interface MonoNotifActionProps {
64
+ item: MonoNotifActionTypes;
65
+ }
66
+ //#endregion
67
+ //#region src/core/types/notif.d.ts
68
+ type NotifProps = {
69
+ route?: RouteLocationNormalizedLoadedGeneric;
70
+ router?: Router;
71
+ message: string;
72
+ type: "info" | 'promise' | "warning" | "error" | "success";
73
+ } & Omit<PushOptions, 'message'> & {
74
+ props?: {
75
+ [key: string]: any;
76
+ redirect?: string;
77
+ isAction?: boolean;
78
+ isNewMessageRequest?: boolean;
79
+ buttons?: MonoNotifButton[];
80
+ };
81
+ };
82
+ //#endregion
83
+ //#region src/core/composables/use-helper.d.ts
84
+ declare const useHelper: () => {
85
+ isDate: (value: unknown) => value is Date;
86
+ isJSONString: ({ input, strict, root }: {
87
+ input: unknown;
88
+ strict?: boolean;
89
+ root?: ("object" | "any" | "array" | "primitive") | ReadonlyArray<"object" | "any" | "array" | "primitive">;
90
+ }) => boolean;
91
+ safeJSONParse: (str: string) => any;
92
+ replacerData: <ComT>({ fn, type, item, key, items }: {
93
+ fn: "push" | "remove" | "replace";
94
+ type: "data";
95
+ item: ComT;
96
+ key?: (keyof ComT & (string | number)) | undefined;
97
+ items: MaybeRef<ComT_1[]> | {
98
+ key: string;
99
+ var: any;
100
+ };
101
+ } | {
102
+ fn: "push" | "remove" | "replace";
103
+ type: "datasource";
104
+ item: ComT;
105
+ key?: (keyof ComT & (string | number)) | undefined;
106
+ items: MaybeRef<DataSource<ComT_1, any> | null> | {
107
+ key: string;
108
+ var: any;
109
+ };
110
+ }) => void;
111
+ filterOrIn: (field: string, values: any[], combine?: boolean) => any;
112
+ validateAllSchema: <T extends object = any>({ schema, input, error }: ValidateSchema<T>, callback?: () => void) => Promise<boolean>;
113
+ validateSchema: <T = any>({ schema, field, input, error }: ValidateSchema<T>, callback?: Function) => Promise<boolean>;
114
+ validateAllSchemaCheck: (error: ValidateError<any>) => boolean;
115
+ clearSchemaValidation: ({ error }: {
116
+ error: Ref<any>;
117
+ }) => void;
118
+ notif: (options: NotifProps) => Promise<import("notivue").NotificationClearMethods | undefined>;
119
+ dxFilterToString: ({ filter, encode }: {
120
+ /** encode only the filter value (URL-safe), default false */
121
+ encode?: boolean;
122
+ filter: string | number | boolean | Date | (string | number | boolean | Date | (string | number | boolean | Date | (string | number | boolean | Date | (string | number | boolean | Date | (string | number | boolean | Date | (string | number | boolean | Date | (string | number | boolean | Date | (string | number | boolean | Date | (string | number | boolean | Date | (string | number | boolean | Date | (string | number | boolean | Date | /*elided*/ any | [string, string, any] | null | undefined)[] | [string, string, any] | null | undefined)[] | [string, string, any] | null | undefined)[] | [string, string, any] | null | undefined)[] | [string, string, any] | null | undefined)[] | [string, string, any] | null | undefined)[] | [string, string, any] | null | undefined)[] | [string, string, any] | null | undefined)[] | [string, string, any] | null | undefined)[] | [string, string, any] | null | undefined)[] | [string, string, any] | null | undefined)[] | [string, string, any] | null | undefined;
123
+ }) => string;
124
+ };
125
+ //#endregion
126
+ //#region src/core/types/fetch.d.ts
127
+ interface FetchParam {
128
+ method: string;
129
+ url: string;
130
+ params?: Object;
131
+ body?: Object;
132
+ }
133
+ type FetchLoading<T extends string> = Record<T, boolean>;
134
+ // export type DataSourceOptions = DataSourceOptions
135
+ // type CustomQueryParams = {
136
+ // [key: string]: any;
137
+ // };
138
+ // type Expand = string | string[];
139
+ // type FilterExpression =
140
+ // | [string, string, any]
141
+ // | [string, string, any][]
142
+ // | [string, [string, string, any]]
143
+ // | [string, [string, string, any]][]
144
+ // | [string, [string, [string, string, any]]]
145
+ // | [string, [string, [string, string, any]]][]
146
+ // | [string, [string, [string, [string, string, any]]]]
147
+ // | [string, [string, [string, [string, string, any]]]][]
148
+ // | ['!', [string, string, any]]
149
+ // | [FilterExpression, 'and', FilterExpression]
150
+ // | [FilterExpression, 'or', FilterExpression];
151
+ // type GroupExpression =
152
+ // | string
153
+ // | { selector: string; desc?: boolean }
154
+ // | Array<string | { selector: string; desc?: boolean }>
155
+ // | ((item: any) => any);
156
+ // type LangParams = {
157
+ // locale: string;
158
+ // collatorOptions: {
159
+ // sensitivity: 'base' | 'accent' | 'case' | 'variant';
160
+ // caseFirst?: 'upper' | 'lower' | 'false';
161
+ // };
162
+ // };
163
+ // export type DataSourceOptions = {
164
+ // key: string,
165
+ // store?: any;
166
+ // customQueryParams?: CustomQueryParams;
167
+ // expand?: Expand;
168
+ // filter?: any[];
169
+ // group?: GroupExpression;
170
+ // langParams?: LangParams;
171
+ // map?: (dataItem: any) => any;
172
+ // onChanged?: (e?: { changes: Array<any> }) => void;
173
+ // onLoadError?: (error: { message: string }) => void;
174
+ // onLoadingChanged?: (isLoading: boolean) => void;
175
+ // pageSize?: number;
176
+ // paginate?: boolean;
177
+ // postProcess?: (data: Array<any>) => Array<any>;
178
+ // pushAggregationTimeout?: number;
179
+ // requireTotalCount?: boolean;
180
+ // reshapeOnPush?: boolean;
181
+ // searchExpr?: string | ((data: any) => any) | Array<string | ((data: any) => any)>;
182
+ // searchOperation?: string;
183
+ // searchValue?: any;
184
+ // select?: string | Array<string> | ((data: any) => any);
185
+ // sort?: string | { selector: string; desc?: boolean, asc?: boolean } | Array<string | { selector: string; desc?: boolean, asc?: boolean }> | ((data: any) => any);
186
+ // };
187
+ type NotifHelper = ReturnType<typeof useHelper>['notif'];
188
+ interface FetchOData<T = any> {
189
+ source: {
190
+ DataSource: typeof DataSource;
191
+ ODataStore: typeof ODataStore;
192
+ CustomStore: typeof CustomStore;
193
+ OdataService?: new (...args: any[]) => any;
194
+ };
195
+ force?: boolean;
196
+ notif?: boolean | NotifHelper;
197
+ baseUrl?: string;
198
+ token?: string;
199
+ url: string;
200
+ override?: {
201
+ dataSource?: ODataStoreOptions;
202
+ fakeDataSource?: CustomStoreOptions;
203
+ };
204
+ options?: {
205
+ key: string;
206
+ } & DataSourceOptions<T>;
207
+ }
208
+ /**
209
+ * Opt-in TanStack Query behaviour for a fetch. Honoured only when the installed data layer supports
210
+ * it — store classes flagged with `Symbol.for('mono.tanstack')` (OData fetches) or a `tanstackRun`
211
+ * export (REST fetches); with plain DevExtreme it is ignored and the fetch behaves as before.
212
+ */
213
+ interface TanstackFetchOptions {
214
+ /** ms a cached read stays fresh (`'static'` = never stale). Setting it enables sharing. */
215
+ staleTime?: number | 'static';
216
+ /** ms an unused cached read is kept. */
217
+ gcTime?: number;
218
+ /** Share identical in-flight reads even without caching. */
219
+ dedupe?: boolean;
220
+ /** Retry failed reads (network errors, 408, 429, 5xx only): `true`, a count, or a predicate. */
221
+ retry?: boolean | number | ((failureCount: number, error: any) => boolean);
222
+ /** ms between retries, or `(attempt, error) => ms`; default exponential backoff. */
223
+ retryDelay?: number | ((attempt: number, error: any) => number);
224
+ /** `'online'` / `'offlineFirst'` pause requests while offline and resume on reconnect. */
225
+ networkMode?: 'online' | 'always' | 'offlineFirst';
226
+ /** Keep reads across page reloads (IndexedDB by default). Results must be JSON-safe. */
227
+ persist?: boolean | {
228
+ /** ms a persisted read is kept (default 24 h). */
229
+ maxAge?: number;
230
+ /** Entries persisted under another buster are discarded — use the user id / app version. */
231
+ buster?: string;
232
+ storage?: 'indexeddb' | 'local';
233
+ };
234
+ /** Collect the store's `byKey` calls made within `wait` ms into one filtered request. */
235
+ batchByKey?: boolean | {
236
+ wait?: number;
237
+ maxSize?: number;
238
+ };
239
+ /** Broadcast writes to other tabs so they drop (and can refetch) this endpoint's data. */
240
+ syncTabs?: boolean;
241
+ /** A stable cache name (custom stores); stores with the same scope share cached reads. */
242
+ scope?: string;
243
+ }
244
+ type NormalFetchOptions = RequestInit & {
245
+ notif?: boolean | NotifHelper;
246
+ token?: string;
247
+ baseUrl?: string;
248
+ unauthCall?: () => void;
249
+ expiredBehaviour?: 'refresh';
250
+ tokenOptions?: MonoFetchCookieOptions;
251
+ /**
252
+ * Instant first load in a Nuxt app with `@mono-lit/nuxt-pre-fetch` (learned requests): this
253
+ * GET is reported to Nitro, which replays it on the next visit of the page while producing
254
+ * the HTML; the call then gets its answer without a network round trip. No effect without
255
+ * the module.
256
+ */
257
+ prefetch?: boolean;
258
+ };
259
+ type NormalFetchResult<T> = {
260
+ statusCode: number;
261
+ data: T | null;
262
+ message: string | null;
263
+ all: any;
264
+ };
265
+ type ConfigType$1 = {
266
+ jwtName: string;
267
+ jwtRefreshName: string;
268
+ };
269
+ interface OdataFetchTypes<T = any> extends FetchOData<T>, FetchRequestConfig {
270
+ method?: 'POST' | 'GET' | 'PUT' | 'PATCH' | 'DELETE';
271
+ unauthCall?: () => void;
272
+ expiredBehaviour?: 'refresh';
273
+ selfProxy?: string;
274
+ allowZero?: boolean;
275
+ cache?: boolean;
276
+ type?: 'data' | 'datasource' | 'fakedatasource' | 'fakedata';
277
+ payload?: {
278
+ data?: Record<string, any> | null;
279
+ keyValue?: any;
280
+ keyName: string;
281
+ keyType?: string;
282
+ useBatch?: boolean;
283
+ };
284
+ config?: ConfigType$1;
285
+ tokenOptions?: MonoFetchCookieOptions;
286
+ /** Opt-in TanStack Query behaviour for the stores this fetch builds (see TanstackFetchOptions). */
287
+ tanstack?: TanstackFetchOptions;
288
+ /**
289
+ * Instant first load in a Nuxt app with `@mono-lit/nuxt-pre-fetch` (learned requests): the
290
+ * store's FIRST load is reported to Nitro and answered from its copy on the next visit.
291
+ * Needs a data layer that implements it (`@mono-lit/data`); a no-op with plain DevExtreme.
292
+ */
293
+ prefetch?: boolean;
294
+ }
295
+ //#endregion
296
+ //#region src/core/types/column.d.ts
297
+ // primitives / built-ins we don't want to recurse into
298
+ type BuiltIn = Date | Function | RegExp | Error;
299
+ // treat only plain objects (not arrays, not built-ins) as nestable
300
+ type IsPlainObject<T> = T extends object ? T extends BuiltIn ? false : T extends readonly any[] ? false : true : false;
301
+ /** "a" | "a.b" | "a.b.c" ... including top-level keys */
302
+ type DotKeys<T> = T extends object ? { [K in Extract<keyof T, string>]: IsPlainObject<T[K]> extends true ? K | `${K}.${DotKeys<T[K]>}` : K; }[Extract<keyof T, string>] : never;
303
+ /** Optional: value type at a given dot-path */
304
+ type PathValue<T, P extends string> = P extends `${infer K}.${infer R}` ? K extends keyof T ? PathValue<T[K], R> : never : P extends keyof T ? T[P] : never;
305
+ // --- Your Col type using DotKeys<T> and allowing extra keys I[number] ---
306
+ type Col<T = any, I extends readonly string[] = []> = InstanceType<typeof DxColumn>["$props"] & {
307
+ dataField: [keyof T] extends [never] ? I[number] | string // when T is unknown/empty
308
+ : I[number] | DotKeys<T>; // typed dot-paths + extras
309
+ cellTemplate?: [keyof T] extends [never] ? string : `${Extract<DotKeys<T>, string>}Template` | (string & {}) | ((container: HTMLElement, options: DxDataGridTypes.ColumnCellTemplateData) => void);
310
+ groupCellTemplate?: [keyof T] extends [never] ? string : `${Extract<DotKeys<T>, string>}GroupTemplate`;
311
+ headerCellTemplate?: [keyof T] extends [never] ? string : `${Extract<DotKeys<T>, string>}HeaderTemplate`;
312
+ editCellTemplate?: [keyof T] extends [never] ? string : `${Extract<DotKeys<T>, string>}EditCellTemplate`;
313
+ columns?: Col<T, I>[];
314
+ };
315
+ interface LoopTemplate<T = {}> extends Col {
316
+ items: keyof T extends never ? string[] : (keyof T)[];
317
+ }
318
+ interface GroupTemplate {
319
+ name: string;
320
+ code: string;
321
+ }
322
+ //#endregion
323
+ //#region src/core/types/schema.d.ts
324
+ interface ValidateSchema<T = any> {
325
+ schema: any;
326
+ field?: keyof T;
327
+ input: T;
328
+ error: any;
329
+ }
330
+ type ValidateErrorItem = {
331
+ valid: boolean;
332
+ message: string;
333
+ };
334
+ type ValidateError<T extends string = string> = Record<T, ValidateErrorItem>;
335
+ type WithUndefined<T> = { [P in keyof T]: T[P] | undefined; };
336
+ interface SchemaType<T> extends WithUndefined<T> {}
337
+ interface Schema<T> extends ObjectSchema<SchemaType<T>> {}
338
+ type AnyObject = yup.AnyObject;
339
+ /** Map a TS type T to the corresponding Yup schema type */
340
+ type SchemaFor<T> = T extends string ? yup.StringSchema<string> : T extends number ? yup.NumberSchema<number> : T extends boolean ? yup.BooleanSchema<boolean> : T extends Date ? yup.DateSchema<Date> : T extends (infer U)[] ? yup.ArraySchema<SchemaFor<U>, AnyObject, U[]> : T extends Record<string, any> ? yup.ObjectSchema<{ [K in keyof T]-?: SchemaFor<T[K]>; }, AnyObject, T> : yup.Schema<T>;
341
+ /** Build a per-key schema shape with proper schema types */
342
+ type SchemaObject<T> = { [K in keyof T]-?: SchemaFor<T[K]>; };
343
+ type ValidateErrorSingle<T> = { [K in keyof T]: T[K] extends object ? ValidateError<T[K]> : ValidateErrorItem; };
344
+ type ValidateErrorComplex<T> = { [K in keyof T]: T[K] extends object[] ? ValidateErrorItem[] // or more complex handling
345
+ : T[K] extends object ? ValidateErrorComplex<T[K]> : ValidateErrorItem; };
346
+ //#endregion
347
+ //#region src/core/types/devextreme.d.ts
348
+ type FilterExpression = "=" | "<>" | ">" | ">=" | "<" | "<=" | "startswith" | "endswith" | "contains" | "notcontains";
349
+ interface HeaderFilter<T> {
350
+ value: [keyof T, FilterExpression, string];
351
+ text: string;
352
+ }
353
+ interface Format {
354
+ type?: 'currency';
355
+ currency?: 'IDR';
356
+ precision?: number;
357
+ }
358
+ interface CustomSummary {
359
+ column: string;
360
+ summaryType: "sum" | "min" | "max" | "avg" | "count";
361
+ name?: string;
362
+ alignment?: 'right' | 'center' | 'left';
363
+ cssClass?: string;
364
+ displayFormat?: string;
365
+ showInColumn?: string;
366
+ valueFormat?: Format | string;
367
+ }
368
+ type DataGrid<T = {}> = (InstanceType<typeof DxDataGrid>['$props']) & {
369
+ keyExpr?: keyof T extends never ? string | string[] : keyof T | (keyof T)[];
370
+ };
371
+ //#endregion
372
+ //#region src/core/types/odatamap.d.ts
373
+ type Mutable<T> = { -readonly [P in keyof T]: T[P]; };
374
+ type GetInstance<T> = T extends (new (...args: any) => infer I) ? I : T;
375
+ type UnwrapPath<T> = T extends QStringPath<infer U> ? U : T extends QNumberPath<infer U> ? U : T extends QBooleanPath<infer U> ? U : T extends QDateTimeOffsetPath<infer U> ? U : T extends QEntityCollectionPath<infer Q> ? DTO_FromQ<Q>[] : T extends QEntityPath<infer Q> ? DTO_FromQ<Q> : never;
376
+ type AllowedPath = QStringPath<any> | QNumberPath<any> | QBooleanPath<any> | QDateTimeOffsetPath<any> | QEntityCollectionPath<any> | QEntityPath<any>;
377
+ type DTO_FromQ<Q> = { [K in keyof Mutable<GetInstance<Q>> as Mutable<GetInstance<Q>>[K] extends AllowedPath ? K : never]: UnwrapPath<Mutable<GetInstance<Q>>[K]>; };
378
+ type Ctor<T = any> = new (...args: any) => T;
379
+ type OdataMapTypes<Q, Overrides extends Record<string, Ctor<any> | Ctor<any>[]> = {}> = Omit<DTO_FromQ<Q>, keyof Overrides> & { [K in keyof Overrides]: Overrides[K] extends Ctor<infer _> ? DTO_FromQ<Overrides[K]> : Overrides[K] extends Array<infer U> ? DTO_FromQ<U>[] : never; };
380
+ //#endregion
381
+ //#region src/core/composables/prefetch-bridge.d.ts
382
+ /** One GET request as reported to the prefetch host. */
383
+ interface MonoPrefetchRequest {
384
+ /** Absolute or app-relative URL (may carry a query string). */
385
+ url: string;
386
+ query?: Record<string, unknown>;
387
+ /** Non-credential headers only (Authorization / Cookie are dropped). */
388
+ headers?: Record<string, string>;
389
+ /** The cookie the Bearer token is read from on the host (`split`: chunked cookie). */
390
+ auth?: {
391
+ cookie: string;
392
+ split?: boolean;
393
+ };
394
+ }
395
+ /** What a prefetch host provides (shape of `useNuxtApp().$nuxtPreFetch`). */
396
+ interface MonoPrefetchBridge {
397
+ /** Synchronous: a prefetched result is available (or arriving) for this request. */
398
+ expects: (method: string, url: string, query?: Record<string, unknown> | null) => boolean;
399
+ /** The prefetched result, once (`undefined` = fetch it yourself). */
400
+ take: (method: string, url: string, query?: Record<string, unknown> | null) => Promise<{
401
+ data: unknown;
402
+ } | undefined>;
403
+ /** Reports a request the page sent (served ones too). */
404
+ learn: (request: MonoPrefetchRequest) => void;
405
+ }
406
+ declare function setPrefetchBridge(next: MonoPrefetchBridge | null): void;
407
+ declare function getPrefetchBridge(): MonoPrefetchBridge | null;
408
+ /**
409
+ * Describing a call on a server (`.prefetch()` twins): where the store's first load goes
410
+ * instead of the network. `auth` is the cookie the browser's Bearer lives in.
411
+ */
412
+ interface MonoPrefetchCapture {
413
+ emit: (request: MonoPrefetchRequest) => void;
414
+ auth?: MonoPrefetchRequest['auth'];
415
+ /** Describe ONE `store.load(load)` instead of the call's own first load (`.prefetchLoad()`). */
416
+ load?: Record<string, unknown>;
417
+ }
418
+ //#endregion
419
+ //#region src/core/composables/use-fetch-helper.d.ts
420
+ declare global {
421
+ interface Window {
422
+ helper?: any;
423
+ }
424
+ }
425
+ type ConfigType = {
426
+ jwtName: string;
427
+ jwtRefreshName: string;
428
+ };
429
+ declare function extractErrorMessage(source: any, fallback?: string): string;
430
+ declare function parseDxError(err: any): {
431
+ status: any;
432
+ code: any;
433
+ message: string;
434
+ body: any;
435
+ err: any;
436
+ };
437
+ declare const useFetchOData: <T = any>({ url, options, source, type, params, notif, force, token, headers, selfProxy, method, baseUrl, override, allowZero, cache, expiredBehaviour, unauthCall, payload, config, tokenOptions, tanstack, prefetch, __capture }: OdataFetchTypes & {
438
+ __capture?: MonoPrefetchCapture;
439
+ }) => Promise<{
440
+ data: T | null;
441
+ dataSource: DataSource<T> | null;
442
+ statusCode: number;
443
+ error: {
444
+ message: string;
445
+ stack: string;
446
+ response: any;
447
+ } | null;
448
+ }>;
449
+ type FetchOverrides = Omit<Partial<OdataFetchTypes>, 'url' | 'type' | 'options'> & {
450
+ options?: Omit<Partial<NonNullable<OdataFetchTypes['options']>>, 'key'>;
451
+ };
452
+ declare function createFetcher<T>(base: OdataFetchTypes): {
453
+ response(option?: FetchOverrides): Promise<{
454
+ data: T | null;
455
+ dataSource: DataSource<T, any> | null;
456
+ statusCode: number;
457
+ error: {
458
+ message: string;
459
+ stack: string;
460
+ response: any;
461
+ } | null;
462
+ }>;
463
+ };
464
+ type OdataFetchUniqueTypes<T> = {
465
+ unique: keyof T & string;
466
+ } & OdataFetchTypes;
467
+ declare const createUniqueFetcher: <T extends any>(opt: OdataFetchUniqueTypes<T>) => Promise<{
468
+ data: T | null;
469
+ dataSource: DataSource<T, any> | null;
470
+ statusCode: number;
471
+ error: {
472
+ message: string;
473
+ stack: string;
474
+ response: any;
475
+ } | null;
476
+ }>;
477
+ declare function useNormalFetch<T>(url: string, options: NormalFetchOptions, config?: ConfigType): Promise<NormalFetchResult<T>>;
478
+ interface TryCatchDatasourceParams<T> {
479
+ tryCallback: () => Promise<T> | T;
480
+ catchCallback?: (error: any, parsed: ReturnType<typeof parseDxError>) => Promise<T> | T;
481
+ finallyCallback?: () => Promise<any> | any;
482
+ notif?: OdataFetchTypes['notif'];
483
+ }
484
+ declare function tryCatchDatasource<T>({ tryCallback, catchCallback, finallyCallback, notif }: TryCatchDatasourceParams<T>): Promise<T>;
485
+ type LoadChunkStoreArgs<T> = {
486
+ datasource: DataSource<T>;
487
+ options: LoadOptions<T>;
488
+ limit?: number;
489
+ maxRows?: number;
490
+ concurrency?: number;
491
+ };
492
+ declare function loadChuckStore<T>({ datasource, options, limit, maxRows, concurrency }: LoadChunkStoreArgs<T>): Promise<T[]>;
493
+ type AwaitedMap<T extends Record<string, Promise<any>>> = { [K in keyof T]: Awaited<T[K]>; };
494
+ type SettledMap<T extends Record<string, Promise<any>>> = {
495
+ values: Partial<AwaitedMap<T>>;
496
+ errors: Partial<Record<keyof T, unknown>>;
497
+ };
498
+ type AllMap<T extends Record<string, Promise<any>>> = {
499
+ values: AwaitedMap<T>;
500
+ errors: {};
501
+ };
502
+ declare function promiseWrapper<T extends Record<string, Promise<any>>, Mode extends 'all' | 'allSettled' = 'allSettled'>({ task, type }: {
503
+ task: T;
504
+ type?: Mode;
505
+ }): Promise<Mode extends 'all' ? AllMap<T> : SettledMap<T>>;
506
+ //#endregion
507
+ //#region src/core/components/Notif.vue.d.ts
508
+ type __VLS_Props = {
509
+ item: MonoNotifActionTypes;
510
+ };
511
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
512
+ declare const _default: typeof __VLS_export;
513
+ //#endregion
514
+ export { ValidateErrorItem as A, NormalFetchOptions as B, Format as C, SchemaType as D, SchemaObject as E, LoopTemplate as F, NotifProps as G, OdataFetchTypes as H, PathValue as I, MonoNotifButton as J, MonoNotifActionProps as K, FetchLoading as L, ValidateSchema as M, Col as N, ValidateError as O, GroupTemplate as P, FetchOData as R, FilterExpression as S, Schema as T, TanstackFetchOptions as U, NormalFetchResult as V, useHelper as W, createStaticDatasource as X, UseOdataStaticOpts as Y, getPrefetchBridge as _, TryCatchDatasourceParams as a, CustomSummary as b, extractErrorMessage as c, promiseWrapper as d, tryCatchDatasource as f, MonoPrefetchRequest as g, MonoPrefetchBridge as h, OdataFetchUniqueTypes as i, ValidateErrorSingle as j, ValidateErrorComplex as k, loadChuckStore as l, useNormalFetch as m, FetchOverrides as n, createFetcher as o, useFetchOData as p, MonoNotifActionTypes as q, LoadChunkStoreArgs as r, createUniqueFetcher as s, _default as t, parseDxError as u, setPrefetchBridge as v, HeaderFilter as w, DataGrid as x, OdataMapTypes as y, FetchParam as z };
@@ -0,0 +1,25 @@
1
+ import { i as monoEcosystem, n as MonoEcosystemOptions, r as mergeEcosystem } from "./merge-file-CLc3wxY4.js";
2
+ import { Plugin } from "vite";
3
+ //#region src/composables/vite-html-to-vue.d.ts
4
+ type HtmlToVueOptions = {
5
+ overridePath?: string;
6
+ components?: {
7
+ path: string;
8
+ outDir?: string;
9
+ };
10
+ pages: {
11
+ list: Array<{
12
+ html: string;
13
+ pagePath?: string;
14
+ }>;
15
+ };
16
+ };
17
+ declare function htmlToVue(options: HtmlToVueOptions): Plugin;
18
+ //#endregion
19
+ //#region src/composables/html-path.d.ts
20
+ export declare function htmlPath({ dir, dirname }: {
21
+ dir: string;
22
+ dirname: string;
23
+ }): Record<string, string>;
24
+ //#endregion
25
+ export { type MonoEcosystemOptions, htmlToVue, mergeEcosystem, monoEcosystem };