@shtabapp/ui-kit 1.47.0 → 1.48.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 +14 -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/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/{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/index.cjs +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +145 -144
- 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
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { _ as e, a as t, c as n, g as r, h as i, i as a, m as o, o as s, r as c, s as l, t as u, v as d, w as f } from "./SChartSkeletonHost-
|
|
1
|
+
import { _ as e, a as t, c as n, g as r, h as i, i as a, m as o, o as s, r as c, s as l, t as u, v as d, w as f } from "./SChartSkeletonHost-BT96eWSF.js";
|
|
2
2
|
import { t as p } from "./buildCartesianChartScales-EofFq3ry.js";
|
|
3
3
|
import { n as m, t as h } from "./buildChartSeriesPoints-D8Xpfwp7.js";
|
|
4
|
-
import { t as g } from "./resolveStackedChartContext-
|
|
5
|
-
import { t as _ } from "./resolveSeriesPaletteColor-
|
|
4
|
+
import { t as g } from "./resolveStackedChartContext-DFre3tt0.js";
|
|
5
|
+
import { t as _ } from "./resolveSeriesPaletteColor-BdvGT-PI.js";
|
|
6
6
|
import { t as v } from "./SChartLegend-oZoF8XK7.js";
|
|
7
7
|
import { t as y } from "./useHasListener-RSjlUyqH.js";
|
|
8
8
|
import { computed as b, createBlock as x, createCommentVNode as S, createElementBlock as C, createElementVNode as w, createVNode as T, defineComponent as E, normalizeClass as D, openBlock as O, unref as k, useTemplateRef as A, withCtx as j } from "vue";
|
|
@@ -35,8 +35,8 @@ var M = (t, n, i, a = !1) => _(t, n, i, a, {
|
|
|
35
35
|
let y = Math.max(0, P - u);
|
|
36
36
|
c.save(), c.strokeStyle = s, c.lineWidth = N, F(c, h, g, _, v, y), c.restore();
|
|
37
37
|
}
|
|
38
|
-
}), L = 5, R = "stack0", z = 36, B = 4, V = 12, H = ({ seriesList: e, colorHostElement: r, yMax: a, yMin: c, yStep: u = L, skeleton: d = !1, onSeriesClick: f }) => {
|
|
39
|
-
let
|
|
38
|
+
}), L = 5, R = "stack0", z = 36, B = 4, V = 12, H = ({ seriesList: e, colorHostElement: r, yMax: a, yMin: c, yStep: u = L, skeleton: d = !1, onSeriesClick: f, onSegmentClick: m }) => {
|
|
39
|
+
let h = g({
|
|
40
40
|
seriesList: e,
|
|
41
41
|
colorHostElement: r,
|
|
42
42
|
yMax: a,
|
|
@@ -44,17 +44,18 @@ var M = (t, n, i, a = !1) => _(t, n, i, a, {
|
|
|
44
44
|
yStep: u,
|
|
45
45
|
skeleton: d
|
|
46
46
|
});
|
|
47
|
-
if (!
|
|
48
|
-
let { axisLabelColor:
|
|
49
|
-
kind: "
|
|
47
|
+
if (!h) return null;
|
|
48
|
+
let { axisLabelColor: _, gridColor: v, tooltipBackgroundColor: y, tooltipTextColor: b, resolvedYMax: x, resolvedYMin: S, chartLabels: C, pointCaptions: w, topSeriesIndex: T } = h, E = t({
|
|
49
|
+
kind: "segment",
|
|
50
50
|
skeleton: d,
|
|
51
51
|
colorHostElement: r,
|
|
52
|
-
onIndexClick: f
|
|
52
|
+
onIndexClick: f,
|
|
53
|
+
onElementIndexClick: m
|
|
53
54
|
});
|
|
54
55
|
return {
|
|
55
56
|
type: "bar",
|
|
56
57
|
data: {
|
|
57
|
-
labels:
|
|
58
|
+
labels: C,
|
|
58
59
|
datasets: e.map((e, t) => {
|
|
59
60
|
let n = M(t, r, e.fillColor, d);
|
|
60
61
|
return {
|
|
@@ -66,34 +67,34 @@ var M = (t, n, i, a = !1) => _(t, n, i, a, {
|
|
|
66
67
|
hoverBorderWidth: 0,
|
|
67
68
|
stack: R,
|
|
68
69
|
barThickness: z,
|
|
69
|
-
borderRadius: t ===
|
|
70
|
+
borderRadius: t === T ? {
|
|
70
71
|
topLeft: B,
|
|
71
72
|
topRight: B
|
|
72
73
|
} : 0,
|
|
73
|
-
...t === 0 ? { captions:
|
|
74
|
+
...t === 0 ? { captions: w } : {}
|
|
74
75
|
};
|
|
75
76
|
})
|
|
76
77
|
},
|
|
77
78
|
options: {
|
|
78
79
|
responsive: !0,
|
|
79
80
|
maintainAspectRatio: !1,
|
|
80
|
-
onHover:
|
|
81
|
-
onClick:
|
|
81
|
+
onHover: E.onHover,
|
|
82
|
+
onClick: E.onClick,
|
|
82
83
|
hover: d ? void 0 : {
|
|
83
84
|
mode: "nearest",
|
|
84
85
|
intersect: !0
|
|
85
86
|
},
|
|
86
87
|
interaction: s(d, {
|
|
87
|
-
mode: "
|
|
88
|
-
intersect: !
|
|
88
|
+
mode: "nearest",
|
|
89
|
+
intersect: !0
|
|
89
90
|
}),
|
|
90
91
|
plugins: {
|
|
91
92
|
legend: { display: !1 },
|
|
92
93
|
tooltip: {
|
|
93
94
|
enabled: l(d),
|
|
94
|
-
backgroundColor:
|
|
95
|
-
titleColor:
|
|
96
|
-
bodyColor:
|
|
95
|
+
backgroundColor: y,
|
|
96
|
+
titleColor: b,
|
|
97
|
+
bodyColor: b,
|
|
97
98
|
displayColors: !1,
|
|
98
99
|
position: o,
|
|
99
100
|
yAlign: "bottom",
|
|
@@ -103,16 +104,16 @@ var M = (t, n, i, a = !1) => _(t, n, i, a, {
|
|
|
103
104
|
}
|
|
104
105
|
},
|
|
105
106
|
scales: p({
|
|
106
|
-
axisLabelColor:
|
|
107
|
-
gridColor:
|
|
108
|
-
yMin:
|
|
109
|
-
yMax:
|
|
107
|
+
axisLabelColor: _,
|
|
108
|
+
gridColor: v,
|
|
109
|
+
yMin: S,
|
|
110
|
+
yMax: x,
|
|
110
111
|
yStep: u,
|
|
111
112
|
stacked: !0,
|
|
112
113
|
xTickFontSize: V
|
|
113
114
|
})
|
|
114
115
|
},
|
|
115
|
-
plugins: n(d, [I(r), ...
|
|
116
|
+
plugins: n(d, [I(r), ...E.plugins])
|
|
116
117
|
};
|
|
117
118
|
}, U = [
|
|
118
119
|
"5 неделя",
|
|
@@ -194,29 +195,33 @@ var M = (t, n, i, a = !1) => _(t, n, i, a, {
|
|
|
194
195
|
yMax: {},
|
|
195
196
|
yStep: {}
|
|
196
197
|
},
|
|
197
|
-
emits: ["seriesClick"],
|
|
198
|
+
emits: ["seriesClick", "segmentClick"],
|
|
198
199
|
setup(e, { expose: t, emit: n }) {
|
|
199
200
|
let r = n, i = A("chartRootRef"), o = A("chartCanvasRef"), s = b(() => e.loading ? J : e.series), l = (t) => {
|
|
200
201
|
let n = e.series[t];
|
|
201
202
|
n && r("seriesClick", t, n);
|
|
202
|
-
}, d =
|
|
203
|
+
}, d = (t, n) => {
|
|
204
|
+
let i = e.series[n], a = i?.points[t];
|
|
205
|
+
i && a && r("segmentClick", t, n, a, i);
|
|
206
|
+
}, f = y("onSeriesClick"), p = y("onSegmentClick"), h = b(() => !e.loading && e.series.length === 0 ? null : H({
|
|
203
207
|
seriesList: s.value,
|
|
204
208
|
colorHostElement: i.value,
|
|
205
209
|
yMax: e.loading ? 50 : e.yMax,
|
|
206
210
|
yMin: e.loading ? 0 : void 0,
|
|
207
211
|
yStep: e.loading ? 5 : e.yStep,
|
|
208
212
|
skeleton: e.loading,
|
|
209
|
-
onSeriesClick:
|
|
210
|
-
|
|
213
|
+
onSeriesClick: f() ? l : void 0,
|
|
214
|
+
onSegmentClick: p() ? d : void 0
|
|
215
|
+
})), g = b(() => m(s.value, (t, n) => M(t, i.value, n, e.loading))), { chartInstance: _ } = a({
|
|
211
216
|
canvasRef: o,
|
|
212
|
-
config:
|
|
217
|
+
config: h,
|
|
213
218
|
enabled: b(() => e.loading || e.series.length > 0)
|
|
214
|
-
}), { exportImage:
|
|
215
|
-
chartInstance:
|
|
219
|
+
}), { exportImage: E, handleLegendItemHover: N } = c({
|
|
220
|
+
chartInstance: _,
|
|
216
221
|
canvasRef: o,
|
|
217
222
|
colorHostElement: i
|
|
218
223
|
});
|
|
219
|
-
return t({ exportImage:
|
|
224
|
+
return t({ exportImage: E }), (t, n) => (O(), C("div", {
|
|
220
225
|
ref_key: "chartRootRef",
|
|
221
226
|
ref: i,
|
|
222
227
|
class: D(["s-ui-chart-stacked-bar", { "s-ui-chart-stacked-bar--skeleton": e.loading }])
|
|
@@ -227,12 +232,12 @@ var M = (t, n, i, a = !1) => _(t, n, i, a, {
|
|
|
227
232
|
class: "s-ui-chart-stacked-bar__canvas"
|
|
228
233
|
}, null, 512)]),
|
|
229
234
|
_: 1
|
|
230
|
-
}, 8, ["loading"])]),
|
|
235
|
+
}, 8, ["loading"])]), g.value.length ? (O(), x(k(v), {
|
|
231
236
|
key: 0,
|
|
232
|
-
items:
|
|
237
|
+
items: g.value,
|
|
233
238
|
disabled: e.loading,
|
|
234
239
|
interactive: !e.loading,
|
|
235
|
-
onItemHover: k(
|
|
240
|
+
onItemHover: k(N)
|
|
236
241
|
}, null, 8, [
|
|
237
242
|
"items",
|
|
238
243
|
"disabled",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./SChartSkeletonHost-Dt5EjQr5.cjs"),t=require("./buildCartesianChartScales-Dck5yBMo.cjs"),n=require("./buildChartSeriesPoints-Bv3nXvSu.cjs"),r=require("./resolveStackedChartContext-Dsxhhhel.cjs"),i=require("./resolveSeriesPaletteColor-hI4YDdUg.cjs"),a=require("./SChartLegend-DGtjd6zV.cjs"),o=require("./useHasListener-BPgtbbo6.cjs");let s=require("vue");var c=(t,n,r,a=!1)=>i.t(t,n,r,a,{palette:e._,paletteFallback:e.v.barStackedPalette1,skeletonPalette:e.g,skeletonFallback:e.v.barSkeletonPalette1}),l=3,u=4,d=(e,t,n,r,i,a)=>{let o=Math.min(a,r/2,i),s=o;e.beginPath(),e.moveTo(t,n+i),e.lineTo(t,n+o),e.arcTo(t,n,t+o,n,o),e.lineTo(t+r-s,n),e.arcTo(t+r,n,t+r,n+s,s),e.lineTo(t+r,n+i),e.closePath(),e.stroke()},f=t=>({id:`stackedBarHoverOutline`,afterDatasetsDraw(n){let r=n.tooltip?.getActiveElements()??[];if(r.length===0)return;let i=1/0,a=1/0,o=-1/0,s=-1/0;for(let e of r){let{x:t,y:n,width:r,base:c}=e.element.getProps([`x`,`y`,`width`,`base`]),l=t-r/2,u=t+r/2,d=n,f=c;i=Math.min(i,l),o=Math.max(o,u),a=Math.min(a,d),s=Math.max(s,f)}let c=e.w(e.v.barHoverOutline,t),{ctx:f,chartArea:p}=n,m=l/2,h=p?.bottom??s,g=Math.min(s,h),_=i+m,v=a+m,y=o-i-l,b=g-a-l;if(y<=0||b<=0)return;let x=Math.max(0,u-m);f.save(),f.strokeStyle=c,f.lineWidth=l,d(f,_,v,y,b,x),f.restore()}}),p=5,m=`stack0`,h=36,g=4,_=12,v=({seriesList:n,colorHostElement:i,yMax:a,yMin:o,yStep:s=p,skeleton:l=!1,onSeriesClick:u,onSegmentClick:d})=>{let v=r.t({seriesList:n,colorHostElement:i,yMax:a,yMin:o,yStep:s,skeleton:l});if(!v)return null;let{axisLabelColor:y,gridColor:b,tooltipBackgroundColor:x,tooltipTextColor:S,resolvedYMax:C,resolvedYMin:w,chartLabels:T,pointCaptions:E,topSeriesIndex:D}=v,O=e.a({kind:`segment`,skeleton:l,colorHostElement:i,onIndexClick:u,onElementIndexClick:d});return{type:`bar`,data:{labels:T,datasets:n.map((e,t)=>{let n=c(t,i,e.fillColor,l);return{label:e.label,data:e.points.map(e=>e.value),backgroundColor:n,hoverBackgroundColor:n,borderWidth:0,hoverBorderWidth:0,stack:m,barThickness:h,borderRadius:t===D?{topLeft:g,topRight:g}:0,...t===0?{captions:E}:{}}})},options:{responsive:!0,maintainAspectRatio:!1,onHover:O.onHover,onClick:O.onClick,hover:l?void 0:{mode:`nearest`,intersect:!0},interaction:e.o(l,{mode:`nearest`,intersect:!0}),plugins:{legend:{display:!1},tooltip:{enabled:e.s(l),backgroundColor:x,titleColor:S,bodyColor:S,displayColors:!1,position:e.m,yAlign:`bottom`,xAlign:`center`,caretPadding:8,callbacks:e.h()}},scales:t.t({axisLabelColor:y,gridColor:b,yMin:w,yMax:C,yStep:s,stacked:!0,xTickFontSize:_})},plugins:e.c(l,[f(i),...O.plugins])}},y=[`5 неделя`,`6 неделя`,`7 неделя`,`8 неделя`,`9 неделя`,`10 неделя`,`11 неделя`,`12 неделя`,`13 неделя`,`14 неделя`,`15 неделя`,`16 неделя`],b=[12,14,15,16,18,17,16,15,14,13,12,11],x=[6,7,8,8,9,8,7,7,6,6,5,5],S=[4,5,5,6,6,5,5,4,4,3,3,3],C=[`Series 1`,`Series 2`,`Series 3`],w=[{label:C[0]??`Series 1`,points:n.t(y,b)},{label:C[1]??`Series 2`,points:n.t(y,x)},{label:C[2]??`Series 3`,points:n.t(y,S)}],T={class:`s-ui-chart-stacked-bar__canvas-wrap`},E=(0,s.defineComponent)({__name:`SChartStackedBar`,props:{series:{default:()=>[]},loading:{type:Boolean,default:!1},yMax:{},yStep:{}},emits:[`seriesClick`,`segmentClick`],setup(t,{expose:r,emit:i}){let l=i,u=(0,s.useTemplateRef)(`chartRootRef`),d=(0,s.useTemplateRef)(`chartCanvasRef`),f=(0,s.computed)(()=>t.loading?w:t.series),p=e=>{let n=t.series[e];n&&l(`seriesClick`,e,n)},m=(e,n)=>{let r=t.series[n],i=r?.points[e];r&&i&&l(`segmentClick`,e,n,i,r)},h=o.t(`onSeriesClick`),g=o.t(`onSegmentClick`),_=(0,s.computed)(()=>!t.loading&&t.series.length===0?null:v({seriesList:f.value,colorHostElement:u.value,yMax:t.loading?50:t.yMax,yMin:t.loading?0:void 0,yStep:t.loading?5:t.yStep,skeleton:t.loading,onSeriesClick:h()?p:void 0,onSegmentClick:g()?m:void 0})),y=(0,s.computed)(()=>n.n(f.value,(e,n)=>c(e,u.value,n,t.loading))),{chartInstance:b}=e.i({canvasRef:d,config:_,enabled:(0,s.computed)(()=>t.loading||t.series.length>0)}),{exportImage:x,handleLegendItemHover:S}=e.r({chartInstance:b,canvasRef:d,colorHostElement:u});return r({exportImage:x}),(n,r)=>((0,s.openBlock)(),(0,s.createElementBlock)(`div`,{ref_key:`chartRootRef`,ref:u,class:(0,s.normalizeClass)([`s-ui-chart-stacked-bar`,{"s-ui-chart-stacked-bar--skeleton":t.loading}])},[(0,s.createElementVNode)(`div`,T,[(0,s.createVNode)((0,s.unref)(e.t),{loading:t.loading},{default:(0,s.withCtx)(()=>[(0,s.createElementVNode)(`canvas`,{ref_key:`chartCanvasRef`,ref:d,class:`s-ui-chart-stacked-bar__canvas`},null,512)]),_:1},8,[`loading`])]),y.value.length?((0,s.openBlock)(),(0,s.createBlock)((0,s.unref)(a.t),{key:0,items:y.value,disabled:t.loading,interactive:!t.loading,onItemHover:(0,s.unref)(S)},null,8,[`items`,`disabled`,`interactive`,`onItemHover`])):(0,s.createCommentVNode)(``,!0)],2))}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return E}});
|
|
@@ -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
|