vuesp-components 3.0.6 → 4.1.0
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-3Zj29UoC.js +64 -0
- package/dist/components/app/AppHeader.vue.d.ts +18 -1
- package/dist/components/app/AppHeader.vue.d.ts.map +1 -1
- package/dist/components/app/AppNav.vue.d.ts +2 -2
- package/dist/components/app/AppNav.vue.d.ts.map +1 -1
- package/dist/components/app/AppNavItem.vue.d.ts +14 -0
- package/dist/components/app/AppNavItem.vue.d.ts.map +1 -0
- package/dist/components/app/types.d.ts +14 -2
- package/dist/components/app/types.d.ts.map +1 -1
- package/dist/components/block/data/BlockDataSettings.vue.d.ts.map +1 -1
- package/dist/components/block/data/BlockMetricStyleDialog.vue.d.ts.map +1 -1
- package/dist/components/block/data/deviceStorage.d.ts.map +1 -1
- package/dist/components/block/data/metricStyles.d.ts +9 -9
- package/dist/components/block/data/metricStyles.d.ts.map +1 -1
- package/dist/components/block/data/types.d.ts +17 -17
- package/dist/components/block/data/types.d.ts.map +1 -1
- package/dist/components/block/data/useBlock.d.ts +20 -20
- package/dist/components/block/index.d.ts +1 -1
- package/dist/components/block/index.d.ts.map +1 -1
- package/dist/components/block/info/types.d.ts +9 -2
- package/dist/components/block/info/types.d.ts.map +1 -1
- package/dist/components/block/scan/BlockScan.vue.d.ts +3 -4
- package/dist/components/block/scan/BlockScan.vue.d.ts.map +1 -1
- package/dist/components/block/scan/types.d.ts +11 -3
- package/dist/components/block/scan/types.d.ts.map +1 -1
- package/dist/components/block/status/types.d.ts +9 -2
- package/dist/components/block/status/types.d.ts.map +1 -1
- package/dist/components/dashboard/cards/CardBase.vue.d.ts +36 -36
- package/dist/components/dashboard/cards/CardButton.vue.d.ts +4 -4
- package/dist/components/dashboard/cards/CardDate.vue.d.ts +4 -4
- package/dist/components/dashboard/cards/CardDimmer.vue.d.ts +4 -4
- package/dist/components/dashboard/cards/CardInfo.vue.d.ts +4 -4
- package/dist/components/dashboard/cards/CardInput.vue.d.ts +4 -4
- package/dist/components/dashboard/cards/CardList.vue.d.ts +4 -4
- package/dist/components/dashboard/edit/ItemEdit.vue.d.ts.map +1 -1
- package/dist/components/dashboard/edit/ItemOptions.vue.d.ts +3 -3
- package/dist/components/dashboard/edit/ItemOptions.vue.d.ts.map +1 -1
- package/dist/components/dashboard/edit/types.d.ts +2 -2
- package/dist/components/dashboard/edit/types.d.ts.map +1 -1
- package/dist/components/index.es.js +2133 -1957
- package/dist/components/ui/button/VButton.vue.d.ts.map +1 -1
- package/dist/components/ui/button/types.d.ts +4 -4
- package/dist/components/ui/button/types.d.ts.map +1 -1
- package/dist/components/ui/card/types.d.ts +6 -6
- package/dist/components/ui/card/types.d.ts.map +1 -1
- package/dist/components/ui/list/VListObject.vue.d.ts +2 -2
- package/dist/components/ui/list/types.d.ts +2 -2
- package/dist/components/ui/list/types.d.ts.map +1 -1
- package/dist/composables/types.d.ts +13 -13
- package/dist/composables/types.d.ts.map +1 -1
- package/dist/composables/useForms.d.ts +2 -2
- package/dist/composables/useForms.d.ts.map +1 -1
- package/dist/dashboard/index.d.ts +7 -5
- package/dist/dashboard/index.d.ts.map +1 -1
- package/dist/dashboard/index.es.js +30 -40
- package/dist/dashboard/types.d.ts +17 -8
- package/dist/dashboard/types.d.ts.map +1 -1
- package/dist/helpers/index.es.js +1 -1
- package/dist/plugins/i18n/index.d.ts +2 -2
- package/dist/plugins/i18n/index.d.ts.map +1 -1
- package/dist/plugins/i18n/types.d.ts +10 -10
- package/dist/plugins/i18n/types.d.ts.map +1 -1
- package/dist/plugins/types.d.ts +4 -4
- package/dist/plugins/types.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/components.d.ts +3 -3
- package/dist/types/components.d.ts.map +1 -1
- package/dist/types/index.d.ts +0 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/directives/index.d.ts +2 -2
- package/dist/utils/directives/index.d.ts.map +1 -1
- package/package.json +5 -4
- package/dist/app-B45sALrX.js +0 -64
- package/dist/types/messages.d.ts +0 -193
- package/dist/types/messages.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VButton.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/button/VButton.vue"],"names":[],"mappings":"AAgMA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"VButton.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/button/VButton.vue"],"names":[],"mappings":"AAgMA,OAAO,KAAK,EAA+B,aAAa,EAAE,MAAM,8BAA8B,CAAC;AA0K/F,iBAAS,cAAc;WAgET,OAAO,IAA6B;;yBAXrB,GAAG;;;;EAgB/B;AAcD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;kFAQnB,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,8 +1,8 @@
|
|
|
1
|
-
export type
|
|
2
|
-
export type
|
|
1
|
+
export type TButtonColor = 'cyan' | 'blue' | 'indigo' | 'violet' | 'purple' | 'amber' | 'green' | 'red' | 'slate' | 'gray' | 'transparent';
|
|
2
|
+
export type TButtonVariant = 'default' | 'soft' | 'outline' | 'white';
|
|
3
3
|
export interface IVButtonProps {
|
|
4
|
-
color?:
|
|
5
|
-
variant?:
|
|
4
|
+
color?: TButtonColor;
|
|
5
|
+
variant?: TButtonVariant;
|
|
6
6
|
invert?: boolean;
|
|
7
7
|
size?: 'none' | 'sm' | 'md' | 'lg' | 'xl';
|
|
8
8
|
type?: 'button' | 'icon' | 'submit' | 'reset';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/button/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/button/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GACpB,MAAM,GACN,MAAM,GACN,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,OAAO,GACP,OAAO,GACP,KAAK,GACL,OAAO,GACP,MAAM,GACN,aAAa,CAAC;AAElB,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;AAEtE,MAAM,WAAW,aAAa;IAC5B,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1C,IAAI,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IAC9C,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CAClC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export type
|
|
2
|
-
export type
|
|
3
|
-
export type
|
|
1
|
+
export type TCardVariant = 'glass' | 'solid' | 'outline' | 'ghost';
|
|
2
|
+
export type TCardPadding = 'none' | 'lg';
|
|
3
|
+
export type TCardTone = 'default' | 'info' | 'success' | 'warning' | 'danger' | 'accent';
|
|
4
4
|
export interface ICardProps {
|
|
5
|
-
variant?:
|
|
6
|
-
padding?:
|
|
7
|
-
tone?:
|
|
5
|
+
variant?: TCardVariant;
|
|
6
|
+
padding?: TCardPadding;
|
|
7
|
+
tone?: TCardTone;
|
|
8
8
|
title?: string;
|
|
9
9
|
subtitle?: string;
|
|
10
10
|
hover?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/card/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/card/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;AACnE,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,IAAI,CAAC;AACzC,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEzF,MAAM,WAAW,UAAU;IACzB,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { IVListObjectProps } from './types';
|
|
2
2
|
declare const _default: import('vue').DefineComponent<IVListObjectProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
3
|
-
click: (data: import('../../../types').
|
|
3
|
+
click: (data: import('../../../types').IVListObjectReturnData) => any;
|
|
4
4
|
}, string, import('vue').PublicProps, Readonly<IVListObjectProps> & Readonly<{
|
|
5
|
-
onClick?: ((data: import('../../../types').
|
|
5
|
+
onClick?: ((data: import('../../../types').IVListObjectReturnData) => any) | undefined;
|
|
6
6
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLUListElement>;
|
|
7
7
|
export default _default;
|
|
8
8
|
//# sourceMappingURL=VListObject.vue.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IVListObjectReturnData } from '../../../types/components';
|
|
2
2
|
export interface IVListProps<T> {
|
|
3
3
|
items: T[];
|
|
4
4
|
plain?: boolean;
|
|
@@ -12,6 +12,6 @@ export interface IVListObjectProps {
|
|
|
12
12
|
onlyValue?: boolean;
|
|
13
13
|
}
|
|
14
14
|
export interface IVListObjectEmits {
|
|
15
|
-
(e: 'click', data:
|
|
15
|
+
(e: 'click', data: IVListObjectReturnData): void;
|
|
16
16
|
}
|
|
17
17
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/list/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/list/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAEjE,MAAM,WAAW,WAAW,CAAC,CAAC;IAC5B,KAAK,EAAE,CAAC,EAAE,CAAC;IAEX,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AACD,MAAM,WAAW,WAAW,CAAC,CAAC;IAC5B,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CAC5C;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AACD,MAAM,WAAW,iBAAiB;IAChC,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,sBAAsB,GAAG,IAAI,CAAC;CAClD"}
|
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
import { Ref, ComputedRef } from 'vue';
|
|
2
|
-
export type
|
|
3
|
-
export type
|
|
4
|
-
export type
|
|
5
|
-
export interface
|
|
2
|
+
export type TValidator = (value: string, values?: Record<string, unknown>) => true | string;
|
|
3
|
+
export type TValidationSchema = Record<string, TValidator[]>;
|
|
4
|
+
export type TValidationSchemaFn = (values: Record<string, unknown>) => TValidationSchema;
|
|
5
|
+
export interface IFieldState {
|
|
6
6
|
value: string | number;
|
|
7
7
|
errors: string[];
|
|
8
8
|
touched: boolean;
|
|
9
9
|
dirty: boolean;
|
|
10
10
|
}
|
|
11
|
-
export interface
|
|
11
|
+
export interface IFormState {
|
|
12
12
|
values: Record<string, unknown>;
|
|
13
13
|
errors: Record<string, string[]>;
|
|
14
14
|
touched: Record<string, boolean>;
|
|
15
15
|
dirty: Record<string, boolean>;
|
|
16
16
|
}
|
|
17
|
-
export interface
|
|
18
|
-
props?: (context:
|
|
17
|
+
export interface IDefineFieldOptions {
|
|
18
|
+
props?: (context: IFieldContext) => Record<string, unknown>;
|
|
19
19
|
}
|
|
20
|
-
export interface
|
|
20
|
+
export interface IFieldContext {
|
|
21
21
|
errors: string[];
|
|
22
22
|
touched: boolean;
|
|
23
23
|
dirty: boolean;
|
|
24
24
|
}
|
|
25
|
-
export interface
|
|
26
|
-
validationSchema:
|
|
25
|
+
export interface IUseFormOptions {
|
|
26
|
+
validationSchema: TValidationSchema | TValidationSchemaFn;
|
|
27
27
|
initialValues?: Record<string, unknown>;
|
|
28
28
|
}
|
|
29
|
-
export interface
|
|
29
|
+
export interface IUseFormReturn {
|
|
30
30
|
values: Record<string, unknown>;
|
|
31
31
|
errors: Record<string, string[]>;
|
|
32
32
|
isValid: Ref<boolean>;
|
|
33
|
-
defineField: <T = unknown>(name: string, options?:
|
|
33
|
+
defineField: <T = unknown>(name: string, options?: IDefineFieldOptions) => [Ref<T>, ComputedRef<Record<string, unknown>>];
|
|
34
34
|
handleSubmit: (callback: (values: Record<string, unknown>) => void | Promise<void>) => (event?: Event) => Promise<void>;
|
|
35
35
|
resetForm: () => void;
|
|
36
36
|
validate: () => boolean;
|
|
37
|
-
updateSchema: (newSchema:
|
|
37
|
+
updateSchema: (newSchema: TValidationSchema) => void;
|
|
38
38
|
}
|
|
39
39
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +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,
|
|
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,UAAU,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,GAAG,MAAM,CAAC;AAC5F,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC;AAC7D,MAAM,MAAM,mBAAmB,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,iBAAiB,CAAC;AAEzF,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,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,mBAAmB;IAClC,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC7D;AAED,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,eAAe;IAC9B,gBAAgB,EAAE,iBAAiB,GAAG,mBAAmB,CAAC;IAC1D,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACzC;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IACjC,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IACtB,WAAW,EAAE,CAAC,CAAC,GAAG,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,mBAAmB,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IAC1H,YAAY,EAAE,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,KAAK,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACxH,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,OAAO,CAAC;IACxB,YAAY,EAAE,CAAC,SAAS,EAAE,iBAAiB,KAAK,IAAI,CAAC;CACtD"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function useForm(options:
|
|
1
|
+
import { IUseFormOptions, IUseFormReturn } from './types';
|
|
2
|
+
export declare function useForm(options: IUseFormOptions): IUseFormReturn;
|
|
3
3
|
//# sourceMappingURL=useForms.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useForms.d.ts","sourceRoot":"","sources":["../../src/composables/useForms.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,
|
|
1
|
+
{"version":3,"file":"useForms.d.ts","sourceRoot":"","sources":["../../src/composables/useForms.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EAKf,MAAM,qBAAqB,CAAC;AAG7B,wBAAgB,OAAO,CAAC,OAAO,EAAE,eAAe,GAAG,cAAc,CAgPhE"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TGetDataValue, TGetParamsData, IDashboardItem } from '../types';
|
|
2
2
|
export declare const dashboardCards: string[];
|
|
3
|
-
export declare const getDataValue:
|
|
4
|
-
export declare const getParamsData:
|
|
3
|
+
export declare const getDataValue: TGetDataValue;
|
|
4
|
+
export declare const getParamsData: TGetParamsData;
|
|
5
5
|
export declare const getFunction: (body: string | undefined, params?: string[]) => Function | null;
|
|
6
|
-
|
|
7
|
-
export
|
|
6
|
+
/** Дополнительные переменные для `set`/`get`/`getTo`: `cmd`, `keys`, `flags`. */
|
|
7
|
+
export type TDashboardScope = Record<string, unknown>;
|
|
8
|
+
export declare const setStateItem: <T>(item: IDashboardItem, value: unknown, object: T, scope?: TDashboardScope) => unknown;
|
|
9
|
+
export declare const getStateItem: <T>(item: IDashboardItem, object: T, scope?: TDashboardScope) => IDashboardItem;
|
|
8
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dashboard/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dashboard/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAkB,MAAM,SAAS,CAAC;AAE7F,eAAO,MAAM,cAAc,UAAwD,CAAC;AAEpF,eAAO,MAAM,YAAY,EAAE,aAE1B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,cAE3B,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,MAAM,MAAM,GAAG,SAAS,EAAE,SAAQ,MAAM,EAA8B,oBAIjG,CAAC;AAQF,iFAAiF;AACjF,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAQtD,eAAO,MAAM,YAAY,GAAI,CAAC,EAAE,MAAM,cAAc,EAAE,OAAO,OAAO,EAAE,QAAQ,CAAC,EAAE,QAAQ,eAAe,KAAG,OAO1G,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,CAAC,EAAE,MAAM,cAAc,EAAE,QAAQ,CAAC,EAAE,QAAQ,eAAe,KAAG,cAS1F,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { g as
|
|
2
|
-
const
|
|
1
|
+
import { g as u, a as T } from "../paths-CbO4FuTv.js";
|
|
2
|
+
const f = {
|
|
3
3
|
button: "switch",
|
|
4
4
|
dimmer: "number",
|
|
5
5
|
info: "sensor",
|
|
@@ -7,60 +7,50 @@ const h = {
|
|
|
7
7
|
list: "select",
|
|
8
8
|
input: "text",
|
|
9
9
|
chart: "custom"
|
|
10
|
-
},
|
|
11
|
-
const e =
|
|
10
|
+
}, p = (t) => t.entityType || f[t.type] || "custom", i = (t) => t ? t.includes("return") ? t : `return ${t}` : null, a = (t, n, r) => {
|
|
11
|
+
const e = i(t);
|
|
12
12
|
return e ? n(e, r) : void 0;
|
|
13
|
-
},
|
|
13
|
+
}, d = (t) => ({
|
|
14
14
|
a: t[0],
|
|
15
15
|
b: t[1],
|
|
16
16
|
c: t[2],
|
|
17
17
|
d: t[3]
|
|
18
|
-
}),
|
|
19
|
-
const e =
|
|
18
|
+
}), m = (t, n, r) => {
|
|
19
|
+
const e = u(t, n), o = d(e), s = e[0] ?? "", c = t.get ? a(t.get, r, o) : s, v = t.getTo ? a(t.getTo, r, { v: c, ...o }) : c;
|
|
20
20
|
return {
|
|
21
21
|
...t,
|
|
22
|
-
value:
|
|
23
|
-
valueTo:
|
|
24
|
-
entityType:
|
|
22
|
+
value: c,
|
|
23
|
+
valueTo: v,
|
|
24
|
+
entityType: p(t)
|
|
25
25
|
};
|
|
26
|
-
},
|
|
26
|
+
}, y = (t, n, r, e) => {
|
|
27
27
|
if (!t.set)
|
|
28
28
|
return null;
|
|
29
|
-
const
|
|
30
|
-
return a(t.set, e, { v: n, ...
|
|
31
|
-
},
|
|
32
|
-
const r =
|
|
29
|
+
const o = u(t, r);
|
|
30
|
+
return a(t.set, e, { v: n, ...d(o) });
|
|
31
|
+
}, w = ["button", "info", "dimmer", "date", "input", "list"], D = (t, n) => T(t, n), b = (t, n) => u(t, n), E = (t, n = ["v", "a", "b", "c", "d"]) => {
|
|
32
|
+
const r = i(t);
|
|
33
33
|
return r ? new Function(...n, r) : null;
|
|
34
|
-
},
|
|
35
|
-
const e = l(n, r)[1];
|
|
36
|
-
if (!u(e) || !("key" in e)) return t;
|
|
37
|
-
const s = e, c = (o) => !u(o) || "key" in o ? o : { ...s, ...o };
|
|
38
|
-
return Array.isArray(t) ? t.map(c) : c(t);
|
|
39
|
-
}, k = (t, n, r) => {
|
|
34
|
+
}, l = (t, n) => new Function(...Object.keys(n), t)(...Object.values(n)), g = (t) => t ? (n, r) => l(n, { ...t, ...r }) : l, I = (t, n, r, e) => {
|
|
40
35
|
try {
|
|
41
|
-
return
|
|
42
|
-
} catch (
|
|
43
|
-
return console.warn(
|
|
36
|
+
return y(t, n, r, g(e));
|
|
37
|
+
} catch (o) {
|
|
38
|
+
return console.warn(o), null;
|
|
44
39
|
}
|
|
45
|
-
},
|
|
46
|
-
if (n.type !== "chart" || u(t.value)) return t;
|
|
47
|
-
const e = l(n, r)[1];
|
|
48
|
-
return u(e) ? { ...t, value: e } : t;
|
|
49
|
-
}, z = (t, n) => {
|
|
40
|
+
}, F = (t, n, r) => {
|
|
50
41
|
try {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
const s = l(t, n)[0] ?? "";
|
|
42
|
+
return m(t, n, g(r));
|
|
43
|
+
} catch (e) {
|
|
44
|
+
console.warn(e);
|
|
45
|
+
const s = b(t, n)[0] ?? "";
|
|
56
46
|
return { ...t, value: s, valueTo: s };
|
|
57
47
|
}
|
|
58
48
|
};
|
|
59
49
|
export {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
50
|
+
w as dashboardCards,
|
|
51
|
+
D as getDataValue,
|
|
52
|
+
E as getFunction,
|
|
53
|
+
b as getParamsData,
|
|
54
|
+
F as getStateItem,
|
|
55
|
+
I as setStateItem
|
|
66
56
|
};
|
|
@@ -1,13 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export type IDashboardItemOptions
|
|
3
|
-
export interface IDashboardItem
|
|
1
|
+
import { IDashboardItemOptions } from 'vuesp-dashboard-core';
|
|
2
|
+
export type { IDashboardItemOptions };
|
|
3
|
+
export interface IDashboardItem {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
type: string;
|
|
7
|
+
entityType?: string;
|
|
4
8
|
icon: string;
|
|
9
|
+
opts?: IDashboardItemOptions;
|
|
10
|
+
args: string[];
|
|
11
|
+
get?: string;
|
|
12
|
+
getTo?: string;
|
|
13
|
+
set?: string;
|
|
14
|
+
meta?: Record<string, unknown>;
|
|
5
15
|
value: string | number;
|
|
6
16
|
valueTo?: string | number;
|
|
7
|
-
opts?: IDashboardItemOptions;
|
|
8
17
|
}
|
|
9
|
-
export type
|
|
10
|
-
export type
|
|
11
|
-
export type
|
|
12
|
-
export type
|
|
18
|
+
export type TGetTypeByPath<T, Path extends string> = Path extends keyof T ? T[Path] : Path extends `${infer K}.${infer R}` ? (K extends keyof T ? TGetTypeByPath<T[K], R> : never) : never;
|
|
19
|
+
export type TGetDataValue = <T extends string, S>(key: T, main: S) => TGetTypeByPath<S, T> | undefined;
|
|
20
|
+
export type TGetParamsData = <S>(item: IDashboardItem, main: S) => (TGetTypeByPath<S, string> | undefined)[];
|
|
21
|
+
export type TValueDashboardItemOptions = IDashboardItemOptions[keyof IDashboardItemOptions];
|
|
13
22
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/dashboard/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/dashboard/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAElE,YAAY,EAAE,qBAAqB,EAAE,CAAC;AAItC,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,qBAAqB,CAAC;IAC7B,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC3B;AAED,MAAM,MAAM,cAAc,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,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,KAAK,CAAC;AAE3L,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,KAAK,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,SAAS,CAAC;AAEvG,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC;AAE7G,MAAM,MAAM,0BAA0B,GAAG,qBAAqB,CAAC,MAAM,qBAAqB,CAAC,CAAC"}
|
package/dist/helpers/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as f, b as m, c as d, d as k, e as b, f as S, g, h as y, i as T, j as v, k as W, l as _, m as w, n as j, r as q, s as x, o as z, p as G, q as P, t as U, u as A } from "../app-
|
|
1
|
+
import { a as f, b as m, c as d, d as k, e as b, f as S, g, h as y, i as T, j as v, k as W, l as _, m as w, n as j, r as q, s as x, o as z, p as G, q as P, t as U, u as A } from "../app-3Zj29UoC.js";
|
|
2
2
|
const c = (o) => {
|
|
3
3
|
let s = "", n = !1, i = "";
|
|
4
4
|
for (let a = 0; a < o.length; a++) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Plugin } from 'vue';
|
|
2
|
-
import {
|
|
3
|
-
export declare function i18nPluralizer(rules: Record<string,
|
|
2
|
+
import { TI18nPluralRule } from './types';
|
|
3
|
+
export declare function i18nPluralizer(rules: Record<string, TI18nPluralRule>): (locale: string, count: number, forms: string[]) => string;
|
|
4
4
|
export declare const i18nPlugin: Plugin;
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/i18n/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,MAAM,EAAE,MAAM,KAAK,CAAC;AACtD,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/i18n/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,MAAM,EAAE,MAAM,KAAK,CAAC;AACtD,OAAO,KAAK,EAAsE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAKhI,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,IACzC,QAAQ,MAAM,EAAE,OAAO,MAAM,EAAE,OAAO,MAAM,EAAE,KAAG,MAAM,CAMlF;AAED,eAAO,MAAM,UAAU,EAAE,MAkFxB,CAAC"}
|
|
@@ -4,32 +4,32 @@ export interface ILocaleMessages {
|
|
|
4
4
|
export interface ILocales {
|
|
5
5
|
[locale: string]: ILocaleMessages;
|
|
6
6
|
}
|
|
7
|
-
export type
|
|
8
|
-
export interface
|
|
7
|
+
export type TI18nPluralRule = (count: number, forms: string[]) => string;
|
|
8
|
+
export interface II18nState {
|
|
9
9
|
locale: string;
|
|
10
10
|
}
|
|
11
|
-
export type
|
|
12
|
-
export interface
|
|
13
|
-
state: Readonly<
|
|
14
|
-
$t:
|
|
11
|
+
export type TI18nGet = (key: string, params?: Record<string, string | number>) => string;
|
|
12
|
+
export interface II18nInstance {
|
|
13
|
+
state: Readonly<II18nState>;
|
|
14
|
+
$t: TI18nGet;
|
|
15
15
|
setLocale(locale: string): void;
|
|
16
16
|
getLocale(): string;
|
|
17
17
|
getListLocales(): string[];
|
|
18
18
|
}
|
|
19
|
-
export interface
|
|
19
|
+
export interface II18nOptions {
|
|
20
20
|
defaultLocale?: string;
|
|
21
21
|
locales?: ILocales;
|
|
22
22
|
pluralize: (locale: string, count: number, forms: string[]) => string;
|
|
23
23
|
}
|
|
24
24
|
declare module '@vue/runtime-core' {
|
|
25
25
|
interface ComponentCustomProperties {
|
|
26
|
-
$i18n:
|
|
27
|
-
$t:
|
|
26
|
+
$i18n: II18nInstance;
|
|
27
|
+
$t: TI18nGet;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
declare global {
|
|
31
31
|
interface Window {
|
|
32
|
-
$i18n?:
|
|
32
|
+
$i18n?: II18nInstance;
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/plugins/i18n/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,eAAe,CAAC;CACzC;AAED,MAAM,WAAW,QAAQ;IACvB,CAAC,MAAM,EAAE,MAAM,GAAG,eAAe,CAAC;CACnC;AAED,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/plugins/i18n/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,eAAe,CAAC;CACzC;AAED,MAAM,WAAW,QAAQ;IACvB,CAAC,MAAM,EAAE,MAAM,GAAG,eAAe,CAAC;CACnC;AAED,MAAM,MAAM,eAAe,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,MAAM,CAAC;AAEzE,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,QAAQ,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,KAAK,MAAM,CAAC;AAEzF,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC;IAC5B,EAAE,EAAE,QAAQ,CAAC;IACb,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,SAAS,IAAI,MAAM,CAAC;IACpB,cAAc,IAAI,MAAM,EAAE,CAAC;CAC5B;AAED,MAAM,WAAW,YAAY;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,MAAM,CAAC;CACvE;AAED,OAAO,QAAQ,mBAAmB,CAAC;IACjC,UAAU,yBAAyB;QACjC,KAAK,EAAE,aAAa,CAAC;QACrB,EAAE,EAAE,QAAQ,CAAC;KACd;CACF;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,KAAK,CAAC,EAAE,aAAa,CAAC;KACvB;CACF;AAED,OAAO,EAAE,CAAC"}
|
package/dist/plugins/types.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { ILocaleMessages, ILocales,
|
|
2
|
-
export { ILocaleMessages, ILocales,
|
|
1
|
+
import { ILocaleMessages, ILocales, II18nOptions, II18nState, II18nInstance, TI18nPluralRule } from './i18n/types';
|
|
2
|
+
export { ILocaleMessages, ILocales, II18nOptions, II18nState, II18nInstance, TI18nPluralRule };
|
|
3
3
|
declare module '@vue/runtime-core' {
|
|
4
4
|
interface ComponentCustomProperties {
|
|
5
|
-
$i18n:
|
|
5
|
+
$i18n: II18nInstance;
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
8
|
declare global {
|
|
9
9
|
interface Window {
|
|
10
|
-
$i18n?:
|
|
10
|
+
$i18n?: II18nInstance;
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/plugins/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/plugins/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEhI,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,eAAe,EAAE,CAAC;AAE/F,OAAO,QAAQ,mBAAmB,CAAC;IACjC,UAAU,yBAAyB;QACjC,KAAK,EAAE,aAAa,CAAC;KACtB;CACF;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,KAAK,CAAC,EAAE,aAAa,CAAC;KACvB;CACF"}
|