@snabcentr/vue-ui-lib 4.9.0 → 4.11.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.
@@ -643,6 +643,7 @@ declare const _default: import('vue').DefineComponent<IValue<OrderItemBase<IConf
643
643
  removeLineButtonDisabled?: boolean;
644
644
  suggestionOption?: import('naive-ui/es/dropdown/src/interface').DropdownMixedOption[];
645
645
  autoFocus?: boolean;
646
+ isLastLine?: boolean;
646
647
  validation: import('@snabcentr/common-lib').IFormValidationResult;
647
648
  }> & Readonly<{
648
649
  "onUpdate:value"?: ((value: number | null, ...additionalParams: any[]) => any) | undefined;
@@ -1044,6 +1045,7 @@ declare const _default: import('vue').DefineComponent<IValue<OrderItemBase<IConf
1044
1045
  addLineButtonDisabled: boolean;
1045
1046
  removeLineButtonDisabled: boolean;
1046
1047
  suggestionOption: import('naive-ui/es/dropdown/src/interface').DropdownMixedOption[];
1048
+ isLastLine: boolean;
1047
1049
  }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
1048
1050
  'form-item-reference': import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
1049
1051
  readonly label: StringConstructor;
@@ -4107,6 +4109,7 @@ declare const _default: import('vue').DefineComponent<IValue<OrderItemBase<IConf
4107
4109
  removeLineButtonDisabled?: boolean;
4108
4110
  suggestionOption?: import('naive-ui/es/dropdown/src/interface').DropdownMixedOption[];
4109
4111
  autoFocus?: boolean;
4112
+ isLastLine?: boolean;
4110
4113
  validation: import('@snabcentr/common-lib').IFormValidationResult;
4111
4114
  }> & Readonly<{
4112
4115
  "onUpdate:value"?: ((value: number | null, ...additionalParams: any[]) => any) | undefined;
@@ -4504,6 +4507,7 @@ declare const _default: import('vue').DefineComponent<IValue<OrderItemBase<IConf
4504
4507
  addLineButtonDisabled: boolean;
4505
4508
  removeLineButtonDisabled: boolean;
4506
4509
  suggestionOption: import('naive-ui/es/dropdown/src/interface').DropdownMixedOption[];
4510
+ isLastLine: boolean;
4507
4511
  }> | null)[];
4508
4512
  }, any>;
4509
4513
  export default _default;
@@ -39,6 +39,11 @@ declare const _default: import('vue').DefineComponent<IValue<number | null> & {
39
39
  * Признак, что нужно установить фокус на поле ввода.
40
40
  */
41
41
  autoFocus?: boolean;
42
+ /**
43
+ * Признак, что это последняя полоса в списке. На промежуточных полосах Enter
44
+ * не переводит фокус на следующее поле и не отправляет форму.
45
+ */
46
+ isLastLine?: boolean;
42
47
  /**
43
48
  * Результат валидации поля при выполнении запросов.
44
49
  */
@@ -472,6 +477,11 @@ declare const _default: import('vue').DefineComponent<IValue<number | null> & {
472
477
  * Признак, что нужно установить фокус на поле ввода.
473
478
  */
474
479
  autoFocus?: boolean;
480
+ /**
481
+ * Признак, что это последняя полоса в списке. На промежуточных полосах Enter
482
+ * не переводит фокус на следующее поле и не отправляет форму.
483
+ */
484
+ isLastLine?: boolean;
475
485
  /**
476
486
  * Результат валидации поля при выполнении запросов.
477
487
  */
@@ -486,6 +496,7 @@ declare const _default: import('vue').DefineComponent<IValue<number | null> & {
486
496
  addLineButtonDisabled: boolean;
487
497
  removeLineButtonDisabled: boolean;
488
498
  suggestionOption: DropdownMixedOption[];
499
+ isLastLine: boolean;
489
500
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
490
501
  'form-item-reference': import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
491
502
  readonly label: StringConstructor;
@@ -637,6 +637,7 @@ declare const _default: import('vue').DefineComponent<ICatalogableItemProperties
637
637
  removeLineButtonDisabled?: boolean;
638
638
  suggestionOption?: import('naive-ui/es/dropdown/src/interface').DropdownMixedOption[];
639
639
  autoFocus?: boolean;
640
+ isLastLine?: boolean;
640
641
  validation: import('@snabcentr/common-lib').IFormValidationResult;
641
642
  }> & Readonly<{
642
643
  "onUpdate:value"?: ((value: number | null, ...additionalParams: any[]) => any) | undefined;
@@ -1038,6 +1039,7 @@ declare const _default: import('vue').DefineComponent<ICatalogableItemProperties
1038
1039
  addLineButtonDisabled: boolean;
1039
1040
  removeLineButtonDisabled: boolean;
1040
1041
  suggestionOption: import('naive-ui/es/dropdown/src/interface').DropdownMixedOption[];
1042
+ isLastLine: boolean;
1041
1043
  }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
1042
1044
  'form-item-reference': import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
1043
1045
  readonly label: StringConstructor;
@@ -4101,6 +4103,7 @@ declare const _default: import('vue').DefineComponent<ICatalogableItemProperties
4101
4103
  removeLineButtonDisabled?: boolean;
4102
4104
  suggestionOption?: import('naive-ui/es/dropdown/src/interface').DropdownMixedOption[];
4103
4105
  autoFocus?: boolean;
4106
+ isLastLine?: boolean;
4104
4107
  validation: import('@snabcentr/common-lib').IFormValidationResult;
4105
4108
  }> & Readonly<{
4106
4109
  "onUpdate:value"?: ((value: number | null, ...additionalParams: any[]) => any) | undefined;
@@ -4498,6 +4501,7 @@ declare const _default: import('vue').DefineComponent<ICatalogableItemProperties
4498
4501
  addLineButtonDisabled: boolean;
4499
4502
  removeLineButtonDisabled: boolean;
4500
4503
  suggestionOption: import('naive-ui/es/dropdown/src/interface').DropdownMixedOption[];
4504
+ isLastLine: boolean;
4501
4505
  }> | null)[];
4502
4506
  }, any, import('vue').ComponentProvideOptions, {
4503
4507
  P: {};
@@ -3,7 +3,9 @@ import { IOrdersTableFields } from '../../properties/interfaces/i-orders-table-f
3
3
  /**
4
4
  * Компонент представления списка заказов.
5
5
  */
6
- declare const _default: import('vue').DefineComponent<IOrdersTableFields & {
6
+ declare const _default: import('vue').DefineComponent<{
7
+ checkedRowKeys?: Array<string | number>;
8
+ } & IOrdersTableFields & {
7
9
  /**
8
10
  * URL страницы заказов. В качестве указания идентификатора заказа необходимо использовать значение `:id`.
9
11
  */
@@ -42,12 +44,25 @@ declare const _default: import('vue').DefineComponent<IOrdersTableFields & {
42
44
  * внутренний скролл отключается, список прокручивается вместе со страницей.
43
45
  */
44
46
  stickyHeaderOnMobile?: boolean;
45
- }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
47
+ /**
48
+ * Признак, включающий колонку выбора строк чекбоксами (отображается первой колонкой).
49
+ */
50
+ selectable?: boolean;
51
+ /**
52
+ * Признак возможности выбора строки: возвращает false для строк, у которых чекбокс
53
+ * выбора не отображается (например, заказ с информацией об оплате). По умолчанию выбор доступен.
54
+ */
55
+ isRowSelectable?: (row: IOrderInfo) => boolean;
56
+ }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
57
+ "update:checkedRowKeys": (value: (string | number)[]) => any;
58
+ } & {
46
59
  "click:client-name": (client: import('@snabcentr/common-lib').IClientShortInfo, event: any) => any;
47
60
  "dblclick:row": (order: IOrderInfo) => any;
48
61
  "update:pagination": (pagination: IPagination) => any;
49
62
  "update:sort": (sort: ISortRequestParams[]) => any;
50
- }, string, import('vue').PublicProps, Readonly<IOrdersTableFields & {
63
+ }, string, import('vue').PublicProps, Readonly<{
64
+ checkedRowKeys?: Array<string | number>;
65
+ } & IOrdersTableFields & {
51
66
  /**
52
67
  * URL страницы заказов. В качестве указания идентификатора заказа необходимо использовать значение `:id`.
53
68
  */
@@ -86,20 +101,32 @@ declare const _default: import('vue').DefineComponent<IOrdersTableFields & {
86
101
  * внутренний скролл отключается, список прокручивается вместе со страницей.
87
102
  */
88
103
  stickyHeaderOnMobile?: boolean;
104
+ /**
105
+ * Признак, включающий колонку выбора строк чекбоксами (отображается первой колонкой).
106
+ */
107
+ selectable?: boolean;
108
+ /**
109
+ * Признак возможности выбора строки: возвращает false для строк, у которых чекбокс
110
+ * выбора не отображается (например, заказ с информацией об оплате). По умолчанию выбор доступен.
111
+ */
112
+ isRowSelectable?: (row: IOrderInfo) => boolean;
89
113
  }> & Readonly<{
90
114
  "onClick:client-name"?: ((client: import('@snabcentr/common-lib').IClientShortInfo, event: any) => any) | undefined;
91
115
  "onDblclick:row"?: ((order: IOrderInfo) => any) | undefined;
116
+ "onUpdate:checkedRowKeys"?: ((value: (string | number)[]) => any) | undefined;
92
117
  "onUpdate:pagination"?: ((pagination: IPagination) => any) | undefined;
93
118
  "onUpdate:sort"?: ((sort: ISortRequestParams[]) => any) | undefined;
94
119
  }>, {
95
120
  sort: ISortRequestParams[];
96
121
  filters: IFilterGroup;
97
122
  showAttachedUserColumn: boolean;
123
+ selectable: boolean;
98
124
  tableMinWidth: number;
99
125
  pagination: IPagination;
100
126
  useCellIndication: boolean;
101
127
  enableSorting: boolean;
102
128
  refreshInterval: number;
103
129
  stickyHeaderOnMobile: boolean;
130
+ isRowSelectable: (row: IOrderInfo) => boolean;
104
131
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
105
132
  export default _default;
@@ -1,11 +1,17 @@
1
1
  import { Directive } from 'vue';
2
+ /**
3
+ * Колбэк отправки формы. Вызывается, когда Enter нажат на последнем поле ввода.
4
+ */
5
+ type FocusNextSubmit = (() => void) | undefined;
2
6
  /**
3
7
  * Директива `v-focus-next` — вешается на форму или любой контейнер с полями ввода.
4
- * По Enter переводит фокус на следующий редактируемый `<input>` внутри элемента.
8
+ * По Enter переводит фокус на следующий редактируемый `<input>` внутри элемента,
9
+ * а на последнем поле вызывает переданный колбэк отправки формы.
5
10
  *
6
11
  * @example
7
12
  * ```vue
8
- * <n-form v-focus-next ...>
13
+ * <n-form v-focus-next="() => emit('submit', formModel)" ...>
9
14
  * ```
10
15
  */
11
- export declare const vFocusNext: Directive<HTMLElement>;
16
+ export declare const vFocusNext: Directive<HTMLElement, FocusNextSubmit>;
17
+ export {};
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.9.0",
7
+ "version": "4.11.0",
8
8
  "license": "ISC",
9
9
  "scripts": {
10
10
  "dev": "vite",