@shtabapp/ui-kit 1.47.0 → 1.49.0
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.
- package/CHANGELOG.md +20 -0
- package/dist/{SAvatar-q1HSZPqy.js → SAvatar-BK8cEzGY.js} +1 -1
- package/dist/{SAvatar-D5SreJLe.cjs → SAvatar-DTG0odWX.cjs} +1 -1
- package/dist/{SAvatarGroup-CdVjv8sb.cjs → SAvatarGroup-CaqcKGIq.cjs} +1 -1
- package/dist/{SAvatarGroup-By-5Ub6i.js → SAvatarGroup-MuTqzfYS.js} +1 -1
- package/dist/{SChartBurnup-BhCS06uF.cjs → SChartBurnup-C4x5kik6.cjs} +1 -1
- package/dist/{SChartBurnup-CG239MJx.js → SChartBurnup-Dxi0MBwo.js} +2 -2
- package/dist/{SChartHorizontalBar-DnKbf_9E.cjs → SChartHorizontalBar-4H-lgfO4.cjs} +1 -1
- package/dist/{SChartHorizontalBar-DqTZ4H-9.js → SChartHorizontalBar-XNasKzaO.js} +1 -1
- package/dist/{SChartLine-CEnRbnVo.cjs → SChartLine-BF6Klm4j.cjs} +1 -1
- package/dist/{SChartLine-CQhbtAjJ.js → SChartLine-DSQaezYq.js} +1 -1
- package/dist/{SChartMultiLine-CPEglksk.js → SChartMultiLine-CrMmphFe.js} +3 -3
- package/dist/{SChartMultiLine-B6GldTYv.cjs → SChartMultiLine-Ddvfmf__.cjs} +1 -1
- package/dist/{SChartPie-DXHCXNEs.js → SChartPie-bN8rY-y5.js} +2 -2
- package/dist/{SChartPie-CQyENNM6.cjs → SChartPie-namQTFla.cjs} +1 -1
- package/dist/{SChartProgress-BwDuidgB.js → SChartProgress-BtwqE4xL.js} +1 -1
- package/dist/{SChartProgress-CMcM6yvT.cjs → SChartProgress-DsFHotRv.cjs} +1 -1
- package/dist/{SChartSkeletonHost-DSFyP_DN.js → SChartSkeletonHost-BT96eWSF.js} +70 -45
- package/dist/SChartSkeletonHost-Dt5EjQr5.cjs +1 -0
- package/dist/{SChartStackedArea-DHSamqau.cjs → SChartStackedArea-BLHs3sSH.cjs} +1 -1
- package/dist/{SChartStackedArea-BR7W44h6.js → SChartStackedArea-BxUex_Di.js} +4 -4
- package/dist/{SChartStackedBar-BbYna5KB.js → SChartStackedBar-BJ9LOgSP.js} +40 -35
- package/dist/SChartStackedBar-CWNyvUj9.cjs +1 -0
- package/dist/{SPhotoEdit-bXKHcP3x.js → SPhotoEdit-BJXa6mh4.js} +29 -29
- package/dist/SPhotoEdit-vg58q6I7.cjs +1 -0
- package/dist/buildWorkTimeLegendItems-ChGHTwbn.js +361 -0
- package/dist/buildWorkTimeLegendItems-DjhLKbAP.cjs +1 -0
- package/dist/components/SCalendar/index.d.ts +12 -0
- package/dist/components/SCalendar/index.d.ts.map +1 -0
- package/dist/components/SCalendar/utils/buildWorkTimeLegendItems.d.ts +4 -0
- package/dist/components/SCalendar/utils/buildWorkTimeLegendItems.d.ts.map +1 -0
- package/dist/components/SCalendar/utils/calendar.const.d.ts +4 -0
- package/dist/components/SCalendar/utils/calendar.const.d.ts.map +1 -0
- package/dist/components/SCalendar/utils/calendar.types.d.ts +8 -0
- package/dist/components/SCalendar/utils/calendar.types.d.ts.map +1 -0
- package/dist/components/SCalendar/utils/demoCalendarMonthWeeks.d.ts +4 -0
- package/dist/components/SCalendar/utils/demoCalendarMonthWeeks.d.ts.map +1 -0
- package/dist/components/SCalendar/utils/demoCalendarWeekDays.d.ts +10 -0
- package/dist/components/SCalendar/utils/demoCalendarWeekDays.d.ts.map +1 -0
- package/dist/components/SCalendar/utils/demoDayTimelineIntervals.d.ts +4 -0
- package/dist/components/SCalendar/utils/demoDayTimelineIntervals.d.ts.map +1 -0
- package/dist/components/SCalendar/utils/formatDurationHM.d.ts +2 -0
- package/dist/components/SCalendar/utils/formatDurationHM.d.ts.map +1 -0
- package/dist/components/SCalendarMonth/SCalendarMonth.types.d.ts +45 -0
- package/dist/components/SCalendarMonth/SCalendarMonth.types.d.ts.map +1 -0
- package/dist/components/SCalendarMonth/SCalendarMonth.vue.d.ts +21 -0
- package/dist/components/SCalendarMonth/SCalendarMonth.vue.d.ts.map +1 -0
- package/dist/components/SCalendarMonth/index.d.ts +3 -0
- package/dist/components/SCalendarMonth/index.d.ts.map +1 -0
- package/dist/components/SCalendarWeekGrid/SCalendarWeekGrid.types.d.ts +31 -0
- package/dist/components/SCalendarWeekGrid/SCalendarWeekGrid.types.d.ts.map +1 -0
- package/dist/components/SCalendarWeekGrid/SCalendarWeekGrid.vue.d.ts +18 -0
- package/dist/components/SCalendarWeekGrid/SCalendarWeekGrid.vue.d.ts.map +1 -0
- package/dist/components/SCalendarWeekGrid/index.d.ts +4 -0
- package/dist/components/SCalendarWeekGrid/index.d.ts.map +1 -0
- package/dist/components/SChartStackedBar/SChartStackedBar.vue.d.ts +3 -1
- package/dist/components/SChartStackedBar/SChartStackedBar.vue.d.ts.map +1 -1
- package/dist/components/SChartStackedBar/utils/buildStackedBarChartConfig.d.ts +2 -1
- package/dist/components/SChartStackedBar/utils/buildStackedBarChartConfig.d.ts.map +1 -1
- package/dist/components/SDayTimeline/SDayTimeline.types.d.ts +43 -0
- package/dist/components/SDayTimeline/SDayTimeline.types.d.ts.map +1 -0
- package/dist/components/SDayTimeline/SDayTimeline.vue.d.ts +19 -0
- package/dist/components/SDayTimeline/SDayTimeline.vue.d.ts.map +1 -0
- package/dist/components/SDayTimeline/index.d.ts +4 -0
- package/dist/components/SDayTimeline/index.d.ts.map +1 -0
- package/dist/components/SList/utils/resolveListItemFields.d.ts +1 -1
- package/dist/components/SList/utils/resolveListItemFields.d.ts.map +1 -1
- package/dist/components/SPhotoEdit/SPhotoEdit.types.d.ts +1 -0
- package/dist/components/SPhotoEdit/SPhotoEdit.types.d.ts.map +1 -1
- package/dist/components/SPhotoEdit/SPhotoEdit.vue.d.ts.map +1 -1
- package/dist/{createChartCrosshairPlugin-q3U4ePnf.js → createChartCrosshairPlugin-DwFOncWI.js} +1 -1
- package/dist/{createChartCrosshairPlugin-DdLyEWI0.cjs → createChartCrosshairPlugin-ZZwKUQm8.cjs} +1 -1
- package/dist/entries/avatar-group.cjs +1 -1
- package/dist/entries/avatar-group.js +1 -1
- package/dist/entries/avatar.cjs +1 -1
- package/dist/entries/avatar.js +1 -1
- package/dist/entries/calendar.cjs +1 -0
- package/dist/entries/calendar.d.ts +3 -0
- package/dist/entries/calendar.d.ts.map +1 -0
- package/dist/entries/calendar.js +2 -0
- package/dist/entries/chart-burnup.cjs +1 -1
- package/dist/entries/chart-burnup.js +1 -1
- package/dist/entries/chart-horizontal-bar.cjs +1 -1
- package/dist/entries/chart-horizontal-bar.js +1 -1
- package/dist/entries/chart-line.cjs +1 -1
- package/dist/entries/chart-line.js +1 -1
- package/dist/entries/chart-multi-line.cjs +1 -1
- package/dist/entries/chart-multi-line.js +1 -1
- package/dist/entries/chart-pie.cjs +1 -1
- package/dist/entries/chart-pie.js +1 -1
- package/dist/entries/chart-progress.cjs +1 -1
- package/dist/entries/chart-progress.js +1 -1
- package/dist/entries/chart-stacked-area.cjs +1 -1
- package/dist/entries/chart-stacked-area.js +1 -1
- package/dist/entries/chart-stacked-bar.cjs +1 -1
- package/dist/entries/chart-stacked-bar.js +1 -1
- package/dist/entries/photo-edit.cjs +1 -1
- package/dist/entries/photo-edit.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +146 -145
- package/dist/{resolveSeriesPaletteColor-fuhGbjFO.js → resolveSeriesPaletteColor-BdvGT-PI.js} +1 -1
- package/dist/{resolveSeriesPaletteColor-YACKW1NO.cjs → resolveSeriesPaletteColor-hI4YDdUg.cjs} +1 -1
- package/dist/{resolveStackedChartContext-BiIGZ2or.js → resolveStackedChartContext-DFre3tt0.js} +1 -1
- package/dist/{resolveStackedChartContext-Bp75eU_I.cjs → resolveStackedChartContext-Dsxhhhel.cjs} +1 -1
- package/dist/uikit-components.css +1 -1
- package/dist/utils/chart/core/chartInteractivity.d.ts +17 -4
- package/dist/utils/chart/core/chartInteractivity.d.ts.map +1 -1
- package/package.json +8 -3
- package/dist/SChartSkeletonHost-BlIYGj-7.cjs +0 -1
- package/dist/SChartStackedBar-B3HcO4UQ.cjs +0 -1
- package/dist/SPhotoEdit-VW9-n1yU.cjs +0 -1
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, defineComponent as o, normalizeClass as s, normalizeStyle as c, openBlock as l, ref as u, renderList as d, renderSlot as f, resolveDynamicComponent as p, toDisplayString as m, unref as h, useTemplateRef as g, withCtx as _, withModifiers as v } from "vue";
|
|
2
|
+
import { useUiKitI18n as y } from "@shtabapp/ui-kit-primitives";
|
|
3
|
+
import { useEventListener as b } from "@vueuse/core";
|
|
4
|
+
//#region src/components/SCalendar/utils/formatDurationHM.ts
|
|
5
|
+
var x = (e) => {
|
|
6
|
+
let t = Math.round(Math.max(0, e) / 60), n = Math.floor(t / 60), r = t % 60;
|
|
7
|
+
return `${n}:${String(r).padStart(2, "0")}`;
|
|
8
|
+
}, S = {
|
|
9
|
+
class: "s-ui-calendar-month__header",
|
|
10
|
+
role: "row"
|
|
11
|
+
}, C = {
|
|
12
|
+
key: 0,
|
|
13
|
+
class: "s-ui-calendar-month__weekday s-ui-calendar-month__weekday--summary",
|
|
14
|
+
role: "columnheader"
|
|
15
|
+
}, w = { class: "s-ui-calendar-month__day-number" }, T = {
|
|
16
|
+
key: 0,
|
|
17
|
+
class: "s-ui-calendar-month__skeleton",
|
|
18
|
+
"aria-hidden": "true"
|
|
19
|
+
}, E = { class: "s-ui-calendar-month__day-values" }, D = {
|
|
20
|
+
key: 0,
|
|
21
|
+
class: "s-ui-calendar-month__day s-ui-calendar-month__day--summary",
|
|
22
|
+
role: "gridcell"
|
|
23
|
+
}, O = {
|
|
24
|
+
key: 0,
|
|
25
|
+
class: "s-ui-calendar-month__skeleton",
|
|
26
|
+
"aria-hidden": "true"
|
|
27
|
+
}, k = {
|
|
28
|
+
key: 1,
|
|
29
|
+
class: "s-ui-calendar-month__week-total"
|
|
30
|
+
}, A = 5, j = "00:00", M = /* @__PURE__ */ o({
|
|
31
|
+
__name: "SCalendarMonth",
|
|
32
|
+
props: {
|
|
33
|
+
weeks: {},
|
|
34
|
+
weekdayLabels: {},
|
|
35
|
+
weekSummaryLabel: { default: "" },
|
|
36
|
+
hideWeekends: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
default: !1
|
|
39
|
+
},
|
|
40
|
+
hideWeekSummary: {
|
|
41
|
+
type: Boolean,
|
|
42
|
+
default: !1
|
|
43
|
+
},
|
|
44
|
+
hideEmpty: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
default: !1
|
|
47
|
+
},
|
|
48
|
+
todayDate: { default: "" },
|
|
49
|
+
loading: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
default: !1
|
|
52
|
+
},
|
|
53
|
+
interactive: {
|
|
54
|
+
type: Boolean,
|
|
55
|
+
default: !1
|
|
56
|
+
},
|
|
57
|
+
formatDuration: { type: Function }
|
|
58
|
+
},
|
|
59
|
+
emits: ["dayClick"],
|
|
60
|
+
setup(o, { emit: c }) {
|
|
61
|
+
let u = c, h = (e) => (o.formatDuration ?? x)(e), g = t(() => o.hideWeekends ? o.weekdayLabels.slice(0, A) : o.weekdayLabels), v = t(() => ({
|
|
62
|
+
"s-ui-calendar-month--no-weekends": o.hideWeekends,
|
|
63
|
+
"s-ui-calendar-month--no-summary": o.hideWeekSummary,
|
|
64
|
+
"s-ui-calendar-month--loading": o.loading
|
|
65
|
+
})), y = (e) => o.hideWeekends ? e.days.slice(0, A) : e.days, b = (e) => e.totalSeconds === void 0 ? y(e).reduce((e, t) => e + (t.isOtherMonth ? 0 : t.workedSeconds), 0) : e.totalSeconds, M = (e) => e.workedSeconds > 0 ? h(e.workedSeconds) : o.hideEmpty ? "" : j, N = (e) => e.overtimeSeconds > 0 ? e.overtimeSeconds : e.undertimeSeconds, P = (e) => e.workedSeconds > 0 ? "s-ui-calendar-month__worked--filled" : "s-ui-calendar-month__worked--empty", F = (e) => ({
|
|
66
|
+
"s-ui-calendar-month__day--other": !!e.isOtherMonth,
|
|
67
|
+
"s-ui-calendar-month__day--today": !!o.todayDate && e.date === o.todayDate,
|
|
68
|
+
"s-ui-calendar-month__day--interactive": o.interactive && !e.isOtherMonth
|
|
69
|
+
}), I = (e) => {
|
|
70
|
+
!o.interactive || e.isOtherMonth || o.loading || u("dayClick", e);
|
|
71
|
+
};
|
|
72
|
+
return (t, c) => (l(), i("div", {
|
|
73
|
+
class: s(["s-ui-calendar-month", v.value]),
|
|
74
|
+
role: "grid"
|
|
75
|
+
}, [a("div", S, [(l(!0), i(e, null, d(g.value, (e) => (l(), i("span", {
|
|
76
|
+
key: e,
|
|
77
|
+
class: "s-ui-calendar-month__weekday",
|
|
78
|
+
role: "columnheader"
|
|
79
|
+
}, m(e), 1))), 128)), o.hideWeekSummary ? r("", !0) : (l(), i("span", C, m(o.weekSummaryLabel), 1))]), (l(!0), i(e, null, d(o.weeks, (u, g) => (l(), i("div", {
|
|
80
|
+
key: u.days[0]?.date ?? g,
|
|
81
|
+
class: "s-ui-calendar-month__week",
|
|
82
|
+
role: "row"
|
|
83
|
+
}, [(l(!0), i(e, null, d(y(u), (u) => (l(), n(p(o.interactive ? "button" : "div"), {
|
|
84
|
+
key: u.date,
|
|
85
|
+
type: o.interactive ? "button" : void 0,
|
|
86
|
+
class: s(["s-ui-calendar-month__day", F(u)]),
|
|
87
|
+
role: "gridcell",
|
|
88
|
+
onClick: (e) => I(u)
|
|
89
|
+
}, {
|
|
90
|
+
default: _(() => [u.isOtherMonth ? r("", !0) : (l(), i(e, { key: 0 }, [a("span", w, m(u.dayNumber), 1), o.loading ? (l(), i("span", T)) : f(t.$slots, "day", {
|
|
91
|
+
key: 1,
|
|
92
|
+
day: u
|
|
93
|
+
}, () => [a("span", E, [a("span", { class: s(["s-ui-calendar-month__worked", P(u)]) }, m(M(u)), 3), N(u) > 0 ? (l(), i(e, { key: 0 }, [c[0] ||= a("span", {
|
|
94
|
+
class: "s-ui-calendar-month__dot",
|
|
95
|
+
"aria-hidden": "true"
|
|
96
|
+
}, "•", -1), a("span", { class: s(["s-ui-calendar-month__delta", u.overtimeSeconds > 0 ? "s-ui-calendar-month__delta--overtime" : "s-ui-calendar-month__delta--undertime"]) }, m(h(N(u))), 3)], 64)) : r("", !0)])])], 64))]),
|
|
97
|
+
_: 2
|
|
98
|
+
}, 1032, [
|
|
99
|
+
"type",
|
|
100
|
+
"class",
|
|
101
|
+
"onClick"
|
|
102
|
+
]))), 128)), o.hideWeekSummary ? r("", !0) : (l(), i("div", D, [o.loading ? (l(), i("span", O)) : (l(), i("span", k, m(h(b(u))), 1))]))]))), 128))], 2));
|
|
103
|
+
}
|
|
104
|
+
}), N = /* @__PURE__ */ function(e) {
|
|
105
|
+
return e.COMPUTER = "computer", e.PHONE = "phone", e.MANUAL = "manual", e.IDLE = "idle", e;
|
|
106
|
+
}({}), P = [
|
|
107
|
+
N.COMPUTER,
|
|
108
|
+
N.PHONE,
|
|
109
|
+
N.MANUAL,
|
|
110
|
+
N.IDLE
|
|
111
|
+
], F = {
|
|
112
|
+
[N.COMPUTER]: "var(--s-ui-color-background-accent-blue-secondary)",
|
|
113
|
+
[N.PHONE]: "var(--s-ui-color-background-accent-indigo-secondary)",
|
|
114
|
+
[N.MANUAL]: "var(--s-ui-color-background-accent-teal-secondary)",
|
|
115
|
+
[N.IDLE]: "var(--s-ui-color-background-accent-orange-secondary)"
|
|
116
|
+
}, I = 12, L = {
|
|
117
|
+
class: "s-ui-calendar-week-grid__header",
|
|
118
|
+
role: "row"
|
|
119
|
+
}, R = {
|
|
120
|
+
class: "s-ui-calendar-week-grid__slot-label",
|
|
121
|
+
role: "rowheader"
|
|
122
|
+
}, z = /* @__PURE__ */ o({
|
|
123
|
+
__name: "SCalendarWeekGrid",
|
|
124
|
+
props: {
|
|
125
|
+
days: {},
|
|
126
|
+
slotLabels: {},
|
|
127
|
+
highlightedCategory: { default: null },
|
|
128
|
+
loading: {
|
|
129
|
+
type: Boolean,
|
|
130
|
+
default: !1
|
|
131
|
+
},
|
|
132
|
+
interactive: {
|
|
133
|
+
type: Boolean,
|
|
134
|
+
default: !1
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
emits: ["cellClick"],
|
|
138
|
+
setup(r, { emit: o }) {
|
|
139
|
+
let u = o, f = () => Array.from({ length: 12 }, (e, t) => {
|
|
140
|
+
let n = t * 2, r = (n + 2) % 24, i = (e) => String(e).padStart(2, "0");
|
|
141
|
+
return `${i(n)}:00 - ${i(r)}:00`;
|
|
142
|
+
}), h = t(() => r.slotLabels ?? f()), g = t(() => ({
|
|
143
|
+
"s-ui-calendar-week-grid--loading": r.loading,
|
|
144
|
+
"s-ui-calendar-week-grid--highlighting": r.highlightedCategory !== null
|
|
145
|
+
})), _ = t(() => ({ "--s-ui-calendar-week-grid-day-count": String(r.days.length) })), v = (e) => ({
|
|
146
|
+
"s-ui-calendar-week-grid__cell--empty": e === null,
|
|
147
|
+
"s-ui-calendar-week-grid__cell--muted": r.highlightedCategory !== null && e !== r.highlightedCategory,
|
|
148
|
+
"s-ui-calendar-week-grid__cell--interactive": r.interactive
|
|
149
|
+
}), y = (e) => {
|
|
150
|
+
if (!(r.loading || e === null)) return { backgroundColor: F[e] };
|
|
151
|
+
}, b = (e, t) => {
|
|
152
|
+
!r.interactive || r.loading || u("cellClick", {
|
|
153
|
+
day: e,
|
|
154
|
+
slotIndex: t,
|
|
155
|
+
category: e.slots[t] ?? null
|
|
156
|
+
});
|
|
157
|
+
};
|
|
158
|
+
return (t, o) => (l(), i("div", {
|
|
159
|
+
class: s(["s-ui-calendar-week-grid", g.value]),
|
|
160
|
+
style: c(_.value),
|
|
161
|
+
role: "grid"
|
|
162
|
+
}, [a("div", L, [o[0] ||= a("span", {
|
|
163
|
+
class: "s-ui-calendar-week-grid__corner",
|
|
164
|
+
"aria-hidden": "true"
|
|
165
|
+
}, null, -1), (l(!0), i(e, null, d(r.days, (e) => (l(), i("span", {
|
|
166
|
+
key: e.date,
|
|
167
|
+
class: "s-ui-calendar-week-grid__day-label",
|
|
168
|
+
role: "columnheader"
|
|
169
|
+
}, m(e.label), 1))), 128))]), (l(!0), i(e, null, d(h.value, (t, o) => (l(), i("div", {
|
|
170
|
+
key: t,
|
|
171
|
+
class: "s-ui-calendar-week-grid__row",
|
|
172
|
+
role: "row"
|
|
173
|
+
}, [a("span", R, m(t), 1), (l(!0), i(e, null, d(r.days, (e) => (l(), n(p(r.interactive ? "button" : "div"), {
|
|
174
|
+
key: e.date,
|
|
175
|
+
type: r.interactive ? "button" : void 0,
|
|
176
|
+
"aria-label": r.interactive ? `${e.label}, ${h.value[o]}` : void 0,
|
|
177
|
+
class: s(["s-ui-calendar-week-grid__cell", v(e.slots[o] ?? null)]),
|
|
178
|
+
style: c(y(e.slots[o] ?? null)),
|
|
179
|
+
role: "gridcell",
|
|
180
|
+
onClick: (t) => b(e, o)
|
|
181
|
+
}, null, 8, [
|
|
182
|
+
"type",
|
|
183
|
+
"aria-label",
|
|
184
|
+
"class",
|
|
185
|
+
"style",
|
|
186
|
+
"onClick"
|
|
187
|
+
]))), 128))]))), 128))], 6));
|
|
188
|
+
}
|
|
189
|
+
}), B = 1440, V = [
|
|
190
|
+
"role",
|
|
191
|
+
"aria-pressed",
|
|
192
|
+
"aria-label",
|
|
193
|
+
"onClick"
|
|
194
|
+
], H = { class: "s-ui-day-timeline__range-label" }, U = [
|
|
195
|
+
"aria-label",
|
|
196
|
+
"aria-valuemax",
|
|
197
|
+
"aria-valuenow",
|
|
198
|
+
"aria-valuetext",
|
|
199
|
+
"onPointerdown",
|
|
200
|
+
"onKeydown"
|
|
201
|
+
], W = [
|
|
202
|
+
"aria-label",
|
|
203
|
+
"aria-valuemax",
|
|
204
|
+
"aria-valuenow",
|
|
205
|
+
"aria-valuetext",
|
|
206
|
+
"onPointerdown",
|
|
207
|
+
"onKeydown"
|
|
208
|
+
], G = {
|
|
209
|
+
key: 1,
|
|
210
|
+
class: "s-ui-day-timeline__skeleton",
|
|
211
|
+
"aria-hidden": "true"
|
|
212
|
+
}, K = {
|
|
213
|
+
class: "s-ui-day-timeline__scale",
|
|
214
|
+
"aria-hidden": "true"
|
|
215
|
+
}, q = 5, J = 5, Y = /* @__PURE__ */ o({
|
|
216
|
+
__name: "SDayTimeline",
|
|
217
|
+
props: {
|
|
218
|
+
intervals: {},
|
|
219
|
+
hourLabels: {},
|
|
220
|
+
highlightedCategory: { default: null },
|
|
221
|
+
loading: {
|
|
222
|
+
type: Boolean,
|
|
223
|
+
default: !1
|
|
224
|
+
},
|
|
225
|
+
interactive: {
|
|
226
|
+
type: Boolean,
|
|
227
|
+
default: !1
|
|
228
|
+
},
|
|
229
|
+
resizable: {
|
|
230
|
+
type: Boolean,
|
|
231
|
+
default: !1
|
|
232
|
+
},
|
|
233
|
+
selectedId: { default: null }
|
|
234
|
+
},
|
|
235
|
+
emits: ["select", "resizeCommit"],
|
|
236
|
+
setup(n, { emit: o }) {
|
|
237
|
+
let f = B / 60, p = o, { t: _ } = y(), x = g("trackRef"), S = u(null), C = u(null), w = (e) => {
|
|
238
|
+
let t = Math.min(B, Math.max(0, e)), n = Math.floor(t / 60), r = t % 60;
|
|
239
|
+
return `${String(n).padStart(2, "0")}:${String(r).padStart(2, "0")}`;
|
|
240
|
+
}, T = (e) => `${w(e.startMinute)} – ${w(e.endMinute)}`, E = t(() => n.hourLabels ?? Array.from({ length: f / 2 + 1 }, (e, t) => String(t * 2))), D = t(() => ({
|
|
241
|
+
"s-ui-day-timeline--loading": n.loading,
|
|
242
|
+
"s-ui-day-timeline--resizable": n.resizable
|
|
243
|
+
})), O = (e) => S.value?.id === e.id && C.value ? C.value : {
|
|
244
|
+
start: e.startMinute,
|
|
245
|
+
end: e.endMinute
|
|
246
|
+
}, k = (e) => {
|
|
247
|
+
let { start: t, end: n } = O(e);
|
|
248
|
+
return `${w(t)} – ${w(n)}`;
|
|
249
|
+
}, A = (e) => ({
|
|
250
|
+
"s-ui-day-timeline__block--empty": e.category === null,
|
|
251
|
+
"s-ui-day-timeline__block--muted": n.highlightedCategory !== null && e.category !== n.highlightedCategory,
|
|
252
|
+
"s-ui-day-timeline__block--interactive": n.interactive,
|
|
253
|
+
"s-ui-day-timeline__block--selected": n.selectedId === e.id
|
|
254
|
+
}), j = (e) => {
|
|
255
|
+
let { start: t, end: n } = O(e);
|
|
256
|
+
return {
|
|
257
|
+
left: `${t / B * 100}%`,
|
|
258
|
+
width: `${(n - t) / B * 100}%`,
|
|
259
|
+
backgroundColor: e.category ? F[e.category] : void 0
|
|
260
|
+
};
|
|
261
|
+
}, M = (e) => {
|
|
262
|
+
!n.interactive || n.loading || p("select", n.selectedId === e.id ? null : e.id);
|
|
263
|
+
}, N = (e) => {
|
|
264
|
+
let t = x.value;
|
|
265
|
+
if (!t) return 0;
|
|
266
|
+
let n = t.getBoundingClientRect(), r = (e - n.left) / n.width;
|
|
267
|
+
return Math.min(B, Math.max(0, Math.round(r * B)));
|
|
268
|
+
}, P = (e, t, n) => t === "start" ? {
|
|
269
|
+
start: Math.max(0, Math.min(n, e.end - q)),
|
|
270
|
+
end: e.end
|
|
271
|
+
} : {
|
|
272
|
+
start: e.start,
|
|
273
|
+
end: Math.min(B, Math.max(n, e.start + q))
|
|
274
|
+
}, I = (e, t, r) => {
|
|
275
|
+
!n.resizable || n.loading || (r.preventDefault(), r.stopPropagation(), S.value = {
|
|
276
|
+
id: e.id,
|
|
277
|
+
edge: t
|
|
278
|
+
}, C.value = {
|
|
279
|
+
start: e.startMinute,
|
|
280
|
+
end: e.endMinute
|
|
281
|
+
});
|
|
282
|
+
}, L = (e, t, n) => {
|
|
283
|
+
let r = n.key === "ArrowLeft" || n.key === "ArrowDown" ? -1 : +(n.key === "ArrowRight" || n.key === "ArrowUp");
|
|
284
|
+
if (r === 0) return;
|
|
285
|
+
n.preventDefault();
|
|
286
|
+
let i = O(e), a = P(i, t, (t === "start" ? i.start : i.end) + r * J);
|
|
287
|
+
(a.start !== e.startMinute || a.end !== e.endMinute) && p("resizeCommit", {
|
|
288
|
+
id: e.id,
|
|
289
|
+
startMinute: a.start,
|
|
290
|
+
endMinute: a.end
|
|
291
|
+
});
|
|
292
|
+
};
|
|
293
|
+
return b("pointermove", (e) => {
|
|
294
|
+
!S.value || !C.value || (C.value = P(C.value, S.value.edge, N(e.clientX)));
|
|
295
|
+
}), b("pointerup", () => {
|
|
296
|
+
if (S.value && C.value) {
|
|
297
|
+
let { id: e } = S.value, { start: t, end: r } = C.value, i = n.intervals.find((t) => t.id === e);
|
|
298
|
+
i && (i.startMinute !== t || i.endMinute !== r) && p("resizeCommit", {
|
|
299
|
+
id: e,
|
|
300
|
+
startMinute: t,
|
|
301
|
+
endMinute: r
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
S.value = null, C.value = null;
|
|
305
|
+
}), (t, o) => (l(), i("div", { class: s(["s-ui-day-timeline", D.value]) }, [a("div", {
|
|
306
|
+
ref_key: "trackRef",
|
|
307
|
+
ref: x,
|
|
308
|
+
class: "s-ui-day-timeline__track"
|
|
309
|
+
}, [n.loading ? r("", !0) : (l(!0), i(e, { key: 0 }, d(n.intervals, (t) => (l(), i("div", {
|
|
310
|
+
key: t.id,
|
|
311
|
+
class: s(["s-ui-day-timeline__block", A(t)]),
|
|
312
|
+
style: c(j(t)),
|
|
313
|
+
role: n.interactive ? "button" : void 0,
|
|
314
|
+
"aria-pressed": n.interactive ? n.selectedId === t.id : void 0,
|
|
315
|
+
"aria-label": n.interactive ? T(t) : void 0,
|
|
316
|
+
onClick: (e) => M(t)
|
|
317
|
+
}, [n.resizable && n.selectedId === t.id ? (l(), i(e, { key: 0 }, [
|
|
318
|
+
a("span", H, m(k(t)), 1),
|
|
319
|
+
a("button", {
|
|
320
|
+
type: "button",
|
|
321
|
+
role: "slider",
|
|
322
|
+
class: "s-ui-day-timeline__handle s-ui-day-timeline__handle--start",
|
|
323
|
+
"aria-label": h(_)("dayTimeline.rangeStart"),
|
|
324
|
+
"aria-valuemin": 0,
|
|
325
|
+
"aria-valuemax": h(B),
|
|
326
|
+
"aria-valuenow": O(t).start,
|
|
327
|
+
"aria-valuetext": w(O(t).start),
|
|
328
|
+
onClick: o[0] ||= v(() => {}, ["stop"]),
|
|
329
|
+
onPointerdown: (e) => I(t, "start", e),
|
|
330
|
+
onKeydown: (e) => L(t, "start", e)
|
|
331
|
+
}, [...o[2] ||= [a("span", {
|
|
332
|
+
class: "s-ui-day-timeline__handle-icon",
|
|
333
|
+
"aria-hidden": "true"
|
|
334
|
+
}, "‹", -1)]], 40, U),
|
|
335
|
+
a("button", {
|
|
336
|
+
type: "button",
|
|
337
|
+
role: "slider",
|
|
338
|
+
class: "s-ui-day-timeline__handle s-ui-day-timeline__handle--end",
|
|
339
|
+
"aria-label": h(_)("dayTimeline.rangeEnd"),
|
|
340
|
+
"aria-valuemin": 0,
|
|
341
|
+
"aria-valuemax": h(B),
|
|
342
|
+
"aria-valuenow": O(t).end,
|
|
343
|
+
"aria-valuetext": w(O(t).end),
|
|
344
|
+
onClick: o[1] ||= v(() => {}, ["stop"]),
|
|
345
|
+
onPointerdown: (e) => I(t, "end", e),
|
|
346
|
+
onKeydown: (e) => L(t, "end", e)
|
|
347
|
+
}, [...o[3] ||= [a("span", {
|
|
348
|
+
class: "s-ui-day-timeline__handle-icon",
|
|
349
|
+
"aria-hidden": "true"
|
|
350
|
+
}, "›", -1)]], 40, W)
|
|
351
|
+
], 64)) : r("", !0)], 14, V))), 128)), n.loading ? (l(), i("div", G)) : r("", !0)], 512), a("div", K, [(l(!0), i(e, null, d(E.value, (e) => (l(), i("span", {
|
|
352
|
+
key: e,
|
|
353
|
+
class: "s-ui-day-timeline__scale-label"
|
|
354
|
+
}, m(e), 1))), 128))])], 2));
|
|
355
|
+
}
|
|
356
|
+
}), X = (e, t = P) => t.map((t) => ({
|
|
357
|
+
label: e[t],
|
|
358
|
+
color: F[t]
|
|
359
|
+
}));
|
|
360
|
+
//#endregion
|
|
361
|
+
export { I as a, N as c, z as i, M as l, Y as n, F as o, B as r, P as s, X as t, x as u };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e=require("vue"),t=require("@shtabapp/ui-kit-primitives"),n=require("@vueuse/core");var r=e=>{let t=Math.round(Math.max(0,e)/60),n=Math.floor(t/60),r=t%60;return`${n}:${String(r).padStart(2,`0`)}`},i={class:`s-ui-calendar-month__header`,role:`row`},a={key:0,class:`s-ui-calendar-month__weekday s-ui-calendar-month__weekday--summary`,role:`columnheader`},o={class:`s-ui-calendar-month__day-number`},s={key:0,class:`s-ui-calendar-month__skeleton`,"aria-hidden":`true`},c={class:`s-ui-calendar-month__day-values`},l={key:0,class:`s-ui-calendar-month__day s-ui-calendar-month__day--summary`,role:`gridcell`},u={key:0,class:`s-ui-calendar-month__skeleton`,"aria-hidden":`true`},d={key:1,class:`s-ui-calendar-month__week-total`},f=5,p=`00:00`,m=(0,e.defineComponent)({__name:`SCalendarMonth`,props:{weeks:{},weekdayLabels:{},weekSummaryLabel:{default:``},hideWeekends:{type:Boolean,default:!1},hideWeekSummary:{type:Boolean,default:!1},hideEmpty:{type:Boolean,default:!1},todayDate:{default:``},loading:{type:Boolean,default:!1},interactive:{type:Boolean,default:!1},formatDuration:{type:Function}},emits:[`dayClick`],setup(t,{emit:n}){let m=n,h=e=>(t.formatDuration??r)(e),g=(0,e.computed)(()=>t.hideWeekends?t.weekdayLabels.slice(0,f):t.weekdayLabels),_=(0,e.computed)(()=>({"s-ui-calendar-month--no-weekends":t.hideWeekends,"s-ui-calendar-month--no-summary":t.hideWeekSummary,"s-ui-calendar-month--loading":t.loading})),v=e=>t.hideWeekends?e.days.slice(0,f):e.days,y=e=>e.totalSeconds===void 0?v(e).reduce((e,t)=>e+(t.isOtherMonth?0:t.workedSeconds),0):e.totalSeconds,b=e=>e.workedSeconds>0?h(e.workedSeconds):t.hideEmpty?``:p,x=e=>e.overtimeSeconds>0?e.overtimeSeconds:e.undertimeSeconds,S=e=>e.workedSeconds>0?`s-ui-calendar-month__worked--filled`:`s-ui-calendar-month__worked--empty`,C=e=>({"s-ui-calendar-month__day--other":!!e.isOtherMonth,"s-ui-calendar-month__day--today":!!t.todayDate&&e.date===t.todayDate,"s-ui-calendar-month__day--interactive":t.interactive&&!e.isOtherMonth}),w=e=>{!t.interactive||e.isOtherMonth||t.loading||m(`dayClick`,e)};return(n,r)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{class:(0,e.normalizeClass)([`s-ui-calendar-month`,_.value]),role:`grid`},[(0,e.createElementVNode)(`div`,i,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(g.value,t=>((0,e.openBlock)(),(0,e.createElementBlock)(`span`,{key:t,class:`s-ui-calendar-month__weekday`,role:`columnheader`},(0,e.toDisplayString)(t),1))),128)),t.hideWeekSummary?(0,e.createCommentVNode)(``,!0):((0,e.openBlock)(),(0,e.createElementBlock)(`span`,a,(0,e.toDisplayString)(t.weekSummaryLabel),1))]),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(t.weeks,(i,a)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:i.days[0]?.date??a,class:`s-ui-calendar-month__week`,role:`row`},[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(v(i),i=>((0,e.openBlock)(),(0,e.createBlock)((0,e.resolveDynamicComponent)(t.interactive?`button`:`div`),{key:i.date,type:t.interactive?`button`:void 0,class:(0,e.normalizeClass)([`s-ui-calendar-month__day`,C(i)]),role:`gridcell`,onClick:e=>w(i)},{default:(0,e.withCtx)(()=>[i.isOtherMonth?(0,e.createCommentVNode)(``,!0):((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,{key:0},[(0,e.createElementVNode)(`span`,o,(0,e.toDisplayString)(i.dayNumber),1),t.loading?((0,e.openBlock)(),(0,e.createElementBlock)(`span`,s)):(0,e.renderSlot)(n.$slots,`day`,{key:1,day:i},()=>[(0,e.createElementVNode)(`span`,c,[(0,e.createElementVNode)(`span`,{class:(0,e.normalizeClass)([`s-ui-calendar-month__worked`,S(i)])},(0,e.toDisplayString)(b(i)),3),x(i)>0?((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,{key:0},[r[0]||=(0,e.createElementVNode)(`span`,{class:`s-ui-calendar-month__dot`,"aria-hidden":`true`},`•`,-1),(0,e.createElementVNode)(`span`,{class:(0,e.normalizeClass)([`s-ui-calendar-month__delta`,i.overtimeSeconds>0?`s-ui-calendar-month__delta--overtime`:`s-ui-calendar-month__delta--undertime`])},(0,e.toDisplayString)(h(x(i))),3)],64)):(0,e.createCommentVNode)(``,!0)])])],64))]),_:2},1032,[`type`,`class`,`onClick`]))),128)),t.hideWeekSummary?(0,e.createCommentVNode)(``,!0):((0,e.openBlock)(),(0,e.createElementBlock)(`div`,l,[t.loading?((0,e.openBlock)(),(0,e.createElementBlock)(`span`,u)):((0,e.openBlock)(),(0,e.createElementBlock)(`span`,d,(0,e.toDisplayString)(h(y(i))),1))]))]))),128))],2))}}),h=function(e){return e.COMPUTER=`computer`,e.PHONE=`phone`,e.MANUAL=`manual`,e.IDLE=`idle`,e}({}),g=[h.COMPUTER,h.PHONE,h.MANUAL,h.IDLE],_={[h.COMPUTER]:`var(--s-ui-color-background-accent-blue-secondary)`,[h.PHONE]:`var(--s-ui-color-background-accent-indigo-secondary)`,[h.MANUAL]:`var(--s-ui-color-background-accent-teal-secondary)`,[h.IDLE]:`var(--s-ui-color-background-accent-orange-secondary)`},v=12,y={class:`s-ui-calendar-week-grid__header`,role:`row`},b={class:`s-ui-calendar-week-grid__slot-label`,role:`rowheader`},x=(0,e.defineComponent)({__name:`SCalendarWeekGrid`,props:{days:{},slotLabels:{},highlightedCategory:{default:null},loading:{type:Boolean,default:!1},interactive:{type:Boolean,default:!1}},emits:[`cellClick`],setup(t,{emit:n}){let r=n,i=()=>Array.from({length:12},(e,t)=>{let n=t*2,r=(n+2)%24,i=e=>String(e).padStart(2,`0`);return`${i(n)}:00 - ${i(r)}:00`}),a=(0,e.computed)(()=>t.slotLabels??i()),o=(0,e.computed)(()=>({"s-ui-calendar-week-grid--loading":t.loading,"s-ui-calendar-week-grid--highlighting":t.highlightedCategory!==null})),s=(0,e.computed)(()=>({"--s-ui-calendar-week-grid-day-count":String(t.days.length)})),c=e=>({"s-ui-calendar-week-grid__cell--empty":e===null,"s-ui-calendar-week-grid__cell--muted":t.highlightedCategory!==null&&e!==t.highlightedCategory,"s-ui-calendar-week-grid__cell--interactive":t.interactive}),l=e=>{if(!(t.loading||e===null))return{backgroundColor:_[e]}},u=(e,n)=>{!t.interactive||t.loading||r(`cellClick`,{day:e,slotIndex:n,category:e.slots[n]??null})};return(n,r)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{class:(0,e.normalizeClass)([`s-ui-calendar-week-grid`,o.value]),style:(0,e.normalizeStyle)(s.value),role:`grid`},[(0,e.createElementVNode)(`div`,y,[r[0]||=(0,e.createElementVNode)(`span`,{class:`s-ui-calendar-week-grid__corner`,"aria-hidden":`true`},null,-1),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(t.days,t=>((0,e.openBlock)(),(0,e.createElementBlock)(`span`,{key:t.date,class:`s-ui-calendar-week-grid__day-label`,role:`columnheader`},(0,e.toDisplayString)(t.label),1))),128))]),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(a.value,(n,r)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:n,class:`s-ui-calendar-week-grid__row`,role:`row`},[(0,e.createElementVNode)(`span`,b,(0,e.toDisplayString)(n),1),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(t.days,n=>((0,e.openBlock)(),(0,e.createBlock)((0,e.resolveDynamicComponent)(t.interactive?`button`:`div`),{key:n.date,type:t.interactive?`button`:void 0,"aria-label":t.interactive?`${n.label}, ${a.value[r]}`:void 0,class:(0,e.normalizeClass)([`s-ui-calendar-week-grid__cell`,c(n.slots[r]??null)]),style:(0,e.normalizeStyle)(l(n.slots[r]??null)),role:`gridcell`,onClick:e=>u(n,r)},null,8,[`type`,`aria-label`,`class`,`style`,`onClick`]))),128))]))),128))],6))}}),S=1440,C=[`role`,`aria-pressed`,`aria-label`,`onClick`],w={class:`s-ui-day-timeline__range-label`},T=[`aria-label`,`aria-valuemax`,`aria-valuenow`,`aria-valuetext`,`onPointerdown`,`onKeydown`],E=[`aria-label`,`aria-valuemax`,`aria-valuenow`,`aria-valuetext`,`onPointerdown`,`onKeydown`],D={key:1,class:`s-ui-day-timeline__skeleton`,"aria-hidden":`true`},O={class:`s-ui-day-timeline__scale`,"aria-hidden":`true`},k=5,A=5,j=(0,e.defineComponent)({__name:`SDayTimeline`,props:{intervals:{},hourLabels:{},highlightedCategory:{default:null},loading:{type:Boolean,default:!1},interactive:{type:Boolean,default:!1},resizable:{type:Boolean,default:!1},selectedId:{default:null}},emits:[`select`,`resizeCommit`],setup(r,{emit:i}){let a=S/60,o=i,{t:s}=(0,t.useUiKitI18n)(),c=(0,e.useTemplateRef)(`trackRef`),l=(0,e.ref)(null),u=(0,e.ref)(null),d=e=>{let t=Math.min(S,Math.max(0,e)),n=Math.floor(t/60),r=t%60;return`${String(n).padStart(2,`0`)}:${String(r).padStart(2,`0`)}`},f=e=>`${d(e.startMinute)} – ${d(e.endMinute)}`,p=(0,e.computed)(()=>r.hourLabels??Array.from({length:a/2+1},(e,t)=>String(t*2))),m=(0,e.computed)(()=>({"s-ui-day-timeline--loading":r.loading,"s-ui-day-timeline--resizable":r.resizable})),h=e=>l.value?.id===e.id&&u.value?u.value:{start:e.startMinute,end:e.endMinute},g=e=>{let{start:t,end:n}=h(e);return`${d(t)} – ${d(n)}`},v=e=>({"s-ui-day-timeline__block--empty":e.category===null,"s-ui-day-timeline__block--muted":r.highlightedCategory!==null&&e.category!==r.highlightedCategory,"s-ui-day-timeline__block--interactive":r.interactive,"s-ui-day-timeline__block--selected":r.selectedId===e.id}),y=e=>{let{start:t,end:n}=h(e);return{left:`${t/S*100}%`,width:`${(n-t)/S*100}%`,backgroundColor:e.category?_[e.category]:void 0}},b=e=>{!r.interactive||r.loading||o(`select`,r.selectedId===e.id?null:e.id)},x=e=>{let t=c.value;if(!t)return 0;let n=t.getBoundingClientRect(),r=(e-n.left)/n.width;return Math.min(S,Math.max(0,Math.round(r*S)))},j=(e,t,n)=>t===`start`?{start:Math.max(0,Math.min(n,e.end-k)),end:e.end}:{start:e.start,end:Math.min(S,Math.max(n,e.start+k))},M=(e,t,n)=>{!r.resizable||r.loading||(n.preventDefault(),n.stopPropagation(),l.value={id:e.id,edge:t},u.value={start:e.startMinute,end:e.endMinute})},N=(e,t,n)=>{let r=n.key===`ArrowLeft`||n.key===`ArrowDown`?-1:+(n.key===`ArrowRight`||n.key===`ArrowUp`);if(r===0)return;n.preventDefault();let i=h(e),a=j(i,t,(t===`start`?i.start:i.end)+r*A);(a.start!==e.startMinute||a.end!==e.endMinute)&&o(`resizeCommit`,{id:e.id,startMinute:a.start,endMinute:a.end})};return(0,n.useEventListener)(`pointermove`,e=>{!l.value||!u.value||(u.value=j(u.value,l.value.edge,x(e.clientX)))}),(0,n.useEventListener)(`pointerup`,()=>{if(l.value&&u.value){let{id:e}=l.value,{start:t,end:n}=u.value,i=r.intervals.find(t=>t.id===e);i&&(i.startMinute!==t||i.endMinute!==n)&&o(`resizeCommit`,{id:e,startMinute:t,endMinute:n})}l.value=null,u.value=null}),(t,n)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{class:(0,e.normalizeClass)([`s-ui-day-timeline`,m.value])},[(0,e.createElementVNode)(`div`,{ref_key:`trackRef`,ref:c,class:`s-ui-day-timeline__track`},[r.loading?(0,e.createCommentVNode)(``,!0):((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,{key:0},(0,e.renderList)(r.intervals,t=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:t.id,class:(0,e.normalizeClass)([`s-ui-day-timeline__block`,v(t)]),style:(0,e.normalizeStyle)(y(t)),role:r.interactive?`button`:void 0,"aria-pressed":r.interactive?r.selectedId===t.id:void 0,"aria-label":r.interactive?f(t):void 0,onClick:e=>b(t)},[r.resizable&&r.selectedId===t.id?((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,{key:0},[(0,e.createElementVNode)(`span`,w,(0,e.toDisplayString)(g(t)),1),(0,e.createElementVNode)(`button`,{type:`button`,role:`slider`,class:`s-ui-day-timeline__handle s-ui-day-timeline__handle--start`,"aria-label":(0,e.unref)(s)(`dayTimeline.rangeStart`),"aria-valuemin":0,"aria-valuemax":(0,e.unref)(S),"aria-valuenow":h(t).start,"aria-valuetext":d(h(t).start),onClick:n[0]||=(0,e.withModifiers)(()=>{},[`stop`]),onPointerdown:e=>M(t,`start`,e),onKeydown:e=>N(t,`start`,e)},[...n[2]||=[(0,e.createElementVNode)(`span`,{class:`s-ui-day-timeline__handle-icon`,"aria-hidden":`true`},`‹`,-1)]],40,T),(0,e.createElementVNode)(`button`,{type:`button`,role:`slider`,class:`s-ui-day-timeline__handle s-ui-day-timeline__handle--end`,"aria-label":(0,e.unref)(s)(`dayTimeline.rangeEnd`),"aria-valuemin":0,"aria-valuemax":(0,e.unref)(S),"aria-valuenow":h(t).end,"aria-valuetext":d(h(t).end),onClick:n[1]||=(0,e.withModifiers)(()=>{},[`stop`]),onPointerdown:e=>M(t,`end`,e),onKeydown:e=>N(t,`end`,e)},[...n[3]||=[(0,e.createElementVNode)(`span`,{class:`s-ui-day-timeline__handle-icon`,"aria-hidden":`true`},`›`,-1)]],40,E)],64)):(0,e.createCommentVNode)(``,!0)],14,C))),128)),r.loading?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,D)):(0,e.createCommentVNode)(``,!0)],512),(0,e.createElementVNode)(`div`,O,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(p.value,t=>((0,e.openBlock)(),(0,e.createElementBlock)(`span`,{key:t,class:`s-ui-day-timeline__scale-label`},(0,e.toDisplayString)(t),1))),128))])],2))}}),M=(e,t=g)=>t.map(t=>({label:e[t],color:_[t]}));Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return j}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return M}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return r}});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { SCalendarMonth } from '../SCalendarMonth';
|
|
2
|
+
export type { ISCalendarMonthDay, ISCalendarMonthProps, ISCalendarMonthWeek, TSCalendarMonthInstance, } from '../SCalendarMonth';
|
|
3
|
+
export { SCalendarWeekGrid, CALENDAR_WEEK_SLOT_COUNT } from '../SCalendarWeekGrid';
|
|
4
|
+
export type { ISCalendarWeekGridCellPayload, ISCalendarWeekGridDay, ISCalendarWeekGridProps, TSCalendarWeekGridInstance, } from '../SCalendarWeekGrid';
|
|
5
|
+
export { SDayTimeline, DAY_TIMELINE_MINUTES } from '../SDayTimeline';
|
|
6
|
+
export type { ISDayTimelineInterval, ISDayTimelineProps, ISDayTimelineResizePayload, TSDayTimelineInstance, } from '../SDayTimeline';
|
|
7
|
+
export { EWorkTimeSource } from './utils/calendar.types';
|
|
8
|
+
export type { TWorkTimeSourceLabels } from './utils/calendar.types';
|
|
9
|
+
export { WORK_TIME_SOURCE_COLOR_VARS, WORK_TIME_SOURCE_ORDER } from './utils/calendar.const';
|
|
10
|
+
export { formatDurationHM } from './utils/formatDurationHM';
|
|
11
|
+
export { buildWorkTimeLegendItems } from './utils/buildWorkTimeLegendItems';
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SCalendar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClD,YAAY,EACV,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACnB,uBAAuB,GACxB,MAAM,mBAAmB,CAAA;AAE1B,OAAO,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAA;AAClF,YAAY,EACV,6BAA6B,EAC7B,qBAAqB,EACrB,uBAAuB,EACvB,0BAA0B,GAC3B,MAAM,sBAAsB,CAAA;AAE7B,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAA;AACpE,YAAY,EACV,qBAAqB,EACrB,kBAAkB,EAClB,0BAA0B,EAC1B,qBAAqB,GACtB,MAAM,iBAAiB,CAAA;AAExB,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,YAAY,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAA;AACnE,OAAO,EAAE,2BAA2B,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AAC5F,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { IChartLegendItem } from '../../SChartLegend/SChartLegend.types';
|
|
2
|
+
import type { EWorkTimeSource, TWorkTimeSourceLabels } from './calendar.types';
|
|
3
|
+
export declare const buildWorkTimeLegendItems: (labels: TWorkTimeSourceLabels, order?: readonly EWorkTimeSource[]) => IChartLegendItem[];
|
|
4
|
+
//# sourceMappingURL=buildWorkTimeLegendItems.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildWorkTimeLegendItems.d.ts","sourceRoot":"","sources":["../../../../src/components/SCalendar/utils/buildWorkTimeLegendItems.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAA;AAE7E,OAAO,KAAK,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAA;AAE9E,eAAO,MAAM,wBAAwB,GACnC,QAAQ,qBAAqB,EAC7B,QAAO,SAAS,eAAe,EAA2B,KACzD,gBAAgB,EAId,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar.const.d.ts","sourceRoot":"","sources":["../../../../src/components/SCalendar/utils/calendar.const.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAElD,eAAO,MAAM,sBAAsB,EAAE,SAAS,eAAe,EAK5D,CAAA;AAED,eAAO,MAAM,2BAA2B,EAAE,MAAM,CAAC,eAAe,EAAE,MAAM,CAKvE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar.types.d.ts","sourceRoot":"","sources":["../../../../src/components/SCalendar/utils/calendar.types.ts"],"names":[],"mappings":"AAAA,oBAAY,eAAe;IACzB,QAAQ,aAAa;IACrB,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,IAAI,SAAS;CACd;AAED,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"demoCalendarMonthWeeks.d.ts","sourceRoot":"","sources":["../../../../src/components/SCalendar/utils/demoCalendarMonthWeeks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,mBAAmB,EACpB,MAAM,2CAA2C,CAAA;AAoClD,eAAO,MAAM,sBAAsB,EAAE,mBAAmB,EAqDvD,CAAA;AAED,eAAO,MAAM,iBAAiB,UAQ7B,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ISCalendarWeekGridDay } from '../../SCalendarWeekGrid/SCalendarWeekGrid.types';
|
|
2
|
+
export declare const demoCalendarWeekDays: ISCalendarWeekGridDay[];
|
|
3
|
+
export declare const demoCalendarWeekEmptyDays: ISCalendarWeekGridDay[];
|
|
4
|
+
export declare const demoWorkTimeSourceLabels: {
|
|
5
|
+
computer: string;
|
|
6
|
+
phone: string;
|
|
7
|
+
manual: string;
|
|
8
|
+
idle: string;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=demoCalendarWeekDays.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"demoCalendarWeekDays.d.ts","sourceRoot":"","sources":["../../../../src/components/SCalendar/utils/demoCalendarWeekDays.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,iDAAiD,CAAA;AAOxD,eAAO,MAAM,oBAAoB,EAAE,qBAAqB,EA4BvD,CAAA;AAED,eAAO,MAAM,yBAAyB,EAAE,qBAAqB,EAE5D,CAAA;AAED,eAAO,MAAM,wBAAwB;;;;;CAKpC,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ISDayTimelineInterval } from '../../SDayTimeline/SDayTimeline.types';
|
|
2
|
+
export declare const demoDayTimelineIntervals: ISDayTimelineInterval[];
|
|
3
|
+
export declare const demoDayTimelineEmptyIntervals: ISDayTimelineInterval[];
|
|
4
|
+
//# sourceMappingURL=demoDayTimelineIntervals.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"demoDayTimelineIntervals.d.ts","sourceRoot":"","sources":["../../../../src/components/SCalendar/utils/demoDayTimelineIntervals.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAA;AAKlF,eAAO,MAAM,wBAAwB,EAAE,qBAAqB,EAK3D,CAAA;AAED,eAAO,MAAM,6BAA6B,EAAE,qBAAqB,EAAO,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatDurationHM.d.ts","sourceRoot":"","sources":["../../../../src/components/SCalendar/utils/formatDurationHM.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,GAAI,SAAS,MAAM,KAAG,MAKlD,CAAA"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { ComponentInstance } from 'vue';
|
|
2
|
+
import type { SCalendarMonth } from '.';
|
|
3
|
+
export interface ISCalendarMonthDay {
|
|
4
|
+
/** ISO-дата `YYYY-MM-DD`. */
|
|
5
|
+
date: string;
|
|
6
|
+
/** Число месяца для отображения. */
|
|
7
|
+
dayNumber: number;
|
|
8
|
+
/** Отработанное время за день, сек (синее значение). */
|
|
9
|
+
workedSeconds: number;
|
|
10
|
+
/** Переработка сверх нормы дня, сек (жёлтое значение через « • »). */
|
|
11
|
+
overtimeSeconds: number;
|
|
12
|
+
/** Недоработка до нормы дня, сек (красное значение через « • »). */
|
|
13
|
+
undertimeSeconds: number;
|
|
14
|
+
/** День вне отображаемого периода — приглушён, без значений. */
|
|
15
|
+
isOtherMonth?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface ISCalendarMonthWeek {
|
|
18
|
+
/** Ровно 7 дней, понедельник — воскресенье. */
|
|
19
|
+
days: ISCalendarMonthDay[];
|
|
20
|
+
/** «Всего за неделю», сек; если не задано — сумма workedSeconds видимых дней. */
|
|
21
|
+
totalSeconds?: number;
|
|
22
|
+
}
|
|
23
|
+
export interface ISCalendarMonthProps {
|
|
24
|
+
weeks: ISCalendarMonthWeek[];
|
|
25
|
+
/** 7 подписей дней недели (пн–вс); локализация на стороне приложения. */
|
|
26
|
+
weekdayLabels: string[];
|
|
27
|
+
/** Заголовок колонки недельных итогов. */
|
|
28
|
+
weekSummaryLabel?: string;
|
|
29
|
+
/** Скрыть колонки субботы и воскресенья. */
|
|
30
|
+
hideWeekends?: boolean;
|
|
31
|
+
/** Скрыть колонку недельных итогов. */
|
|
32
|
+
hideWeekSummary?: boolean;
|
|
33
|
+
/** Не показывать `00:00` для дней без отработанного времени. */
|
|
34
|
+
hideEmpty?: boolean;
|
|
35
|
+
/** ISO-дата сегодняшнего дня для подсветки. */
|
|
36
|
+
todayDate?: string;
|
|
37
|
+
/** Скелетон вместо значений. */
|
|
38
|
+
loading?: boolean;
|
|
39
|
+
/** Кликабельные ячейки дней. */
|
|
40
|
+
interactive?: boolean;
|
|
41
|
+
/** Форматтер длительности, по умолчанию `formatDurationHM`. */
|
|
42
|
+
formatDuration?: (seconds: number) => string;
|
|
43
|
+
}
|
|
44
|
+
export type TSCalendarMonthInstance = ComponentInstance<typeof SCalendarMonth>;
|
|
45
|
+
//# sourceMappingURL=SCalendarMonth.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SCalendarMonth.types.d.ts","sourceRoot":"","sources":["../../../src/components/SCalendarMonth/SCalendarMonth.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,KAAK,CAAA;AAE5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,GAAG,CAAA;AAEvC,MAAM,WAAW,kBAAkB;IACjC,6BAA6B;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,oCAAoC;IACpC,SAAS,EAAE,MAAM,CAAA;IACjB,wDAAwD;IACxD,aAAa,EAAE,MAAM,CAAA;IACrB,sEAAsE;IACtE,eAAe,EAAE,MAAM,CAAA;IACvB,oEAAoE;IACpE,gBAAgB,EAAE,MAAM,CAAA;IACxB,gEAAgE;IAChE,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB;AAED,MAAM,WAAW,mBAAmB;IAClC,+CAA+C;IAC/C,IAAI,EAAE,kBAAkB,EAAE,CAAA;IAC1B,iFAAiF;IACjF,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,mBAAmB,EAAE,CAAA;IAC5B,yEAAyE;IACzE,aAAa,EAAE,MAAM,EAAE,CAAA;IACvB,0CAA0C;IAC1C,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,4CAA4C;IAC5C,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,uCAAuC;IACvC,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,gEAAgE;IAChE,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,gCAAgC;IAChC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,gCAAgC;IAChC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,+DAA+D;IAC/D,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAA;CAC7C;AAED,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,CAAC,OAAO,cAAc,CAAC,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ISCalendarMonthDay, ISCalendarMonthProps } from './SCalendarMonth.types';
|
|
2
|
+
declare var __VLS_9: {
|
|
3
|
+
day: ISCalendarMonthDay;
|
|
4
|
+
};
|
|
5
|
+
type __VLS_Slots = {} & {
|
|
6
|
+
day?: (props: typeof __VLS_9) => any;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_base: import("vue").DefineComponent<ISCalendarMonthProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
dayClick: (day: ISCalendarMonthDay) => any;
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<ISCalendarMonthProps> & Readonly<{
|
|
11
|
+
onDayClick?: ((day: ISCalendarMonthDay) => any) | undefined;
|
|
12
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
16
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
17
|
+
new (): {
|
|
18
|
+
$slots: S;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=SCalendarMonth.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SCalendarMonth.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SCalendarMonth/SCalendarMonth.vue"],"names":[],"mappings":"AAuKA,OAAO,KAAK,EACV,kBAAkB,EAClB,oBAAoB,EAErB,MAAM,wBAAwB,CAAA;AA2P/B,QAAA,IAAI,OAAO;;CAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,GAAG,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAK3C,QAAA,MAAM,UAAU;;;;kFAGd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SCalendarMonth/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAChE,YAAY,EACV,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACnB,uBAAuB,GACxB,MAAM,wBAAwB,CAAA"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ComponentInstance } from 'vue';
|
|
2
|
+
import type { SCalendarWeekGrid } from '.';
|
|
3
|
+
import type { EWorkTimeSource } from '../SCalendar/utils/calendar.types';
|
|
4
|
+
export declare const CALENDAR_WEEK_SLOT_COUNT = 12;
|
|
5
|
+
export interface ISCalendarWeekGridDay {
|
|
6
|
+
/** ISO-дата `YYYY-MM-DD`. */
|
|
7
|
+
date: string;
|
|
8
|
+
/** Подпись колонки; локализация на стороне приложения. */
|
|
9
|
+
label: string;
|
|
10
|
+
/** Ровно 12 значений для слотов 00–02 … 22–00; `null` — пустой слот. */
|
|
11
|
+
slots: (EWorkTimeSource | null)[];
|
|
12
|
+
}
|
|
13
|
+
export interface ISCalendarWeekGridCellPayload {
|
|
14
|
+
day: ISCalendarWeekGridDay;
|
|
15
|
+
slotIndex: number;
|
|
16
|
+
category: EWorkTimeSource | null;
|
|
17
|
+
}
|
|
18
|
+
export interface ISCalendarWeekGridProps {
|
|
19
|
+
/** Колонки-дни; 7 или 5 — по длине массива. */
|
|
20
|
+
days: ISCalendarWeekGridDay[];
|
|
21
|
+
/** 12 подписей строк-слотов; по умолчанию `00:00 - 02:00` … `22:00 - 00:00`. */
|
|
22
|
+
slotLabels?: string[];
|
|
23
|
+
/** Подсветка категории: остальные приглушаются. */
|
|
24
|
+
highlightedCategory?: EWorkTimeSource | null;
|
|
25
|
+
/** Скелетон. */
|
|
26
|
+
loading?: boolean;
|
|
27
|
+
/** Кликабельные ячейки. */
|
|
28
|
+
interactive?: boolean;
|
|
29
|
+
}
|
|
30
|
+
export type TSCalendarWeekGridInstance = ComponentInstance<typeof SCalendarWeekGrid>;
|
|
31
|
+
//# sourceMappingURL=SCalendarWeekGrid.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SCalendarWeekGrid.types.d.ts","sourceRoot":"","sources":["../../../src/components/SCalendarWeekGrid/SCalendarWeekGrid.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,KAAK,CAAA;AAE5C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,GAAG,CAAA;AAC1C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAA;AAExE,eAAO,MAAM,wBAAwB,KAAK,CAAA;AAE1C,MAAM,WAAW,qBAAqB;IACpC,6BAA6B;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,0DAA0D;IAC1D,KAAK,EAAE,MAAM,CAAA;IACb,wEAAwE;IACxE,KAAK,EAAE,CAAC,eAAe,GAAG,IAAI,CAAC,EAAE,CAAA;CAClC;AAED,MAAM,WAAW,6BAA6B;IAC5C,GAAG,EAAE,qBAAqB,CAAA;IAC1B,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,eAAe,GAAG,IAAI,CAAA;CACjC;AAED,MAAM,WAAW,uBAAuB;IACtC,+CAA+C;IAC/C,IAAI,EAAE,qBAAqB,EAAE,CAAA;IAC7B,gFAAgF;IAChF,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,mDAAmD;IACnD,mBAAmB,CAAC,EAAE,eAAe,GAAG,IAAI,CAAA;IAC5C,gBAAgB;IAChB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,2BAA2B;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB;AAED,MAAM,MAAM,0BAA0B,GAAG,iBAAiB,CAAC,OAAO,iBAAiB,CAAC,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { EWorkTimeSource } from '../SCalendar/utils/calendar.types';
|
|
2
|
+
import { type ISCalendarWeekGridDay, type ISCalendarWeekGridProps } from './SCalendarWeekGrid.types';
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<ISCalendarWeekGridProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
4
|
+
cellClick: (payload: {
|
|
5
|
+
day: ISCalendarWeekGridDay;
|
|
6
|
+
slotIndex: number;
|
|
7
|
+
category: EWorkTimeSource | null;
|
|
8
|
+
}) => any;
|
|
9
|
+
}, string, import("vue").PublicProps, Readonly<ISCalendarWeekGridProps> & Readonly<{
|
|
10
|
+
onCellClick?: ((payload: {
|
|
11
|
+
day: ISCalendarWeekGridDay;
|
|
12
|
+
slotIndex: number;
|
|
13
|
+
category: EWorkTimeSource | null;
|
|
14
|
+
}) => any) | undefined;
|
|
15
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
17
|
+
export default _default;
|
|
18
|
+
//# sourceMappingURL=SCalendarWeekGrid.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SCalendarWeekGrid.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SCalendarWeekGrid/SCalendarWeekGrid.vue"],"names":[],"mappings":"AA6GA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAA;AACxE,OAAO,EAEL,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC7B,MAAM,2BAA2B,CAAA;AAuKlC,QAAA,MAAM,YAAY;;aAxJE,qBAAqB;mBAAa,MAAM;kBAAY,eAAe,GAAG,IAAI;;;;aAA1E,qBAAqB;mBAAa,MAAM;kBAAY,eAAe,GAAG,IAAI;;kFA2J5F,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { default as SCalendarWeekGrid } from './SCalendarWeekGrid.vue';
|
|
2
|
+
export { CALENDAR_WEEK_SLOT_COUNT } from './SCalendarWeekGrid.types';
|
|
3
|
+
export type { ISCalendarWeekGridCellPayload, ISCalendarWeekGridDay, ISCalendarWeekGridProps, TSCalendarWeekGridInstance, } from './SCalendarWeekGrid.types';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|