@platforma-sdk/ui-vue 1.3.5
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/.eslintignore +2 -0
- package/.eslintrc.json +56 -0
- package/.prettierrc +6 -0
- package/CHANGELOG.md +9 -0
- package/README.md +5 -0
- package/dist/lib.js +50299 -0
- package/dist/lib.umd.cjs +248 -0
- package/dist/src/components/BlockLayout.vue.d.ts +5 -0
- package/dist/src/components/BlockLayout.vue.d.ts.map +1 -0
- package/dist/src/components/LoaderPage.vue.d.ts +3 -0
- package/dist/src/components/LoaderPage.vue.d.ts.map +1 -0
- package/dist/src/components/NotFound.vue.d.ts +3 -0
- package/dist/src/components/NotFound.vue.d.ts.map +1 -0
- package/dist/src/components/PlAgDataTable/OverlayLoading.vue.d.ts +11 -0
- package/dist/src/components/PlAgDataTable/OverlayLoading.vue.d.ts.map +1 -0
- package/dist/src/components/PlAgDataTable/OverlayNoRows.vue.d.ts +3 -0
- package/dist/src/components/PlAgDataTable/OverlayNoRows.vue.d.ts.map +1 -0
- package/dist/src/components/PlAgDataTable/PlAgDataTable.vue.d.ts +16 -0
- package/dist/src/components/PlAgDataTable/PlAgDataTable.vue.d.ts.map +1 -0
- package/dist/src/components/PlAgDataTable/index.d.ts +3 -0
- package/dist/src/components/PlAgDataTable/index.d.ts.map +1 -0
- package/dist/src/components/PlAgDataTable/sources/file-source.d.ts +7 -0
- package/dist/src/components/PlAgDataTable/sources/file-source.d.ts.map +1 -0
- package/dist/src/components/PlAgDataTable/sources/table-source.d.ts +15 -0
- package/dist/src/components/PlAgDataTable/sources/table-source.d.ts.map +1 -0
- package/dist/src/components/PlAgDataTable/types.d.ts +35 -0
- package/dist/src/components/PlAgDataTable/types.d.ts.map +1 -0
- package/dist/src/components/ValueOrErrorsComponent.vue.d.ts +27 -0
- package/dist/src/components/ValueOrErrorsComponent.vue.d.ts.map +1 -0
- package/dist/src/composition/useWatchResult.d.ts +7 -0
- package/dist/src/composition/useWatchResult.d.ts.map +1 -0
- package/dist/src/computedResult.d.ts +35 -0
- package/dist/src/computedResult.d.ts.map +1 -0
- package/dist/src/createApp.d.ts +27 -0
- package/dist/src/createApp.d.ts.map +1 -0
- package/dist/src/createModel.d.ts +3 -0
- package/dist/src/createModel.d.ts.map +1 -0
- package/dist/src/defineApp.d.ts +14 -0
- package/dist/src/defineApp.d.ts.map +1 -0
- package/dist/src/defineStore.d.ts +2 -0
- package/dist/src/defineStore.d.ts.map +1 -0
- package/dist/src/lib.d.ts +16 -0
- package/dist/src/lib.d.ts.map +1 -0
- package/dist/src/types.d.ts +73 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.static-test.d.ts +7 -0
- package/dist/src/types.static-test.d.ts.map +1 -0
- package/dist/src/urls.d.ts +4 -0
- package/dist/src/urls.d.ts.map +1 -0
- package/dist/src/utils.d.ts +20 -0
- package/dist/src/utils.d.ts.map +1 -0
- package/dist/style.css +1 -0
- package/dist/tsconfig.lib.tsbuildinfo +1 -0
- package/index.html +13 -0
- package/package.json +64 -0
- package/src/assets/base.scss +9 -0
- package/src/assets/block.scss +71 -0
- package/src/assets/file-dialog.scss +181 -0
- package/src/assets/icons/empty-cat.svg +21 -0
- package/src/assets/icons/no-data-cat.svg +40 -0
- package/src/assets/ui.scss +9 -0
- package/src/components/BlockLayout.vue +40 -0
- package/src/components/LoaderPage.vue +7 -0
- package/src/components/NotFound.vue +21 -0
- package/src/components/PlAgDataTable/OverlayLoading.vue +47 -0
- package/src/components/PlAgDataTable/OverlayNoRows.vue +29 -0
- package/src/components/PlAgDataTable/PlAgDataTable.vue +293 -0
- package/src/components/PlAgDataTable/ag-theme.css +403 -0
- package/src/components/PlAgDataTable/assets/cat-in-bag.png +0 -0
- package/src/components/PlAgDataTable/assets/sad-cat.png +0 -0
- package/src/components/PlAgDataTable/index.ts +3 -0
- package/src/components/PlAgDataTable/sources/file-source.ts +25 -0
- package/src/components/PlAgDataTable/sources/table-source.ts +235 -0
- package/src/components/PlAgDataTable/types.ts +38 -0
- package/src/components/ValueOrErrorsComponent.vue +28 -0
- package/src/composition/useWatchResult.ts +42 -0
- package/src/computedResult.ts +47 -0
- package/src/createApp.ts +213 -0
- package/src/createModel.ts +108 -0
- package/src/defineApp.ts +78 -0
- package/src/defineStore.ts +32 -0
- package/src/lib.ts +26 -0
- package/src/types.static-test.ts +80 -0
- package/src/types.ts +106 -0
- package/src/urls.ts +14 -0
- package/src/utils.ts +75 -0
- package/src/vite-env.d.ts +8 -0
- package/tsconfig.json +11 -0
- package/tsconfig.lib.json +27 -0
- package/tsconfig.node.json +13 -0
- package/vite.config.ts +26 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import '@milaboratories/uikit/styles';
|
|
2
|
+
import '../assets/block.scss';
|
|
3
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
4
|
+
export default _default;
|
|
5
|
+
//# sourceMappingURL=BlockLayout.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BlockLayout.vue.d.ts","sourceRoot":"","sources":["../../../src/components/BlockLayout.vue"],"names":[],"mappings":"AAAA,OA0CO,8BAA8B,CAAC;AACtC,OAAO,sBAAsB,CAAC;;AAgH9B,wBAKG"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
3
|
+
//# sourceMappingURL=LoaderPage.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoaderPage.vue.d.ts","sourceRoot":"","sources":["../../../src/components/LoaderPage.vue"],"names":[],"mappings":";AAgEA,wBAKG"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
3
|
+
//# sourceMappingURL=NotFound.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotFound.vue.d.ts","sourceRoot":"","sources":["../../../src/components/NotFound.vue"],"names":[],"mappings":";AAgHA,wBAKG"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
params: {
|
|
3
|
+
notReady: boolean;
|
|
4
|
+
};
|
|
5
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
6
|
+
params: {
|
|
7
|
+
notReady: boolean;
|
|
8
|
+
};
|
|
9
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
export default _default;
|
|
11
|
+
//# sourceMappingURL=OverlayLoading.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OverlayLoading.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/PlAgDataTable/OverlayLoading.vue"],"names":[],"mappings":";YAoDU;QACN,QAAQ,EAAE,OAAO,CAAC;KACnB;;YAFO;QACN,QAAQ,EAAE,OAAO,CAAC;KACnB;;AAoEH,wBAMG"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
3
|
+
//# sourceMappingURL=OverlayNoRows.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OverlayNoRows.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/PlAgDataTable/OverlayNoRows.vue"],"names":[],"mappings":";AAsFA,wBAKG"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import './ag-theme.css';
|
|
2
|
+
import type { PlDataTableState } from '@platforma-sdk/model';
|
|
3
|
+
import type { PlDataTableSettings } from './types';
|
|
4
|
+
declare let __VLS_typeProps: {
|
|
5
|
+
settings: Readonly<PlDataTableSettings>;
|
|
6
|
+
};
|
|
7
|
+
type __VLS_PublicProps = {
|
|
8
|
+
modelValue?: PlDataTableState;
|
|
9
|
+
} & typeof __VLS_typeProps;
|
|
10
|
+
declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
|
+
"update:modelValue": (modelValue: PlDataTableState) => any;
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
13
|
+
"onUpdate:modelValue"?: ((modelValue: PlDataTableState) => any) | undefined;
|
|
14
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
export default _default;
|
|
16
|
+
//# sourceMappingURL=PlAgDataTable.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PlAgDataTable.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/PlAgDataTable/PlAgDataTable.vue"],"names":[],"mappings":"AAAA,OAuSO,gBAAgB,CAAC;AAUxB,OAAO,KAAK,EAAU,gBAAgB,EAAqC,MAAM,sBAAsB,CAAC;AAMxG,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAQnD,QAAA,IAAI,eAAe,EAAG;IACpB,QAAQ,EAAE,QAAQ,CAAC,mBAAmB,CAAC,CAAC;CACzC,CAAC;AAkPF,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,gBAAgB,CAAC;CAC7B,GAAG,OAAO,eAAe,CAAC;;;;;;AAoG3B,wBAOG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/PlAgDataTable/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAE7D,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ColDef, GridApi, IDatasource } from '@ag-grid-community/core';
|
|
2
|
+
import type { BlobDriver, LocalBlobHandleAndSize, RemoteBlobHandleAndSize } from '@platforma-sdk/model';
|
|
3
|
+
export declare function updateXsvGridOptions(gridApi: GridApi, blobDriver: BlobDriver, file: LocalBlobHandleAndSize | RemoteBlobHandleAndSize): Promise<{
|
|
4
|
+
columnDefs: ColDef[];
|
|
5
|
+
datasource: IDatasource;
|
|
6
|
+
}>;
|
|
7
|
+
//# sourceMappingURL=file-source.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-source.d.ts","sourceRoot":"","sources":["../../../../../src/components/PlAgDataTable/sources/file-source.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC5E,OAAO,KAAK,EAAE,UAAU,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAExG,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,sBAAsB,GAAG,uBAAuB,GACrD,OAAO,CAAC;IACT,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,UAAU,EAAE,WAAW,CAAC;CACzB,CAAC,CAcD"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ColDef, GridApi, IDatasource } from '@ag-grid-community/core';
|
|
2
|
+
import { type PFrameDriver, type PTableColumnId, type PTableHandle } from '@platforma-sdk/model';
|
|
3
|
+
import { type PlDataTableSheet } from '../types';
|
|
4
|
+
/**
|
|
5
|
+
* Extract `PTableColumnId` from colId string
|
|
6
|
+
*/
|
|
7
|
+
export declare function parseColId(str: string): PTableColumnId;
|
|
8
|
+
/**
|
|
9
|
+
* Calculate GridOptions for p-table data source type
|
|
10
|
+
*/
|
|
11
|
+
export declare function updatePFrameGridOptions(gridApi: GridApi, pfDriver: PFrameDriver, pt: PTableHandle, sheets: PlDataTableSheet[]): Promise<{
|
|
12
|
+
columnDefs: ColDef[];
|
|
13
|
+
datasource: IDatasource;
|
|
14
|
+
}>;
|
|
15
|
+
//# sourceMappingURL=table-source.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-source.d.ts","sourceRoot":"","sources":["../../../../../src/components/PlAgDataTable/sources/table-source.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,EAAkB,MAAM,yBAAyB,CAAC;AAC5F,OAAO,EAaL,KAAK,YAAY,EACjB,KAAK,cAAc,EAEnB,KAAK,YAAY,EAElB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAYjD;;GAEG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GACV,cAAc,CACzC;AAkID;;GAEG;AACH,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,YAAY,EACtB,EAAE,EAAE,YAAY,EAChB,MAAM,EAAE,gBAAgB,EAAE,GACzB,OAAO,CAAC;IACT,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,UAAU,EAAE,WAAW,CAAC;CACzB,CAAC,CAsDD"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { AxisId, LocalBlobHandleAndSize, PTableHandle, RemoteBlobHandleAndSize, ValueOrErrors } from '@platforma-sdk/model';
|
|
2
|
+
export type PlDataTableSheet = {
|
|
3
|
+
/** id of the axis to use */
|
|
4
|
+
axis: AxisId;
|
|
5
|
+
/** options to show in the filter tan */
|
|
6
|
+
options: {
|
|
7
|
+
/** value of the option (should be one of the values in the axis) */
|
|
8
|
+
value: string | number;
|
|
9
|
+
/** corresponding label */
|
|
10
|
+
text: string;
|
|
11
|
+
}[];
|
|
12
|
+
/** default (selected) value */
|
|
13
|
+
defaultValue?: string | number;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Data table settings
|
|
17
|
+
*/
|
|
18
|
+
export type PlDataTableSettings = {
|
|
19
|
+
/**
|
|
20
|
+
* The type of the source to feed the data into the table.
|
|
21
|
+
*/
|
|
22
|
+
sourceType: 'ptable';
|
|
23
|
+
/**
|
|
24
|
+
* PTable handle output
|
|
25
|
+
*/
|
|
26
|
+
pTable?: ValueOrErrors<PTableHandle | undefined> | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Sheets that we want to show in our table
|
|
29
|
+
*/
|
|
30
|
+
sheets?: PlDataTableSheet[];
|
|
31
|
+
} | {
|
|
32
|
+
sourceType: 'xsv';
|
|
33
|
+
xsvFile?: ValueOrErrors<RemoteBlobHandleAndSize | undefined> | ValueOrErrors<LocalBlobHandleAndSize | undefined> | undefined;
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/PlAgDataTable/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,sBAAsB,EAAE,YAAY,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAEjI,MAAM,MAAM,gBAAgB,GAAG;IAC7B,4BAA4B;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,wCAAwC;IACxC,OAAO,EAAE;QACP,oEAAoE;QACpE,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;QACvB,0BAA0B;QAC1B,IAAI,EAAE,MAAM,CAAC;KACd,EAAE,CAAC;IACJ,+BAA+B;IAC/B,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAChC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAC3B;IACE;;OAEG;IACH,UAAU,EAAE,QAAQ,CAAC;IACrB;;OAEG;IACH,MAAM,CAAC,EAAE,aAAa,CAAC,YAAY,GAAG,SAAS,CAAC,GAAG,SAAS,CAAC;IAC7D;;OAEG;IACH,MAAM,CAAC,EAAE,gBAAgB,EAAE,CAAC;CAC7B,GACD;IACE,UAAU,EAAE,KAAK,CAAC;IAClB,OAAO,CAAC,EAAE,aAAa,CAAC,uBAAuB,GAAG,SAAS,CAAC,GAAG,aAAa,CAAC,sBAAsB,GAAG,SAAS,CAAC,GAAG,SAAS,CAAC;CAC9H,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ValueOrErrors } from '@platforma-sdk/model';
|
|
2
|
+
declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<{}> & Readonly<{}>, never>, never> & {
|
|
4
|
+
valueOrError: ValueOrErrors<T> | undefined;
|
|
5
|
+
}> & import("vue").PublicProps;
|
|
6
|
+
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
7
|
+
attrs: any;
|
|
8
|
+
slots: Readonly<{
|
|
9
|
+
default(props: {
|
|
10
|
+
value: T;
|
|
11
|
+
}): void;
|
|
12
|
+
}> & {
|
|
13
|
+
default(props: {
|
|
14
|
+
value: T;
|
|
15
|
+
}): void;
|
|
16
|
+
};
|
|
17
|
+
emit: {};
|
|
18
|
+
}>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
19
|
+
[key: string]: any;
|
|
20
|
+
}> & {
|
|
21
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
22
|
+
};
|
|
23
|
+
export default _default;
|
|
24
|
+
type __VLS_PrettifyLocal<T> = {
|
|
25
|
+
[K in keyof T]: T[K];
|
|
26
|
+
} & {};
|
|
27
|
+
//# sourceMappingURL=ValueOrErrorsComponent.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ValueOrErrorsComponent.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ValueOrErrorsComponent.vue"],"names":[],"mappings":"AA+BA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;yBAGzC,CAAC,eACJ,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,cAClD,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,iBAC5F,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC;WA+ExD,mBAAmB,CAAC;sBA3Ed,aAAa,CAAC,CAAC,CAAC,GAAG,SAAS;KA2E2C,CAAC,4BAA2B;oBAChG,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;uBAlEI;YAAE,KAAK,EAAE,CAAC,CAAA;SAAE,GAAG,IAAI;;uBAAnB;YAAE,KAAK,EAAE,CAAC,CAAA;SAAE,GAAG,IAAI;;UAoE3B,EAAE;;;;YAGiC,OAAO,CAAC,OAAO,WAAW,CAAC;;AAzFvE,wBAyF4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { WatchSource } from 'vue';
|
|
2
|
+
import type { OptionalResult } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Use for synchronous/asynchronous converters (wip)
|
|
5
|
+
*/
|
|
6
|
+
export declare function useWatchResult<S, V>(watchSource: WatchSource<S>, load: (s: S) => Promise<V> | V): OptionalResult<V>;
|
|
7
|
+
//# sourceMappingURL=useWatchResult.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useWatchResult.d.ts","sourceRoot":"","sources":["../../../src/composition/useWatchResult.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AAEvC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C;;GAEG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAkCnH"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { ComputedRef } from 'vue';
|
|
2
|
+
import { type ComputedGetter } from 'vue';
|
|
3
|
+
import type { OptionalResult } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* Creates a computed reference that wraps the result of a getter function in an `OptionalResult` object.
|
|
6
|
+
* This wrapper provides error handling, ensuring that if an error occurs during the computation of the result,
|
|
7
|
+
* the error is captured and included in the `OptionalResult` instead of throwing the error.
|
|
8
|
+
*
|
|
9
|
+
* @template V - The type of the value returned by the getter function.
|
|
10
|
+
*
|
|
11
|
+
* @param {ComputedGetter<V>} getter - A function that returns a value of type `V`. This function is executed inside
|
|
12
|
+
* the computed reference and its result is wrapped in an `OptionalResult`.
|
|
13
|
+
*
|
|
14
|
+
* @returns {ComputedRef<OptionalResult<V>>} - A computed reference containing the result of the getter function
|
|
15
|
+
* wrapped in an `OptionalResult`. If the getter function executes successfully, the `value` property of the `OptionalResult`
|
|
16
|
+
* will contain the result. If an error occurs, the `errors` property will contain the error message, and `value` will be `undefined`.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* const myGetter = () => {
|
|
20
|
+
* if (someCondition) {
|
|
21
|
+
* throw new Error('An error occurred');
|
|
22
|
+
* }
|
|
23
|
+
* return 'Success';
|
|
24
|
+
* };
|
|
25
|
+
*
|
|
26
|
+
* const myComputedResult = computedResult(myGetter);
|
|
27
|
+
*
|
|
28
|
+
* // If someCondition is true:
|
|
29
|
+
* // myComputedResult.value will be { errors: ['An error occurred'], value: undefined }
|
|
30
|
+
*
|
|
31
|
+
* // If someCondition is false:
|
|
32
|
+
* // myComputedResult.value will be { errors: undefined, value: 'Success' }
|
|
33
|
+
*/
|
|
34
|
+
export declare function computedResult<V>(getter: ComputedGetter<V>): ComputedRef<OptionalResult<V>>;
|
|
35
|
+
//# sourceMappingURL=computedResult.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"computedResult.d.ts","sourceRoot":"","sources":["../../src/computedResult.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAY,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAG9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAW3F"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Mutable } from '@milaboratories/helpers';
|
|
2
|
+
import type { NavigationState, BlockOutputsBase, BlockState, Platforma } from '@platforma-sdk/model';
|
|
3
|
+
import type { UnwrapValueOrErrors, StateModelOptions, UnwrapOutputs, OptionalResult, OutputValues, OutputErrors } from './types';
|
|
4
|
+
export declare function createApp<Args = unknown, Outputs extends BlockOutputsBase = BlockOutputsBase, UiState = unknown, Href extends `/${string}` = `/${string}`>(state: BlockState<Args, Outputs, UiState, Href>, platforma: Platforma<Args, Outputs, UiState, Href>): {
|
|
5
|
+
createArgsModel: <T = Args>(options?: StateModelOptions<Args, T>) => import("./types").Model<T>;
|
|
6
|
+
createUiModel: <T = UiState>(options: StateModelOptions<UiState, T> | undefined, defaultUiState: () => UiState) => import("./types").Model<T>;
|
|
7
|
+
useOutputs: <K extends keyof Outputs>(...keys: K[]) => OptionalResult<UnwrapOutputs<Outputs, K>>;
|
|
8
|
+
unwrapOutputs: <K extends keyof Outputs>(...keys: K[]) => UnwrapOutputs<Outputs, K>;
|
|
9
|
+
getOutputField: (key: keyof Outputs) => Partial<Readonly<Outputs>>[keyof Outputs];
|
|
10
|
+
getOutputFieldOkOptional: <K extends keyof Outputs>(key: K) => UnwrapValueOrErrors<Outputs[K]> | undefined;
|
|
11
|
+
getOutputFieldErrorsOptional: <K extends keyof Outputs>(key: K) => string[] | undefined;
|
|
12
|
+
updateArgs: (cb: (args: Args) => void) => Promise<void>;
|
|
13
|
+
updateUiState: (cb: (args: UiState) => UiState) => Promise<void>;
|
|
14
|
+
updateNavigationState: (cb: (args: Mutable<NavigationState<Href>>) => void) => Promise<void>;
|
|
15
|
+
navigateTo: (href: Href) => Promise<void>;
|
|
16
|
+
args: Readonly<Args>;
|
|
17
|
+
outputs: Partial<Readonly<Outputs>>;
|
|
18
|
+
ui: Readonly<UiState>;
|
|
19
|
+
navigationState: Readonly<NavigationState<Href>>;
|
|
20
|
+
href: Href;
|
|
21
|
+
outputValues: OutputValues<Outputs>;
|
|
22
|
+
outputErrors: OutputErrors<Outputs>;
|
|
23
|
+
queryParams: import("./types").ParseQuery<Href>;
|
|
24
|
+
hasErrors: boolean;
|
|
25
|
+
};
|
|
26
|
+
export type BaseApp<Args = unknown, Outputs extends BlockOutputsBase = BlockOutputsBase, UiState = unknown, Href extends `/${string}` = `/${string}`> = ReturnType<typeof createApp<Args, Outputs, UiState, Href>>;
|
|
27
|
+
//# sourceMappingURL=createApp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createApp.d.ts","sourceRoot":"","sources":["../../src/createApp.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAErG,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,aAAa,EAAE,cAAc,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAKjI,wBAAgB,SAAS,CACvB,IAAI,GAAG,OAAO,EACd,OAAO,SAAS,gBAAgB,GAAG,gBAAgB,EACnD,OAAO,GAAG,OAAO,EACjB,IAAI,SAAS,IAAI,MAAM,EAAE,GAAG,IAAI,MAAM,EAAE,EACxC,KAAK,EAAE,UAAU,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,SAAS,EAAE,SAAS,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,I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AAC,EAAE,CAAC,GAAG,OAAO,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAgFjF"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type BlockOutputsBase, type Platforma } from '@platforma-sdk/model';
|
|
2
|
+
import type { Reactive } from 'vue';
|
|
3
|
+
import { type BaseApp } from './createApp';
|
|
4
|
+
import type { LocalState } from './types';
|
|
5
|
+
export declare function useSdkPlugin(): SdkPlugin;
|
|
6
|
+
export declare function defineApp<Args = unknown, Outputs extends BlockOutputsBase = BlockOutputsBase, UiState = unknown, Href extends `/${string}` = `/${string}`, Local extends LocalState<Href> = LocalState<Href>>(platforma: Platforma<Args, Outputs, UiState, Href>, extendApp: (app: BaseApp<Args, Outputs, UiState, Href>) => Local): {
|
|
7
|
+
loaded: boolean;
|
|
8
|
+
error: unknown;
|
|
9
|
+
useApp: <PageHref extends Href = Href>() => App<Args, Outputs, UiState, PageHref, Local>;
|
|
10
|
+
install: (app: any) => void;
|
|
11
|
+
};
|
|
12
|
+
export type App<Args = unknown, Outputs extends BlockOutputsBase = BlockOutputsBase, UiState = unknown, Href extends `/${string}` = `/${string}`, Local extends LocalState<Href> = LocalState<Href>> = BaseApp<Args, Outputs, UiState, Href> & Reactive<Local>;
|
|
13
|
+
export type SdkPlugin<Args = unknown, Outputs extends BlockOutputsBase = BlockOutputsBase, UiState = unknown, Href extends `/${string}` = `/${string}`> = ReturnType<typeof defineApp<Args, Outputs, UiState, Href>>;
|
|
14
|
+
//# sourceMappingURL=defineApp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defineApp.d.ts","sourceRoot":"","sources":["../../src/defineApp.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC7E,OAAO,KAAK,EAAa,QAAQ,EAAE,MAAM,KAAK,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MAAM,EAAE,IACtC,UAAU,CAAC,OAAO,SAAS,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defineStore.d.ts","sourceRoot":"","sources":["../../src/defineStore.ts"],"names":[],"mappings":"AAsBA,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,EAAE,EAAE,EAAE,MAAM,CAAC,SAO5B,CAAC,GAAG,UAAU,CAE1C"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import './assets/ui.scss';
|
|
2
|
+
import BlockLayout from './components/BlockLayout.vue';
|
|
3
|
+
import PlAgDataTable from './components/PlAgDataTable/PlAgDataTable.vue';
|
|
4
|
+
import ValueOrErrorsComponent from './components/ValueOrErrorsComponent.vue';
|
|
5
|
+
export { BlockLayout, PlAgDataTable, ValueOrErrorsComponent };
|
|
6
|
+
export * from './components/PlAgDataTable/types';
|
|
7
|
+
export * from './defineApp';
|
|
8
|
+
export * from './createModel';
|
|
9
|
+
export * from './types';
|
|
10
|
+
export * from './defineStore';
|
|
11
|
+
export * from './utils';
|
|
12
|
+
export * from './computedResult';
|
|
13
|
+
export * from './composition/useWatchResult';
|
|
14
|
+
export * from '@milaboratories/uikit';
|
|
15
|
+
export type * from '@milaboratories/uikit';
|
|
16
|
+
//# sourceMappingURL=lib.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../src/lib.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,WAAW,MAAM,8BAA8B,CAAC;AACvD,OAAO,aAAa,MAAM,8CAA8C,CAAC;AACzE,OAAO,sBAAsB,MAAM,yCAAyC,CAAC;AAE7E,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,sBAAsB,EAAE,CAAC;AAE9D,cAAc,kCAAkC,CAAC;AAEjD,cAAc,aAAa,CAAC;AAE5B,cAAc,eAAe,CAAC;AAE9B,cAAc,SAAS,CAAC;AAExB,cAAc,eAAe,CAAC;AAE9B,cAAc,SAAS,CAAC;AAExB,cAAc,kBAAkB,CAAC;AAEjC,cAAc,8BAA8B,CAAC;AAE7C,cAAc,uBAAuB,CAAC;AAEtC,mBAAmB,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { BlockOutputsBase, ValueOrErrors } from '@platforma-sdk/model';
|
|
2
|
+
import type { Component, ComputedGetter } from 'vue';
|
|
3
|
+
export type UnwrapValueOrErrors<R extends ValueOrErrors<unknown>> = Extract<R, {
|
|
4
|
+
ok: true;
|
|
5
|
+
}>['value'];
|
|
6
|
+
export interface StateModelOptions<A, T = A> {
|
|
7
|
+
transform?: (v: A) => T;
|
|
8
|
+
validate?: (v: unknown) => A;
|
|
9
|
+
}
|
|
10
|
+
export interface ModelOptions<M, V = M> extends ReadableComputed<M> {
|
|
11
|
+
get(): M;
|
|
12
|
+
validate?(v: unknown): V;
|
|
13
|
+
onSave(v: V): void;
|
|
14
|
+
autoSave?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export type Model<T> = {
|
|
17
|
+
model: T;
|
|
18
|
+
valid: boolean;
|
|
19
|
+
isChanged: boolean;
|
|
20
|
+
error: Error | undefined;
|
|
21
|
+
errorString: string | undefined;
|
|
22
|
+
save: () => void;
|
|
23
|
+
revert: () => void;
|
|
24
|
+
};
|
|
25
|
+
interface ReadableComputed<T> {
|
|
26
|
+
get: ComputedGetter<T>;
|
|
27
|
+
}
|
|
28
|
+
export type StripLastSlash<S extends string> = S extends `${infer Stripped}/` ? Stripped : S;
|
|
29
|
+
export type ParsePathnamePart<S extends string> = S extends `${infer Path}?${string}` ? StripLastSlash<Path> : S;
|
|
30
|
+
export type ParseQueryPart<S extends string> = S extends `${string}?${infer Query}` ? Query : '';
|
|
31
|
+
export type QueryChunks<S extends string> = S extends `${infer Chunk}&${infer Rest}` ? Chunk | QueryChunks<Rest> : S;
|
|
32
|
+
export type SplitChunks<S extends string> = S extends `${infer Key}=${infer Value}` ? [Key, Value] : never;
|
|
33
|
+
export type ParseQuery<QueryString extends string> = {
|
|
34
|
+
[T in SplitChunks<QueryChunks<ParseQueryPart<QueryString>>> as T[0]]: T[1];
|
|
35
|
+
};
|
|
36
|
+
export type Routes<Href extends `/${string}` = `/${string}`> = {
|
|
37
|
+
[P in Href as ParsePathnamePart<P>]: Component;
|
|
38
|
+
};
|
|
39
|
+
export type RouteParams<Href extends `/${string}` = `/${string}`> = {
|
|
40
|
+
[P in Href as ParsePathnamePart<P>]: ParseQuery<P>;
|
|
41
|
+
};
|
|
42
|
+
export type LocalState<Href extends `/${string}` = `/${string}`> = {
|
|
43
|
+
routes: Routes<Href>;
|
|
44
|
+
};
|
|
45
|
+
export type UnwrapValueOrError<W> = W extends {
|
|
46
|
+
ok: true;
|
|
47
|
+
value: infer V;
|
|
48
|
+
} ? V : never;
|
|
49
|
+
export type UnwrapOutputs<Outputs extends BlockOutputsBase, K extends keyof Outputs = keyof Outputs> = {
|
|
50
|
+
[P in K]: UnwrapValueOrError<Outputs[P]>;
|
|
51
|
+
};
|
|
52
|
+
export type ModelResult<T, E = unknown> = {
|
|
53
|
+
ok: true;
|
|
54
|
+
model: T;
|
|
55
|
+
} | {
|
|
56
|
+
ok: false;
|
|
57
|
+
error: E;
|
|
58
|
+
};
|
|
59
|
+
export type OptionalResult<T> = {
|
|
60
|
+
errors?: undefined;
|
|
61
|
+
value?: T;
|
|
62
|
+
} | {
|
|
63
|
+
value?: undefined;
|
|
64
|
+
errors: string[];
|
|
65
|
+
};
|
|
66
|
+
export type OutputValues<Outputs extends BlockOutputsBase> = {
|
|
67
|
+
[P in keyof Outputs]?: UnwrapValueOrError<Outputs[P]>;
|
|
68
|
+
};
|
|
69
|
+
export type OutputErrors<Outputs extends BlockOutputsBase> = {
|
|
70
|
+
[P in keyof Outputs]?: Error;
|
|
71
|
+
};
|
|
72
|
+
export {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F,MAAM,MAAM,YAAY,CAAC,OAAO,SAAS,gBAAgB,IAAI;KAC1D,CAAC,IAAI,MAAM,OAAO,CAAC,CAAC,EAAE,KAAK;CAC7B,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { BlockOutputsBase, InferHrefType, InferOutputsType, Platforma } from '@platforma-sdk/model';
|
|
2
|
+
import type { createApp } from './createApp';
|
|
3
|
+
type InferArgs<Pl extends Platforma> = Pl extends Platforma<infer Args> ? Args : never;
|
|
4
|
+
type InferUiState<Pl extends Platforma> = Pl extends Platforma<unknown, BlockOutputsBase, infer UiState> ? UiState : never;
|
|
5
|
+
export type TestApp<P extends Platforma> = ReturnType<typeof createApp<InferArgs<P>, InferOutputsType<P>, InferUiState<P>, InferHrefType<P>>>;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=types.static-test.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.static-test.d.ts","sourceRoot":"","sources":["../../src/types.static-test.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,aAAa,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACzG,OAAO,KAAK,EAAW,SAAS,EAAE,MAAM,aAAa,CAAC;AAoCtD,KAAK,SAAS,CAAC,EAAE,SAAS,SAAS,IAAI,EAAE,SAAS,SAAS,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,GAAG,KAAK,CAAC;AACvF,KAAK,YAAY,CAAC,EAAE,SAAS,SAAS,IAAI,EAAE,SAAS,SAAS,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC,GAAG,OAAO,GAAG,KAAK,CAAC;AAE3H,MAAM,MAAM,OAAO,CAAC,CAAC,SAAS,SAAS,IAAI,UAAU,CAAC,OAAO,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"urls.d.ts","sourceRoot":"","sources":["../../src/urls.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,eAAO,MAAM,aAAa,SAAU,IAAI,MAAM,EAAE,6BAO/C,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,IAAI,SAAS,IAAI,MAAM,EAAE,QAAQ,IAAI,KACW,UAAU,CAAC,IAAI,CACzF,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ValueOrErrors } from '@platforma-sdk/model';
|
|
2
|
+
import type { OptionalResult } from './types';
|
|
3
|
+
export declare class UnresolvedError extends Error {
|
|
4
|
+
}
|
|
5
|
+
export declare class MultiError extends Error {
|
|
6
|
+
readonly errors: string[];
|
|
7
|
+
constructor(errors: string[]);
|
|
8
|
+
toString(): string;
|
|
9
|
+
}
|
|
10
|
+
export declare function wrapValueOrErrors<V>(value: V): ValueOrErrors<V>;
|
|
11
|
+
export declare function unwrapValueOrErrors<V>(valueOrErrors?: ValueOrErrors<V>): V;
|
|
12
|
+
export declare function wrapOptionalResult<V>(value: V): OptionalResult<V>;
|
|
13
|
+
export declare function unwrapOptionalResult<V>(result: OptionalResult<V>): V;
|
|
14
|
+
export declare function isDefined<T>(v: T | undefined): v is T;
|
|
15
|
+
export declare function getFilePathBreadcrumbs(filePath: string): {
|
|
16
|
+
index: number;
|
|
17
|
+
path: string;
|
|
18
|
+
name: string;
|
|
19
|
+
}[];
|
|
20
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,qBAAa,eAAgB,SAAQ,KAAK;CAAG;AAE7C,qBAAa,UAAW,SAAQ,KAAK;aACP,MAAM,EAAE,MAAM,EAAE;gBAAhB,MAAM,EAAE,MAAM,EAAE;IAK5C,QAAQ;CAGT;AAED,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAK/D;AAED,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,aAAa,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC,CAU1E;AAID,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAKjE;AAED,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,CAAC,CAUpE;AAED,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,SAAS,GAAG,CAAC,IAAI,CAAC,CAErD;AAED,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM;WAG/B,MAAM;UAAQ,MAAM;UAAQ,MAAM;IAWzD"}
|