@snabcentr/vue-ui-lib 2.9.0 → 2.10.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.
@@ -16,6 +16,19 @@ export interface IProductEmits {
16
16
  */
17
17
  isChecked: boolean;
18
18
  };
19
+ /**
20
+ * Событие нажатия на название продукта.
21
+ */
22
+ 'product:name-click': {
23
+ /**
24
+ * Данные о продукте.
25
+ */
26
+ product: ProductData;
27
+ /**
28
+ * Список методов для внешнего взаимодействия.
29
+ */
30
+ exposedMethods: any;
31
+ };
19
32
  /**
20
33
  * Событие нажатия на кнопку "Добавить продукт в корзину".
21
34
  */
@@ -22,6 +22,10 @@ export interface ICatalogableItemProperties {
22
22
  * Признак необходимости отобразить цены.
23
23
  */
24
24
  showProductCosts?: boolean | ((product: ProductData) => boolean);
25
+ /**
26
+ * Признак возможности клика по названию продукта.
27
+ */
28
+ allowNameClick?: boolean | ((product: ProductData) => boolean);
25
29
  /**
26
30
  * Признак возможности клика по цене (если отображены цены).
27
31
  */
@@ -38,6 +38,10 @@ export interface IProductNameProperties {
38
38
  * Значок истории цен будет отображён только при отображении даты установки цены.
39
39
  */
40
40
  showPriceHistory?: boolean;
41
+ /**
42
+ * Признак возможности клика по названию продукта.
43
+ */
44
+ allowNameClick?: boolean | ((product: ProductData) => boolean);
41
45
  /**
42
46
  * Признак возможности клика по цене (если отображены цены).
43
47
  */
@@ -12,6 +12,7 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<IC
12
12
  showSlugs: boolean;
13
13
  showProperties: boolean;
14
14
  showProductCosts: boolean | ((product: ProductData) => boolean);
15
+ allowNameClick: boolean | ((product: ProductData) => boolean);
15
16
  selectedCategoriesItems: import('@snabcentr/common-lib').CategoryData[];
16
17
  selectedProductsItems: ProductData[];
17
18
  showHideForClientButton: boolean | ((category: import('@snabcentr/common-lib').CategoryData) => boolean);
@@ -12,6 +12,7 @@ declare const _default: import('vue').DefineComponent<ICategoryCollapsePropertie
12
12
  showSlugs: boolean;
13
13
  showProperties: boolean;
14
14
  showProductCosts: boolean | ((product: import('@snabcentr/common-lib').ProductData) => boolean);
15
+ allowNameClick: boolean | ((product: import('@snabcentr/common-lib').ProductData) => boolean);
15
16
  filteredItems: SearchResult;
16
17
  selectedCategoriesItems: CategoryData[];
17
18
  selectedProductsItems: import('@snabcentr/common-lib').ProductData[];
@@ -2,7 +2,12 @@ import { IProductNameProperties } from '../../../catalog/interfaces/properties/i
2
2
  /**
3
3
  * Компонент представления данных о продукте.
4
4
  */
5
- declare const _default: import('vue').DefineComponent<IProductNameProperties, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<IProductNameProperties> & Readonly<{}>, {
5
+ declare const _default: import('vue').DefineComponent<IProductNameProperties, {
6
+ /**
7
+ * Открывает всплывающий диалог предпросмотра изображений.
8
+ */
9
+ showProductImagesPreview: () => void;
10
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<IProductNameProperties> & Readonly<{}>, {
6
11
  allowPriceClick: boolean | ((product: import('@snabcentr/common-lib').ProductData) => boolean);
7
12
  showPriceHistory: boolean;
8
13
  showSlugs: boolean;
@@ -10,5 +15,60 @@ declare const _default: import('vue').DefineComponent<IProductNameProperties, {}
10
15
  showCode: boolean;
11
16
  showProductCosts: boolean | ((product: import('@snabcentr/common-lib').ProductData) => boolean);
12
17
  showPlanningDates: boolean;
13
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
18
+ allowNameClick: boolean | ((product: import('@snabcentr/common-lib').ProductData) => boolean);
19
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
20
+ 'image-gallery': ({
21
+ $: import('vue').ComponentInternalInstance;
22
+ $data: {};
23
+ $props: {
24
+ readonly images?: import('@snabcentr/common-lib').IImage[] | undefined;
25
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
26
+ $attrs: {
27
+ [x: string]: unknown;
28
+ };
29
+ $refs: {
30
+ [x: string]: unknown;
31
+ };
32
+ $slots: Readonly<{
33
+ [name: string]: import('vue').Slot<any> | undefined;
34
+ }>;
35
+ $root: import('vue').ComponentPublicInstance | null;
36
+ $parent: import('vue').ComponentPublicInstance | null;
37
+ $host: Element | null;
38
+ $emit: (event: string, ...args: any[]) => void;
39
+ $el: any;
40
+ $options: import('vue').ComponentOptionsBase<Readonly<{
41
+ images?: import('@snabcentr/common-lib').IImage[];
42
+ }> & Readonly<{}>, {
43
+ show: () => void;
44
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
45
+ beforeCreate?: (() => void) | (() => void)[];
46
+ created?: (() => void) | (() => void)[];
47
+ beforeMount?: (() => void) | (() => void)[];
48
+ mounted?: (() => void) | (() => void)[];
49
+ beforeUpdate?: (() => void) | (() => void)[];
50
+ updated?: (() => void) | (() => void)[];
51
+ activated?: (() => void) | (() => void)[];
52
+ deactivated?: (() => void) | (() => void)[];
53
+ beforeDestroy?: (() => void) | (() => void)[];
54
+ beforeUnmount?: (() => void) | (() => void)[];
55
+ destroyed?: (() => void) | (() => void)[];
56
+ unmounted?: (() => void) | (() => void)[];
57
+ renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
58
+ renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
59
+ errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
60
+ };
61
+ $forceUpdate: () => void;
62
+ $nextTick: typeof import('vue').nextTick;
63
+ $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;
64
+ } & Readonly<{}> & Omit<Readonly<{
65
+ images?: import('@snabcentr/common-lib').IImage[];
66
+ }> & Readonly<{}>, "show"> & import('vue').ShallowUnwrapRef<{
67
+ show: () => void;
68
+ }> & {} & import('vue').ComponentCustomProperties & {} & {
69
+ $slots: {
70
+ default?(_: {}): any;
71
+ };
72
+ }) | null;
73
+ }, HTMLDivElement>;
14
74
  export default _default;
@@ -7,7 +7,12 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
7
7
  * Данные о продукте.
8
8
  */
9
9
  images?: IImage[];
10
- }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
10
+ }, {
11
+ /**
12
+ * Открывает всплывающий диалог предпросмотра изображений.
13
+ */
14
+ show: () => void;
15
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
11
16
  /**
12
17
  * Данные о продукте.
13
18
  */
@@ -10,7 +10,6 @@ export declare const naiveUiTheme: {
10
10
  };
11
11
  Checkbox: {
12
12
  border: string;
13
- borderChecked: string;
14
13
  };
15
14
  Common: {
16
15
  borderRadius: string;
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": "2.9.0",
7
+ "version": "2.10.1",
8
8
  "license": "ISC",
9
9
  "scripts": {
10
10
  "dev": "vite",
@@ -45,7 +45,7 @@
45
45
  "@iconify-json/logos": "^1.2.4",
46
46
  "@iconify-json/mdi": "^1.2.3",
47
47
  "@iconify-json/tabler": "^1.2.16",
48
- "@snabcentr/common-lib": "^1.45.0",
48
+ "@snabcentr/common-lib": "^1.45.2",
49
49
  "date-fns": "^3.6.0",
50
50
  "lightgallery": "^2.8.3",
51
51
  "libphonenumber-js": "^1.12.4",