@snabcentr/vue-ui-lib 2.11.0 → 2.13.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.
@@ -1,5 +1,6 @@
1
1
  import { IReference } from '@snabcentr/common-lib';
2
2
  import { IDisabled } from '../../properties/interfaces/i-disabled';
3
+ import { IConsistentMenuWidth } from '../../properties';
3
4
  import { IUpdateValue } from '../../emits';
4
5
  /**
5
6
  * Компонент выпадающего списка значений справочника.
@@ -7,7 +8,7 @@ import { IUpdateValue } from '../../emits';
7
8
  declare const _default: <T extends IReference>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
8
9
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
9
10
  readonly "onUpdate:value"?: ((value: T | T[] | undefined, ...additionalParams: any[]) => any) | undefined;
10
- } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:value"> & (import('../../properties').IValue<T | T[] | undefined> & import('../../properties').IClearable & IDisabled & {
11
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:value"> & (import('../../properties').IValue<T | T[] | undefined> & import('../../properties').IClearable & IDisabled & IConsistentMenuWidth & {
11
12
  /**
12
13
  * Список значений справочника.
13
14
  */
@@ -1,9 +1,16 @@
1
1
  import { IAddressSuggestion } from '@snabcentr/common-lib';
2
- import { IProperties } from '../suggestion-common-definitions';
2
+ import { SearchDataHandlerType } from '../../../properties/types/search-data-handler-type';
3
3
  /**
4
4
  * Компонент подсказки данных об адресе.
5
5
  */
6
- declare const _default: import('vue').DefineComponent<IProperties, {
6
+ declare const _default: import('vue').DefineComponent<import('../../..').IDisabled & import('../../..').IValue<string | undefined> & import('../../..').IClearable & {
7
+ field?: string;
8
+ } & {
9
+ /**
10
+ * Обработчик события поиска товаров.
11
+ */
12
+ searchDataHandler?: SearchDataHandlerType<IAddressSuggestion[]>;
13
+ }, {
7
14
  /**
8
15
  * Устанавливает фокус в поле ввода.
9
16
  */
@@ -11,13 +18,21 @@ declare const _default: import('vue').DefineComponent<IProperties, {
11
18
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
12
19
  "update:value": (value: string | undefined, ...additionalParams: any[]) => any;
13
20
  select: (selectedItem: IAddressSuggestion) => any;
14
- }, string, import('vue').PublicProps, Readonly<IProperties> & Readonly<{
21
+ }, string, import('vue').PublicProps, Readonly<import('../../..').IDisabled & import('../../..').IValue<string | undefined> & import('../../..').IClearable & {
22
+ field?: string;
23
+ } & {
24
+ /**
25
+ * Обработчик события поиска товаров.
26
+ */
27
+ searchDataHandler?: SearchDataHandlerType<IAddressSuggestion[]>;
28
+ }> & Readonly<{
15
29
  "onUpdate:value"?: ((value: string | undefined, ...additionalParams: any[]) => any) | undefined;
16
30
  onSelect?: ((selectedItem: IAddressSuggestion) => any) | undefined;
17
31
  }>, {
18
32
  value: string | undefined;
19
33
  clearable: boolean;
20
34
  disabled: boolean;
35
+ searchDataHandler: SearchDataHandlerType<IAddressSuggestion[]>;
21
36
  field: string;
22
37
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
23
38
  autoCompleteElement: unknown;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Свойство с признаком того, что меню сохраняет свою ширину такой же, как у элемента-триггера выбора.
3
+ */
4
+ export interface IConsistentMenuWidth {
5
+ /**
6
+ * Признак того, что меню сохраняет свою ширину такой же, как у элемента-триггера выбора.
7
+ */
8
+ consistentMenuWidth?: boolean;
9
+ }
@@ -1,4 +1,5 @@
1
1
  import { IClearableValue } from './i-clearable-value';
2
+ import { IConsistentMenuWidth } from './i-consistent-menu-width';
2
3
  import { IDisabled } from './i-disabled';
3
4
  import { IMinTermLength } from './i-min-term-length';
4
5
  import { IPlaceholder } from './i-placeholder';
@@ -7,11 +8,7 @@ import { VNodeChild } from 'vue';
7
8
  /**
8
9
  * Свойства компонента-обертки для компонента выбора из выпадающего списка с возможностью поиска.
9
10
  */
10
- export interface ISearchableSelectWrapper<T> extends IClearableValue<T>, IDisabled, IMinTermLength, IPlaceholder {
11
- /**
12
- * Признак того, что меню сохраняет свою ширину такой же, как у элемента-триггера выбора.
13
- */
14
- readonly consistentMenuWidth?: boolean;
11
+ export interface ISearchableSelectWrapper<T> extends IClearableValue<T>, IDisabled, IMinTermLength, IConsistentMenuWidth, IPlaceholder {
15
12
  /**
16
13
  * Признак того, что в меню выпадающего списка будет использоваться перенос строк.
17
14
  */
@@ -1,5 +1,6 @@
1
1
  export * from './i-clearable';
2
2
  export * from './i-client-short-info-property';
3
+ export * from './i-consistent-menu-width';
3
4
  export * from './i-client-id';
4
5
  export * from './i-debounced';
5
6
  export * from './i-default-country';
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.11.0",
7
+ "version": "2.13.0",
8
8
  "license": "ISC",
9
9
  "scripts": {
10
10
  "dev": "vite",