@topvisor/ui 1.4.3-fixGroupSelector.1 → 1.4.3-fixGroupSelector.5

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 (29) hide show
  1. package/.chunks/{lazy-40pjr8cZ.es.js → lazy-BJRCrEiD.es.js} +5 -1
  2. package/.chunks/lazy-BJRCrEiD.es.js.map +1 -0
  3. package/.chunks/lazy-DZK9LT7a.amd.js +2 -0
  4. package/.chunks/lazy-DZK9LT7a.amd.js.map +1 -0
  5. package/.chunks/policy.vue_vue_type_style_index_0_lang-BFldQm5e.es.js +519 -0
  6. package/.chunks/policy.vue_vue_type_style_index_0_lang-BFldQm5e.es.js.map +1 -0
  7. package/.chunks/policy.vue_vue_type_style_index_0_lang-CR-aHxza.amd.js +2 -0
  8. package/.chunks/policy.vue_vue_type_style_index_0_lang-CR-aHxza.amd.js.map +1 -0
  9. package/api/index.amd.js +1 -1
  10. package/api/index.js +6 -6
  11. package/formsExt/formsExt.amd.js +1 -1
  12. package/formsExt/formsExt.js +1 -1
  13. package/package.json +2 -2
  14. package/project/project.amd.js +1 -1
  15. package/project/project.amd.js.map +1 -1
  16. package/project/project.js +4 -2
  17. package/project/project.js.map +1 -1
  18. package/src/components/formsExt/selector2/composables/useMenu.d.ts +1 -1
  19. package/src/components/formsExt/selector2/types.d.ts +6 -0
  20. package/src/components/project/groupSelector/groups/groups.vue.d.ts +3 -4
  21. package/src/components/project/project.d.ts +1 -0
  22. package/src/components/project/projectSelector/projectSelector.vue.d.ts +3 -4
  23. package/.chunks/lazy-40pjr8cZ.es.js.map +0 -1
  24. package/.chunks/lazy-DSFLxvj4.amd.js +0 -2
  25. package/.chunks/lazy-DSFLxvj4.amd.js.map +0 -1
  26. package/.chunks/policy.vue_vue_type_style_index_0_lang-BavS2pf9.es.js +0 -517
  27. package/.chunks/policy.vue_vue_type_style_index_0_lang-BavS2pf9.es.js.map +0 -1
  28. package/.chunks/policy.vue_vue_type_style_index_0_lang-gH1s78kS.amd.js +0 -2
  29. package/.chunks/policy.vue_vue_type_style_index_0_lang-gH1s78kS.amd.js.map +0 -1
@@ -5,7 +5,7 @@ import { ITEM_ID_NEW } from '../utils';
5
5
  /**
6
6
  * Функционал поиска
7
7
  */
8
- export declare const useMenu: (model: Ref<Props["modelValue"]>, emits: ReturnType<typeof defineEmits>, items: Ref<Props["items"]>, multiselect: Props["multiselect"], useAllItem: Ref<Props["useAllItem"]>, appendSearchToResult: Ref<Props["appendSearchToResult"]>, appendSearchToResultCond: Ref<Props["appendSearchToResultCond"]>, appendWithoutSelect: Ref<Props["appendWithoutSelect"]>, searchFields: Ref<Props["searchFields"]>, searchType: Ref<Props["searchType"]>, minLength: number, api: API) => {
8
+ export declare const useMenu: (model: Ref<Props["modelValue"]>, emits: ReturnType<typeof defineEmits>, items: Ref<Props["items"]>, multiselect: Props["multiselect"], useAllItem: Ref<Props["useAllItem"]>, appendSearchToResult: Ref<Props["appendSearchToResult"]>, appendSearchAllowDuplicate: Ref<Props["appendSearchAllowDuplicate"]>, appendSearchToResultCond: Ref<Props["appendSearchToResultCond"]>, appendWithoutSelect: Ref<Props["appendWithoutSelect"]>, searchFields: Ref<Props["searchFields"]>, searchType: Ref<Props["searchType"]>, minLength: number, api: API) => {
9
9
  searchText: Ref<string, string>;
10
10
  resetSearch: () => void;
11
11
  genIsShort: () => boolean;
@@ -101,6 +101,12 @@ export interface Props {
101
101
  * При добавлении элемента будет вызван emit `appendItem(item)`
102
102
  */
103
103
  appendSearchToResult?: boolean;
104
+ /**
105
+ * Разрешить добавлять элемент, даже если в списке уже есть точное совпадение по имени
106
+ *
107
+ * Работает только вместе с `appendSearchToResult = true`
108
+ */
109
+ appendSearchAllowDuplicate?: boolean;
104
110
  /**
105
111
  * Условие отображения пункта «добавить введённое значение» `item = {id:null, name:search}`
106
112
  *
@@ -1,6 +1,6 @@
1
1
  import { Item as SelectorItem, ItemAll, ItemNew, Props, Size, Slots } from '../../../formsExt/selector2/types';
2
2
  import { Group, Props } from './types';
3
- import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, ComponentInternalInstance, VNodeProps, AllowedComponentProps, ComponentCustomProps, ShallowUnwrapRef, Slot, ComponentPublicInstance, ComponentOptionsBase, GlobalComponents, GlobalDirectives, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ComponentCustomProperties } from 'vue';
3
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, ComponentInternalInstance, VNodeProps, AllowedComponentProps, ComponentCustomProps, Attrs, ShallowUnwrapRef, Slot, ComponentPublicInstance, ComponentOptionsBase, GlobalComponents, GlobalDirectives, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ComponentCustomProperties } from 'vue';
4
4
  import { Props } from '../../../forms/button/types';
5
5
  import { TopLibPopup } from '../../../popup/lib/popup';
6
6
  import { OnCleanup } from '@vue/reactivity';
@@ -45,6 +45,7 @@ declare const _default: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, Compo
45
45
  readonly minLength?: number | undefined;
46
46
  readonly useCache?: boolean | undefined;
47
47
  readonly appendSearchToResult?: boolean | undefined;
48
+ readonly appendSearchAllowDuplicate?: boolean | undefined;
48
49
  readonly appendSearchToResultCond?: ((search: string) => boolean) | undefined;
49
50
  readonly appendWithoutSelect?: boolean | undefined;
50
51
  readonly multiselect?: boolean | undefined;
@@ -57,9 +58,7 @@ declare const _default: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, Compo
57
58
  readonly "onUpdate:modelValue"?: ((value: SelectorItem | SelectorItem[]) => any) | undefined;
58
59
  readonly onAppendItem?: ((item: SelectorItem) => any) | undefined;
59
60
  } & VNodeProps & AllowedComponentProps & ComponentCustomProps;
60
- $attrs: {
61
- [x: string]: unknown;
62
- };
61
+ $attrs: Attrs;
63
62
  $refs: {
64
63
  [x: string]: unknown;
65
64
  } & {
@@ -4,6 +4,7 @@ export { default as TopRegionSelector } from './regionSelector/regionSelector.vu
4
4
  export { findRegion, genSearcherByKey, dialogRegionSelector } from './regionSelector/utils/utils';
5
5
  export { default as TopGroupSelector } from './groupSelector/groupSelector.vue';
6
6
  export { default as TopProjectSelector } from './projectSelector/projectSelector.vue';
7
+ export { clearCache } from './projectSelector/cache';
7
8
  export type { Emits as TopTagSelectorEmits, Tag, TagId, TagIdExclude } from './tagSelector/types';
8
9
  export { genElPopupOpener as genElTopTagSelectorPopupOpener, renderElPopupOpener as renderElTopTagSelectorPopupOpener, } from './tagSelector/utils/el';
9
10
  export { default as TopTagSelector } from './tagSelector/tagSelector.vue';
@@ -1,6 +1,6 @@
1
1
  import { Item, Props, Size, Slots } from '../../formsExt/selector2/types';
2
2
  import { Props } from './types';
3
- import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, ComponentInternalInstance, VNodeProps, AllowedComponentProps, ComponentCustomProps, ShallowUnwrapRef, Slot, ComponentPublicInstance, ComponentOptionsBase, GlobalComponents, GlobalDirectives, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ComponentCustomProperties } from 'vue';
3
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, ComponentInternalInstance, VNodeProps, AllowedComponentProps, ComponentCustomProps, Attrs, ShallowUnwrapRef, Slot, ComponentPublicInstance, ComponentOptionsBase, GlobalComponents, GlobalDirectives, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ComponentCustomProperties } from 'vue';
4
4
  import { Props } from '../../forms/button/types';
5
5
  import { TopLibPopup } from '../../popup/lib/popup';
6
6
  import { OnCleanup } from '@vue/reactivity';
@@ -37,6 +37,7 @@ declare const _default: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, Compo
37
37
  readonly minLength?: number | undefined;
38
38
  readonly useCache?: boolean | undefined;
39
39
  readonly appendSearchToResult?: boolean | undefined;
40
+ readonly appendSearchAllowDuplicate?: boolean | undefined;
40
41
  readonly appendSearchToResultCond?: ((search: string) => boolean) | undefined;
41
42
  readonly appendWithoutSelect?: boolean | undefined;
42
43
  readonly multiselect?: boolean | undefined;
@@ -49,9 +50,7 @@ declare const _default: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, Compo
49
50
  readonly "onUpdate:modelValue"?: ((value: Item | Item[]) => any) | undefined;
50
51
  readonly onAppendItem?: ((item: Item) => any) | undefined;
51
52
  } & VNodeProps & AllowedComponentProps & ComponentCustomProps;
52
- $attrs: {
53
- [x: string]: unknown;
54
- };
53
+ $attrs: Attrs;
55
54
  $refs: {
56
55
  [x: string]: unknown;
57
56
  } & {
@@ -1 +0,0 @@
1
- {"version":3,"file":"lazy-40pjr8cZ.es.js","sources":["../../src/api/api/utils/lazy.ts"],"sourcesContent":["/**\n * Общие утилиты, которые должны грузиться в отложенном режиме\n *\n * Все такие утилиты являются асинхронными\n */\n\n/**\n * Выполнить post запрос в окне браузера\n *\n * @see Api.ClientRequest.callInNewWindow\n * @see Api.ClientRequest.callInSelfWindow\n */\nexport const postInWindow = async (url: string, data: Record<string, any>, target: '_blank' | '_self'): Promise<void> => {\n\tconst form = document.createElement('form');\n\tform.target = target;\n\tform.action = url;\n\tform.method = 'post';\n\n\tdataToForm(form, data);\n\n\tdocument.body.appendChild(form);\n\tform.submit();\n\tform.remove();\n};\n\n/**\n * Вставляет данные в HTML форму\n */\nexport const dataToForm = (elForm: HTMLFormElement, data: Record<string, any>): void => {\n\tconst formData = formDataSerializer(data);\n\n\tfor (const [key, value] of formData.entries()) {\n\t\tif (value instanceof File) {\n\t\t\tthrow new Error('Files can not be manual set in `HTMLFormElement`');\n\t\t}\n\n\t\tconst input = document.createElement('input');\n\t\t// input.type = 'hidden';\n\t\tinput.name = key;\n\t\tinput.value = String(value);\n\t\telForm.appendChild(input);\n\t}\n};\n\n/**\n * Сериализация данных в объект FormData\n *\n * Для отправки файлов или генерации форм\n */\nexport const formDataSerializer = (data: Record<string, any>, formData: FormData = new FormData(), parentKey?: string): FormData => {\n\tfor (const [key, value] of Object.entries(data)) {\n\t\tif (value === undefined || value === null) continue;\n\n\t\tconst fieldKey = parentKey ? `${parentKey}[${key}]` : key;\n\n\t\tswitch (true) {\n\t\t\tcase value instanceof File:\n\t\t\t\tformData.append(fieldKey, value, value.name);\n\n\t\t\t\tbreak;\n\t\t\tcase value instanceof FileList:\n\t\t\t\tfor (let i = 0; i < value.length; i++) {\n\t\t\t\t\tconst file = value.item(i);\n\t\t\t\t\tif (file) {\n\t\t\t\t\t\tformData.append(fieldKey + '[]', file, file.name);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\tcase value instanceof Blob:\n\t\t\t\tformData.append(fieldKey, value);\n\n\t\t\t\tbreak;\n\t\t\tcase Array.isArray(value):\n\t\t\t\t// пустые массивы не передаются\n\t\t\t\tvalue.forEach((item, key) => {\n\t\t\t\t\tformDataSerializer({ [fieldKey + '[' + key + ']']: item }, formData);\n\t\t\t\t});\n\n\t\t\t\tbreak;\n\t\t\tcase value instanceof Date:\n\t\t\t\t// для совместимости с JSON.stringify();\n\t\t\t\tformData.append(fieldKey, value.toISOString());\n\n\t\t\t\tbreak;\n\t\t\tcase typeof value === 'object':\n\t\t\t\tformDataSerializer(value, formData, fieldKey);\n\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tformData.append(fieldKey, String(value));\n\t\t}\n\t}\n\n\treturn formData;\n};\n\n/**\n * Сериализация данных для вставки в виде параметров в url\n */\nexport const querySerializer = (data: Record<string, unknown>): string => {\n\tconst searchParams = new URLSearchParams();\n\n\tconst appendParam = (path: string, currentValue: unknown): void => {\n\t\tif (currentValue == null) return;\n\n\t\tif (Array.isArray(currentValue)) {\n\t\t\tfor (const [key, value] of Object.entries(currentValue)) {\n\t\t\t\tappendParam(`${path}[${key}]`, value);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tif (typeof currentValue === 'object') {\n\t\t\tfor (const [key, value] of Object.entries(currentValue as Record<string, unknown>)) {\n\t\t\t\tappendParam(`${path}[${key}]`, value);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tsearchParams.append(path, String(currentValue));\n\t};\n\n\tfor (const [key, value] of Object.entries(data)) {\n\t\tappendParam(key, value);\n\t}\n\n\treturn searchParams.toString();\n};\n"],"names":["postInWindow","url","data","target","form","dataToForm","elForm","formData","formDataSerializer","key","value","input","parentKey","fieldKey","file","item","querySerializer","searchParams","appendParam","path","currentValue"],"mappings":"AAYO,MAAMA,IAAe,OAAOC,GAAaC,GAA2BC,MAA8C;AACxH,QAAMC,IAAO,SAAS,cAAc,MAAM;AAC1C,EAAAA,EAAK,SAASD,GACdC,EAAK,SAASH,GACdG,EAAK,SAAS,QAEdC,EAAWD,GAAMF,CAAI,GAErB,SAAS,KAAK,YAAYE,CAAI,GAC9BA,EAAK,OAAA,GACLA,EAAK,OAAA;AACN,GAKaC,IAAa,CAACC,GAAyBJ,MAAoC;AACvF,QAAMK,IAAWC,EAAmBN,CAAI;AAExC,aAAW,CAACO,GAAKC,CAAK,KAAKH,EAAS,WAAW;AAC9C,QAAIG,aAAiB;AACpB,YAAM,IAAI,MAAM,kDAAkD;AAGnE,UAAMC,IAAQ,SAAS,cAAc,OAAO;AAE5C,IAAAA,EAAM,OAAOF,GACbE,EAAM,QAAQ,OAAOD,CAAK,GAC1BJ,EAAO,YAAYK,CAAK;AAAA,EACzB;AACD,GAOaH,IAAqB,CAACN,GAA2BK,IAAqB,IAAI,SAAA,GAAYK,MAAiC;AACnI,aAAW,CAACH,GAAKC,CAAK,KAAK,OAAO,QAAQR,CAAI,GAAG;AAChD,QAA2BQ,KAAU,KAAM;AAE3C,UAAMG,IAAWD,IAAY,GAAGA,CAAS,IAAIH,CAAG,MAAMA;AAEtD,YAAQ,IAAA;AAAA,MACP,KAAKC,aAAiB;AACrB,QAAAH,EAAS,OAAOM,GAAUH,GAAOA,EAAM,IAAI;AAE3C;AAAA,MACD,KAAKA,aAAiB;AACrB,iBAAS,IAAI,GAAG,IAAIA,EAAM,QAAQ,KAAK;AACtC,gBAAMI,IAAOJ,EAAM,KAAK,CAAC;AACzB,UAAII,KACHP,EAAS,OAAOM,IAAW,MAAMC,GAAMA,EAAK,IAAI;AAAA,QAElD;AAEA;AAAA,MACD,KAAKJ,aAAiB;AACrB,QAAAH,EAAS,OAAOM,GAAUH,CAAK;AAE/B;AAAA,MACD,KAAK,MAAM,QAAQA,CAAK;AAEvB,QAAAA,EAAM,QAAQ,CAACK,GAAMN,MAAQ;AAC5B,UAAAD,EAAmB,EAAE,CAACK,IAAW,MAAMJ,IAAM,GAAG,GAAGM,EAAA,GAAQR,CAAQ;AAAA,QACpE,CAAC;AAED;AAAA,MACD,KAAKG,aAAiB;AAErB,QAAAH,EAAS,OAAOM,GAAUH,EAAM,YAAA,CAAa;AAE7C;AAAA,MACD,KAAK,OAAOA,KAAU;AACrB,QAAAF,EAAmBE,GAAOH,GAAUM,CAAQ;AAE5C;AAAA,MACD;AACC,QAAAN,EAAS,OAAOM,GAAU,OAAOH,CAAK,CAAC;AAAA,IAAA;AAAA,EAE1C;AAEA,SAAOH;AACR,GAKaS,IAAkB,CAACd,MAA0C;AACzE,QAAMe,IAAe,IAAI,gBAAA,GAEnBC,IAAc,CAACC,GAAcC,MAAgC;AAClE,QAAIA,KAAgB,MAEpB;AAAA,UAAI,MAAM,QAAQA,CAAY,GAAG;AAChC,mBAAW,CAACX,GAAKC,CAAK,KAAK,OAAO,QAAQU,CAAY;AACrD,UAAAF,EAAY,GAAGC,CAAI,IAAIV,CAAG,KAAKC,CAAK;AAErC;AAAA,MACD;AAEA,UAAI,OAAOU,KAAiB,UAAU;AACrC,mBAAW,CAACX,GAAKC,CAAK,KAAK,OAAO,QAAQU,CAAuC;AAChF,UAAAF,EAAY,GAAGC,CAAI,IAAIV,CAAG,KAAKC,CAAK;AAErC;AAAA,MACD;AAEA,MAAAO,EAAa,OAAOE,GAAM,OAAOC,CAAY,CAAC;AAAA;AAAA,EAC/C;AAEA,aAAW,CAACX,GAAKC,CAAK,KAAK,OAAO,QAAQR,CAAI;AAC7C,IAAAgB,EAAYT,GAAKC,CAAK;AAGvB,SAAOO,EAAa,SAAA;AACrB;"}
@@ -1,2 +0,0 @@
1
- define(["require","exports"],(function(m,s){"use strict";if(typeof l>"u")var l=window.Vue;const u=async(a,t,i)=>{const n=document.createElement("form");n.target=i,n.action=a,n.method="post",d(n,t),document.body.appendChild(n),n.submit(),n.remove()},d=(a,t)=>{const i=f(t);for(const[n,e]of i.entries()){if(e instanceof File)throw new Error("Files can not be manual set in `HTMLFormElement`");const o=document.createElement("input");o.name=n,o.value=String(e),a.appendChild(o)}},f=(a,t=new FormData,i)=>{for(const[n,e]of Object.entries(a)){if(e==null)continue;const o=i?`${i}[${n}]`:n;switch(!0){case e instanceof File:t.append(o,e,e.name);break;case e instanceof FileList:for(let r=0;r<e.length;r++){const c=e.item(r);c&&t.append(o+"[]",c,c.name)}break;case e instanceof Blob:t.append(o,e);break;case Array.isArray(e):e.forEach((r,c)=>{f({[o+"["+c+"]"]:r},t)});break;case e instanceof Date:t.append(o,e.toISOString());break;case typeof e=="object":f(e,t,o);break;default:t.append(o,String(e))}}return t},p=a=>{const t=new URLSearchParams,i=(n,e)=>{if(e!=null){if(Array.isArray(e)){for(const[o,r]of Object.entries(e))i(`${n}[${o}]`,r);return}if(typeof e=="object"){for(const[o,r]of Object.entries(e))i(`${n}[${o}]`,r);return}t.append(n,String(e))}};for(const[n,e]of Object.entries(a))i(n,e);return t.toString()};s.dataToForm=d,s.formDataSerializer=f,s.postInWindow=u,s.querySerializer=p,Object.defineProperty(s,Symbol.toStringTag,{value:"Module"})}));
2
- //# sourceMappingURL=lazy-DSFLxvj4.amd.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lazy-DSFLxvj4.amd.js","sources":["../../src/api/api/utils/lazy.ts"],"sourcesContent":["/**\n * Общие утилиты, которые должны грузиться в отложенном режиме\n *\n * Все такие утилиты являются асинхронными\n */\n\n/**\n * Выполнить post запрос в окне браузера\n *\n * @see Api.ClientRequest.callInNewWindow\n * @see Api.ClientRequest.callInSelfWindow\n */\nexport const postInWindow = async (url: string, data: Record<string, any>, target: '_blank' | '_self'): Promise<void> => {\n\tconst form = document.createElement('form');\n\tform.target = target;\n\tform.action = url;\n\tform.method = 'post';\n\n\tdataToForm(form, data);\n\n\tdocument.body.appendChild(form);\n\tform.submit();\n\tform.remove();\n};\n\n/**\n * Вставляет данные в HTML форму\n */\nexport const dataToForm = (elForm: HTMLFormElement, data: Record<string, any>): void => {\n\tconst formData = formDataSerializer(data);\n\n\tfor (const [key, value] of formData.entries()) {\n\t\tif (value instanceof File) {\n\t\t\tthrow new Error('Files can not be manual set in `HTMLFormElement`');\n\t\t}\n\n\t\tconst input = document.createElement('input');\n\t\t// input.type = 'hidden';\n\t\tinput.name = key;\n\t\tinput.value = String(value);\n\t\telForm.appendChild(input);\n\t}\n};\n\n/**\n * Сериализация данных в объект FormData\n *\n * Для отправки файлов или генерации форм\n */\nexport const formDataSerializer = (data: Record<string, any>, formData: FormData = new FormData(), parentKey?: string): FormData => {\n\tfor (const [key, value] of Object.entries(data)) {\n\t\tif (value === undefined || value === null) continue;\n\n\t\tconst fieldKey = parentKey ? `${parentKey}[${key}]` : key;\n\n\t\tswitch (true) {\n\t\t\tcase value instanceof File:\n\t\t\t\tformData.append(fieldKey, value, value.name);\n\n\t\t\t\tbreak;\n\t\t\tcase value instanceof FileList:\n\t\t\t\tfor (let i = 0; i < value.length; i++) {\n\t\t\t\t\tconst file = value.item(i);\n\t\t\t\t\tif (file) {\n\t\t\t\t\t\tformData.append(fieldKey + '[]', file, file.name);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\tcase value instanceof Blob:\n\t\t\t\tformData.append(fieldKey, value);\n\n\t\t\t\tbreak;\n\t\t\tcase Array.isArray(value):\n\t\t\t\t// пустые массивы не передаются\n\t\t\t\tvalue.forEach((item, key) => {\n\t\t\t\t\tformDataSerializer({ [fieldKey + '[' + key + ']']: item }, formData);\n\t\t\t\t});\n\n\t\t\t\tbreak;\n\t\t\tcase value instanceof Date:\n\t\t\t\t// для совместимости с JSON.stringify();\n\t\t\t\tformData.append(fieldKey, value.toISOString());\n\n\t\t\t\tbreak;\n\t\t\tcase typeof value === 'object':\n\t\t\t\tformDataSerializer(value, formData, fieldKey);\n\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tformData.append(fieldKey, String(value));\n\t\t}\n\t}\n\n\treturn formData;\n};\n\n/**\n * Сериализация данных для вставки в виде параметров в url\n */\nexport const querySerializer = (data: Record<string, unknown>): string => {\n\tconst searchParams = new URLSearchParams();\n\n\tconst appendParam = (path: string, currentValue: unknown): void => {\n\t\tif (currentValue == null) return;\n\n\t\tif (Array.isArray(currentValue)) {\n\t\t\tfor (const [key, value] of Object.entries(currentValue)) {\n\t\t\t\tappendParam(`${path}[${key}]`, value);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tif (typeof currentValue === 'object') {\n\t\t\tfor (const [key, value] of Object.entries(currentValue as Record<string, unknown>)) {\n\t\t\t\tappendParam(`${path}[${key}]`, value);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tsearchParams.append(path, String(currentValue));\n\t};\n\n\tfor (const [key, value] of Object.entries(data)) {\n\t\tappendParam(key, value);\n\t}\n\n\treturn searchParams.toString();\n};\n"],"names":["postInWindow","url","data","target","form","dataToForm","elForm","formData","formDataSerializer","key","value","input","parentKey","fieldKey","i","file","key2","item","querySerializer","searchParams","appendParam","path","currentValue"],"mappings":"0FAYO,MAAAA,EAAA,MAAAC,EAAAC,EAAAC,IAAA,wCAENC,EAAA,OAAAD,EACAC,EAAA,OAAAH,EACAG,EAAA,OAAA,OAEAC,EAAAD,EAAAF,CAAA,EAEA,SAAA,KAAA,YAAAE,CAAA,uBAGD,EAKOC,EAAA,CAAAC,EAAAJ,IAAA,CACN,MAAAK,EAAAC,EAAAN,CAAA,EAEA,SAAA,CAAAO,EAAAC,CAAA,IAAAH,EAAA,QAAA,EAAA,CACC,GAAAG,aAAA,KACC,MAAA,IAAA,MAAA,kDAAA,0CAKDC,EAAA,KAAAF,EACAE,EAAA,MAAA,OAAAD,CAAA,EACAJ,EAAA,YAAAK,CAAA,EAEF,EAOOH,EAAA,CAAAN,EAAAK,EAAA,IAAA,SAAAK,IAAA,CACN,SAAA,CAAAH,EAAAC,CAAA,IAAA,OAAA,QAAAR,CAAA,EAAA,qBAGC,MAAAW,EAAAD,EAAA,GAAAA,CAAA,IAAAH,CAAA,IAAAA,EAEA,OAAA,GAAA,8EAME,QAAAK,EAAA,EAAAA,EAAAJ,EAAA,OAAAI,IAAA,sBAGEP,EAAA,OAAAM,EAAA,KAAAE,EAAAA,EAAA,IAAA,+BAMFR,EAAA,OAAAM,EAAAH,CAAA,QAEA,KAAA,MAAA,QAAAA,CAAA,oBAICF,EAAA,CAAA,CAAAK,EAAA,IAAAG,EAAA,GAAA,EAAAC,CAAA,EAAAV,CAAA,CAAmE,CAAA,iEAQpE,KAAA,OAAAG,GAAA,SAEAF,EAAAE,EAAAH,EAAAM,CAAA,qCAIuC,EAI1C,OAAAN,CACD,EAKOW,EAAAhB,GAAA,CACN,MAAAiB,EAAA,IAAA,gBAEAC,EAAA,CAAAC,EAAAC,IAAA,CACC,GAAAA,GAAA,KAEA,IAAA,MAAA,QAAAA,CAAA,EAAA,CACC,SAAA,CAAAb,EAAAC,CAAA,IAAA,OAAA,QAAAY,CAAA,EACCF,EAAA,GAAAC,CAAA,IAAAZ,CAAA,IAAAC,CAAA,SAKF,GAAA,OAAAY,GAAA,SAAA,CACC,SAAA,CAAAb,EAAAC,CAAA,IAAA,OAAA,QAAAY,CAAA,EACCF,EAAA,GAAAC,CAAA,IAAAZ,CAAA,IAAAC,CAAA,+BAK4C,EAG/C,SAAA,CAAAD,EAAAC,CAAA,IAAA,OAAA,QAAAR,CAAA,EACCkB,EAAAX,EAAAC,CAAA,EAGD,OAAAS,EAAA,SAAA,CACD"}
@@ -1,517 +0,0 @@
1
-
2
- import { Core as _autoloadCSSCore } from '../core/app.js';
3
- const fileNames = ['../assets/policy.css'].map(fileName => import.meta.resolve(fileName));
4
- _autoloadCSSCore.insertCSSLinkToPage(fileNames, true);
5
-
6
- import { defineComponent as G, mergeModels as U, useModel as oe, ref as F, onMounted as de, onUpdated as fe, createElementBlock as T, openBlock as y, normalizeClass as pe, createCommentVNode as M, Fragment as R, renderList as H, createBlock as b, mergeProps as W, createSlots as Y, withCtx as B, createTextVNode as V, toDisplayString as P, createVNode as re, createElementVNode as ie, withModifiers as ve, computed as q, watch as j, toRef as E, resolveComponent as ee, resolveDirective as te, unref as c, renderSlot as me, withDirectives as le, resolveDynamicComponent as he } from "vue";
7
- import { e as ae, b as ye, C as J, d as ge, u as Ae, s as Ie } from "./forms-BpbQYyEQ.es.js";
8
- import { _ as Ce, b as se } from "./popupHint.vue_vue_type_style_index_0_lang-if4Qli-k.es.js";
9
- import { _ as Te } from "./widgetInput.vue_vue_type_script_setup_true_lang-Dy8jWadl.es.js";
10
- import { invertKeyboardLayout as ke } from "../utils/keyboard.js";
11
- import { g as Le } from "./field-CyyFzM-Y.es.js";
12
- const Se = {
13
- key: 0,
14
- class: "top-menu_selectAll"
15
- }, Ue = /* @__PURE__ */ G({
16
- __name: "menu",
17
- props: /* @__PURE__ */ U({
18
- modelValue: {},
19
- items: {},
20
- isMultiple: { type: Boolean },
21
- canBeEmptyMultiple: { type: Boolean },
22
- styling: { default: "default" },
23
- selectAllItem: {}
24
- }, {
25
- modelValue: {
26
- required: !0
27
- },
28
- modelModifiers: {}
29
- }),
30
- emits: ["update:modelValue"],
31
- setup(e) {
32
- const a = e, l = oe(e, "modelValue"), t = F();
33
- !a.isMultiple && typeof l.value != "string" && typeof l.value != "number" && console.warn('Type check failed for prop "modelValue". Expected String: ' + typeof l.value), a.isMultiple && !Array.isArray(l.value) && console.warn('Type check failed for prop "modelValue". Expected Array: ' + typeof l.value), a.isMultiple && !a.canBeEmptyMultiple && Array.isArray(l.value) && !l.value.length && a.items[0] && (l.value = [a.items[0]?.href ?? a.items[0]?.value]);
34
- const u = (d) => Array.isArray(l.value) ? l.value.includes(d.value) : d.value === l.value, k = (d, g = !1) => {
35
- if (Array.isArray(l.value)) {
36
- let n = l.value.slice();
37
- if (g) {
38
- n.length || (n = a.items.map((h) => h.value));
39
- const m = n.indexOf(d.value);
40
- m === -1 ? n.push(d.value) : n.splice(m, 1);
41
- } else
42
- n.length === 1 && n[0] === d.value ? n = [] : n = [d.value];
43
- !a.canBeEmptyMultiple && !n.length && (n = [d.value]), l.value = n;
44
- return;
45
- }
46
- l.value = d.value;
47
- }, p = (d) => {
48
- if (t.value.scrollWidth <= t.value.offsetWidth || d.shiftKey || Math.abs(d.deltaY) < 50) return;
49
- d.preventDefault();
50
- const g = d.deltaY > 0 ? 30 : -30;
51
- t.value.scrollLeft = t.value.scrollLeft + g;
52
- }, i = (d = !0) => {
53
- const g = t.value.querySelector(".top-active");
54
- if (!g) return;
55
- const n = 24, m = g.offsetLeft - t.value.offsetLeft - n, h = g.offsetLeft - t.value.offsetLeft + g.clientWidth + n, A = t.value.scrollLeft, w = t.value.clientWidth + t.value.scrollLeft;
56
- let C;
57
- m < A && (C = m), h > w && (C = h - t.value.clientWidth), C !== void 0 && (ye() ? J.$?.(t.value).animate({ scrollLeft: C }, d ? 200 : 0) : t.value.scrollTo({ left: C, behavior: d ? "smooth" : "auto" }));
58
- }, s = () => {
59
- if (Array.isArray(l.value)) {
60
- if (l.value.length === a.items.length) {
61
- l.value = [a.items[0].href ?? a.items[0].value];
62
- return;
63
- }
64
- l.value = a.items.map((d) => d.href ?? d.value);
65
- }
66
- };
67
- return de(() => i(!1)), fe(() => i(!0)), (d, g) => (y(), T("div", {
68
- ref_key: "el",
69
- ref: t,
70
- class: pe({
71
- "top-menu": !0,
72
- ["top-style_" + e.styling]: !0
73
- // ['top-unwrap-x']: styling === 'default',
74
- }),
75
- onWheel: p
76
- }, [
77
- (y(!0), T(R, null, H(e.items, (n) => (y(), b(ae, W({ ref_for: !0 }, n, {
78
- class: "top-menu_item",
79
- color: "theme",
80
- onClick: (m) => k(n, m.ctrlKey || m.metaKey),
81
- isActive: u(n)
82
- }), Y({ _: 2 }, [
83
- n.content ? {
84
- name: "default",
85
- fn: B(() => [
86
- V(P(n.content), 1)
87
- ]),
88
- key: "0"
89
- } : void 0
90
- ]), 1040, ["onClick", "isActive"]))), 256)),
91
- Array.isArray(l.value) && e.selectAllItem ? (y(), T("div", Se, [
92
- re(ae, W(e.selectAllItem, {
93
- class: "top-menu_item",
94
- color: "theme",
95
- styling: "",
96
- onClick: g[0] || (g[0] = (n) => s()),
97
- isActive: l.value.length === e.items.length
98
- }), Y({ _: 2 }, [
99
- e.selectAllItem.content ? {
100
- name: "default",
101
- fn: B(() => [
102
- V(P(e.selectAllItem.content), 1)
103
- ]),
104
- key: "0"
105
- } : void 0
106
- ]), 1040, ["isActive"])
107
- ])) : M("", !0)
108
- ], 34));
109
- }
110
- }), be = { class: "top-selector2_itemMulti top-ellipsis" }, Be = /* @__PURE__ */ G({
111
- __name: "itemMulti",
112
- props: {
113
- id: {},
114
- name: {}
115
- },
116
- emits: ["delete"],
117
- setup(e) {
118
- return (a, l) => (y(), T("div", be, [
119
- V(P(e.name) + " ", 1),
120
- ie("span", {
121
- class: "top-selector2_itemMultiDelete",
122
- "data-top-icon": "",
123
- onClick: l[0] || (l[0] = (t) => a.$emit("delete", { id: e.id, name: e.name })),
124
- onMousedown: l[1] || (l[1] = ve(() => {
125
- }, ["stop"]))
126
- }, null, 32)
127
- ]));
128
- }
129
- }), K = /* @__PURE__ */ new Map(), we = (e) => {
130
- K.get(e)?.clear();
131
- }, xe = (e) => {
132
- const a = window.mo?.user?.id;
133
- return JSON.stringify(e.params) + ":" + e.url + ":" + a;
134
- }, Me = (e, a) => K.get(a)?.get(e), Pe = (e, a, l) => {
135
- K.has(a) || K.set(a, /* @__PURE__ */ new Map()), K.get(a)?.set(e, l);
136
- }, $e = (e, a, l, t) => {
137
- const u = F([]), k = F(!1), p = F(0);
138
- let i = "", s;
139
- e && !e.params.limit && (e.params.limit = 100);
140
- const d = async () => {
141
- if (!e) return;
142
- const h = t ? xe(e) : void 0;
143
- if (h) {
144
- const C = Me(h, e.path);
145
- if (C)
146
- return e.abortByFingerprint(), C;
147
- }
148
- const A = await e.call();
149
- if (A.errors) return;
150
- if (!Array.isArray(A.result)) {
151
- console.warn("Array expected in `res.result`");
152
- return;
153
- }
154
- const w = A.result.findIndex((C) => C.id === void 0 || C.name === void 0);
155
- if (w !== -1) {
156
- console.warn(`В result[${w}] нет id или name`);
157
- return;
158
- }
159
- return h && Pe(h, e.path, A), A;
160
- }, g = async (h) => {
161
- if (!e) return;
162
- if (h) {
163
- if (!s || k.value) return;
164
- e.params.offset = s;
165
- } else
166
- e.params.offset = 0;
167
- a?.(e, i), k.value = !0;
168
- const A = await d();
169
- k.value = !1, p.value++, A && (s = A.nextOffset, h ? u.value = u.value.concat(A.result) : u.value = A.result);
170
- }, n = ge(() => g(!1), 200);
171
- return {
172
- apiRequest: e,
173
- items: u,
174
- isLoading: k,
175
- countLoading: p,
176
- load: g,
177
- setSearchTextAndLoad: (h, A = !0) => {
178
- if (e) {
179
- if (h.length < l) {
180
- e.abortByFingerprint(), u.value = [];
181
- return;
182
- }
183
- h === i && u.value.length || (i = h, A ? n() : g(!1));
184
- }
185
- }
186
- };
187
- }, ue = 0, O = null, ne = (e, a, l = !0) => l && a.id === O ? Array.isArray(e) ? e.some((t) => t.id === a.id && t.name === a.name) : a.name === e.name : Array.isArray(e) ? e.some((t) => t.id === a.id) : a.id === e.id, He = (e, a, l) => {
188
- let t = e.params.filters ?? [];
189
- t = t.filter((u) => u.name !== l), a && t.push(Le(l, "CONTAINS", [a])), e.changeParams({ filters: t });
190
- }, Fe = (e, a, l, t, u, k, p, i, s, d, g, n) => {
191
- const m = F(""), h = {
192
- id: ue,
193
- name: Ae().Common.All
194
- }, A = () => {
195
- m.value = "";
196
- }, w = () => !(!n.apiRequest || m.value.length >= g), C = q(() => {
197
- const o = [];
198
- return !t && u.value && (typeof u.value == "string" && (h.name = u.value), o.push(h)), l.value?.forEach((r) => o.push({ ...r })), o;
199
- }), N = F([]), f = () => {
200
- N.value = v();
201
- }, v = () => {
202
- const o = m.value.toLowerCase(), r = ke(o);
203
- let L = [], $;
204
- const S = [], X = () => {
205
- S.at(-1)?.listItemProps?.type === "delimiter" && S.pop(), S.length && ($ && L.push($), L.push(...S), S.length = 0);
206
- };
207
- for (const I of C.value)
208
- switch (I.listItemProps?.type) {
209
- case "title":
210
- X(), $ = I;
211
- break;
212
- case "delimiter":
213
- if (S.length) {
214
- let x = S.length;
215
- S.at(-1)?.listItemProps?.type === "delimiter" && x--, S[x] = I;
216
- }
217
- break;
218
- default:
219
- const ce = s.value?.includes("id"), Z = I.name.toLowerCase(), _ = s.value?.filter((x) => x !== "id").map((x) => typeof I[x] == "string" || typeof I[x] == "number" ? I[x] : "").join("☼").toLowerCase();
220
- (ce && I.id === Number(o) || _?.includes(o) || _?.includes(r)) && (Z === o || Z === r ? S.unshift(I) : S.push(I));
221
- }
222
- if (X(), L.push(...n.items.value), k.value && m.value && (!p.value || p.value(o)) && // результаты могут быть найдены, но не точные, тогда предложить добавить элемент
223
- !L.find((I) => I.name.toLowerCase() === o)) {
224
- const I = {
225
- id: O,
226
- name: m.value
227
- };
228
- i.value && (I.listItemProps = { closeByClick: !1 }), L.push(I);
229
- }
230
- return t && (L = L.filter((I) => !ne(e.value, I))), L;
231
- }, D = (o) => {
232
- o.listItemProps?.type === "title" || o.listItemProps?.type === "delimiter" || o.id === O && (a("appendItem", o), i.value) || (t && Array.isArray(e.value) ? ne(e.value, o) || (e.value = [...e.value, o]) : e.value = o, setTimeout(() => {
233
- A();
234
- }));
235
- };
236
- if (n.apiRequest) {
237
- const o = [l, n.items];
238
- t && o.push(e), j(o, () => {
239
- f();
240
- });
241
- } else
242
- j([e, l, m], () => {
243
- f();
244
- }, {
245
- immediate: !0,
246
- // слежение за изменениями `items`
247
- deep: 2
248
- });
249
- return {
250
- searchText: m,
251
- resetSearch: A,
252
- genIsShort: w,
253
- itemsForShow: N,
254
- selectItem: D,
255
- selectNextItem: () => {
256
- if (Array.isArray(e.value)) return;
257
- const o = N.value.filter(($) => !["title", "delimiter"].includes($.listItemProps?.type ?? "")), L = (o.findIndex(($) => $.id === e.value.id) + 1) % o.length;
258
- e.value = { ...o[L] };
259
- },
260
- deleteItemByItem: async (o) => {
261
- Array.isArray(e.value) && (e.value = e.value.filter((r) => r.id !== o.id || r.name !== o.name));
262
- }
263
- };
264
- }, De = {
265
- key: 0,
266
- class: "top-selector2_activeItems"
267
- }, Ee = {
268
- key: 1,
269
- class: "top-selector2_activeName top-ellipsis"
270
- }, Ve = {
271
- key: 2,
272
- class: "top-selector2_placeholder top-ellipsis"
273
- }, Ne = { class: "top-selector2_searchWidget" }, Ye = /* @__PURE__ */ G({
274
- __name: "selector2",
275
- props: /* @__PURE__ */ U({
276
- modelValue: {},
277
- items: { default: () => [] },
278
- title: {},
279
- disabled: { type: Boolean },
280
- icon: {},
281
- modificator: {},
282
- size: { default: "s" },
283
- isError: { type: Boolean },
284
- openByFocusInput: { type: Boolean, default: void 0 },
285
- searchType: { default: "popup" },
286
- searchFields: { default: () => ["id", "name"] },
287
- placeholder: {},
288
- hasCloserBtn: { type: Boolean },
289
- api: {},
290
- apiSetSearchParams: {},
291
- minLength: { default: 0 },
292
- useCache: { type: Boolean },
293
- appendSearchToResult: { type: Boolean },
294
- appendSearchToResultCond: {},
295
- appendWithoutSelect: { type: Boolean },
296
- multiselect: { type: Boolean },
297
- useAllItem: { type: [Boolean, String] },
298
- addChanger: { type: Boolean },
299
- buttonProps: {},
300
- selectedAsPlaceholder: { type: Boolean },
301
- openerShortcut: {}
302
- }, {
303
- modelValue: { required: !0 },
304
- modelModifiers: {}
305
- }),
306
- emits: /* @__PURE__ */ U(["appendItem", "open"], ["update:modelValue"]),
307
- setup(e, { expose: a, emit: l }) {
308
- const t = e, u = oe(e, "modelValue"), k = l;
309
- a({
310
- /**
311
- * Сброс локального кеша и кеша api
312
- *
313
- * @param resetAPICache - Сбросить API кеш, по умолчанию не сбрасывается. Для случаев, когда загруженные данные становятся неактуальными
314
- */
315
- resetCache: (f = !1) => {
316
- i.apiRequest && (f && we(i.apiRequest.path), i.items.value = [], i.countLoading.value = 0, i.apiRequest.params.offset = 0, requestAnimationFrame(() => {
317
- s.itemsForShow.value = [];
318
- }), n()?.elPopup && i.setSearchTextAndLoad(s.searchText.value));
319
- }
320
- });
321
- const p = q(() => t.searchType === "inline" && t.multiselect || t.searchType === "inline" && J.state.isMobile ? "popup" : t.searchType), i = $e(t.api, t.apiSetSearchParams, t.minLength, t.useCache), s = Fe(
322
- u,
323
- k,
324
- E(t, "items"),
325
- t.multiselect,
326
- E(t, "useAllItem"),
327
- E(t, "appendSearchToResult"),
328
- E(t, "appendSearchToResultCond"),
329
- E(t, "appendWithoutSelect"),
330
- E(t, "searchFields"),
331
- p,
332
- t.minLength,
333
- i
334
- ), d = q(() => t.buttonProps ? "TopButton" : p.value === "inline" ? "TopInput" : "div"), g = F(null), n = () => g.value?.popup;
335
- i.apiRequest && j(s.searchText, () => {
336
- i.setSearchTextAndLoad(s.searchText.value);
337
- });
338
- const m = q(() => Array.isArray(u.value) || t.multiselect || !t.selectedAsPlaceholder && p.value !== "inline" ? t.placeholder : u.value?.name || t.placeholder), h = (f) => {
339
- let v = !1;
340
- switch (f.key) {
341
- case "Delete":
342
- case "Backspace":
343
- Array.isArray(u.value) && (f.preventDefault(), f.stopPropagation(), u.value.pop());
344
- break;
345
- case "ArrowUp":
346
- case "ArrowRight":
347
- case "ArrowDown":
348
- case "ArrowLeft":
349
- case "Enter":
350
- case " ":
351
- v = !0;
352
- break;
353
- case "Escape":
354
- p.value === "inline" && s.resetSearch();
355
- break;
356
- }
357
- const D = f.key.length === 1 && !f.ctrlKey && !f.metaKey;
358
- (p.value === "popup" || p.value === "inline") && D && (v = !0), n()?.elPopup && (v = !1), v && (p.value === "popup" && (f.preventDefault(), f.stopPropagation(), D && (s.searchText.value || (s.searchText.value = f.key))), f.currentTarget?.click());
359
- }, A = (f) => {
360
- f.preventDefault(), s.selectNextItem();
361
- }, w = () => {
362
- i.apiRequest && i.setSearchTextAndLoad(s.searchText.value, !1), k("open");
363
- }, C = () => {
364
- p.value === "popup" && s.searchText.value && s.resetSearch();
365
- }, N = (f) => {
366
- const v = f.target;
367
- v.scrollTop / (v.scrollHeight - v.offsetHeight) > 0.8 && i.load(!0);
368
- };
369
- return (f, v) => {
370
- const D = ee("TopButton"), Q = ee("TopLoadbar"), z = te("top-focus"), o = te("top-shortcut");
371
- return y(), b(c(Ce), {
372
- ref_key: "popupRef",
373
- ref: g,
374
- onOpen: v[3] || (v[3] = (r) => w()),
375
- onClose: v[4] || (v[4] = (r) => C()),
376
- onScrollContentList: v[5] || (v[5] = (r) => c(i) ? N(r) : void 0),
377
- notch: !1,
378
- transitionDuration: 0,
379
- openByFocusInput: p.value === "inline" && (e.openByFocusInput ?? !0),
380
- disabled: p.value === "inline" && c(s).genIsShort()
381
- }, Y({
382
- opener: B(() => [
383
- le((y(), b(he(d.value), W(e.buttonProps, {
384
- class: {
385
- "top-selector2": !0,
386
- "top-selector2-multiselect": e.multiselect,
387
- ["top-selector2-" + e.modificator]: !!e.modificator,
388
- "top-as-input": !e.buttonProps && p.value !== "inline",
389
- "top-as-selector": !0,
390
- ["top-size_" + e.size]: !0,
391
- "top-disabled": e.disabled,
392
- "top-forms-focusable": !e.disabled,
393
- "top-error": e.isError
394
- },
395
- icon: e.icon,
396
- tabindex: "0",
397
- onKeydown: h,
398
- onBlur: v[0] || (v[0] = (r) => p.value === "inline" && c(s).resetSearch()),
399
- placeholder: m.value,
400
- title: e.title,
401
- captionType: p.value === "inline" && e.title !== void 0 ? "top" : void 0,
402
- modelValue: c(s).searchText.value,
403
- "onUpdate:modelValue": v[1] || (v[1] = (r) => c(s).searchText.value = r)
404
- }), {
405
- default: B(() => [
406
- e.multiselect ? (y(), T("div", De, [
407
- (y(!0), T(R, null, H(u.value, (r) => (y(), b(Be, {
408
- id: r.id,
409
- name: r.name,
410
- onDelete: c(s).deleteItemByItem
411
- }, null, 8, ["id", "name", "onDelete"]))), 256))
412
- ])) : M("", !0),
413
- p.value !== "inline" && !e.multiselect ? (y(), T("span", Ee, P(Array.isArray(u.value) ? "" : u.value.name), 1)) : M("", !0),
414
- e.multiselect && !u.value.length ? (y(), T("span", Ve, P(m.value), 1)) : M("", !0),
415
- e.addChanger && !e.buttonProps && !e.multiselect && c(s).itemsForShow.value.length > 1 && !e.disabled ? (y(), T("span", {
416
- key: 3,
417
- class: "top-changer top-changer-selector",
418
- "data-top-popup-disabled": "true",
419
- onClick: A
420
- })) : M("", !0)
421
- ]),
422
- _: 1
423
- }, 16, ["class", "icon", "placeholder", "title", "captionType", "modelValue"])), [
424
- [
425
- z,
426
- e.isError,
427
- void 0,
428
- { onupdate: !0 }
429
- ],
430
- [o, e.openerShortcut]
431
- ])
432
- ]),
433
- contentList: B(() => [
434
- (y(!0), T(R, null, H(c(s).itemsForShow.value, (r) => (y(), b(c(se), W({
435
- key: r.id ?? void 0,
436
- class: {
437
- "top-active": !Array.isArray(u.value) && !e.multiselect && u.value.id === r.id && u.value.name === r.name,
438
- "top-selector2_item-all": r.id === c(ue),
439
- "top-selector2_item-new": r.id === c(O)
440
- },
441
- closeByClick: !e.multiselect || c(J).state.isMobile
442
- }, { ref_for: !0 }, r.listItemProps, {
443
- onClick: (L) => c(s).selectItem(r)
444
- }), {
445
- default: B(() => [
446
- f.$slots.item ? me(f.$slots, "item", {
447
- key: 0,
448
- item: r
449
- }) : (y(), T(R, { key: 1 }, [
450
- V(P(r.name), 1)
451
- ], 64))
452
- ]),
453
- _: 2
454
- }, 1040, ["class", "closeByClick", "onClick"]))), 128)),
455
- !c(s).itemsForShow.value.length && !c(s).genIsShort() ? (y(), b(c(se), {
456
- key: 0,
457
- type: "regular"
458
- }, {
459
- default: B(() => [
460
- !c(i).isLoading.value || c(i).countLoading.value ? (y(), T(R, { key: 0 }, [
461
- V(P(f.$i18n.Common.No_results), 1)
462
- ], 64)) : (y(), b(c(Ie), {
463
- key: 1,
464
- type: "circles"
465
- }))
466
- ]),
467
- _: 1
468
- })) : M("", !0),
469
- c(i).countLoading.value && c(i).isLoading.value && p.value === "inline" ? (y(), b(Q, { key: 1 })) : M("", !0)
470
- ]),
471
- _: 2
472
- }, [
473
- p.value === "popup" ? {
474
- name: "widget",
475
- fn: B(() => [
476
- ie("div", Ne, [
477
- le(re(c(Te), {
478
- title: "Поиск",
479
- icon: "",
480
- modelValue: c(s).searchText.value,
481
- "onUpdate:modelValue": v[2] || (v[2] = (r) => c(s).searchText.value = r),
482
- isLoading: !!c(i).countLoading.value && c(i).isLoading.value,
483
- placeholder: m.value
484
- }, null, 8, ["modelValue", "isLoading", "placeholder"]), [
485
- [
486
- z,
487
- u.value,
488
- void 0,
489
- { onupdate: !0 }
490
- ]
491
- ]),
492
- e.hasCloserBtn && !f.$core.state.isMobile ? (y(), b(D, {
493
- key: 0,
494
- class: "closer",
495
- color: "theme"
496
- }, {
497
- default: B(() => [
498
- V(P(f.$i18n.Common.Cancel), 1)
499
- ]),
500
- _: 1
501
- })) : M("", !0)
502
- ])
503
- ]),
504
- key: "0"
505
- } : void 0
506
- ]), 1032, ["openByFocusInput", "disabled"]);
507
- };
508
- }
509
- });
510
- export {
511
- O as I,
512
- Ye as _,
513
- Ue as a,
514
- He as b,
515
- ue as c
516
- };
517
- //# sourceMappingURL=policy.vue_vue_type_style_index_0_lang-BavS2pf9.es.js.map