vuesp-components 1.0.0 → 1.1.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/dist/App.vue.d.ts +1 -1
- package/dist/App.vue.d.ts.map +1 -1
- package/dist/components/app/AppAside.vue.d.ts +3 -3
- package/dist/components/app/AppAside.vue.d.ts.map +1 -1
- package/dist/components/app/AppDialog.vue.d.ts +7 -5
- package/dist/components/app/AppDialog.vue.d.ts.map +1 -1
- package/dist/components/app/AppHeader.vue.d.ts +9 -5
- package/dist/components/app/AppHeader.vue.d.ts.map +1 -1
- package/dist/components/app/AppNav.vue.d.ts +3 -3
- package/dist/components/app/AppNotification.vue.d.ts +33 -7
- package/dist/components/app/AppNotification.vue.d.ts.map +1 -1
- package/dist/components/app/AppOverlay.vue.d.ts +1 -1
- package/dist/components/app/AppOverlay.vue.d.ts.map +1 -1
- package/dist/components/app/AppProgress.vue.d.ts +24 -0
- package/dist/components/app/AppProgress.vue.d.ts.map +1 -0
- package/dist/components/app/index.d.ts +2 -1
- package/dist/components/app/index.d.ts.map +1 -1
- package/dist/components/dashboard/cards/CardBase.vue.d.ts +87 -47
- package/dist/components/dashboard/cards/CardBase.vue.d.ts.map +1 -1
- package/dist/components/dashboard/cards/CardButton.vue.d.ts +3 -3
- package/dist/components/dashboard/cards/CardButton.vue.d.ts.map +1 -1
- package/dist/components/dashboard/cards/CardDate.vue.d.ts +3 -3
- package/dist/components/dashboard/cards/CardDate.vue.d.ts.map +1 -1
- package/dist/components/dashboard/cards/CardDimmer.vue.d.ts +3 -3
- package/dist/components/dashboard/cards/CardDimmer.vue.d.ts.map +1 -1
- package/dist/components/dashboard/cards/CardInfo.vue.d.ts +4 -4
- package/dist/components/dashboard/cards/CardInfo.vue.d.ts.map +1 -1
- package/dist/components/dashboard/cards/CardInput.vue.d.ts +3 -3
- package/dist/components/dashboard/cards/CardInput.vue.d.ts.map +1 -1
- package/dist/components/dashboard/cards/CardList.vue.d.ts +3 -3
- package/dist/components/dashboard/cards/CardList.vue.d.ts.map +1 -1
- package/dist/components/dashboard/edit/ItemEdit.vue.d.ts +29 -0
- package/dist/components/dashboard/edit/ItemEdit.vue.d.ts.map +1 -0
- package/dist/components/dashboard/edit/ItemOptions.vue.d.ts +18 -0
- package/dist/components/dashboard/edit/ItemOptions.vue.d.ts.map +1 -0
- package/dist/components/dashboard/index.d.ts +2 -3
- package/dist/components/dashboard/index.d.ts.map +1 -1
- package/dist/components/general/blocks/BlockBreadcrumb.vue.d.ts +3 -3
- package/dist/components/general/blocks/BlockBreadcrumb.vue.d.ts.map +1 -1
- package/dist/components/general/blocks/BlockInfo.vue.d.ts +22 -2
- package/dist/components/general/blocks/BlockInfo.vue.d.ts.map +1 -1
- package/dist/components/general/blocks/BlockTable.vue.d.ts +3 -3
- package/dist/components/general/blocks/BlockTable.vue.d.ts.map +1 -1
- package/dist/components/general/blocks/index.d.ts +1 -2
- package/dist/components/general/blocks/index.d.ts.map +1 -1
- package/dist/components/general/cards/CardGray.vue.d.ts +3 -3
- package/dist/components/general/cards/CardGray.vue.d.ts.map +1 -1
- package/dist/components/general/cards/CardNotification.vue.d.ts +8 -15
- package/dist/components/general/cards/CardNotification.vue.d.ts.map +1 -1
- package/dist/components/general/forms/VAutocomplete.vue.d.ts +34 -0
- package/dist/components/general/forms/VAutocomplete.vue.d.ts.map +1 -0
- package/dist/components/general/forms/VButton.vue.d.ts +7 -7
- package/dist/components/general/forms/VButton.vue.d.ts.map +1 -1
- package/dist/components/general/forms/VCheckbox.vue.d.ts +7 -5
- package/dist/components/general/forms/VCheckbox.vue.d.ts.map +1 -1
- package/dist/components/general/forms/VDragDrop.vue.d.ts +43 -0
- package/dist/components/general/forms/VDragDrop.vue.d.ts.map +1 -0
- package/dist/components/general/forms/VDropdown.vue.d.ts +8 -6
- package/dist/components/general/forms/VDropdown.vue.d.ts.map +1 -1
- package/dist/components/general/forms/VExpansion.vue.d.ts +2 -2
- package/dist/components/general/forms/VExpansion.vue.d.ts.map +1 -1
- package/dist/components/general/forms/{VTextFieldFile.vue.d.ts → VFile.vue.d.ts} +7 -14
- package/dist/components/general/forms/VFile.vue.d.ts.map +1 -0
- package/dist/components/general/forms/VFunc.vue.d.ts +20 -0
- package/dist/components/general/forms/VFunc.vue.d.ts.map +1 -0
- package/dist/components/general/forms/VIcons.vue.d.ts +1 -1
- package/dist/components/general/forms/VIcons.vue.d.ts.map +1 -1
- package/dist/components/general/forms/VList.vue.d.ts +6 -5
- package/dist/components/general/forms/VList.vue.d.ts.map +1 -1
- package/dist/components/general/forms/VListObject.vue.d.ts +7 -5
- package/dist/components/general/forms/VListObject.vue.d.ts.map +1 -1
- package/dist/components/general/forms/VLoader.vue.d.ts +1 -1
- package/dist/components/general/forms/VSelect.vue.d.ts +10 -10
- package/dist/components/general/forms/VSelect.vue.d.ts.map +1 -1
- package/dist/components/general/forms/VTabs.vue.d.ts +29 -0
- package/dist/components/general/forms/VTabs.vue.d.ts.map +1 -0
- package/dist/components/general/forms/VTextField.vue.d.ts +5 -5
- package/dist/components/general/forms/VTextField.vue.d.ts.map +1 -1
- package/dist/components/general/forms/VTextWrapper.vue.d.ts +29 -0
- package/dist/components/general/forms/VTextWrapper.vue.d.ts.map +1 -0
- package/dist/components/general/forms/VWifiIcon.vue.d.ts +1 -1
- package/dist/components/general/forms/index.d.ts +5 -2
- package/dist/components/general/forms/index.d.ts.map +1 -1
- package/dist/composables/index.d.ts +2 -0
- package/dist/composables/index.d.ts.map +1 -0
- package/dist/composables/index.es.js +71 -0
- package/dist/composables/types.d.ts +36 -0
- package/dist/composables/types.d.ts.map +1 -0
- package/dist/composables/useForms.d.ts +3 -0
- package/dist/composables/useForms.d.ts.map +1 -0
- package/dist/const/lists.d.ts +4 -0
- package/dist/const/lists.d.ts.map +1 -0
- package/dist/dashboard/index.d.ts +18 -20
- package/dist/dashboard/index.d.ts.map +1 -1
- package/dist/dashboard/index.es.js +35 -133
- package/dist/dashboard/types.d.ts +18 -31
- package/dist/dashboard/types.d.ts.map +1 -1
- package/dist/helpers/app.d.ts +1 -10
- package/dist/helpers/app.d.ts.map +1 -1
- package/dist/helpers/fetch.d.ts +14 -0
- package/dist/helpers/fetch.d.ts.map +1 -0
- package/dist/helpers/general.d.ts +11 -0
- package/dist/helpers/general.d.ts.map +1 -0
- package/dist/helpers/index.d.ts +4 -1
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/helpers/index.es.js +50 -28
- package/dist/helpers/utils.d.ts +2 -0
- package/dist/helpers/utils.d.ts.map +1 -0
- package/dist/helpers/web-api.d.ts +7 -0
- package/dist/helpers/web-api.d.ts.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +1904 -1450
- package/dist/plugins/i18n/index.d.ts +4 -0
- package/dist/plugins/i18n/index.d.ts.map +1 -0
- package/dist/plugins/i18n/types.d.ts +34 -0
- package/dist/plugins/i18n/types.d.ts.map +1 -0
- package/dist/plugins/index.d.ts +3 -0
- package/dist/plugins/index.d.ts.map +1 -0
- package/dist/plugins/index.es.js +34 -0
- package/dist/plugins/types.d.ts +13 -0
- package/dist/plugins/types.d.ts.map +1 -0
- package/dist/style.css +1 -1
- package/dist/types/components.d.ts +6 -16
- package/dist/types/components.d.ts.map +1 -1
- package/dist/types/messages.d.ts +110 -0
- package/dist/types/messages.d.ts.map +1 -0
- package/dist/types/state.d.ts +43 -0
- package/dist/types/state.d.ts.map +1 -0
- package/dist/types/types.d.ts +3 -1
- package/dist/types/types.d.ts.map +1 -1
- package/dist/utils-r5TQv-RW.js +62 -0
- package/package.json +16 -5
- package/dist/app-B-BsxziJ.js +0 -47
- package/dist/components/dashboard/BlockItemEdit.vue.d.ts +0 -16
- package/dist/components/dashboard/BlockItemEdit.vue.d.ts.map +0 -1
- package/dist/components/dashboard/cards/CardSwitch.vue.d.ts +0 -10
- package/dist/components/dashboard/cards/CardSwitch.vue.d.ts.map +0 -1
- package/dist/components/general/blocks/BlockStatus.vue.d.ts +0 -19
- package/dist/components/general/blocks/BlockStatus.vue.d.ts.map +0 -1
- package/dist/components/general/forms/VTextFieldFile.vue.d.ts.map +0 -1
- package/dist/dashboard/utils.d.ts +0 -7
- package/dist/dashboard/utils.d.ts.map +0 -1
- package/dist/helpers/fs.d.ts +0 -9
- package/dist/helpers/fs.d.ts.map +0 -1
- package/dist/types/store.d.ts +0 -104
- package/dist/types/store.d.ts.map +0 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
value: number;
|
|
3
|
+
items: {
|
|
4
|
+
title: string;
|
|
5
|
+
}[];
|
|
6
|
+
}
|
|
7
|
+
declare function __VLS_template(): {
|
|
8
|
+
attrs: Partial<{}>;
|
|
9
|
+
slots: Partial<Record<`tab-${number}`, (_: {}) => any>>;
|
|
10
|
+
refs: {};
|
|
11
|
+
rootEl: HTMLDivElement;
|
|
12
|
+
};
|
|
13
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
14
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {
|
|
15
|
+
setActiveTab: (i: number) => void;
|
|
16
|
+
activeTab: import('vue').Ref<number, number>;
|
|
17
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
18
|
+
click: (index: number) => any;
|
|
19
|
+
}, string, import('vue').PublicProps, Readonly<Props & {
|
|
20
|
+
onClick?: ((index: number) => any) | undefined;
|
|
21
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}>;
|
|
22
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
23
|
+
export default _default;
|
|
24
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
25
|
+
new (): {
|
|
26
|
+
$slots: S;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=VTabs.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VTabs.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/general/forms/VTabs.vue"],"names":[],"mappings":"AAgCA;AAiEA,UAAU,KAAK;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAC5B;AA+BD,iBAAS,cAAc;WA4ET,OAAO,IAA6B;sDAXmC,GAAG;;;EAgBvF;AAYD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;sBA9GI,MAAM;;;;;;6EAuH7B,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
interface Props {
|
|
2
|
-
modelValue?: number | string
|
|
2
|
+
modelValue?: number | string;
|
|
3
3
|
label?: string;
|
|
4
4
|
component?: string;
|
|
5
5
|
type?: string;
|
|
6
6
|
message?: string;
|
|
7
7
|
readonly?: boolean;
|
|
8
|
-
disabled?: boolean;
|
|
8
|
+
disabled?: boolean | number;
|
|
9
9
|
active?: boolean;
|
|
10
10
|
hideMessage?: boolean;
|
|
11
11
|
rules?: any[];
|
|
@@ -20,19 +20,19 @@ declare function __VLS_template(): {
|
|
|
20
20
|
rootEl: HTMLDivElement;
|
|
21
21
|
};
|
|
22
22
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
23
|
-
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
23
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
24
24
|
click: (event: Event) => any;
|
|
25
25
|
blur: (event: Event) => any;
|
|
26
26
|
"update:modelValue": (event: string) => any;
|
|
27
27
|
"on-icon": (event: Event) => any;
|
|
28
28
|
enter: (event: Event) => any;
|
|
29
|
-
}, string, import('vue').PublicProps, Readonly<Props
|
|
29
|
+
}, string, import('vue').PublicProps, Readonly<Props & {
|
|
30
30
|
onClick?: ((event: Event) => any) | undefined;
|
|
31
31
|
onBlur?: ((event: Event) => any) | undefined;
|
|
32
32
|
"onUpdate:modelValue"?: ((event: string) => any) | undefined;
|
|
33
33
|
"onOn-icon"?: ((event: Event) => any) | undefined;
|
|
34
34
|
onEnter?: ((event: Event) => any) | undefined;
|
|
35
|
-
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}
|
|
35
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}>;
|
|
36
36
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
37
37
|
export default _default;
|
|
38
38
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VTextField.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/general/forms/VTextField.vue"],"names":[],"mappings":"AA0CA;
|
|
1
|
+
{"version":3,"file":"VTextField.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/general/forms/VTextField.vue"],"names":[],"mappings":"AA0CA;AA4GA,UAAU,KAAK;IACb,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC5B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC;CACf;AAoDD,iBAAS,cAAc;WA+FT,OAAO,IAA6B;;sBAZvB,GAAG;yBACA,GAAG;;;;EAgBhC;AAmBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;6EAQnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
active: boolean;
|
|
3
|
+
label?: string;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
hideIcon?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare function __VLS_template(): {
|
|
8
|
+
attrs: Partial<{}>;
|
|
9
|
+
slots: {
|
|
10
|
+
default?(_: {}): any;
|
|
11
|
+
icon?(_: {}): any;
|
|
12
|
+
};
|
|
13
|
+
refs: {};
|
|
14
|
+
rootEl: HTMLDivElement;
|
|
15
|
+
};
|
|
16
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
17
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
18
|
+
icon: (event: Event) => any;
|
|
19
|
+
}, string, import('vue').PublicProps, Readonly<Props & {
|
|
20
|
+
onIcon?: ((event: Event) => any) | undefined;
|
|
21
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}>;
|
|
22
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
23
|
+
export default _default;
|
|
24
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
25
|
+
new (): {
|
|
26
|
+
$slots: S;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=VTextWrapper.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VTextWrapper.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/general/forms/VTextWrapper.vue"],"names":[],"mappings":"AAqBA;AAiDA,UAAU,KAAK;IACb,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAgBD,iBAAS,cAAc;WA2DT,OAAO,IAA6B;;yBAXrB,GAAG;sBACN,GAAG;;;;EAe5B;AAaD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;6EAQnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -2,6 +2,6 @@ interface Props {
|
|
|
2
2
|
rssi?: number;
|
|
3
3
|
channel?: number;
|
|
4
4
|
}
|
|
5
|
-
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props
|
|
5
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props & {}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}>;
|
|
6
6
|
export default _default;
|
|
7
7
|
//# sourceMappingURL=VWifiIcon.vue.d.ts.map
|
|
@@ -7,9 +7,12 @@ import { default as VExpansion } from './VExpansion.vue';
|
|
|
7
7
|
import { default as VList } from './VList.vue';
|
|
8
8
|
import { default as VSelect } from './VSelect.vue';
|
|
9
9
|
import { default as VTextField } from './VTextField.vue';
|
|
10
|
-
import { default as
|
|
10
|
+
import { default as VFile } from './VFile.vue';
|
|
11
11
|
import { default as VIcons } from './VIcons.vue';
|
|
12
12
|
import { default as VWifiIcon } from './VWifiIcon.vue';
|
|
13
13
|
import { default as VListObject } from './VListObject.vue';
|
|
14
|
-
|
|
14
|
+
import { default as VDragDrop } from './VDragDrop.vue';
|
|
15
|
+
import { default as VFunc } from './VFunc.vue';
|
|
16
|
+
import { default as VTextWrapper } from './VTextWrapper.vue';
|
|
17
|
+
export { VAutocomplete, VButton, VLoader, VCheckbox, VDropdown, VExpansion, VList, VSelect, VTextField, VFile, VIcons, VWifiIcon, VListObject, VDragDrop, VTextWrapper, VFunc };
|
|
15
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/general/forms/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,8CAA8C,CAAC;AACzE,OAAO,OAAO,MAAM,wCAAwC,CAAC;AAC7D,OAAO,OAAO,MAAM,wCAAwC,CAAC;AAC7D,OAAO,SAAS,MAAM,0CAA0C,CAAC;AACjE,OAAO,SAAS,MAAM,0CAA0C,CAAC;AACjE,OAAO,UAAU,MAAM,2CAA2C,CAAC;AACnE,OAAO,KAAK,MAAM,sCAAsC,CAAC;AACzD,OAAO,OAAO,MAAM,wCAAwC,CAAC;AAC7D,OAAO,UAAU,MAAM,2CAA2C,CAAC;AACnE,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/general/forms/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,8CAA8C,CAAC;AACzE,OAAO,OAAO,MAAM,wCAAwC,CAAC;AAC7D,OAAO,OAAO,MAAM,wCAAwC,CAAC;AAC7D,OAAO,SAAS,MAAM,0CAA0C,CAAC;AACjE,OAAO,SAAS,MAAM,0CAA0C,CAAC;AACjE,OAAO,UAAU,MAAM,2CAA2C,CAAC;AACnE,OAAO,KAAK,MAAM,sCAAsC,CAAC;AACzD,OAAO,OAAO,MAAM,wCAAwC,CAAC;AAC7D,OAAO,UAAU,MAAM,2CAA2C,CAAC;AACnE,OAAO,KAAK,MAAM,sCAAsC,CAAC;AACzD,OAAO,MAAM,MAAM,uCAAuC,CAAC;AAC3D,OAAO,SAAS,MAAM,0CAA0C,CAAC;AACjE,OAAO,WAAW,MAAM,4CAA4C,CAAC;AACrE,OAAO,SAAS,MAAM,0CAA0C,CAAC;AACjE,OAAO,KAAK,MAAM,sCAAsC,CAAC;AACzD,OAAO,YAAY,MAAM,6CAA6C,CAAC;AAEvE,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/composables/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { reactive as h, computed as F } from "vue";
|
|
2
|
+
function S(d) {
|
|
3
|
+
const { validationSchema: n, initialValues: f = {} } = d, s = h({}), e = h({}), u = h({}), l = h({}), E = () => {
|
|
4
|
+
Object.keys(n).forEach((t) => {
|
|
5
|
+
s[t] = f[t] || "", e[t] = [], u[t] = !1, l[t] = !1;
|
|
6
|
+
});
|
|
7
|
+
}, v = (t, r) => {
|
|
8
|
+
const a = n[t] || [], c = [];
|
|
9
|
+
for (const i of a) {
|
|
10
|
+
const o = i(r, s);
|
|
11
|
+
o !== !0 && c.push(o);
|
|
12
|
+
}
|
|
13
|
+
return e[t] = c, c.length === 0;
|
|
14
|
+
}, y = () => {
|
|
15
|
+
let t = !0;
|
|
16
|
+
return Object.keys(n).forEach((r) => {
|
|
17
|
+
v(r, s[r]) || (t = !1);
|
|
18
|
+
}), t;
|
|
19
|
+
}, V = (t, r = {}) => {
|
|
20
|
+
n[t] || console.warn(`Field "${t}" not found in validationSchema`);
|
|
21
|
+
const a = F({
|
|
22
|
+
get: () => s[t],
|
|
23
|
+
set: (i) => {
|
|
24
|
+
s[t] = i, l[t] = !0, Object.keys(n).forEach((o) => {
|
|
25
|
+
v(o, s[o]);
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
}), c = F(() => {
|
|
29
|
+
var b;
|
|
30
|
+
const i = {
|
|
31
|
+
errors: e[t] || [],
|
|
32
|
+
touched: u[t] || !1,
|
|
33
|
+
dirty: l[t] || !1
|
|
34
|
+
}, o = {
|
|
35
|
+
message: (b = e[t]) == null ? void 0 : b[0],
|
|
36
|
+
onInput: (p) => {
|
|
37
|
+
const k = p.target;
|
|
38
|
+
a.value = k.value;
|
|
39
|
+
},
|
|
40
|
+
onBlur: () => {
|
|
41
|
+
u[t] = !0, v(t, s[t]);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
if (r.props) {
|
|
45
|
+
const p = r.props(i);
|
|
46
|
+
return { ...o, ...p };
|
|
47
|
+
}
|
|
48
|
+
return o;
|
|
49
|
+
});
|
|
50
|
+
return [a, c];
|
|
51
|
+
}, g = (t) => async (r) => {
|
|
52
|
+
r && r.preventDefault(), Object.keys(n).forEach((c) => {
|
|
53
|
+
u[c] = !0;
|
|
54
|
+
}), y() && await t(s);
|
|
55
|
+
}, j = () => {
|
|
56
|
+
Object.keys(n).forEach((t) => {
|
|
57
|
+
s[t] = f[t] || "", e[t] = [], u[t] = !1, l[t] = !1;
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
return E(), {
|
|
61
|
+
values: s,
|
|
62
|
+
errors: e,
|
|
63
|
+
defineField: V,
|
|
64
|
+
handleSubmit: g,
|
|
65
|
+
resetForm: j,
|
|
66
|
+
validate: y
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
export {
|
|
70
|
+
S as useForm
|
|
71
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Ref, ComputedRef } from 'vue';
|
|
2
|
+
export type Validator = (value: any, values?: Record<string, any>) => true | string;
|
|
3
|
+
export type ValidationSchema = Record<string, Validator[]>;
|
|
4
|
+
export interface FieldState {
|
|
5
|
+
value: any;
|
|
6
|
+
errors: string[];
|
|
7
|
+
touched: boolean;
|
|
8
|
+
dirty: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface FormState {
|
|
11
|
+
values: Record<string, any>;
|
|
12
|
+
errors: Record<string, string[]>;
|
|
13
|
+
touched: Record<string, boolean>;
|
|
14
|
+
dirty: Record<string, boolean>;
|
|
15
|
+
}
|
|
16
|
+
export interface DefineFieldOptions {
|
|
17
|
+
props?: (context: FieldContext) => Record<string, any>;
|
|
18
|
+
}
|
|
19
|
+
export interface FieldContext {
|
|
20
|
+
errors: string[];
|
|
21
|
+
touched: boolean;
|
|
22
|
+
dirty: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface UseFormOptions {
|
|
25
|
+
validationSchema: ValidationSchema;
|
|
26
|
+
initialValues?: Record<string, any>;
|
|
27
|
+
}
|
|
28
|
+
export interface UseFormReturn {
|
|
29
|
+
values: Record<string, any>;
|
|
30
|
+
errors: Record<string, string[]>;
|
|
31
|
+
defineField: <T = any>(name: string, options?: DefineFieldOptions) => [Ref<T>, ComputedRef<Record<string, any>>];
|
|
32
|
+
handleSubmit: (callback: (values: Record<string, any>) => void | Promise<void>) => (event?: Event) => Promise<void>;
|
|
33
|
+
resetForm: () => void;
|
|
34
|
+
validate: () => boolean;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/composables/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AAE5C,MAAM,MAAM,SAAS,GAAG,CAAC,KAAK,EAAE,GAAG,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,GAAG,MAAM,CAAC;AACpF,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;AAE3D,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,GAAG,CAAC;IACX,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IACjC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACxD;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,cAAc;IAC7B,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACrC;AAED,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IACjC,WAAW,EAAE,CAAC,CAAC,GAAG,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,kBAAkB,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;IACjH,YAAY,EAAE,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,KAAK,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACpH,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,OAAO,CAAC;CACzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useForms.d.ts","sourceRoot":"","sources":["../../src/composables/useForms.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAoC,MAAM,qBAAqB,CAAC;AAG3G,wBAAgB,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,aAAa,CA2H9D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lists.d.ts","sourceRoot":"","sources":["../../src/const/lists.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AA6C/C,eAAO,MAAM,SAAS,EAAE,SAAS,EAAwE,CAAC;AAC1G,eAAO,MAAM,aAAa,EAAE,SAAS,EAAoG,CAAC"}
|
|
@@ -1,21 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export declare
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
getObjectList(): {};
|
|
20
|
-
}
|
|
1
|
+
import { TypeGetDataValue, TypeGetParamsData, IDashboardItem } from '../types/types';
|
|
2
|
+
export declare const getDataValue: TypeGetDataValue;
|
|
3
|
+
export declare const getParamsData: TypeGetParamsData;
|
|
4
|
+
export declare const getFunction: (body: string | undefined) => Function | null;
|
|
5
|
+
export declare const setStateItem: <T>(item: IDashboardItem, value: unknown, object: T) => any;
|
|
6
|
+
export declare const getStateItem: <T>(item: IDashboardItem, object: T) => {
|
|
7
|
+
value: string | NonNullable<import('../types/types').GetTypeByPath<T, string>>;
|
|
8
|
+
valueTo: string | NonNullable<import('../types/types').GetTypeByPath<T, string>>;
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
type: string;
|
|
12
|
+
icon: string;
|
|
13
|
+
opts?: import('../types/types').IDashboardItemOptions;
|
|
14
|
+
args: string[];
|
|
15
|
+
set?: string;
|
|
16
|
+
get?: string;
|
|
17
|
+
getTo?: string;
|
|
18
|
+
};
|
|
21
19
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dashboard/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dashboard/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEzF,eAAO,MAAM,YAAY,EAAE,gBAY1B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,iBAE3B,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,MAAM,MAAM,GAAG,SAAS,oBAInD,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,CAAC,EAAE,MAAM,cAAc,EAAE,OAAO,OAAO,EAAE,QAAQ,CAAC,QAU9E,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,CAAC,EAAE,MAAM,cAAc,EAAE,QAAQ,CAAC;;;;;;;;;;;;CAkB9D,CAAC"}
|
|
@@ -1,137 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
const v = (t, n) => {
|
|
2
|
+
const r = t.split(".");
|
|
3
|
+
let e = n;
|
|
4
|
+
for (const c of r)
|
|
5
|
+
if (e !== null && typeof e == "object" && c in e)
|
|
6
|
+
e = e[c];
|
|
7
|
+
else
|
|
8
|
+
return;
|
|
9
|
+
return e;
|
|
10
|
+
}, i = ({ args: t }, n) => t.map((r) => v(r, n)), l = (t) => t ? (t = t.includes("return") ? t : `return ${t}`, new Function("v", "a", "b", "c", t)) : null, F = (t, n, r) => {
|
|
11
|
+
const [e, ...c] = i(t, r);
|
|
12
|
+
let s = null;
|
|
10
13
|
try {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
return t;
|
|
14
|
+
const o = l(t.set);
|
|
15
|
+
o && (s = o(n, ...c));
|
|
16
|
+
} catch (o) {
|
|
17
|
+
console.warn(o);
|
|
18
|
+
}
|
|
19
|
+
return s;
|
|
20
|
+
}, p = (t, n) => {
|
|
21
|
+
const r = i(t, n), [e, c, s, o] = r;
|
|
22
|
+
let a = e ?? "", g = a;
|
|
23
|
+
try {
|
|
24
|
+
const u = l(t.get);
|
|
25
|
+
u && (a = u(a, c, s, o));
|
|
26
|
+
const f = l(t.getTo);
|
|
27
|
+
f && (g = f(a, c, s, o));
|
|
28
|
+
} catch (u) {
|
|
29
|
+
console.warn(u);
|
|
30
|
+
}
|
|
31
|
+
return { ...t, value: a, valueTo: g };
|
|
32
32
|
};
|
|
33
|
-
class DashboardItem {
|
|
34
|
-
constructor({ id: e, name: t, keyValue: s, type: r, icon: i, min: a, max: c, list: u, get: l, set: h, modifyValue: f }) {
|
|
35
|
-
o(this, "id");
|
|
36
|
-
o(this, "name");
|
|
37
|
-
o(this, "keyValue");
|
|
38
|
-
o(this, "type");
|
|
39
|
-
o(this, "icon");
|
|
40
|
-
o(this, "min");
|
|
41
|
-
o(this, "max");
|
|
42
|
-
o(this, "list");
|
|
43
|
-
o(this, "set");
|
|
44
|
-
o(this, "get");
|
|
45
|
-
o(this, "modifyValue");
|
|
46
|
-
this.id = e, this.name = t, this.keyValue = s, this.type = r, this.icon = i, this.min = a, this.max = c, this.list = u, this.set = h, this.get = l, this.modifyValue = f;
|
|
47
|
-
}
|
|
48
|
-
getItem(e) {
|
|
49
|
-
if (this.get)
|
|
50
|
-
try {
|
|
51
|
-
return this.get(e);
|
|
52
|
-
} catch {
|
|
53
|
-
return null;
|
|
54
|
-
}
|
|
55
|
-
return null;
|
|
56
|
-
}
|
|
57
|
-
setItem(e, t) {
|
|
58
|
-
if (this.set)
|
|
59
|
-
try {
|
|
60
|
-
return this.set(e, t);
|
|
61
|
-
} catch {
|
|
62
|
-
return null;
|
|
63
|
-
}
|
|
64
|
-
return null;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
class Dashboard {
|
|
68
|
-
constructor(e) {
|
|
69
|
-
o(this, "items");
|
|
70
|
-
o(this, "data");
|
|
71
|
-
this.items = /* @__PURE__ */ new Map(), this.init(e);
|
|
72
|
-
}
|
|
73
|
-
init(e) {
|
|
74
|
-
for (let t = 0; t < e.length; t++) {
|
|
75
|
-
const s = e[t];
|
|
76
|
-
this.items.set(s.id, new DashboardItem(s));
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
setDataValue({ keyValue: e }, t) {
|
|
80
|
-
const s = e.split(".");
|
|
81
|
-
let r = this.data;
|
|
82
|
-
for (let i = 0; i < s.length - 1; i++)
|
|
83
|
-
r = r[s[i]];
|
|
84
|
-
r[s[s.length - 1]] = t;
|
|
85
|
-
}
|
|
86
|
-
getDataValue({ keyValue: e }) {
|
|
87
|
-
const t = e.split(".");
|
|
88
|
-
let s = this.data;
|
|
89
|
-
for (const r of t)
|
|
90
|
-
if (s !== null && typeof s == "object" && r in s) s = s[r];
|
|
91
|
-
else return;
|
|
92
|
-
return s;
|
|
93
|
-
}
|
|
94
|
-
setData(e) {
|
|
95
|
-
return this.data = { ...e }, this;
|
|
96
|
-
}
|
|
97
|
-
getData() {
|
|
98
|
-
return this.data;
|
|
99
|
-
}
|
|
100
|
-
get(e) {
|
|
101
|
-
const t = this.items.get(e);
|
|
102
|
-
if (!t) return !1;
|
|
103
|
-
const s = this.getDataValue(t);
|
|
104
|
-
return t != null && t.getItem ? t.getItem(s) : null;
|
|
105
|
-
}
|
|
106
|
-
set(e, t) {
|
|
107
|
-
const s = this.items.get(e);
|
|
108
|
-
if (!s) return !1;
|
|
109
|
-
const r = this.getDataValue(s), i = s != null && s.setItem ? s.setItem(r, t) : null;
|
|
110
|
-
return i !== null && this.setDataValue(s, i), i;
|
|
111
|
-
}
|
|
112
|
-
editItem(e, t) {
|
|
113
|
-
t && this.items.set(e, stringToFunction(t));
|
|
114
|
-
}
|
|
115
|
-
removeItem(e) {
|
|
116
|
-
this.items.delete(e);
|
|
117
|
-
}
|
|
118
|
-
saveList() {
|
|
119
|
-
const e = Array.from(this.items, ([s, r]) => ({ ...r }));
|
|
120
|
-
return `export default ${saveObjectWithFunctions(e)};`;
|
|
121
|
-
}
|
|
122
|
-
getList() {
|
|
123
|
-
return Array.from(this.items, ([e, t]) => t);
|
|
124
|
-
}
|
|
125
|
-
getObjectList() {
|
|
126
|
-
const e = Array.from(this.items, ([t, s]) => s.id);
|
|
127
|
-
return createObjectFromPaths(e);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
33
|
export {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
stringToFunction
|
|
34
|
+
v as getDataValue,
|
|
35
|
+
l as getFunction,
|
|
36
|
+
i as getParamsData,
|
|
37
|
+
p as getStateItem,
|
|
38
|
+
F as setStateItem
|
|
137
39
|
};
|
|
@@ -1,38 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { IListItem } from '../types/types';
|
|
2
|
+
export interface IDashboardItemOptions {
|
|
3
|
+
disabled?: number;
|
|
4
|
+
min?: number;
|
|
5
|
+
max?: number;
|
|
6
|
+
step?: number;
|
|
7
|
+
list?: IListItem[];
|
|
4
8
|
}
|
|
5
9
|
export interface IDashboardItem {
|
|
6
10
|
id: string;
|
|
7
11
|
name: string;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
list?: ISelectList[];
|
|
15
|
-
get?: (output: any) => any;
|
|
16
|
-
set?: (output: any, value: any) => any;
|
|
17
|
-
modifyValue?: (value: any) => any;
|
|
18
|
-
getItem?: (output: any) => any;
|
|
19
|
-
setItem?: (output: any, value: any) => any;
|
|
20
|
-
}
|
|
21
|
-
export interface IDashboardItemString extends Omit<IDashboardItem, 'get' | 'set' | 'modifyValue'> {
|
|
22
|
-
get?: string;
|
|
12
|
+
type: string;
|
|
13
|
+
icon: string;
|
|
14
|
+
value: string | number;
|
|
15
|
+
valueTo?: string | number;
|
|
16
|
+
opts?: IDashboardItemOptions;
|
|
17
|
+
args: string[];
|
|
23
18
|
set?: string;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
export interface IDashboard {
|
|
27
|
-
items: Map<string, IDashboardItem>;
|
|
28
|
-
data: any;
|
|
29
|
-
removeItem: (id: string) => void;
|
|
30
|
-
editItem: (id: string, item: IDashboardItemString) => void;
|
|
31
|
-
setData: (data: any) => IDashboard;
|
|
32
|
-
getData: () => any;
|
|
33
|
-
saveList: () => string;
|
|
34
|
-
getList: () => IDashboardItem[];
|
|
35
|
-
get: (id: string) => any;
|
|
36
|
-
set: (id: string, value: any) => any;
|
|
19
|
+
get?: string;
|
|
20
|
+
getTo?: string;
|
|
37
21
|
}
|
|
22
|
+
export type GetTypeByPath<T, Path extends string> = Path extends keyof T ? T[Path] : Path extends `${infer K}.${infer R}` ? (K extends keyof T ? GetTypeByPath<T[K], R> : never) : never;
|
|
23
|
+
export type TypeGetDataValue = <T extends string, S>(key: T, main: S) => GetTypeByPath<S, T> | undefined;
|
|
24
|
+
export type TypeGetParamsData = <S>(item: IDashboardItem, main: S) => (GetTypeByPath<S, string> | undefined)[];
|
|
38
25
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/dashboard/types.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/dashboard/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,SAAS,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,IAAI,CAAC,EAAE,qBAAqB,CAAC;IAC7B,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,aAAa,CAAC,CAAC,EAAE,IAAI,SAAS,MAAM,IAAI,IAAI,SAAS,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,IAAI,SAAS,GAAG,MAAM,CAAC,IAAI,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC,SAAS,MAAM,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,KAAK,CAAC;AAEzL,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,KAAK,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,SAAS,CAAC;AAEzG,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC"}
|
package/dist/helpers/app.d.ts
CHANGED
|
@@ -1,15 +1,6 @@
|
|
|
1
1
|
import { IMenuItem } from '../types/types';
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const localGet: (name: string) => any;
|
|
4
|
-
export declare const localSet: (name: string, data: any) => void;
|
|
5
|
-
export declare const sessionGet: (name: string) => any;
|
|
6
|
-
export declare const sessionSet: (name: string, data: any) => void;
|
|
2
|
+
export declare const isNewVersion: (name?: string) => boolean;
|
|
7
3
|
export declare const changeTheme: (value: string) => void;
|
|
8
4
|
export declare const findMenuItem: (items: IMenuItem[] | null, path: string) => IMenuItem | null;
|
|
9
5
|
export declare const getPageTitle: (menu: IMenuItem[], path: string) => IMenuItem | null;
|
|
10
|
-
export declare const toByte: (value: number) => string;
|
|
11
|
-
export declare const dateUtcToString: (unixTime: number, options?: Intl.DateTimeFormatOptions, location?: never[]) => string;
|
|
12
|
-
export declare const timeUtcToString: (unixTime: number, options?: Intl.DateTimeFormatOptions, location?: never[]) => string;
|
|
13
|
-
export declare const secToTime: (seconds: number) => string;
|
|
14
|
-
export declare const debounce: (fn: Function, ms?: number) => (this: any, ...args: any[]) => void;
|
|
15
6
|
//# sourceMappingURL=app.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/helpers/app.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/helpers/app.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAG/C,eAAO,MAAM,YAAY,GAAI,aAAe,YAI3C,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,OAAO,MAAM,SAKxC,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,OAAO,SAAS,EAAE,GAAG,IAAI,EAAE,MAAM,MAAM,KAAG,SAAS,GAAG,IAOlF,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,MAAM,SAAS,EAAE,EAAE,MAAM,MAAM,KAAG,SAAS,GAAG,IAAgC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const useFetch: {
|
|
2
|
+
get: (url: string, init?: RequestInit) => Promise<Response>;
|
|
3
|
+
post: (url: string, init?: RequestInit) => Promise<Response>;
|
|
4
|
+
put: (url: string, init?: RequestInit) => Promise<Response>;
|
|
5
|
+
delete: (url: string, init?: RequestInit) => Promise<Response>;
|
|
6
|
+
$get: (url: string, init?: RequestInit) => Promise<any>;
|
|
7
|
+
$post: (url: string, init?: RequestInit) => Promise<any>;
|
|
8
|
+
$put: (url: string, init?: RequestInit) => Promise<any>;
|
|
9
|
+
$delete: (url: string, init?: RequestInit) => Promise<any>;
|
|
10
|
+
};
|
|
11
|
+
export declare const downloadBinary: (path: string) => Promise<unknown[]>;
|
|
12
|
+
export declare const uploadBinary: (path: string, buffer: any) => Promise<any>;
|
|
13
|
+
export declare const uploadJson: (path: string, data: object) => Promise<any>;
|
|
14
|
+
//# sourceMappingURL=fetch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../src/helpers/fetch.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,QAAQ;eACR,MAAM,SAAS,WAAW;gBACzB,MAAM,SAAS,WAAW;eAC3B,MAAM,SAAS,WAAW;kBACvB,MAAM,SAAS,WAAW;gBAC5B,MAAM,SAAS,WAAW;iBACzB,MAAM,SAAS,WAAW;gBAC3B,MAAM,SAAS,WAAW;mBACvB,MAAM,SAAS,WAAW;CAC1C,CAAC;AAEF,eAAO,MAAM,cAAc,GAAU,MAAM,MAAM,uBAKhD,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,MAAM,MAAM,EAAE,QAAQ,GAAG,iBAIrD,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,MAAM,MAAM,EAAE,MAAM,MAAM,iBAIpD,CAAC"}
|