@overvis/hmi-workspace-ui 0.1.0 → 0.1.2
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/dist/alarm-list-DKFio0hg.js +414 -0
- package/dist/alarm-rule-dialog-mb4_nHRW.js +417 -0
- package/dist/{alarm-rule-lists-C5v1Kf7A.js → alarm-rule-lists-CfZXTWkK.js} +123 -125
- package/dist/{alarm-rules-page-CqFzofPd.js → alarm-rules-page-DBLSkrrG.js} +15 -18
- package/dist/alert-dialog-D_iDv2lQ.js +891 -0
- package/dist/{base-revision-YCO27zR4.js → base-revision-DLF9EnGV.js} +26 -29
- package/dist/{breadcrumbs-0cjsV2cq.js → breadcrumbs-D5R6Fz74.js} +6 -7
- package/dist/{catalog-list-DjZojYLJ.js → catalog-list-BkWosvh1.js} +2 -4
- package/dist/{code-editor-BVimvjDV.js → code-editor-DCM0KdMJ.js} +9 -6
- package/dist/dashboard-bindings.js +1 -2
- package/dist/{dashboards-page-BlrJguNz.js → dashboards-page-DLc11Vzu.js} +335 -359
- package/dist/{de-14WdmJxZ.js → de-Z2er-E5v.js} +4 -2
- package/dist/diagnostic-text-CYZFPiND.js +116 -0
- package/dist/{dialogs-D_v1LeH4.js → dialogs-BX023zml.js} +2523 -2590
- package/dist/{dialogs-B6BRnf3Q.js → dialogs-DEOg9lxy.js} +219 -227
- package/dist/{display-DmOo23mi.js → display-VYGzneE0.js} +4 -6
- package/dist/{editor-language-To9MxloY.js → editor-language-CGENZxbI.js} +3 -5
- package/dist/editor-page-CaN52OQh.js +1337 -0
- package/dist/{en-BgercpT0.js → en-CKPPL6bQ.js} +4 -2
- package/dist/entity-controls-DJT47yeV.js +71 -0
- package/dist/errors-BAWoH_5w.js +25 -0
- package/dist/{footer-DC-Q0052.js → footer-CbPMP8aq.js} +2404 -2515
- package/dist/host.js +8254 -675
- package/dist/{i18n-BgzakKoC.js → i18n-ChjEbYEg.js} +77 -90
- package/dist/i18n.js +1 -2
- package/dist/index.js +5168 -5353
- package/dist/{lat-lng-B12P7QyY.js → lat-lng-Bl77AGSO.js} +1 -2
- package/dist/{list-page-CvsdZb86.js → list-page-Fa29SkaJ.js} +116 -123
- package/dist/{location-map-renderer-DO5yfdSU.js → location-map-renderer-DvXIYc1Z.js} +6 -6
- package/dist/{location-picker-renderer-CjCxg6ai.js → location-picker-renderer-B1_-n8lf.js} +3 -4
- package/dist/{model-B8gGi4OK.js → model-tpg_xpFB.js} +1 -2
- package/dist/{notice-card-DyGywFsW.js → notice-card-V_0K0lO0.js} +54 -58
- package/dist/page-B5te_1Lc.js +449 -0
- package/dist/{page-v6LCwswN.js → page-BorlLnMX.js} +92 -100
- package/dist/page-DxF7FOve.js +507 -0
- package/dist/panel-DuZD-cBP.js +949 -0
- package/dist/parameter-values.js +3 -16
- package/dist/{pl-lQ9HXV9k.js → pl-DVABrn5G.js} +4 -2
- package/dist/presence-code-DsabLTZs.js +73 -0
- package/dist/{query-gate-DVhNIkge.js → query-gate-BbIo1Xrj.js} +6 -6
- package/dist/{provider-DoEpKcQ-.js → quick-report-BcZsfkCZ.js} +9423 -5102
- package/dist/{retention-BYXNpYmR.js → retention-C7EZsq8u.js} +4 -6
- package/dist/retention-note-CmMeHV_u.js +40 -0
- package/dist/{rolldown-runtime-Dy4uBu1J.js → rolldown-runtime-CGnMp29N.js} +1 -2
- package/dist/{ru-qTKINoUj.js → ru-CBRLC_xM.js} +8 -6
- package/dist/run-text-CDdfbKbg.js +112 -0
- package/dist/{search-D4rDnE9T.js → search-C6xQ_Hvo.js} +26 -29
- package/dist/{sections-kCOyc4NR.js → sections-D_SBfVzV.js} +2 -3
- package/dist/{select-BKiOWdSr.js → select-nNLG-AMz.js} +17 -23
- package/dist/{spinner-C-HPNxOc.js → spinner-B-KLtBjp.js} +182 -201
- package/dist/src/code-editor/code-editor.d.ts +3 -0
- package/dist/src/code-editor/taskfile-language.d.ts +22 -2
- package/dist/src/i18n/catalogs/de/edge-program.d.ts +3 -0
- package/dist/src/i18n/catalogs/de.d.ts +3 -0
- package/dist/src/i18n/catalogs/en/edge-program.d.ts +3 -0
- package/dist/src/i18n/catalogs/en.d.ts +3 -0
- package/dist/src/i18n/catalogs/pl/edge-program.d.ts +3 -0
- package/dist/src/i18n/catalogs/pl.d.ts +3 -0
- package/dist/src/i18n/catalogs/ru/edge-program.d.ts +5 -2
- package/dist/src/i18n/catalogs/ru/graphics.d.ts +2 -2
- package/dist/src/i18n/catalogs/ru.d.ts +7 -4
- package/dist/src/i18n/catalogs/uk/edge-program.d.ts +5 -2
- package/dist/src/i18n/catalogs/uk/graphics.d.ts +2 -2
- package/dist/src/i18n/catalogs/uk.d.ts +7 -4
- package/dist/src/version.d.ts +1 -1
- package/dist/src/workspace/graphics/inspector/item.d.ts +6 -6
- package/dist/src/workspace/local-workspace-app.d.ts +1 -1
- package/dist/src/workspace/routes.d.ts +1 -1
- package/dist/{starter-fields-BRLX0z-v.js → starter-fields-7S3LmtGa.js} +154 -157
- package/dist/{starter-handoff-BA3ucMKL.js → starter-handoff-BaK8Ss8I.js} +1 -2
- package/dist/styles.css +1 -1
- package/dist/ui.js +334 -374
- package/dist/{uk-CwpJAxmx.js → uk-17pbVYZa.js} +8 -6
- package/dist/{wireguard-docs-AfU6NzTL.js → wireguard-docs-Clb-7xRY.js} +14 -17
- package/package.json +15 -9
- package/dist/alarm-list-BL3xQ5Lf.js +0 -423
- package/dist/alarm-rule-dialog-S1ZUg-74.js +0 -423
- package/dist/alert-B8MAoIO8.js +0 -45
- package/dist/alert-dialog-CYkuMg5D.js +0 -129
- package/dist/api-error-9rQmUN5L.js +0 -93
- package/dist/breadcrumb-DzVL1yHa.js +0 -74
- package/dist/button-6SxPBYMz.js +0 -44
- package/dist/context-u9KJQmdB.js +0 -102
- package/dist/copyable-id-DYGiAcnq.js +0 -40
- package/dist/dashboard-context-CBfG6DoT.js +0 -191
- package/dist/date-time-picker-C3FhMXk6.js +0 -266
- package/dist/diagnostic-text-BAkzW0SE.js +0 -111
- package/dist/diagnostic-text-DiKd2i1w.js +0 -76
- package/dist/dialog-BIhQXcZC.js +0 -237
- package/dist/dialog-BqyIxMD-.js +0 -54
- package/dist/dropdown-menu-DSzbBq3v.js +0 -136
- package/dist/editor-page-BiSZJz5b.js +0 -1353
- package/dist/empty-B-QJ-06w.js +0 -59
- package/dist/entity-controls-D1K4Ot3O.js +0 -76
- package/dist/errors-CcsvDHu8.js +0 -26
- package/dist/history-page-sAAhG54V.js +0 -1400
- package/dist/icon-D-pR9htW.js +0 -57
- package/dist/index-page-DMH82fZe.js +0 -214
- package/dist/item-B5SaTFQU.js +0 -120
- package/dist/mutation-form-validators-BNz5bsv1.js +0 -2408
- package/dist/mutations-THtGG6Ai.js +0 -240
- package/dist/page-2KPemaAj.js +0 -328
- package/dist/page-6rIoTg2L.js +0 -459
- package/dist/page-C6giEoEd.js +0 -1935
- package/dist/page-DCbTxKsi.js +0 -313
- package/dist/page-DWO427hT.js +0 -208
- package/dist/page-LXu_2zm3.js +0 -137
- package/dist/page-aaUiVOnk.js +0 -513
- package/dist/page-header-RB2YFWlE.js +0 -55
- package/dist/page-title-CdCbiLt8.js +0 -14
- package/dist/panel-DDy8tUNR.js +0 -338
- package/dist/presence-code-BfSXr50g.js +0 -83
- package/dist/progress-C7cxNJA1.js +0 -83
- package/dist/provider-BOeYHi0n.js +0 -134
- package/dist/quick-report-CUVJnbKP.js +0 -416
- package/dist/radio-group-CZGqVbkJ.js +0 -26
- package/dist/retention-note-CHhA6gjY.js +0 -42
- package/dist/run-text-DvaO8LDF.js +0 -113
- package/dist/select-eNgZdZ30.js +0 -521
- package/dist/skeleton-6yk8Tdh5.js +0 -19
- package/dist/slider-DorDsoF8.js +0 -37
- package/dist/status-page-DAHiKM9P.js +0 -3286
- package/dist/switch-BqD0RH_G.js +0 -18
- package/dist/table-Q2-voLuw.js +0 -65
- package/dist/tabs-CSIucYFP.js +0 -57
- package/dist/theme-provider-BkRohQFU.js +0 -61
- package/dist/toggle-group-9Bs0Mm3r.js +0 -82
- package/dist/trpc-CvJUuUXp.js +0 -153
- package/dist/utils-CX-Pz5p6.js +0 -8
- package/dist/writability-BuH-spxv.js +0 -57
|
@@ -1,266 +0,0 @@
|
|
|
1
|
-
import { f as e, m as t } from "./i18n-BgzakKoC.js";
|
|
2
|
-
import { t as n } from "./utils-CX-Pz5p6.js";
|
|
3
|
-
import { c as r, d as i, f as a, g as o } from "./spinner-C-HPNxOc.js";
|
|
4
|
-
import { n as s, t as c } from "./button-6SxPBYMz.js";
|
|
5
|
-
import * as l from "react";
|
|
6
|
-
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
7
|
-
import { CalendarIcon as f, ChevronDownIcon as p, ChevronLeftIcon as m, ChevronRightIcon as h } from "lucide-react";
|
|
8
|
-
import { formatAppDateTime as g, parseAppDateTime as _, parseExactAppDateTime as v } from "@overvis/hmi-shared";
|
|
9
|
-
import { DayPicker as y, getDefaultClassNames as b } from "react-day-picker";
|
|
10
|
-
//#region src/ui/calendar.tsx
|
|
11
|
-
function x({ className: e, rootRef: t, ...r }) {
|
|
12
|
-
return /* @__PURE__ */ u("div", {
|
|
13
|
-
"data-slot": "calendar",
|
|
14
|
-
ref: t,
|
|
15
|
-
className: n(e),
|
|
16
|
-
...r
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
function S({ className: e, orientation: t, ...r }) {
|
|
20
|
-
return u(t === "left" ? m : t === "right" ? h : p, {
|
|
21
|
-
className: n("size-4", e),
|
|
22
|
-
...r
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
function C({ className: e, classNames: t, showOutsideDays: r = !0, captionLayout: i = "label", buttonVariant: a = "ghost", locale: o, formatters: c, components: l, ...d }) {
|
|
26
|
-
let f = b();
|
|
27
|
-
return /* @__PURE__ */ u(y, {
|
|
28
|
-
showOutsideDays: r,
|
|
29
|
-
className: n("\n group/calendar bg-background p-2 [--cell-radius:var(--radius-md)]\n [--cell-size:--spacing(7)]\n in-data-[slot=card-content]:bg-transparent\n in-data-[slot=popover-content]:bg-transparent\n ", String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`, String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`, e),
|
|
30
|
-
captionLayout: i,
|
|
31
|
-
locale: o,
|
|
32
|
-
formatters: {
|
|
33
|
-
formatMonthDropdown: (e) => e.toLocaleString(o?.code, { month: "short" }),
|
|
34
|
-
...c
|
|
35
|
-
},
|
|
36
|
-
classNames: {
|
|
37
|
-
root: n("w-fit", f.root),
|
|
38
|
-
months: n("\n relative flex flex-col gap-4\n md:flex-row\n ", f.months),
|
|
39
|
-
month: n("flex w-full flex-col gap-4", f.month),
|
|
40
|
-
nav: n("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1", f.nav),
|
|
41
|
-
button_previous: n(s({ variant: a }), "\n size-(--cell-size) p-0 select-none\n aria-disabled:opacity-50\n ", f.button_previous),
|
|
42
|
-
button_next: n(s({ variant: a }), "\n size-(--cell-size) p-0 select-none\n aria-disabled:opacity-50\n ", f.button_next),
|
|
43
|
-
month_caption: n("flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)", f.month_caption),
|
|
44
|
-
dropdowns: n("flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium", f.dropdowns),
|
|
45
|
-
dropdown_root: n("relative rounded-(--cell-radius)", f.dropdown_root),
|
|
46
|
-
dropdown: n("absolute inset-0 bg-popover opacity-0", f.dropdown),
|
|
47
|
-
caption_label: n("font-medium select-none", i === "label" ? "text-sm" : "\n flex items-center gap-1 rounded-(--cell-radius) text-sm\n [&>svg]:size-3.5 [&>svg]:text-muted-foreground\n ", f.caption_label),
|
|
48
|
-
month_grid: n("w-full border-collapse", f.month_grid),
|
|
49
|
-
weekdays: n("flex", f.weekdays),
|
|
50
|
-
weekday: n("\n flex-1 rounded-(--cell-radius) text-[0.8rem] font-normal text-muted-foreground\n select-none\n ", f.weekday),
|
|
51
|
-
week: n("mt-2 flex w-full", f.week),
|
|
52
|
-
week_number_header: n("w-(--cell-size) select-none", f.week_number_header),
|
|
53
|
-
week_number: n("text-[0.8rem] text-muted-foreground select-none", f.week_number),
|
|
54
|
-
day: n("\n group/day relative aspect-square size-full rounded-(--cell-radius) p-0 text-center\n select-none\n [&:last-child[data-selected=true]_button]:rounded-r-(--cell-radius)\n ", d.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-(--cell-radius)" : "[&:first-child[data-selected=true]_button]:rounded-l-(--cell-radius)", f.day),
|
|
55
|
-
range_start: n("\n relative isolate z-0 rounded-l-(--cell-radius) bg-muted\n after:absolute after:inset-y-0 after:right-0 after:w-4 after:bg-muted\n ", f.range_start),
|
|
56
|
-
range_middle: n("rounded-none", f.range_middle),
|
|
57
|
-
range_end: n("\n relative isolate z-0 rounded-r-(--cell-radius) bg-muted\n after:absolute after:inset-y-0 after:left-0 after:w-4 after:bg-muted\n ", f.range_end),
|
|
58
|
-
today: n("\n rounded-(--cell-radius) bg-muted text-foreground\n data-[selected=true]:rounded-none\n ", f.today),
|
|
59
|
-
outside: n("\n text-muted-foreground\n aria-selected:text-muted-foreground\n ", f.outside),
|
|
60
|
-
disabled: n("text-muted-foreground opacity-50", f.disabled),
|
|
61
|
-
hidden: n("invisible", f.hidden),
|
|
62
|
-
...t
|
|
63
|
-
},
|
|
64
|
-
components: {
|
|
65
|
-
Root: x,
|
|
66
|
-
Chevron: S,
|
|
67
|
-
DayButton: ({ ...e }) => /* @__PURE__ */ u(w, {
|
|
68
|
-
...e,
|
|
69
|
-
...o == null ? {} : { locale: o }
|
|
70
|
-
}),
|
|
71
|
-
WeekNumber: ({ children: e, ...t }) => /* @__PURE__ */ u("td", {
|
|
72
|
-
...t,
|
|
73
|
-
children: /* @__PURE__ */ u("div", {
|
|
74
|
-
className: "flex size-(--cell-size) items-center justify-center text-center",
|
|
75
|
-
children: e
|
|
76
|
-
})
|
|
77
|
-
}),
|
|
78
|
-
...l
|
|
79
|
-
},
|
|
80
|
-
...d
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
function w({ className: e, day: t, modifiers: r, locale: i, ...a }) {
|
|
84
|
-
let o = b(), s = l.useRef(null);
|
|
85
|
-
return l.useEffect(() => {
|
|
86
|
-
r.focused && s.current?.focus();
|
|
87
|
-
}, [r]), /* @__PURE__ */ u(c, {
|
|
88
|
-
variant: "ghost",
|
|
89
|
-
size: "icon",
|
|
90
|
-
"data-day": t.date.toLocaleDateString(i?.code),
|
|
91
|
-
"data-selected-single": r.selected && !r.range_start && !r.range_end && !r.range_middle,
|
|
92
|
-
"data-range-start": r.range_start,
|
|
93
|
-
"data-range-end": r.range_end,
|
|
94
|
-
"data-range-middle": r.range_middle,
|
|
95
|
-
className: n("\n relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col\n gap-1 border-0 leading-none font-normal\n group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10\n group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px]\n group-data-[focused=true]/day:ring-ring/50\n data-[range-end=true]:rounded-(--cell-radius)\n data-[range-end=true]:rounded-r-(--cell-radius) data-[range-end=true]:bg-primary\n data-[range-end=true]:text-primary-foreground\n data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-muted\n data-[range-middle=true]:text-foreground\n data-[range-start=true]:rounded-(--cell-radius)\n data-[range-start=true]:rounded-l-(--cell-radius) data-[range-start=true]:bg-primary\n data-[range-start=true]:text-primary-foreground\n data-[selected-single=true]:bg-primary\n data-[selected-single=true]:text-primary-foreground\n dark:hover:text-foreground\n [&>span]:text-xs [&>span]:opacity-70\n ", o.day, e),
|
|
96
|
-
...a
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
//#endregion
|
|
100
|
-
//#region src/ui/date-time-picker.tsx
|
|
101
|
-
var T = "dddd-dd-dd dd:dd:dd";
|
|
102
|
-
function E(e) {
|
|
103
|
-
return e.length < 19 && Array.from(e).every((e, t) => T[t] === "d" ? /^\d$/.test(e) : e === T[t]);
|
|
104
|
-
}
|
|
105
|
-
function D(e) {
|
|
106
|
-
return v(e) == null ? E(e) ? "incomplete" : "invalid" : "valid";
|
|
107
|
-
}
|
|
108
|
-
function O(e, t = !1) {
|
|
109
|
-
if (t && e === "") return {
|
|
110
|
-
draft: "",
|
|
111
|
-
status: "valid"
|
|
112
|
-
};
|
|
113
|
-
let n = D(e);
|
|
114
|
-
if (n === "incomplete") return {
|
|
115
|
-
draft: e,
|
|
116
|
-
status: n
|
|
117
|
-
};
|
|
118
|
-
let r = _(e);
|
|
119
|
-
return r == null ? {
|
|
120
|
-
draft: e,
|
|
121
|
-
status: n
|
|
122
|
-
} : {
|
|
123
|
-
draft: g(r),
|
|
124
|
-
status: "valid"
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
function k(e) {
|
|
128
|
-
let t = _(e) ?? void 0;
|
|
129
|
-
return {
|
|
130
|
-
date: t,
|
|
131
|
-
time: t == null ? "00:00:00" : g(t).slice(11)
|
|
132
|
-
};
|
|
133
|
-
}
|
|
134
|
-
function A(e, t) {
|
|
135
|
-
let n = `${g(new Date(e.getFullYear(), e.getMonth(), e.getDate())).slice(0, 10)} ${t}`;
|
|
136
|
-
return v(n) == null ? null : n;
|
|
137
|
-
}
|
|
138
|
-
function j(e) {
|
|
139
|
-
let t = _(e.from), n = _(e.to);
|
|
140
|
-
return t != null && n != null && t.getTime() >= n.getTime();
|
|
141
|
-
}
|
|
142
|
-
function M({ value: s, onValueChange: p, className: m, placeholder: h = e("ui_select_date_time"), disabled: g, id: _, optional: v = !1, ...y }) {
|
|
143
|
-
let b = t(), [x, S] = l.useState({
|
|
144
|
-
disabled: g,
|
|
145
|
-
open: !1
|
|
146
|
-
}), w = x.disabled === g ? x : {
|
|
147
|
-
disabled: g,
|
|
148
|
-
open: !1
|
|
149
|
-
}, { draft: T, status: E } = O(s, v), { date: D, time: j } = k(s);
|
|
150
|
-
return /* @__PURE__ */ d("div", {
|
|
151
|
-
"data-slot": "date-time-picker",
|
|
152
|
-
className: n("space-y-1", m),
|
|
153
|
-
children: [/* @__PURE__ */ d("div", {
|
|
154
|
-
className: "flex gap-1",
|
|
155
|
-
children: [/* @__PURE__ */ u(r, {
|
|
156
|
-
...y,
|
|
157
|
-
id: _,
|
|
158
|
-
value: T,
|
|
159
|
-
placeholder: h,
|
|
160
|
-
disabled: g,
|
|
161
|
-
"aria-invalid": E === "invalid",
|
|
162
|
-
onChange: (e) => {
|
|
163
|
-
p(e.currentTarget.value);
|
|
164
|
-
}
|
|
165
|
-
}), g === !0 ? /* @__PURE__ */ u(c, {
|
|
166
|
-
type: "button",
|
|
167
|
-
variant: "outline",
|
|
168
|
-
size: "icon",
|
|
169
|
-
disabled: !0,
|
|
170
|
-
"aria-label": h,
|
|
171
|
-
children: /* @__PURE__ */ u(f, {})
|
|
172
|
-
}) : /* @__PURE__ */ d(i, {
|
|
173
|
-
open: w.open,
|
|
174
|
-
onOpenChange: (e) => {
|
|
175
|
-
S({
|
|
176
|
-
disabled: g,
|
|
177
|
-
open: e
|
|
178
|
-
});
|
|
179
|
-
},
|
|
180
|
-
children: [/* @__PURE__ */ u(o, {
|
|
181
|
-
render: /* @__PURE__ */ u(c, {
|
|
182
|
-
type: "button",
|
|
183
|
-
variant: "outline",
|
|
184
|
-
size: "icon",
|
|
185
|
-
"aria-label": h
|
|
186
|
-
}),
|
|
187
|
-
children: /* @__PURE__ */ u(f, {})
|
|
188
|
-
}), /* @__PURE__ */ d(a, {
|
|
189
|
-
"aria-label": h,
|
|
190
|
-
align: "end",
|
|
191
|
-
className: "w-auto",
|
|
192
|
-
children: [/* @__PURE__ */ u(C, {
|
|
193
|
-
mode: "single",
|
|
194
|
-
labels: { labelNav: () => h },
|
|
195
|
-
...D == null ? {} : {
|
|
196
|
-
selected: D,
|
|
197
|
-
defaultMonth: D
|
|
198
|
-
},
|
|
199
|
-
onSelect: (e) => {
|
|
200
|
-
if (e == null) return;
|
|
201
|
-
let t = A(e, j);
|
|
202
|
-
t != null && p(t);
|
|
203
|
-
}
|
|
204
|
-
}), /* @__PURE__ */ u(r, {
|
|
205
|
-
type: "time",
|
|
206
|
-
step: 1,
|
|
207
|
-
value: j,
|
|
208
|
-
"aria-label": h,
|
|
209
|
-
onChange: (e) => {
|
|
210
|
-
let t = A(D ?? /* @__PURE__ */ new Date(), e.currentTarget.value);
|
|
211
|
-
t != null && p(t);
|
|
212
|
-
}
|
|
213
|
-
})]
|
|
214
|
-
})]
|
|
215
|
-
})]
|
|
216
|
-
}), E === "invalid" ? /* @__PURE__ */ u("p", {
|
|
217
|
-
role: "alert",
|
|
218
|
-
className: "text-xs text-destructive",
|
|
219
|
-
children: b("ui_invalid_date_time")
|
|
220
|
-
}) : E === "incomplete" ? /* @__PURE__ */ u("p", {
|
|
221
|
-
className: "text-xs text-muted-foreground",
|
|
222
|
-
children: b("ui_incomplete_date_time")
|
|
223
|
-
}) : null]
|
|
224
|
-
});
|
|
225
|
-
}
|
|
226
|
-
function N({ value: e, onValueChange: r, className: i, disabled: a, optional: o = !1 }) {
|
|
227
|
-
let s = t(), c = j(e);
|
|
228
|
-
return /* @__PURE__ */ d("div", {
|
|
229
|
-
"data-slot": "date-time-range-picker",
|
|
230
|
-
className: n("space-y-1", i),
|
|
231
|
-
children: [/* @__PURE__ */ d("div", {
|
|
232
|
-
className: n("grid gap-2", "sm:grid-cols-2"),
|
|
233
|
-
children: [/* @__PURE__ */ u(M, {
|
|
234
|
-
value: e.from,
|
|
235
|
-
disabled: a,
|
|
236
|
-
optional: o,
|
|
237
|
-
"aria-label": s("ui_start_date_time"),
|
|
238
|
-
placeholder: s("ui_start_date_time"),
|
|
239
|
-
onValueChange: (t) => {
|
|
240
|
-
r({
|
|
241
|
-
...e,
|
|
242
|
-
from: t
|
|
243
|
-
});
|
|
244
|
-
}
|
|
245
|
-
}), /* @__PURE__ */ u(M, {
|
|
246
|
-
value: e.to,
|
|
247
|
-
disabled: a,
|
|
248
|
-
optional: o,
|
|
249
|
-
"aria-label": s("ui_end_date_time"),
|
|
250
|
-
placeholder: s("ui_end_date_time"),
|
|
251
|
-
onValueChange: (t) => {
|
|
252
|
-
r({
|
|
253
|
-
...e,
|
|
254
|
-
to: t
|
|
255
|
-
});
|
|
256
|
-
}
|
|
257
|
-
})]
|
|
258
|
-
}), c && /* @__PURE__ */ u("p", {
|
|
259
|
-
role: "alert",
|
|
260
|
-
className: "text-xs text-destructive",
|
|
261
|
-
children: s("ui_invalid_date_time_range")
|
|
262
|
-
})]
|
|
263
|
-
});
|
|
264
|
-
}
|
|
265
|
-
//#endregion
|
|
266
|
-
export { w as i, N as n, C as r, M as t };
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import { f as e, p as t } from "./i18n-BgzakKoC.js";
|
|
2
|
-
import { n, r } from "./diagnostic-text-DiKd2i1w.js";
|
|
3
|
-
//#region src/workspace/automations/diagnostic-text.ts
|
|
4
|
-
function i(e) {
|
|
5
|
-
return String(e ?? "");
|
|
6
|
-
}
|
|
7
|
-
function a(e) {
|
|
8
|
-
return String(Number(e) / 1e3);
|
|
9
|
-
}
|
|
10
|
-
function o(e, n) {
|
|
11
|
-
let r = i(e).split(",").filter((e) => e.length > 0);
|
|
12
|
-
return new Intl.ListFormat(t(), { type: n }).format(r);
|
|
13
|
-
}
|
|
14
|
-
function s(t) {
|
|
15
|
-
switch (t) {
|
|
16
|
-
case "string": return e("formula_type_string");
|
|
17
|
-
case "number": return e("formula_type_number");
|
|
18
|
-
case "boolean": return e("formula_type_boolean");
|
|
19
|
-
case "integer": return e("automation_json_integer");
|
|
20
|
-
case "array": return e("automation_json_array");
|
|
21
|
-
case "object": return e("automation_json_object");
|
|
22
|
-
case "null": return e("automation_json_null");
|
|
23
|
-
default: return t;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
function c(t) {
|
|
27
|
-
let n = i(t.limit);
|
|
28
|
-
switch (t.reason) {
|
|
29
|
-
case "missing": return e("automation_shape_missing", { properties: o(t.properties, "conjunction") });
|
|
30
|
-
case "unexpected": return e("automation_shape_unexpected", { properties: o(t.properties, "conjunction") });
|
|
31
|
-
case "type": return e("automation_shape_type", { expected: o(i(t.expected).split(",").map(s).join(","), "disjunction") });
|
|
32
|
-
case "too_few": return e("automation_shape_too_few", { limit: n });
|
|
33
|
-
case "too_many": return e("automation_shape_too_many", { limit: n });
|
|
34
|
-
case "too_short": return e("automation_shape_too_short", { limit: n });
|
|
35
|
-
case "too_long": return e("automation_shape_too_long", { limit: n });
|
|
36
|
-
case "too_small": return e("automation_shape_too_small", { limit: n });
|
|
37
|
-
case "too_large": return e("automation_shape_too_large", { limit: n });
|
|
38
|
-
case "allowed": return e("automation_shape_allowed", { values: o(t.values, "disjunction") });
|
|
39
|
-
case "kind": return e("automation_shape_kind", { values: o(t.values, "disjunction") });
|
|
40
|
-
case "duplicate": return e("automation_shape_duplicate");
|
|
41
|
-
case "format": return t.format === "uuid" ? e("automation_shape_format_uuid") : e("automation_shape_format_other", { format: i(t.format) });
|
|
42
|
-
case "form": switch (t.form) {
|
|
43
|
-
case "name": return e("automation_shape_form_name");
|
|
44
|
-
case "key": return e("automation_shape_form_key");
|
|
45
|
-
case "time": return e("automation_shape_form_time");
|
|
46
|
-
case "command": return e("automation_shape_form_command");
|
|
47
|
-
case "language": return e("automation_shape_form_language");
|
|
48
|
-
default: return e("automation_shape_form_other");
|
|
49
|
-
}
|
|
50
|
-
default: return e("automation_diagnostic_invalid_shape");
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
function l(t) {
|
|
54
|
-
let o = t.args;
|
|
55
|
-
switch (t.code) {
|
|
56
|
-
case "invalid_shape": return c(o);
|
|
57
|
-
case "duplicate_name": return e("automation_diagnostic_duplicate_name", { name: i(o.name) });
|
|
58
|
-
case "reserved_name": return e("automation_diagnostic_reserved_name", { name: i(o.name) });
|
|
59
|
-
case "unknown_procedure": return e("automation_diagnostic_unknown_procedure", { name: i(o.name) });
|
|
60
|
-
case "recursive_call": return e("automation_diagnostic_recursive_call", { cycle: i(o.cycle) });
|
|
61
|
-
case "unknown_variable": return e("automation_diagnostic_unknown_variable", { name: i(o.name) });
|
|
62
|
-
case "not_an_input": return e("automation_diagnostic_not_an_input", { name: i(o.name) });
|
|
63
|
-
case "not_a_state_variable": return e("automation_diagnostic_not_a_state_variable", { name: i(o.name) });
|
|
64
|
-
case "state_not_allowed": return e("automation_diagnostic_state_not_allowed", { name: i(o.name) });
|
|
65
|
-
case "variable_type": return e("automation_diagnostic_variable_type", {
|
|
66
|
-
name: i(o.name),
|
|
67
|
-
actual: r(o.actual, "conjunction"),
|
|
68
|
-
expected: r(o.expected, "disjunction")
|
|
69
|
-
});
|
|
70
|
-
case "calc_cycle": return e("automation_diagnostic_calc_cycle", { cycle: i(o.cycle) });
|
|
71
|
-
case "unknown_parameter": return e("automation_diagnostic_unknown_parameter");
|
|
72
|
-
case "unknown_endpoint": return e("automation_diagnostic_unknown_endpoint");
|
|
73
|
-
case "unknown_alarm": return o.key === void 0 ? e("automation_diagnostic_unknown_alarm") : e("automation_diagnostic_unknown_alarm_key", { key: i(o.key) });
|
|
74
|
-
case "unknown_automation": return e("automation_diagnostic_unknown_automation");
|
|
75
|
-
case "unknown_member": return e("automation_diagnostic_unknown_member");
|
|
76
|
-
case "unknown_cancel_key": return e("automation_diagnostic_unknown_cancel_key", { key: i(o.key) });
|
|
77
|
-
case "parameter_not_writable": return e("automation_diagnostic_parameter_not_writable");
|
|
78
|
-
case "parameter_disabled": return e("automation_diagnostic_parameter_disabled");
|
|
79
|
-
case "key_required": return e("automation_diagnostic_key_required");
|
|
80
|
-
case "duplicate_key": return e("automation_diagnostic_duplicate_key", { key: i(o.key) });
|
|
81
|
-
case "unknown_placeholder": return e("automation_diagnostic_unknown_placeholder", { name: `{${i(o.name)}}` });
|
|
82
|
-
case "unused_param": return e("automation_diagnostic_unused_param", { name: i(o.name) });
|
|
83
|
-
case "unused_procedure": return e("automation_diagnostic_unused_procedure", { name: i(o.name) });
|
|
84
|
-
case "steps_over_limit": return e("automation_diagnostic_steps_over_limit", {
|
|
85
|
-
steps: i(o.steps),
|
|
86
|
-
limit: i(o.limit)
|
|
87
|
-
});
|
|
88
|
-
case "interval_under_limit": return e("automation_diagnostic_interval_under_limit", {
|
|
89
|
-
interval: a(o.intervalMs),
|
|
90
|
-
limit: a(o.limitMs)
|
|
91
|
-
});
|
|
92
|
-
case "write_rate_over_limit": return e("automation_diagnostic_write_rate_over_limit", {
|
|
93
|
-
rate: i(o.perMinute),
|
|
94
|
-
limit: i(o.limit)
|
|
95
|
-
});
|
|
96
|
-
case "automation_trigger_cycle": return e("automation_diagnostic_automation_trigger_cycle", { cycle: i(o.cycle) });
|
|
97
|
-
case "location_missing": return e("automation_diagnostic_location_missing");
|
|
98
|
-
case "reply_without_command": return e("automation_diagnostic_reply_without_command");
|
|
99
|
-
case "reserved_command": return e("automation_diagnostic_reserved_command", { command: i(o.command) });
|
|
100
|
-
default: return n({
|
|
101
|
-
code: t.code,
|
|
102
|
-
range: t.range ?? {
|
|
103
|
-
start: 0,
|
|
104
|
-
end: 0
|
|
105
|
-
},
|
|
106
|
-
args: o
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
//#endregion
|
|
111
|
-
export { l as t };
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { f as e, p as t } from "./i18n-BgzakKoC.js";
|
|
2
|
-
//#region src/workspace/formulas/diagnostic-text.ts
|
|
3
|
-
function n(t) {
|
|
4
|
-
switch (t) {
|
|
5
|
-
case "number": return e("formula_type_number");
|
|
6
|
-
case "boolean": return e("formula_type_boolean");
|
|
7
|
-
case "string": return e("formula_type_string");
|
|
8
|
-
case "instant": return e("formula_type_instant");
|
|
9
|
-
case "duration": return e("formula_type_duration");
|
|
10
|
-
case "timeOfDay": return e("formula_type_time_of_day");
|
|
11
|
-
default: return t;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
function r(e, r) {
|
|
15
|
-
let i = String(e ?? "").split(",").filter((e) => e.length > 0).map(n);
|
|
16
|
-
return new Intl.ListFormat(t(), { type: r }).format(i);
|
|
17
|
-
}
|
|
18
|
-
function i(e) {
|
|
19
|
-
return String(e ?? "");
|
|
20
|
-
}
|
|
21
|
-
function a(t) {
|
|
22
|
-
let { min: n, max: r } = t;
|
|
23
|
-
return r === -1 ? e("formula_count_at_least", { min: i(n) }) : n === r ? i(n) : `${i(n)}–${i(r)}`;
|
|
24
|
-
}
|
|
25
|
-
function o(t) {
|
|
26
|
-
let n = t.args;
|
|
27
|
-
switch (t.code) {
|
|
28
|
-
case "empty_formula": return e("formula_diagnostic_empty_formula");
|
|
29
|
-
case "unexpected_character": return e("formula_diagnostic_unexpected_character", { char: i(n.char) });
|
|
30
|
-
case "unterminated_string": return e("formula_diagnostic_unterminated_string");
|
|
31
|
-
case "invalid_number": return e("formula_diagnostic_invalid_number", { text: i(n.text) });
|
|
32
|
-
case "invalid_time_of_day": return e("formula_diagnostic_invalid_time_of_day", { text: i(n.text) });
|
|
33
|
-
case "unexpected_token": return e("formula_diagnostic_unexpected_token", { token: i(n.token) });
|
|
34
|
-
case "unexpected_end": return e("formula_diagnostic_unexpected_end");
|
|
35
|
-
case "missing_closing_parenthesis": return e("formula_diagnostic_missing_closing_parenthesis");
|
|
36
|
-
case "chained_comparison": return e("formula_diagnostic_chained_comparison");
|
|
37
|
-
case "too_deep": return e("formula_diagnostic_too_deep", { max: i(n.max) });
|
|
38
|
-
case "unknown_name": return e("formula_diagnostic_unknown_name", { name: i(n.name) });
|
|
39
|
-
case "unknown_function": return e("formula_diagnostic_unknown_function", { name: i(n.name) });
|
|
40
|
-
case "not_a_function": return e("formula_diagnostic_not_a_function", { name: i(n.name) });
|
|
41
|
-
case "placeholder_out_of_range": return n.count === 0 ? e("formula_diagnostic_placeholder_unavailable", { index: i(n.index) }) : e("formula_diagnostic_placeholder_out_of_range", {
|
|
42
|
-
index: i(n.index),
|
|
43
|
-
count: i(n.count)
|
|
44
|
-
});
|
|
45
|
-
case "argument_count": return e("formula_diagnostic_argument_count", {
|
|
46
|
-
name: i(n.name),
|
|
47
|
-
actual: i(n.actual),
|
|
48
|
-
count: a(n)
|
|
49
|
-
});
|
|
50
|
-
case "argument_types": return e("formula_diagnostic_argument_types", {
|
|
51
|
-
name: i(n.name),
|
|
52
|
-
types: r(n.types, "conjunction")
|
|
53
|
-
});
|
|
54
|
-
case "operand_types": return e("formula_diagnostic_operand_types", {
|
|
55
|
-
operator: i(n.operator),
|
|
56
|
-
types: r(n.types, "conjunction")
|
|
57
|
-
});
|
|
58
|
-
case "result_type": return e("formula_diagnostic_result_type", {
|
|
59
|
-
actual: r(n.actual, "conjunction"),
|
|
60
|
-
expected: r(n.expected, "disjunction")
|
|
61
|
-
});
|
|
62
|
-
case "time_unavailable": return e("formula_diagnostic_time_unavailable", { name: i(n.name) });
|
|
63
|
-
case "division_by_zero": return e("formula_diagnostic_division_by_zero");
|
|
64
|
-
case "not_finite": return e("formula_diagnostic_not_finite");
|
|
65
|
-
case "invalid_argument": return e("formula_diagnostic_invalid_argument", { name: i(n.name) });
|
|
66
|
-
case "location_required": return e("formula_diagnostic_location_required", { name: i(n.name) });
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
function s(t) {
|
|
70
|
-
return e("formula_problem_at", {
|
|
71
|
-
problem: o(t),
|
|
72
|
-
position: t.range.start + 1
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
//#endregion
|
|
76
|
-
export { s as n, r, o as t };
|