@topvisor/ui 0.9.33-dev → 0.9.34-utils-components-1

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 (221) hide show
  1. package/.chunks/datepicker-BGhDjLcn.es.js +289 -0
  2. package/.chunks/datepicker-BGhDjLcn.es.js.map +1 -0
  3. package/.chunks/datepicker-DM6aPyRB.amd.js +247 -0
  4. package/.chunks/datepicker-DM6aPyRB.amd.js.map +1 -0
  5. package/.chunks/forms-CRAV8PiZ.es.js +1186 -0
  6. package/.chunks/forms-CRAV8PiZ.es.js.map +1 -0
  7. package/.chunks/forms-Cksc7Rb7.amd.js +3 -0
  8. package/.chunks/forms-Cksc7Rb7.amd.js.map +1 -0
  9. package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-BliXIrA8.es.js → listItem.vue_vue_type_script_setup_true_lang-C2XaxeNZ.es.js} +9 -9
  10. package/.chunks/listItem.vue_vue_type_script_setup_true_lang-C2XaxeNZ.es.js.map +1 -0
  11. package/.chunks/listItem.vue_vue_type_script_setup_true_lang-CpNwVBHY.amd.js +2 -0
  12. package/.chunks/listItem.vue_vue_type_script_setup_true_lang-CpNwVBHY.amd.js.map +1 -0
  13. package/.chunks/{menu-CHczkYl6.es.js → menu-BWjYRHkQ.es.js} +8 -8
  14. package/.chunks/menu-BWjYRHkQ.es.js.map +1 -0
  15. package/.chunks/{menu-buQxcAhv.amd.js → menu-BX8GV8-v.amd.js} +2 -2
  16. package/.chunks/menu-BX8GV8-v.amd.js.map +1 -0
  17. package/.chunks/popup-3fVBIqu0.amd.js +440 -0
  18. package/.chunks/popup-3fVBIqu0.amd.js.map +1 -0
  19. package/.chunks/{popup-CJLGyBwQ.es.js → popup-BWTP6yaC.es.js} +486 -486
  20. package/.chunks/popup-BWTP6yaC.es.js.map +1 -0
  21. package/.chunks/punycode.es6-C2yitnNb.amd.js +2 -0
  22. package/.chunks/punycode.es6-C2yitnNb.amd.js.map +1 -0
  23. package/.chunks/punycode.es6-CNI-zL6U.es.js +134 -0
  24. package/.chunks/punycode.es6-CNI-zL6U.es.js.map +1 -0
  25. package/.chunks/store-Bl79G7T_.amd.js.map +1 -1
  26. package/.chunks/store-PoMCiuBr.es.js.map +1 -1
  27. package/README.md +86 -86
  28. package/assets/core.css +1 -1
  29. package/assets/forms.css +1 -1
  30. package/assets/formsExt.css +1 -1
  31. package/core/core.amd.js +1 -1
  32. package/core/core.js +1 -1
  33. package/core/directives/focus.amd.js +2 -0
  34. package/core/directives/focus.amd.js.map +1 -0
  35. package/core/directives/focus.d.ts +3 -0
  36. package/core/directives/focus.js +5 -0
  37. package/core/directives/focus.js.map +1 -0
  38. package/core/directives/sticky.amd.js +2 -0
  39. package/core/directives/sticky.amd.js.map +1 -0
  40. package/core/directives/sticky.d.ts +3 -0
  41. package/core/directives/sticky.js +5 -0
  42. package/core/directives/sticky.js.map +1 -0
  43. package/core/directives/swimUp.amd.js +2 -0
  44. package/core/directives/swimUp.amd.js.map +1 -0
  45. package/core/directives/swimUp.d.ts +3 -0
  46. package/core/directives/swimUp.js +5 -0
  47. package/core/directives/swimUp.js.map +1 -0
  48. package/core/directives/tooltip.amd.js +2 -0
  49. package/core/directives/tooltip.amd.js.map +1 -0
  50. package/core/directives/tooltip.d.ts +3 -0
  51. package/core/directives/tooltip.js +5 -0
  52. package/core/directives/tooltip.js.map +1 -0
  53. package/core/plugin/plugin.amd.js +2 -0
  54. package/core/plugin/plugin.amd.js.map +1 -0
  55. package/core/plugin/plugin.d.ts +3 -0
  56. package/core/plugin/plugin.js +23 -0
  57. package/core/plugin/plugin.js.map +1 -0
  58. package/forms/forms.amd.js +1 -1
  59. package/forms/forms.js +14 -15
  60. package/forms/forms.js.map +1 -1
  61. package/forms/helpers.amd.js.map +1 -1
  62. package/forms/helpers.js.map +1 -1
  63. package/formsExt/formsExt.amd.js +1 -1
  64. package/formsExt/formsExt.amd.js.map +1 -1
  65. package/formsExt/formsExt.js +121 -362
  66. package/formsExt/formsExt.js.map +1 -1
  67. package/icomoon/Read Me.txt +7 -7
  68. package/icomoon/demo-files/demo.css +161 -161
  69. package/icomoon/demo-files/demo.js +30 -30
  70. package/icomoon/demo.html +3379 -3379
  71. package/icomoon/fonts/Topvisor-2.svg +263 -263
  72. package/icomoon/style.css +740 -740
  73. package/package.json +33 -24
  74. package/popup/popup.amd.js +1 -1
  75. package/popup/popup.amd.js.map +1 -1
  76. package/popup/popup.js +47 -6
  77. package/popup/popup.js.map +1 -1
  78. package/popup/worker.amd.js +1 -1
  79. package/popup/worker.amd.js.map +1 -1
  80. package/popup/worker.js +3 -3
  81. package/popup/worker.js.map +1 -1
  82. package/project/project.amd.js +1 -1
  83. package/project/project.amd.js.map +1 -1
  84. package/project/project.js +15 -15
  85. package/project/project.js.map +1 -1
  86. package/require/css.amd.js +11 -11
  87. package/src/components/forms/button/button.stories.d.ts +3 -3
  88. package/src/components/forms/button/button.vue.d.ts +7 -5
  89. package/src/components/forms/checkbox/checkbox.stories.d.ts +8 -7
  90. package/src/components/forms/checkbox/checkbox.vue.d.ts +10 -6
  91. package/src/components/forms/controlLabel/controlLabel.stories.d.ts +3 -3
  92. package/src/components/forms/controlLabel/controlLabel.vue.d.ts +4 -2
  93. package/src/components/forms/forms.d.ts +30 -18
  94. package/src/components/forms/hint/hint.stories.d.ts +13 -77
  95. package/src/components/forms/input/input.stories.d.ts +3 -3
  96. package/src/components/forms/input/input.vue.d.ts +6 -4
  97. package/src/components/forms/inputDate/datepicker.d.ts +0 -2
  98. package/src/components/forms/inputRange/inputRange.stories.d.ts +17 -49
  99. package/src/components/forms/inputRange/inputRange.vue.d.ts +4 -2
  100. package/src/components/forms/radio/radio.stories.d.ts +3 -3
  101. package/src/components/forms/radio/radio.vue.d.ts +6 -4
  102. package/src/components/forms/select/select.stories.d.ts +2 -2
  103. package/src/components/forms/select/select.vue.d.ts +4 -3
  104. package/src/components/forms/switcher/switcher.stories.d.ts +3 -3
  105. package/src/components/forms/switcher/switcher.vue.d.ts +6 -4
  106. package/src/components/formsExt/editInput/editInput.stories.d.ts +3 -3
  107. package/src/components/formsExt/editInput/editInput.vue.d.ts +6 -4
  108. package/src/components/formsExt/formsExt.d.ts +10 -5
  109. package/src/components/formsExt/menu/menu.stories.d.ts +1 -1
  110. package/src/components/formsExt/menu/menu.vue.d.ts +2 -2
  111. package/src/components/formsExt/selector2/api.d.ts +1 -1
  112. package/src/components/formsExt/selector2/selector2.stories.d.ts +36 -35
  113. package/src/components/popup/popup/listItem.vue.d.ts +7 -5
  114. package/src/components/popup/popup/opener.vue.d.ts +6 -4
  115. package/src/components/popup/popup/popup.stories.d.ts +22 -86
  116. package/src/components/popup/popup/popup.vue.d.ts +11 -9
  117. package/src/components/popup/popup.d.ts +10 -4
  118. package/src/components/popup/worker.d.ts +4 -1
  119. package/src/components/project/project.d.ts +4 -1
  120. package/src/components/project/selectorCompetitors/composables.d.ts +1 -0
  121. package/src/components/project/selectorCompetitors/selectorCompetitors.stories.d.ts +2 -2
  122. package/src/components/project/selectorCompetitors/selectorCompetitors.vue.d.ts +4 -3
  123. package/src/components/tabs/tabs/content.vue.d.ts +4 -2
  124. package/src/components/tabs/tabs/tab.vue.d.ts +4 -2
  125. package/src/components/tabs/tabs/tabs.stories.d.ts +28 -92
  126. package/src/components/tabs/tabs/tabs.vue.d.ts +4 -2
  127. package/src/components/tabs/tabs.d.ts +8 -3
  128. package/src/components/tabsView/tabsView/menu.vue.d.ts +6 -4
  129. package/src/components/tabsView/tabsView/menuItem.vue.d.ts +6 -4
  130. package/src/components/tabsView/tabsView/menuTitle.vue.d.ts +4 -2
  131. package/src/components/tabsView/tabsView/store.d.ts +14 -14
  132. package/src/components/tabsView/tabsView/tabsView.stories.d.ts +12 -12
  133. package/src/components/tabsView/tabsView/tabsView.vue.d.ts +6 -4
  134. package/src/components/tabsView/tabsView//320/255/320/273/320/265/320/274/320/265/320/275/321/202/321/213/MenuItem.stories.d.ts +9 -9
  135. package/src/components/tabsView/tabsView//320/255/320/273/320/265/320/274/320/265/320/275/321/202/321/213/MenuTitle.stories.d.ts +9 -9
  136. package/src/components/tabsView/tabsView.d.ts +8 -3
  137. package/src/core/core/core.d.ts +1 -1
  138. package/src/core/directives/focus.d.ts +9 -0
  139. package/src/core/directives/sticky.d.ts +11 -0
  140. package/src/core/directives/swimUp.d.ts +10 -0
  141. package/src/core/directives/tooltip.d.ts +11 -0
  142. package/src/core/plugin/plugin.d.ts +48 -0
  143. package/src/core/utils/device.d.ts +0 -3
  144. package/src/core/utils/number.d.ts +1 -1
  145. package/src/core/utils/price.d.ts +1 -1
  146. package/src/core/utils/store/localStorage.d.ts +1 -1
  147. package/src/core/utils/store/store.d.ts +2 -2
  148. package/src/core/utils/string.d.ts +1 -1
  149. package/tabs/tabs.amd.js +1 -1
  150. package/tabs/tabs.amd.js.map +1 -1
  151. package/tabs/tabs.js +23 -23
  152. package/tabs/tabs.js.map +1 -1
  153. package/tabsView/tabsView.amd.js +1 -1
  154. package/tabsView/tabsView.amd.js.map +1 -1
  155. package/tabsView/tabsView.js +72 -73
  156. package/tabsView/tabsView.js.map +1 -1
  157. package/utils/check.amd.js +1 -1
  158. package/utils/check.amd.js.map +1 -1
  159. package/utils/check.js +22 -5
  160. package/utils/check.js.map +1 -1
  161. package/utils/css.amd.js.map +1 -1
  162. package/utils/css.js.map +1 -1
  163. package/utils/date.amd.js +1 -1
  164. package/utils/date.js +4 -4
  165. package/utils/device.amd.js +1 -1
  166. package/utils/device.js +6 -6
  167. package/utils/dom.amd.js.map +1 -1
  168. package/utils/dom.js.map +1 -1
  169. package/utils/image.amd.js +1 -1
  170. package/utils/image.amd.js.map +1 -1
  171. package/utils/image.js +1 -1
  172. package/utils/image.js.map +1 -1
  173. package/utils/keyboard.amd.js.map +1 -1
  174. package/utils/keyboard.js.map +1 -1
  175. package/utils/number.amd.js.map +1 -1
  176. package/utils/number.js.map +1 -1
  177. package/utils/price.amd.js.map +1 -1
  178. package/utils/price.js.map +1 -1
  179. package/utils/route.amd.js.map +1 -1
  180. package/utils/route.js.map +1 -1
  181. package/utils/scroll.amd.js +1 -1
  182. package/utils/scroll.amd.js.map +1 -1
  183. package/utils/scroll.js +1 -1
  184. package/utils/scroll.js.map +1 -1
  185. package/utils/string.amd.js +1 -1
  186. package/utils/string.amd.js.map +1 -1
  187. package/utils/string.js +134 -16
  188. package/utils/string.js.map +1 -1
  189. package/utils/system.amd.js.map +1 -1
  190. package/utils/system.js.map +1 -1
  191. package/utils/url.amd.js +2 -1
  192. package/utils/url.amd.js.map +1 -1
  193. package/utils/url.js +44 -7
  194. package/utils/url.js.map +1 -1
  195. package/utils/window.amd.js +1 -1
  196. package/utils/window.js +1 -1
  197. package/web-types.json +62 -0
  198. package/.chunks/datepicker-B2sjxM3R.amd.js +0 -247
  199. package/.chunks/datepicker-B2sjxM3R.amd.js.map +0 -1
  200. package/.chunks/datepicker-V4rjmE4P.es.js +0 -289
  201. package/.chunks/datepicker-V4rjmE4P.es.js.map +0 -1
  202. package/.chunks/forms-Dixfp052.amd.js +0 -4
  203. package/.chunks/forms-Dixfp052.amd.js.map +0 -1
  204. package/.chunks/forms-o7UeMJFf.es.js +0 -1507
  205. package/.chunks/forms-o7UeMJFf.es.js.map +0 -1
  206. package/.chunks/listItem.vue_vue_type_script_setup_true_lang-BliXIrA8.es.js.map +0 -1
  207. package/.chunks/listItem.vue_vue_type_script_setup_true_lang-C0tRJmSC.amd.js +0 -2
  208. package/.chunks/listItem.vue_vue_type_script_setup_true_lang-C0tRJmSC.amd.js.map +0 -1
  209. package/.chunks/menu-CHczkYl6.es.js.map +0 -1
  210. package/.chunks/menu-buQxcAhv.amd.js.map +0 -1
  211. package/.chunks/popup-BMNS1F2G.amd.js +0 -440
  212. package/.chunks/popup-BMNS1F2G.amd.js.map +0 -1
  213. package/.chunks/popup-CJLGyBwQ.es.js.map +0 -1
  214. package/.chunks/widgetInput-ASxjfQpi.amd.js +0 -2
  215. package/.chunks/widgetInput-ASxjfQpi.amd.js.map +0 -1
  216. package/.chunks/widgetInput-p8fSQGk9.es.js +0 -46
  217. package/.chunks/widgetInput-p8fSQGk9.es.js.map +0 -1
  218. package/src/components/formsExt/selector2/itemMulti.vue.d.ts +0 -18
  219. package/src/components/formsExt/selector2/selector2.vue.d.ts +0 -130
  220. package/src/core/core/plugin.d.ts +0 -38
  221. /package/assets/{widgetInput.css → popup.css} +0 -0
@@ -1,14 +1,10 @@
1
- import { insertToPage as Z } from "../utils/css.js";
2
- import { defineComponent as K, ref as _, computed as N, resolveDirective as q, openBlock as c, createElementBlock as v, normalizeClass as T, toDisplayString as C, createCommentVNode as V, createElementVNode as E, withDirectives as Y, createVNode as F, withKeys as O, withModifiers as B, createBlock as I, withCtx as $, createTextVNode as M, watch as S, toRef as ee, mergeProps as X, renderSlot as j, mergeModels as D, useModel as Q, Fragment as P, renderList as H, vModelRadio as te, unref as k } from "vue";
3
- import { T as oe, B as z, a as L, I as le, C as ae } from "../.chunks/forms-o7UeMJFf.es.js";
4
- import { invertKeyboardLayout as se } from "../utils/keyboard.js";
5
- import { _ as re, b as R } from "../.chunks/listItem.vue_vue_type_script_setup_true_lang-BliXIrA8.es.js";
6
- import { P as ne } from "../.chunks/widgetInput-p8fSQGk9.es.js";
7
- import { debounce as ie } from "lodash";
8
- import { M as Re } from "../.chunks/menu-CHczkYl6.es.js";
9
- const x = ["../assets/formsExt.css"].map((r) => import.meta.resolve(r));
10
- Z(x, !0);
11
- const ue = { class: "top-editArea_footer" }, de = /* @__PURE__ */ K({
1
+ import { insertToPage as P } from "../utils/css.js";
2
+ import { defineComponent as G, ref as T, computed as g, resolveDirective as z, openBlock as d, createElementBlock as c, normalizeClass as m, toDisplayString as V, createCommentVNode as f, createElementVNode as A, withDirectives as E, createVNode as I, withKeys as h, withModifiers as _, createBlock as B, withCtx as w, createTextVNode as C, watch as S, toRef as F, mergeProps as K, renderSlot as N, mergeModels as M, useModel as U, Fragment as q, renderList as D, vModelRadio as O } from "vue";
3
+ import { v as X, r as k, q as $, u as L } from "../.chunks/forms-CRAV8PiZ.es.js";
4
+ import { M as j } from "../.chunks/menu-BWjYRHkQ.es.js";
5
+ const R = ["../assets/formsExt.css"].map((u) => import.meta.resolve(u));
6
+ P(R, !0);
7
+ const J = { class: "top-editArea_footer" }, Q = /* @__PURE__ */ G({
12
8
  __name: "editArea",
13
9
  props: {
14
10
  defaultValue: { default: "" },
@@ -31,91 +27,91 @@ const ue = { class: "top-editArea_footer" }, de = /* @__PURE__ */ K({
31
27
  hint: {}
32
28
  },
33
29
  emits: ["submit", "close", "clickOnTitle"],
34
- setup(r, { emit: d }) {
35
- const e = r, a = d, m = _(e.defaultValue), f = _(e.isFocused), s = N(() => m.value !== e.defaultValue), p = N(() => e.attachToKeyboard ? "" : e.forceShowCloseBtn && !s.value ? e.closeText : e.cancelText), i = (u) => {
36
- a("submit", u), m.value = e.defaultValue;
37
- }, y = () => {
38
- if (e.forceShowCloseBtn && !s.value) {
39
- a("close");
30
+ setup(u, { emit: v }) {
31
+ const e = u, l = v, r = T(e.defaultValue), n = T(e.isFocused), t = g(() => r.value !== e.defaultValue), s = g(() => e.attachToKeyboard ? "" : e.forceShowCloseBtn && !t.value ? e.closeText : e.cancelText), a = (o) => {
32
+ l("submit", o), r.value = e.defaultValue;
33
+ }, p = () => {
34
+ if (e.forceShowCloseBtn && !t.value) {
35
+ l("close");
40
36
  return;
41
37
  }
42
- m.value = e.defaultValue;
43
- }, b = () => {
44
- e.attachToKeyboard && a("clickOnTitle");
38
+ r.value = e.defaultValue;
39
+ }, y = () => {
40
+ e.attachToKeyboard && l("clickOnTitle");
45
41
  };
46
- return (u, o) => {
47
- const g = q("focus");
48
- return c(), v("div", {
49
- class: T({
42
+ return (o, i) => {
43
+ const H = z("focus");
44
+ return d(), c("div", {
45
+ class: m({
50
46
  "top-editArea": !0,
51
- "top-editArea-attachedToKeyboard": u.attachToKeyboard
47
+ "top-editArea-attachedToKeyboard": o.attachToKeyboard
52
48
  })
53
49
  }, [
54
- u.title ? (c(), v("div", {
50
+ o.title ? (d(), c("div", {
55
51
  key: 0,
56
52
  class: "top-editArea_title",
57
- onClick: o[0] || (o[0] = (h) => b())
58
- }, C(u.title), 1)) : V("", !0),
59
- E("div", {
60
- class: T({
53
+ onClick: i[0] || (i[0] = (b) => y())
54
+ }, V(o.title), 1)) : f("", !0),
55
+ A("div", {
56
+ class: m({
61
57
  "top-editArea_form": !0,
62
- "top-error": u.isError,
63
- "top-focus": f.value
58
+ "top-error": o.isError,
59
+ "top-focus": n.value
64
60
  })
65
61
  }, [
66
- Y(F(oe, {
67
- modelValue: m.value,
68
- "onUpdate:modelValue": o[1] || (o[1] = (h) => m.value = h),
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,
62
+ E(I(X, {
63
+ modelValue: r.value,
64
+ "onUpdate:modelValue": i[1] || (i[1] = (b) => r.value = b),
65
+ name: o.name,
66
+ placeholder: o.placeholder,
67
+ rows: o.rows,
68
+ minHeight: o.minHeight,
69
+ expandable: o.expandable,
70
+ disabled: o.disabled,
71
+ readonly: o.readonly,
72
+ isError: o.isError,
73
+ hint: o.hint,
78
74
  class: "top-editArea_element",
79
- onFocus: o[2] || (o[2] = () => f.value = !0),
80
- onBlur: o[3] || (o[3] = () => f.value = !1),
75
+ onFocus: i[2] || (i[2] = () => n.value = !0),
76
+ onBlur: i[3] || (i[3] = () => n.value = !1),
81
77
  onKeyup: [
82
- O(y, ["esc"]),
83
- o[4] || (o[4] = O(B((h) => i(m.value), ["ctrl"]), ["enter"]))
78
+ h(p, ["esc"]),
79
+ i[4] || (i[4] = h(_((b) => a(r.value), ["ctrl"]), ["enter"]))
84
80
  ]
85
81
  }, null, 8, ["modelValue", "name", "placeholder", "rows", "minHeight", "expandable", "disabled", "readonly", "isError", "hint"]), [
86
- [g, f.value]
82
+ [H, n.value]
87
83
  ]),
88
- E("div", ue, [
89
- s.value || u.forceShowCloseBtn ? (c(), I(z, {
84
+ A("div", J, [
85
+ t.value || o.forceShowCloseBtn ? (d(), B(k, {
90
86
  key: 0,
91
87
  class: "top-editArea_button",
92
88
  color: "theme",
93
89
  styling: "soft",
94
- icon: u.attachToKeyboard ? "" : "",
95
- onClick: y
90
+ icon: o.attachToKeyboard ? "" : "",
91
+ onClick: p
96
92
  }, {
97
- default: $(() => [
98
- M(C(p.value), 1)
93
+ default: w(() => [
94
+ C(V(s.value), 1)
99
95
  ]),
100
96
  _: 1
101
- }, 8, ["icon"])) : V("", !0),
102
- s.value ? (c(), I(z, {
97
+ }, 8, ["icon"])) : f("", !0),
98
+ t.value ? (d(), B(k, {
103
99
  key: 1,
104
100
  class: "top-editArea_button",
105
- icon: u.attachToKeyboard ? "" : "",
106
- onClick: o[5] || (o[5] = (h) => i(m.value))
101
+ icon: o.attachToKeyboard ? "" : "",
102
+ onClick: i[5] || (i[5] = (b) => a(r.value))
107
103
  }, {
108
- default: $(() => [
109
- M(C(u.attachToKeyboard ? "" : u.submitText), 1)
104
+ default: w(() => [
105
+ C(V(o.attachToKeyboard ? "" : o.submitText), 1)
110
106
  ]),
111
107
  _: 1
112
- }, 8, ["icon"])) : V("", !0)
108
+ }, 8, ["icon"])) : f("", !0)
113
109
  ])
114
110
  ], 2)
115
111
  ], 2);
116
112
  };
117
113
  }
118
- }), pe = {
114
+ }), W = {
119
115
  "top-editArea": "top-editArea",
120
116
  "top-editArea_title": "top-editArea_title",
121
117
  "top-editArea_form": "top-editArea_form",
@@ -127,9 +123,9 @@ const ue = { class: "top-editArea_footer" }, de = /* @__PURE__ */ K({
127
123
  "top-editArea-attachedToKeyboard": "top-editArea-attachedToKeyboard",
128
124
  "top-button": "top-button",
129
125
  "top-editArea_button": "top-editArea_button"
130
- }, ce = {
131
- $style: pe
132
- }, ze = /* @__PURE__ */ L(de, [["__cssModules", ce]]), me = { class: "top-editInput" }, fe = /* @__PURE__ */ K({
126
+ }, Y = {
127
+ $style: W
128
+ }, Z = /* @__PURE__ */ $(Q, [["__cssModules", Y]]), x = { class: "top-editInput" }, ee = /* @__PURE__ */ G({
133
129
  __name: "editInput",
134
130
  props: {
135
131
  modelValue: {},
@@ -137,44 +133,44 @@ const ue = { class: "top-editArea_footer" }, de = /* @__PURE__ */ K({
137
133
  button: {}
138
134
  },
139
135
  emits: ["update:modelValue"],
140
- setup(r, { emit: d }) {
141
- const e = r, a = _(e.modelValue);
142
- S(ee(e.modelValue), () => {
143
- a.value = e.modelValue;
136
+ setup(u, { emit: v }) {
137
+ const e = u, l = T(e.modelValue);
138
+ S(F(e.modelValue), () => {
139
+ l.value = e.modelValue;
144
140
  });
145
- const m = d, f = () => {
146
- m("update:modelValue", a.value);
141
+ const r = v, n = () => {
142
+ r("update:modelValue", l.value);
147
143
  };
148
- return (s, p) => (c(), v("div", me, [
149
- F(le, X(s.input, {
150
- onKeydownCapture: p[0] || (p[0] = O(B((i) => a.value = s.modelValue, ["stop"]), ["esc"])),
151
- onKeydown: O(B(f, ["stop"]), ["enter"]),
152
- modelValue: a.value,
153
- "onUpdate:modelValue": p[1] || (p[1] = (i) => a.value = i)
144
+ return (t, s) => (d(), c("div", x, [
145
+ I(L, K(t.input, {
146
+ onKeydownCapture: s[0] || (s[0] = h(_((a) => l.value = t.modelValue, ["stop"]), ["esc"])),
147
+ onKeydown: h(_(n, ["stop"]), ["enter"]),
148
+ modelValue: l.value,
149
+ "onUpdate:modelValue": s[1] || (s[1] = (a) => l.value = a)
154
150
  }), null, 16, ["onKeydown", "modelValue"]),
155
- a.value !== s.modelValue ? (c(), I(z, X({
151
+ l.value !== t.modelValue ? (d(), B(k, K({
156
152
  key: 0,
157
153
  icon: "",
158
154
  styling: "soft"
159
- }, s.button, { onClick: f }), {
160
- default: $(() => [
161
- j(s.$slots, "default")
155
+ }, t.button, { onClick: n }), {
156
+ default: w(() => [
157
+ N(t.$slots, "default")
162
158
  ]),
163
159
  _: 3
164
- }, 16)) : V("", !0)
160
+ }, 16)) : f("", !0)
165
161
  ]));
166
162
  }
167
- }), ve = {
163
+ }), oe = {
168
164
  "top-editInput": "top-editInput",
169
165
  "top-input": "top-input"
170
- }, ye = {
171
- $style: ve
172
- }, Fe = /* @__PURE__ */ L(fe, [["__cssModules", ye]]), he = ["data-top-icon", "onClick"], be = {
166
+ }, te = {
167
+ $style: oe
168
+ }, ae = /* @__PURE__ */ $(ee, [["__cssModules", te]]), le = ["data-top-icon", "onClick"], re = {
173
169
  key: 0,
174
170
  class: "top-radioGroup_circle"
175
- }, Ae = ["value", "disabled"], ge = /* @__PURE__ */ K({
171
+ }, se = ["value", "disabled"], ie = /* @__PURE__ */ G({
176
172
  __name: "radioGroup",
177
- props: /* @__PURE__ */ D({
173
+ props: /* @__PURE__ */ M({
178
174
  modelValue: {},
179
175
  radiosProps: {},
180
176
  showIndicator: { type: Boolean },
@@ -186,52 +182,52 @@ const ue = { class: "top-editArea_footer" }, de = /* @__PURE__ */ K({
186
182
  },
187
183
  modelModifiers: {}
188
184
  }),
189
- emits: /* @__PURE__ */ D(["update:modelValue"], ["update:modelValue"]),
190
- setup(r, { emit: d }) {
191
- const e = Q(r, "modelValue"), a = r, m = _(null);
185
+ emits: /* @__PURE__ */ M(["update:modelValue"], ["update:modelValue"]),
186
+ setup(u, { emit: v }) {
187
+ const e = U(u, "modelValue"), l = u, r = T(null);
192
188
  S(e, () => {
193
- var s, p, i, y, b;
194
- (s = a.radiosProps) != null && s.some((u) => u.value === e.value) || (e.value = ((i = (p = a.radiosProps) == null ? void 0 : p[0]) == null ? void 0 : i.value) ?? ""), (b = (y = m.value) == null ? void 0 : y.querySelector(".radioGroup_item-selected")) == null || b.scrollIntoView();
189
+ var t, s, a, p, y;
190
+ (t = l.radiosProps) != null && t.some((o) => o.value === e.value) || (e.value = ((a = (s = l.radiosProps) == null ? void 0 : s[0]) == null ? void 0 : a.value) ?? ""), (y = (p = r.value) == null ? void 0 : p.querySelector(".radioGroup_item-selected")) == null || y.scrollIntoView();
195
191
  }, { immediate: !0 });
196
- const f = "radioGroup-" + Math.random();
197
- return (s, p) => (c(), v("div", {
192
+ const n = "radioGroup-" + Math.random();
193
+ return (t, s) => (d(), c("div", {
198
194
  ref_key: "elRef",
199
- ref: m,
200
- class: T({
195
+ ref: r,
196
+ class: m({
201
197
  "top-radioGroup": !0,
202
198
  "top-scrollBarXHidding": !0,
203
- ["top-size_" + s.size]: !!s.size,
204
- "top-error": s.isError
199
+ ["top-size_" + t.size]: !!t.size,
200
+ "top-error": t.isError
205
201
  })
206
202
  }, [
207
- (c(!0), v(P, null, H(s.radiosProps, (i) => (c(), v("label", {
208
- class: T({
209
- "top-radioGroup_item-selected": i.value === e.value,
203
+ (d(!0), c(q, null, D(t.radiosProps, (a) => (d(), c("label", {
204
+ class: m({
205
+ "top-radioGroup_item-selected": a.value === e.value,
210
206
  "top-radioGroup_item": !0,
211
207
  "top-forms-focusable": !0,
212
- "top-disabled": i.disabled
208
+ "top-disabled": a.disabled
213
209
  }),
214
- "data-top-icon": i.icon,
215
- onClick: (y) => e.value = i.value
210
+ "data-top-icon": a.icon,
211
+ onClick: (p) => e.value = a.value
216
212
  }, [
217
- M(C(i.title) + " ", 1),
218
- s.showIndicator ? (c(), v("span", be)) : V("", !0),
219
- Y(E("input", {
220
- "onUpdate:modelValue": p[0] || (p[0] = (y) => e.value = y),
221
- name: f,
213
+ C(V(a.title) + " ", 1),
214
+ t.showIndicator ? (d(), c("span", re)) : f("", !0),
215
+ E(A("input", {
216
+ "onUpdate:modelValue": s[0] || (s[0] = (p) => e.value = p),
217
+ name: n,
222
218
  type: "radio",
223
- class: T({
219
+ class: m({
224
220
  "top-unvisible": !0
225
221
  }),
226
- value: i.value,
227
- disabled: i.disabled
228
- }, null, 8, Ae), [
229
- [te, e.value]
222
+ value: a.value,
223
+ disabled: a.disabled
224
+ }, null, 8, se), [
225
+ [O, e.value]
230
226
  ])
231
- ], 10, he))), 256))
227
+ ], 10, le))), 256))
232
228
  ], 2));
233
229
  }
234
- }), Ve = {
230
+ }), de = {
235
231
  "top-scrollBarXHidding": "top-scrollBarXHidding",
236
232
  "top-radioGroup": "top-radioGroup",
237
233
  "top-radioGroup_item": "top-radioGroup_item",
@@ -239,250 +235,13 @@ const ue = { class: "top-editArea_footer" }, de = /* @__PURE__ */ K({
239
235
  "top-radioGroup_circle": "top-radioGroup_circle",
240
236
  "top-disabled": "top-disabled",
241
237
  "top-error": "top-error"
242
- }, _e = {
243
- $style: Ve
244
- }, Ue = /* @__PURE__ */ L(ge, [["__cssModules", _e]]), $e = (r, d, e) => {
245
- const a = _([]), m = _(!1);
246
- let f = "", s;
247
- r && !r.params.limit && (r.params.limit = 100);
248
- const p = async () => {
249
- if (!r) return;
250
- let o, g;
251
- if (e && (r.cache ??= /* @__PURE__ */ new Map(), g = JSON.stringify(r.params), o = r.cache.get(g), o))
252
- return o;
253
- if (m.value = !0, o = await r.call(), m.value = !1, o.errors) return;
254
- if (!Array.isArray(o.result)) {
255
- console.warn("В result ожидался массив");
256
- return;
257
- }
258
- const h = o.result.findIndex((G) => G.id === void 0 || G.name === void 0);
259
- if (h !== -1) {
260
- console.warn(`В result[${h}] нет id или name`);
261
- return;
262
- }
263
- return e && r.cache.set(g, o), o;
264
- }, i = async () => {
265
- if (!r) return;
266
- r.params.offset = 0, r.params.search = f;
267
- const o = await p();
268
- o && (s = o.nextOffset, a.value = o.result);
269
- }, y = async () => {
270
- if (!r || !s || m.value) return;
271
- r.params.offset = s, r.params.search = f;
272
- const o = await p();
273
- o && (s = o.nextOffset, a.value = a.value.concat(o.result));
274
- }, b = ie(() => i(), 200);
275
- return {
276
- items: a,
277
- isLoading: m,
278
- loadAppend: y,
279
- setSearchTextAndLoad: (o, g = !0) => {
280
- r && (o.length < d || o === f && a.value.length || (f = o, g ? b() : i()));
281
- }
282
- };
283
- }, we = { class: "top-selector2_itemMulti top-ellipsis" }, Ie = /* @__PURE__ */ K({
284
- __name: "itemMulti",
285
- props: {
286
- id: {},
287
- name: {}
288
- },
289
- emits: ["delete"],
290
- setup(r) {
291
- return (d, e) => (c(), v("div", we, [
292
- M(C(d.name) + " ", 1),
293
- E("span", {
294
- class: "top-selector2_itemMultiDelete",
295
- "data-top-icon": "",
296
- onClick: e[0] || (e[0] = (a) => d.$emit("delete", d.id)),
297
- onMousedown: e[1] || (e[1] = B(() => {
298
- }, ["stop"]))
299
- }, null, 32)
300
- ]));
301
- }
302
- }), Te = {
303
- "top-selector2_itemMulti": "top-selector2_itemMulti",
304
- "top-selector2_itemMultiDelete": "top-selector2_itemMultiDelete",
305
- "top-selector2": "top-selector2",
306
- "top-active": "top-active"
307
- }, Ce = {
308
- $style: Te
309
- }, Be = /* @__PURE__ */ L(Ie, [["__cssModules", Ce]]), Me = {
310
- key: 0,
311
- class: "top-selector2_activeItems"
312
- }, ke = {
313
- key: 1,
314
- class: "top-selector2_activeName top-ellipsis"
315
- }, Se = /* @__PURE__ */ K({
316
- __name: "selector2",
317
- props: /* @__PURE__ */ D({
318
- modelValue: {},
319
- items: { default: () => [] },
320
- multiselect: { type: Boolean },
321
- disabled: { type: Boolean },
322
- size: { default: "s" },
323
- isError: { type: Boolean },
324
- apiRequest: {},
325
- minLength: { default: 0 },
326
- useCache: { type: Boolean },
327
- appendSearchToResult: { type: Boolean },
328
- appendAllValue: { type: Boolean },
329
- addChanger: { type: Boolean },
330
- placeholder: {},
331
- showSelectedInInput: { type: Boolean, default: !0 }
332
- }, {
333
- modelValue: {},
334
- modelModifiers: {}
335
- }),
336
- emits: ["update:modelValue"],
337
- setup(r) {
338
- const d = r, e = Q(r, "modelValue"), a = _(""), m = {
339
- id: 0,
340
- name: "Все"
341
- }, f = _(null), s = () => {
342
- var t;
343
- return (t = f.value) == null ? void 0 : t.popup;
344
- };
345
- window.__STORYBOOK_PREVIEW__ && !d.modelValue && S(
346
- () => d.multiselect,
347
- () => {
348
- e.value = d.multiselect ? [] : { id: null, name: "" };
349
- },
350
- { immediate: !0 }
351
- );
352
- const p = $e(d.apiRequest, d.minLength, d.useCache), i = N(() => {
353
- const t = [];
354
- return !d.multiselect && d.appendAllValue && t.push(m), d.items.forEach((n) => t.push({ ...n })), t;
355
- }), y = (t, n = !0) => n && t.id === null ? Array.isArray(e.value) ? e.value.some((l) => l.id === t.id && l.name === t.name) : t.name === e.value.name : Array.isArray(e.value) ? e.value.some((l) => l.id === t.id) : t.id === e.value.id, b = N(() => {
356
- const t = a.value.toLowerCase(), n = se(t);
357
- let l = [];
358
- return i.value.forEach((A) => {
359
- const w = A.name.toLowerCase();
360
- (A.id === Number(t) || w.includes(t) || w.includes(n)) && (w === t || w === n ? l.unshift(A) : l.push(A));
361
- }), l.push(...p.items.value), d.appendSearchToResult && a.value && (!l.length || l[0].name.toLowerCase() !== t) && l.push({
362
- id: null,
363
- name: a.value
364
- }), d.multiselect && (l = l.filter((A) => !y(A))), l;
365
- }), u = async (t) => {
366
- var n, l;
367
- if (d.multiselect) {
368
- if (!Array.isArray(e.value) || y(t))
369
- return;
370
- const A = [...e.value];
371
- A.push({ ...t }), e.value = A, ae.state.isMobile ? (n = s()) == null || n.close() : setTimeout(() => {
372
- var w, U, W, J;
373
- (w = s()) == null || w.recalcPosition(), (J = (W = (U = s()) == null ? void 0 : U.elPopupWidget) == null ? void 0 : W.querySelector("input")) == null || J.focus(), a.value && (b.value.length || (a.value = "", p.items.value = []));
374
- });
375
- } else
376
- a.value && (a.value = "", p.items.value = []), JSON.stringify(t) !== JSON.stringify(e.value) && (e.value = { ...t }), (l = s()) == null || l.close();
377
- }, o = () => {
378
- if (!Array.isArray(e.value)) {
379
- const n = (i.value.findIndex((l) => l.id === e.value.id) + 1) % i.value.length;
380
- e.value = { ...i.value[n] };
381
- }
382
- }, g = async (t) => {
383
- Array.isArray(e.value) && (e.value = e.value.filter((n) => n.id !== t), setTimeout(() => {
384
- var n;
385
- (n = s()) == null || n.recalcPosition();
386
- }));
387
- }, h = _(!1);
388
- d.apiRequest && (S(h, () => {
389
- h.value && p.setSearchTextAndLoad(a.value, !1);
390
- }), S(a, () => p.setSearchTextAndLoad(a.value)));
391
- const G = (t) => {
392
- const n = t.target;
393
- n.scrollTop / (n.scrollHeight - n.offsetHeight) > 0.8 && p.loadAppend();
394
- };
395
- return (t, n) => (c(), I(k(re), {
396
- ref_key: "popupRef",
397
- ref: f,
398
- onOpen: n[1] || (n[1] = (l) => h.value = !0),
399
- onClose: n[2] || (n[2] = (l) => h.value = !1),
400
- onScrollContentList: n[3] || (n[3] = (l) => t.apiRequest ? G(l) : void 0),
401
- notch: !1,
402
- transitionDuration: 0
403
- }, {
404
- opener: $(() => [
405
- E("div", {
406
- class: T({
407
- "top-selector2": !0,
408
- "top-selector2-multiselect": t.multiselect,
409
- ["top-size_" + t.size]: !0,
410
- "top-disabled": t.disabled,
411
- "top-forms-focusable": !t.disabled,
412
- "top-error": t.isError
413
- })
414
- }, [
415
- t.multiselect ? (c(), v("div", Me, [
416
- (c(!0), v(P, null, H(e.value, (l) => (c(), I(Be, {
417
- id: l.id,
418
- name: l.name,
419
- onDelete: g
420
- }, null, 8, ["id", "name"]))), 256))
421
- ])) : V("", !0),
422
- t.multiselect ? V("", !0) : (c(), v("span", ke, C(Array.isArray(e.value) ? "" : e.value.name), 1)),
423
- t.addChanger && !t.multiselect && i.value.length > 1 && !t.disabled ? (c(), v("span", {
424
- key: 2,
425
- class: "top-changer top-changer-selector",
426
- onClick: B(o, ["stop"])
427
- })) : V("", !0)
428
- ], 2)
429
- ]),
430
- widget: $(() => [
431
- F(k(ne), {
432
- title: "Поиск",
433
- icon: "",
434
- modelValue: a.value,
435
- "onUpdate:modelValue": n[0] || (n[0] = (l) => a.value = l),
436
- isLoading: k(p).isLoading.value,
437
- placeholder: !Array.isArray(e.value) && !t.multiselect && t.showSelectedInInput ? e.value.name : t.placeholder
438
- }, null, 8, ["modelValue", "isLoading", "placeholder"])
439
- ]),
440
- contentList: $(() => [
441
- (c(!0), v(P, null, H(b.value, (l) => (c(), I(k(R), {
442
- class: T({
443
- "top-active": !Array.isArray(e.value) && !t.multiselect && e.value.name === l.name
444
- }),
445
- key: l.id ?? void 0,
446
- onClick: B((A) => u(l), ["stop"])
447
- }, {
448
- default: $(() => [
449
- t.$slots.item ? j(t.$slots, "item", {
450
- key: 0,
451
- item: l
452
- }) : (c(), v(P, { key: 1 }, [
453
- M(C(l.name), 1)
454
- ], 64))
455
- ]),
456
- _: 2
457
- }, 1032, ["class", "onClick"]))), 128)),
458
- b.value.length ? V("", !0) : (c(), I(k(R), {
459
- key: 0,
460
- type: "regular"
461
- }, {
462
- default: $(() => [
463
- M(" Нет результатов ")
464
- ]),
465
- _: 1
466
- }))
467
- ]),
468
- _: 3
469
- }, 512));
470
- }
471
- }), Ee = {
472
- "top-selector2": "top-selector2",
473
- "top-selector2-multiselect": "top-selector2-multiselect",
474
- "top-active": "top-active",
475
- "top-selector2_activeItems": "top-selector2_activeItems",
476
- "top-selector2_activeName": "top-selector2_activeName",
477
- "top-changer-selector": "top-changer-selector"
478
- }, Ke = {
479
- $style: Ee
480
- }, We = /* @__PURE__ */ L(Se, [["__cssModules", Ke]]);
238
+ }, ne = {
239
+ $style: de
240
+ }, ue = /* @__PURE__ */ $(ie, [["__cssModules", ne]]), ve = Z, ye = ae, be = ue, Ve = j;
481
241
  export {
482
- ze as EditArea,
483
- Fe as EditInput,
484
- Re as Menu,
485
- Ue as RadioGroup,
486
- We as Selector2
242
+ ve as TopEditArea,
243
+ ye as TopEditInput,
244
+ Ve as TopMenu,
245
+ be as TopRadioGroup
487
246
  };
488
247
  //# sourceMappingURL=formsExt.js.map