@topvisor/ui 1.0.41-dialog.1 → 1.0.42-TopSelector.2

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 (144) hide show
  1. package/.chunks/{core-D2o3elGA.amd.js → core-CNHOrWnw.amd.js} +2 -2
  2. package/.chunks/{core-D2o3elGA.amd.js.map → core-CNHOrWnw.amd.js.map} +1 -1
  3. package/.chunks/{core-CwjGTMhd.es.js → core-CZLRhkk2.es.js} +4 -4
  4. package/.chunks/{core-CwjGTMhd.es.js.map → core-CZLRhkk2.es.js.map} +1 -1
  5. package/.chunks/{datepicker-N83oX3hx.es.js → datepicker-BZ-GKoJc.es.js} +2 -2
  6. package/.chunks/{datepicker-N83oX3hx.es.js.map → datepicker-BZ-GKoJc.es.js.map} +1 -1
  7. package/.chunks/{datepicker-Byyye2pn.amd.js → datepicker-DnMEQ2c7.amd.js} +2 -2
  8. package/.chunks/{datepicker-Byyye2pn.amd.js.map → datepicker-DnMEQ2c7.amd.js.map} +1 -1
  9. package/.chunks/{dialog_selectorRegions-pDIYvl7b.amd.js → dialog_selectorRegions-B7ylHRje.amd.js} +2 -2
  10. package/.chunks/{dialog_selectorRegions-pDIYvl7b.amd.js.map → dialog_selectorRegions-B7ylHRje.amd.js.map} +1 -1
  11. package/.chunks/{dialog_selectorRegions-lYV2SJBx.es.js → dialog_selectorRegions-CR77RefG.es.js} +4 -4
  12. package/.chunks/{dialog_selectorRegions-lYV2SJBx.es.js.map → dialog_selectorRegions-CR77RefG.es.js.map} +1 -1
  13. package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-C0n3o7PD.amd.js +2 -0
  14. package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-C0n3o7PD.amd.js.map +1 -0
  15. package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-X3S_WcSV.es.js → dialogs.vue_vue_type_script_setup_true_lang-sExyADFk.es.js} +113 -97
  16. package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-sExyADFk.es.js.map +1 -0
  17. package/.chunks/{forms-C-fyoosd.es.js → forms-1PEYT7sp.es.js} +482 -470
  18. package/.chunks/{forms-C-fyoosd.es.js.map → forms-1PEYT7sp.es.js.map} +1 -1
  19. package/.chunks/forms-BduN5hFf.amd.js +3 -0
  20. package/.chunks/{forms-DO87ZZk9.amd.js.map → forms-BduN5hFf.amd.js.map} +1 -1
  21. package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-DDQSxC8E.amd.js → listItem.vue_vue_type_script_setup_true_lang-C660hIcG.amd.js} +2 -2
  22. package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-DDQSxC8E.amd.js.map → listItem.vue_vue_type_script_setup_true_lang-C660hIcG.amd.js.map} +1 -1
  23. package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-BJTTvdc7.es.js → listItem.vue_vue_type_script_setup_true_lang-DPwnYUm-.es.js} +2 -2
  24. package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-BJTTvdc7.es.js.map → listItem.vue_vue_type_script_setup_true_lang-DPwnYUm-.es.js.map} +1 -1
  25. package/.chunks/{menu.vue_vue_type_style_index_0_lang-Bi9Z81pC.es.js → menu.vue_vue_type_style_index_0_lang-BYP0xpzD.es.js} +2 -2
  26. package/.chunks/{menu.vue_vue_type_style_index_0_lang-Bi9Z81pC.es.js.map → menu.vue_vue_type_style_index_0_lang-BYP0xpzD.es.js.map} +1 -1
  27. package/.chunks/{menu.vue_vue_type_style_index_0_lang-7eYwnVLw.amd.js → menu.vue_vue_type_style_index_0_lang-C9cIXmj2.amd.js} +2 -2
  28. package/.chunks/{menu.vue_vue_type_style_index_0_lang-7eYwnVLw.amd.js.map → menu.vue_vue_type_style_index_0_lang-C9cIXmj2.amd.js.map} +1 -1
  29. package/.chunks/{notice-DCONQ8rR.es.js → notice-C505E22P.es.js} +2 -2
  30. package/.chunks/{notice-DCONQ8rR.es.js.map → notice-C505E22P.es.js.map} +1 -1
  31. package/.chunks/{notice-B8nfJMJN.amd.js → notice-CEYLelBs.amd.js} +2 -2
  32. package/.chunks/{notice-B8nfJMJN.amd.js.map → notice-CEYLelBs.amd.js.map} +1 -1
  33. package/.chunks/{page.vue_vue_type_script_setup_true_lang-Cg3dLy7K.amd.js → page.vue_vue_type_script_setup_true_lang-DpmKeCWn.amd.js} +2 -2
  34. package/.chunks/page.vue_vue_type_script_setup_true_lang-DpmKeCWn.amd.js.map +1 -0
  35. package/.chunks/{page.vue_vue_type_script_setup_true_lang-Dze2ZUr3.es.js → page.vue_vue_type_script_setup_true_lang-_-EoskSt.es.js} +4 -4
  36. package/.chunks/page.vue_vue_type_script_setup_true_lang-_-EoskSt.es.js.map +1 -0
  37. package/.chunks/{popup-PpCQY5Zi.es.js → popup-Bh3WbTKH.es.js} +106 -73
  38. package/.chunks/popup-Bh3WbTKH.es.js.map +1 -0
  39. package/.chunks/popup-C5-ffkMJ.amd.js +2 -0
  40. package/.chunks/popup-C5-ffkMJ.amd.js.map +1 -0
  41. package/.chunks/{utils-DAIrXU57.amd.js → utils-BgjhCn4H.amd.js} +2 -2
  42. package/.chunks/{utils-DAIrXU57.amd.js.map → utils-BgjhCn4H.amd.js.map} +1 -1
  43. package/.chunks/{utils-BcKnFj1j.es.js → utils-CMJHpNDX.es.js} +246 -169
  44. package/.chunks/utils-CMJHpNDX.es.js.map +1 -0
  45. package/.chunks/{utils-DsICGMuv.es.js → utils-DEyMm4Iq.es.js} +2 -2
  46. package/.chunks/{utils-DsICGMuv.es.js.map → utils-DEyMm4Iq.es.js.map} +1 -1
  47. package/.chunks/utils-DWmOkm95.amd.js +2 -0
  48. package/.chunks/utils-DWmOkm95.amd.js.map +1 -0
  49. package/assets/core.css +1 -1
  50. package/assets/forms.css +1 -1
  51. package/assets/formsExt.css +1 -1
  52. package/assets/notice.css +1 -1
  53. package/assets/project.css +1 -1
  54. package/charts/charts.amd.js +1 -1
  55. package/charts/charts.js +1 -1
  56. package/components/dialog/dialog/dialogs/dialogs.vue.d.ts +3 -0
  57. package/components/dialog/lib/types.d.ts +23 -0
  58. package/components/dialog/lib/utils.d.ts +8 -8
  59. package/components/dialog/lib/utils.globalEvents.d.ts +2 -2
  60. package/components/dialog/lib/worker.d.ts +12 -11
  61. package/components/forms/button/button.vue.d.ts +2 -5
  62. package/components/forms/button/types.d.ts +10 -0
  63. package/components/formsExt/formsExt.d.ts +2 -0
  64. package/components/formsExt/policy/policy.vue.d.ts +4 -0
  65. package/components/formsExt/policy/types.d.ts +10 -0
  66. package/components/formsExt/selector2/composables/useAPI.d.ts +1 -1
  67. package/components/formsExt/selector2/composables/useMenu.d.ts +5 -1
  68. package/components/formsExt/selector2/selector2.vue.d.ts +3 -4
  69. package/components/formsExt/selector2/stories/dummyAPIRequest.d.ts +1 -2
  70. package/components/formsExt/selector2/types.d.ts +48 -22
  71. package/components/popup/lib/popup.d.ts +1 -0
  72. package/components/popup/lib/worker.d.ts +4 -2
  73. package/core/app.amd.js +1 -1
  74. package/core/app.js +5 -5
  75. package/core/core/core.d.ts +1 -1
  76. package/core/core/options.d.ts +7 -6
  77. package/core/core/state.d.ts +1 -1
  78. package/core/plugins/core.d.ts +1 -1
  79. package/core/utils/date.d.ts +30 -12
  80. package/core/utils/dom.d.ts +11 -1
  81. package/core/utils/string.d.ts +1 -1
  82. package/dialog/dialog.amd.js +1 -1
  83. package/dialog/dialog.js +2 -2
  84. package/forms/forms.amd.js +1 -1
  85. package/forms/forms.js +1 -1
  86. package/formsExt/formsExt.amd.js +1 -1
  87. package/formsExt/formsExt.amd.js.map +1 -1
  88. package/formsExt/formsExt.js +432 -309
  89. package/formsExt/formsExt.js.map +1 -1
  90. package/icomoon/demo.html +15 -1
  91. package/icomoon/fonts/Topvisor-2.eot +0 -0
  92. package/icomoon/fonts/Topvisor-2.svg +1 -0
  93. package/icomoon/fonts/Topvisor-2.ttf +0 -0
  94. package/icomoon/fonts/Topvisor-2.woff +0 -0
  95. package/icomoon/selection.json +1 -1
  96. package/icomoon/style.css +8 -5
  97. package/layout/layout.amd.js +1 -1
  98. package/layout/layout.js +1 -1
  99. package/package.json +1 -1
  100. package/popup/popup.amd.js +1 -1
  101. package/popup/popup.js +2 -2
  102. package/popup/worker.amd.js +1 -1
  103. package/popup/worker.amd.js.map +1 -1
  104. package/popup/worker.js +30 -21
  105. package/popup/worker.js.map +1 -1
  106. package/project/project.amd.js +1 -1
  107. package/project/project.amd.js.map +1 -1
  108. package/project/project.js +6 -6
  109. package/project/project.js.map +1 -1
  110. package/tabsView/tabsView.amd.js +1 -1
  111. package/tabsView/tabsView.js +1 -1
  112. package/utils/clipboard.amd.js +1 -1
  113. package/utils/clipboard.js +1 -1
  114. package/utils/date.amd.js +1 -1
  115. package/utils/date.js +4 -3
  116. package/utils/device.amd.js +1 -1
  117. package/utils/device.js +1 -1
  118. package/utils/dom.amd.js +1 -1
  119. package/utils/dom.amd.js.map +1 -1
  120. package/utils/dom.js +27 -22
  121. package/utils/dom.js.map +1 -1
  122. package/utils/lodash.amd.js +1 -1
  123. package/utils/lodash.js +1 -1
  124. package/utils/price.amd.js +1 -1
  125. package/utils/price.js +1 -1
  126. package/utils/searchers.amd.js +1 -1
  127. package/utils/searchers.js +3 -3
  128. package/utils/string.amd.js +1 -1
  129. package/utils/string.amd.js.map +1 -1
  130. package/utils/string.js +34 -30
  131. package/utils/string.js.map +1 -1
  132. package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-B14m3p7q.amd.js +0 -2
  133. package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-B14m3p7q.amd.js.map +0 -1
  134. package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-X3S_WcSV.es.js.map +0 -1
  135. package/.chunks/forms-DO87ZZk9.amd.js +0 -3
  136. package/.chunks/page.vue_vue_type_script_setup_true_lang-Cg3dLy7K.amd.js.map +0 -1
  137. package/.chunks/page.vue_vue_type_script_setup_true_lang-Dze2ZUr3.es.js.map +0 -1
  138. package/.chunks/popup-PpCQY5Zi.es.js.map +0 -1
  139. package/.chunks/popup-XXfdNLmr.amd.js +0 -2
  140. package/.chunks/popup-XXfdNLmr.amd.js.map +0 -1
  141. package/.chunks/utils-BcKnFj1j.es.js.map +0 -1
  142. package/.chunks/utils-pvFg1FqE.amd.js +0 -2
  143. package/.chunks/utils-pvFg1FqE.amd.js.map +0 -1
  144. package/icomoon/Topvisor icons.json +0 -6612
@@ -1,12 +1,12 @@
1
- import { Core as Y } from "../core/app.js";
2
- import { defineComponent as B, ref as w, computed as F, createElementBlock as f, openBlock as p, normalizeClass as C, createCommentVNode as k, createElementVNode as I, toDisplayString as $, createVNode as P, withKeys as L, withModifiers as M, createBlock as A, createSlots as N, withCtx as V, createTextVNode as S, watch as E, toRef as z, mergeProps as W, mergeModels as R, useModel as U, Fragment as _, renderList as G, withDirectives as X, vModelRadio as Q, resolveDirective as Z, unref as b, renderSlot as D } from "vue";
3
- import { w as q, _ as H, f as x, d as ee, u as oe, C as te, x as le } from "../.chunks/forms-C-fyoosd.es.js";
4
- import { TopPopup as se, TopPopupListItem as O, TopPopupWidgetInput as ae } from "../popup/popup.js";
5
- import { invertKeyboardLayout as re } from "../utils/keyboard.js";
6
- import { _ as ne } from "../.chunks/menu.vue_vue_type_style_index_0_lang-Bi9Z81pC.es.js";
7
- const j = ["../assets/formsExt.css"].map((s) => import.meta.resolve(s));
8
- Y.insertCSSLinkToPage(j, !0);
9
- const ie = { class: "top-editArea_footer" }, ue = /* @__PURE__ */ B({
1
+ import { Core as x } from "../core/app.js";
2
+ import { defineComponent as L, ref as _, computed as P, createElementBlock as y, openBlock as d, normalizeClass as I, createCommentVNode as A, createElementVNode as B, toDisplayString as $, createVNode as D, withKeys as G, withModifiers as N, createBlock as w, createSlots as U, withCtx as V, createTextVNode as S, watch as E, toRef as O, mergeProps as R, mergeModels as j, useModel as J, Fragment as z, renderList as F, withDirectives as q, vModelRadio as te, resolveDirective as oe, unref as v, renderSlot as W, resolveDynamicComponent as le } from "vue";
3
+ import { w as se, _ as X, f as ae, d as re, u as ne, C as Q, x as ie, g as ue } from "../.chunks/forms-1PEYT7sp.es.js";
4
+ import { TopPopup as de, TopPopupListItem as H, TopPopupWidgetInput as pe } from "../popup/popup.js";
5
+ import { invertKeyboardLayout as ce } from "../utils/keyboard.js";
6
+ import { _ as fe } from "../.chunks/menu.vue_vue_type_style_index_0_lang-BYP0xpzD.es.js";
7
+ const ee = ["../assets/formsExt.css"].map((l) => import.meta.resolve(l));
8
+ x.insertCSSLinkToPage(ee, !0);
9
+ const me = { class: "top-editArea_footer" }, ve = /* @__PURE__ */ L({
10
10
  __name: "editArea",
11
11
  props: {
12
12
  defaultValue: { default: "" },
@@ -31,92 +31,94 @@ const ie = { class: "top-editArea_footer" }, ue = /* @__PURE__ */ B({
31
31
  maxLength: {}
32
32
  },
33
33
  emits: ["submit", "close", "clickOnTitle"],
34
- setup(s, { emit: o }) {
35
- const e = s, a = o, n = w(e.defaultValue), t = w(e.isFocused), d = F(() => n.value !== e.defaultValue), c = (i) => {
36
- a("submit", i), n.value = e.defaultValue;
37
- }, y = () => {
38
- if (e.forceShowCloseBtn && !d.value) {
39
- a("close");
34
+ setup(l, { emit: t }) {
35
+ const s = l, o = t, p = _(s.defaultValue), a = _(s.isFocused), r = P(() => p.value !== s.defaultValue), c = (u) => {
36
+ o("submit", u), p.value = s.defaultValue;
37
+ }, f = () => {
38
+ if (s.forceShowCloseBtn && !r.value) {
39
+ o("close");
40
40
  return;
41
41
  }
42
- n.value = e.defaultValue;
43
- }, g = () => {
44
- e.attachToKeyboard && a("clickOnTitle");
42
+ p.value = s.defaultValue;
43
+ }, T = () => {
44
+ s.attachToKeyboard && o("clickOnTitle");
45
45
  };
46
- return (i, m) => (p(), f("div", {
47
- class: C({
46
+ return (u, b) => (d(), y("div", {
47
+ class: I({
48
48
  "top-editArea": !0,
49
- "top-editArea-attachedToKeyboard": i.attachToKeyboard
49
+ "top-editArea-attachedToKeyboard": u.attachToKeyboard
50
50
  })
51
51
  }, [
52
- i.title ? (p(), f("div", {
52
+ u.title ? (d(), y("div", {
53
53
  key: 0,
54
54
  class: "top-editArea_title",
55
- onClick: m[0] || (m[0] = (r) => g())
56
- }, $(i.title), 1)) : k("", !0),
57
- I("div", {
58
- class: C({
55
+ onClick: b[0] || (b[0] = (i) => T())
56
+ }, $(u.title), 1)) : A("", !0),
57
+ B("div", {
58
+ class: I({
59
59
  "top-editArea_form": !0,
60
- "top-error": i.isError,
61
- "top-focus": t.value
60
+ "top-forms-focusable": !0,
61
+ "top-as-input": !0,
62
+ "top-error": u.isError,
63
+ "top-focus": a.value
62
64
  })
63
65
  }, [
64
- P(q, {
65
- modelValue: n.value,
66
- "onUpdate:modelValue": m[1] || (m[1] = (r) => n.value = r),
67
- name: i.name,
68
- placeholder: i.placeholder,
69
- rows: i.rows,
70
- minHeight: i.minHeight,
71
- expandable: i.expandable,
72
- disabled: i.disabled,
73
- readonly: i.readonly,
74
- isError: i.isError,
75
- hint: i.hint,
66
+ D(se, {
67
+ modelValue: p.value,
68
+ "onUpdate:modelValue": b[1] || (b[1] = (i) => p.value = i),
69
+ name: u.name,
70
+ placeholder: u.placeholder,
71
+ rows: u.rows,
72
+ minHeight: u.minHeight,
73
+ expandable: u.expandable,
74
+ disabled: u.disabled,
75
+ readonly: u.readonly,
76
+ isError: u.isError,
77
+ hint: u.hint,
76
78
  class: "top-editArea_element",
77
- onFocus: m[2] || (m[2] = () => t.value = !0),
78
- onBlur: m[3] || (m[3] = () => t.value = !1),
79
+ onFocus: b[2] || (b[2] = () => a.value = !0),
80
+ onBlur: b[3] || (b[3] = () => a.value = !1),
79
81
  onKeyup: [
80
- L(y, ["esc"]),
81
- m[4] || (m[4] = L(M((r) => c(n.value), ["ctrl"]), ["enter"]))
82
+ G(f, ["esc"]),
83
+ b[4] || (b[4] = G(N((i) => c(p.value), ["ctrl"]), ["enter"]))
82
84
  ]
83
85
  }, null, 8, ["modelValue", "name", "placeholder", "rows", "minHeight", "expandable", "disabled", "readonly", "isError", "hint"]),
84
- I("div", ie, [
85
- d.value || i.forceShowCloseBtn ? (p(), A(H, {
86
+ B("div", me, [
87
+ r.value || u.forceShowCloseBtn ? (d(), w(X, {
86
88
  key: 0,
87
- icon: i.$core.state.isMobile ? "" : "",
89
+ icon: u.$core.state.isMobile ? "" : "",
88
90
  class: "top-editArea_button",
89
91
  color: "theme",
90
92
  styling: "soft",
91
- onClick: y
92
- }, N({ _: 2 }, [
93
- i.$core.state.isMobile ? void 0 : {
93
+ onClick: f
94
+ }, U({ _: 2 }, [
95
+ u.$core.state.isMobile ? void 0 : {
94
96
  name: "default",
95
97
  fn: V(() => [
96
- S($(i.cancelText), 1)
98
+ S($(u.cancelText), 1)
97
99
  ]),
98
100
  key: "0"
99
101
  }
100
- ]), 1032, ["icon"])) : k("", !0),
101
- d.value ? (p(), A(H, {
102
+ ]), 1032, ["icon"])) : A("", !0),
103
+ r.value ? (d(), w(X, {
102
104
  key: 1,
103
105
  class: "top-editArea_button",
104
- icon: i.$core.state.isMobile ? "" : "",
105
- onClick: m[5] || (m[5] = (r) => c(n.value))
106
- }, N({ _: 2 }, [
107
- i.$core.state.isMobile ? void 0 : {
106
+ icon: u.$core.state.isMobile ? "" : "",
107
+ onClick: b[5] || (b[5] = (i) => c(p.value))
108
+ }, U({ _: 2 }, [
109
+ u.$core.state.isMobile ? void 0 : {
108
110
  name: "default",
109
111
  fn: V(() => [
110
- S($(i.submitText), 1)
112
+ S($(u.submitText), 1)
111
113
  ]),
112
114
  key: "0"
113
115
  }
114
- ]), 1032, ["icon"])) : k("", !0)
116
+ ]), 1032, ["icon"])) : A("", !0)
115
117
  ])
116
118
  ], 2)
117
119
  ], 2));
118
120
  }
119
- }), de = { class: "top-editInput" }, pe = /* @__PURE__ */ B({
121
+ }), ye = { class: "top-editInput" }, he = /* @__PURE__ */ L({
120
122
  __name: "editInput",
121
123
  props: {
122
124
  modelValue: {},
@@ -124,34 +126,34 @@ const ie = { class: "top-editArea_footer" }, ue = /* @__PURE__ */ B({
124
126
  button: {}
125
127
  },
126
128
  emits: ["update:modelValue"],
127
- setup(s, { emit: o }) {
128
- const e = s, a = w(e.modelValue);
129
- E(z(e.modelValue), () => {
130
- a.value = e.modelValue;
129
+ setup(l, { emit: t }) {
130
+ const s = l, o = _(s.modelValue);
131
+ E(O(s.modelValue), () => {
132
+ o.value = s.modelValue;
131
133
  });
132
- const n = o, t = () => {
133
- n("update:modelValue", a.value);
134
+ const p = t, a = () => {
135
+ p("update:modelValue", o.value);
134
136
  };
135
- return (d, c) => (p(), f("div", de, [
136
- P(x, W(d.input, {
137
- onKeydownCapture: c[0] || (c[0] = L(M((y) => a.value = d.modelValue, ["stop"]), ["esc"])),
138
- onKeydown: L(M(t, ["stop"]), ["enter"]),
139
- modelValue: a.value,
140
- "onUpdate:modelValue": c[1] || (c[1] = (y) => a.value = y)
137
+ return (r, c) => (d(), y("div", ye, [
138
+ D(ae, R(r.input, {
139
+ onKeydownCapture: c[0] || (c[0] = G(N((f) => o.value = r.modelValue, ["stop"]), ["esc"])),
140
+ onKeydown: G(N(a, ["stop"]), ["enter"]),
141
+ modelValue: o.value,
142
+ "onUpdate:modelValue": c[1] || (c[1] = (f) => o.value = f)
141
143
  }), null, 16, ["onKeydown", "modelValue"]),
142
- a.value !== d.modelValue ? (p(), A(H, W({
144
+ o.value !== r.modelValue ? (d(), w(X, R({
143
145
  key: 0,
144
146
  icon: "",
145
147
  styling: "soft"
146
- }, d.button, { onClick: t }), null, 16)) : k("", !0)
148
+ }, r.button, { onClick: a }), null, 16)) : A("", !0)
147
149
  ]));
148
150
  }
149
- }), ce = ["data-top-icon", "onClick"], me = {
151
+ }), be = ["data-top-icon", "onClick"], ge = {
150
152
  key: 0,
151
153
  class: "top-radioGroup_circle"
152
- }, fe = ["value", "disabled"], ve = /* @__PURE__ */ B({
154
+ }, ke = ["value", "disabled"], Te = /* @__PURE__ */ L({
153
155
  __name: "radioGroup",
154
- props: /* @__PURE__ */ R({
156
+ props: /* @__PURE__ */ j({
155
157
  modelValue: {},
156
158
  radiosProps: {},
157
159
  showIndicator: { type: Boolean },
@@ -164,53 +166,53 @@ const ie = { class: "top-editArea_footer" }, ue = /* @__PURE__ */ B({
164
166
  modelModifiers: {}
165
167
  }),
166
168
  emits: ["update:modelValue"],
167
- setup(s) {
168
- const o = U(s, "modelValue"), e = s, a = w(null);
169
- E(o, () => {
170
- var t, d, c, y, g;
171
- (t = e.radiosProps) != null && t.some((i) => i.value === o.value) || (o.value = ((c = (d = e.radiosProps) == null ? void 0 : d[0]) == null ? void 0 : c.value) ?? ""), (g = (y = a.value) == null ? void 0 : y.querySelector(".radioGroup_item-selected")) == null || g.scrollIntoView();
169
+ setup(l) {
170
+ const t = J(l, "modelValue"), s = l, o = _(null);
171
+ E(t, () => {
172
+ var a, r, c, f, T;
173
+ (a = s.radiosProps) != null && a.some((u) => u.value === t.value) || (t.value = ((c = (r = s.radiosProps) == null ? void 0 : r[0]) == null ? void 0 : c.value) ?? ""), (T = (f = o.value) == null ? void 0 : f.querySelector(".radioGroup_item-selected")) == null || T.scrollIntoView();
172
174
  }, { immediate: !0 });
173
- const n = "radioGroup-" + Math.random();
174
- return (t, d) => (p(), f("div", {
175
+ const p = "radioGroup-" + Math.random();
176
+ return (a, r) => (d(), y("div", {
175
177
  ref_key: "elRef",
176
- ref: a,
177
- class: C({
178
+ ref: o,
179
+ class: I({
178
180
  "top-radioGroup": !0,
179
181
  "top-scrollBarXHidding": !0,
180
- ["top-size_" + t.size]: !!t.size,
181
- "top-error": t.isError
182
+ ["top-size_" + a.size]: !!a.size,
183
+ "top-error": a.isError
182
184
  })
183
185
  }, [
184
- (p(!0), f(_, null, G(t.radiosProps, (c) => (p(), f("label", {
185
- class: C({
186
- "top-radioGroup_item-selected": c.value === o.value,
186
+ (d(!0), y(z, null, F(a.radiosProps, (c) => (d(), y("label", {
187
+ class: I({
188
+ "top-radioGroup_item-selected": c.value === t.value,
187
189
  "top-radioGroup_item": !0,
188
190
  "top-forms-focusable": !0,
189
191
  "top-disabled": c.disabled
190
192
  }),
191
193
  "data-top-icon": c.icon,
192
- onClick: (y) => o.value = c.value
194
+ onClick: (f) => t.value = c.value
193
195
  }, [
194
196
  S($(c.title) + " ", 1),
195
- t.showIndicator ? (p(), f("span", me)) : k("", !0),
196
- X(I("input", {
197
- "onUpdate:modelValue": d[0] || (d[0] = (y) => o.value = y),
198
- name: n,
197
+ a.showIndicator ? (d(), y("span", ge)) : A("", !0),
198
+ q(B("input", {
199
+ "onUpdate:modelValue": r[0] || (r[0] = (f) => t.value = f),
200
+ name: p,
199
201
  type: "radio",
200
- class: C({
202
+ class: I({
201
203
  "top-unvisible": !0
202
204
  }),
203
205
  value: c.value,
204
206
  disabled: c.disabled
205
- }, null, 8, fe), [
206
- [Q, o.value]
207
+ }, null, 8, ke), [
208
+ [te, t.value]
207
209
  ])
208
- ], 10, ce))), 256))
210
+ ], 10, be))), 256))
209
211
  ], 2));
210
212
  }
211
- }), ye = ["data-top-icon"], he = ["value", "checked", "disabled", "onChange"], be = /* @__PURE__ */ B({
213
+ }), Ae = ["data-top-icon"], Ce = ["value", "checked", "disabled", "onChange"], $e = /* @__PURE__ */ L({
212
214
  __name: "checkboxGroup",
213
- props: /* @__PURE__ */ R({
215
+ props: /* @__PURE__ */ j({
214
216
  modelValue: {},
215
217
  items: {},
216
218
  size: { default: "s" },
@@ -223,297 +225,386 @@ const ie = { class: "top-editArea_footer" }, ue = /* @__PURE__ */ B({
223
225
  modelModifiers: {}
224
226
  }),
225
227
  emits: ["update:modelValue"],
226
- setup(s) {
227
- const o = U(s, "modelValue"), e = (a) => {
228
- const n = [...o.value], t = n.indexOf(a);
229
- t === -1 ? n.push(a) : n.splice(t, 1), o.value = n;
228
+ setup(l) {
229
+ const t = J(l, "modelValue"), s = (o) => {
230
+ const p = [...t.value], a = p.indexOf(o);
231
+ a === -1 ? p.push(o) : p.splice(a, 1), t.value = p;
230
232
  };
231
- return (a, n) => (p(), f("div", {
232
- class: C({
233
+ return (o, p) => (d(), y("div", {
234
+ class: I({
233
235
  "top-checkboxGroup": !0,
234
- ["top-checkboxGroup-" + a.styling]: !0,
236
+ ["top-checkboxGroup-" + o.styling]: !0,
235
237
  "top-scrollBarXHidding": !0,
236
- ["top-size_" + a.size]: !!a.size,
237
- "top-error": a.isError
238
+ ["top-size_" + o.size]: !!o.size,
239
+ "top-error": o.isError
238
240
  })
239
241
  }, [
240
- (p(!0), f(_, null, G(a.items, (t) => (p(), f("label", {
241
- key: t.id,
242
- class: C({
242
+ (d(!0), y(z, null, F(o.items, (a) => (d(), y("label", {
243
+ key: a.id,
244
+ class: I({
243
245
  "top-checkboxGroup_item": !0,
244
- "top-checkboxGroup_item-selected": o.value.includes(t.id),
246
+ "top-checkboxGroup_item-selected": t.value.includes(a.id),
245
247
  "top-forms-focusable": !0,
246
- "top-disabled": t.disabled
248
+ "top-disabled": a.disabled
247
249
  }),
248
- "data-top-icon": t.icon
250
+ "data-top-icon": a.icon
249
251
  }, [
250
- I("input", {
252
+ B("input", {
251
253
  type: "checkbox",
252
254
  class: "top-unvisible",
253
- value: t.id,
254
- checked: o.value.includes(t.id),
255
- disabled: t.disabled,
256
- onChange: (d) => e(t.id)
257
- }, null, 40, he),
258
- S(" " + $(t.title), 1)
259
- ], 10, ye))), 128))
255
+ value: a.id,
256
+ checked: t.value.includes(a.id),
257
+ disabled: a.disabled,
258
+ onChange: (r) => s(a.id)
259
+ }, null, 40, Ce),
260
+ S(" " + $(a.title), 1)
261
+ ], 10, Ae))), 128))
260
262
  ], 2));
261
263
  }
262
- }), ge = { class: "top-selector2_itemMulti top-ellipsis" }, ke = /* @__PURE__ */ B({
264
+ }), Ve = { class: "top-selector2_itemMulti top-ellipsis" }, we = /* @__PURE__ */ L({
263
265
  __name: "itemMulti",
264
266
  props: {
265
267
  id: {},
266
268
  name: {}
267
269
  },
268
270
  emits: ["delete"],
269
- setup(s) {
270
- return (o, e) => (p(), f("div", ge, [
271
- S($(o.name) + " ", 1),
272
- I("span", {
271
+ setup(l) {
272
+ return (t, s) => (d(), y("div", Ve, [
273
+ S($(t.name) + " ", 1),
274
+ B("span", {
273
275
  class: "top-selector2_itemMultiDelete",
274
276
  "data-top-icon": "",
275
- onClick: e[0] || (e[0] = (a) => o.$emit("delete", o.id)),
276
- onMousedown: e[1] || (e[1] = M(() => {
277
+ onClick: s[0] || (s[0] = (o) => t.$emit("delete", t.id)),
278
+ onMousedown: s[1] || (s[1] = N(() => {
277
279
  }, ["stop"]))
278
280
  }, null, 32)
279
281
  ]));
280
282
  }
281
- }), we = (s, o, e) => {
282
- const a = w([]), n = w(!1);
283
- let t = "", d;
284
- s && !s.params.limit && (s.params.limit = 100);
283
+ }), Ie = (l, t, s) => {
284
+ const o = _([]), p = _(!1);
285
+ let a = "", r;
286
+ l && !l.params.limit && (l.params.limit = 100);
285
287
  const c = async () => {
286
- if (!s) return;
287
- let r, v;
288
- if (e && (s.cache ??= /* @__PURE__ */ new Map(), v = JSON.stringify(s.params), r = s.cache.get(v), r))
289
- return r;
290
- if (n.value = !0, r = await s.call(), n.value = !1, r.errors) return;
291
- if (!Array.isArray(r.result)) {
288
+ if (!l) return;
289
+ let i, C;
290
+ if (s && (l.cache ??= /* @__PURE__ */ new Map(), C = JSON.stringify(l.params), i = l.cache.get(C), i))
291
+ return i;
292
+ if (p.value = !0, i = await l.call(), p.value = !1, i.errors) return;
293
+ if (!Array.isArray(i.result)) {
292
294
  console.warn("В result ожидался массив");
293
295
  return;
294
296
  }
295
- const l = r.result.findIndex((u) => u.id === void 0 || u.name === void 0);
296
- if (l !== -1) {
297
- console.warn(`В result[${l}] нет id или name`);
297
+ const M = i.result.findIndex((K) => K.id === void 0 || K.name === void 0);
298
+ if (M !== -1) {
299
+ console.warn(`В result[${M}] нет id или name`);
298
300
  return;
299
301
  }
300
- return e && s.cache.set(v, r), r;
301
- }, y = async () => {
302
- if (!s) return;
303
- s.params.offset = 0, s.params.search = t;
304
- const r = await c();
305
- r && (d = r.nextOffset, a.value = r.result);
306
- }, g = async () => {
307
- if (!s || !d || n.value) return;
308
- s.params.offset = d, s.params.search = t;
309
- const r = await c();
310
- r && (d = r.nextOffset, a.value = a.value.concat(r.result));
311
- }, i = ee(() => y(), 200);
302
+ return s && l.cache.set(C, i), i;
303
+ }, f = async () => {
304
+ if (!l) return;
305
+ l.params.offset = 0, l.params.search = a;
306
+ const i = await c();
307
+ i && (r = i.nextOffset, o.value = i.result);
308
+ }, T = async () => {
309
+ if (!l || !r || p.value) return;
310
+ l.params.offset = r, l.params.search = a;
311
+ const i = await c();
312
+ i && (r = i.nextOffset, o.value = o.value.concat(i.result));
313
+ }, u = re(() => f(), 200);
312
314
  return {
313
- apiRequest: s,
314
- items: a,
315
- isLoading: n,
316
- loadAppend: g,
317
- setSearchTextAndLoad: (r, v = !0) => {
318
- s && (r.length < o || r === t && a.value.length || (t = r, v ? i() : y()));
315
+ apiRequest: l,
316
+ items: o,
317
+ isLoading: p,
318
+ loadAppend: T,
319
+ setSearchTextAndLoad: (i, C = !0) => {
320
+ l && (i.length < t || i === a && o.value.length || (a = i, C ? u() : f()));
319
321
  }
320
322
  };
321
- }, Ce = 0, J = (s, o, e = !0) => e && o.id === null ? Array.isArray(s) ? s.some((a) => a.id === o.id && a.name === o.name) : o.name === s.name : Array.isArray(s) ? s.some((a) => a.id === o.id) : o.id === s.id, $e = (s, o, e, a, n, t) => {
322
- const d = w(""), c = {
323
- id: Ce,
324
- name: oe().Common.All
325
- }, y = () => {
326
- d.value = "", t.items.value = [];
327
- }, g = F(() => {
328
- var r;
329
- const m = [];
330
- return !e && a.value && m.push(c), (r = o.value) == null || r.forEach((v) => m.push({ ...v })), m;
331
- }), i = F(() => {
332
- const m = d.value.toLowerCase(), r = re(m);
333
- let v = [];
334
- return g.value.forEach((l) => {
335
- const u = l.name.toLowerCase();
336
- (l.id === Number(m) || u.includes(m) || u.includes(r)) && (u === m || u === r ? v.unshift(l) : v.push(l));
337
- }), v.push(...t.items.value), n.value && d.value && (!v.length || v[0].name.toLowerCase() !== m) && v.push({
323
+ }, _e = 0, Z = (l, t, s = !0) => s && t.id === null ? Array.isArray(l) ? l.some((o) => o.id === t.id && o.name === t.name) : t.name === l.name : Array.isArray(l) ? l.some((o) => o.id === t.id) : t.id === l.id, Be = (l, t, s, o, p, a, r, c) => {
324
+ const f = _(""), T = {
325
+ id: _e,
326
+ name: ne().Common.All
327
+ }, u = () => {
328
+ f.value = "", c.items.value = [];
329
+ }, b = () => !(!c.apiRequest || a.value !== "inline" || f.value.length >= r), i = P(() => {
330
+ var e;
331
+ const h = [];
332
+ return !s && o.value && h.push(T), (e = t.value) == null || e.forEach((n) => h.push({ ...n })), h;
333
+ }), C = P(() => {
334
+ const h = f.value.toLowerCase(), e = ce(h);
335
+ let n = [];
336
+ return i.value.forEach((g) => {
337
+ const m = g.name.toLowerCase();
338
+ (g.id === Number(h) || m.includes(h) || m.includes(e)) && (m === h || m === e ? n.unshift(g) : n.push(g));
339
+ }), n.push(...c.items.value), p.value && f.value && (!n.length || n[0].name.toLowerCase() !== h) && n.push({
338
340
  id: null,
339
- name: d.value
340
- }), e && (v = v.filter((l) => !J(s.value, l))), v;
341
+ name: f.value
342
+ }), s && (n = n.filter((g) => !Z(l.value, g))), n;
341
343
  });
342
344
  return {
343
- searchText: d,
344
- resetSearch: y,
345
- items: g,
346
- itemsForShow: i
345
+ searchText: f,
346
+ resetSearch: u,
347
+ genIsShort: b,
348
+ items: i,
349
+ itemsForShow: C,
350
+ selectItem: (h) => {
351
+ s && Array.isArray(l.value) ? Z(l.value, h) || (l.value = [...l.value, h]) : l.value = h;
352
+ },
353
+ selectNextItem: () => {
354
+ if (!Array.isArray(l.value)) {
355
+ const e = (C.value.findIndex((n) => n.id === l.value.id) + 1) % C.value.length;
356
+ l.value = { ...C.value[e] };
357
+ }
358
+ },
359
+ deleteItemById: async (h) => {
360
+ Array.isArray(l.value) && (l.value = l.value.filter((e) => e.id !== h));
361
+ }
347
362
  };
348
- }, Te = {
363
+ }, Se = {
349
364
  key: 0,
350
365
  class: "top-selector2_activeItems"
351
- }, Ve = {
366
+ }, Le = {
352
367
  key: 1,
353
368
  class: "top-selector2_activeName top-ellipsis"
354
- }, Ae = /* @__PURE__ */ B({
369
+ }, Ee = {
370
+ key: 2,
371
+ class: "top-selector2_placeholder top-ellipsis"
372
+ }, Pe = /* @__PURE__ */ L({
355
373
  __name: "selector2",
356
- props: /* @__PURE__ */ R({
374
+ props: /* @__PURE__ */ j({
357
375
  modelValue: {},
358
376
  items: { default: () => [] },
359
- multiselect: { type: Boolean },
377
+ title: {},
360
378
  disabled: { type: Boolean },
361
379
  size: { default: "s" },
362
380
  isError: { type: Boolean },
381
+ searchType: { default: "popup" },
382
+ placeholder: {},
363
383
  apiRequest: {},
364
384
  minLength: { default: 0 },
365
385
  useCache: { type: Boolean },
366
386
  appendSearchToResult: { type: Boolean },
387
+ multiselect: { type: Boolean },
367
388
  appendAllValue: { type: Boolean },
368
389
  addChanger: { type: Boolean },
369
- placeholder: {},
370
- showSelectedInInput: { type: Boolean, default: !0 },
371
- showSearch: { type: Boolean, default: !0 }
390
+ buttonProps: {},
391
+ selectedAsPlaceholder: { type: Boolean }
372
392
  }, {
373
393
  modelValue: { required: !0 },
374
394
  modelModifiers: {}
375
395
  }),
376
396
  emits: ["update:modelValue"],
377
- setup(s) {
378
- const o = s, e = U(s, "modelValue"), a = w(null), n = we(o.apiRequest, o.minLength || 0, o.useCache), t = $e(e, z(o, "items"), o.multiselect, z(o, "appendAllValue"), z(o, "appendSearchToResult"), n), d = w(null), c = () => {
379
- var l;
380
- return (l = d.value) == null ? void 0 : l.popup;
381
- }, y = () => {
382
- if (!Array.isArray(e.value)) {
383
- const u = (t.itemsForShow.value.findIndex((K) => K.id === e.value.id) + 1) % t.itemsForShow.value.length;
384
- e.value = { ...t.itemsForShow.value[u] };
397
+ setup(l) {
398
+ const t = l, s = J(l, "modelValue"), o = P(() => t.searchType === "inline" && t.multiselect || t.searchType === "inline" && Q.state.isMobile ? "popup" : t.searchType);
399
+ let p = 0;
400
+ o.value === "inline" && t.minLength && (p = t.minLength);
401
+ const a = Ie(t.apiRequest, p, t.useCache), r = Be(
402
+ s,
403
+ O(t, "items"),
404
+ t.multiselect,
405
+ O(t, "appendAllValue"),
406
+ O(t, "appendSearchToResult"),
407
+ o,
408
+ p,
409
+ a
410
+ ), c = P(() => t.buttonProps ? "TopButton" : o.value === "inline" ? "TopInput" : "div"), f = _(null), T = () => {
411
+ var e;
412
+ return (e = f.value) == null ? void 0 : e.popup;
413
+ };
414
+ a.apiRequest && E(r.searchText, () => {
415
+ var e;
416
+ a.setSearchTextAndLoad(r.searchText.value), o.value === "inline" && r.genIsShort() && ((e = T()) == null || e.close());
417
+ }), E(s, () => {
418
+ o.value === "inline" && r.resetSearch();
419
+ });
420
+ const u = P(() => {
421
+ var e;
422
+ return Array.isArray(s.value) || t.multiselect || !t.selectedAsPlaceholder && o.value !== "inline" ? t.placeholder : ((e = s.value) == null ? void 0 : e.name) || t.placeholder;
423
+ }), b = (e) => {
424
+ var m, k;
425
+ let n = !1;
426
+ switch (e.key) {
427
+ case "Delete":
428
+ case "Backspace":
429
+ Array.isArray(s.value) && (e.preventDefault(), e.stopPropagation(), s.value.pop());
430
+ break;
431
+ case "ArrowUp":
432
+ case "ArrowRight":
433
+ case "ArrowDown":
434
+ case "ArrowLeft":
435
+ case "Enter":
436
+ case " ":
437
+ n = !0;
438
+ break;
439
+ case "Escape":
440
+ o.value === "inline" && r.resetSearch();
441
+ break;
442
+ }
443
+ const g = e.key.length === 1 && !e.ctrlKey && !e.metaKey;
444
+ (o.value === "popup" || o.value === "inline") && g && (n = !0), (m = T()) != null && m.elPopup && (n = !1), n && (o.value === "popup" && (e.preventDefault(), e.stopPropagation(), g && (r.searchText.value || (r.searchText.value = e.key))), (k = e.currentTarget) == null || k.click());
445
+ };
446
+ let i = !1;
447
+ const C = (e) => {
448
+ var n;
449
+ i || o.value === "inline" && ((n = e.currentTarget) == null || n.click());
450
+ }, M = (e) => {
451
+ var n, g;
452
+ e.preventDefault(), i = !0, (g = (n = e.currentTarget) == null ? void 0 : n.parentElement) == null || g.focus(), i = !1, r.selectNextItem();
453
+ }, K = () => {
454
+ var e;
455
+ if (i = !0, a.apiRequest) {
456
+ if (r.genIsShort()) {
457
+ (e = T()) == null || e.close();
458
+ return;
459
+ }
460
+ a.setSearchTextAndLoad(r.searchText.value, !1);
385
461
  }
386
- }, g = async (l) => {
387
- Array.isArray(e.value) && (e.value = e.value.filter((u) => u.id !== l), setTimeout(() => {
388
- var u;
389
- (u = c()) == null || u.recalcPosition();
390
- }));
391
- }, i = w(!1);
392
- n.apiRequest && (E(i, () => {
393
- i.value && n.setSearchTextAndLoad(t.searchText.value, !1);
394
- }), E(t.searchText, () => n.setSearchTextAndLoad(t.searchText.value)));
395
- const m = (l) => {
396
- o.multiselect && Array.isArray(e.value) ? J(e.value, l) || (e.value = [...e.value, l]) : e.value = l;
397
- }, r = () => {
398
- var l;
399
- i.value = !1, (l = a.value) == null || l.focus(), t.searchText.value && t.resetSearch();
400
- }, v = (l) => {
401
- const u = l.target;
402
- u.scrollTop / (u.scrollHeight - u.offsetHeight) > 0.8 && n.loadAppend();
462
+ }, Y = () => {
463
+ setTimeout(() => {
464
+ i = !1;
465
+ }, 100), o.value === "popup" && r.searchText.value && r.resetSearch();
466
+ }, h = (e) => {
467
+ const n = e.target;
468
+ n.scrollTop / (n.scrollHeight - n.offsetHeight) > 0.8 && a.loadAppend();
403
469
  };
404
- return window.__STORYBOOK_PREVIEW__ && !o.modelValue && E(
405
- () => o.multiselect,
470
+ return window.__STORYBOOK_PREVIEW__ && (E(
471
+ () => t.multiselect,
406
472
  () => {
407
- e.value = o.multiselect ? [] : { id: null, name: "" };
473
+ t.multiselect ? Array.isArray(s.value) || (s.value = [
474
+ {
475
+ id: 1,
476
+ name: "Выбери меня"
477
+ }
478
+ ]) : Array.isArray(s.value) && (s.value = {
479
+ id: null,
480
+ name: ""
481
+ });
408
482
  },
409
483
  { immediate: !0 }
410
- ), (l, u) => {
411
- const K = Z("top-focus");
412
- return p(), A(b(se), {
484
+ ), E(
485
+ () => t.searchType,
486
+ () => {
487
+ setTimeout(() => {
488
+ location.reload();
489
+ }, 500);
490
+ }
491
+ )), (e, n) => {
492
+ const g = oe("top-focus");
493
+ return d(), w(v(de), {
413
494
  ref_key: "popupRef",
414
- ref: d,
415
- onOpen: u[3] || (u[3] = (h) => i.value = !0),
416
- onClose: u[4] || (u[4] = (h) => r()),
417
- onScrollContentList: u[5] || (u[5] = (h) => l.apiRequest ? v(h) : void 0),
495
+ ref: f,
496
+ onOpen: n[3] || (n[3] = (m) => K()),
497
+ onClose: n[4] || (n[4] = (m) => Y()),
498
+ onScrollContentList: n[5] || (n[5] = (m) => e.apiRequest ? h(m) : void 0),
418
499
  notch: !1,
419
500
  transitionDuration: 0
420
- }, N({
501
+ }, U({
421
502
  opener: V(() => [
422
- X((p(), f("div", {
423
- ref_key: "elRef",
424
- ref: a,
425
- class: C({
503
+ q((d(), w(le(c.value), R(e.buttonProps, {
504
+ ref: "subcomponentSelector",
505
+ class: {
426
506
  "top-selector2": !0,
427
- "top-selector2-multiselect": l.multiselect,
428
- ["top-size_" + l.size]: !0,
429
- "top-disabled": l.disabled,
430
- "top-forms-focusable": !l.disabled,
431
- "top-error": l.isError
432
- }),
433
- onKeydown: [
434
- u[0] || (u[0] = L(M((h) => h.currentTarget.click(), ["stop", "prevent"]), ["up", "down", "enter", "space"])),
435
- u[1] || (u[1] = L((h) => e.value = [], ["delete"]))
436
- ],
437
- tabindex: "0"
438
- }, [
439
- l.multiselect ? (p(), f("div", Te, [
440
- (p(!0), f(_, null, G(e.value, (h) => (p(), A(ke, {
441
- id: h.id,
442
- name: h.name,
443
- onDelete: g
444
- }, null, 8, ["id", "name"]))), 256))
445
- ])) : k("", !0),
446
- l.multiselect ? k("", !0) : (p(), f("span", Ve, $(Array.isArray(e.value) ? "" : e.value.name), 1)),
447
- l.addChanger && !l.multiselect && b(t).items.value.length > 1 && !l.disabled ? (p(), f("span", {
448
- key: 2,
449
- class: "top-changer top-changer-selector",
450
- "data-top-popup-disabled": "true",
451
- onClick: y
452
- })) : k("", !0)
453
- ], 34)), [
507
+ "top-selector2-multiselect": e.multiselect,
508
+ "top-as-input": !e.buttonProps,
509
+ "top-as-selector": !0,
510
+ ["top-size_" + e.size]: !0,
511
+ "top-disabled": e.disabled,
512
+ "top-forms-focusable": !e.disabled,
513
+ "top-error": e.isError
514
+ },
515
+ tabindex: "0",
516
+ onKeydown: b,
517
+ placeholder: u.value,
518
+ modelValue: v(r).searchText.value,
519
+ "onUpdate:modelValue": n[0] || (n[0] = (m) => v(r).searchText.value = m),
520
+ onFocus: C,
521
+ onBlur: n[1] || (n[1] = (m) => {
522
+ var k;
523
+ return (k = T()) != null && k.isClosed ? v(r).resetSearch() : "";
524
+ })
525
+ }), {
526
+ default: V(() => [
527
+ e.multiselect ? (d(), y("div", Se, [
528
+ (d(!0), y(z, null, F(s.value, (m) => (d(), w(we, {
529
+ id: m.id,
530
+ name: m.name,
531
+ onDelete: v(r).deleteItemById
532
+ }, null, 8, ["id", "name", "onDelete"]))), 256))
533
+ ])) : A("", !0),
534
+ o.value !== "inline" && !e.multiselect ? (d(), y("span", Le, $(Array.isArray(s.value) ? "" : s.value.name), 1)) : A("", !0),
535
+ e.multiselect && !s.value.length ? (d(), y("span", Ee, $(u.value), 1)) : A("", !0),
536
+ e.addChanger && !e.buttonProps && !e.multiselect && v(r).items.value.length > 1 && !e.disabled ? (d(), y("span", {
537
+ key: 3,
538
+ class: "top-changer top-changer-selector top-popup_widget",
539
+ "data-top-popup-disabled": "true",
540
+ onClick: M
541
+ })) : A("", !0)
542
+ ]),
543
+ _: 1
544
+ }, 16, ["class", "placeholder", "modelValue"])), [
454
545
  [
455
- K,
456
- l.isError,
546
+ g,
547
+ e.isError,
457
548
  void 0,
458
549
  { onupdate: !0 }
459
550
  ]
460
551
  ])
461
552
  ]),
462
553
  contentList: V(() => {
463
- var h;
554
+ var m;
464
555
  return [
465
- (p(!0), f(_, null, G(b(t).itemsForShow.value, (T) => (p(), A(b(O), {
466
- class: C({
467
- "top-active": !Array.isArray(e.value) && !l.multiselect && e.value.id === T.id && e.value.name === T.name
556
+ (d(!0), y(z, null, F(v(r).itemsForShow.value, (k) => (d(), w(v(H), {
557
+ class: I({
558
+ "top-active": !Array.isArray(s.value) && !e.multiselect && s.value.id === k.id && s.value.name === k.name
468
559
  }),
469
- key: T.id ?? void 0,
470
- closeByClick: !l.multiselect || b(te).state.isMobile,
471
- onClick: (Ee) => m(T)
560
+ key: k.id ?? void 0,
561
+ closeByClick: !e.multiselect || v(Q).state.isMobile,
562
+ onClick: (He) => v(r).selectItem(k)
472
563
  }, {
473
564
  default: V(() => [
474
- l.$slots.item ? D(l.$slots, "item", {
565
+ e.$slots.item ? W(e.$slots, "item", {
475
566
  key: 0,
476
- item: T
477
- }) : (p(), f(_, { key: 1 }, [
478
- S($(T.name), 1)
567
+ item: k
568
+ }) : (d(), y(z, { key: 1 }, [
569
+ S($(k.name), 1)
479
570
  ], 64))
480
571
  ]),
481
572
  _: 2
482
573
  }, 1032, ["class", "closeByClick", "onClick"]))), 128)),
483
- !b(n).isLoading.value && !b(t).itemsForShow.value.length ? (p(), A(b(O), {
574
+ !v(a).isLoading.value && !v(r).itemsForShow.value.length ? (d(), w(v(H), {
484
575
  key: 0,
485
576
  type: "regular"
486
577
  }, {
487
578
  default: V(() => [
488
- S($(l.$i18n.Common.No_results), 1)
579
+ S($(e.$i18n.Common.No_results), 1)
489
580
  ]),
490
581
  _: 1
491
- })) : k("", !0),
492
- b(n).isLoading.value && (!l.showSearch || (h = l.apiRequest) != null && h.params.offset) ? (p(), A(b(O), {
582
+ })) : A("", !0),
583
+ v(a).isLoading.value && (e.searchType !== "popup" || (m = e.apiRequest) != null && m.params.offset) ? (d(), w(v(H), {
493
584
  key: 1,
494
585
  type: "regular"
495
586
  }, {
496
587
  default: V(() => [
497
- P(b(le), { type: "circles" })
588
+ D(v(ie), { type: "circles" })
498
589
  ]),
499
590
  _: 1
500
- })) : k("", !0)
591
+ })) : A("", !0)
501
592
  ];
502
593
  }),
503
594
  _: 2
504
595
  }, [
505
- l.showSearch ? {
596
+ o.value === "popup" ? {
506
597
  name: "widget",
507
598
  fn: V(() => {
508
- var h;
599
+ var m;
509
600
  return [
510
- P(b(ae), {
601
+ D(v(pe), {
511
602
  title: "Поиск",
512
603
  icon: "",
513
- modelValue: b(t).searchText.value,
514
- "onUpdate:modelValue": u[2] || (u[2] = (T) => b(t).searchText.value = T),
515
- isLoading: b(n).isLoading.value && !((h = l.apiRequest) != null && h.params.offset),
516
- placeholder: !Array.isArray(e.value) && !l.multiselect && l.showSelectedInInput ? e.value.name : l.placeholder
604
+ modelValue: v(r).searchText.value,
605
+ "onUpdate:modelValue": n[2] || (n[2] = (k) => v(r).searchText.value = k),
606
+ isLoading: v(a).isLoading.value && !((m = e.apiRequest) != null && m.params.offset),
607
+ placeholder: u.value
517
608
  }, null, 8, ["modelValue", "isLoading", "placeholder"])
518
609
  ];
519
610
  }),
@@ -522,41 +613,73 @@ const ie = { class: "top-editArea_footer" }, ue = /* @__PURE__ */ B({
522
613
  ]), 1536);
523
614
  };
524
615
  }
525
- }), Se = ["data-top-icon"], Be = { class: "top-info_text" }, Ie = {
616
+ }), Me = ["data-top-icon"], Ke = { class: "top-info_text" }, ze = {
526
617
  key: 0,
527
618
  class: "top-info_value"
528
- }, Le = /* @__PURE__ */ B({
619
+ }, De = /* @__PURE__ */ L({
529
620
  __name: "info",
530
621
  props: {
531
622
  icon: {},
532
623
  styling: { default: "default" },
533
624
  size: { default: "default" }
534
625
  },
535
- setup(s) {
536
- return (o, e) => (p(), f("div", {
537
- class: C({
626
+ setup(l) {
627
+ return (t, s) => (d(), y("div", {
628
+ class: I({
538
629
  "top-info": !0,
539
- ["top-size_" + o.size]: !0,
540
- ["top-info-styling_" + o.styling]: !0
630
+ ["top-size_" + t.size]: !0,
631
+ ["top-info-styling_" + t.styling]: !0
541
632
  }),
542
- "data-top-icon": o.icon
633
+ "data-top-icon": t.icon
543
634
  }, [
544
- I("div", Be, [
545
- D(o.$slots, "default")
635
+ B("div", Ke, [
636
+ W(t.$slots, "default")
546
637
  ]),
547
- o.$slots.additional ? (p(), f("span", Ie, [
548
- D(o.$slots, "additional")
549
- ])) : k("", !0)
550
- ], 10, Se));
638
+ t.$slots.additional ? (d(), y("span", ze, [
639
+ W(t.$slots, "additional")
640
+ ])) : A("", !0)
641
+ ], 10, Me));
642
+ }
643
+ }), Oe = {
644
+ key: 0,
645
+ class: "top-policy"
646
+ }, Ge = { class: "top-policy_title" }, Ne = ["innerHTML"], Fe = /* @__PURE__ */ L({
647
+ __name: "policy",
648
+ props: {
649
+ title: {},
650
+ text: {}
651
+ },
652
+ setup(l) {
653
+ const t = _(!0), s = () => {
654
+ const o = location.hostname.split(".").slice(-2).join(".");
655
+ document.cookie = `cookie_consent=accepted; path=/; domain=.${o}; max-age=31536000`, t.value = !1;
656
+ };
657
+ return (o, p) => t.value ? (d(), y("div", Oe, [
658
+ B("div", Ge, $(o.title), 1),
659
+ B("div", {
660
+ class: "top-policy_description",
661
+ innerHTML: o.text
662
+ }, null, 8, Ne),
663
+ D(v(ue), {
664
+ size: "m",
665
+ onClick: s
666
+ }, {
667
+ default: V(() => [
668
+ S($(o.$i18n.Common.Allow), 1)
669
+ ]),
670
+ _: 1
671
+ })
672
+ ])) : A("", !0);
551
673
  }
552
- }), Oe = ue, Fe = pe, Ne = ve, De = be, He = Ae, Re = ne, Ue = Le;
674
+ }), Ye = ve, Qe = he, Ze = Te, qe = $e, xe = Pe, et = fe, tt = De, ot = Fe;
553
675
  export {
554
- De as TopCheckboxGroup,
555
- Oe as TopEditArea,
556
- Fe as TopEditInput,
557
- Ue as TopInfo,
558
- Re as TopMenu,
559
- Ne as TopRadioGroup,
560
- He as TopSelector2
676
+ qe as TopCheckboxGroup,
677
+ Ye as TopEditArea,
678
+ Qe as TopEditInput,
679
+ tt as TopInfo,
680
+ et as TopMenu,
681
+ ot as TopPolicy,
682
+ Ze as TopRadioGroup,
683
+ xe as TopSelector2
561
684
  };
562
685
  //# sourceMappingURL=formsExt.js.map