@algorisys/zen-ui-vanilla 13.10.1 → 13.11.1
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/AGENTS.md +2 -2
- package/dist/_core/index.d.ts +1 -0
- package/dist/_core/messages-all.d.ts +5 -0
- package/dist/_core/messages.d.ts +5 -0
- package/dist/_core/planning-gesture.d.ts +31 -0
- package/dist/_core/planning.d.ts +71 -9
- package/dist/components/data-table/data-table.d.ts.map +1 -1
- package/dist/components/event-calendar/event-calendar-item.d.ts.map +1 -1
- package/dist/components/event-calendar/event-calendar-model.d.ts +6 -0
- package/dist/components/event-calendar/event-calendar-model.d.ts.map +1 -1
- package/dist/components/planning-calendar/planning-calendar.d.ts +65 -3
- package/dist/components/planning-calendar/planning-calendar.d.ts.map +1 -1
- package/dist/components/rich-text/rich-text.d.ts +5 -7
- package/dist/components/rich-text/rich-text.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index108.js +12 -4
- package/dist/index108.js.map +1 -1
- package/dist/index112.js +244 -144
- package/dist/index112.js.map +1 -1
- package/dist/index113.js +6 -6
- package/dist/index114.js +1 -1
- package/dist/index115.js +1 -1
- package/dist/index116.js +1 -1
- package/dist/index118.js +2 -2
- package/dist/index120.js +2 -2
- package/dist/index168.js +1 -1
- package/dist/index175.js +1 -1
- package/dist/index187.js +1 -1
- package/dist/index191.js +1 -1
- package/dist/index194.js +2 -2
- package/dist/index199.js +1 -1
- package/dist/index211.js +5 -0
- package/dist/index211.js.map +1 -1
- package/dist/index230.js +107 -75
- package/dist/index230.js.map +1 -1
- package/dist/index231.js +95 -7
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +7 -48
- package/dist/index232.js.map +1 -1
- package/dist/index233.js +45 -37
- package/dist/index233.js.map +1 -1
- package/dist/index234.js +38 -149
- package/dist/index234.js.map +1 -1
- package/dist/index235.js +138 -177
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +190 -90
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +90 -444
- package/dist/index237.js.map +1 -1
- package/dist/index238.js +436 -98
- package/dist/index238.js.map +1 -1
- package/dist/index239.js +106 -2
- package/dist/index239.js.map +1 -1
- package/dist/index240.js +2 -18804
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +18798 -117
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +122 -13
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +13 -3012
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +3006 -123
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +125 -140
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +138 -93
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +91 -104
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +95 -111
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +127 -4
- package/dist/index249.js.map +1 -1
- package/dist/index250.js +5 -34
- package/dist/index250.js.map +1 -1
- package/dist/index251.js +34 -9
- package/dist/index251.js.map +1 -1
- package/dist/index252.js +10 -7
- package/dist/index252.js.map +1 -1
- package/dist/index253.js +6 -15
- package/dist/index253.js.map +1 -1
- package/dist/index254.js +15 -11
- package/dist/index254.js.map +1 -1
- package/dist/index255.js +11 -3
- package/dist/index255.js.map +1 -1
- package/dist/index256.js +7 -0
- package/dist/index256.js.map +1 -0
- package/dist/index99.js.map +1 -1
- package/dist/previews/analytic-chart.jpg +0 -0
- package/dist/previews/chunk-uploader.jpg +0 -0
- package/dist/previews/code-editor.jpg +0 -0
- package/dist/previews/countdown.jpg +0 -0
- package/dist/previews/loading.jpg +0 -0
- package/dist/previews/map.jpg +0 -0
- package/dist/previews/tile.jpg +0 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/skills/zen-ui/SKILL.md +1 -1
- package/skills/zen-ui/references/api/event-calendar-event-calendar.md +1 -0
- package/skills/zen-ui/references/api/index.md +1 -1
- package/skills/zen-ui/references/api/locale.md +5 -0
- package/skills/zen-ui/references/api/planning-calendar.md +30 -1
- package/skills/zen-ui/references/api/rich-text.md +1 -1
- package/skills/zen-ui/references/api/scan-input.md +1 -1
- package/skills/zen-ui/references/catalogue.md +2 -2
package/dist/index237.js
CHANGED
|
@@ -1,447 +1,93 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
if (s === 0 || r <= 0 || o.clientWidth - r <= 0) {
|
|
91
|
-
w.style.display = "none";
|
|
92
|
-
return;
|
|
93
|
-
}
|
|
94
|
-
w.style.display = "", w.style.bottom = `${t}px`, w.style.insetInlineStart = `${t}px`, w.style.insetInlineEnd = `${t + i}px`, w.style.height = `${s}px`, E.style.width = `${r}px`, I.style.width = `${e.axis.axisWidth}px`, R();
|
|
95
|
-
};
|
|
96
|
-
_.append(S, k, o, w);
|
|
97
|
-
let f = { top: 0, height: je, width: 0, left: 0 };
|
|
98
|
-
const N = () => Math.max(0, f.width - e.axis.paneWidth), P = (t) => e.axis.minGapMs > 0 ? (t.getTime() - e.axis.range.start.getTime()) / e.axis.minGapMs : 0, D = () => new Date(e.axis.range.start.getTime() + (f.left + N() / 2) * e.axis.minGapMs), J = () => e.axis.continuous ? D() : e.anchor, te = () => e.axis.continuous ? De(e.axis.columnWidths, f.left, N(), Math.max(N(), 400)) : null, C = () => {
|
|
99
|
-
const t = te();
|
|
100
|
-
return t ? t.offsets.map((s, i) => ({ i: t.first + i, offset: s })) : e.axis.columns.map((s, i) => ({ i }));
|
|
101
|
-
};
|
|
102
|
-
let O = null;
|
|
103
|
-
const de = () => e.axis.isFit ? He(e.axis.range) : Xe(e.axis.anchoredView, e.axis.continuous ? D() : e.anchor);
|
|
104
|
-
let ce = "", F = [], M = [], U = [];
|
|
105
|
-
const H = (t) => (F.push(t), t), ne = (t, s, i) => {
|
|
106
|
-
t.addEventListener(s, i), U.push(() => t.removeEventListener(s, i));
|
|
107
|
-
}, L = () => e.rowHeight ?? Ue, oe = () => re().length + 1, re = () => e.axis.paneKeys.map((t) => e.columns.find((s) => s.key === t)).filter((t) => t !== void 0);
|
|
108
|
-
let q = { row: 0, col: 0 };
|
|
109
|
-
const $ = () => Math.min(Math.max(q.row, 0), Math.max(e.rows.length - 1, 0)), T = () => Math.min(Math.max(q.col, 0), oe() - 1);
|
|
110
|
-
let ie = !1;
|
|
111
|
-
const he = () => Be(e.rows.length, L(), f.top, f.height);
|
|
112
|
-
let y = null, X = null, V = null, K = null, j = null;
|
|
113
|
-
const se = (t, s, i) => {
|
|
114
|
-
for (const r of s)
|
|
115
|
-
Qe(r) ? (i.push(r), t.append(r.el)) : t.append(r);
|
|
116
|
-
};
|
|
117
|
-
function ke(t) {
|
|
118
|
-
const s = he(), i = Math.min(Math.max($(), s.startIndex), Math.max(s.endIndex - 1, 0)), r = t.index === i ? T() : -1, u = re(), h = e.rowClass?.(t), n = c(
|
|
119
|
-
"div",
|
|
120
|
-
W(
|
|
121
|
-
"zen-flex zen-border-b zen-border-zen-border last:zen-border-b-0",
|
|
122
|
-
/* The frozen pane is the row's CHILD, so it covers the row's content
|
|
123
|
-
box and stops one pixel short of its bottom border. Whatever is drawn
|
|
124
|
-
over the axis at that height then shows through the pane as it
|
|
125
|
-
scrolls under: a dependency line routed along a row boundary crossed
|
|
126
|
-
the whole pane, and the today marker left a dot on every rule. The
|
|
127
|
-
pane redraws the rule itself, one pixel below its own box and at its
|
|
128
|
-
own stacking level. Not on the last row, which has no rule to cover. */
|
|
129
|
-
"[&:not(:last-child)>div:first-child]:zen-shadow-[0_1px_0_0_var(--zen-color-border)]",
|
|
130
|
-
h
|
|
131
|
-
)
|
|
132
|
-
);
|
|
133
|
-
n.setAttribute("role", "row"), n.setAttribute("aria-rowindex", String(t.index + 2)), n.setAttribute("aria-level", String(t.depth + 1)), t.hasChildren && n.setAttribute("aria-expanded", String(t.expanded)), n.style.height = `${L()}px`, n.style.boxSizing = "border-box";
|
|
134
|
-
const d = c(
|
|
135
|
-
"div",
|
|
136
|
-
"zen-sticky zen-z-20 zen-flex zen-shrink-0 zen-items-center zen-border-e zen-border-zen-border zen-bg-zen-background"
|
|
137
|
-
);
|
|
138
|
-
d.style.width = `${e.axis.paneWidth}px`, d.style.insetInlineStart = "0", u.forEach((z, v) => {
|
|
139
|
-
const g = c("div", W("zen-flex zen-items-center", z.class ?? "zen-px-2", Ae));
|
|
140
|
-
g.setAttribute("role", "gridcell"), g.setAttribute("aria-colindex", String(z.colIndex)), g.setAttribute("data-gantt-cell", `${t.index}:${v}`), g.tabIndex = r === v ? 0 : -1;
|
|
141
|
-
const A = z.ariaLabel?.(t);
|
|
142
|
-
A && g.setAttribute("aria-label", A), g.style.width = `${z.width}px`;
|
|
143
|
-
for (const [Le, Te] of z.style?.(t) ?? []) g.style.setProperty(Le, Te);
|
|
144
|
-
ne(g, "focusin", () => {
|
|
145
|
-
q = { row: t.index, col: v };
|
|
146
|
-
}), se(g, z.render(t), M), d.append(g);
|
|
147
|
-
});
|
|
148
|
-
const l = c("div", W("zen-relative zen-shrink-0", Ae));
|
|
149
|
-
l.setAttribute("role", "gridcell"), l.setAttribute("aria-colindex", String(e.timelineColIndex)), l.setAttribute("data-gantt-cell", `${t.index}:${u.length}`), l.tabIndex = r === u.length ? 0 : -1, l.style.width = `${e.axis.axisWidth}px`, ne(l, "focusin", () => {
|
|
150
|
-
q = { row: t.index, col: u.length };
|
|
151
|
-
});
|
|
152
|
-
const p = c("div", "zen-absolute zen-inset-0 zen-flex");
|
|
153
|
-
p.setAttribute("aria-hidden", "true");
|
|
154
|
-
for (const { i: z, offset: v } of C()) {
|
|
155
|
-
const g = e.axis.columns[z], A = c(
|
|
156
|
-
"div",
|
|
157
|
-
W(
|
|
158
|
-
"zen-shrink-0 zen-border-e zen-border-zen-border last:zen-border-e-0",
|
|
159
|
-
v !== void 0 && "zen-absolute zen-inset-y-0",
|
|
160
|
-
g.nonWorking && (h ? "zen-bg-[color-mix(in_srgb,var(--zen-color-muted)_40%,transparent)]" : "zen-bg-zen-muted"),
|
|
161
|
-
g.today && (h ? "zen-bg-[color-mix(in_srgb,var(--zen-color-primary-soft)_40%,transparent)]" : "zen-bg-zen-primary-soft")
|
|
162
|
-
)
|
|
163
|
-
);
|
|
164
|
-
A.style.width = `${e.axis.columnWidths[z]}px`, v !== void 0 && (A.style.insetInlineStart = `${v}px`), p.append(A);
|
|
165
|
-
}
|
|
166
|
-
return l.append(p), se(l, e.renderTrack(t, e.axis.axisWidth), M), n.append(d, l), n;
|
|
167
|
-
}
|
|
168
|
-
function Q() {
|
|
169
|
-
if (!j || !V || !K) return;
|
|
170
|
-
for (const s of M) s.destroy();
|
|
171
|
-
M = [], j.replaceChildren();
|
|
172
|
-
const t = he();
|
|
173
|
-
V.style.height = `${t.paddingTop}px`, K.style.height = `${t.paddingBottom}px`;
|
|
174
|
-
for (const s of e.rows.slice(t.startIndex, t.endIndex))
|
|
175
|
-
j.append(ke(s));
|
|
176
|
-
}
|
|
177
|
-
function Ce(t, s) {
|
|
178
|
-
q = { row: t, col: s };
|
|
179
|
-
const i = b() + t * L(), r = i - b(), u = i + L() - o.clientHeight, h = Math.max(0, Math.min(Math.max(o.scrollTop, u), r));
|
|
180
|
-
h !== o.scrollTop && (o.scrollTop = h, f = { ...f, top: h }), Q();
|
|
181
|
-
const n = o.querySelector(`[data-gantt-cell="${t}:${s}"]`);
|
|
182
|
-
if (!n) return;
|
|
183
|
-
ie = !0, n.focus({ preventScroll: !0 });
|
|
184
|
-
const d = n.querySelector("[data-gantt-bar]");
|
|
185
|
-
if (!d) return;
|
|
186
|
-
const l = d.getBoundingClientRect(), p = o.getBoundingClientRect(), z = getComputedStyle(o).direction === "rtl", v = e.axis.paneWidth, g = z ? p.left : p.left + v, A = z ? p.right - v : p.right;
|
|
187
|
-
l.left < g ? o.scrollLeft -= g - l.left : l.right > A && (o.scrollLeft += Math.min(l.right - A, l.left - g));
|
|
188
|
-
}
|
|
189
|
-
function $e(t) {
|
|
190
|
-
if (t.altKey || t.metaKey) return;
|
|
191
|
-
const s = getComputedStyle(o).direction === "rtl", i = s ? "ArrowLeft" : "ArrowRight", r = s ? "ArrowRight" : "ArrowLeft", u = Math.max(1, Math.floor((f.height - b()) / L())), h = e.rows.length - 1, n = e.rows[$()];
|
|
192
|
-
let d = $(), l = T();
|
|
193
|
-
switch (t.key) {
|
|
194
|
-
case "ArrowDown":
|
|
195
|
-
d = Math.min(h, $() + 1);
|
|
196
|
-
break;
|
|
197
|
-
case "ArrowUp":
|
|
198
|
-
d = Math.max(0, $() - 1);
|
|
199
|
-
break;
|
|
200
|
-
case i:
|
|
201
|
-
if (T() === 0 && n?.hasChildren && !n.expanded) {
|
|
202
|
-
t.preventDefault(), e.onToggle(n);
|
|
203
|
-
return;
|
|
204
|
-
}
|
|
205
|
-
l = Math.min(oe() - 1, T() + 1);
|
|
206
|
-
break;
|
|
207
|
-
case r:
|
|
208
|
-
if (T() === 0 && n?.hasChildren && n.expanded) {
|
|
209
|
-
t.preventDefault(), e.onToggle(n);
|
|
210
|
-
return;
|
|
211
|
-
}
|
|
212
|
-
l = Math.max(0, T() - 1);
|
|
213
|
-
break;
|
|
214
|
-
case "Home":
|
|
215
|
-
l = 0, t.ctrlKey && (d = 0);
|
|
216
|
-
break;
|
|
217
|
-
case "End":
|
|
218
|
-
l = oe() - 1, t.ctrlKey && (d = h);
|
|
219
|
-
break;
|
|
220
|
-
case "PageDown":
|
|
221
|
-
d = Math.min(h, $() + u);
|
|
222
|
-
break;
|
|
223
|
-
case "PageUp":
|
|
224
|
-
d = Math.max(0, $() - u);
|
|
225
|
-
break;
|
|
226
|
-
case "Enter":
|
|
227
|
-
case " ":
|
|
228
|
-
t.preventDefault(), n && e.onActivate?.(n);
|
|
229
|
-
return;
|
|
230
|
-
default:
|
|
231
|
-
return;
|
|
232
|
-
}
|
|
233
|
-
t.preventDefault(), !(d === $() && l === T()) && Ce(d, l);
|
|
234
|
-
}
|
|
235
|
-
function We() {
|
|
236
|
-
const t = c("div", "zen-flex zen-flex-wrap zen-items-center zen-gap-2");
|
|
237
|
-
if (!e.axis.isFit) {
|
|
238
|
-
const r = H(
|
|
239
|
-
Z({
|
|
240
|
-
variant: "outline",
|
|
241
|
-
size: "sm",
|
|
242
|
-
"aria-label": x.t("scheduleGrid.previous"),
|
|
243
|
-
// Logical, not physical: under RTL the axis runs the other way.
|
|
244
|
-
children: H(be({ name: "chevron-left", size: 14, class: "rtl:zen-rotate-180" })),
|
|
245
|
-
/* Continuous: a period back from what is ON SCREEN, not from an anchor
|
|
246
|
-
the user may have scrolled a month away from. */
|
|
247
|
-
onClick: () => e.onDateChange(ze(e.axis.anchoredView, J(), -1))
|
|
248
|
-
})
|
|
249
|
-
), u = H(
|
|
250
|
-
Z({
|
|
251
|
-
variant: "outline",
|
|
252
|
-
size: "sm",
|
|
253
|
-
children: x.t("scheduleGrid.today"),
|
|
254
|
-
onClick: () => e.onDateChange(e.now)
|
|
255
|
-
})
|
|
256
|
-
), h = H(
|
|
257
|
-
Z({
|
|
258
|
-
variant: "outline",
|
|
259
|
-
size: "sm",
|
|
260
|
-
"aria-label": x.t("scheduleGrid.next"),
|
|
261
|
-
children: H(be({ name: "chevron-right", size: 14, class: "rtl:zen-rotate-180" })),
|
|
262
|
-
onClick: () => e.onDateChange(ze(e.axis.anchoredView, J(), 1))
|
|
263
|
-
})
|
|
264
|
-
);
|
|
265
|
-
t.append(r.el, u.el, h.el);
|
|
266
|
-
}
|
|
267
|
-
const s = c("span", "zen-mx-1 zen-text-sm zen-font-medium zen-text-zen-foreground", de());
|
|
268
|
-
O = s, s.setAttribute("dir", "auto"), t.append(s);
|
|
269
|
-
const i = c("div", "zen-ms-auto zen-flex zen-gap-1");
|
|
270
|
-
i.setAttribute("role", "group"), i.setAttribute("aria-label", x.t("scheduleGrid.view"));
|
|
271
|
-
for (const r of e.views ?? Je) {
|
|
272
|
-
const u = H(
|
|
273
|
-
Z({
|
|
274
|
-
variant: e.view === r ? "solid" : "outline",
|
|
275
|
-
size: "sm",
|
|
276
|
-
// A boolean would land as aria-pressed="" (the helper writes
|
|
277
|
-
// booleans as presence attributes), which reads as unset.
|
|
278
|
-
"aria-pressed": String(e.view === r),
|
|
279
|
-
children: x.t(Ye[r]),
|
|
280
|
-
onClick: () => {
|
|
281
|
-
e.axis.continuous && r !== "fit" && e.onDateChange(D()), e.onViewChange(r);
|
|
282
|
-
}
|
|
283
|
-
})
|
|
284
|
-
);
|
|
285
|
-
i.append(u.el);
|
|
286
|
-
}
|
|
287
|
-
return t.append(i), t;
|
|
288
|
-
}
|
|
289
|
-
function ue() {
|
|
290
|
-
const t = c(
|
|
291
|
-
"div",
|
|
292
|
-
W("zen-sticky zen-top-0 zen-z-30 zen-flex zen-border-b zen-border-zen-border zen-bg-zen-muted", e.headerClassName)
|
|
293
|
-
);
|
|
294
|
-
t.setAttribute("role", "row"), t.setAttribute("aria-rowindex", "1"), t.style.height = `${b()}px`, t.style.boxSizing = "border-box";
|
|
295
|
-
const s = c(
|
|
296
|
-
"div",
|
|
297
|
-
W(
|
|
298
|
-
"zen-sticky zen-z-40 zen-flex zen-shrink-0 zen-items-center zen-border-e zen-border-zen-border zen-bg-zen-muted zen-text-xs zen-font-semibold zen-text-zen-muted-fg",
|
|
299
|
-
e.headerClassName
|
|
300
|
-
)
|
|
301
|
-
);
|
|
302
|
-
s.style.width = `${e.axis.paneWidth}px`, s.style.insetInlineStart = "0";
|
|
303
|
-
for (const n of re()) {
|
|
304
|
-
const d = c("div", W("zen-truncate", n.class ?? "zen-px-2"), n.label);
|
|
305
|
-
d.setAttribute("role", "columnheader"), d.setAttribute("aria-colindex", String(n.colIndex)), d.style.width = `${n.width}px`, s.append(d);
|
|
306
|
-
}
|
|
307
|
-
const i = c("div", e.headerGroups ? "zen-flex zen-flex-col" : "zen-flex");
|
|
308
|
-
i.setAttribute("role", "columnheader"), i.setAttribute("aria-colindex", String(e.timelineColIndex)), i.setAttribute("aria-label", x.t("scheduleGrid.timeline")), i.style.width = `${e.axis.axisWidth}px`;
|
|
309
|
-
const r = e.headerGroups ? c("div") : i, u = e.axis.continuous, h = u ? c("div", "zen-relative zen-h-full zen-w-full") : r;
|
|
310
|
-
u && (h.setAttribute("data-schedule-windowed", ""), r.append(h));
|
|
311
|
-
for (const { i: n, offset: d } of C()) {
|
|
312
|
-
const l = e.axis.columns[n], p = c(
|
|
313
|
-
"div",
|
|
314
|
-
W(
|
|
315
|
-
"zen-flex zen-shrink-0 zen-flex-col zen-items-center zen-justify-center zen-overflow-hidden zen-border-e zen-border-zen-border last:zen-border-e-0",
|
|
316
|
-
d !== void 0 && "zen-absolute zen-inset-y-0",
|
|
317
|
-
l.nonWorking && "zen-bg-zen-muted",
|
|
318
|
-
l.today && "zen-bg-zen-primary-soft"
|
|
319
|
-
)
|
|
320
|
-
);
|
|
321
|
-
p.style.width = `${e.axis.columnWidths[n]}px`, d !== void 0 && (p.style.insetInlineStart = `${d}px`), p.append(c("span", "zen-text-xs zen-font-medium zen-text-zen-foreground", l.label)), l.sublabel && p.append(c("span", "zen-[font-size:var(--zen-schedule-label-font-size)] zen-text-zen-muted-fg", l.sublabel)), h.append(p);
|
|
322
|
-
}
|
|
323
|
-
if (e.headerGroups) {
|
|
324
|
-
const n = e.axis.columnWidths, d = c("div", "zen-flex zen-shrink-0 zen-border-b zen-border-zen-border");
|
|
325
|
-
d.setAttribute("aria-hidden", "true"), d.setAttribute("data-schedule-groups", ""), d.style.height = `${le}px`, d.style.boxSizing = "border-box";
|
|
326
|
-
for (const l of Fe(e.axis.columns, e.axis.unit)) {
|
|
327
|
-
const p = n.slice(l.firstColumn, l.firstColumn + l.columnCount).reduce((g, A) => g + A, 0), z = c("div", "zen-shrink-0 zen-border-e zen-border-zen-border last:zen-border-e-0");
|
|
328
|
-
z.setAttribute("data-schedule-group", ""), z.style.width = `${p}px`;
|
|
329
|
-
const v = c(
|
|
330
|
-
"span",
|
|
331
|
-
"zen-sticky zen-inline-block zen-max-w-full zen-truncate zen-px-2 zen-align-top zen-text-xs zen-font-semibold zen-text-zen-foreground",
|
|
332
|
-
p >= l.label.length * 7 + 16 ? l.label : l.shortLabel
|
|
333
|
-
);
|
|
334
|
-
v.style.insetInlineStart = `${e.axis.paneWidth}px`, v.style.lineHeight = `${le - 1}px`, z.append(v), d.append(z);
|
|
335
|
-
}
|
|
336
|
-
r.setAttribute("data-schedule-axis-row", ""), r.className = "zen-flex zen-min-h-0 zen-flex-1", i.append(d, r);
|
|
337
|
-
}
|
|
338
|
-
return t.append(s, i), t;
|
|
339
|
-
}
|
|
340
|
-
function Me() {
|
|
341
|
-
const t = e.connectors;
|
|
342
|
-
if (!t || t.length === 0) return null;
|
|
343
|
-
const s = e.rows.length * L(), i = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
344
|
-
i.setAttribute("aria-hidden", "true"), i.setAttribute(
|
|
345
|
-
"class",
|
|
346
|
-
"zen-pointer-events-none zen-absolute zen-top-0 zen-z-10 rtl:-zen-scale-x-100"
|
|
347
|
-
), i.setAttribute("width", String(e.axis.axisWidth)), i.setAttribute("height", String(s)), i.setAttribute("viewBox", `0 0 ${e.axis.axisWidth} ${s}`), i.style.insetInlineStart = `${e.axis.paneWidth}px`;
|
|
348
|
-
for (const r of t) {
|
|
349
|
-
const u = e.connectorAccent?.(r) ?? !1, h = e.connectorStyle?.(r), n = u ? "var(--zen-color-error)" : h?.color ?? "var(--zen-color-muted-fg)", d = document.createElementNS("http://www.w3.org/2000/svg", "g"), l = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
350
|
-
l.setAttribute("d", r.d), l.setAttribute("fill", "none"), l.setAttribute("stroke", n), h?.dash && l.setAttribute("stroke-dasharray", h.dash), l.setAttribute("stroke-width", u ? "2.25" : "1.5");
|
|
351
|
-
const p = document.createElementNS("http://www.w3.org/2000/svg", "polygon");
|
|
352
|
-
p.setAttribute(
|
|
353
|
-
"points",
|
|
354
|
-
[
|
|
355
|
-
`${r.arrow.x},${r.arrow.y}`,
|
|
356
|
-
`${r.arrow.x - r.arrow.dir * ee * 1.6},${r.arrow.y - ee}`,
|
|
357
|
-
`${r.arrow.x - r.arrow.dir * ee * 1.6},${r.arrow.y + ee}`
|
|
358
|
-
].join(" ")
|
|
359
|
-
), p.setAttribute("fill", n), d.append(l, p), i.append(d);
|
|
360
|
-
}
|
|
361
|
-
return i;
|
|
362
|
-
}
|
|
363
|
-
function fe() {
|
|
364
|
-
for (const n of F) n.destroy();
|
|
365
|
-
for (const n of M) n.destroy();
|
|
366
|
-
for (const n of U) n();
|
|
367
|
-
F = [], M = [], U = [], _.className = W("zen-relative zen-flex zen-w-full zen-flex-col zen-gap-3", e.class);
|
|
368
|
-
const t = e.maxBodyHeight;
|
|
369
|
-
o.classList.toggle("zen-max-h-[32rem]", t === void 0), o.style.maxHeight = t === void 0 ? "" : typeof t == "number" ? `${t}px` : t, S.replaceChildren(), e.hideToolbar || S.append(We()), k.replaceChildren(), k.hidden = !e.legend, e.legend && k.append(e.legend);
|
|
370
|
-
const s = o.scrollTop, i = o.scrollLeft, r = o.contains(document.activeElement);
|
|
371
|
-
o.replaceChildren(), y = c("div"), y.style.width = `${e.axis.paneWidth + e.axis.axisWidth}px`, y.setAttribute("role", "treegrid"), y.setAttribute("aria-rowcount", String(e.rows.length + 1)), y.setAttribute("aria-colcount", String(e.colCount)), y.setAttribute("aria-label", e.ariaLabel), ne(y, "keydown", $e), y.append(ue()), X = c("div", "zen-relative"), X.style.height = `${e.rows.length * L()}px`, V = c("div"), V.setAttribute("aria-hidden", "true"), j = c("div"), K = c("div"), K.setAttribute("aria-hidden", "true"), X.append(V, j, K);
|
|
372
|
-
const u = Ee(e.axis.range, e.now);
|
|
373
|
-
if (u !== null) {
|
|
374
|
-
const n = c("div", "zen-pointer-events-none zen-absolute zen-top-0 zen-z-10 zen-w-px zen-bg-zen-error");
|
|
375
|
-
n.setAttribute("aria-hidden", "true"), n.style.height = `${e.rows.length * L()}px`, n.style.insetInlineStart = `${e.axis.paneWidth + u / 100 * e.axis.axisWidth}px`, X.append(n);
|
|
376
|
-
}
|
|
377
|
-
const h = Me();
|
|
378
|
-
if (h && X.append(h), y.append(X), o.append(y), e.renderFooter) {
|
|
379
|
-
const n = c(
|
|
380
|
-
"div",
|
|
381
|
-
"zen-sticky zen-bottom-0 zen-z-30 zen-flex zen-border-t zen-border-zen-border zen-bg-zen-muted"
|
|
382
|
-
);
|
|
383
|
-
n.style.width = `${e.axis.paneWidth + e.axis.axisWidth}px`, se(n, e.renderFooter(e.axis), F), o.append(n);
|
|
384
|
-
}
|
|
385
|
-
if (Q(), o.scrollTop = s, o.scrollLeft = i, e.axis.continuous && f.width > 0) {
|
|
386
|
-
const n = `${e.view}|${e.anchor.getTime()}|${e.axis.range.start.getTime()}|${e.axis.range.end.getTime()}`;
|
|
387
|
-
if (n !== ce) {
|
|
388
|
-
ce = n;
|
|
389
|
-
const d = Math.max(0, P(Se(e.axis.anchoredView, e.anchor).start));
|
|
390
|
-
o.scrollLeft = getComputedStyle(o).direction === "rtl" ? -d : d;
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
r && (o.querySelector(
|
|
394
|
-
`[data-gantt-cell="${$()}:${T()}"]`
|
|
395
|
-
) ?? o).focus({ preventScroll: !0 }), B();
|
|
396
|
-
}
|
|
397
|
-
const pe = () => {
|
|
398
|
-
B();
|
|
399
|
-
const t = {
|
|
400
|
-
top: o.scrollTop,
|
|
401
|
-
height: o.clientHeight,
|
|
402
|
-
width: o.clientWidth,
|
|
403
|
-
// Chrome reports an RTL scrollLeft as negative; the axis thinks in logical px.
|
|
404
|
-
left: Math.abs(o.scrollLeft)
|
|
405
|
-
}, s = t.top !== f.top || t.height !== f.height, i = t.width !== f.width || t.height !== f.height, r = t.left !== f.left;
|
|
406
|
-
if (!(!s && !i && !r)) {
|
|
407
|
-
if (f = t, r && !i && e.axis.continuous && y) {
|
|
408
|
-
y.firstElementChild?.replaceWith(ue()), O && (O.textContent = de()), Q();
|
|
409
|
-
return;
|
|
410
|
-
}
|
|
411
|
-
i ? e.onMetrics?.(f) : Q();
|
|
412
|
-
}
|
|
413
|
-
};
|
|
414
|
-
let Y = 0;
|
|
415
|
-
const ae = () => {
|
|
416
|
-
Y === 0 && (Y = requestAnimationFrame(() => {
|
|
417
|
-
Y = 0, pe(), ie && document.activeElement === document.body && o.focus({ preventScroll: !0 });
|
|
418
|
-
}));
|
|
419
|
-
};
|
|
420
|
-
o.addEventListener("scroll", ae, { passive: !0 });
|
|
421
|
-
const xe = new ResizeObserver(ae);
|
|
422
|
-
return xe.observe(o), o.addEventListener("focusin", () => {
|
|
423
|
-
ie = !0;
|
|
424
|
-
}), fe(), queueMicrotask(pe), {
|
|
425
|
-
el: _,
|
|
426
|
-
update(t) {
|
|
427
|
-
e = { ...e, ...t }, fe();
|
|
428
|
-
},
|
|
429
|
-
metrics: () => f,
|
|
430
|
-
destroy() {
|
|
431
|
-
for (const t of F) t.destroy();
|
|
432
|
-
for (const t of M) t.destroy();
|
|
433
|
-
for (const t of U) t();
|
|
434
|
-
F = [], M = [], U = [], Y !== 0 && cancelAnimationFrame(Y), o.removeEventListener("scroll", ae), o.removeEventListener("scroll", R), xe.disconnect(), _.remove();
|
|
435
|
-
}
|
|
436
|
-
};
|
|
437
|
-
}
|
|
1
|
+
const e = {
|
|
2
|
+
"eventCalendar.calendar": "Calendar",
|
|
3
|
+
"eventCalendar.previous": "Previous",
|
|
4
|
+
"eventCalendar.today": "Today",
|
|
5
|
+
"eventCalendar.next": "Next",
|
|
6
|
+
"eventCalendar.view": "View",
|
|
7
|
+
"eventCalendar.views.month": "Month",
|
|
8
|
+
"eventCalendar.views.week": "Week",
|
|
9
|
+
"eventCalendar.views.workWeek": "Work week",
|
|
10
|
+
"eventCalendar.views.day": "Day",
|
|
11
|
+
"eventCalendar.views.agenda": "Agenda",
|
|
12
|
+
"eventCalendar.allDay": "All day",
|
|
13
|
+
"eventCalendar.more": "+{count} more",
|
|
14
|
+
"eventCalendar.moreLabel": "{date}: {count, plural, one {# more event} other {# more events}}",
|
|
15
|
+
"eventCalendar.noEvents": "Nothing scheduled",
|
|
16
|
+
"eventCalendar.goToDay": "Go to {date}",
|
|
17
|
+
"eventCalendar.eventsOn": "Events on {date}",
|
|
18
|
+
"eventCalendar.repeats": "Repeats",
|
|
19
|
+
"eventCalendar.reminders": "{count, plural, one {# reminder} other {# reminders}}",
|
|
20
|
+
"eventCalendar.task": "Task",
|
|
21
|
+
"eventCalendar.done": "Done",
|
|
22
|
+
"eventCalendar.markDone": "Mark {title} done",
|
|
23
|
+
"eventCalendar.markNotDone": "Mark {title} not done",
|
|
24
|
+
"eventCalendar.continues": "continues",
|
|
25
|
+
"eventCalendar.details": ", {details}",
|
|
26
|
+
"eventCalendar.slot": "{date}, {time}",
|
|
27
|
+
"eventCalendar.newEvent": "New event: {time}",
|
|
28
|
+
"eventCalendar.proposed": "{title}: {time}",
|
|
29
|
+
"eventCalendar.editHint": "Alt+arrow keys move, Alt+Shift+Up and Down change the end",
|
|
30
|
+
"eventCalendar.slotHint": "Arrow keys move, Shift+Up and Down change the length, Enter creates, Shift+Enter creates an all-day event",
|
|
31
|
+
"eventCalendar.timeGrid": "Time grid",
|
|
32
|
+
"eventCalendar.allDayEvents": "All-day events",
|
|
33
|
+
"recurrence.none": "Does not repeat",
|
|
34
|
+
"recurrence.custom": "Custom rule",
|
|
35
|
+
"recurrence.everyDays": "{n, plural, one {Every day} other {Every # days}}",
|
|
36
|
+
"recurrence.everyWeeks": "{n, plural, one {Every week} other {Every # weeks}}",
|
|
37
|
+
"recurrence.everyMonths": "{n, plural, one {Every month} other {Every # months}}",
|
|
38
|
+
"recurrence.everyYears": "{n, plural, one {Every year} other {Every # years}}",
|
|
39
|
+
"recurrence.on": "{every} on {when}",
|
|
40
|
+
"recurrence.onDay": "{every} on day {day}",
|
|
41
|
+
"recurrence.onNth": "{every} on the {nth} {weekday}",
|
|
42
|
+
"recurrence.onLastDay": "{every} on the last day",
|
|
43
|
+
"recurrence.nth1": "first",
|
|
44
|
+
"recurrence.nth2": "second",
|
|
45
|
+
"recurrence.nth3": "third",
|
|
46
|
+
"recurrence.nth4": "fourth",
|
|
47
|
+
"recurrence.nthLast": "last",
|
|
48
|
+
"recurrence.times": "{rule}, {count, plural, one {once} other {# times}}",
|
|
49
|
+
"recurrence.until": "{rule}, until {date}",
|
|
50
|
+
"reminder.atStart": "At the start",
|
|
51
|
+
"reminder.minutes": "{n, plural, one {# minute before} other {# minutes before}}",
|
|
52
|
+
"reminder.hours": "{n, plural, one {# hour before} other {# hours before}}",
|
|
53
|
+
"reminder.days": "{n, plural, one {# day before} other {# days before}}",
|
|
54
|
+
"reminder.weeks": "{n, plural, one {# week before} other {# weeks before}}",
|
|
55
|
+
"recurrencePicker.repeat": "Repeat",
|
|
56
|
+
"recurrencePicker.every": "Every",
|
|
57
|
+
"recurrencePicker.unit.days": "{n, plural, one {day} other {days}}",
|
|
58
|
+
"recurrencePicker.unit.weeks": "{n, plural, one {week} other {weeks}}",
|
|
59
|
+
"recurrencePicker.unit.months": "{n, plural, one {month} other {months}}",
|
|
60
|
+
"recurrencePicker.unit.years": "{n, plural, one {year} other {years}}",
|
|
61
|
+
"recurrencePicker.daily": "Daily",
|
|
62
|
+
"recurrencePicker.weekly": "Weekly",
|
|
63
|
+
"recurrencePicker.monthly": "Monthly",
|
|
64
|
+
"recurrencePicker.yearly": "Yearly",
|
|
65
|
+
"recurrencePicker.onDays": "On",
|
|
66
|
+
"recurrencePicker.monthlyOn": "On",
|
|
67
|
+
"recurrencePicker.monthlyDay": "Day {day}",
|
|
68
|
+
"recurrencePicker.monthlyNth": "The {nth} {weekday}",
|
|
69
|
+
"recurrencePicker.monthlyLastDay": "The last day",
|
|
70
|
+
"recurrencePicker.ends": "Ends",
|
|
71
|
+
"recurrencePicker.never": "Never",
|
|
72
|
+
"recurrencePicker.after": "After",
|
|
73
|
+
"recurrencePicker.occurrences": "{n, plural, one {occurrence} other {occurrences}}",
|
|
74
|
+
"recurrencePicker.onDate": "On",
|
|
75
|
+
"recurrencePicker.endDate": "End date",
|
|
76
|
+
"recurrencePicker.replaceCustom": "This rule was set elsewhere and is kept as it is. Choose a repeat above to replace it.",
|
|
77
|
+
"reminderPicker.reminders": "Reminders",
|
|
78
|
+
"reminderPicker.add": "Add reminder",
|
|
79
|
+
"reminderPicker.custom": "Custom…",
|
|
80
|
+
"reminderPicker.remove": "Remove reminder: {label}",
|
|
81
|
+
"reminderPicker.amount": "Amount",
|
|
82
|
+
"reminderPicker.unit": "Unit",
|
|
83
|
+
"reminderPicker.addCustom": "Add",
|
|
84
|
+
"reminderPicker.none": "No reminders",
|
|
85
|
+
"reminderPicker.unit.minutes": "minutes before",
|
|
86
|
+
"reminderPicker.unit.hours": "hours before",
|
|
87
|
+
"reminderPicker.unit.days": "days before",
|
|
88
|
+
"reminderPicker.unit.weeks": "weeks before"
|
|
89
|
+
};
|
|
438
90
|
export {
|
|
439
|
-
|
|
440
|
-
le as GROUP_PX,
|
|
441
|
-
qe as HEADER_PX,
|
|
442
|
-
lt as INDENT_PX,
|
|
443
|
-
Ue as ROW_PX,
|
|
444
|
-
ct as ScheduleGrid,
|
|
445
|
-
dt as resolveScheduleAxis
|
|
91
|
+
e as CALENDAR_MESSAGES
|
|
446
92
|
};
|
|
447
93
|
//# sourceMappingURL=index237.js.map
|