@snabcentr/vue-ui-lib 5.0.0 → 5.3.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.
Files changed (57) hide show
  1. package/dist/manifest.json +2 -2
  2. package/dist/release_notes.tmp +17 -5
  3. package/dist/sc-vue-ui-lib.css +1 -1
  4. package/dist/sc-vue-ui-lib.js +11278 -10195
  5. package/dist/sc-vue-ui-lib.js.map +1 -1
  6. package/dist/sc-vue-ui-lib.umd.cjs +169 -169
  7. package/dist/sc-vue-ui-lib.umd.cjs.map +1 -1
  8. package/dist/src/catalog/interfaces/properties/i-catalogable-item-properties.d.ts +5 -0
  9. package/dist/src/catalog/interfaces/properties/i-product-name-properties.d.ts +5 -0
  10. package/dist/src/components/catalog/category-collapse-item.vue.d.ts +51 -17
  11. package/dist/src/components/catalog/category-collapse.vue.d.ts +28 -2
  12. package/dist/src/components/catalog/dialogs/add-product-to-cart-dialog.vue.d.ts +3 -3
  13. package/dist/src/components/catalog/dialogs/index.d.ts +1 -0
  14. package/dist/src/components/catalog/dialogs/product-info-dialog.vue.d.ts +40 -0
  15. package/dist/src/components/catalog/product-details/index.d.ts +2 -0
  16. package/dist/src/components/catalog/product-details/product-info-content.vue.d.ts +45 -0
  17. package/dist/src/components/catalog/product-details/product-info-popover.vue.d.ts +23 -0
  18. package/dist/src/components/catalog/product-details/product-name.vue.d.ts +2 -1
  19. package/dist/src/components/collapse/collapse-item.vue.d.ts +50 -7
  20. package/dist/src/components/dates/date-range/button-presets.d.ts +9 -0
  21. package/dist/src/components/dates/date-range/date-range-dialog.vue.d.ts +1 -1
  22. package/dist/src/components/dates/date-range/date-range-helper.d.ts +48 -1
  23. package/dist/src/components/dates/date-range/day-range-grid.vue.d.ts +40 -0
  24. package/dist/src/components/dates/date-range/interfaces/i-calendar-month.d.ts +18 -0
  25. package/dist/src/components/dates/date-range/interfaces/i-day-cell.d.ts +21 -0
  26. package/dist/src/components/dates/date-range/interfaces/i-range-selection.d.ts +40 -0
  27. package/dist/src/components/dates/date-range/interfaces/i-standard-period-group-options.d.ts +18 -0
  28. package/dist/src/components/dates/date-range/month-range-grid.vue.d.ts +9 -2
  29. package/dist/src/components/dates/date-range/quick-periods-settings.vue.d.ts +29 -0
  30. package/dist/src/components/dates/date-range/quick-periods.vue.d.ts +30 -0
  31. package/dist/src/components/dates/date-range/use-range-selection.d.ts +12 -0
  32. package/dist/src/components/dialog/base-dialog.vue.d.ts +1 -1
  33. package/dist/src/components/orders/index.d.ts +1 -0
  34. package/dist/src/components/orders/order-highlight-settings.vue.d.ts +31 -0
  35. package/dist/src/components/orders/orders-list.vue.d.ts +35 -1
  36. package/dist/src/components/orders/simple/index.d.ts +2 -0
  37. package/dist/src/components/orders/simple/order-color-swatch.vue.d.ts +16 -0
  38. package/dist/src/components/orders/simple/order-common-info.vue.d.ts +9 -0
  39. package/dist/src/components/orders/simple/order-status-tag.vue.d.ts +53 -0
  40. package/dist/src/components/suggestions/address/address-suggestion.vue.d.ts +1 -1
  41. package/dist/src/components/suggestions/suggestion-common-definitions.d.ts +1 -26
  42. package/dist/src/enums/index.d.ts +1 -0
  43. package/dist/src/enums/order-marker-enum.d.ts +21 -0
  44. package/dist/src/helpers/index.d.ts +1 -0
  45. package/dist/src/helpers/product-info-helper.d.ts +13 -0
  46. package/dist/src/orders/index.d.ts +3 -1
  47. package/dist/src/orders/interfaces/i-order-highlight-settings.d.ts +15 -0
  48. package/dist/src/orders/interfaces/i-order-row-properties.d.ts +17 -0
  49. package/dist/src/orders/interfaces/i-order-status-colors.d.ts +21 -0
  50. package/dist/src/orders/interfaces/i-order-status-tag-color.d.ts +17 -0
  51. package/dist/src/orders/interfaces/index.d.ts +5 -0
  52. package/dist/src/orders/order-marker-colors.d.ts +39 -0
  53. package/dist/src/orders/order-status-colors.d.ts +42 -0
  54. package/dist/src/test/component-test-support.d.ts +40 -0
  55. package/dist/src/types/index.d.ts +1 -0
  56. package/dist/src/types/product-info-tab.d.ts +4 -0
  57. package/package.json +1 -1
@@ -31,6 +31,11 @@ export interface ICatalogableItemProperties {
31
31
  * Признак возможности клика по цене (если отображены цены).
32
32
  */
33
33
  allowPriceClick?: boolean | ((product: ProductData) => boolean);
34
+ /**
35
+ * Признак необходимости отображения кнопки просмотра описания, характеристик и файлов продукта.
36
+ * Кнопка отображается только у продуктов, у которых заданы описание, характеристики или файлы.
37
+ */
38
+ showProductInfoButton?: boolean | ((product: ProductData) => boolean);
34
39
  /**
35
40
  * Признак необходимости отображения истории цен.
36
41
  * Значок истории цен будет отображён только при отображении даты установки цены.
@@ -34,6 +34,11 @@ export interface IProductNameProperties extends IProductActionsProperties {
34
34
  * Признак необходимости отображения дат планирования производства/поставки и т.д.
35
35
  */
36
36
  showPlanningDates?: boolean;
37
+ /**
38
+ * Признак необходимости отображения кнопки просмотра описания, характеристик и файлов продукта.
39
+ * Кнопка отображается только у продуктов, у которых заданы описание, характеристики или файлы.
40
+ */
41
+ showProductInfoButton?: boolean | ((product: ProductData) => boolean);
37
42
  /**
38
43
  * Признак необходимости отображения истории цен.
39
44
  * Значок истории цен будет отображён только при отображении даты установки цены.
@@ -1,4 +1,4 @@
1
- import { ProductData } from '@snabcentr/common-lib';
1
+ import { CategoryData, ProductData } from '@snabcentr/common-lib';
2
2
  import { ICategoryCollapseItemProperties } from '../../catalog/interfaces/properties/i-category-collapse-item-properties';
3
3
  /**
4
4
  * Компонент элемента сворачиваемого списка категорий.
@@ -7,6 +7,7 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<IC
7
7
  showSlugs: boolean;
8
8
  showProperties: boolean;
9
9
  showProductCosts: boolean | ((product: ProductData) => boolean);
10
+ showProductInfoButton: boolean | ((product: ProductData) => boolean);
10
11
  showPriceHistory: boolean | ((product: ProductData) => boolean);
11
12
  showCostDate: boolean | ((product: ProductData) => boolean);
12
13
  allowNameClick: boolean | ((product: ProductData) => boolean);
@@ -15,13 +16,13 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<IC
15
16
  showProductEditButton: import('../..').ButtonStates | import('../..').ButtonStateFunction<ProductData>;
16
17
  productContextButtonsConfig: (product: ProductData) => Array<import('naive-ui').DropdownOption | import('naive-ui').DropdownGroupOption | import('naive-ui').DropdownDividerOption | import('naive-ui').DropdownRenderOption>;
17
18
  isProductItemSelected: import('../..').ButtonStateFunction<ProductData>;
18
- isCategoryItemSelected: import('../..').ButtonStates | import('../..').ButtonStateFunction<import('@snabcentr/common-lib').CategoryData>;
19
- showCategoryHideForClientButton: import('../..').ButtonStates | import('../..').ButtonStateFunction<import('@snabcentr/common-lib').CategoryData>;
20
- showCategoryRequiredButton: import('../..').ButtonStates | import('../..').ButtonStateFunction<import('@snabcentr/common-lib').CategoryData>;
21
- showCategoryPinButton: import('../..').ButtonStates | import('../..').ButtonStateFunction<import('@snabcentr/common-lib').CategoryData>;
22
- showCategoryEditButton: import('../..').ButtonStates | import('../..').ButtonStateFunction<import('@snabcentr/common-lib').CategoryData>;
23
- categoryContextButtonsConfig: (category: import('@snabcentr/common-lib').CategoryData) => Array<import('naive-ui').DropdownOption | import('naive-ui').DropdownGroupOption | import('naive-ui').DropdownDividerOption | import('naive-ui').DropdownRenderOption>;
24
- showConfigurator: boolean | ((category: import('@snabcentr/common-lib').CategoryData) => boolean);
19
+ isCategoryItemSelected: import('../..').ButtonStates | import('../..').ButtonStateFunction<CategoryData>;
20
+ showCategoryHideForClientButton: import('../..').ButtonStates | import('../..').ButtonStateFunction<CategoryData>;
21
+ showCategoryRequiredButton: import('../..').ButtonStates | import('../..').ButtonStateFunction<CategoryData>;
22
+ showCategoryPinButton: import('../..').ButtonStates | import('../..').ButtonStateFunction<CategoryData>;
23
+ showCategoryEditButton: import('../..').ButtonStates | import('../..').ButtonStateFunction<CategoryData>;
24
+ categoryContextButtonsConfig: (category: CategoryData) => Array<import('naive-ui').DropdownOption | import('naive-ui').DropdownGroupOption | import('naive-ui').DropdownDividerOption | import('naive-ui').DropdownRenderOption>;
25
+ showConfigurator: boolean | ((category: CategoryData) => boolean);
25
26
  canShowConfigurator: boolean | (() => boolean);
26
27
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
27
28
  'collapse-item-reference': ({
@@ -100,17 +101,50 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<IC
100
101
  collapse: () => void;
101
102
  expanded: Readonly<import('vue').Ref<boolean, boolean>>;
102
103
  }> & {} & import('vue').ComponentCustomProperties & {} & {
103
- $slots: {
104
- arrow?(_: {}): any;
105
- 'pre-arrow'?(_: {}): any;
106
- header?(_: {}): any;
107
- 'sub-header'?(_: {}): any;
108
- 'header-extra'?(_: {}): any;
109
- default?(_: {}): any;
104
+ $slots: Readonly<{
105
+ arrow: () => void;
106
+ 'pre-arrow': () => void;
107
+ header: () => void;
108
+ 'sub-header': () => void;
109
+ 'header-extra': () => void;
110
+ default: () => void;
111
+ }> & {
112
+ arrow: () => void;
113
+ 'pre-arrow': () => void;
114
+ header: () => void;
115
+ 'sub-header': () => void;
116
+ 'header-extra': () => void;
117
+ default: () => void;
110
118
  };
111
119
  }) | null;
112
- }, HTMLDivElement>, {
113
- default?(_: {}): any;
120
+ }, HTMLDivElement>, Readonly<{
121
+ /**
122
+ * Содержимое категории.
123
+ */
124
+ default: () => void;
125
+ /**
126
+ * Дополнительное содержимое заголовка элемента категории.
127
+ *
128
+ * @param props Параметры слота.
129
+ * @param props.categoryItem Данные категории, для которой рендерится блок.
130
+ */
131
+ 'header-extra': (props: {
132
+ categoryItem: CategoryData;
133
+ }) => void;
134
+ }> & {
135
+ /**
136
+ * Содержимое категории.
137
+ */
138
+ default: () => void;
139
+ /**
140
+ * Дополнительное содержимое заголовка элемента категории.
141
+ *
142
+ * @param props Параметры слота.
143
+ * @param props.categoryItem Данные категории, для которой рендерится блок.
144
+ */
145
+ 'header-extra': (props: {
146
+ categoryItem: CategoryData;
147
+ }) => void;
114
148
  }>;
115
149
  export default _default;
116
150
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -3,11 +3,12 @@ import { CategoryData, SearchResult } from '@snabcentr/common-lib';
3
3
  /**
4
4
  * Компонент списка сворачиваемых элементов каталога.
5
5
  */
6
- declare const _default: import('vue').DefineComponent<ICategoryCollapseProperties, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ICategoryCollapseProperties> & Readonly<{}>, {
6
+ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<ICategoryCollapseProperties, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ICategoryCollapseProperties> & Readonly<{}>, {
7
7
  loading: boolean;
8
8
  showSlugs: boolean;
9
9
  showProperties: boolean;
10
10
  showProductCosts: boolean | ((product: import('@snabcentr/common-lib').ProductData) => boolean);
11
+ showProductInfoButton: boolean | ((product: import('@snabcentr/common-lib').ProductData) => boolean);
11
12
  showPriceHistory: boolean | ((product: import('@snabcentr/common-lib').ProductData) => boolean);
12
13
  showCostDate: boolean | ((product: import('@snabcentr/common-lib').ProductData) => boolean);
13
14
  allowNameClick: boolean | ((product: import('@snabcentr/common-lib').ProductData) => boolean);
@@ -21,5 +22,30 @@ declare const _default: import('vue').DefineComponent<ICategoryCollapsePropertie
21
22
  showCategoryEditButton: import('../..').ButtonStates | import('../..').ButtonStateFunction<CategoryData>;
22
23
  categoryContextButtonsConfig: (category: CategoryData) => Array<import('naive-ui').DropdownOption | import('naive-ui').DropdownGroupOption | import('naive-ui').DropdownDividerOption | import('naive-ui').DropdownRenderOption>;
23
24
  client: import('@snabcentr/common-lib').IClient;
24
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
25
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, Readonly<{
26
+ /**
27
+ * Дополнительное содержимое заголовка элемента категории.
28
+ *
29
+ * @param props Параметры слота.
30
+ * @param props.categoryItem Данные категории, для которой рендерится блок.
31
+ */
32
+ 'header-extra': (props: {
33
+ categoryItem: CategoryData;
34
+ }) => void;
35
+ }> & {
36
+ /**
37
+ * Дополнительное содержимое заголовка элемента категории.
38
+ *
39
+ * @param props Параметры слота.
40
+ * @param props.categoryItem Данные категории, для которой рендерится блок.
41
+ */
42
+ 'header-extra': (props: {
43
+ categoryItem: CategoryData;
44
+ }) => void;
45
+ }>;
25
46
  export default _default;
47
+ type __VLS_WithTemplateSlots<T, S> = T & {
48
+ new (): {
49
+ $slots: S;
50
+ };
51
+ };
@@ -94,12 +94,12 @@ declare const _default: import('vue').DefineComponent<{}, {
94
94
  closing: (target: import('../..').CloseTarget, cancel: () => void) => any;
95
95
  }, string, {
96
96
  trapFocus: boolean;
97
- modalWidth: number;
98
97
  sizes: {
99
98
  phone: import('../..').IDialogSizeParams;
100
99
  tablet: import('../..').IDialogSizeParams;
101
100
  default: import('../..').IDialogSizeParams;
102
101
  };
102
+ modalWidth: number;
103
103
  processing: boolean;
104
104
  valid: boolean;
105
105
  acceptButton: import('../..').IDialogButtonsParams;
@@ -126,12 +126,12 @@ declare const _default: import('vue').DefineComponent<{}, {
126
126
  $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;
127
127
  } & Readonly<{
128
128
  trapFocus: boolean;
129
- modalWidth: number;
130
129
  sizes: {
131
130
  phone: import('../..').IDialogSizeParams;
132
131
  tablet: import('../..').IDialogSizeParams;
133
132
  default: import('../..').IDialogSizeParams;
134
133
  };
134
+ modalWidth: number;
135
135
  processing: boolean;
136
136
  valid: boolean;
137
137
  acceptButton: import('../..').IDialogButtonsParams;
@@ -156,7 +156,7 @@ declare const _default: import('vue').DefineComponent<{}, {
156
156
  onOpening?: (() => any) | undefined;
157
157
  "onProcessing:cancel"?: ((processingCallback: (processing: boolean) => void) => any) | undefined;
158
158
  onClosing?: ((target: import('../..').CloseTarget, cancel: () => void) => any) | undefined;
159
- }>, "close" | "acceptHandler" | ("trapFocus" | "modalWidth" | "sizes" | "processing" | "valid" | "acceptButton" | "cancelButton") | "open"> & import('vue').ShallowUnwrapRef<{
159
+ }>, "close" | "acceptHandler" | ("trapFocus" | "sizes" | "modalWidth" | "processing" | "valid" | "acceptButton" | "cancelButton") | "open"> & import('vue').ShallowUnwrapRef<{
160
160
  open: () => void;
161
161
  close: (target?: import('../..').CloseTarget, force?: boolean) => void;
162
162
  acceptHandler: () => void;
@@ -1 +1,2 @@
1
1
  export { default as ScAddProductToCartDialog } from './add-product-to-cart-dialog.vue';
2
+ export { default as ScProductInfoDialog } from './product-info-dialog.vue';
@@ -0,0 +1,40 @@
1
+ import { ProductData } from '@snabcentr/common-lib';
2
+ import { ProductInfoTab } from '../../../types/product-info-tab';
3
+ /**
4
+ * Диалоговое окно просмотра описания, характеристик и файлов продукта.
5
+ */
6
+ declare const _default: import('vue').DefineComponent<{
7
+ /**
8
+ * Данные о продукте.
9
+ */
10
+ product: ProductData;
11
+ /**
12
+ * Признак видимости диалога.
13
+ */
14
+ show?: boolean;
15
+ /**
16
+ * Вкладка, открываемая изначально. Если у продукта нет её данных, открывается первая доступная.
17
+ */
18
+ activeTab?: ProductInfoTab;
19
+ }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
20
+ "update:show": (show: boolean) => any;
21
+ }, string, import('vue').PublicProps, Readonly<{
22
+ /**
23
+ * Данные о продукте.
24
+ */
25
+ product: ProductData;
26
+ /**
27
+ * Признак видимости диалога.
28
+ */
29
+ show?: boolean;
30
+ /**
31
+ * Вкладка, открываемая изначально. Если у продукта нет её данных, открывается первая доступная.
32
+ */
33
+ activeTab?: ProductInfoTab;
34
+ }> & Readonly<{
35
+ "onUpdate:show"?: ((show: boolean) => any) | undefined;
36
+ }>, {
37
+ show: boolean;
38
+ activeTab: ProductInfoTab;
39
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
40
+ export default _default;
@@ -1 +1,3 @@
1
1
  export { default as ScProductName } from './product-name.vue';
2
+ export { default as ScProductInfoContent } from './product-info-content.vue';
3
+ export { default as ScProductInfoPopover } from './product-info-popover.vue';
@@ -0,0 +1,45 @@
1
+ import { ProductData } from '@snabcentr/common-lib';
2
+ import { ProductInfoTab } from '../../../types/product-info-tab';
3
+ /**
4
+ * Компонент просмотра описания, характеристик и файлов продукта.
5
+ */
6
+ declare const _default: import('vue').DefineComponent<{
7
+ /**
8
+ * Данные о продукте.
9
+ */
10
+ product: ProductData;
11
+ /**
12
+ * Размер вкладок.
13
+ */
14
+ size?: "small" | "medium" | "large";
15
+ /**
16
+ * Максимальная высота содержимого вкладки в CSS-единицах; при превышении содержимое прокручивается.
17
+ */
18
+ maxHeight?: string;
19
+ /**
20
+ * Вкладка, открываемая изначально. Если у продукта нет её данных, открывается первая доступная.
21
+ */
22
+ activeTab?: ProductInfoTab;
23
+ }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
24
+ /**
25
+ * Данные о продукте.
26
+ */
27
+ product: ProductData;
28
+ /**
29
+ * Размер вкладок.
30
+ */
31
+ size?: "small" | "medium" | "large";
32
+ /**
33
+ * Максимальная высота содержимого вкладки в CSS-единицах; при превышении содержимое прокручивается.
34
+ */
35
+ maxHeight?: string;
36
+ /**
37
+ * Вкладка, открываемая изначально. Если у продукта нет её данных, открывается первая доступная.
38
+ */
39
+ activeTab?: ProductInfoTab;
40
+ }> & Readonly<{}>, {
41
+ size: "small" | "medium" | "large";
42
+ maxHeight: string;
43
+ activeTab: ProductInfoTab;
44
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
45
+ export default _default;
@@ -0,0 +1,23 @@
1
+ import { ProductData } from '@snabcentr/common-lib';
2
+ /**
3
+ * Компонент всплывающего окна с описанием, характеристиками и файлами продукта.
4
+ */
5
+ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
6
+ /**
7
+ * Данные о продукте.
8
+ */
9
+ product: ProductData;
10
+ }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
11
+ /**
12
+ * Данные о продукте.
13
+ */
14
+ product: ProductData;
15
+ }> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, {
16
+ default?(_: {}): any;
17
+ }>;
18
+ export default _default;
19
+ type __VLS_WithTemplateSlots<T, S> = T & {
20
+ new (): {
21
+ $slots: S;
22
+ };
23
+ };
@@ -14,6 +14,7 @@ declare const _default: import('vue').DefineComponent<IProductNameProperties & I
14
14
  showCode: boolean;
15
15
  showProductCosts: boolean | ((product: import('@snabcentr/common-lib').ProductData) => boolean);
16
16
  showPlanningDates: boolean;
17
+ showProductInfoButton: boolean | ((product: import('@snabcentr/common-lib').ProductData) => boolean);
17
18
  showPriceHistory: boolean;
18
19
  showCostDate: boolean;
19
20
  allowNameClick: boolean | ((product: import('@snabcentr/common-lib').ProductData) => boolean);
@@ -68,7 +69,7 @@ declare const _default: import('vue').DefineComponent<IProductNameProperties & I
68
69
  };
69
70
  $forceUpdate: () => void;
70
71
  $nextTick: typeof import('vue').nextTick;
71
- $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (... /** @type { [typeof ProductStockCount, typeof ProductStockCount, ] } */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;
72
+ $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;
72
73
  } & Readonly<{}> & Omit<Readonly<{
73
74
  images?: import('@snabcentr/common-lib').IImage[];
74
75
  }> & Readonly<{}>, "show"> & import('vue').ShallowUnwrapRef<{
@@ -52,13 +52,56 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
52
52
  name: string | number;
53
53
  disabled: boolean;
54
54
  title: string;
55
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>, {
56
- arrow?(_: {}): any;
57
- 'pre-arrow'?(_: {}): any;
58
- header?(_: {}): any;
59
- 'sub-header'?(_: {}): any;
60
- 'header-extra'?(_: {}): any;
61
- default?(_: {}): any;
55
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>, Readonly<{
56
+ /**
57
+ * Значок скрытия и отображения содержимого.
58
+ */
59
+ arrow: () => void;
60
+ /**
61
+ * Зона значков слева от заголовка.
62
+ */
63
+ 'pre-arrow': () => void;
64
+ /**
65
+ * Основной заголовок элемента.
66
+ */
67
+ header: () => void;
68
+ /**
69
+ * Вспомогательный заголовок под основным.
70
+ */
71
+ 'sub-header': () => void;
72
+ /**
73
+ * Дополнительное содержимое заголовка справа.
74
+ */
75
+ 'header-extra': () => void;
76
+ /**
77
+ * Содержимое элемента, отображаемое в развёрнутом состоянии.
78
+ */
79
+ default: () => void;
80
+ }> & {
81
+ /**
82
+ * Значок скрытия и отображения содержимого.
83
+ */
84
+ arrow: () => void;
85
+ /**
86
+ * Зона значков слева от заголовка.
87
+ */
88
+ 'pre-arrow': () => void;
89
+ /**
90
+ * Основной заголовок элемента.
91
+ */
92
+ header: () => void;
93
+ /**
94
+ * Вспомогательный заголовок под основным.
95
+ */
96
+ 'sub-header': () => void;
97
+ /**
98
+ * Дополнительное содержимое заголовка справа.
99
+ */
100
+ 'header-extra': () => void;
101
+ /**
102
+ * Содержимое элемента, отображаемое в развёрнутом состоянии.
103
+ */
104
+ default: () => void;
62
105
  }>;
63
106
  export default _default;
64
107
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -0,0 +1,9 @@
1
+ import { ButtonProps } from 'naive-ui';
2
+ /**
3
+ * Пресет внешнего вида кнопок быстрого выбора периода: крупные скруглённые кнопки со светлой рамкой.
4
+ */
5
+ export declare const QUICK_PERIOD_BUTTON_THEME: ButtonProps['themeOverrides'];
6
+ /**
7
+ * Пресет внешнего вида кнопок листания сеток периода: квадратные кнопки со светлой рамкой.
8
+ */
9
+ export declare const GRID_ARROW_BUTTON_THEME: ButtonProps['themeOverrides'];
@@ -2,7 +2,7 @@ import { IClearable } from '../../../properties/interfaces/i-clearable';
2
2
  import { IDateRangeDisabled } from '../../../properties/interfaces/i-date-range-disabled';
3
3
  import { IDatePeriod, ILabeledPeriod } from '@snabcentr/common-lib';
4
4
  /**
5
- * Диалог «Выберите период» с сеткой месяцев и стандартными периодами.
5
+ * Диалог «Выберите период» с быстрым выбором, сеткой месяцев, календарём дней и стандартными периодами.
6
6
  */
7
7
  declare const _default: import('vue').DefineComponent<IClearable & IDateRangeDisabled & {
8
8
  /**
@@ -1,12 +1,45 @@
1
- import { IDatePeriod } from '@snabcentr/common-lib';
1
+ import { IDatePeriod, ILabeledPeriod, IStandardPeriod } from '@snabcentr/common-lib';
2
+ import { SelectGroupOption, SelectOption } from 'naive-ui';
2
3
  /**
3
4
  * Ключ хранилища для последнего выбранного вида диалога выбора периода.
4
5
  */
5
6
  export declare const DATE_RANGE_DIALOG_MODE_STORAGE_KEY = "date-range.dialog.mode";
7
+ /**
8
+ * Ключ хранилища для последнего выбранного масштаба сетки диалога выбора периода: по месяцам или по дням.
9
+ */
10
+ export declare const DATE_RANGE_DIALOG_SCALE_STORAGE_KEY = "date-range.dialog.scale";
11
+ /**
12
+ * Ключ хранилища для набора периодов быстрого выбора.
13
+ */
14
+ export declare const DATE_RANGE_QUICK_PERIODS_STORAGE_KEY = "date-range.quick-periods";
15
+ /**
16
+ * Набор периодов быстрого выбора по умолчанию — ключи стандартных периодов.
17
+ */
18
+ export declare const DEFAULT_QUICK_PERIOD_KEYS: string[];
6
19
  /**
7
20
  * Краткие названия месяцев для сеток выбора: заданы явно и не зависят от локали календаря.
8
21
  */
9
22
  export declare const MONTH_LABELS: string[];
23
+ /**
24
+ * Полные названия месяцев для заголовков календаря.
25
+ */
26
+ export declare const MONTH_NAMES: string[];
27
+ /**
28
+ * Краткие названия дней недели, неделя начинается с понедельника.
29
+ */
30
+ export declare const WEEKDAY_LABELS: string[];
31
+ /**
32
+ * Возвращает сквозной индекс календарного дня: число дней от точки отсчёта, без влияния перевода часов.
33
+ *
34
+ * @param date Дата.
35
+ */
36
+ export declare const dayIndex: (date: Date) => number;
37
+ /**
38
+ * Возвращает начало дня по его сквозному индексу.
39
+ *
40
+ * @param index Сквозной индекс дня.
41
+ */
42
+ export declare const dateFromDayIndex: (index: number) => Date;
10
43
  /**
11
44
  * Нормализует границы периода: «от» приводится к началу дня, «до» — к концу дня, границы могут быть
12
45
  * не заданы по отдельности (полуоткрытый период). Инвертированные границы переставляются местами;
@@ -22,3 +55,17 @@ export declare const normalizePeriod: (from?: Date | null, to?: Date | null, loc
22
55
  from?: boolean;
23
56
  to?: boolean;
24
57
  }) => IDatePeriod;
58
+ /**
59
+ * Преобразует периоды в опции списка: значение опции — ключ периода, сам период доступен в поле item.
60
+ *
61
+ * @param periods Периоды по ключам.
62
+ */
63
+ export declare const periodsToOptions: (periods: Record<string, ILabeledPeriod>) => SelectOption[];
64
+ /**
65
+ * Возвращает разделы списка стандартных периодов одной группы: группа «Прочее» разбивается
66
+ * на разделы с подзаголовками, остальные группы — один раздел без подзаголовка.
67
+ *
68
+ * @param periods Стандартные периоды по ключам.
69
+ * @param groupKey Ключ группы.
70
+ */
71
+ export declare const standardPeriodSections: (periods: Record<string, IStandardPeriod>, groupKey: string) => SelectGroupOption[];
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Календарь дней на несколько месяцев подряд с выбором диапазона двумя кликами, протяжкой или клавиатурой.
3
+ */
4
+ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
5
+ /**
6
+ * Начало выбранного периода.
7
+ */
8
+ from?: Date | null;
9
+ /**
10
+ * Окончание выбранного периода.
11
+ */
12
+ to?: Date | null;
13
+ }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
14
+ select: (value: {
15
+ from: Date;
16
+ to: Date;
17
+ }) => any;
18
+ }, string, import('vue').PublicProps, Readonly<{
19
+ /**
20
+ * Начало выбранного периода.
21
+ */
22
+ from?: Date | null;
23
+ /**
24
+ * Окончание выбранного периода.
25
+ */
26
+ to?: Date | null;
27
+ }> & Readonly<{
28
+ onSelect?: ((value: {
29
+ from: Date;
30
+ to: Date;
31
+ }) => any) | undefined;
32
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>, {
33
+ actions?(_: {}): any;
34
+ }>;
35
+ export default _default;
36
+ type __VLS_WithTemplateSlots<T, S> = T & {
37
+ new (): {
38
+ $slots: S;
39
+ };
40
+ };
@@ -0,0 +1,18 @@
1
+ import { IDayCell } from './i-day-cell';
2
+ /**
3
+ * Месяц календарной сетки: заголовок и ячейки дней.
4
+ */
5
+ export interface ICalendarMonth {
6
+ /**
7
+ * Ключ месяца для рендера списка.
8
+ */
9
+ key: string;
10
+ /**
11
+ * Заголовок месяца, например «Май 2025».
12
+ */
13
+ title: string;
14
+ /**
15
+ * Ячейки дней: шесть недель по семь дней, начиная с понедельника.
16
+ */
17
+ cells: IDayCell[];
18
+ }
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Ячейка дня в календарной сетке месяца.
3
+ */
4
+ export interface IDayCell {
5
+ /**
6
+ * Сквозной индекс дня.
7
+ */
8
+ index: number;
9
+ /**
10
+ * Число месяца.
11
+ */
12
+ day: number;
13
+ /**
14
+ * Признак принадлежности дня показываемому месяцу; дни соседних месяцев заполняют сетку и недоступны для выбора.
15
+ */
16
+ isCurrentMonth: boolean;
17
+ /**
18
+ * Признак сегодняшнего дня.
19
+ */
20
+ isToday: boolean;
21
+ }
@@ -0,0 +1,40 @@
1
+ import { ComputedRef } from 'vue';
2
+ /**
3
+ * Состояние и обработчики выбора диапазона ячеек сетки по их сквозным индексам.
4
+ */
5
+ export interface IRangeSelection {
6
+ /**
7
+ * Активный подсвечиваемый диапазон: протяжка, затем предпросмотр после первого клика,
8
+ * затем диапазон из значения периода.
9
+ */
10
+ activeRange: ComputedRef<[number, number] | null>;
11
+ /**
12
+ * Возвращает положение ячейки в активном диапазоне: граница, середина либо null вне диапазона.
13
+ *
14
+ * @param index Сквозной индекс ячейки.
15
+ */
16
+ cellPosition(index: number): 'bound' | 'in-range' | null;
17
+ /**
18
+ * Обработчик зажатия указателя на ячейке.
19
+ *
20
+ * @param index Сквозной индекс ячейки.
21
+ */
22
+ pointerDownHandler(index: number): void;
23
+ /**
24
+ * Обработчик наведения указателя на ячейку: двигает предпросмотр цепочки; при зажатом указателе
25
+ * переводит выбор в режим протяжки.
26
+ *
27
+ * @param index Сквозной индекс ячейки.
28
+ */
29
+ pointerEnterHandler(index: number): void;
30
+ /**
31
+ * Обработчик ухода указателя с сетки: снимает предпросмотр наведения.
32
+ */
33
+ pointerLeaveHandler(): void;
34
+ /**
35
+ * Обработчик выбора ячейки с клавиатуры по логике пары кликов «первый / второй».
36
+ *
37
+ * @param index Сквозной индекс ячейки.
38
+ */
39
+ selectHandler(index: number): void;
40
+ }
@@ -0,0 +1,18 @@
1
+ import { SelectGroupOption } from 'naive-ui';
2
+ /**
3
+ * Группа стандартных периодов с разделами опций для списков выбора.
4
+ */
5
+ export interface IStandardPeriodGroupOptions {
6
+ /**
7
+ * Ключ группы.
8
+ */
9
+ key: string;
10
+ /**
11
+ * Название группы.
12
+ */
13
+ label: string;
14
+ /**
15
+ * Разделы группы с опциями периодов.
16
+ */
17
+ sections: SelectGroupOption[];
18
+ }