vuesp-components 1.0.1 → 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.
Files changed (147) hide show
  1. package/dist/App.vue.d.ts +1 -1
  2. package/dist/App.vue.d.ts.map +1 -1
  3. package/dist/components/app/AppAside.vue.d.ts +3 -3
  4. package/dist/components/app/AppAside.vue.d.ts.map +1 -1
  5. package/dist/components/app/AppDialog.vue.d.ts +7 -5
  6. package/dist/components/app/AppDialog.vue.d.ts.map +1 -1
  7. package/dist/components/app/AppHeader.vue.d.ts +9 -5
  8. package/dist/components/app/AppHeader.vue.d.ts.map +1 -1
  9. package/dist/components/app/AppNav.vue.d.ts +3 -3
  10. package/dist/components/app/AppNotification.vue.d.ts +33 -7
  11. package/dist/components/app/AppNotification.vue.d.ts.map +1 -1
  12. package/dist/components/app/AppOverlay.vue.d.ts +1 -1
  13. package/dist/components/app/AppOverlay.vue.d.ts.map +1 -1
  14. package/dist/components/app/AppProgress.vue.d.ts +24 -0
  15. package/dist/components/app/AppProgress.vue.d.ts.map +1 -0
  16. package/dist/components/app/index.d.ts +2 -1
  17. package/dist/components/app/index.d.ts.map +1 -1
  18. package/dist/components/dashboard/cards/CardBase.vue.d.ts +87 -47
  19. package/dist/components/dashboard/cards/CardBase.vue.d.ts.map +1 -1
  20. package/dist/components/dashboard/cards/CardButton.vue.d.ts +3 -3
  21. package/dist/components/dashboard/cards/CardButton.vue.d.ts.map +1 -1
  22. package/dist/components/dashboard/cards/CardDate.vue.d.ts +3 -3
  23. package/dist/components/dashboard/cards/CardDate.vue.d.ts.map +1 -1
  24. package/dist/components/dashboard/cards/CardDimmer.vue.d.ts +3 -3
  25. package/dist/components/dashboard/cards/CardDimmer.vue.d.ts.map +1 -1
  26. package/dist/components/dashboard/cards/CardInfo.vue.d.ts +4 -4
  27. package/dist/components/dashboard/cards/CardInfo.vue.d.ts.map +1 -1
  28. package/dist/components/dashboard/cards/CardInput.vue.d.ts +3 -3
  29. package/dist/components/dashboard/cards/CardInput.vue.d.ts.map +1 -1
  30. package/dist/components/dashboard/cards/CardList.vue.d.ts +3 -3
  31. package/dist/components/dashboard/cards/CardList.vue.d.ts.map +1 -1
  32. package/dist/components/dashboard/edit/ItemEdit.vue.d.ts +29 -0
  33. package/dist/components/dashboard/edit/ItemEdit.vue.d.ts.map +1 -0
  34. package/dist/components/dashboard/edit/ItemOptions.vue.d.ts +18 -0
  35. package/dist/components/dashboard/edit/ItemOptions.vue.d.ts.map +1 -0
  36. package/dist/components/dashboard/index.d.ts +2 -3
  37. package/dist/components/dashboard/index.d.ts.map +1 -1
  38. package/dist/components/general/blocks/BlockBreadcrumb.vue.d.ts +3 -3
  39. package/dist/components/general/blocks/BlockBreadcrumb.vue.d.ts.map +1 -1
  40. package/dist/components/general/blocks/BlockInfo.vue.d.ts +22 -2
  41. package/dist/components/general/blocks/BlockInfo.vue.d.ts.map +1 -1
  42. package/dist/components/general/blocks/BlockTable.vue.d.ts +3 -3
  43. package/dist/components/general/blocks/BlockTable.vue.d.ts.map +1 -1
  44. package/dist/components/general/blocks/index.d.ts +1 -2
  45. package/dist/components/general/blocks/index.d.ts.map +1 -1
  46. package/dist/components/general/cards/CardGray.vue.d.ts +3 -3
  47. package/dist/components/general/cards/CardGray.vue.d.ts.map +1 -1
  48. package/dist/components/general/cards/CardNotification.vue.d.ts +8 -15
  49. package/dist/components/general/cards/CardNotification.vue.d.ts.map +1 -1
  50. package/dist/components/general/forms/VAutocomplete.vue.d.ts +34 -0
  51. package/dist/components/general/forms/VAutocomplete.vue.d.ts.map +1 -0
  52. package/dist/components/general/forms/VButton.vue.d.ts +7 -7
  53. package/dist/components/general/forms/VButton.vue.d.ts.map +1 -1
  54. package/dist/components/general/forms/VCheckbox.vue.d.ts +7 -5
  55. package/dist/components/general/forms/VCheckbox.vue.d.ts.map +1 -1
  56. package/dist/components/general/forms/VDragDrop.vue.d.ts +43 -0
  57. package/dist/components/general/forms/VDragDrop.vue.d.ts.map +1 -0
  58. package/dist/components/general/forms/VDropdown.vue.d.ts +8 -6
  59. package/dist/components/general/forms/VDropdown.vue.d.ts.map +1 -1
  60. package/dist/components/general/forms/VExpansion.vue.d.ts +2 -2
  61. package/dist/components/general/forms/VExpansion.vue.d.ts.map +1 -1
  62. package/dist/components/general/forms/{VTextFieldFile.vue.d.ts → VFile.vue.d.ts} +7 -14
  63. package/dist/components/general/forms/VFile.vue.d.ts.map +1 -0
  64. package/dist/components/general/forms/VFunc.vue.d.ts +20 -0
  65. package/dist/components/general/forms/VFunc.vue.d.ts.map +1 -0
  66. package/dist/components/general/forms/VIcons.vue.d.ts +1 -1
  67. package/dist/components/general/forms/VIcons.vue.d.ts.map +1 -1
  68. package/dist/components/general/forms/VList.vue.d.ts +6 -5
  69. package/dist/components/general/forms/VList.vue.d.ts.map +1 -1
  70. package/dist/components/general/forms/VListObject.vue.d.ts +7 -5
  71. package/dist/components/general/forms/VListObject.vue.d.ts.map +1 -1
  72. package/dist/components/general/forms/VLoader.vue.d.ts +1 -1
  73. package/dist/components/general/forms/VSelect.vue.d.ts +10 -10
  74. package/dist/components/general/forms/VSelect.vue.d.ts.map +1 -1
  75. package/dist/components/general/forms/VTabs.vue.d.ts +29 -0
  76. package/dist/components/general/forms/VTabs.vue.d.ts.map +1 -0
  77. package/dist/components/general/forms/VTextField.vue.d.ts +5 -5
  78. package/dist/components/general/forms/VTextField.vue.d.ts.map +1 -1
  79. package/dist/components/general/forms/VTextWrapper.vue.d.ts +29 -0
  80. package/dist/components/general/forms/VTextWrapper.vue.d.ts.map +1 -0
  81. package/dist/components/general/forms/VWifiIcon.vue.d.ts +1 -1
  82. package/dist/components/general/forms/index.d.ts +5 -2
  83. package/dist/components/general/forms/index.d.ts.map +1 -1
  84. package/dist/composables/index.d.ts +2 -0
  85. package/dist/composables/index.d.ts.map +1 -0
  86. package/dist/composables/index.es.js +71 -0
  87. package/dist/composables/types.d.ts +36 -0
  88. package/dist/composables/types.d.ts.map +1 -0
  89. package/dist/composables/useForms.d.ts +3 -0
  90. package/dist/composables/useForms.d.ts.map +1 -0
  91. package/dist/const/lists.d.ts +4 -0
  92. package/dist/const/lists.d.ts.map +1 -0
  93. package/dist/dashboard/index.d.ts +18 -20
  94. package/dist/dashboard/index.d.ts.map +1 -1
  95. package/dist/dashboard/index.es.js +35 -133
  96. package/dist/dashboard/types.d.ts +18 -31
  97. package/dist/dashboard/types.d.ts.map +1 -1
  98. package/dist/helpers/app.d.ts +1 -10
  99. package/dist/helpers/app.d.ts.map +1 -1
  100. package/dist/helpers/fetch.d.ts +14 -0
  101. package/dist/helpers/fetch.d.ts.map +1 -0
  102. package/dist/helpers/general.d.ts +11 -0
  103. package/dist/helpers/general.d.ts.map +1 -0
  104. package/dist/helpers/index.d.ts +4 -1
  105. package/dist/helpers/index.d.ts.map +1 -1
  106. package/dist/helpers/index.es.js +50 -28
  107. package/dist/helpers/utils.d.ts +2 -0
  108. package/dist/helpers/utils.d.ts.map +1 -0
  109. package/dist/helpers/web-api.d.ts +7 -0
  110. package/dist/helpers/web-api.d.ts.map +1 -0
  111. package/dist/index.d.ts +1 -0
  112. package/dist/index.d.ts.map +1 -1
  113. package/dist/index.es.js +1904 -1450
  114. package/dist/plugins/i18n/index.d.ts +4 -0
  115. package/dist/plugins/i18n/index.d.ts.map +1 -0
  116. package/dist/plugins/i18n/types.d.ts +34 -0
  117. package/dist/plugins/i18n/types.d.ts.map +1 -0
  118. package/dist/plugins/index.d.ts +3 -0
  119. package/dist/plugins/index.d.ts.map +1 -0
  120. package/dist/plugins/index.es.js +34 -0
  121. package/dist/plugins/types.d.ts +13 -0
  122. package/dist/plugins/types.d.ts.map +1 -0
  123. package/dist/style.css +1 -1
  124. package/dist/types/components.d.ts +6 -16
  125. package/dist/types/components.d.ts.map +1 -1
  126. package/dist/types/messages.d.ts +110 -0
  127. package/dist/types/messages.d.ts.map +1 -0
  128. package/dist/types/state.d.ts +43 -0
  129. package/dist/types/state.d.ts.map +1 -0
  130. package/dist/types/types.d.ts +3 -1
  131. package/dist/types/types.d.ts.map +1 -1
  132. package/dist/utils-r5TQv-RW.js +62 -0
  133. package/package.json +16 -5
  134. package/dist/app-B-BsxziJ.js +0 -47
  135. package/dist/components/dashboard/BlockItemEdit.vue.d.ts +0 -16
  136. package/dist/components/dashboard/BlockItemEdit.vue.d.ts.map +0 -1
  137. package/dist/components/dashboard/cards/CardSwitch.vue.d.ts +0 -10
  138. package/dist/components/dashboard/cards/CardSwitch.vue.d.ts.map +0 -1
  139. package/dist/components/general/blocks/BlockStatus.vue.d.ts +0 -19
  140. package/dist/components/general/blocks/BlockStatus.vue.d.ts.map +0 -1
  141. package/dist/components/general/forms/VTextFieldFile.vue.d.ts.map +0 -1
  142. package/dist/dashboard/utils.d.ts +0 -7
  143. package/dist/dashboard/utils.d.ts.map +0 -1
  144. package/dist/helpers/fs.d.ts +0 -9
  145. package/dist/helpers/fs.d.ts.map +0 -1
  146. package/dist/types/store.d.ts +0 -104
  147. 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 | undefined;
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> & Readonly<{
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, {}, HTMLDivElement>;
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;AAiHA,UAAU,KAAK;IACb,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IACzC,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,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC;CACf;AAyDD,iBAAS,cAAc;WA8FT,OAAO,IAA6B;;sBAZvB,GAAG;y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N,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> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
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 VTextFieldFile } from './VTextFieldFile.vue';
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
- export { VAutocomplete, VButton, VLoader, VCheckbox, VDropdown, VExpansion, VList, VSelect, VTextField, VTextFieldFile, VIcons, VWifiIcon, VListObject };
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,cAAc,MAAM,+CAA+C,CAAC;AAC3E,OAAO,MAAM,MAAM,uCAAuC,CAAC;AAC3D,OAAO,SAAS,MAAM,0CAA0C,CAAC;AACjE,OAAO,WAAW,MAAM,4CAA4C,CAAC;AAErE,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC"}
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,2 @@
1
+ export { useForm } from './useForms';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -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,3 @@
1
+ import { UseFormOptions, UseFormReturn } from './types';
2
+ export declare function useForm(options: UseFormOptions): UseFormReturn;
3
+ //# sourceMappingURL=useForms.d.ts.map
@@ -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,4 @@
1
+ import { IListItem } from '../types/types';
2
+ export declare const listIcons: IListItem[];
3
+ export declare const listDashboard: IListItem[];
4
+ //# sourceMappingURL=lists.d.ts.map
@@ -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 { IDashboardItem, IDashboardItemString, IDashboard } from '../types/types';
2
- export * from './utils.js';
3
- export * from '../types/types';
4
- export declare class Dashboard implements IDashboard {
5
- items: Map<string, IDashboardItem>;
6
- data: any;
7
- constructor(list: IDashboardItem[]);
8
- init(list: IDashboardItem[]): void;
9
- setDataValue({ keyValue }: IDashboardItem, value: any): void;
10
- getDataValue({ keyValue }: IDashboardItem): any;
11
- setData(data: any): this;
12
- getData(): any;
13
- get(id: string): any;
14
- set(id: string, value: any): any;
15
- editItem(id: string, item: IDashboardItemString): void;
16
- removeItem(id: string): void;
17
- saveList(): string;
18
- getList(): IDashboardItem[];
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,cAAc,EAAE,oBAAoB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAItF,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAoD9B,qBAAa,SAAU,YAAW,UAAU;IAC1C,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IACnC,IAAI,EAAE,GAAG,CAAC;gBAEE,IAAI,EAAE,cAAc,EAAE;IAKlC,IAAI,CAAC,IAAI,EAAE,cAAc,EAAE;IAO3B,YAAY,CAAC,EAAE,QAAQ,EAAE,EAAE,cAAc,EAAE,KAAK,EAAE,GAAG;IASrD,YAAY,CAAC,EAAE,QAAQ,EAAE,EAAE,cAAc;IAWzC,OAAO,CAAC,IAAI,EAAE,GAAG;IAKjB,OAAO;IAIP,GAAG,CAAC,EAAE,EAAE,MAAM;IAOd,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG;IAW1B,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAoB;IAM/C,UAAU,CAAC,EAAE,EAAE,MAAM;IAIrB,QAAQ;IAMR,OAAO;IAIP,aAAa;CAId"}
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
- var g = Object.defineProperty;
2
- var m = (n, e, t) => e in n ? g(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
- var o = (n, e, t) => m(n, typeof e != "symbol" ? e + "" : e, t);
4
- const saveObjectWithFunctions = (n) => {
5
- const e = (t) => typeof t == "function" ? `${t.toString()}` : Array.isArray(t) ? `[${t.map((r) => e(r)).join(",")}]` : typeof t == "object" && t !== null ? `{${Object.entries(t).map(([r, i]) => `${JSON.stringify(r)}: ${e(i)}`).join(",")}}` : JSON.stringify(t);
6
- return e(n);
7
- }, safeEval = (code) => {
8
- if (typeof code != "string" || code.trim() === "")
9
- return null;
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
- return eval(code);
12
- } catch (n) {
13
- return null;
14
- }
15
- }, stringToFunction = ({ set: n, get: e, modifyValue: t, ...s }) => {
16
- const r = { ...s };
17
- return n && typeof n == "string" && (r.set = safeEval(n)), e && typeof e == "string" && (r.get = safeEval(e)), t && typeof t == "string" && (r.modifyValue = safeEval(t)), r;
18
- }, functionToString = ({ set: n, get: e, modifyValue: t, ...s }) => {
19
- const r = { ...s };
20
- return n && (r.set = n.toString()), e && (r.get = e.toString()), t && (r.modifyValue = t.toString()), r;
21
- }, createObjectFromPaths = (n, e = ".") => {
22
- const t = {};
23
- for (const s of n) {
24
- const r = s.split(e);
25
- let i = t;
26
- for (let a = 0; a < r.length; a++) {
27
- const c = r[a];
28
- i[c] ? i[c] === !0 && a < r.length - 1 && (i[c] = {}) : i[c] = a === r.length - 1 ? s : {}, a < r.length - 1 && (i = i[c]);
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
- Dashboard,
132
- createObjectFromPaths,
133
- functionToString,
134
- safeEval,
135
- saveObjectWithFunctions,
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
- export interface ISelectList {
2
- name: string;
3
- value: string | number;
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
- keyValue: string;
9
- type?: string;
10
- icon?: string;
11
- value?: any;
12
- min?: number;
13
- max?: number;
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
- modifyValue?: string;
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,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,cAAc;IAC7B,EA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G,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"}
@@ -1,15 +1,6 @@
1
1
  import { IMenuItem } from '../types/types';
2
- export declare const jsonParse: (data: string | null) => any;
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;AAE/C,eAAO,MAAM,SAAS,GAAI,MAAM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AAO,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"}