@topvisor/ui 0.0.42 → 0.9.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 (99) hide show
  1. package/.chunks/datepicker-32bc8bd9.es.js +275 -0
  2. package/.chunks/datepicker-32bc8bd9.es.js.map +1 -0
  3. package/.chunks/datepicker-8a42d8a6.amd.js +234 -0
  4. package/.chunks/datepicker-8a42d8a6.amd.js.map +1 -0
  5. package/.chunks/forms-30d68077.amd.js +3 -0
  6. package/.chunks/forms-30d68077.amd.js.map +1 -0
  7. package/.chunks/forms-64632f73.es.js +1091 -0
  8. package/.chunks/forms-64632f73.es.js.map +1 -0
  9. package/.chunks/{popup-431fc5d5.amd.js → popup-14ca85cf.amd.js} +378 -377
  10. package/.chunks/popup-14ca85cf.amd.js.map +1 -0
  11. package/.chunks/{popup-e1bbd684.es.js → popup-b2fe3094.es.js} +439 -429
  12. package/.chunks/popup-b2fe3094.es.js.map +1 -0
  13. package/README.md +80 -80
  14. package/assets/core.css +1 -1
  15. package/assets/forms.css +1 -1
  16. package/assets/tabsView.css +1 -0
  17. package/core/core.amd.js +1 -1
  18. package/core/core.d.ts +2 -2
  19. package/core/core.js +1 -1
  20. package/forms/forms.amd.js +1 -1
  21. package/forms/forms.js +8 -8
  22. package/forms/helpers.amd.js.map +1 -1
  23. package/forms/helpers.js.map +1 -1
  24. package/formsExt/formsExt.amd.js +1 -1
  25. package/formsExt/formsExt.amd.js.map +1 -1
  26. package/formsExt/formsExt.js +1 -1
  27. package/formsExt/formsExt.js.map +1 -1
  28. package/icomoon/demo-files/demo.css +161 -161
  29. package/icomoon/demo-files/demo.js +30 -30
  30. package/icomoon/demo.html +2945 -2945
  31. package/icomoon/fonts/Topvisor-2.svg +232 -232
  32. package/icomoon/style.css +647 -647
  33. package/package.json +19 -19
  34. package/popup/popup.amd.js +1 -1
  35. package/popup/popup.amd.js.map +1 -1
  36. package/popup/popup.js +1 -1
  37. package/popup/popup.js.map +1 -1
  38. package/popup/worker.amd.js +1 -1
  39. package/popup/worker.amd.js.map +1 -1
  40. package/popup/worker.js +13 -10
  41. package/popup/worker.js.map +1 -1
  42. package/src/components/tabsView/tabsView/_MenuItem.stories.d.ts +361 -0
  43. package/src/components/tabsView/tabsView/_MenuTitle.stories.d.ts +280 -0
  44. package/src/components/tabsView/tabsView/content.vue.d.ts +19 -0
  45. package/src/components/tabsView/tabsView/menu.vue.d.ts +19 -0
  46. package/src/components/tabsView/tabsView/menuDelimeter.vue.d.ts +2 -0
  47. package/src/components/tabsView/tabsView/menuItem.vue.d.ts +19 -0
  48. package/src/components/tabsView/tabsView/menuTitle.vue.d.ts +19 -0
  49. package/src/components/tabsView/tabsView/state.d.ts +14 -0
  50. package/src/components/tabsView/tabsView/tabsView.d.ts +69 -0
  51. package/src/components/tabsView/tabsView/tabsView.stories.d.ts +529 -0
  52. package/src/components/tabsView/tabsView/tabsView.vue.d.ts +38 -0
  53. package/src/components/tabsView/tabsView.d.ts +4 -0
  54. package/src/core/utils/date.d.ts +25 -27
  55. package/src/core/utils/device.d.ts +10 -13
  56. package/tabs/tabs.amd.js +1 -1
  57. package/tabs/tabs.js +1 -1
  58. package/tabsView/tabsView.amd.js +2 -0
  59. package/tabsView/tabsView.amd.js.map +1 -0
  60. package/tabsView/tabsView.d.ts +1 -0
  61. package/tabsView/tabsView.js +271 -0
  62. package/tabsView/tabsView.js.map +1 -0
  63. package/utils/date.amd.js +1 -1
  64. package/utils/date.d.ts +0 -2
  65. package/utils/date.js +5 -2
  66. package/utils/device.amd.js +1 -1
  67. package/utils/device.d.ts +0 -2
  68. package/utils/device.js +7 -2
  69. package/utils/dom.amd.js +1 -1
  70. package/utils/dom.d.ts +2 -2
  71. package/utils/dom.js +1 -1
  72. package/.chunks/datepicker-126a4e1b.amd.js +0 -234
  73. package/.chunks/datepicker-126a4e1b.amd.js.map +0 -1
  74. package/.chunks/datepicker-47a90829.es.js +0 -275
  75. package/.chunks/datepicker-47a90829.es.js.map +0 -1
  76. package/.chunks/forms-15b83561.es.js +0 -1109
  77. package/.chunks/forms-15b83561.es.js.map +0 -1
  78. package/.chunks/forms-41d0318c.amd.js +0 -3
  79. package/.chunks/forms-41d0318c.amd.js.map +0 -1
  80. package/.chunks/popup-431fc5d5.amd.js.map +0 -1
  81. package/.chunks/popup-e1bbd684.es.js.map +0 -1
  82. package/build/cssModules.d.ts +0 -13
  83. package/build/plugin/amdFix.d.ts +0 -8
  84. package/build/plugin/autoloadCSS.d.ts +0 -19
  85. package/build/rollup.config.d.ts +0 -15
  86. package/src/components/component.d.ts +0 -25
  87. package/src/components/helpersStories.d.ts +0 -28
  88. package/src/core/base/Colors.stories.d.ts +0 -19
  89. package/src/core/base/Layout.stories.d.ts +0 -19
  90. package/src/core/base/Properties.stories.d.ts +0 -19
  91. package/src/core/directives/tooltip.d.ts +0 -7
  92. package/src/core/theme/Colors.stories.d.ts +0 -19
  93. package/src/core/theme/Properties.stories.d.ts +0 -19
  94. package/src/core//320/235/320/260/320/261/320/276/321/200 /320/270/320/272/320/276/320/275/320/276/320/272//320/235/320/260/320/261/320/276/321/200 /320/270/320/272/320/276/320/275/320/276/320/272.stories.d.ts" +0 -6
  95. package/src/d.d.ts +0 -4
  96. package/src/resources/styles/core/core.d.ts +0 -0
  97. package/src/resources/styles/themes/dark.d.ts +0 -0
  98. package/src/resources/styles/themes/light.d.ts +0 -0
  99. package/src/storybook/components/icomoon.d.ts +0 -2
@@ -0,0 +1,275 @@
1
+ import { watch as g, toRef as m } from "vue";
2
+ import { C as k, d as h } from "./forms-64632f73.es.js";
3
+ const b = `/* ui-datepicker */
4
+ .ui-datepicker {
5
+ --datepicker-day-color: #FFF;
6
+ --datepicker-day-color-hover: var(--color-blue-150);
7
+ --datepicker-selected-color: var(--color-blue-500);
8
+ --datepicker-selected-color-hover: var(--color-blue-550);
9
+ --datepicker-range-color: var(--color-blue-100);
10
+ --datepicker-range-color-hover: var(--color-blue-150);
11
+
12
+ user-select: none;
13
+ width: auto;
14
+ padding: 0;
15
+ }
16
+
17
+ .ui-datepicker:before,
18
+ .ui-datepicker:after {
19
+ display: none;
20
+ }
21
+
22
+ /* на странице */
23
+ .ui-datepicker-inline {
24
+ display: inline-block !important;
25
+ }
26
+
27
+ /* в popup */
28
+ .ui-datepicker:not(.ui-datepicker-inline) {
29
+ border-radius: 8px;
30
+ background: var(--content-background-color);
31
+ box-shadow: var(--top-shadow);
32
+ z-index: 10000000 !important;
33
+ padding: 8px;
34
+ }
35
+
36
+ .ui-datepicker a {
37
+ text-decoration: none !important;
38
+ }
39
+
40
+ .ui-datepicker option {
41
+ color: var(--color-text);
42
+ font-size: 14px;
43
+ }
44
+
45
+ .ui-datepicker-header {
46
+ padding: 0 !important;
47
+ margin: 0 0 18px 0;
48
+ display: flex;
49
+ align-items: center;
50
+ }
51
+
52
+ .ui-datepicker-header > * {
53
+ display: flex;
54
+ align-items: center;
55
+ justify-content: center;
56
+ }
57
+
58
+ .ui-datepicker-title {
59
+ width: 100% !important;
60
+ height: 24px;
61
+ margin: 0 !important;
62
+ }
63
+
64
+ .ui-datepicker-month,
65
+ .ui-datepicker-year {
66
+ outline: none !important;
67
+ width: auto !important;
68
+ border: none;
69
+ padding: 0;
70
+ margin: 0 6px !important;
71
+ text-align: center;
72
+ font-size: 16px !important;
73
+ }
74
+
75
+ .ui-datepicker-month {
76
+ color: var(--color-text);
77
+ }
78
+
79
+ .ui-datepicker-year {
80
+ color: var(--color-gray-300);
81
+ }
82
+
83
+ /* select.ui-datepicker-month,
84
+ select.ui-datepicker-year{ cursor: pointer; color: var(--color-blue-500); }*/
85
+ select.ui-datepicker-month,
86
+ select.ui-datepicker-year {
87
+ cursor: pointer;
88
+ }
89
+
90
+ .ui-datepicker-prev,
91
+ .ui-datepicker-next {
92
+ cursor: pointer;
93
+ width: 24px !important;
94
+ height: 24px !important;
95
+ font-size: 24px;
96
+ font-family: 'Topvisor-2';
97
+ position: static !important;
98
+ }
99
+
100
+ .ui-datepicker-prev:before {
101
+ content: '';
102
+ }
103
+
104
+ .ui-datepicker-next {
105
+ order: 1;
106
+ }
107
+
108
+ .ui-datepicker-next:before {
109
+ content: '';
110
+ }
111
+
112
+ .ui-datepicker-prev > *,
113
+ .ui-datepicker-next > * {
114
+ display: none !important;
115
+ }
116
+
117
+ .ui-datepicker thead th {
118
+ width: auto !important;
119
+ padding: 0 !important;
120
+ color: #B3BEBF;
121
+ font-size: 14px;
122
+ font-weight: 400 !important;
123
+ }
124
+
125
+ .ui-datepicker table {
126
+ margin: 0 !important;
127
+ font-size: 14px;
128
+ }
129
+
130
+ .ui-datepicker td {
131
+ background: none;
132
+ padding: 0 !important;
133
+ }
134
+
135
+ .ui-datepicker td span,
136
+ .ui-datepicker td a {
137
+ border-radius: 8px;
138
+ border: none;
139
+ min-width: 32px;
140
+ height: 32px;
141
+ padding: 0;
142
+ margin: 1px;
143
+ color: var(--color-text) !important;
144
+ line-height: 32px;
145
+ text-align: center;
146
+ position: relative;
147
+ display: block;
148
+ }
149
+
150
+ /* обычные даты */
151
+ .ui-datepicker td a {
152
+ background: var(--datepicker-day-color);
153
+ }
154
+
155
+ .ui-datepicker td a:hover {
156
+ background: var(--datepicker-day-color-hover);
157
+ }
158
+
159
+ /* текущий день */
160
+ td.ui-datepicker-today span,
161
+ td.ui-datepicker-today a {
162
+ background: none;
163
+ position: relative;
164
+ }
165
+
166
+ /* выбранные даты */
167
+ .ui-datepicker td.selected a {
168
+ background: var(--datepicker-range-color);
169
+ padding-right: 0;
170
+ padding-left: 1px;
171
+ margin-right: 1px;
172
+ margin-left: 0;
173
+ }
174
+
175
+ .ui-datepicker td.selected a:hover {
176
+ background: var(--datepicker-range-color-hover);
177
+ }
178
+
179
+ .ui-datepicker td.selected:not(.selected-start):not(:first-child):not(.first-of-month) a {
180
+ border-top-left-radius: 0;
181
+ border-bottom-left-radius: 0;
182
+ padding-left: 1px;
183
+ margin-left: 0;
184
+ }
185
+
186
+ .ui-datepicker td.selected:not(.selected-end):not(:last-child):not(.last-of-month) a {
187
+ border-top-right-radius: 0;
188
+ border-bottom-right-radius: 0;
189
+ padding-right: 1px;
190
+ margin-right: 0;
191
+ }
192
+
193
+ .ui-datepicker td.selected-start a,
194
+ .ui-datepicker td.selected-end a,
195
+ .ui-datepicker td.ui-datepicker-current-day a {
196
+ background: var(--datepicker-selected-color);
197
+ color: #FFF !important;
198
+ }
199
+
200
+ .ui-datepicker td.selected-start a:hover,
201
+ .ui-datepicker td.selected-end a:hover,
202
+ .ui-datepicker td.ui-datepicker-current-day a:hover {
203
+ background: var(--datepicker-selected-color-hover);
204
+ }
205
+
206
+ .ui-datepicker-day-marks {
207
+ line-height: normal;
208
+ position: absolute;
209
+ right: 0;
210
+ bottom: 3px;
211
+ left: 0;
212
+ display: flex;
213
+ align-items: center;
214
+ justify-content: center;
215
+ }
216
+
217
+ .ui-datepicker-day-marks > i {
218
+ border-radius: 50%;
219
+ border: 1px solid #FFF;
220
+ width: 4px;
221
+ height: 4px;
222
+ margin: 0 2px;
223
+ }
224
+
225
+ .ui-datepicker-day-marks-exists {
226
+ background: var(--color-blue-500);
227
+ }
228
+
229
+ .ui-datepicker-day-marks-update {
230
+ background: var(--color-red-500);
231
+ }
232
+
233
+ .ui-datepicker-row-break {
234
+ display: none;
235
+ }`;
236
+ k.appendStyle(b);
237
+ const o = window, x = (e) => {
238
+ var t, n;
239
+ if (!((n = (t = o == null ? void 0 : o.jQuery) == null ? void 0 : t.ui) != null && n.datepicker)) {
240
+ console.info("Для работы datepicker требуется глобальная загрузка jQuery UI Datepicker");
241
+ return;
242
+ }
243
+ return o.jQuery.datepicker._defaults.dateFormat = k.state.dateFormat.toLowerCase().replace("m", "mm").replace("y", "yy").replace("d", "dd"), o.jQuery(e);
244
+ };
245
+ function y(e, t) {
246
+ var n;
247
+ return (n = x(e)) == null ? void 0 : n.datepicker(t);
248
+ }
249
+ let d, l, p, u;
250
+ g(m(k.state.dateFormat), () => {
251
+ var e;
252
+ d = h("2000-01-01"), l = ((e = d.match(/\D/)) == null ? void 0 : e[0]) ?? "-", p = d.replace(/\D+/g, "").length, u = [];
253
+ for (let t = 0; t < d.length; t++)
254
+ d[t] === l && u.push(t);
255
+ }, { immediate: !0 });
256
+ function F(e) {
257
+ let t = e.target.selectionEnd, n = e.target.value, r = n.substring(0, t).replace(/\D+/g, ""), i = n.substring(t).replace(/\D+/g, ""), c = r.length + i.length - p;
258
+ if (c > 0) {
259
+ r = r.substring(0, p);
260
+ const a = p - r.length;
261
+ i = i.substring(i.length - a);
262
+ } else
263
+ c < 0 && (e.inputType === "deleteContentForward" ? r += "0".repeat(-c) : i = "0".repeat(-c) + i);
264
+ t = r.length, n = r + i;
265
+ for (let a = 0; a < u.length; a++) {
266
+ const s = u[a];
267
+ n = n.substring(0, s) + l + n.substring(s), t >= s && t++;
268
+ }
269
+ e.inputType === "deleteContentBackward" && n[t - 1] === l && t--, n !== e.target.value && (e.target.value = n, e.target.selectionStart = t, e.target.selectionEnd = t);
270
+ }
271
+ export {
272
+ y as connectDatepicker,
273
+ F as oninput
274
+ };
275
+ //# sourceMappingURL=datepicker-32bc8bd9.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datepicker-32bc8bd9.es.js","sources":["../../src/components/forms/inputDate/datepicker.css?raw","../../src/components/forms/inputDate/datepicker.ts"],"sourcesContent":["export default \"/* ui-datepicker */\\n.ui-datepicker {\\n\\t--datepicker-day-color: #FFF;\\n\\t--datepicker-day-color-hover: var(--color-blue-150);\\n\\t--datepicker-selected-color: var(--color-blue-500);\\n\\t--datepicker-selected-color-hover: var(--color-blue-550);\\n\\t--datepicker-range-color: var(--color-blue-100);\\n\\t--datepicker-range-color-hover: var(--color-blue-150);\\n\\n\\tuser-select: none;\\n\\twidth: auto;\\n\\tpadding: 0;\\n}\\n\\n.ui-datepicker:before,\\n.ui-datepicker:after {\\n\\tdisplay: none;\\n}\\n\\n/* на странице */\\n.ui-datepicker-inline {\\n\\tdisplay: inline-block !important;\\n}\\n\\n/* в popup */\\n.ui-datepicker:not(.ui-datepicker-inline) {\\n\\tborder-radius: 8px;\\n\\tbackground: var(--content-background-color);\\n\\tbox-shadow: var(--top-shadow);\\n\\tz-index: 10000000 !important;\\n\\tpadding: 8px;\\n}\\n\\n.ui-datepicker a {\\n\\ttext-decoration: none !important;\\n}\\n\\n.ui-datepicker option {\\n\\tcolor: var(--color-text);\\n\\tfont-size: 14px;\\n}\\n\\n.ui-datepicker-header {\\n\\tpadding: 0 !important;\\n\\tmargin: 0 0 18px 0;\\n\\tdisplay: flex;\\n\\talign-items: center;\\n}\\n\\n.ui-datepicker-header > * {\\n\\tdisplay: flex;\\n\\talign-items: center;\\n\\tjustify-content: center;\\n}\\n\\n.ui-datepicker-title {\\n\\twidth: 100% !important;\\n\\theight: 24px;\\n\\tmargin: 0 !important;\\n}\\n\\n.ui-datepicker-month,\\n.ui-datepicker-year {\\n\\toutline: none !important;\\n\\twidth: auto !important;\\n\\tborder: none;\\n\\tpadding: 0;\\n\\tmargin: 0 6px !important;\\n\\ttext-align: center;\\n\\tfont-size: 16px !important;\\n}\\n\\n.ui-datepicker-month {\\n\\tcolor: var(--color-text);\\n}\\n\\n.ui-datepicker-year {\\n\\tcolor: var(--color-gray-300);\\n}\\n\\n/*\\tselect.ui-datepicker-month,\\nselect.ui-datepicker-year{ cursor: pointer; color: var(--color-blue-500); }*/\\nselect.ui-datepicker-month,\\nselect.ui-datepicker-year {\\n\\tcursor: pointer;\\n}\\n\\n.ui-datepicker-prev,\\n.ui-datepicker-next {\\n\\tcursor: pointer;\\n\\twidth: 24px !important;\\n\\theight: 24px !important;\\n\\tfont-size: 24px;\\n\\tfont-family: 'Topvisor-2';\\n\\tposition: static !important;\\n}\\n\\n.ui-datepicker-prev:before {\\n\\tcontent: '';\\n}\\n\\n.ui-datepicker-next {\\n\\torder: 1;\\n}\\n\\n.ui-datepicker-next:before {\\n\\tcontent: '';\\n}\\n\\n.ui-datepicker-prev > *,\\n.ui-datepicker-next > * {\\n\\tdisplay: none !important;\\n}\\n\\n.ui-datepicker thead th {\\n\\twidth: auto !important;\\n\\tpadding: 0 !important;\\n\\tcolor: #B3BEBF;\\n\\tfont-size: 14px;\\n\\tfont-weight: 400 !important;\\n}\\n\\n.ui-datepicker table {\\n\\tmargin: 0 !important;\\n\\tfont-size: 14px;\\n}\\n\\n.ui-datepicker td {\\n\\tbackground: none;\\n\\tpadding: 0 !important;\\n}\\n\\n.ui-datepicker td span,\\n.ui-datepicker td a {\\n\\tborder-radius: 8px;\\n\\tborder: none;\\n\\tmin-width: 32px;\\n\\theight: 32px;\\n\\tpadding: 0;\\n\\tmargin: 1px;\\n\\tcolor: var(--color-text) !important;\\n\\tline-height: 32px;\\n\\ttext-align: center;\\n\\tposition: relative;\\n\\tdisplay: block;\\n}\\n\\n/* обычные даты */\\n.ui-datepicker td a {\\n\\tbackground: var(--datepicker-day-color);\\n}\\n\\n.ui-datepicker td a:hover {\\n\\tbackground: var(--datepicker-day-color-hover);\\n}\\n\\n/* текущий день */\\ntd.ui-datepicker-today span,\\ntd.ui-datepicker-today a {\\n\\tbackground: none;\\n\\tposition: relative;\\n}\\n\\n/* выбранные даты */\\n.ui-datepicker td.selected a {\\n\\tbackground: var(--datepicker-range-color);\\n\\tpadding-right: 0;\\n\\tpadding-left: 1px;\\n\\tmargin-right: 1px;\\n\\tmargin-left: 0;\\n}\\n\\n.ui-datepicker td.selected a:hover {\\n\\tbackground: var(--datepicker-range-color-hover);\\n}\\n\\n.ui-datepicker td.selected:not(.selected-start):not(:first-child):not(.first-of-month) a {\\n\\tborder-top-left-radius: 0;\\n\\tborder-bottom-left-radius: 0;\\n\\tpadding-left: 1px;\\n\\tmargin-left: 0;\\n}\\n\\n.ui-datepicker td.selected:not(.selected-end):not(:last-child):not(.last-of-month) a {\\n\\tborder-top-right-radius: 0;\\n\\tborder-bottom-right-radius: 0;\\n\\tpadding-right: 1px;\\n\\tmargin-right: 0;\\n}\\n\\n.ui-datepicker td.selected-start a,\\n.ui-datepicker td.selected-end a,\\n.ui-datepicker td.ui-datepicker-current-day a {\\n\\tbackground: var(--datepicker-selected-color);\\n\\tcolor: #FFF !important;\\n}\\n\\n.ui-datepicker td.selected-start a:hover,\\n.ui-datepicker td.selected-end a:hover,\\n.ui-datepicker td.ui-datepicker-current-day a:hover {\\n\\tbackground: var(--datepicker-selected-color-hover);\\n}\\n\\n.ui-datepicker-day-marks {\\n\\tline-height: normal;\\n\\tposition: absolute;\\n\\tright: 0;\\n\\tbottom: 3px;\\n\\tleft: 0;\\n\\tdisplay: flex;\\n\\talign-items: center;\\n\\tjustify-content: center;\\n}\\n\\n.ui-datepicker-day-marks > i {\\n\\tborder-radius: 50%;\\n\\tborder: 1px solid #FFF;\\n\\twidth: 4px;\\n\\theight: 4px;\\n\\tmargin: 0 2px;\\n}\\n\\n.ui-datepicker-day-marks-exists {\\n\\tbackground: var(--color-blue-500);\\n}\\n\\n.ui-datepicker-day-marks-update {\\n\\tbackground: var(--color-red-500);\\n}\\n\\n.ui-datepicker-row-break {\\n\\tdisplay: none;\\n}\"","import { toRef, watch } from 'vue';\nimport Core from '@/core/core/core';\nimport { dateFormat } from '@/core/utils/date';\n\nimport css from '@/components/forms/inputDate/datepicker.css?raw';\n\nCore.appendStyle(css);\n\nconst _window: any = window;\n\nconst $ = (el: HTMLInputElement) => {\n\tif (!_window?.jQuery?.ui?.datepicker) {\n\t\tconsole.info('Для работы datepicker требуется глобальная загрузка jQuery UI Datepicker');\n\n\t\treturn;\n\t}\n\n\t_window.jQuery.datepicker._defaults.dateFormat = Core.state.dateFormat.toLowerCase().replace('m', 'mm').replace('y', 'yy').replace('d', 'dd');\n\n\treturn _window.jQuery(el);\n};\n\nexport function connectDatepicker(el: HTMLInputElement, options: any) {\n\treturn $(el)?.datepicker(options);\n}\n\nlet dateFormatted;\nlet delimiter: string;\nlet dateNumbersCount: number;\nlet delimitersIndexes: number[];\n\nwatch(toRef(Core.state.dateFormat), () => {\n\t// генерация отформатированной даты, извлечение из нее разделителей и их индексов\n\tdateFormatted = dateFormat('2000-01-01');\n\tdelimiter = dateFormatted.match(/\\D/)?.[0] ?? '-';\n\tdateNumbersCount = dateFormatted.replace(/\\D+/g, '').length;\n\tdelimitersIndexes = [];\n\n\tfor (let i = 0; i < dateFormatted.length; i++) {\n\t\tif (dateFormatted[i] === delimiter) {\n\t\t\tdelimitersIndexes.push(i);\n\t\t}\n\t}\n}, { immediate: true });\n\n/**\n * Автоформат при вводе в поле с датой\n */\nexport function oninput(e: any) {\n\tlet selectionPos = e.target.selectionEnd;\n\tlet value = e.target.value;\n\n\t// разбить занчение на две половины - до и после каретки\n\t// удалить все символы, кроме цифр\n\tlet valueChunkLeft = value.substring(0, selectionPos).replace(/\\D+/g, '');\n\tlet valueChunkRight = value.substring(selectionPos).replace(/\\D+/g, '');\n\n\tlet extraNumbersCount = valueChunkLeft.length + valueChunkRight.length - dateNumbersCount;\n\tif (extraNumbersCount > 0) {\n\t\t// // количество цифр больше требуемого - удалить лишние\n\t\tvalueChunkLeft = valueChunkLeft.substring(0, dateNumbersCount);\n\n\t\tconst valueChunkRightMaxLength = dateNumbersCount - valueChunkLeft.length;\n\t\tvalueChunkRight = valueChunkRight.substring(valueChunkRight.length - valueChunkRightMaxLength);\n\t} else if (extraNumbersCount < 0) {\n\t\t// количество цифр меньше требуемого - добавить 0\n\t\tif (e.inputType === 'deleteContentForward') {\n\t\t\t// нажатие на delete - добавить к левой части для правильного позиционирования каретки\n\t\t\tvalueChunkLeft += '0'.repeat(-extraNumbersCount);\n\t\t} else {\n\t\t\tvalueChunkRight = '0'.repeat(-extraNumbersCount) + valueChunkRight;\n\t\t}\n\t}\n\n\tselectionPos = valueChunkLeft.length;\n\tvalue = valueChunkLeft + valueChunkRight;\n\n\t// вставить разделители\n\tfor (let i = 0; i < delimitersIndexes.length; i++) {\n\t\tconst delimiterIndex = delimitersIndexes[i];\n\n\t\tvalue = value.substring(0, delimiterIndex) + delimiter + value.substring(delimiterIndex);\n\n\t\t// сдвинуть каретку, если разделитель вставлен левее ее\n\t\tif (selectionPos >= delimiterIndex) {\n\t\t\tselectionPos++;\n\t\t}\n\t}\n\n\t// нажатие на backspace - если слева символ разделителя, перенести каретку за него\n\tif (e.inputType === 'deleteContentBackward' && value[selectionPos - 1] === delimiter) {\n\t\tselectionPos--;\n\t}\n\n\t// если значение изменилось - вставить его и переместить каретку\n\tif (value !== e.target.value) {\n\t\te.target.value = value;\n\t\te.target.selectionStart = selectionPos;\n\t\te.target.selectionEnd = selectionPos;\n\t}\n}"],"names":["css","Core","_window","$","el","_b","_a","connectDatepicker","options","dateFormatted","delimiter","dateNumbersCount","delimitersIndexes","watch","toRef","dateFormat","i","oninput","selectionPos","value","valueChunkLeft","valueChunkRight","extraNumbersCount","valueChunkRightMaxLength","delimiterIndex"],"mappings":";;AAAA,MAAeA,IAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACMfC,EAAK,YAAYD,CAAG;AAEpB,MAAME,IAAe,QAEfC,IAAI,CAACC,MAAyB;;AACnC,MAAI,GAACC,KAAAC,IAAAJ,KAAA,gBAAAA,EAAS,WAAT,gBAAAI,EAAiB,OAAjB,QAAAD,EAAqB,aAAY;AACrC,YAAQ,KAAK,0EAA0E;AAEvF;AAAA,EACD;AAEA,SAAAH,EAAQ,OAAO,WAAW,UAAU,aAAaD,EAAK,MAAM,WAAW,YAAY,EAAE,QAAQ,KAAK,IAAI,EAAE,QAAQ,KAAK,IAAI,EAAE,QAAQ,KAAK,IAAI,GAErIC,EAAQ,OAAOE,CAAE;AACzB;AAEgB,SAAAG,EAAkBH,GAAsBI,GAAc;;AACrE,UAAOF,IAAAH,EAAEC,CAAE,MAAJ,gBAAAE,EAAO,WAAWE;AAC1B;AAEA,IAAIC,GACAC,GACAC,GACAC;AAEJC,EAAMC,EAAMb,EAAK,MAAM,UAAU,GAAG,MAAM;;AAEzC,EAAAQ,IAAgBM,EAAW,YAAY,GACvCL,MAAYJ,IAAAG,EAAc,MAAM,IAAI,MAAxB,gBAAAH,EAA4B,OAAM,KAC9CK,IAAmBF,EAAc,QAAQ,QAAQ,EAAE,EAAE,QACrDG,IAAoB,CAAA;AAEpB,WAASI,IAAI,GAAGA,IAAIP,EAAc,QAAQO;AACrC,IAAAP,EAAcO,CAAC,MAAMN,KACxBE,EAAkB,KAAKI,CAAC;AAG3B,GAAG,EAAE,WAAW,GAAA,CAAM;AAKf,SAASC,EAAQ,GAAQ;AAC3B,MAAAC,IAAe,EAAE,OAAO,cACxBC,IAAQ,EAAE,OAAO,OAIjBC,IAAiBD,EAAM,UAAU,GAAGD,CAAY,EAAE,QAAQ,QAAQ,EAAE,GACpEG,IAAkBF,EAAM,UAAUD,CAAY,EAAE,QAAQ,QAAQ,EAAE,GAElEI,IAAoBF,EAAe,SAASC,EAAgB,SAASV;AACzE,MAAIW,IAAoB,GAAG;AAET,IAAAF,IAAAA,EAAe,UAAU,GAAGT,CAAgB;AAEvD,UAAAY,IAA2BZ,IAAmBS,EAAe;AACnE,IAAAC,IAAkBA,EAAgB,UAAUA,EAAgB,SAASE,CAAwB;AAAA,EAAA;AAC9F,IAAWD,IAAoB,MAE1B,EAAE,cAAc,yBAEDF,KAAA,IAAI,OAAO,CAACE,CAAiB,IAE/CD,IAAkB,IAAI,OAAO,CAACC,CAAiB,IAAID;AAIrD,EAAAH,IAAeE,EAAe,QAC9BD,IAAQC,IAAiBC;AAGzB,WAASL,IAAI,GAAGA,IAAIJ,EAAkB,QAAQI,KAAK;AAC5C,UAAAQ,IAAiBZ,EAAkBI,CAAC;AAElC,IAAAG,IAAAA,EAAM,UAAU,GAAGK,CAAc,IAAId,IAAYS,EAAM,UAAUK,CAAc,GAGnFN,KAAgBM,KACnBN;AAAA,EAEF;AAGA,EAAI,EAAE,cAAc,2BAA2BC,EAAMD,IAAe,CAAC,MAAMR,KAC1EQ,KAIGC,MAAU,EAAE,OAAO,UACtB,EAAE,OAAO,QAAQA,GACjB,EAAE,OAAO,iBAAiBD,GAC1B,EAAE,OAAO,eAAeA;AAE1B;"}
@@ -0,0 +1,234 @@
1
+ define(["require","exports","vue","./forms-30d68077.amd"],function(x,g,p,c){"use strict";if(typeof p>"u")var p=window.Vue;const m=`/* ui-datepicker */
2
+ .ui-datepicker {
3
+ --datepicker-day-color: #FFF;
4
+ --datepicker-day-color-hover: var(--color-blue-150);
5
+ --datepicker-selected-color: var(--color-blue-500);
6
+ --datepicker-selected-color-hover: var(--color-blue-550);
7
+ --datepicker-range-color: var(--color-blue-100);
8
+ --datepicker-range-color-hover: var(--color-blue-150);
9
+
10
+ user-select: none;
11
+ width: auto;
12
+ padding: 0;
13
+ }
14
+
15
+ .ui-datepicker:before,
16
+ .ui-datepicker:after {
17
+ display: none;
18
+ }
19
+
20
+ /* на странице */
21
+ .ui-datepicker-inline {
22
+ display: inline-block !important;
23
+ }
24
+
25
+ /* в popup */
26
+ .ui-datepicker:not(.ui-datepicker-inline) {
27
+ border-radius: 8px;
28
+ background: var(--content-background-color);
29
+ box-shadow: var(--top-shadow);
30
+ z-index: 10000000 !important;
31
+ padding: 8px;
32
+ }
33
+
34
+ .ui-datepicker a {
35
+ text-decoration: none !important;
36
+ }
37
+
38
+ .ui-datepicker option {
39
+ color: var(--color-text);
40
+ font-size: 14px;
41
+ }
42
+
43
+ .ui-datepicker-header {
44
+ padding: 0 !important;
45
+ margin: 0 0 18px 0;
46
+ display: flex;
47
+ align-items: center;
48
+ }
49
+
50
+ .ui-datepicker-header > * {
51
+ display: flex;
52
+ align-items: center;
53
+ justify-content: center;
54
+ }
55
+
56
+ .ui-datepicker-title {
57
+ width: 100% !important;
58
+ height: 24px;
59
+ margin: 0 !important;
60
+ }
61
+
62
+ .ui-datepicker-month,
63
+ .ui-datepicker-year {
64
+ outline: none !important;
65
+ width: auto !important;
66
+ border: none;
67
+ padding: 0;
68
+ margin: 0 6px !important;
69
+ text-align: center;
70
+ font-size: 16px !important;
71
+ }
72
+
73
+ .ui-datepicker-month {
74
+ color: var(--color-text);
75
+ }
76
+
77
+ .ui-datepicker-year {
78
+ color: var(--color-gray-300);
79
+ }
80
+
81
+ /* select.ui-datepicker-month,
82
+ select.ui-datepicker-year{ cursor: pointer; color: var(--color-blue-500); }*/
83
+ select.ui-datepicker-month,
84
+ select.ui-datepicker-year {
85
+ cursor: pointer;
86
+ }
87
+
88
+ .ui-datepicker-prev,
89
+ .ui-datepicker-next {
90
+ cursor: pointer;
91
+ width: 24px !important;
92
+ height: 24px !important;
93
+ font-size: 24px;
94
+ font-family: 'Topvisor-2';
95
+ position: static !important;
96
+ }
97
+
98
+ .ui-datepicker-prev:before {
99
+ content: '';
100
+ }
101
+
102
+ .ui-datepicker-next {
103
+ order: 1;
104
+ }
105
+
106
+ .ui-datepicker-next:before {
107
+ content: '';
108
+ }
109
+
110
+ .ui-datepicker-prev > *,
111
+ .ui-datepicker-next > * {
112
+ display: none !important;
113
+ }
114
+
115
+ .ui-datepicker thead th {
116
+ width: auto !important;
117
+ padding: 0 !important;
118
+ color: #B3BEBF;
119
+ font-size: 14px;
120
+ font-weight: 400 !important;
121
+ }
122
+
123
+ .ui-datepicker table {
124
+ margin: 0 !important;
125
+ font-size: 14px;
126
+ }
127
+
128
+ .ui-datepicker td {
129
+ background: none;
130
+ padding: 0 !important;
131
+ }
132
+
133
+ .ui-datepicker td span,
134
+ .ui-datepicker td a {
135
+ border-radius: 8px;
136
+ border: none;
137
+ min-width: 32px;
138
+ height: 32px;
139
+ padding: 0;
140
+ margin: 1px;
141
+ color: var(--color-text) !important;
142
+ line-height: 32px;
143
+ text-align: center;
144
+ position: relative;
145
+ display: block;
146
+ }
147
+
148
+ /* обычные даты */
149
+ .ui-datepicker td a {
150
+ background: var(--datepicker-day-color);
151
+ }
152
+
153
+ .ui-datepicker td a:hover {
154
+ background: var(--datepicker-day-color-hover);
155
+ }
156
+
157
+ /* текущий день */
158
+ td.ui-datepicker-today span,
159
+ td.ui-datepicker-today a {
160
+ background: none;
161
+ position: relative;
162
+ }
163
+
164
+ /* выбранные даты */
165
+ .ui-datepicker td.selected a {
166
+ background: var(--datepicker-range-color);
167
+ padding-right: 0;
168
+ padding-left: 1px;
169
+ margin-right: 1px;
170
+ margin-left: 0;
171
+ }
172
+
173
+ .ui-datepicker td.selected a:hover {
174
+ background: var(--datepicker-range-color-hover);
175
+ }
176
+
177
+ .ui-datepicker td.selected:not(.selected-start):not(:first-child):not(.first-of-month) a {
178
+ border-top-left-radius: 0;
179
+ border-bottom-left-radius: 0;
180
+ padding-left: 1px;
181
+ margin-left: 0;
182
+ }
183
+
184
+ .ui-datepicker td.selected:not(.selected-end):not(:last-child):not(.last-of-month) a {
185
+ border-top-right-radius: 0;
186
+ border-bottom-right-radius: 0;
187
+ padding-right: 1px;
188
+ margin-right: 0;
189
+ }
190
+
191
+ .ui-datepicker td.selected-start a,
192
+ .ui-datepicker td.selected-end a,
193
+ .ui-datepicker td.ui-datepicker-current-day a {
194
+ background: var(--datepicker-selected-color);
195
+ color: #FFF !important;
196
+ }
197
+
198
+ .ui-datepicker td.selected-start a:hover,
199
+ .ui-datepicker td.selected-end a:hover,
200
+ .ui-datepicker td.ui-datepicker-current-day a:hover {
201
+ background: var(--datepicker-selected-color-hover);
202
+ }
203
+
204
+ .ui-datepicker-day-marks {
205
+ line-height: normal;
206
+ position: absolute;
207
+ right: 0;
208
+ bottom: 3px;
209
+ left: 0;
210
+ display: flex;
211
+ align-items: center;
212
+ justify-content: center;
213
+ }
214
+
215
+ .ui-datepicker-day-marks > i {
216
+ border-radius: 50%;
217
+ border: 1px solid #FFF;
218
+ width: 4px;
219
+ height: 4px;
220
+ margin: 0 2px;
221
+ }
222
+
223
+ .ui-datepicker-day-marks-exists {
224
+ background: var(--color-blue-500);
225
+ }
226
+
227
+ .ui-datepicker-day-marks-update {
228
+ background: var(--color-red-500);
229
+ }
230
+
231
+ .ui-datepicker-row-break {
232
+ display: none;
233
+ }`;c.Core.appendStyle(m);const a=window,b=e=>{var t,n;if(!((n=(t=a==null?void 0:a.jQuery)==null?void 0:t.ui)!=null&&n.datepicker)){console.info("Для работы datepicker требуется глобальная загрузка jQuery UI Datepicker");return}return a.jQuery.datepicker._defaults.dateFormat=c.Core.state.dateFormat.toLowerCase().replace("m","mm").replace("y","yy").replace("d","dd"),a.jQuery(e)};function v(e,t){var n;return(n=b(e))==null?void 0:n.datepicker(t)}let o,l,u,s;p.watch(p.toRef(c.Core.state.dateFormat),()=>{var e;o=c.dateFormat("2000-01-01"),l=((e=o.match(/\D/))==null?void 0:e[0])??"-",u=o.replace(/\D+/g,"").length,s=[];for(let t=0;t<o.length;t++)o[t]===l&&s.push(t)},{immediate:!0});function f(e){let t=e.target.selectionEnd,n=e.target.value,r=n.substring(0,t).replace(/\D+/g,""),i=n.substring(t).replace(/\D+/g,""),k=r.length+i.length-u;if(k>0){r=r.substring(0,u);const d=u-r.length;i=i.substring(i.length-d)}else k<0&&(e.inputType==="deleteContentForward"?r+="0".repeat(-k):i="0".repeat(-k)+i);t=r.length,n=r+i;for(let d=0;d<s.length;d++){const h=s[d];n=n.substring(0,h)+l+n.substring(h),t>=h&&t++}e.inputType==="deleteContentBackward"&&n[t-1]===l&&t--,n!==e.target.value&&(e.target.value=n,e.target.selectionStart=t,e.target.selectionEnd=t)}g.connectDatepicker=v,g.oninput=f,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})});
234
+ //# sourceMappingURL=datepicker-8a42d8a6.amd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datepicker-8a42d8a6.amd.js","sources":["../../src/components/forms/inputDate/datepicker.css?raw","../../src/components/forms/inputDate/datepicker.ts"],"sourcesContent":["export default \"/* ui-datepicker */\\n.ui-datepicker {\\n\\t--datepicker-day-color: #FFF;\\n\\t--datepicker-day-color-hover: var(--color-blue-150);\\n\\t--datepicker-selected-color: var(--color-blue-500);\\n\\t--datepicker-selected-color-hover: var(--color-blue-550);\\n\\t--datepicker-range-color: var(--color-blue-100);\\n\\t--datepicker-range-color-hover: var(--color-blue-150);\\n\\n\\tuser-select: none;\\n\\twidth: auto;\\n\\tpadding: 0;\\n}\\n\\n.ui-datepicker:before,\\n.ui-datepicker:after {\\n\\tdisplay: none;\\n}\\n\\n/* на странице */\\n.ui-datepicker-inline {\\n\\tdisplay: inline-block !important;\\n}\\n\\n/* в popup */\\n.ui-datepicker:not(.ui-datepicker-inline) {\\n\\tborder-radius: 8px;\\n\\tbackground: var(--content-background-color);\\n\\tbox-shadow: var(--top-shadow);\\n\\tz-index: 10000000 !important;\\n\\tpadding: 8px;\\n}\\n\\n.ui-datepicker a {\\n\\ttext-decoration: none !important;\\n}\\n\\n.ui-datepicker option {\\n\\tcolor: var(--color-text);\\n\\tfont-size: 14px;\\n}\\n\\n.ui-datepicker-header {\\n\\tpadding: 0 !important;\\n\\tmargin: 0 0 18px 0;\\n\\tdisplay: flex;\\n\\talign-items: center;\\n}\\n\\n.ui-datepicker-header > * {\\n\\tdisplay: flex;\\n\\talign-items: center;\\n\\tjustify-content: center;\\n}\\n\\n.ui-datepicker-title {\\n\\twidth: 100% !important;\\n\\theight: 24px;\\n\\tmargin: 0 !important;\\n}\\n\\n.ui-datepicker-month,\\n.ui-datepicker-year {\\n\\toutline: none !important;\\n\\twidth: auto !important;\\n\\tborder: none;\\n\\tpadding: 0;\\n\\tmargin: 0 6px !important;\\n\\ttext-align: center;\\n\\tfont-size: 16px !important;\\n}\\n\\n.ui-datepicker-month {\\n\\tcolor: var(--color-text);\\n}\\n\\n.ui-datepicker-year {\\n\\tcolor: var(--color-gray-300);\\n}\\n\\n/*\\tselect.ui-datepicker-month,\\nselect.ui-datepicker-year{ cursor: pointer; color: var(--color-blue-500); }*/\\nselect.ui-datepicker-month,\\nselect.ui-datepicker-year {\\n\\tcursor: pointer;\\n}\\n\\n.ui-datepicker-prev,\\n.ui-datepicker-next {\\n\\tcursor: pointer;\\n\\twidth: 24px !important;\\n\\theight: 24px !important;\\n\\tfont-size: 24px;\\n\\tfont-family: 'Topvisor-2';\\n\\tposition: static !important;\\n}\\n\\n.ui-datepicker-prev:before {\\n\\tcontent: '';\\n}\\n\\n.ui-datepicker-next {\\n\\torder: 1;\\n}\\n\\n.ui-datepicker-next:before {\\n\\tcontent: '';\\n}\\n\\n.ui-datepicker-prev > *,\\n.ui-datepicker-next > * {\\n\\tdisplay: none !important;\\n}\\n\\n.ui-datepicker thead th {\\n\\twidth: auto !important;\\n\\tpadding: 0 !important;\\n\\tcolor: #B3BEBF;\\n\\tfont-size: 14px;\\n\\tfont-weight: 400 !important;\\n}\\n\\n.ui-datepicker table {\\n\\tmargin: 0 !important;\\n\\tfont-size: 14px;\\n}\\n\\n.ui-datepicker td {\\n\\tbackground: none;\\n\\tpadding: 0 !important;\\n}\\n\\n.ui-datepicker td span,\\n.ui-datepicker td a {\\n\\tborder-radius: 8px;\\n\\tborder: none;\\n\\tmin-width: 32px;\\n\\theight: 32px;\\n\\tpadding: 0;\\n\\tmargin: 1px;\\n\\tcolor: var(--color-text) !important;\\n\\tline-height: 32px;\\n\\ttext-align: center;\\n\\tposition: relative;\\n\\tdisplay: block;\\n}\\n\\n/* обычные даты */\\n.ui-datepicker td a {\\n\\tbackground: var(--datepicker-day-color);\\n}\\n\\n.ui-datepicker td a:hover {\\n\\tbackground: var(--datepicker-day-color-hover);\\n}\\n\\n/* текущий день */\\ntd.ui-datepicker-today span,\\ntd.ui-datepicker-today a {\\n\\tbackground: none;\\n\\tposition: relative;\\n}\\n\\n/* выбранные даты */\\n.ui-datepicker td.selected a {\\n\\tbackground: var(--datepicker-range-color);\\n\\tpadding-right: 0;\\n\\tpadding-left: 1px;\\n\\tmargin-right: 1px;\\n\\tmargin-left: 0;\\n}\\n\\n.ui-datepicker td.selected a:hover {\\n\\tbackground: var(--datepicker-range-color-hover);\\n}\\n\\n.ui-datepicker td.selected:not(.selected-start):not(:first-child):not(.first-of-month) a {\\n\\tborder-top-left-radius: 0;\\n\\tborder-bottom-left-radius: 0;\\n\\tpadding-left: 1px;\\n\\tmargin-left: 0;\\n}\\n\\n.ui-datepicker td.selected:not(.selected-end):not(:last-child):not(.last-of-month) a {\\n\\tborder-top-right-radius: 0;\\n\\tborder-bottom-right-radius: 0;\\n\\tpadding-right: 1px;\\n\\tmargin-right: 0;\\n}\\n\\n.ui-datepicker td.selected-start a,\\n.ui-datepicker td.selected-end a,\\n.ui-datepicker td.ui-datepicker-current-day a {\\n\\tbackground: var(--datepicker-selected-color);\\n\\tcolor: #FFF !important;\\n}\\n\\n.ui-datepicker td.selected-start a:hover,\\n.ui-datepicker td.selected-end a:hover,\\n.ui-datepicker td.ui-datepicker-current-day a:hover {\\n\\tbackground: var(--datepicker-selected-color-hover);\\n}\\n\\n.ui-datepicker-day-marks {\\n\\tline-height: normal;\\n\\tposition: absolute;\\n\\tright: 0;\\n\\tbottom: 3px;\\n\\tleft: 0;\\n\\tdisplay: flex;\\n\\talign-items: center;\\n\\tjustify-content: center;\\n}\\n\\n.ui-datepicker-day-marks > i {\\n\\tborder-radius: 50%;\\n\\tborder: 1px solid #FFF;\\n\\twidth: 4px;\\n\\theight: 4px;\\n\\tmargin: 0 2px;\\n}\\n\\n.ui-datepicker-day-marks-exists {\\n\\tbackground: var(--color-blue-500);\\n}\\n\\n.ui-datepicker-day-marks-update {\\n\\tbackground: var(--color-red-500);\\n}\\n\\n.ui-datepicker-row-break {\\n\\tdisplay: none;\\n}\"","import { toRef, watch } from 'vue';\nimport Core from '@/core/core/core';\nimport { dateFormat } from '@/core/utils/date';\n\nimport css from '@/components/forms/inputDate/datepicker.css?raw';\n\nCore.appendStyle(css);\n\nconst _window: any = window;\n\nconst $ = (el: HTMLInputElement) => {\n\tif (!_window?.jQuery?.ui?.datepicker) {\n\t\tconsole.info('Для работы datepicker требуется глобальная загрузка jQuery UI Datepicker');\n\n\t\treturn;\n\t}\n\n\t_window.jQuery.datepicker._defaults.dateFormat = Core.state.dateFormat.toLowerCase().replace('m', 'mm').replace('y', 'yy').replace('d', 'dd');\n\n\treturn _window.jQuery(el);\n};\n\nexport function connectDatepicker(el: HTMLInputElement, options: any) {\n\treturn $(el)?.datepicker(options);\n}\n\nlet dateFormatted;\nlet delimiter: string;\nlet dateNumbersCount: number;\nlet delimitersIndexes: number[];\n\nwatch(toRef(Core.state.dateFormat), () => {\n\t// генерация отформатированной даты, извлечение из нее разделителей и их индексов\n\tdateFormatted = dateFormat('2000-01-01');\n\tdelimiter = dateFormatted.match(/\\D/)?.[0] ?? '-';\n\tdateNumbersCount = dateFormatted.replace(/\\D+/g, '').length;\n\tdelimitersIndexes = [];\n\n\tfor (let i = 0; i < dateFormatted.length; i++) {\n\t\tif (dateFormatted[i] === delimiter) {\n\t\t\tdelimitersIndexes.push(i);\n\t\t}\n\t}\n}, { immediate: true });\n\n/**\n * Автоформат при вводе в поле с датой\n */\nexport function oninput(e: any) {\n\tlet selectionPos = e.target.selectionEnd;\n\tlet value = e.target.value;\n\n\t// разбить занчение на две половины - до и после каретки\n\t// удалить все символы, кроме цифр\n\tlet valueChunkLeft = value.substring(0, selectionPos).replace(/\\D+/g, '');\n\tlet valueChunkRight = value.substring(selectionPos).replace(/\\D+/g, '');\n\n\tlet extraNumbersCount = valueChunkLeft.length + valueChunkRight.length - dateNumbersCount;\n\tif (extraNumbersCount > 0) {\n\t\t// // количество цифр больше требуемого - удалить лишние\n\t\tvalueChunkLeft = valueChunkLeft.substring(0, dateNumbersCount);\n\n\t\tconst valueChunkRightMaxLength = dateNumbersCount - valueChunkLeft.length;\n\t\tvalueChunkRight = valueChunkRight.substring(valueChunkRight.length - valueChunkRightMaxLength);\n\t} else if (extraNumbersCount < 0) {\n\t\t// количество цифр меньше требуемого - добавить 0\n\t\tif (e.inputType === 'deleteContentForward') {\n\t\t\t// нажатие на delete - добавить к левой части для правильного позиционирования каретки\n\t\t\tvalueChunkLeft += '0'.repeat(-extraNumbersCount);\n\t\t} else {\n\t\t\tvalueChunkRight = '0'.repeat(-extraNumbersCount) + valueChunkRight;\n\t\t}\n\t}\n\n\tselectionPos = valueChunkLeft.length;\n\tvalue = valueChunkLeft + valueChunkRight;\n\n\t// вставить разделители\n\tfor (let i = 0; i < delimitersIndexes.length; i++) {\n\t\tconst delimiterIndex = delimitersIndexes[i];\n\n\t\tvalue = value.substring(0, delimiterIndex) + delimiter + value.substring(delimiterIndex);\n\n\t\t// сдвинуть каретку, если разделитель вставлен левее ее\n\t\tif (selectionPos >= delimiterIndex) {\n\t\t\tselectionPos++;\n\t\t}\n\t}\n\n\t// нажатие на backspace - если слева символ разделителя, перенести каретку за него\n\tif (e.inputType === 'deleteContentBackward' && value[selectionPos - 1] === delimiter) {\n\t\tselectionPos--;\n\t}\n\n\t// если значение изменилось - вставить его и переместить каретку\n\tif (value !== e.target.value) {\n\t\te.target.value = value;\n\t\te.target.selectionStart = selectionPos;\n\t\te.target.selectionEnd = selectionPos;\n\t}\n}"],"names":["css","Core","$","el","_window","forms","connectDatepicker","options","dateFormatted","delimiter","dateNumbersCount","delimitersIndexes","watch","_a","i","valueChunkLeft","value","selectionPos","valueChunkRight","extraNumbersCount","valueChunkRightMaxLength","delimiterIndex"],"mappings":"0HAAA,MAAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GCMAC,EAAAA,KAAAA,YAAAA,CAAAA,iBAIAC,EAAAC,GAAA,sFAEE,QAAA,KAAA,0EAAA,EAEA,OAGD,OAAAC,EAAA,OAAA,WAAA,UAAA,WAAAC,EAAA,KAAA,MAAA,WAAA,YAAA,EAAA,QAAA,IAAA,IAAA,EAAA,QAAA,IAAA,IAAA,EAAA,QAAA,IAAA,IAAA,EAEAD,EAAA,OAAAD,CAAA,CACD,EAEgB,SAAAG,EAAAH,EAAAI,EAAA,mDAIhB,IAAAC,EACAC,EACAC,EACAC,EAEAC,EAAAA,MAAAA,EAAAA,MAAAA,EAAAA,KAAAA,MAAAA,UAAAA,EAAAA,IAAAA,OAECJ,EAAAH,EAAA,WAAA,YAAA,EACAI,IAAAI,EAAAL,EAAA,MAAA,IAAA,IAAA,YAAAK,EAAA,KAAA,IACAH,EAAAF,EAAA,QAAA,OAAA,EAAA,EAAA,YAGA,QAAAM,EAAA,EAAAA,EAAAN,EAAA,OAAAM,IACCN,EAAAM,CAAA,IAAAL,GACCE,EAAA,KAAAG,CAAA,CAGH,EAAA,CAAA,UAAA,EAAA,CAAA,6DAWCC,EAAAC,EAAA,UAAA,EAAAC,CAAA,EAAA,QAAA,OAAA,EAAA,EACAC,EAAAF,EAAA,UAAAC,CAAA,EAAA,QAAA,OAAA,EAAA,EAEAE,EAAAJ,EAAA,OAAAG,EAAA,OAAAR,EACA,GAAAS,EAAA,EAAA,uCAKCD,EAAAA,EAAA,UAAAA,EAAA,OAAAE,CAAA,CAA6F,MAAAD,EAAA,IAG7F,EAAA,YAAA,6DAQDF,EAAAF,EAAA,OACAC,EAAAD,EAAAG,EAGA,QAAAJ,EAAA,EAAAA,EAAAH,EAAA,OAAAG,IAAA,CACC,MAAAO,EAAAV,EAAAG,CAAA,EAEAE,EAAAA,EAAA,UAAA,EAAAK,CAAA,EAAAZ,EAAAO,EAAA,UAAAK,CAAA,EAGAJ,GAAAI,OAMD,EAAA,YAAA,yBAAAL,EAAAC,EAAA,CAAA,IAAAR,4BAMC,EAAA,OAAA,MAAAO,EACA,EAAA,OAAA,eAAAC,EACA,EAAA,OAAA,aAAAA,EAEF"}
@@ -0,0 +1,3 @@
1
+ define(["require","exports","vue"],function(M,m,e){var U,j;"use strict";M(["../core/core.amd"],n=>{const t=["../assets/forms.css"].map(s=>M.toUrl(s));n.Page.addCss(t)});function L(){return"devicePixelRatio"in window&&window.devicePixelRatio>1}function N(){return!!navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|IEMobile|Opera Mini/i)}function R(){return navigator.userAgent.indexOf("Topvisor_App")!=-1}function T(){return navigator.userAgent.indexOf("Mac OS X")!==-1}function Y(){const n=/Chrome|Android/.test(navigator.userAgent);let t=/Safari/.test(navigator.userAgent);return n&&t&&(t=!1),t}function q(){return T()?"⌘":"Ctrl"}function K(n,t,...s){const i=document.createElement(n);for(const a in t)a.indexOf("on")===0?i[a]=t[a]:i.setAttribute(a,t[a]);return s.forEach(a=>{typeof a=="string"?i.insertAdjacentHTML("beforeend",a):i.append(a)}),i}function k(n){if(!n)return!1;const t=n.getBoundingClientRect();return!!(t.width||t.height)}function G(n){const t=n.getBoundingClientRect();return{top:t.top+window.scrollY,left:t.left+window.scrollX}}function Q(n,t){return window.getComputedStyle(n).getPropertyValue(t)}function X(n,t){const s=document.createElement(t);return n.after(s),s.append(n),s}function J(n,t){return w(n,t).find(k)||null}function Z(n,t){return w(n,t).findLast(k)||null}function v(n,t){return w(n,t).filter(k)}function w(n,t){return n?[...n.querySelectorAll(t)]:[]}function x(n,t="common",s=void 0){if(n)return n.topData||(n.topData={}),s&&(n.topData[t]=s),s===null&&delete n.topData[t],n.topData[t]}function ee(n){n&&delete n.topData}const F={genEl:K,isVisible:k,offset:G,css:Q,wrap:X,querySelectorVisible:J,querySelectorVisibleLast:Z,querySelectorAllVisible:v,querySelectorAllArray:w,storage:x,storageClear:ee};class V{static addCss(t,s={}){const i=new Map;i.set("::",[]),t.forEach(a=>{let o=!1,r=!1;a.match(/\.m\./)&&(o=!0),a.match(/\.pc\./)&&(r=!0);const d=`${o}:${r}`;i.has(d)||i.set(`${o}:${r}`,[]),i.get(`${o}:${r}`).push(a)}),i.forEach((a,o)=>{if(!a.length)return;const[r,d]=o.split(":").map(f=>f==="true");let l="all";r&&(l="(max-width: 900px)"),d&&(l="(min-width: 900px)"),s.media=l,V._addCss(a,s)})}static _addCss(t,s){t.forEach(i=>{if(s.id??="topCSSLink-"+i.replace(/\W/g,"-"),window[s.id])return;s.rel="stylesheet",s.href=i;const a=F.genEl("link",s);document.head.append(a)})}}const te=100;let A;const S=new Map,$={width:window.innerWidth,height:window.innerHeight};function oe(n){S.set(n,n)}function ne(n){S.delete(n)}function ae(n){clearTimeout(A),A=setTimeout(function(){n.topEvent={widthDiff:$.width-window.innerWidth,hightDiff:$.height-window.innerHeight},$.width=window.innerWidth,$.height=window.innerHeight,S.forEach(t=>t(n))},te)}window.addEventListener("resize",ae);const P={addOnReize:oe,removeOnResize:ne},se={widthForMobile:900,dateFormat:"Y-m-d",gmt:(U=new Date().toString().match(/GMT(\S+)/))==null?void 0:U[1]},ie={isMobile:!1,isMobileUA:!1,isRetina:!1,isApp:!1,isLandscape:!0,isPortrait:!1,size:0,dateFormat:"Y-m-d",gmt:(j=new Date().toString().match(/GMT(\S+)/))==null?void 0:j[1]},_=window,C=n=>{var t,s;if(!((s=(t=_==null?void 0:_.jQuery)==null?void 0:t.ui)!=null&&s.tooltip)){console.info("Для работы v-top-tooltip требуется глобальная загрузка jQuery UI Tooltip");return}return _.jQuery(n)},O=(n,t)=>{var i;const s=n.value??{};return s.content??=(i=t.props)==null?void 0:i.title,s.content=String(s.content).replace(/\r\n|\r|\n/g,"<br>"),s.position??={my:"bottom-18px",at:"top center"},s},le={mounted(n,t,s){var i;(i=C(n))==null||i.tooltip(O(t,s))},updated(n,t,s,i){var r;const a=O(t,s),o=(r=C(n))==null?void 0:r.tooltip("instance");o&&(o.options={...o.options,...a})},unmounted(n,t,s){var i;(i=C(n))==null||i.tooltip("destroy")}},E=window;class p{static L=e.reactive({Not_date:"Not date"});static page=(E==null?void 0:E.page)||{};static Page=V;static options=se;static state=e.reactive({...ie});static matchMediaIsMobile;static appendStyle(t,s=""){let i="all";s==="m"&&(i="(max-width: "+this.options.widthForMobile+"px)"),s==="pc"&&(i="(min-width: "+this.options.widthForMobile+"px)");const a=document.createElement("style");a.innerHTML=t,a.media=i,document.head.append(a)}static install(t,s){p.defineOptions(s),t.provide("top-core",p),this.installDirectives(t)}static installDirectives(t){t.directive("top-tooltip",le)}static defineOptions(t){t!=null&&t.widthForMobile&&(this.options.widthForMobile=t.widthForMobile),t!=null&&t.dateFormat&&(this.options.dateFormat=t.dateFormat),t!=null&&t.gmt&&(this.options.gmt=t.gmt),p.setState()}static setState(){p.matchMediaIsMobile=window.matchMedia(`(max-width: ${p.options.widthForMobile}px)`),p.state.isMobileUA=N(),p.state.isRetina=L(),p.state.isApp=R(),p.state.dateFormat=this.options.dateFormat,p.state.gmt=this.options.gmt,p.setStateByWindowSize(),P.addOnReize(p.onResize),p.onResize(),p.saveToCookie()}static onResize(){p.setStateByWindowSize(),document.documentElement.style.setProperty("--100vh",window.innerHeight+"px")}static setStateByWindowSize(){var t;p.state.isMobile=!!((t=p.matchMediaIsMobile)!=null&&t.matches),p.state.isLandscape=window.innerWidth>window.innerHeight,p.state.isPortrait=!p.state.isLandscape,p.state.size=window.innerWidth>window.innerHeight?window.innerWidth:window.innerHeight,p.saveToCookie()}static saveToCookie(){const t=[1,window.innerWidth,window.innerHeight,window.devicePixelRatio,Number(p.state.isMobile),Number(p.state.isRetina)];document.cookie="device="+t.join(",")+"; path=/;"}}function re(n){return n.indexOf("T")===-1&&(n.length==10&&(n+=" 00:00:00"),n=n.replace(" ","T")+p.state.gmt),new Date(n)}function W(n,t=!0,s=0){let i;n!=null?i=new Date(n):i=new Date;const a=i.getFullYear(),o=String(i.getMonth()+1).padStart(2,"0"),r=i.getDate().toString().padStart(2,"0"),d=i.getHours().toString().padStart(2,"0"),l=i.getMinutes().toString().padStart(2,"0"),f=i.getSeconds().toString().padStart(2,"0");return i=a+"-"+o+"-"+r,s&&(i+=" "),s>=1&&(i+=d),s>=2&&(i+=":"+l),s>=3&&(i+=":"+f),t&&(i=y(i,s)),i}function y(n,t=2,s=p.L.Not_date){if((!n||n.substring(0,10)==="0000-00-00")&&s&&s!=="0000-00-00")return s;const i=p.state.dateFormat.toLowerCase();let a=n.substring(0,10);a.length===7&&(a+="-01"),a+=" 00:00",a=a.replace(/-/g,"/");const o=new Date(a);if(isNaN(Number(o)))return s;let r=i.replace("y",String(o.getFullYear()).padStart(2,"0")).replace("m",String(o.getMonth()+1).padStart(2,"0")).replace("d",String(o.getDate()).padStart(2,"0"));if(n.length>10)switch(t){case 1:r+=" "+n.substring(11,13);break;case 2:r+=" "+n.substring(11,16);break;case 3:r+=" "+n.substring(11,19);break}return r}function z(n,t=p.L.Not_date){if(!n)return t;if(n.match(/\d\d\d\d-\d\d-\d\d/))return n;const s=p.state.dateFormat.toLowerCase(),i=n.split(/\W/),a=s.split(/\W/);let o="",r="",d="";a.forEach((f,c)=>{switch(f){case"d":o=i[c];break;case"m":r=i[c];break;case"y":d=i[c];break}});let l=d+"-"+r+"-"+o;return l.match(/\d\d\d\d-\d\d-\d\d/)||(console.info("Неверный формат даты, будет возращена текущая дата, "+l),l=W(new Date().getTime(),!1).substring(0,10)),l}const de={class:"top-avatar"},pe=["src","title"],ce=["title"],me=e.defineComponent({__name:"avatar",props:{size:{default:64},image:{},nickname:{},isOnline:{type:Boolean},lastActiveTime:{}},setup(n){e.useCssVars(a=>({"1cfb0442":a.size+"px"}));const t=n,s={user:{Online:"Онлайн",LastSeen:"Заходил(а)"}},i=e.computed(()=>{if(t.isOnline)return s.user.Online;if(t.lastActiveTime)return s.user.LastSeen+": "+y(t.lastActiveTime,2)});return(a,o)=>(e.openBlock(),e.createElementBlock("div",de,[e.createElementVNode("img",{class:"top-avatar_image",src:a.image,title:t.nickname+(i.value?`
2
+ ${i.value}`:""),alt:""},null,8,pe),a.isOnline?(e.openBlock(),e.createElementBlock("div",{key:0,class:"top-avatar_status",title:i.value},null,8,ce)):e.createCommentVNode("",!0)]))}}),ue={"top-avatar":"top-avatar","top-avatar_image":"top-avatar_image","top-avatar_status":"top-avatar_status"},b=(n,t)=>{const s=n.__vccOpts||n;for(const[i,a]of t)s[i]=a;return s},fe=b(me,[["__cssModules",{$style:ue}]]),be={key:0,class:"top-ellipsis"},he=b(e.defineComponent({__name:"button",props:{color:{default:"blue"},styling:{default:""},size:{default:"s"},name:{},title:{},icon:{},icon2:{},href:{},disabled:{type:Boolean},isSubmit:{type:Boolean},isActive:{type:Boolean},isProgress:{type:Boolean}},setup(n){const t=n,s=e.computed(()=>t.href?"a":"button"),i=e.computed(()=>t.isSubmit?"submit":void 0);return(a,o)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value),{class:e.normalizeClass({"top-active":a.isActive,"top-disabled":a.disabled,"top-forms-focusable":!a.disabled,"top-button":!0,"top-button-progress":a.isProgress,[`top-size_${a.size}`]:!!a.size,[`top-color_${a.color}`]:!0,[`top-style_${a.styling}`]:!!a.styling}),name:a.name,title:a.title,href:a.href,type:i.value,"data-top-icon":a.icon||void 0,"data-top-icon2":a.icon2||void 0,disabled:a.disabled||void 0,inProgress:a.isProgress},{default:e.withCtx(()=>[a.$slots.default?(e.openBlock(),e.createElementBlock("span",be,[e.renderSlot(a.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(a.icon?"":"Button"),1)])])):e.createCommentVNode("",!0)]),_:3},8,["class","name","title","href","type","data-top-icon","data-top-icon2","disabled","inProgress"]))}}),[["__cssModules",{$style:{"top-button":"top-button","top-active":"top-active","top-button-progress":"top-button-progress",progress:"_progress_1hqxk_1","top-color_blue":"top-color_blue","top-color_green":"top-color_green","top-color_orange":"top-color_orange","top-color_red":"top-color_red","top-color_pink":"top-color_pink","top-color_theme":"top-color_theme","top-style_outline":"top-style_outline","top-style_soft":"top-style_soft","top-style_transparent":"top-style_transparent","top-size_l":"top-size_l","top-size_xl":"top-size_xl"}}]]),ge={class:"top-forms-optionLabel"},B=b(e.defineComponent({__name:"controlLabel",props:{description:{},disabled:{type:Boolean}},setup(n){return(t,s)=>(e.openBlock(),e.createElementBlock("div",ge,[e.createElementVNode("div",{class:e.normalizeClass({"top-forms-optionLabel_title":!0,"top-forms-optionLabel_title-disabled":t.disabled})},[e.renderSlot(t.$slots,"default")],2),t.description?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["top-forms-optionLabel_description",{"top-forms-optionLabel_description-disabled":t.disabled}])},e.toDisplayString(t.description),3)):e.createCommentVNode("",!0)]))}}),[["__cssModules",{$style:{"top-forms-optionLabel":"top-forms-optionLabel","top-forms-optionLabel_title":"top-forms-optionLabel_title","top-forms-optionLabel_title-disabled":"top-forms-optionLabel_title-disabled","top-forms-optionLabel_description":"top-forms-optionLabel_description","top-forms-optionLabel_description-disabled":"top-forms-optionLabel_description-disabled"}}]]),ye=["name","value","indeterminate","disabled"],ke=b(e.defineComponent({__name:"checkbox",props:{modelValue:{type:[Boolean,Array,Set]},name:{},value:{},description:{},disabled:{type:Boolean},indeterminate:{type:Boolean},isError:{type:Boolean}},emits:["update:modelValue"],setup(n,{emit:t}){const s=n,i=t,a=e.computed({get(){return s.modelValue},set(o){i("update:modelValue",o)}});return(o,r)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass({"top-forms-optionWrapper":!0,"top-checkbox":!0,["top-checkbox_"+o.name]:o.name!=="","top-disabled":o.disabled,"top-error":o.isError&&!o.disabled})},[e.withDirectives(e.createElementVNode("input",{type:"checkbox",class:e.normalizeClass({"top-forms-focusable":!o.disabled,"top-forms-option":!0,"top-checkbox_input":!0,"top-error":o.isError&&!o.disabled}),name:o.name,"onUpdate:modelValue":r[0]||(r[0]=d=>a.value=d),value:o.value,indeterminate:o.indeterminate,disabled:o.disabled},null,10,ye),[[e.vModelCheckbox,a.value]]),o.$slots.default?(e.openBlock(),e.createBlock(B,{key:0,description:o.description,disabled:o.disabled},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3},8,["description","disabled"])):e.createCommentVNode("",!0)],2))}}),[["__cssModules",{$style:{"top-checkbox":"top-checkbox","top-checkbox_input":"top-checkbox_input","top-error":"top-error"}}]]),we=["title"],H=b(e.defineComponent({__name:"hint",props:{hint:{}},setup(n){return(t,s)=>(e.openBlock(),e.createElementBlock("span",{class:"top-hint","data-top-icon":"",title:t.hint},null,8,we))}}),[["__cssModules",{$style:{"top-hint":"top-hint"}}]]),$e=["data-top-icon","data-top-icon2"],_e=["name","title","placeholder","disabled","readonly"],Be=["onClick"],Me={key:1,class:"top-formsCaption"},D=b(e.defineComponent({inheritAttrs:!1,__name:"input",props:{modelValue:{},name:{},disabled:{type:Boolean},readonly:{type:Boolean},title:{},captionType:{default:""},size:{default:"s"},icon:{},icon2:{},addCleaner:{type:Boolean},isError:{type:Boolean},modificator:{}},emits:["update:modelValue"],setup(n,{emit:t}){const s=n,i=t,a=e.computed({get(){return s.modelValue},set(d){i("update:modelValue",d)}}),o=e.computed(()=>s.addCleaner&&!s.title||s.captionType!==""?"":s.title),r=()=>{i("update:modelValue","")};return(d,l)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass({"top-input":!0,["top-size_"+d.size]:!0,"top-disabled":d.disabled,["top-input-"+d.modificator]:!!d.modificator,"top-input-withCleaner":d.addCleaner&&a.value&&a.value!=="0000-00-00","top-formsCaptionWrapper":d.captionType!=="","top-formsCaptionWrapper-always":d.captionType==="top"}),"data-top-icon":d.icon,"data-top-icon2":d.icon2},[e.withDirectives(e.createElementVNode("input",e.mergeProps({type:"text",class:{"top-input_input":!0,["top-input_input-"+d.modificator]:!!d.modificator,"top-forms-focusable":!d.disabled,"top-error":d.isError},autocomplete:"off_always",name:d.name,"onUpdate:modelValue":l[0]||(l[0]=f=>a.value=f),title:d.title,placeholder:o.value,disabled:d.disabled,readonly:d.readonly,onKeydown:l[1]||(l[1]=e.withKeys(e.withModifiers(()=>(d.addCleaner||!!d.$slots.btn)&&r(),["stop"]),["esc"]))},d.$attrs),null,16,_e),[[e.vModelText,a.value]]),d.addCleaner&&a.value&&a.value!=="0000-00-00"?(e.openBlock(),e.createElementBlock("span",{key:0,class:"top-input_cleaner","data-top-icon":"",onClick:e.withModifiers(r,["prevent"])},null,8,Be)):e.createCommentVNode("",!0),d.captionType!==""?(e.openBlock(),e.createElementBlock("span",Me,e.toDisplayString(d.title),1)):e.createCommentVNode("",!0),e.renderSlot(d.$slots,"default")],10,$e))}}),[["__cssModules",{$style:{"top-input":"top-input","top-input_input":"top-input_input","top-input-withCleaner":"top-input-withCleaner","top-input_cleaner":"top-input_cleaner"}}]]),Ve=["modelValue"],Se=!!document.documentElement.ontouchstart&&!!document.createElement("input").showPicker;let I=n=>{};const Ce=b(e.defineComponent({__name:"inputDate",props:{modelValue:{},name:{},disabled:{type:Boolean},readonly:{type:Boolean},title:{},captionType:{},size:{},icon:{},icon2:{default:""},addCleaner:{type:Boolean},isError:{type:Boolean},modificator:{}},emits:["update:modelValue"],setup(n,{emit:t}){const s=n,i=t;e.onUnmounted(()=>{o&&o.datepicker("destroy")});const a=e.ref();let o;const r=e.computed({get(){return y(s.modelValue,2,"0000-00-00")},set(c){c=z(c,"0000-00-00"),i("update:modelValue",c)}});let d=c=>{I(c)},l=c=>{const u=z(c.target.value),h=y(u);if(!h||h===p.L.Not_date||c.target.value!==h){c.target.value=r.value;return}r.value=c.target.value};async function f(c){const u=await new Promise((h,g)=>M(["./datepicker-8a42d8a6.amd"],h,g));I=u.oninput,o=u.connectDatepicker(c.target,{onSelect:()=>l(c)}),o&&o.datepicker("show")}return(c,u)=>e.unref(Se)?(e.openBlock(),e.createBlock(e.unref(D),e.mergeProps({key:0},c.$props,{modelValue:r.value,readonly:"",onClick:u[1]||(u[1]=h=>a.value.showPicker())}),{default:e.withCtx(()=>[e.createElementVNode("input",{ref_key:"el",ref:a,type:"date",class:"top-input_input-date",modelValue:c.modelValue,onChange:u[0]||(u[0]=h=>r.value=h.target.value),tabindex:"-1"},null,40,Ve)]),_:1},16,["modelValue"])):(e.openBlock(),e.createBlock(e.unref(D),e.mergeProps({key:1},c.$props,{modelValue:r.value,"onUpdate:modelValue":u[2]||(u[2]=h=>h===""?r.value="":""),onInput:e.unref(d),onFocusOnce:f,onChange:e.unref(l),modificator:"datepicker"}),null,16,["modelValue","onInput","onChange"]))}}),[["__cssModules",{$style:{"top-input-datepicker":"top-input-datepicker","top-input_input-date":"top-input_input-date"}}]]),Ee={class:"top-inputRange"},ze=e.createElementVNode("span",{class:"top-inputRange_dash"}," — ",-1),De=b(e.defineComponent({__name:"inputRange",setup(n){return(t,s)=>(e.openBlock(),e.createElementBlock("div",Ee,[e.renderSlot(t.$slots,"from"),ze,e.renderSlot(t.$slots,"to")]))}}),[["__cssModules",{$style:{"top-inputRange":"top-inputRange","top-inputRange_dash":"top-inputRange_dash","top-input":"top-input"}}]]),Le=["name","value","disabled"],Ne=b(e.defineComponent({__name:"radio",props:{modelValue:{},value:{},name:{},description:{},disabled:{type:Boolean},isError:{type:Boolean}},emits:["update:modelValue"],setup(n,{emit:t}){const s=n,i=t,a=e.computed({get(){return s.modelValue},set(o){i("update:modelValue",o)}});return(o,r)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass({"top-forms-optionWrapper":!0,"top-radio":!0,["top-radio_"+o.name]:o.name!=="","top-disabled":o.disabled,"top-error":o.isError&&!o.disabled})},[e.withDirectives(e.createElementVNode("input",{type:"radio",class:e.normalizeClass({"top-forms-focusable":!o.disabled,"top-forms-option":!0,"top-radio_input":!0,"top-error":o.isError&&!o.disabled}),"onUpdate:modelValue":r[0]||(r[0]=d=>a.value=d),name:o.name,value:o.value,disabled:o.disabled},null,10,Le),[[e.vModelRadio,a.value]]),o.$slots.default?(e.openBlock(),e.createBlock(B,{key:0,description:o.description,disabled:o.disabled},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3},8,["description","disabled"])):e.createCommentVNode("",!0)],2))}}),[["__cssModules",{$style:{"top-radio":"top-radio","top-radio_input":"top-radio_input","top-error":"top-error"}}]]),Re=["name","value","disabled"],Te=b(e.defineComponent({__name:"switcher",props:{modelValue:{type:[Boolean,Array,Set]},name:{},value:{},description:{},disabled:{type:Boolean},isError:{type:Boolean}},emits:["update:modelValue"],setup(n,{emit:t}){const s=n,i=t,a=e.computed({get(){return s.modelValue},set(o){i("update:modelValue",o)}});return(o,r)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass({"top-forms-optionWrapper":!0,"top-checkboxSwitcher":!0,"top-disabled":o.disabled,"top-error":o.isError&&!o.disabled})},[e.withDirectives(e.createElementVNode("input",{type:"checkbox",class:e.normalizeClass({"top-forms-focusable":!o.disabled,"top-forms-option":!0,"top-checkboxSwitcher_input":!0,"top-error":o.isError&&!o.disabled}),"onUpdate:modelValue":r[0]||(r[0]=d=>a.value=d),name:o.name,value:o.value,disabled:o.disabled},null,10,Re),[[e.vModelCheckbox,a.value]]),o.$slots.default?(e.openBlock(),e.createBlock(B,{key:0,description:o.description,disabled:o.disabled},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3},8,["description","disabled"])):e.createCommentVNode("",!0)],2))}}),[["__cssModules",{$style:{"top-checkboxSwitcher":"top-checkboxSwitcher","top-checkboxSwitcher_input":"top-checkboxSwitcher_input","top-error":"top-error"}}]]),Fe=["name","placeholder","disabled","readonly","rows"],Ae={key:0,class:"top-textarea_pseudoContent"},Pe=b(e.defineComponent({inheritAttrs:!1,__name:"textarea",props:{modelValue:{},name:{},placeholder:{},rows:{default:5},minHeight:{default:120},expandable:{type:Boolean},disabled:{type:Boolean},readonly:{type:Boolean},isError:{type:Boolean},hint:{}},emits:["update:modelValue"],setup(n,{emit:t}){e.useCssVars(o=>({c35baa86:o.minHeight+"px"}));const s=n,i=t,a=e.computed({get(){return s.modelValue},set(o){i("update:modelValue",o)}});return(o,r)=>{const d=e.resolveDirective("top-tooltip");return e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass({"top-textarea":!0,["top-textarea-"+o.name]:o.name,"top-disabled":o.disabled})},[e.withDirectives(e.createElementVNode("textarea",e.mergeProps({type:"text",class:{"top-forms-focusable":!o.disabled,"top-textarea_textarea":!0,"top-textarea_textarea-expandable":o.expandable,"top-error":o.isError},autocomplete:"off_always",name:o.name,placeholder:o.placeholder,disabled:o.disabled,readonly:o.readonly,rows:o.expandable?void 0:o.rows},o.$attrs,{"onUpdate:modelValue":r[0]||(r[0]=l=>a.value=l)}),null,16,Fe),[[e.vModelText,a.value]]),o.expandable?(e.openBlock(),e.createElementBlock("div",Ae,e.toDisplayString(a.value+" "),1)):e.createCommentVNode("",!0),o.hint?e.withDirectives((e.openBlock(),e.createBlock(H,{key:1,class:"top-textarea_hint",hint:o.hint},null,8,["hint"])),[[d]]):e.createCommentVNode("",!0)],2)}}}),[["__cssModules",{$style:{"top-textarea":"top-textarea","top-textarea_textarea":"top-textarea_textarea","top-textarea_textarea-expandable":"top-textarea_textarea-expandable","top-textarea_pseudoContent":"top-textarea_pseudoContent","top-textarea_hint":"top-textarea_hint"}}]]),Oe=["data-value","data-top-icon","data-top-icon2"],We=["name","disabled"],He=["label","disabled"],Ie=["value","selected","disabled"],Ue=["value","selected","disabled"],je={key:1,class:"top-formsCaption"},Ye=b(e.defineComponent({__name:"select",props:{modelValue:{},options:{},name:{},disabled:{type:Boolean},icon:{},size:{default:"s"},addChanger:{type:Boolean},title:{},isError:{type:Boolean}},emits:["update:modelValue"],setup(n,{emit:t}){const s=n,i=t,a=e.computed({get(){return s.modelValue},set(l){i("update:modelValue",l)}}),o=e.computed(()=>{var l;return(l=r.value.get(a.value))==null?void 0:l.icon}),r=e.computed(()=>{const l=new Map;return s.options.forEach(f=>{if(!f.disabled){if(f.children){f.children.forEach(c=>{c.disabled||l.set(c.value,c)});return}l.set(f.value,f)}}),l});e.watch([e.toRef(s.modelValue),r],()=>{(a.value===null||a.value===void 0)&&r.value.size&&(console.warn("Пожалуйста, не передавайте в компонент Select значения null и undefined"),a.value=r.value.keys().next().value)},{immediate:!0});const d=()=>{const l=[...r.value.keys()],c=(l.indexOf(a.value)+1)%l.length;a.value=l[c]};return(l,f)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass({"top-select":!0,["top-select-"+l.name]:l.name,["top-size_"+l.size]:!0,"top-formsCaptionWrapper":!!l.title,"top-select-error":l.isError,"top-disabled":l.disabled}),"data-value":a.value,"data-top-icon":l.icon,"data-top-icon2":o.value},[e.withDirectives(e.createElementVNode("select",{class:e.normalizeClass({"top-forms-focusable":!l.disabled,"top-select_select":!0,"top-select_arrow":!0,"top-error":l.isError}),name:l.name,disabled:l.disabled,"onUpdate:modelValue":f[0]||(f[0]=c=>a.value=c)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.options.entries(),([c,u])=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[u.children?(e.openBlock(),e.createElementBlock("optgroup",{key:"group_"+u.value,label:u.title,disabled:u.disabled},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.children.entries(),([h,g])=>(e.openBlock(),e.createElementBlock("option",{key:u.value,value:g.value,selected:g.value===a.value,disabled:g.disabled},e.toDisplayString(g.title),9,Ie))),128))],8,He)):(e.openBlock(),e.createElementBlock("option",{key:u.value,value:u.value,selected:u.value===a.value,disabled:u.disabled},e.toDisplayString(u.title),9,Ue))],64))),256))],10,We),[[e.vModelSelect,a.value]]),l.addChanger&&r.value.size&&!l.disabled?(e.openBlock(),e.createElementBlock("span",{key:0,class:"top-changer",onClick:d})):e.createCommentVNode("",!0),l.title?(e.openBlock(),e.createElementBlock("span",je,e.toDisplayString(l.title),1)):e.createCommentVNode("",!0)],10,Oe))}}),[["__cssModules",{$style:{"top-select":"top-select","top-select-error":"top-select-error","top-select_select":"top-select_select","top-changer":"top-changer"}}]]);m.Button=he,m.ControlLabel=B,m.Core=p,m.DOM=F,m.Events=P,m.Hint=H,m.Input=D,m.Textarea=Pe,m._export_sfc=b,m.avatar=fe,m.checkbox=ke,m.dateFormat=y,m.dateUnformat=z,m.genDate=W,m.getCommandKeyLabel=q,m.inputDate=Ce,m.inputRange=De,m.isApp=R,m.isMacOS=T,m.isMobile=N,m.isRetina=L,m.isSafari=Y,m.radio=Ne,m.select=Ye,m.stringToDate=re,m.switcher=Te});
3
+ //# sourceMappingURL=forms-30d68077.amd.js.map