@topvisor/ui 1.0.12-jquery → 1.0.13-dialog-top-popup

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 (113) hide show
  1. package/.chunks/datepicker-B3MD6OH7.es.js +44 -0
  2. package/.chunks/datepicker-B3MD6OH7.es.js.map +1 -0
  3. package/.chunks/datepicker-DiEEaUFr.amd.js +2 -0
  4. package/.chunks/datepicker-DiEEaUFr.amd.js.map +1 -0
  5. package/.chunks/{forms-DHMogHmw.amd.js → forms-BAH7fR4-.amd.js} +3 -3
  6. package/.chunks/{forms-DHMogHmw.amd.js.map → forms-BAH7fR4-.amd.js.map} +1 -1
  7. package/.chunks/{forms-CIeG_5LP.es.js → forms-Bb3OpLft.es.js} +127 -127
  8. package/.chunks/{forms-CIeG_5LP.es.js.map → forms-Bb3OpLft.es.js.map} +1 -1
  9. package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-DQXATE8-.amd.js → listItem.vue_vue_type_script_setup_true_lang-CEGUvLq1.amd.js} +2 -2
  10. package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-DQXATE8-.amd.js.map → listItem.vue_vue_type_script_setup_true_lang-CEGUvLq1.amd.js.map} +1 -1
  11. package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-Gofkt4lj.es.js → listItem.vue_vue_type_script_setup_true_lang-DjgbIQYg.es.js} +2 -2
  12. package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-Gofkt4lj.es.js.map → listItem.vue_vue_type_script_setup_true_lang-DjgbIQYg.es.js.map} +1 -1
  13. package/.chunks/{menu.vue_vue_type_style_index_0_lang-CeoVr4RC.amd.js → menu.vue_vue_type_style_index_0_lang-D0y3-ThY.amd.js} +2 -2
  14. package/.chunks/{menu.vue_vue_type_style_index_0_lang-CeoVr4RC.amd.js.map → menu.vue_vue_type_style_index_0_lang-D0y3-ThY.amd.js.map} +1 -1
  15. package/.chunks/{menu.vue_vue_type_style_index_0_lang-uGV-A-kW.es.js → menu.vue_vue_type_style_index_0_lang-TgRoR0yU.es.js} +2 -2
  16. package/.chunks/{menu.vue_vue_type_style_index_0_lang-uGV-A-kW.es.js.map → menu.vue_vue_type_style_index_0_lang-TgRoR0yU.es.js.map} +1 -1
  17. package/.chunks/{notice-BA5zBdx2.es.js → notice-B9GVJPAQ.es.js} +2 -2
  18. package/.chunks/notice-B9GVJPAQ.es.js.map +1 -0
  19. package/.chunks/{notice-BPG1753z.amd.js → notice-DrtJPorN.amd.js} +2 -2
  20. package/.chunks/notice-DrtJPorN.amd.js.map +1 -0
  21. package/.chunks/{popup-BnUijzts.es.js → popup-BpJECC0G.es.js} +47 -493
  22. package/.chunks/popup-BpJECC0G.es.js.map +1 -0
  23. package/.chunks/popup-C4uXeUmv.amd.js +2 -0
  24. package/.chunks/popup-C4uXeUmv.amd.js.map +1 -0
  25. package/.chunks/utils-B8aGLVy9.amd.js +2 -0
  26. package/.chunks/utils-B8aGLVy9.amd.js.map +1 -0
  27. package/.chunks/utils-BTO8aubv.amd.js +2 -0
  28. package/.chunks/utils-BTO8aubv.amd.js.map +1 -0
  29. package/.chunks/utils-DUHKIePg.es.js +225 -0
  30. package/.chunks/utils-DUHKIePg.es.js.map +1 -0
  31. package/.chunks/utils-j2UJrxAJ.es.js +338 -0
  32. package/.chunks/utils-j2UJrxAJ.es.js.map +1 -0
  33. package/README.md +7 -12
  34. package/assets/charts.css +1 -1
  35. package/assets/core.css +1 -1
  36. package/charts/charts.amd.js +1 -1
  37. package/charts/charts.amd.js.map +1 -1
  38. package/charts/charts.js +134 -81
  39. package/charts/charts.js.map +1 -1
  40. package/components/charts/charts.d.ts +2 -0
  41. package/components/charts/miniChart/miniChart.d.ts +8 -1
  42. package/components/charts/miniCharts/miniCharts.d.ts +20 -0
  43. package/components/charts/miniCharts/miniCharts.vue.d.ts +29 -0
  44. package/components/charts/miniCharts/stories/dummy.d.ts +6 -0
  45. package/components/dialog/dialog/composables/asyncDialogHandle.d.ts +51 -0
  46. package/components/dialog/dialog/composables/dialogHandle.d.ts +108 -0
  47. package/components/dialog/dialog/composables/types.d.ts +11 -0
  48. package/components/dialog/dialog/composables/utils.d.ts +21 -0
  49. package/components/dialog/dialog/dialog.vue.d.ts +27 -0
  50. package/components/dialog/dialog/dialogs/dialogs.vue.d.ts +10 -0
  51. package/components/dialog/dialog/page/page.vue.d.ts +18 -0
  52. package/components/dialog/dialog/page/types.d.ts +65 -0
  53. package/components/dialog/dialog/pageComponent/pageComponent.vue.d.ts +6 -0
  54. package/components/dialog/dialog/pageComponent/types.d.ts +18 -0
  55. package/components/dialog/dialog/stories/autoload.d.ts +2 -0
  56. package/components/dialog/dialog/stories/dialog_example/pages/utils.d.ts +7 -0
  57. package/components/dialog/dialog/types.d.ts +58 -0
  58. package/components/dialog/dialog.d.ts +6 -0
  59. package/components/dialog/lib/types.d.ts +21 -0
  60. package/components/dialog/lib/utils.d.ts +14 -0
  61. package/components/dialog/lib/utils.globalEvents.d.ts +8 -0
  62. package/components/dialog/lib/worker.d.ts +60 -0
  63. package/components/forms/select/select.d.ts +1 -1
  64. package/components/project/tagSelector/tagSelector.vue.d.ts +2 -2
  65. package/components/project/tagSelector/types.d.ts +2 -2
  66. package/components/tabsView/tabsView/tabsView.d.ts +1 -1
  67. package/core/app.amd.js +1 -1
  68. package/core/app.amd.js.map +1 -1
  69. package/core/app.d.ts +2 -0
  70. package/core/app.js +57 -50
  71. package/core/app.js.map +1 -1
  72. package/core/core/core.d.ts +1 -1
  73. package/core/core/options.d.ts +2 -2
  74. package/core/plugins/core.d.ts +12 -3
  75. package/dialog/dialog.amd.js +2 -0
  76. package/dialog/dialog.amd.js.map +1 -0
  77. package/dialog/dialog.d.ts +2 -0
  78. package/dialog/dialog.js +183 -0
  79. package/dialog/dialog.js.map +1 -0
  80. package/forms/forms.amd.js +1 -1
  81. package/forms/forms.js +1 -1
  82. package/formsExt/formsExt.amd.js +1 -1
  83. package/formsExt/formsExt.js +54 -54
  84. package/jquery-ui.min.css +6 -0
  85. package/package.json +1 -1
  86. package/popup/popup.amd.js +1 -1
  87. package/popup/popup.js +2 -2
  88. package/popup/worker.amd.js +1 -1
  89. package/popup/worker.js +2 -2
  90. package/project/project.amd.js +1 -1
  91. package/project/project.js +3 -3
  92. package/tabsView/tabsView.amd.js +1 -1
  93. package/tabsView/tabsView.js +16 -16
  94. package/utils/date.amd.js +1 -1
  95. package/utils/date.js +1 -1
  96. package/utils/device.amd.js +1 -1
  97. package/utils/device.js +1 -1
  98. package/utils/lodash.amd.js +1 -1
  99. package/utils/lodash.js +5 -5
  100. package/utils/price.amd.js +1 -1
  101. package/utils/price.js +1 -1
  102. package/utils/string.amd.js +1 -1
  103. package/utils/string.js +1 -1
  104. package/.chunks/datepicker-DWXjh2hB.es.js +0 -290
  105. package/.chunks/datepicker-DWXjh2hB.es.js.map +0 -1
  106. package/.chunks/datepicker-NJ8JOvZG.amd.js +0 -248
  107. package/.chunks/datepicker-NJ8JOvZG.amd.js.map +0 -1
  108. package/.chunks/notice-BA5zBdx2.es.js.map +0 -1
  109. package/.chunks/notice-BPG1753z.amd.js.map +0 -1
  110. package/.chunks/popup-B-A8QzhE.amd.js +0 -448
  111. package/.chunks/popup-B-A8QzhE.amd.js.map +0 -1
  112. package/.chunks/popup-BnUijzts.es.js.map +0 -1
  113. package/components/core/dialog/types.d.ts +0 -2
@@ -1,290 +0,0 @@
1
- import { watch as k, toRef as g } from "vue";
2
- import { C as a, d as m } from "./forms-CIeG_5LP.es.js";
3
- const h = `/* ui-datepicker */
4
- .ui-datepicker {
5
- --datepicker-day-color: var(--color-layout-front-1);
6
- --datepicker-day-color-hover: var(--color-layer-1);
7
- --datepicker-selected-color: var(--color-bg-primary-1);
8
- --datepicker-selected-color-hover: var(--color-bg-primary-2);
9
- --datepicker-range-color: var(--color-layer-primary-1);
10
- --datepicker-range-color-hover: var(--color-layer-primary-2);
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(--color-layout-front-1);
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-1);
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-1);
77
- }
78
-
79
- .ui-datepicker-year {
80
- color: var(--color-text-2);
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
- color: var(--color-text-3);
102
- content: "";
103
- }
104
-
105
- .ui-datepicker-prev-hover:before {
106
- color: var(--color-text-1);
107
- content: "";
108
- }
109
-
110
- .ui-datepicker-next {
111
- color: var(--color-text-3);
112
- order: 1;
113
- }
114
-
115
- .ui-datepicker-next-hover {
116
- color: var(--color-text-1);
117
- order: 1;
118
- }
119
-
120
- .ui-datepicker-next:before {
121
- content: "";
122
- }
123
-
124
- .ui-datepicker-prev > *,
125
- .ui-datepicker-next > * {
126
- display: none !important;
127
- }
128
-
129
- .ui-datepicker thead th {
130
- width: auto !important;
131
- padding: 0 !important;
132
- color: var(--color-text-3);
133
- font-size: 14px;
134
- font-weight: 400 !important;
135
- }
136
-
137
- .ui-datepicker table {
138
- margin: 0 !important;
139
- font-size: 14px;
140
- }
141
-
142
- .ui-datepicker td {
143
- color: var(--color-text-1);
144
- background: none;
145
- padding: 0 !important;
146
- }
147
-
148
- .ui-datepicker td span,
149
- .ui-datepicker td a {
150
- border-radius: 8px;
151
- border: none;
152
- min-width: 32px;
153
- height: 32px;
154
- padding: 0;
155
- margin: 1px;
156
- color: var(--color-text-1) !important;
157
- line-height: 32px;
158
- text-align: center;
159
- position: relative;
160
- display: block;
161
- }
162
-
163
- /* обычные даты */
164
- .ui-datepicker td a {
165
- background: var(--datepicker-day-color);
166
- }
167
-
168
- .ui-datepicker td a:hover {
169
- background: var(--datepicker-day-color-hover);
170
- }
171
-
172
- /* текущий день */
173
- td.ui-datepicker-today span,
174
- td.ui-datepicker-today a {
175
- background: none;
176
- position: relative;
177
- }
178
-
179
- /* выбранные даты */
180
- .ui-datepicker td.selected a {
181
- background: var(--datepicker-range-color);
182
- padding-right: 0;
183
- padding-left: 1px;
184
- margin-right: 1px;
185
- margin-left: 0;
186
- }
187
-
188
- .ui-datepicker td.selected a:hover {
189
- background: var(--datepicker-range-color-hover);
190
- }
191
-
192
- .ui-datepicker td.selected:not(.selected-start):not(:first-child):not(.first-of-month) a {
193
- border-top-left-radius: 0;
194
- border-bottom-left-radius: 0;
195
- padding-left: 1px;
196
- margin-left: 0;
197
- }
198
-
199
- .ui-datepicker td.selected:not(.selected-end):not(:last-child):not(.last-of-month) a {
200
- border-top-right-radius: 0;
201
- border-bottom-right-radius: 0;
202
- padding-right: 1px;
203
- margin-right: 0;
204
- }
205
-
206
- .ui-datepicker td.selected-start a,
207
- .ui-datepicker td.selected-end a,
208
- .ui-datepicker td.ui-datepicker-current-day a {
209
- background: var(--datepicker-selected-color);
210
- color: #FFF !important;
211
- }
212
-
213
- .ui-datepicker td.selected-start a:hover,
214
- .ui-datepicker td.selected-end a:hover,
215
- .ui-datepicker td.ui-datepicker-current-day a:hover {
216
- background: var(--datepicker-selected-color-hover);
217
- }
218
-
219
- .ui-datepicker-day-marks {
220
- line-height: normal;
221
- position: absolute;
222
- right: 0;
223
- bottom: 3px;
224
- left: 0;
225
- display: flex;
226
- align-items: center;
227
- justify-content: center;
228
- }
229
-
230
- .ui-datepicker-day-marks > i {
231
- border-radius: 50%;
232
- border: 1px solid #FFF;
233
- width: 4px;
234
- height: 4px;
235
- margin: 0 2px;
236
- }
237
-
238
- .ui-datepicker-day-marks-exists {
239
- background: var(--color-text-primary);
240
- }
241
-
242
- .ui-datepicker-day-marks-update {
243
- background: var(--color-text-negative);
244
- }
245
-
246
- .ui-datepicker-row-break {
247
- display: none;
248
- }
249
- `;
250
- a.insertStyleToPage(h);
251
- const x = (e) => {
252
- var t, n;
253
- if (!((n = (t = a.$) == null ? void 0 : t.ui) != null && n.datepicker)) {
254
- console.info("Для работы datepicker требуется глобальная загрузка jQuery UI Datepicker");
255
- return;
256
- }
257
- return a.$.datepicker.setDefaults({
258
- dateFormat: a.state.dateFormat.toLowerCase().replace("m", "mm").replace("y", "yy").replace("d", "dd")
259
- }), a.$(e);
260
- };
261
- function b(e, t) {
262
- var n;
263
- return (n = x(e)) == null ? void 0 : n.datepicker(t);
264
- }
265
- let d, l, p, u;
266
- k(g(a.state.dateFormat), () => {
267
- var e;
268
- d = m("2000-01-01"), l = ((e = d.match(/\D/)) == null ? void 0 : e[0]) ?? "-", p = d.replace(/\D+/g, "").length, u = [];
269
- for (let t = 0; t < d.length; t++)
270
- d[t] === l && u.push(t);
271
- }, { immediate: !0 });
272
- function y(e) {
273
- 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;
274
- if (c > 0) {
275
- r = r.substring(0, p);
276
- const o = p - r.length;
277
- i = i.substring(i.length - o);
278
- } else c < 0 && (e.inputType === "deleteContentForward" ? r += "0".repeat(-c) : i = "0".repeat(-c) + i);
279
- t = r.length, n = r + i;
280
- for (let o = 0; o < u.length; o++) {
281
- const s = u[o];
282
- n = n.substring(0, s) + l + n.substring(s), t >= s && t++;
283
- }
284
- e.inputType === "deleteContentBackward" && n[t - 1] === l && t--, n !== e.target.value && (e.target.value = n, e.target.selectionStart = t, e.target.selectionEnd = t);
285
- }
286
- export {
287
- b as connectDatepicker,
288
- y as oninput
289
- };
290
- //# sourceMappingURL=datepicker-DWXjh2hB.es.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"datepicker-DWXjh2hB.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: var(--color-layout-front-1);\\n\\t--datepicker-day-color-hover: var(--color-layer-1);\\n\\t--datepicker-selected-color: var(--color-bg-primary-1);\\n\\t--datepicker-selected-color-hover: var(--color-bg-primary-2);\\n\\t--datepicker-range-color: var(--color-layer-primary-1);\\n\\t--datepicker-range-color-hover: var(--color-layer-primary-2);\\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(--color-layout-front-1);\\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-1);\\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-1);\\n}\\n\\n.ui-datepicker-year {\\n\\tcolor: var(--color-text-2);\\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\\tcolor: var(--color-text-3);\\n\\tcontent: \\\"\\\";\\n}\\n\\n.ui-datepicker-prev-hover:before {\\n\\tcolor: var(--color-text-1);\\n\\tcontent: \\\"\\\";\\n}\\n\\n.ui-datepicker-next {\\n\\tcolor: var(--color-text-3);\\n\\torder: 1;\\n}\\n\\n.ui-datepicker-next-hover {\\n\\tcolor: var(--color-text-1);\\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: var(--color-text-3);\\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\\tcolor: var(--color-text-1);\\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-1) !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-text-primary);\\n}\\n\\n.ui-datepicker-day-marks-update {\\n\\tbackground: var(--color-text-negative);\\n}\\n\\n.ui-datepicker-row-break {\\n\\tdisplay: none;\\n}\\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.insertStyleToPage(css);\n\nconst $ = (el: HTMLInputElement) => {\n\tif (!Core.$?.ui?.datepicker) {\n\t\tconsole.info('Для работы datepicker требуется глобальная загрузка jQuery UI Datepicker');\n\n\t\treturn;\n\t}\n\n\tCore.$.datepicker.setDefaults({\n\t\tdateFormat: Core.state.dateFormat.toLowerCase().replace('m', 'mm').replace('y', 'yy').replace('d', 'dd'),\n\t});\n\n\treturn Core.$(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}\n"],"names":["css","Core","$","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;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,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;"}
@@ -1,248 +0,0 @@
1
- define(["require","exports","vue","./forms-DHMogHmw.amd"],function(x,k,c,r){"use strict";if(typeof c>"u")var c=window.Vue;r.Core.insertStyleToPage(`/* ui-datepicker */
2
- .ui-datepicker {
3
- --datepicker-day-color: var(--color-layout-front-1);
4
- --datepicker-day-color-hover: var(--color-layer-1);
5
- --datepicker-selected-color: var(--color-bg-primary-1);
6
- --datepicker-selected-color-hover: var(--color-bg-primary-2);
7
- --datepicker-range-color: var(--color-layer-primary-1);
8
- --datepicker-range-color-hover: var(--color-layer-primary-2);
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(--color-layout-front-1);
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-1);
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-1);
75
- }
76
-
77
- .ui-datepicker-year {
78
- color: var(--color-text-2);
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
- color: var(--color-text-3);
100
- content: "";
101
- }
102
-
103
- .ui-datepicker-prev-hover:before {
104
- color: var(--color-text-1);
105
- content: "";
106
- }
107
-
108
- .ui-datepicker-next {
109
- color: var(--color-text-3);
110
- order: 1;
111
- }
112
-
113
- .ui-datepicker-next-hover {
114
- color: var(--color-text-1);
115
- order: 1;
116
- }
117
-
118
- .ui-datepicker-next:before {
119
- content: "";
120
- }
121
-
122
- .ui-datepicker-prev > *,
123
- .ui-datepicker-next > * {
124
- display: none !important;
125
- }
126
-
127
- .ui-datepicker thead th {
128
- width: auto !important;
129
- padding: 0 !important;
130
- color: var(--color-text-3);
131
- font-size: 14px;
132
- font-weight: 400 !important;
133
- }
134
-
135
- .ui-datepicker table {
136
- margin: 0 !important;
137
- font-size: 14px;
138
- }
139
-
140
- .ui-datepicker td {
141
- color: var(--color-text-1);
142
- background: none;
143
- padding: 0 !important;
144
- }
145
-
146
- .ui-datepicker td span,
147
- .ui-datepicker td a {
148
- border-radius: 8px;
149
- border: none;
150
- min-width: 32px;
151
- height: 32px;
152
- padding: 0;
153
- margin: 1px;
154
- color: var(--color-text-1) !important;
155
- line-height: 32px;
156
- text-align: center;
157
- position: relative;
158
- display: block;
159
- }
160
-
161
- /* обычные даты */
162
- .ui-datepicker td a {
163
- background: var(--datepicker-day-color);
164
- }
165
-
166
- .ui-datepicker td a:hover {
167
- background: var(--datepicker-day-color-hover);
168
- }
169
-
170
- /* текущий день */
171
- td.ui-datepicker-today span,
172
- td.ui-datepicker-today a {
173
- background: none;
174
- position: relative;
175
- }
176
-
177
- /* выбранные даты */
178
- .ui-datepicker td.selected a {
179
- background: var(--datepicker-range-color);
180
- padding-right: 0;
181
- padding-left: 1px;
182
- margin-right: 1px;
183
- margin-left: 0;
184
- }
185
-
186
- .ui-datepicker td.selected a:hover {
187
- background: var(--datepicker-range-color-hover);
188
- }
189
-
190
- .ui-datepicker td.selected:not(.selected-start):not(:first-child):not(.first-of-month) a {
191
- border-top-left-radius: 0;
192
- border-bottom-left-radius: 0;
193
- padding-left: 1px;
194
- margin-left: 0;
195
- }
196
-
197
- .ui-datepicker td.selected:not(.selected-end):not(:last-child):not(.last-of-month) a {
198
- border-top-right-radius: 0;
199
- border-bottom-right-radius: 0;
200
- padding-right: 1px;
201
- margin-right: 0;
202
- }
203
-
204
- .ui-datepicker td.selected-start a,
205
- .ui-datepicker td.selected-end a,
206
- .ui-datepicker td.ui-datepicker-current-day a {
207
- background: var(--datepicker-selected-color);
208
- color: #FFF !important;
209
- }
210
-
211
- .ui-datepicker td.selected-start a:hover,
212
- .ui-datepicker td.selected-end a:hover,
213
- .ui-datepicker td.ui-datepicker-current-day a:hover {
214
- background: var(--datepicker-selected-color-hover);
215
- }
216
-
217
- .ui-datepicker-day-marks {
218
- line-height: normal;
219
- position: absolute;
220
- right: 0;
221
- bottom: 3px;
222
- left: 0;
223
- display: flex;
224
- align-items: center;
225
- justify-content: center;
226
- }
227
-
228
- .ui-datepicker-day-marks > i {
229
- border-radius: 50%;
230
- border: 1px solid #FFF;
231
- width: 4px;
232
- height: 4px;
233
- margin: 0 2px;
234
- }
235
-
236
- .ui-datepicker-day-marks-exists {
237
- background: var(--color-text-primary);
238
- }
239
-
240
- .ui-datepicker-day-marks-update {
241
- background: var(--color-text-negative);
242
- }
243
-
244
- .ui-datepicker-row-break {
245
- display: none;
246
- }
247
- `);const h=e=>{var t,n;if(!((n=(t=r.Core.$)==null?void 0:t.ui)!=null&&n.datepicker)){console.info("Для работы datepicker требуется глобальная загрузка jQuery UI Datepicker");return}return r.Core.$.datepicker.setDefaults({dateFormat:r.Core.state.dateFormat.toLowerCase().replace("m","mm").replace("y","yy").replace("d","dd")}),r.Core.$(e)};function m(e,t){var n;return(n=h(e))==null?void 0:n.datepicker(t)}let o,p,l,u;c.watch(c.toRef(r.Core.state.dateFormat),()=>{var e;o=r.dateFormat("2000-01-01"),p=((e=o.match(/\D/))==null?void 0:e[0])??"-",l=o.replace(/\D+/g,"").length,u=[];for(let t=0;t<o.length;t++)o[t]===p&&u.push(t)},{immediate:!0});function v(e){let t=e.target.selectionEnd,n=e.target.value,i=n.substring(0,t).replace(/\D+/g,""),a=n.substring(t).replace(/\D+/g,""),s=i.length+a.length-l;if(s>0){i=i.substring(0,l);const d=l-i.length;a=a.substring(a.length-d)}else s<0&&(e.inputType==="deleteContentForward"?i+="0".repeat(-s):a="0".repeat(-s)+a);t=i.length,n=i+a;for(let d=0;d<u.length;d++){const g=u[d];n=n.substring(0,g)+p+n.substring(g),t>=g&&t++}e.inputType==="deleteContentBackward"&&n[t-1]===p&&t--,n!==e.target.value&&(e.target.value=n,e.target.selectionStart=t,e.target.selectionEnd=t)}k.connectDatepicker=m,k.oninput=v,Object.defineProperty(k,Symbol.toStringTag,{value:"Module"})});
248
- //# sourceMappingURL=datepicker-NJ8JOvZG.amd.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"datepicker-NJ8JOvZG.amd.js","sources":["../../src/components/forms/inputDate/datepicker.ts","../../src/components/forms/inputDate/datepicker.css?raw"],"sourcesContent":["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.insertStyleToPage(css);\n\nconst $ = (el: HTMLInputElement) => {\n\tif (!Core.$?.ui?.datepicker) {\n\t\tconsole.info('Для работы datepicker требуется глобальная загрузка jQuery UI Datepicker');\n\n\t\treturn;\n\t}\n\n\tCore.$.datepicker.setDefaults({\n\t\tdateFormat: Core.state.dateFormat.toLowerCase().replace('m', 'mm').replace('y', 'yy').replace('d', 'dd'),\n\t});\n\n\treturn Core.$(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}\n","export default \"/* ui-datepicker */\\n.ui-datepicker {\\n\\t--datepicker-day-color: var(--color-layout-front-1);\\n\\t--datepicker-day-color-hover: var(--color-layer-1);\\n\\t--datepicker-selected-color: var(--color-bg-primary-1);\\n\\t--datepicker-selected-color-hover: var(--color-bg-primary-2);\\n\\t--datepicker-range-color: var(--color-layer-primary-1);\\n\\t--datepicker-range-color-hover: var(--color-layer-primary-2);\\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(--color-layout-front-1);\\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-1);\\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-1);\\n}\\n\\n.ui-datepicker-year {\\n\\tcolor: var(--color-text-2);\\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\\tcolor: var(--color-text-3);\\n\\tcontent: \\\"\\\";\\n}\\n\\n.ui-datepicker-prev-hover:before {\\n\\tcolor: var(--color-text-1);\\n\\tcontent: \\\"\\\";\\n}\\n\\n.ui-datepicker-next {\\n\\tcolor: var(--color-text-3);\\n\\torder: 1;\\n}\\n\\n.ui-datepicker-next-hover {\\n\\tcolor: var(--color-text-1);\\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: var(--color-text-3);\\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\\tcolor: var(--color-text-1);\\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-1) !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-text-primary);\\n}\\n\\n.ui-datepicker-day-marks-update {\\n\\tbackground: var(--color-text-negative);\\n}\\n\\n.ui-datepicker-row-break {\\n\\tdisplay: none;\\n}\\n\""],"names":["Core","$","el","forms","connectDatepicker","options","dateFormatted","delimiter","dateNumbersCount","delimitersIndexes","watch","_a","i","valueChunkLeft","value","selectionPos","valueChunkRight","extraNumbersCount","valueChunkRightMaxLength","delimiterIndex"],"mappings":"0HAMAA,EAAAA,KAAAA,kBCNA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,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"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"notice-BA5zBdx2.es.js","sources":["../../src/components/core/notice/utils.ts","../../src/components/core/notice/item/item.vue","../../src/components/core/notice/notice.vue"],"sourcesContent":["import { reactive } from 'vue';\nimport type { Props as ItemProps, Props, Style } from '@/components/core/notice/item/types';\nimport Core from '@/core/core/core.js';\nimport { genIntHash } from '@/core/utils/string';\n\nexport const transitionDuration = 300;\n\nexport type Item = Props & { onClose?: Function };\n\nexport const itemById = reactive(new Map<string, Item>());\n\nconst genItemId = (text: ItemProps['text'], style: ItemProps['style'], options?: Options) => {\n\treturn 'top-notice_' + genIntHash(text + style + JSON.stringify(options));\n};\n\nexport type Options = {\n\ttitle?: ItemProps['title'],\n\tmetaText?: ItemProps['metaText'],\n\tbuttonProps?: ItemProps['buttonProps'],\n\tisSafeHTML?: ItemProps['isSafeHTML'],\n\tonClose?: Function\n}\n\n/**\n * Показать сообщением в стиле push уведомления\n *\n * title будет получен из первой строки text\n *\n * Если в options указан title, он будет взят оттуда\n */\nexport const show = (text: string, style: Style = 'info', options?: Options) => {\n\tlet title = '';\n\n\ttext = String(text);\n\n\tconst id = genItemId(text, style, options);\n\n\tif (options?.title) {\n\t\ttitle = options.title;\n\t} else {\n\t\tconst chunks = text.split('\\n');\n\n\t\tif (chunks.length) {\n\t\t\ttitle = String(chunks.shift());\n\t\t\ttext = chunks.join('\\n');\n\t\t}\n\t}\n\n\tconst itemExists = itemById.get(id);\n\tif (itemExists) {\n\t\thightlight(itemExists);\n\n\t\treturn;\n\t}\n\n\tconst item: Item = {\n\t\tid,\n\t\ttitle,\n\t\ttext,\n\t\tstyle,\n\t\tbuttonProps: options?.buttonProps,\n\t\tmetaText: options?.metaText,\n\t\tisSafeHTML: options?.isSafeHTML,\n\t\tonClose: options?.onClose,\n\t};\n\n\titemById.set(item.id, item);\n\n\tif (itemById.size > 5) {\n\t\tconst [_firstId, firstItem] = [...itemById].at(0) || [];\n\t\tif (firstItem) close(firstItem);\n\t}\n\n\t/**\n\t * Автозакрытие ошибок форм\n\t *\n\t * Добавляет\n\t */\n\tif (Core.state.isMobile) {\n\t\t$('input').one('click', () => close(item));\n\t}\n};\n\nconst hightlight = (item: Item) => {\n\titem.hightlight = true;\n\n\tsetTimeout(() => item.hightlight = false, transitionDuration);\n};\n\nconst close = (item: Item) => {\n\titem.forceClosed = true;\n\n\tsetTimeout(() => {\n\t\titem.onClose?.();\n\n\t\titemById.delete(item.id);\n\t}, transitionDuration);\n};\n\n/**\n * Убрать подозрительный html код\n */\nexport const prepareText = (text: string) => {\n\tconst textNoSafety = 'hacking was detected';\n\n\ttext = text.replace(/<script/g, textNoSafety);\n\ttext = text.replace(/<img/g, textNoSafety);\n\ttext = text.replace(/<iframe/g, textNoSafety);\n\ttext = text.replace(/javascript:/g, textNoSafety);\n\ttext = text.replace(/<[^>]+ (@|on)\\w+=[^>]+>?/g, textNoSafety);\n\n\treturn text;\n};\n","<script setup lang=\"ts\">\nimport { computed, ref } from 'vue';\n\nimport Core from '@/core/core/core.js';\nimport { nl2br } from '@/core/utils/string';\n\nimport type { Emits, Props } from './types';\nimport { prepareText, transitionDuration } from '@/components/core/notice/utils';\n\nconst props = defineProps<Props>();\n\nconst emit = defineEmits<Emits>();\n\n// анимация появления\nconst showed = ref(false);\nsetTimeout(() => showed.value = true, 10);\n\n// анимация закрытия\nconst closed = ref(false);\nconst closedDirection = ref<'top' | 'right' | 'bottom' | 'left'>('right');\n\nconst title = computed(() => {\n\tlet res = props.title.replace(/ {2}/g, '&nbsp;');\n\n\tif (!props.isSafeHTML) res = prepareText(res);\n\n\treturn res;\n});\n\nconst text = computed(() => {\n\tlet res = nl2br(props.text);\n\n\tres = res.replace(/ {2}/g, '&nbsp;');\n\n\tif (!props.isSafeHTML) res = prepareText(res);\n\n\treturn res;\n});\n\nconst close = (direction?: typeof closedDirection.value) => {\n\tclosed.value = true;\n\n\tif (direction) {\n\t\tclosedDirection.value = direction;\n\t}\n\n\tsetTimeout(() => emit('close'), transitionDuration);\n};\n\nconst onClick = (e: MouseEvent) => {\n\tconst { tagName } = e.target as HTMLElement;\n\n\tif (tagName === 'A') close();\n};\n\nconst vSwipe = {\n\tmounted: (el: HTMLElement) => {\n\t\tif (!Core.state.isMobile) return;\n\n\t\tif (!Core.$ || !Core.$.ui['draggable']) return;\n\n\t\tlet direction: typeof closedDirection.value = 'right';\n\n\t\tlet axis = 'x';\n\t\t// if (getOS() === 'iOS') axis = 'y';\n\n\t\tCore.$(el).draggable({\n\t\t\trevert: false,\n\t\t\taxis,\n\t\t\tdrag: (e, ui) => {\n\t\t\t\tif (axis == 'x') {\n\t\t\t\t\tdirection = ui.position.left > 0 ? 'right' : 'left';\n\t\t\t\t} else {\n\t\t\t\t\tdirection = ui.position.top > 0 ? 'bottom' : 'top';\n\t\t\t\t}\n\t\t\t},\n\t\t\tstop: (_e, _ui) => {\n\t\t\t\tclose(direction);\n\t\t\t},\n\t\t});\n\t},\n};\n\n// const vSwipe = {\n// \tmounted: (el: HTMLElement) => {\n// \t\tconst { distanceX, direction } = usePointerSwipe(el, {\n// \t\t\tdisableTextSelect: true,\n// \t\t\tonSwipe(e: PointerEvent) {\n// \t\t\t\tleft.value = -distanceX.value + 'px';\n// \t\t\t},\n// \t\t\tonSwipeEnd: (_e, direction) => {\n// \t\t\t\tclose(direction);\n// \t\t\t},\n// \t\t});\n// \t},\n// };\n</script>\n\n<template>\n\t<div\n\t\tclass=\"top-notice_item\"\n\t\t:class=\"{\n\t\t\t['top-notice_item-' + style]: true,\n\t\t\t'top-notice_item-hightlight': hightlight,\n\t\t\t'top-notice_item-showed': showed,\n\t\t\t'top-notice_item-closed': closed || forceClosed,\n\t\t\t['top-notice_item-closed_' + closedDirection]: closed,\n\t\t}\"\n\t\t@click=\"onClick\"\n\t\tv-swipe\n\t>\n\t\t<div class=\"top-notice_itemTextWrapper\">\n\t\t\t<div v-if=\"title\" class=\"top-notice_itemTitle\" v-html=\"title\"></div>\n\t\t\t<div v-if=\"text\" class=\"top-notice_itemText\" v-html=\"text\"></div>\n\t\t</div>\n\n\t\t<TopButton\n\t\t\tv-if=\"buttonProps\"\n\t\t\tclass=\"top-notice_itemButton\"\n\t\t\tsize=\"s\"\n\t\t\t:=\"buttonProps\"\n\t\t\t:title=\"buttonProps.title\"\n\t\t\tv-html=\"buttonProps.default\"\n\t\t\t@click=\"close()\"\n\t\t/>\n\n\t\t<div v-if=\"metaText\" class=\"top-notice_itemMetaText\" v-html=\"metaText\"></div>\n\n\t\t<div\n\t\t\tclass=\"top-notice_itemClose\"\n\t\t\tdata-top-icon=\"\"\n\t\t\t:title=\"$i18n.Common.Close\"\n\t\t\t@click=\"() => close()\"\n\t\t></div>\n\t</div>\n</template>\n\n<style>\n@import \"style.css\";\n</style>\n","<!-- performance all in one file component, для Core.notice() -->\n<script lang=\"ts\">\nexport { show } from './utils';\n</script>\n\n<script setup lang=\"ts\">\nimport type { Item } from './utils';\nimport { itemById } from './utils';\n\nimport type { Props } from './types';\nimport TopNoticeItem from './item/item.vue';\n\ndefineProps<Props>();\n\nconst onCloseItem = (item: Item) => {\n\titem.onClose?.();\n\n\titemById.delete(item.id);\n};\n</script>\n\n<template>\n\t<teleport to=\"body\">\n\t\t<div class=\"top-notice\">\n\t\t\t<TopNoticeItem\n\t\t\t\tv-for=\"[_index, item] in itemById\"\n\t\t\t\t:key=\"item.id\"\n\t\t\t\t:id=\"item.id\"\n\t\t\t\t:title=\"item.title\"\n\t\t\t\t:text=\"item.text\"\n\t\t\t\t:style=\"item.style\"\n\t\t\t\t:buttonProps=\"item.buttonProps\"\n\t\t\t\t:metaText=\"item.metaText\"\n\t\t\t\t:isSafeHTML=\"item.isSafeHTML\"\n\t\t\t\t:forceClosed=\"item.forceClosed\"\n\t\t\t\t:hightlight=\"item.hightlight\"\n\t\t\t\t@close=\"onCloseItem(item)\"\n\t\t\t/>\n\t\t</div>\n\t</teleport>\n</template>\n\n<style>\n:root {\n\t--top-notice-top: var(--top-padding-4);\n\t--top-notice-right: var(--top-padding-4);\n}\n\n.top-notice {\n\twidth: 400px;\n\tfont-size: 14px;\n\tposition: fixed; top: var(--top-notice-top); right: var(--top-notice-right);\n\tz-index: 1000010;\n\tdisplay: flex; flex-direction: column-reverse; gap: var(--top-gap-2);\n}\n\n.top-notice ul {\n\tpadding: 0 0 0 var(--top-padding-5);\n}\n\n@media only screen and (max-width: 600px) {\n\t:root {\n\t\t--top-notice-top: var(--top-padding-4);\n\t\t--top-notice-right: var(--top-padding-4);\n\t}\n\n\t.top-notice { width: auto; left: var(--top-notice-right); }\n}\n</style>\n"],"names":["transitionDuration","itemById","reactive","genItemId","text","style","options","genIntHash","show","title","id","chunks","itemExists","hightlight","item","_firstId","firstItem","close","Core","_a","prepareText","textNoSafety","props","__props","emit","__emit","showed","ref","closed","closedDirection","computed","res","nl2br","direction","onClick","e","tagName","vSwipe","el","ui","_e","_ui","onCloseItem"],"mappings":";;;;;;AAKO,MAAAA,IAAA,KAIAC,IAAAC,EAAA,oBAAA,IAAA,CAAA,GAEPC,IAAA,CAAAC,GAAAC,GAAAC,MACC,gBAAAC,EAAAH,IAAAC,IAAA,KAAA,UAAAC,CAAA,CAAA,GAkBME,KAAA,CAAAJ,GAAAC,IAAA,QAAAC,MAAA;AACN,MAAAG,IAAA;AAEA,EAAAL,IAAA,OAAAA,CAAA;AAEA,QAAAM,IAAAP,EAAAC,GAAAC,GAAAC,CAAA;AAEA,MAAAA,KAAA,QA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MAAA;AAGE,YAAAN,IAAAM,EAAA,SAAA,OAAA,IAAA,UAAA;AAAA,UAGD;AAAA,UACD,MAAA,CAAAC,GAAAC,MAAA;AAEC,YAAAxB,EAAAgB,CAAA;AAAA,UAAe;AAAA,QAChB,CAAA;AAAA,MACA;AAAA,IACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AClED,UAAAS,IAAA,CAAA5B,MAAA;;AACC,OAAAK,IAAAL,EAAA,YAAA,QAAAK,EAAA,KAAAL,IAEAb,EAAA,OAAAa,EAAA,EAAA;AAAA,IAAuB;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"notice-BPG1753z.amd.js","sources":["../../src/components/core/notice/utils.ts","../../src/components/core/notice/item/item.vue","../../src/components/core/notice/notice.vue"],"sourcesContent":["import { reactive } from 'vue';\nimport type { Props as ItemProps, Props, Style } from '@/components/core/notice/item/types';\nimport Core from '@/core/core/core.js';\nimport { genIntHash } from '@/core/utils/string';\n\nexport const transitionDuration = 300;\n\nexport type Item = Props & { onClose?: Function };\n\nexport const itemById = reactive(new Map<string, Item>());\n\nconst genItemId = (text: ItemProps['text'], style: ItemProps['style'], options?: Options) => {\n\treturn 'top-notice_' + genIntHash(text + style + JSON.stringify(options));\n};\n\nexport type Options = {\n\ttitle?: ItemProps['title'],\n\tmetaText?: ItemProps['metaText'],\n\tbuttonProps?: ItemProps['buttonProps'],\n\tisSafeHTML?: ItemProps['isSafeHTML'],\n\tonClose?: Function\n}\n\n/**\n * Показать сообщением в стиле push уведомления\n *\n * title будет получен из первой строки text\n *\n * Если в options указан title, он будет взят оттуда\n */\nexport const show = (text: string, style: Style = 'info', options?: Options) => {\n\tlet title = '';\n\n\ttext = String(text);\n\n\tconst id = genItemId(text, style, options);\n\n\tif (options?.title) {\n\t\ttitle = options.title;\n\t} else {\n\t\tconst chunks = text.split('\\n');\n\n\t\tif (chunks.length) {\n\t\t\ttitle = String(chunks.shift());\n\t\t\ttext = chunks.join('\\n');\n\t\t}\n\t}\n\n\tconst itemExists = itemById.get(id);\n\tif (itemExists) {\n\t\thightlight(itemExists);\n\n\t\treturn;\n\t}\n\n\tconst item: Item = {\n\t\tid,\n\t\ttitle,\n\t\ttext,\n\t\tstyle,\n\t\tbuttonProps: options?.buttonProps,\n\t\tmetaText: options?.metaText,\n\t\tisSafeHTML: options?.isSafeHTML,\n\t\tonClose: options?.onClose,\n\t};\n\n\titemById.set(item.id, item);\n\n\tif (itemById.size > 5) {\n\t\tconst [_firstId, firstItem] = [...itemById].at(0) || [];\n\t\tif (firstItem) close(firstItem);\n\t}\n\n\t/**\n\t * Автозакрытие ошибок форм\n\t *\n\t * Добавляет\n\t */\n\tif (Core.state.isMobile) {\n\t\t$('input').one('click', () => close(item));\n\t}\n};\n\nconst hightlight = (item: Item) => {\n\titem.hightlight = true;\n\n\tsetTimeout(() => item.hightlight = false, transitionDuration);\n};\n\nconst close = (item: Item) => {\n\titem.forceClosed = true;\n\n\tsetTimeout(() => {\n\t\titem.onClose?.();\n\n\t\titemById.delete(item.id);\n\t}, transitionDuration);\n};\n\n/**\n * Убрать подозрительный html код\n */\nexport const prepareText = (text: string) => {\n\tconst textNoSafety = 'hacking was detected';\n\n\ttext = text.replace(/<script/g, textNoSafety);\n\ttext = text.replace(/<img/g, textNoSafety);\n\ttext = text.replace(/<iframe/g, textNoSafety);\n\ttext = text.replace(/javascript:/g, textNoSafety);\n\ttext = text.replace(/<[^>]+ (@|on)\\w+=[^>]+>?/g, textNoSafety);\n\n\treturn text;\n};\n","<script setup lang=\"ts\">\nimport { computed, ref } from 'vue';\n\nimport Core from '@/core/core/core.js';\nimport { nl2br } from '@/core/utils/string';\n\nimport type { Emits, Props } from './types';\nimport { prepareText, transitionDuration } from '@/components/core/notice/utils';\n\nconst props = defineProps<Props>();\n\nconst emit = defineEmits<Emits>();\n\n// анимация появления\nconst showed = ref(false);\nsetTimeout(() => showed.value = true, 10);\n\n// анимация закрытия\nconst closed = ref(false);\nconst closedDirection = ref<'top' | 'right' | 'bottom' | 'left'>('right');\n\nconst title = computed(() => {\n\tlet res = props.title.replace(/ {2}/g, '&nbsp;');\n\n\tif (!props.isSafeHTML) res = prepareText(res);\n\n\treturn res;\n});\n\nconst text = computed(() => {\n\tlet res = nl2br(props.text);\n\n\tres = res.replace(/ {2}/g, '&nbsp;');\n\n\tif (!props.isSafeHTML) res = prepareText(res);\n\n\treturn res;\n});\n\nconst close = (direction?: typeof closedDirection.value) => {\n\tclosed.value = true;\n\n\tif (direction) {\n\t\tclosedDirection.value = direction;\n\t}\n\n\tsetTimeout(() => emit('close'), transitionDuration);\n};\n\nconst onClick = (e: MouseEvent) => {\n\tconst { tagName } = e.target as HTMLElement;\n\n\tif (tagName === 'A') close();\n};\n\nconst vSwipe = {\n\tmounted: (el: HTMLElement) => {\n\t\tif (!Core.state.isMobile) return;\n\n\t\tif (!Core.$ || !Core.$.ui['draggable']) return;\n\n\t\tlet direction: typeof closedDirection.value = 'right';\n\n\t\tlet axis = 'x';\n\t\t// if (getOS() === 'iOS') axis = 'y';\n\n\t\tCore.$(el).draggable({\n\t\t\trevert: false,\n\t\t\taxis,\n\t\t\tdrag: (e, ui) => {\n\t\t\t\tif (axis == 'x') {\n\t\t\t\t\tdirection = ui.position.left > 0 ? 'right' : 'left';\n\t\t\t\t} else {\n\t\t\t\t\tdirection = ui.position.top > 0 ? 'bottom' : 'top';\n\t\t\t\t}\n\t\t\t},\n\t\t\tstop: (_e, _ui) => {\n\t\t\t\tclose(direction);\n\t\t\t},\n\t\t});\n\t},\n};\n\n// const vSwipe = {\n// \tmounted: (el: HTMLElement) => {\n// \t\tconst { distanceX, direction } = usePointerSwipe(el, {\n// \t\t\tdisableTextSelect: true,\n// \t\t\tonSwipe(e: PointerEvent) {\n// \t\t\t\tleft.value = -distanceX.value + 'px';\n// \t\t\t},\n// \t\t\tonSwipeEnd: (_e, direction) => {\n// \t\t\t\tclose(direction);\n// \t\t\t},\n// \t\t});\n// \t},\n// };\n</script>\n\n<template>\n\t<div\n\t\tclass=\"top-notice_item\"\n\t\t:class=\"{\n\t\t\t['top-notice_item-' + style]: true,\n\t\t\t'top-notice_item-hightlight': hightlight,\n\t\t\t'top-notice_item-showed': showed,\n\t\t\t'top-notice_item-closed': closed || forceClosed,\n\t\t\t['top-notice_item-closed_' + closedDirection]: closed,\n\t\t}\"\n\t\t@click=\"onClick\"\n\t\tv-swipe\n\t>\n\t\t<div class=\"top-notice_itemTextWrapper\">\n\t\t\t<div v-if=\"title\" class=\"top-notice_itemTitle\" v-html=\"title\"></div>\n\t\t\t<div v-if=\"text\" class=\"top-notice_itemText\" v-html=\"text\"></div>\n\t\t</div>\n\n\t\t<TopButton\n\t\t\tv-if=\"buttonProps\"\n\t\t\tclass=\"top-notice_itemButton\"\n\t\t\tsize=\"s\"\n\t\t\t:=\"buttonProps\"\n\t\t\t:title=\"buttonProps.title\"\n\t\t\tv-html=\"buttonProps.default\"\n\t\t\t@click=\"close()\"\n\t\t/>\n\n\t\t<div v-if=\"metaText\" class=\"top-notice_itemMetaText\" v-html=\"metaText\"></div>\n\n\t\t<div\n\t\t\tclass=\"top-notice_itemClose\"\n\t\t\tdata-top-icon=\"\"\n\t\t\t:title=\"$i18n.Common.Close\"\n\t\t\t@click=\"() => close()\"\n\t\t></div>\n\t</div>\n</template>\n\n<style>\n@import \"style.css\";\n</style>\n","<!-- performance all in one file component, для Core.notice() -->\n<script lang=\"ts\">\nexport { show } from './utils';\n</script>\n\n<script setup lang=\"ts\">\nimport type { Item } from './utils';\nimport { itemById } from './utils';\n\nimport type { Props } from './types';\nimport TopNoticeItem from './item/item.vue';\n\ndefineProps<Props>();\n\nconst onCloseItem = (item: Item) => {\n\titem.onClose?.();\n\n\titemById.delete(item.id);\n};\n</script>\n\n<template>\n\t<teleport to=\"body\">\n\t\t<div class=\"top-notice\">\n\t\t\t<TopNoticeItem\n\t\t\t\tv-for=\"[_index, item] in itemById\"\n\t\t\t\t:key=\"item.id\"\n\t\t\t\t:id=\"item.id\"\n\t\t\t\t:title=\"item.title\"\n\t\t\t\t:text=\"item.text\"\n\t\t\t\t:style=\"item.style\"\n\t\t\t\t:buttonProps=\"item.buttonProps\"\n\t\t\t\t:metaText=\"item.metaText\"\n\t\t\t\t:isSafeHTML=\"item.isSafeHTML\"\n\t\t\t\t:forceClosed=\"item.forceClosed\"\n\t\t\t\t:hightlight=\"item.hightlight\"\n\t\t\t\t@close=\"onCloseItem(item)\"\n\t\t\t/>\n\t\t</div>\n\t</teleport>\n</template>\n\n<style>\n:root {\n\t--top-notice-top: var(--top-padding-4);\n\t--top-notice-right: var(--top-padding-4);\n}\n\n.top-notice {\n\twidth: 400px;\n\tfont-size: 14px;\n\tposition: fixed; top: var(--top-notice-top); right: var(--top-notice-right);\n\tz-index: 1000010;\n\tdisplay: flex; flex-direction: column-reverse; gap: var(--top-gap-2);\n}\n\n.top-notice ul {\n\tpadding: 0 0 0 var(--top-padding-5);\n}\n\n@media only screen and (max-width: 600px) {\n\t:root {\n\t\t--top-notice-top: var(--top-padding-4);\n\t\t--top-notice-right: var(--top-padding-4);\n\t}\n\n\t.top-notice { width: auto; left: var(--top-notice-right); }\n}\n</style>\n"],"names":["utils_string","text","style","options","show","title","chunks","hightlight","itemExists","id","itemById","_firstId","firstItem","close","forms","item","_a","prepareText","textNoSafety","props","__props","emit","__emit","showed","vue","closed","closedDirection","res","direction","onClick","e","tagName","el","ui","_e","_ui","onCloseItem"],"mappings":"yOAYC,cAAAA,EAAA,WAAAC,EAAAC,EAAA,KAAA,UAAAC,CAAA,CAAA,EAkBMC,EAAA,CAAAH,EAAAC,EAAA,OAAAC,IAAA,CACN,IAAAE,EAAA,GAEAJ,EAAA,OAAAA,CAAA,mBAIA,GAAAE,GAAA,MAAAA,EAAA,MACCE,EAAAF,EAAA,UAAgB;GAIhBG,EAAA;2BAQAC,EAAAC,CAAA,EAEA,gBAGkB,GAAAC,EAClB,MAAAJ,EACA,KAAAJ,E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