@snabcentr/vue-ui-lib 4.6.0 → 4.7.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/manifest.json +1 -1
- package/dist/release_notes.tmp +1 -1
- package/dist/sc-vue-ui-lib.js +5426 -5309
- package/dist/sc-vue-ui-lib.js.map +1 -1
- package/dist/sc-vue-ui-lib.umd.cjs +40 -40
- package/dist/sc-vue-ui-lib.umd.cjs.map +1 -1
- package/dist/src/components/catalog/category-collapse-item.vue.d.ts +3 -3
- package/dist/src/components/collapse/collapse-item.vue.d.ts +1 -1
- package/dist/src/directives/copy.d.ts +28 -0
- package/dist/src/directives/index.d.ts +1 -0
- package/dist/src/helpers/entity-name-helper.d.ts +20 -0
- package/dist/src/helpers/index.d.ts +1 -0
- package/package.json +2 -2
|
@@ -61,8 +61,8 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<IC
|
|
|
61
61
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
62
62
|
"header:click": (name: string | number, expanded: boolean) => any;
|
|
63
63
|
}, string, {
|
|
64
|
-
disabled: boolean;
|
|
65
64
|
name: string | number;
|
|
65
|
+
disabled: boolean;
|
|
66
66
|
title: string;
|
|
67
67
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
68
68
|
beforeCreate?: (() => void) | (() => void)[];
|
|
@@ -85,8 +85,8 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<IC
|
|
|
85
85
|
$nextTick: typeof import('vue').nextTick;
|
|
86
86
|
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
87
87
|
} & Readonly<{
|
|
88
|
-
disabled: boolean;
|
|
89
88
|
name: string | number;
|
|
89
|
+
disabled: boolean;
|
|
90
90
|
title: string;
|
|
91
91
|
}> & Omit<Readonly<{
|
|
92
92
|
name: string | number;
|
|
@@ -94,7 +94,7 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<IC
|
|
|
94
94
|
disabled?: boolean;
|
|
95
95
|
}> & Readonly<{
|
|
96
96
|
"onHeader:click"?: ((name: string | number, expanded: boolean) => any) | undefined;
|
|
97
|
-
}>, "toggle" | "expand" | "collapse" | "expanded" | ("
|
|
97
|
+
}>, "toggle" | "expand" | "collapse" | "expanded" | ("name" | "disabled" | "title")> & import('vue').ShallowUnwrapRef<{
|
|
98
98
|
expand: () => void;
|
|
99
99
|
toggle: () => void;
|
|
100
100
|
collapse: () => void;
|
|
@@ -49,8 +49,8 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
49
49
|
}> & Readonly<{
|
|
50
50
|
"onHeader:click"?: ((name: string | number, expanded: boolean) => any) | undefined;
|
|
51
51
|
}>, {
|
|
52
|
-
disabled: boolean;
|
|
53
52
|
name: string | number;
|
|
53
|
+
disabled: boolean;
|
|
54
54
|
title: string;
|
|
55
55
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>, {
|
|
56
56
|
arrow?(_: {}): any;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Directive } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Тип значения, которое можно скопировать в буфер обмена.
|
|
4
|
+
*/
|
|
5
|
+
type CopyValue = string | number | null | undefined;
|
|
6
|
+
/**
|
|
7
|
+
* Директива `v-copy` — копирует переданное значение в буфер обмена.
|
|
8
|
+
*
|
|
9
|
+
* Поведение:
|
|
10
|
+
* - меняет курсор на `pointer`, обозначая интерактивность;
|
|
11
|
+
* - по умолчанию копирует по двойному клику, а на кнопках — по одиночному;
|
|
12
|
+
* - модификаторы `.click` / `.dblclick` принудительно задают тип события;
|
|
13
|
+
* - значение для копирования передаётся в саму директиву и может быть строкой или числом.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```vue
|
|
17
|
+
* <!-- Копирование номера заказа по двойному клику. -->
|
|
18
|
+
* <span v-copy="order.id">{{ order.id }}</span>
|
|
19
|
+
*
|
|
20
|
+
* <!-- Копирование по одиночному клику (на кнопке — автоматически). -->
|
|
21
|
+
* <n-button v-copy="order.payment.onlinePaymentLink">Скопировать ссылку</n-button>
|
|
22
|
+
*
|
|
23
|
+
* <!-- Принудительно одиночный клик на не-кнопке. -->
|
|
24
|
+
* <span v-copy.click="order.barcode">{{ order.barcode }}</span>
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export declare const vCopy: Directive<HTMLElement, CopyValue>;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { IDeletedAt } from '@snabcentr/common-lib';
|
|
2
|
+
/**
|
|
3
|
+
* Класс-помощник для форматирования названий сущностей.
|
|
4
|
+
*/
|
|
5
|
+
export declare class EntityNameHelper {
|
|
6
|
+
/**
|
|
7
|
+
* Возвращает признак того, что сущность удалена.
|
|
8
|
+
*
|
|
9
|
+
* @param entity Данные сущности.
|
|
10
|
+
*/
|
|
11
|
+
static isDeleted(entity: Partial<IDeletedAt>): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Возвращает название сущности с пометкой об удалении.
|
|
14
|
+
*
|
|
15
|
+
* @param entity Данные сущности.
|
|
16
|
+
*/
|
|
17
|
+
static getFormatEntityName(entity: {
|
|
18
|
+
name: string;
|
|
19
|
+
} & Partial<IDeletedAt>): string;
|
|
20
|
+
}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": "Sergey S. Smirnov <dev@snabcentr.com>",
|
|
6
6
|
"type": "module",
|
|
7
|
-
"version": "4.
|
|
7
|
+
"version": "4.7.0",
|
|
8
8
|
"license": "ISC",
|
|
9
9
|
"scripts": {
|
|
10
10
|
"dev": "vite",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@iconify-json/logos": "^1.2.9",
|
|
46
46
|
"@iconify-json/mdi": "^1.2.3",
|
|
47
47
|
"@iconify-json/tabler": "^1.2.23",
|
|
48
|
-
"@snabcentr/common-lib": "^1.90.1 || ^2.7.
|
|
48
|
+
"@snabcentr/common-lib": "^1.90.1 || ^2.7.4",
|
|
49
49
|
"@tailwindcss/container-queries": "^0.1.1",
|
|
50
50
|
"date-fns": "^3.6.0",
|
|
51
51
|
"libphonenumber-js": "^1.12.23",
|