@topvisor/ui 1.5.9-pnpm.4 → 1.5.9-pnpm.6

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 (45) hide show
  1. package/.chunks/formsExt-DtFeVRvE.es.amd.js +2 -0
  2. package/.chunks/formsExt-DtFeVRvE.es.amd.js.map +1 -0
  3. package/.chunks/{formsExt-BD8Sap5u.es.js → formsExt-DtFeVRvE.es.js} +155 -155
  4. package/.chunks/formsExt-DtFeVRvE.es.js.map +1 -0
  5. package/assets/schedule.css +1 -1
  6. package/assets/themes/dark-th.css +1 -1
  7. package/assets/themes/dark.css +1 -1
  8. package/assets/themes/light.css +1 -1
  9. package/autoload-css-manifest.amd.json +1 -1
  10. package/autoload-css-manifest.json +1 -1
  11. package/formsExt/formsExt.amd.js +1 -1
  12. package/formsExt/formsExt.amd.js.map +1 -1
  13. package/formsExt/formsExt.js +1 -1
  14. package/package.json +2 -1
  15. package/project/project.amd.js +1 -1
  16. package/project/project.amd.js.map +1 -1
  17. package/project/project.js +349 -348
  18. package/project/project.js.map +1 -1
  19. package/schedule/schedule.amd.js +1 -1
  20. package/schedule/schedule.amd.js.map +1 -1
  21. package/schedule/schedule.js +346 -276
  22. package/schedule/schedule.js.map +1 -1
  23. package/src/api/api/types/client/request.d.ts +3 -1
  24. package/src/components/project/groupSelector/groups/utils.d.ts +0 -1
  25. package/src/components/project/projectSelector/utils.d.ts +8 -2
  26. package/src/components/project/regionSelector/types.d.ts +17 -10
  27. package/src/components/project/regionSelector/utils/utils.d.ts +14 -14
  28. package/src/components/schedule/schedule/compoents/calendar/composables/useDaysByCalendarMode.d.ts +6 -0
  29. package/src/components/schedule/schedule/compoents/calendar/types.d.ts +23 -22
  30. package/src/components/schedule/schedule/compoents/{email → emails}/selector/types.d.ts +2 -2
  31. package/src/components/schedule/schedule/compoents/{email → emails}/types.d.ts +1 -2
  32. package/src/components/schedule/schedule/compoents/{reportSend → socials}/types.d.ts +5 -4
  33. package/src/components/schedule/schedule/compoents/timeSelector/types.d.ts +4 -13
  34. package/src/components/schedule/schedule/composables/useModeOptions.d.ts +8 -0
  35. package/src/components/schedule/schedule/composables/useModelByModeCache.d.ts +9 -0
  36. package/src/components/schedule/schedule/types.d.ts +29 -46
  37. package/src/components/schedule/schedule/utils.d.ts +19 -0
  38. package/src/components/schedule/schedule.d.ts +2 -7
  39. package/utils/searchers.amd.js.map +1 -1
  40. package/utils/searchers.js.map +1 -1
  41. package/.chunks/formsExt-BD8Sap5u.es.amd.js +0 -2
  42. package/.chunks/formsExt-BD8Sap5u.es.amd.js.map +0 -1
  43. package/.chunks/formsExt-BD8Sap5u.es.js.map +0 -1
  44. package/src/components/schedule/schedule/compoents/calendar/utils.d.ts +0 -10
  45. package/src/components/schedule/schedule/compoents/timeSelectors/types.d.ts +0 -10
@@ -5,154 +5,328 @@
5
5
  _autoloadCSSCore.insertCSSLinkToPage(fileNames, true);
6
6
  /* end import css */
7
7
 
8
- import { E as e, O as t, c as n, h as r, n as i, u as a } from "../.chunks/forms-Ch1q0UUt.es.js";
8
+ import { E as e, O as t, c as n, h as r, n as i } from "../.chunks/forms-Ch1q0UUt.es.js";
9
9
  import "../.chunks/app-CY6euLQJ.es.js";
10
- import { isEmail as o } from "../utils/check.js";
11
- import { numberEnding as s } from "../utils/string.js";
12
- import { Fragment as c, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createTextVNode as m, createVNode as h, defineComponent as g, nextTick as _, normalizeClass as v, onBeforeUnmount as y, onMounted as b, openBlock as x, ref as S, renderList as C, renderSlot as w, resolveComponent as T, toDisplayString as E, toRaw as ee, unref as D, vModelCheckbox as O, withCtx as k, withDirectives as te, withKeys as ne, withModifiers as A } from "vue";
13
- //#region src/components/schedule/schedule/schedule.vue?vue&type=script&setup=true&lang.ts
14
- var j = { class: "top-schedule_header" }, M = { class: "top-schedule_headerTitle" }, N = {
15
- key: 0,
16
- class: "top-schedule_body"
17
- }, P = /* @__PURE__ */ g({
18
- name: "TopSchedule",
19
- __name: "schedule",
20
- props: {
21
- styling: {},
22
- triggerType: { default: "onDemand" },
23
- triggerTypes: {},
24
- triggerTypeOptions: {},
25
- title: {}
26
- },
27
- emits: ["update:triggerType"],
28
- setup(t, { emit: n, slots: r }) {
29
- let a = t, o = e(), s = {
30
- go: o.Projects.Checks,
31
- report: o.Projects.Reports,
32
- neutral: ""
33
- }, c = a.title ?? s[a.styling];
34
- return (e, a) => (x(), f("div", { class: v({
35
- "top-schedule": !0,
36
- [`top-schedule-style_${t.styling}`]: !0
37
- }) }, [p("div", j, [p("div", M, E(D(c)), 1), h(i, {
38
- class: "top-schedule_headerTriggerType",
39
- modelValue: t.triggerType,
40
- "onUpdate:modelValue": a[0] ||= (e) => n("update:triggerType", e),
41
- options: t.triggerTypeOptions,
42
- size: "s"
43
- }, null, 8, ["modelValue", "options"])]), t.triggerType !== "onDemand" && r.body ? (x(), f("div", N, [w(e.$slots, "body")])) : d("", !0)], 2));
44
- }
45
- }), F = {}, I = { class: "top-schedule_bodyContainer" };
46
- function L(e, t) {
47
- return x(), f("div", I, [w(e.$slots, "default")]);
48
- }
49
- var R = /*#__PURE__*/ a(F, [["render", L]]), z = (t) => {
10
+ import { isEmail as a } from "../utils/check.js";
11
+ import { numberEnding as o } from "../utils/string.js";
12
+ import { Fragment as s, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createTextVNode as p, createVNode as m, defineComponent as h, mergeModels as g, nextTick as _, normalizeClass as v, onBeforeUnmount as y, onMounted as b, openBlock as x, ref as S, renderList as C, renderSlot as w, resolveComponent as T, toDisplayString as E, toValue as D, unref as O, useModel as k, watch as A, withCtx as j, withKeys as ee, withModifiers as M } from "vue";
13
+ //#region src/components/schedule/schedule/compoents/calendar/composables/useDaysByCalendarMode.ts
14
+ var N = (t) => {
50
15
  let n = e();
51
- switch (t) {
52
- case "dayOfMonth": {
53
- let e = Array.from({ length: 27 }, (e, t) => ({
54
- value: String(t + 1),
55
- title: String(t + 1)
56
- }));
57
- return e.push({
58
- value: "LAST_OF_MONTH",
59
- title: "",
60
- isIcon: !0
61
- }), e;
62
- }
63
- case "dayOfWeek": return [
64
- {
65
- value: "MONDAY",
66
- title: n.Calendar.Dw_1
67
- },
68
- {
69
- value: "TUESDAY",
70
- title: n.Calendar.Dw_2
71
- },
72
- {
73
- value: "WEDNESDAY",
74
- title: n.Calendar.Dw_3
75
- },
76
- {
77
- value: "THURSDAY",
78
- title: n.Calendar.Dw_4
79
- },
80
- {
81
- value: "FRIDAY",
82
- title: n.Calendar.Dw_5
83
- },
84
- {
85
- value: "SATURDAY",
86
- title: n.Calendar.Dw_6
87
- },
88
- {
89
- value: "SUNDAY",
90
- title: n.Calendar.Dw_7
16
+ return c(() => {
17
+ switch (D(t)) {
18
+ case "dayOfMonth": {
19
+ let e = Array.from({ length: 27 }, (e, t) => ({
20
+ value: String(t + 1),
21
+ title: String(t + 1)
22
+ }));
23
+ return e.push({
24
+ value: "LAST_OF_MONTH",
25
+ title: "",
26
+ isIcon: !0
27
+ }), e;
91
28
  }
92
- ];
29
+ case "dayOfWeek": return [
30
+ {
31
+ value: "MONDAY",
32
+ title: n.Calendar.Dw_1
33
+ },
34
+ {
35
+ value: "TUESDAY",
36
+ title: n.Calendar.Dw_2
37
+ },
38
+ {
39
+ value: "WEDNESDAY",
40
+ title: n.Calendar.Dw_3
41
+ },
42
+ {
43
+ value: "THURSDAY",
44
+ title: n.Calendar.Dw_4
45
+ },
46
+ {
47
+ value: "FRIDAY",
48
+ title: n.Calendar.Dw_5
49
+ },
50
+ {
51
+ value: "SATURDAY",
52
+ title: n.Calendar.Dw_6
53
+ },
54
+ {
55
+ value: "SUNDAY",
56
+ title: n.Calendar.Dw_7
57
+ }
58
+ ];
59
+ default: return [];
60
+ }
61
+ });
62
+ }, P = { class: "top-scheduleTimeSelector" }, F = /* @__PURE__ */ h({
63
+ __name: "timeSelector",
64
+ props: /*@__PURE__*/ g({
65
+ modelValue: {},
66
+ multipleTimes: { type: Boolean }
67
+ }, {
68
+ modelValue: { required: !0 },
69
+ modelModifiers: {}
70
+ }),
71
+ emits: ["update:modelValue"],
72
+ setup(e) {
73
+ let t = e, n = k(e, "modelValue"), r = Array.from({ length: 24 }, (e, t) => ({
74
+ value: String(t),
75
+ title: String(t).padStart(2, "0")
76
+ })), i = Array.from({ length: 4 }, (e, t) => {
77
+ let n = t * 15;
78
+ return {
79
+ value: String(n),
80
+ title: String(n).padStart(2, "0")
81
+ };
82
+ }), a = (e, t) => {
83
+ let r = [...n.value];
84
+ r[e] = {
85
+ ...r[e],
86
+ ...t
87
+ }, n.value = r;
88
+ }, o = () => {
89
+ n.value = [{
90
+ hour: "0",
91
+ minute: "0"
92
+ }, ...n.value];
93
+ }, c = (e) => {
94
+ n.value = n.value.filter((t, n) => n !== e);
95
+ };
96
+ return (e, f) => {
97
+ let p = T("TopSelect"), h = T("TopButton");
98
+ return x(), d("div", P, [(x(!0), d(s, null, C(n.value, (e, s) => (x(), d("div", {
99
+ key: s,
100
+ class: "top-scheduleTimeSelector_item"
101
+ }, [
102
+ m(p, {
103
+ class: "top-scheduleTimeSelector_hour",
104
+ modelValue: e.hour,
105
+ options: O(r),
106
+ "onUpdate:modelValue": (e) => a(s, { hour: e })
107
+ }, null, 8, [
108
+ "modelValue",
109
+ "options",
110
+ "onUpdate:modelValue"
111
+ ]),
112
+ m(p, {
113
+ class: "top-scheduleTimeSelector_minute",
114
+ modelValue: e.minute,
115
+ options: O(i),
116
+ availableCustomValue: "",
117
+ "onUpdate:modelValue": (e) => a(s, { minute: e })
118
+ }, null, 8, [
119
+ "modelValue",
120
+ "options",
121
+ "onUpdate:modelValue"
122
+ ]),
123
+ t.multipleTimes || n.value.length > 1 ? (x(), l(h, {
124
+ key: 0,
125
+ onClick: (e) => s ? c(s) : o(),
126
+ color: "theme",
127
+ icon: s ? "" : ""
128
+ }, null, 8, ["onClick", "icon"])) : u("", !0)
129
+ ]))), 128))]);
130
+ };
93
131
  }
94
- }, B = { class: "top-scheduleCalendar" }, V = { class: "top-scheduleCalendar_header" }, H = { class: "top-scheduleCalendar_calendar" }, U = ["value"], W = ["data-top-icon"], G = /* @__PURE__ */ g({
132
+ }), I = { class: "top-scheduleCalendar" }, L = { class: "top-scheduleCalendar_header" }, R = { class: "top-scheduleCalendar_calendar" }, z = [
133
+ "value",
134
+ "checked",
135
+ "onChange"
136
+ ], B = ["data-top-icon"], V = /* @__PURE__ */ h({
95
137
  __name: "calendar",
96
- props: {
138
+ props: /*@__PURE__*/ g({
97
139
  modelValue: {},
98
140
  mode: {},
99
- timesCount: { default: 1 }
100
- },
101
- emits: ["update:modelValue"],
102
- setup(t, { emit: n }) {
103
- let r = e(), i = t, a = n, o = l({
104
- get: () => i.modelValue,
105
- set: (e) => a("update:modelValue", e)
106
- }), u = l(() => z(i.mode)), g = {
107
- dayOfWeek: {
108
- totalDaysCount: 7,
109
- period: r.Common.a_week
110
- },
111
- dayOfMonth: {
112
- totalDaysCount: 28,
113
- period: r.Common.a_month
114
- }
115
- }, _ = l(() => {
116
- let e = o.value.length, { totalDaysCount: t, period: n } = g[i.mode], a = e === t;
117
- if (a && i.timesCount === 1) return r.Common.Every_day;
118
- let c = i.timesCount === 1 ? e : i.timesCount;
119
- return `${a ? r.Common.Every_day : `${e}`}${i.timesCount > 1 ? ` × ${i.timesCount}` : ""} ${s(c, r.Common.time_a_0, r.Common.time_a_0, r.Common.time_a_2)} ${n}`;
120
- }), y = l(() => o.value.length > 1), b = () => {
121
- o.value = y.value ? [] : u.value.map((e) => e.value);
141
+ times: {},
142
+ multipleTimes: { type: Boolean }
143
+ }, {
144
+ modelValue: { required: !0 },
145
+ modelModifiers: {},
146
+ times: { required: !0 },
147
+ timesModifiers: {}
148
+ }),
149
+ emits: ["update:modelValue", "update:times"],
150
+ setup(e) {
151
+ let t = e, n = k(e, "modelValue"), r = k(e, "times"), i = N(() => t.mode), a = c(() => n.value.includes("ALL") || n.value.length === i.value.length), l = (e) => {
152
+ let t = n.value.includes("ALL") ? i.value.map((e) => e.value) : [...n.value], r = t.indexOf(e);
153
+ r === -1 ? t.push(e) : t.splice(r, 1), n.value = t.length === i.value.length ? ["ALL"] : t;
154
+ }, h = () => {
155
+ n.value = a.value ? [] : ["ALL"];
122
156
  };
123
- return (e, t) => {
124
- let n = T("TopButton");
125
- return x(), f("div", B, [
126
- p("div", V, [w(e.$slots, "header"), h(n, {
127
- class: "top-scheduleCalendar_headerButton",
128
- onClick: b,
157
+ return (t, c) => {
158
+ let g = T("TopButton");
159
+ return x(), d("div", I, [
160
+ f("div", L, [m(F, {
161
+ modelValue: r.value,
162
+ "onUpdate:modelValue": c[0] ||= (e) => r.value = e,
163
+ multipleTimes: e.multipleTimes
164
+ }, null, 8, ["modelValue", "multipleTimes"]), m(g, {
165
+ onClick: c[1] ||= (e) => h(),
129
166
  color: "theme",
130
167
  tabindex: "0"
131
168
  }, {
132
- default: k(() => [m(E(y.value ? e.$i18n.Common.Clear : e.$i18n.Common.Select_all), 1)]),
169
+ default: j(() => [p(E(a.value ? t.$i18n.Common.Clear : t.$i18n.Common.Select_all), 1)]),
133
170
  _: 1
134
171
  })]),
135
- p("div", H, [(x(!0), f(c, null, C(u.value, (e) => (x(), f("label", {
172
+ f("div", R, [(x(!0), d(s, null, C(O(i), (e) => (x(), d("label", {
136
173
  class: "top-scheduleCalendar_calendarDay",
137
174
  key: e.value
138
- }, [te(p("input", {
139
- class: "top-scheduleCalendar_calendarDayRadio",
175
+ }, [f("input", {
176
+ class: "top-scheduleCalendar_calendarDayCheckbox",
140
177
  type: "checkbox",
141
178
  value: e.value,
142
- "onUpdate:modelValue": t[0] ||= (e) => o.value = e,
179
+ checked: n.value.includes("ALL") || n.value.includes(e.value),
180
+ onChange: (t) => l(e.value),
143
181
  tabindex: "0"
144
- }, null, 8, U), [[O, o.value]]), p("span", {
182
+ }, null, 40, z), f("span", {
145
183
  class: "top-scheduleCalendar_calendarDayTitle",
146
184
  "data-top-icon": e.isIcon ? e.title : void 0
147
- }, [e.isIcon ? d("", !0) : (x(), f(c, { key: 0 }, [m(E(e.title), 1)], 64))], 8, W)]))), 128))]),
148
- p("span", { class: v({
185
+ }, [e.isIcon ? u("", !0) : (x(), d(s, { key: 0 }, [p(E(e.title), 1)], 64))], 8, B)]))), 128))]),
186
+ f("span", { class: v({
149
187
  "top-scheduleCalendar_selectionSummary": !0,
150
- "top-error": !o.value.length
151
- }) }, E(_.value), 3)
188
+ "top-error": !n.value.length
189
+ }) }, [p(E(a.value ? t.$i18n.Common.Every_day : n.value.length) + " ", 1), r.value.length > 1 || !a.value ? (x(), d(s, { key: 0 }, [p(E(r.value.length > 1 ? ` × ${r.value.length}` : "") + " " + E(O(o)(r.value.length === 1 ? n.value.length : r.value.length, t.$i18n.Common.time_a_0, t.$i18n.Common.time_a_0, t.$i18n.Common.time_a_2)) + " " + E(e.mode === "dayOfWeek" ? t.$i18n.Common.a_week : t.$i18n.Common.a_month), 1)], 64)) : u("", !0)], 2)
152
190
  ]);
153
191
  };
154
192
  }
155
- }), K = /* @__PURE__ */ g({
193
+ }), H = () => {
194
+ let t = e();
195
+ return [{
196
+ value: "0",
197
+ title: t.Projects.immediately
198
+ }, ...Array.from({ length: 24 }, (e, n) => ({
199
+ value: String(n + 1),
200
+ title: t("Projects", "in_hour", { hour: n + 1 })
201
+ }))];
202
+ }, U = (e) => e === "dayOfWeek" || e === "dayOfMonth", W = (e, t = "onDemand") => e.includes("YANDEX_UPDATE") ? "afterYandexUpdated" : e.includes("CHECK_POSITIONS") ? "afterCheck" : e.includes("LAST_OF_MONTH") || e.some((e) => /^\d+$/.test(e)) ? "dayOfMonth" : e.length ? U(t) ? t : "dayOfWeek" : t, G = [
203
+ "onDemand",
204
+ "dayOfWeek",
205
+ "dayOfMonth"
206
+ ], K = (t, n) => {
207
+ let r = e();
208
+ return c(() => {
209
+ let e = t.type === "report" ? [...G, "afterCheck"] : [...G];
210
+ t.extraMods && e.push(...t.extraMods), e.includes(n.value) || e.push(n.value);
211
+ let i = {
212
+ onDemand: r.Projects.Settings_on_demand,
213
+ dayOfWeek: r.Projects.Report_on_weekdays,
214
+ dayOfMonth: r.Projects.Settings_particular_days,
215
+ afterYandexUpdated: r.Projects.After_updates,
216
+ afterCheck: e.includes("afterCheck") ? r.Dynamics.Report_after_tracking_30min_1 : ""
217
+ };
218
+ return e.map((e) => ({
219
+ value: e,
220
+ title: i[e]
221
+ }));
222
+ });
223
+ }, q = (e) => ({
224
+ days: [...e.days],
225
+ times: e.times.map((e) => ({ ...e }))
226
+ }), te = (e, t) => {
227
+ let n = {
228
+ daysByMode: {},
229
+ timesByMode: {}
230
+ };
231
+ return A(e, () => {
232
+ let r = q(e.value);
233
+ n.daysByMode[t.value] = r.days, n.timesByMode[U(t.value) ? "calendar" : t.value] = r.times;
234
+ }, {
235
+ deep: !0,
236
+ immediate: !0
237
+ }), n;
238
+ }, J = { class: "top-schedule_header" }, Y = { class: "top-schedule_headerTitle" }, X = {
239
+ key: 0,
240
+ class: "top-schedule_body"
241
+ }, Z = { key: 2 }, Q = /* @__PURE__ */ h({
242
+ __name: "schedule",
243
+ props: /*@__PURE__*/ g({
244
+ modelValue: {},
245
+ type: { default: "go" },
246
+ extraMods: {},
247
+ multipleTimes: { type: Boolean },
248
+ title: {}
249
+ }, {
250
+ modelValue: { required: !0 },
251
+ modelModifiers: {}
252
+ }),
253
+ emits: ["update:modelValue"],
254
+ setup(e, { slots: t }) {
255
+ let n = String(Math.floor(Math.random() * 7) + 1), r = e, a = k(e, "modelValue"), o = S(W(a.value.days)), s = K(r, o), c = H(), p = te(a, o);
256
+ return A(() => a.value.days, () => o.value = W(a.value.days, o.value), {
257
+ deep: !0,
258
+ immediate: !0
259
+ }), A(o, (e) => {
260
+ let t = p.daysByMode[e], r = p.timesByMode[U(e) ? "calendar" : e];
261
+ switch (e) {
262
+ case "onDemand":
263
+ a.value = {
264
+ days: [],
265
+ times: []
266
+ };
267
+ break;
268
+ case "dayOfWeek":
269
+ case "dayOfMonth":
270
+ a.value = {
271
+ ...a.value,
272
+ days: t ?? ["ALL"],
273
+ times: r?.length ? r : [{
274
+ hour: n,
275
+ minute: "30"
276
+ }]
277
+ };
278
+ break;
279
+ case "afterYandexUpdated":
280
+ a.value = {
281
+ days: ["YANDEX_UPDATE"],
282
+ times: r?.length ? r : [{
283
+ hour: "1",
284
+ minute: "0"
285
+ }]
286
+ };
287
+ break;
288
+ case "afterCheck": a.value = {
289
+ days: ["CHECK_POSITIONS"],
290
+ times: r?.length ? r : [{
291
+ hour: "0",
292
+ minute: "30"
293
+ }]
294
+ };
295
+ }
296
+ }, { immediate: !0 }), (n, r) => (x(), d("div", { class: v(["top-schedule", "top-schedule-type_" + e.type]) }, [f("div", J, [f("div", Y, E(e.title ?? (e.type === "go" ? n.$i18n.Projects.Checks : n.$i18n.Projects.Reports)), 1), m(i, {
297
+ class: "top-schedule_headerMods",
298
+ modelValue: o.value,
299
+ "onUpdate:modelValue": r[0] ||= (e) => o.value = e,
300
+ options: O(s),
301
+ size: "s"
302
+ }, null, 8, ["modelValue", "options"])]), o.value !== "onDemand" && (O(U)(o.value) || o.value === "afterYandexUpdated" || t.settings) ? (x(), d("div", X, [
303
+ O(U)(o.value) ? (x(), l(V, {
304
+ key: 0,
305
+ modelValue: a.value.days,
306
+ "onUpdate:modelValue": r[1] ||= (e) => a.value.days = e,
307
+ times: a.value.times,
308
+ "onUpdate:times": r[2] ||= (e) => a.value.times = e,
309
+ mode: o.value,
310
+ multipleTimes: e.multipleTimes
311
+ }, null, 8, [
312
+ "modelValue",
313
+ "times",
314
+ "mode",
315
+ "multipleTimes"
316
+ ])) : u("", !0),
317
+ o.value === "afterYandexUpdated" && a.value.times[0] ? (x(), l(i, {
318
+ key: 1,
319
+ class: "top-schedule_afterYandexUpdatedDelay",
320
+ modelValue: a.value.times[0].hour,
321
+ "onUpdate:modelValue": r[3] ||= (e) => a.value.times[0].hour = e,
322
+ options: O(c),
323
+ size: "s"
324
+ }, null, 8, ["modelValue", "options"])) : u("", !0),
325
+ O(U)(o.value) || o.value === "afterYandexUpdated" && t.settings ? (x(), d("hr", Z)) : u("", !0),
326
+ w(n.$slots, "settings", { mode: o.value })
327
+ ])) : u("", !0)], 2));
328
+ }
329
+ }), ne = /* @__PURE__ */ h({
156
330
  __name: "selector",
157
331
  props: {
158
332
  modelValue: {},
@@ -163,23 +337,23 @@ var R = /*#__PURE__*/ a(F, [["render", L]]), z = (t) => {
163
337
  }
164
338
  },
165
339
  emits: ["update:modelValue", "submit"],
166
- setup(i, { emit: a }) {
167
- let s = a, c = i, l = a, u = e(), d = t.$, p = S(), m = S(), g = null, v = {}, C = (e) => e.filter((e) => !c.emails.includes(e)), w = (e = c.modelValue) => {
340
+ setup(i, { emit: o }) {
341
+ let s = o, c = i, l = o, u = e(), f = t.$, p = S(), h = S(), g = null, v = {}, C = (e) => e.filter((e) => !c.emails.includes(e)), w = (e = c.modelValue) => {
168
342
  let n = String(e).trim();
169
343
  if (n) {
170
- if (!o(n)) {
344
+ if (!a(n)) {
171
345
  t.notice(u.Common.Enter_valid_email_notice, "error");
172
346
  return;
173
347
  }
174
348
  l("submit", n);
175
349
  }
176
350
  }, T = async () => {
177
- if (await _(), g = m.value?.$el.querySelector("input") ?? null, g) {
178
- if (!d?.ui?.autocomplete) {
351
+ if (await _(), g = h.value?.$el.querySelector("input") ?? null, g) {
352
+ if (!f?.ui?.autocomplete) {
179
353
  console.info("Для работы autocomplete требуется глобальная загрузка jQuery UI Autocomplete");
180
354
  return;
181
355
  }
182
- d(g).autocomplete({
356
+ f(g).autocomplete({
183
357
  appendTo: p.value,
184
358
  minLength: 0,
185
359
  source: async (e, t) => {
@@ -190,45 +364,45 @@ var R = /*#__PURE__*/ a(F, [["render", L]]), z = (t) => {
190
364
  })));
191
365
  },
192
366
  select: (e, t) => {
193
- t.item && g && (e.preventDefault(), w(t.item.value), l("update:modelValue", ""), d(g).trigger("focus"));
367
+ t.item && g && (e.preventDefault(), w(t.item.value), l("update:modelValue", ""), f(g).trigger("focus"));
194
368
  }
195
- }), d(g).attr("autocomplete", "disabled"), d(g).on("focus.scheduleEmailSelector", () => {
196
- g && d(g).trigger("input");
369
+ }), f(g).attr("autocomplete", "disabled"), f(g).on("focus.scheduleEmailSelector", () => {
370
+ g && f(g).trigger("input");
197
371
  });
198
372
  }
199
373
  };
200
374
  return b(() => {
201
375
  T();
202
376
  }), y(() => {
203
- d?.ui?.autocomplete && g && (d(g).off("focus.scheduleEmailSelector"), d(g).autocomplete("destroy"));
204
- }), (e, t) => (x(), f("div", {
377
+ f?.ui?.autocomplete && g && (f(g).off("focus.scheduleEmailSelector"), f(g).autocomplete("destroy"));
378
+ }), (e, t) => (x(), d("div", {
205
379
  class: "top-scheduleEmailSelector",
206
380
  ref_key: "elRootRef",
207
381
  ref: p
208
- }, [h(n, {
382
+ }, [m(n, {
209
383
  ref_key: "elInputRef",
210
- ref: m,
384
+ ref: h,
211
385
  modelValue: i.modelValue,
212
386
  "onUpdate:modelValue": t[1] ||= (e) => s("update:modelValue", e),
213
- onKeydown: t[2] ||= ne(A((e) => w(), ["prevent"]), ["enter"]),
387
+ onKeydown: t[2] ||= ee(M((e) => w(), ["prevent"]), ["enter"]),
214
388
  title: e.$i18n.Common.Enter_email,
215
389
  type: "email",
216
390
  size: "l"
217
391
  }, {
218
- default: k(() => [h(r, {
392
+ default: j(() => [m(r, {
219
393
  class: "top-scheduleEmailSelector_submit",
220
394
  color: "theme",
221
395
  icon: "",
222
- onClick: t[0] ||= A((e) => w(), ["prevent"])
396
+ onClick: t[0] ||= M((e) => w(), ["prevent"])
223
397
  })]),
224
398
  _: 1
225
399
  }, 8, ["modelValue", "title"])], 512));
226
400
  }
227
- }), q = { class: "top-scheduleEmail" }, J = { class: "top-scheduleEmail_title" }, Y = {
401
+ }), re = { class: "top-scheduleEmail" }, ie = { class: "top-scheduleEmail_title" }, ae = {
228
402
  key: 1,
229
403
  class: "top-scheduleEmail_emails"
230
- }, X = { class: "top-ellipsis1" }, Z = /* @__PURE__ */ g({
231
- __name: "email",
404
+ }, oe = { class: "top-ellipsis1" }, $ = /* @__PURE__ */ h({
405
+ __name: "emails",
232
406
  props: {
233
407
  emails: { default: () => [] },
234
408
  getEmailSuggestions: {
@@ -249,9 +423,9 @@ var R = /*#__PURE__*/ a(F, [["render", L]]), z = (t) => {
249
423
  };
250
424
  return (t, r) => {
251
425
  let i = T("TopButton");
252
- return x(), f("div", q, [
253
- p("div", J, E(t.$i18n.Projects.Reports_send_to_address) + " E-mail: ", 1),
254
- e.maxEmailsCount && e.emails.length === e.maxEmailsCount ? d("", !0) : (x(), u(K, {
426
+ return x(), d("div", re, [
427
+ f("div", ie, E(t.$i18n.Projects.Reports_send_to_address) + " E-mail: ", 1),
428
+ e.maxEmailsCount && e.emails.length === e.maxEmailsCount ? u("", !0) : (x(), l(ne, {
255
429
  key: 0,
256
430
  modelValue: a.value,
257
431
  "onUpdate:modelValue": r[0] ||= (e) => a.value = e,
@@ -263,25 +437,25 @@ var R = /*#__PURE__*/ a(F, [["render", L]]), z = (t) => {
263
437
  "getEmailSuggestions",
264
438
  "emails"
265
439
  ])),
266
- e.emails.length ? (x(), f("div", Y, [(x(!0), f(c, null, C(e.emails, (e) => (x(), f("div", {
440
+ e.emails.length ? (x(), d("div", ae, [(x(!0), d(s, null, C(e.emails, (e) => (x(), d("div", {
267
441
  class: "top-scheduleEmail_emailsItem",
268
442
  key: e
269
- }, [p("span", X, E(e), 1), h(i, {
443
+ }, [f("span", oe, E(e), 1), m(i, {
270
444
  onClick: (t) => n("remove:email", e),
271
445
  color: "theme",
272
446
  icon: ""
273
- }, null, 8, ["onClick"])]))), 128))])) : d("", !0)
447
+ }, null, 8, ["onClick"])]))), 128))])) : u("", !0)
274
448
  ]);
275
449
  };
276
450
  }
277
- }), re = { class: "top-scheduleReportSend" }, ie = { class: "top-scheduleReportSend_title" }, ae = { class: "top-scheduleReportSend_channels" }, oe = ["data-top-icon"], se = { class: "top-scheduleReportSend_channelLabel top-ellipsis1" }, Q = {
451
+ }), se = { class: "top-scheduleSocials" }, ce = { class: "top-scheduleSocials_title" }, le = { class: "top-scheduleSocials_channels" }, ue = ["data-top-icon"], de = { class: "top-scheduleSocials_channelLabel top-ellipsis1" }, fe = {
278
452
  key: 0,
279
- class: "top-scheduleReportSend_channel"
280
- }, ce = ["data-top-icon"], le = ["href"], ue = /* @__PURE__ */ g({
281
- __name: "reportSend",
453
+ class: "top-scheduleSocials_channel"
454
+ }, pe = ["data-top-icon"], me = ["href"], he = /* @__PURE__ */ h({
455
+ __name: "socials",
282
456
  props: {
283
457
  channels: {},
284
- connectors: { default: () => [] }
458
+ connectors: {}
285
459
  },
286
460
  emits: ["update:channelSelected"],
287
461
  setup(e, { emit: t }) {
@@ -290,28 +464,28 @@ var R = /*#__PURE__*/ a(F, [["render", L]]), z = (t) => {
290
464
  telegram: ""
291
465
  };
292
466
  return (n, a) => {
293
- let o = T("TopButton"), s = T("TopSwitcher");
294
- return x(), f("div", re, [p("div", ie, E(n.$i18n.Projects.Reports_send), 1), p("div", ae, [(x(!0), f(c, null, C(e.channels, (e) => (x(), f("div", {
295
- class: "top-scheduleReportSend_channel",
467
+ let o = T("TopButton"), c = T("TopSwitcher");
468
+ return x(), d("div", se, [f("div", ce, E(n.$i18n.Projects.Reports_send_to_address), 1), f("div", le, [(x(!0), d(s, null, C(e.channels, (e) => (x(), d("div", {
469
+ class: "top-scheduleSocials_channel",
296
470
  key: `${e.source}-${e.id}`
297
471
  }, [
298
- p("span", {
299
- class: "top-scheduleReportSend_channelIcon",
472
+ f("span", {
473
+ class: "top-scheduleSocials_channelIcon",
300
474
  "data-top-icon": i[e.source]
301
- }, null, 8, oe),
302
- p("span", se, E(e.label), 1),
303
- e.settingLink ? (x(), u(o, {
475
+ }, null, 8, ue),
476
+ f("span", de, E(e.label), 1),
477
+ e.settingLink ? (x(), l(o, {
304
478
  key: 0,
305
- class: "top-scheduleReportSend_channelSettings",
479
+ class: "top-scheduleSocials_channelSettings",
306
480
  size: "xs",
307
481
  href: e.settingLink,
308
482
  target: "_blank",
309
483
  icon: "",
310
484
  color: "theme",
311
485
  tabindex: "0"
312
- }, null, 8, ["href"])) : d("", !0),
313
- h(s, {
314
- class: "top-scheduleReportSend_channelSwitcher",
486
+ }, null, 8, ["href"])) : u("", !0),
487
+ m(c, {
488
+ class: "top-scheduleSocials_channelSwitcher",
315
489
  modelValue: e.selected,
316
490
  "onUpdate:modelValue": (n) => t("update:channelSelected", {
317
491
  id: e.id,
@@ -319,122 +493,18 @@ var R = /*#__PURE__*/ a(F, [["render", L]]), z = (t) => {
319
493
  selected: n
320
494
  })
321
495
  }, null, 8, ["modelValue", "onUpdate:modelValue"])
322
- ]))), 128)), (x(!0), f(c, null, C(e.connectors, (e) => (x(), f(c, { key: e.source }, [r(e.source) ? d("", !0) : (x(), f("div", Q, [p("span", {
323
- class: "top-scheduleReportSend_channelIcon",
496
+ ]))), 128)), (x(!0), d(s, null, C(e.connectors, (e) => (x(), d(s, { key: e.source }, [r(e.source) ? u("", !0) : (x(), d("div", fe, [f("span", {
497
+ class: "top-scheduleSocials_channelIcon",
324
498
  "data-top-icon": i[e.source]
325
- }, null, 8, ce), p("a", {
326
- class: "top-scheduleReportSend_channelLabel top-ellipsis1",
499
+ }, null, 8, pe), f("a", {
500
+ class: "top-scheduleSocials_channelLabel top-ellipsis1",
327
501
  href: e.connectLink,
328
502
  target: "_blank"
329
- }, E(e.connectLabel), 9, le)]))], 64))), 128))])]);
330
- };
331
- }
332
- }), de = { class: "top-scheduleTimeSelector" }, $ = /* @__PURE__ */ g({
333
- __name: "timeSelector",
334
- props: {
335
- hour: {},
336
- minute: {}
337
- },
338
- emits: ["update:hour", "update:minute"],
339
- setup(e, { emit: t }) {
340
- let n = e, r = Array.from({ length: 24 }, (e, t) => ({
341
- value: String(t),
342
- title: String(t).padStart(2, "0")
343
- })), i = [
344
- {
345
- value: "0",
346
- title: "00"
347
- },
348
- {
349
- value: "15",
350
- title: "15"
351
- },
352
- {
353
- value: "30",
354
- title: "30"
355
- },
356
- {
357
- value: "45",
358
- title: "45"
359
- }
360
- ], a = l(() => i.some((e) => e.value === n.minute) ? i : [...i, {
361
- value: n.minute,
362
- title: n.minute.padStart(2, "0"),
363
- disabled: !0
364
- }]);
365
- return (n, i) => {
366
- let o = T("TopSelect");
367
- return x(), f("div", de, [h(o, {
368
- class: "top-scheduleTimeSelector_hour",
369
- modelValue: e.hour,
370
- options: D(r),
371
- "onUpdate:modelValue": i[0] ||= (e) => t("update:hour", e)
372
- }, null, 8, ["modelValue", "options"]), h(o, {
373
- class: "top-scheduleTimeSelector_minute",
374
- modelValue: e.minute,
375
- options: a.value,
376
- "onUpdate:modelValue": i[1] ||= (e) => t("update:minute", e)
377
- }, null, 8, ["modelValue", "options"])]);
378
- };
379
- }
380
- }), fe = { class: "top-scheduleTimeSelectors" }, pe = /* @__PURE__ */ g({
381
- __name: "timeSelectors",
382
- props: { times: {} },
383
- emits: ["update:times"],
384
- setup(e, { emit: t }) {
385
- let n = t, r = e, i = t, a = /* @__PURE__ */ new WeakMap(), o = 0, s = (e) => {
386
- let t = ee(e), n = a.get(t);
387
- if (n !== void 0) return n;
388
- let r = o++;
389
- return a.set(t, r), r;
390
- }, l = (e, t) => {
391
- let n = r.times.map((n, r) => {
392
- if (r !== e) return n;
393
- let i = {
394
- ...n,
395
- ...t
396
- };
397
- return a.set(i, s(n)), i;
398
- });
399
- i("update:times", n);
400
- }, d = () => {
401
- let e = [{
402
- hour: "0",
403
- minute: "0"
404
- }, ...r.times];
405
- i("update:times", e);
406
- };
407
- return (t, r) => {
408
- let i = T("TopButton");
409
- return x(), f("div", fe, [(x(!0), f(c, null, C(e.times, (t, r) => (x(), f("div", {
410
- class: "top-scheduleTimeSelectors_item",
411
- key: s(t)
412
- }, [h($, {
413
- hour: t.hour,
414
- minute: t.minute,
415
- "onUpdate:hour": (e) => l(r, { hour: e }),
416
- "onUpdate:minute": (e) => l(r, { minute: e })
417
- }, null, 8, [
418
- "hour",
419
- "minute",
420
- "onUpdate:hour",
421
- "onUpdate:minute"
422
- ]), r ? (x(), u(i, {
423
- key: 0,
424
- onClick: (t) => n("update:times", e.times.filter((e, t) => t !== r)),
425
- color: "theme",
426
- icon: ""
427
- }, null, 8, ["onClick"])) : (x(), u(i, {
428
- key: 1,
429
- class: "top-scheduleTimeSelectors_itemAdd",
430
- onClick: d,
431
- color: "theme",
432
- icon: ""
433
- }))]))), 128))]);
503
+ }, E(e.connectLabel), 9, me)]))], 64))), 128))])]);
434
504
  };
435
505
  }
436
506
  });
437
507
  //#endregion
438
- export { P as TopSchedule, G as TopScheduleCalendar, R as TopScheduleContainer, Z as TopScheduleEmail, K as TopScheduleEmailSelector, ue as TopScheduleReportSend, $ as TopScheduleTimeSelector, pe as TopScheduleTimeSelectors };
508
+ export { Q as TopSchedule, $ as TopScheduleEmails, he as TopScheduleSocials };
439
509
 
440
510
  //# sourceMappingURL=schedule.js.map