@middag-io/react 0.42.0 → 0.43.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/dist-lib/{DateField-x0Ot_z_i.js → DateField-lPZsiWfC.js} +5 -5
- package/dist-lib/{DateRangeField-DbWZ2f92.js → DateRangeField-B7zWB48D.js} +12 -8
- package/dist-lib/{DocumentField-fwq79IWM.js → DocumentField-DutGscEM.js} +3 -3
- package/dist-lib/{FormField-BDWkyFcl.js → FormField-ChfKYVSc.js} +3735 -2633
- package/dist-lib/{FormPanelBlock-mIvZ0IFE.js → FormPanelBlock-Cu2ATcpu.js} +71 -71
- package/dist-lib/{PhoneField-DZQc97Eo.js → PhoneField-CP13cgq1.js} +2867 -2870
- package/dist-lib/base/form/fields/EntityPickerField.d.ts.map +1 -1
- package/dist-lib/base/shell/BasicShell.js +1 -1
- package/dist-lib/base/shell/partials/EditablePanelProvider.d.ts.map +1 -1
- package/dist-lib/base/shell/partials/EditablePanelProvider.js +55 -54
- package/dist-lib/base/shell/partials/InlineEditablePanel.js +345 -343
- package/dist-lib/base/shell/partials/PageActionButton.js +2 -1
- package/dist-lib/base/utils/time.js +26 -26
- package/dist-lib/{button-CxyXN3nw.js → button-PJdZDEA8.js} +4 -4
- package/dist-lib/{calendar-BStHDcu3.js → calendar-CFrEYtPR.js} +22 -21
- package/dist-lib/{chevron-right-t5ALKicc.js → chevron-right-Dt7yZRj6.js} +1 -1
- package/dist-lib/chunks/{subpath-BhcZoWUz.js → subpath-BYl-9lKg.js} +1 -1
- package/dist-lib/{combobox-RfE54yDL.js → combobox-Dk1Mr_PH.js} +1055 -1058
- package/dist-lib/{dist-tanBwm1t.js → dist-CJ4YN5HQ.js} +5 -5
- package/dist-lib/{dist-BUns-jcX.js → dist-Cwj39GRS.js} +1 -1
- package/dist-lib/{dist-axU0pUop.js → dist-CyQnd0TP.js} +4 -4
- package/dist-lib/{dist-EdxoDTPy.js → dist-DUhG8dAI.js} +2 -2
- package/dist-lib/{document-validation-BSjTDZhG.js → document-validation-D1y_WEv5.js} +4 -4
- package/dist-lib/{floating-ui.react-dom-CNntavPo.js → floating-ui.react-dom-BASAHo_L.js} +3 -3
- package/dist-lib/i18n/I18nProvider.js +1 -1
- package/dist-lib/i18n/instance.js +1 -1
- package/dist-lib/i18n/register-strings.js +1 -1
- package/dist-lib/index.d.ts +1 -0
- package/dist-lib/index.d.ts.map +1 -1
- package/dist-lib/{input-DpHIBsEp.js → input-D1w5GXsE.js} +1 -1
- package/dist-lib/lib/host-pending.d.ts +32 -0
- package/dist-lib/lib/host-pending.d.ts.map +1 -0
- package/dist-lib/lib/host-pending.js +35 -0
- package/dist-lib/middag-react.js +21378 -7913
- package/dist-lib/{popover-CD3HfW3f.js → popover-7VNShhWQ.js} +6 -6
- package/dist-lib/primitives/reui/chart.js +12 -12
- package/dist-lib/primitives/reui/data-grid/data-grid-column-header.js +2 -2
- package/dist-lib/primitives/reui/data-grid/data-grid-pagination.js +28 -28
- package/dist-lib/primitives/reui/data-grid/data-grid-scroll-area.js +2 -2
- package/dist-lib/primitives/reui/data-grid/data-grid-table-dnd-rows.js +1 -1
- package/dist-lib/primitives/reui/data-grid/data-grid-table-dnd.js +2 -2
- package/dist-lib/primitives/reui/data-grid/data-grid-table-virtual.js +1 -1
- package/dist-lib/primitives/reui/data-grid/data-grid-table.js +5 -5
- package/dist-lib/primitives/reui/data-grid-pagination.js +28 -28
- package/dist-lib/primitives/reui/date-selector.js +5 -1
- package/dist-lib/primitives/reui/filters.js +24 -24
- package/dist-lib/primitives/reui/scrollspy.js +3 -1
- package/dist-lib/primitives/reui/stepper.js +23 -23
- package/dist-lib/primitives/reui/tree.js +7 -7
- package/dist-lib/{chunk-DeC0fbbY.js → rolldown-runtime-CWhphoD1.js} +1 -1
- package/dist-lib/{scroll-area-C_NPU_rI.js → scroll-area-CcAvV3Hh.js} +14 -8
- package/dist-lib/{skeleton-DXDJbb2L.js → skeleton-DP7igcN6.js} +1 -1
- package/dist-lib/{use-mobile-B18-3oTE.js → use-mobile-CqtqNcAV.js} +5 -5
- package/dist-lib/{utils-CpaZ5_iF.js → utils-DXlQmFY8.js} +2 -2
- package/package.json +4 -1
- package/dist-lib/MarkdownContent-DgypTiL-.js +0 -13507
- /package/dist-lib/{HugeiconsIcon-CKqc2W1S.js → HugeiconsIcon-C9KGSkIu.js} +0 -0
- /package/dist-lib/chunks/{subpath-B9beWkb2.js → subpath-AeMdleNB.js} +0 -0
- /package/dist-lib/chunks/{subpath-55YUOrvG.js → subpath-CJyJeTlw.js} +0 -0
- /package/dist-lib/chunks/{subpath--GXsYu-v.js → subpath-DjkzcIPp.js} +0 -0
- /package/dist-lib/chunks/{subpath-B30yU5uo.js → subpath-DoiyWIYV.js} +0 -0
- /package/dist-lib/chunks/{subpath-7b9-j7in.js → subpath-YbXSVoyF.js} +0 -0
- /package/dist-lib/chunks/{subpath-52vC0Fzu.js → subpath-oMCFwhdB.js} +0 -0
- /package/dist-lib/{dist-3F0-lo64.js → dist-BxFR7CYi.js} +0 -0
- /package/dist-lib/{useTranslation-D-tjJhTn.js → useTranslation-u1Lygbup.js} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as S } from "./button-
|
|
3
|
-
import { t as ee } from "./useTranslation-
|
|
4
|
-
import { t as C } from "./utils-
|
|
1
|
+
import { $ as e, Bt as t, Ht as n, J as r, L as i, Vt as a, Z as o, a as s, ct as c, et as l, ft as u, i as d, it as f, lt as p, n as m, nt as h, o as g, ot as _, r as v, s as y, st as b, t as x } from "./FormField-ChfKYVSc.js";
|
|
2
|
+
import { t as S } from "./button-PJdZDEA8.js";
|
|
3
|
+
import { t as ee } from "./useTranslation-u1Lygbup.js";
|
|
4
|
+
import { t as C } from "./utils-DXlQmFY8.js";
|
|
5
5
|
import w, { useCallback as T, useEffect as E, useMemo as D, useRef as O, useState as k } from "react";
|
|
6
6
|
import { Fragment as A, jsx as j, jsxs as M } from "react/jsx-runtime";
|
|
7
7
|
import { router as te } from "@inertiajs/core";
|
|
@@ -863,7 +863,7 @@ function ot(e = {}) {
|
|
|
863
863
|
let l = e ? R(e) : i, u = R(l), f = Q(e), m = f ? i : u;
|
|
864
864
|
if (c.keepDefaultValues || (i = l), !c.keepValues) {
|
|
865
865
|
if (c.keepDirtyValues) {
|
|
866
|
-
let e = new Set([...s.mount, ...Object.keys(Me(i, a))]);
|
|
866
|
+
let e = /* @__PURE__ */ new Set([...s.mount, ...Object.keys(Me(i, a))]);
|
|
867
867
|
for (let t of Array.from(e)) {
|
|
868
868
|
let e = H(n.dirtyFields, t), r = H(a, t), i = H(m, t);
|
|
869
869
|
e && !B(r) ? G(m, t, r) : !e && !B(i) && I(t, i);
|
|
@@ -1148,16 +1148,16 @@ function ht(e, t) {
|
|
|
1148
1148
|
}
|
|
1149
1149
|
return n;
|
|
1150
1150
|
}
|
|
1151
|
-
function gt(
|
|
1152
|
-
if (
|
|
1151
|
+
function gt(e, r, i) {
|
|
1152
|
+
if (i === void 0 && (i = {}), function(e) {
|
|
1153
1153
|
return "_def" in e && typeof e._def == "object" && "typeName" in e._def;
|
|
1154
|
-
}(
|
|
1154
|
+
}(e)) return function(t, n, a) {
|
|
1155
1155
|
try {
|
|
1156
1156
|
return Promise.resolve(pt(function() {
|
|
1157
|
-
return Promise.resolve(
|
|
1157
|
+
return Promise.resolve(e[i.mode === "sync" ? "parse" : "parseAsync"](t, r)).then(function(e) {
|
|
1158
1158
|
return a.shouldUseNativeValidation && lt({}, a), {
|
|
1159
1159
|
errors: {},
|
|
1160
|
-
values:
|
|
1160
|
+
values: i.raw ? Object.assign({}, t) : e
|
|
1161
1161
|
};
|
|
1162
1162
|
});
|
|
1163
1163
|
}, function(e) {
|
|
@@ -1175,23 +1175,23 @@ function gt(t, n, r) {
|
|
|
1175
1175
|
};
|
|
1176
1176
|
if (function(e) {
|
|
1177
1177
|
return "_zod" in e && typeof e._zod == "object";
|
|
1178
|
-
}(
|
|
1178
|
+
}(e)) return function(o, s, c) {
|
|
1179
1179
|
try {
|
|
1180
1180
|
return Promise.resolve(pt(function() {
|
|
1181
|
-
return Promise.resolve((
|
|
1182
|
-
return
|
|
1181
|
+
return Promise.resolve((i.mode === "sync" ? t : a)(e, o, r)).then(function(e) {
|
|
1182
|
+
return c.shouldUseNativeValidation && lt({}, c), {
|
|
1183
1183
|
errors: {},
|
|
1184
|
-
values:
|
|
1184
|
+
values: i.raw ? Object.assign({}, o) : e
|
|
1185
1185
|
};
|
|
1186
1186
|
});
|
|
1187
|
-
}, function(
|
|
1188
|
-
if (function(
|
|
1189
|
-
return
|
|
1190
|
-
}(
|
|
1187
|
+
}, function(e) {
|
|
1188
|
+
if (function(e) {
|
|
1189
|
+
return e instanceof n;
|
|
1190
|
+
}(e)) return {
|
|
1191
1191
|
values: {},
|
|
1192
|
-
errors: ut(ht(
|
|
1192
|
+
errors: ut(ht(e.issues, !c.shouldUseNativeValidation && c.criteriaMode === "all"), c)
|
|
1193
1193
|
};
|
|
1194
|
-
throw
|
|
1194
|
+
throw e;
|
|
1195
1195
|
}));
|
|
1196
1196
|
} catch (e) {
|
|
1197
1197
|
return Promise.reject(e);
|
|
@@ -1220,27 +1220,27 @@ function _t(e, t) {
|
|
|
1220
1220
|
function vt(e, t) {
|
|
1221
1221
|
return Object.prototype.hasOwnProperty.call(t, e.key) ? t[e.key] : _t(e, t);
|
|
1222
1222
|
}
|
|
1223
|
-
function yt({ nodes: e, values:
|
|
1223
|
+
function yt({ nodes: e, values: t, errors: n, onChange: r, sourceValues: a }) {
|
|
1224
1224
|
return /* @__PURE__ */ j(A, { children: e.map((e, o) => {
|
|
1225
1225
|
switch (e.kind) {
|
|
1226
|
-
case "field": return s(e,
|
|
1226
|
+
case "field": return s(e, t) ? /* @__PURE__ */ j(x, {
|
|
1227
1227
|
field: e,
|
|
1228
|
-
value: vt(e,
|
|
1229
|
-
onChange: (t) =>
|
|
1230
|
-
error:
|
|
1228
|
+
value: vt(e, t),
|
|
1229
|
+
onChange: (t) => r(e.key, t),
|
|
1230
|
+
error: n[e.key],
|
|
1231
1231
|
sourceValues: a
|
|
1232
1232
|
}, e.key) : null;
|
|
1233
|
-
case "section": return /* @__PURE__ */ j(
|
|
1233
|
+
case "section": return /* @__PURE__ */ j(y, {
|
|
1234
1234
|
id: e.id,
|
|
1235
1235
|
title: e.label,
|
|
1236
1236
|
defaultCollapsed: e.defaultCollapsed,
|
|
1237
|
-
hasErrors: e.children.some((e) => e.kind === "field" && !!
|
|
1238
|
-
errorCount: e.children.filter((e) => e.kind === "field" && !!
|
|
1237
|
+
hasErrors: e.children.some((e) => e.kind === "field" && !!n[e.key]),
|
|
1238
|
+
errorCount: e.children.filter((e) => e.kind === "field" && !!n[e.key]).length,
|
|
1239
1239
|
children: /* @__PURE__ */ j(yt, {
|
|
1240
1240
|
nodes: e.children,
|
|
1241
|
-
values:
|
|
1242
|
-
errors:
|
|
1243
|
-
onChange:
|
|
1241
|
+
values: t,
|
|
1242
|
+
errors: n,
|
|
1243
|
+
onChange: r,
|
|
1244
1244
|
sourceValues: a
|
|
1245
1245
|
})
|
|
1246
1246
|
}, e.id);
|
|
@@ -1248,15 +1248,15 @@ function yt({ nodes: e, values: n, errors: r, onChange: i, sourceValues: a }) {
|
|
|
1248
1248
|
className: C("grid gap-6", e.columns === 2 ? "md:grid-cols-2" : "grid-cols-1"),
|
|
1249
1249
|
children: /* @__PURE__ */ j(yt, {
|
|
1250
1250
|
nodes: e.children,
|
|
1251
|
-
values:
|
|
1252
|
-
errors:
|
|
1253
|
-
onChange:
|
|
1251
|
+
values: t,
|
|
1252
|
+
errors: n,
|
|
1253
|
+
onChange: r,
|
|
1254
1254
|
sourceValues: a
|
|
1255
1255
|
})
|
|
1256
1256
|
}, e.id);
|
|
1257
1257
|
case "header": return /* @__PURE__ */ M("div", {
|
|
1258
1258
|
className: "space-y-2",
|
|
1259
|
-
children: [/* @__PURE__ */ j(
|
|
1259
|
+
children: [/* @__PURE__ */ j(i, {}), /* @__PURE__ */ j("h4", {
|
|
1260
1260
|
className: "text-foreground text-base font-semibold",
|
|
1261
1261
|
children: e.label
|
|
1262
1262
|
})]
|
|
@@ -1265,8 +1265,8 @@ function yt({ nodes: e, values: n, errors: r, onChange: i, sourceValues: a }) {
|
|
|
1265
1265
|
}
|
|
1266
1266
|
}) });
|
|
1267
1267
|
}
|
|
1268
|
-
function bt({ block:
|
|
1269
|
-
let { t } = ee(), { data: i } =
|
|
1268
|
+
function bt({ block: t }) {
|
|
1269
|
+
let { t: n } = ee(), { data: i } = t, a = D(() => v(i.schema), [i.schema]), y = D(() => new Set(a.map((e) => e.key)), [a]), x = (i.meta.validation ?? "both") !== "server", C = D(() => Object.fromEntries(a.map((e) => [e.key, _t(e, i.values)])), [a, i.values]), w = O(x ? m(i.schema, C, n) : null), N = st({
|
|
1270
1270
|
defaultValues: C,
|
|
1271
1271
|
mode: "onTouched",
|
|
1272
1272
|
resolver: D(() => {
|
|
@@ -1275,13 +1275,13 @@ function bt({ block: e }) {
|
|
|
1275
1275
|
errors: {}
|
|
1276
1276
|
};
|
|
1277
1277
|
}, [x])
|
|
1278
|
-
}), P = me({ control: N.control }) ?? C, F =
|
|
1278
|
+
}), P = me({ control: N.control }) ?? C, F = a.map((e) => `${s(e, P) ? "1" : "0"}${d(e, P) ? "1" : "0"}`).join("");
|
|
1279
1279
|
E(() => {
|
|
1280
|
-
x && (w.current =
|
|
1280
|
+
x && (w.current = m(i.schema, P, n));
|
|
1281
1281
|
}, [
|
|
1282
1282
|
x,
|
|
1283
1283
|
i.schema,
|
|
1284
|
-
|
|
1284
|
+
n,
|
|
1285
1285
|
F
|
|
1286
1286
|
]);
|
|
1287
1287
|
let [I, L] = k(!1), [ne, re] = k(null), [ie, ae] = k({}), R = JSON.stringify(i.values), z = O(!0);
|
|
@@ -1291,14 +1291,14 @@ function bt({ block: e }) {
|
|
|
1291
1291
|
return;
|
|
1292
1292
|
}
|
|
1293
1293
|
N.reset(C);
|
|
1294
|
-
for (let [e,
|
|
1294
|
+
for (let [e, t] of Object.entries(i.errors)) y.has(e) && N.setError(e, {
|
|
1295
1295
|
type: "server",
|
|
1296
|
-
message:
|
|
1296
|
+
message: g(t, n)
|
|
1297
1297
|
});
|
|
1298
1298
|
}, [R]), E(() => {
|
|
1299
|
-
if (Object.keys(i.errors).length > 0) for (let [e,
|
|
1299
|
+
if (Object.keys(i.errors).length > 0) for (let [e, t] of Object.entries(i.errors)) y.has(e) && N.setError(e, {
|
|
1300
1300
|
type: "server",
|
|
1301
|
-
message:
|
|
1301
|
+
message: g(t, n)
|
|
1302
1302
|
});
|
|
1303
1303
|
}, [JSON.stringify(i.errors)]);
|
|
1304
1304
|
let { isDirty: B, isSubmitting: V } = N.formState;
|
|
@@ -1316,22 +1316,22 @@ function bt({ block: e }) {
|
|
|
1316
1316
|
}), N.clearErrors(e);
|
|
1317
1317
|
}, [N]), H = T((e) => {
|
|
1318
1318
|
ae({});
|
|
1319
|
-
let
|
|
1319
|
+
let t = a.filter((t) => s(t, e)), r = Object.fromEntries(t.map((t) => [t.key, e[t.key]])), o = Object.values(r).some((e) => e instanceof File || Array.isArray(e) && e.some((e) => e instanceof File)), c = i.method === "put" ? "put" : i.method === "patch" ? "patch" : "post";
|
|
1320
1320
|
return new Promise((e) => {
|
|
1321
|
-
te[
|
|
1322
|
-
forceFormData:
|
|
1321
|
+
te[c](i.action, r, {
|
|
1322
|
+
forceFormData: o,
|
|
1323
1323
|
onProgress: (e) => {
|
|
1324
1324
|
e && typeof e.percentage == "number" && re(Math.round(e.percentage));
|
|
1325
1325
|
},
|
|
1326
1326
|
onError: (e) => {
|
|
1327
|
-
let
|
|
1327
|
+
let t = {};
|
|
1328
1328
|
for (let [r, i] of Object.entries(e)) y.has(r) ? N.setError(r, {
|
|
1329
1329
|
type: "server",
|
|
1330
|
-
message:
|
|
1331
|
-
}) :
|
|
1332
|
-
Object.keys(
|
|
1330
|
+
message: g(i, n)
|
|
1331
|
+
}) : t[r] = i;
|
|
1332
|
+
Object.keys(t).length > 0 && ae((e) => ({
|
|
1333
1333
|
...e,
|
|
1334
|
-
...
|
|
1334
|
+
...t
|
|
1335
1335
|
}));
|
|
1336
1336
|
},
|
|
1337
1337
|
onFinish: () => {
|
|
@@ -1340,10 +1340,10 @@ function bt({ block: e }) {
|
|
|
1340
1340
|
});
|
|
1341
1341
|
});
|
|
1342
1342
|
}, [
|
|
1343
|
-
|
|
1343
|
+
a,
|
|
1344
1344
|
i,
|
|
1345
1345
|
N,
|
|
1346
|
-
|
|
1346
|
+
n,
|
|
1347
1347
|
y
|
|
1348
1348
|
]), U = T(() => {
|
|
1349
1349
|
B ? L(!0) : i.meta.cancelHref ? te.visit(i.meta.cancelHref) : window.history.back();
|
|
@@ -1352,14 +1352,14 @@ function bt({ block: e }) {
|
|
|
1352
1352
|
for (let [t, n] of Object.entries(N.formState.errors)) n?.message && (e[t] = n.message);
|
|
1353
1353
|
return e;
|
|
1354
1354
|
}, [N.formState.errors]), G = D(() => {
|
|
1355
|
-
let e = /* @__PURE__ */ new Map(),
|
|
1356
|
-
for (let [r, i] of Object.entries(
|
|
1355
|
+
let e = /* @__PURE__ */ new Map(), t = (t) => {
|
|
1356
|
+
for (let [r, i] of Object.entries(t)) {
|
|
1357
1357
|
if (y.has(r)) continue;
|
|
1358
|
-
let
|
|
1359
|
-
|
|
1358
|
+
let t = g(i, n);
|
|
1359
|
+
t && e.set(r, t);
|
|
1360
1360
|
}
|
|
1361
1361
|
};
|
|
1362
|
-
return
|
|
1362
|
+
return t(i.errors), t(ie), Array.from(e, ([e, t]) => ({
|
|
1363
1363
|
key: e,
|
|
1364
1364
|
message: t
|
|
1365
1365
|
}));
|
|
@@ -1367,21 +1367,21 @@ function bt({ block: e }) {
|
|
|
1367
1367
|
i.errors,
|
|
1368
1368
|
ie,
|
|
1369
1369
|
y,
|
|
1370
|
-
|
|
1370
|
+
n
|
|
1371
1371
|
]);
|
|
1372
|
-
return
|
|
1372
|
+
return a.filter((e) => s(e, P)).length === 0 && i.schema.length === 0 ? /* @__PURE__ */ j(r, {
|
|
1373
1373
|
variant: "inline",
|
|
1374
|
-
title:
|
|
1374
|
+
title: n("middag.ui.form.no_fields")
|
|
1375
1375
|
}) : /* @__PURE__ */ M(A, { children: [/* @__PURE__ */ M("form", {
|
|
1376
1376
|
onSubmit: N.handleSubmit(H),
|
|
1377
1377
|
className: "mx-auto max-w-[720px] space-y-6",
|
|
1378
1378
|
noValidate: !0,
|
|
1379
1379
|
role: "form",
|
|
1380
|
-
"aria-label":
|
|
1380
|
+
"aria-label": h(t.title, n) || n("middag.ui.form.default_title"),
|
|
1381
1381
|
children: [
|
|
1382
|
-
G.length > 0 && /* @__PURE__ */ M(
|
|
1382
|
+
G.length > 0 && /* @__PURE__ */ M(o, {
|
|
1383
1383
|
variant: "destructive",
|
|
1384
|
-
children: [/* @__PURE__ */ j(
|
|
1384
|
+
children: [/* @__PURE__ */ j(l, { children: n("middag.ui.form.errors_title") }), /* @__PURE__ */ j(e, { children: /* @__PURE__ */ j("ul", {
|
|
1385
1385
|
className: "list-disc ps-4",
|
|
1386
1386
|
children: G.map((e) => /* @__PURE__ */ j("li", { children: e.message }, e.key))
|
|
1387
1387
|
}) })]
|
|
@@ -1400,28 +1400,28 @@ function bt({ block: e }) {
|
|
|
1400
1400
|
disabled: V,
|
|
1401
1401
|
"aria-disabled": V,
|
|
1402
1402
|
"aria-busy": V,
|
|
1403
|
-
children: V ? ne === null ?
|
|
1403
|
+
children: V ? ne === null ? n("middag.ui.form.saving") : `${n("middag.ui.form.saving")} ${ne}%` : i.meta.submitLabel ?? n("middag.ui.form.save")
|
|
1404
1404
|
}), /* @__PURE__ */ j(S, {
|
|
1405
1405
|
type: "button",
|
|
1406
1406
|
variant: "outline",
|
|
1407
1407
|
onClick: U,
|
|
1408
|
-
children: i.meta.cancelLabel ??
|
|
1408
|
+
children: i.meta.cancelLabel ?? n("middag.ui.cancel")
|
|
1409
1409
|
})]
|
|
1410
1410
|
})
|
|
1411
1411
|
]
|
|
1412
|
-
}), /* @__PURE__ */ j(
|
|
1412
|
+
}), /* @__PURE__ */ j(f, {
|
|
1413
1413
|
open: I,
|
|
1414
1414
|
onOpenChange: L,
|
|
1415
|
-
children: /* @__PURE__ */ M(
|
|
1415
|
+
children: /* @__PURE__ */ M(_, { children: [/* @__PURE__ */ M(p, { children: [/* @__PURE__ */ j(u, { children: n("middag.ui.form.dirty_title") }), /* @__PURE__ */ j(b, { children: n("middag.ui.form.dirty_message") })] }), /* @__PURE__ */ M(c, { children: [/* @__PURE__ */ j(S, {
|
|
1416
1416
|
variant: "outline",
|
|
1417
1417
|
onClick: () => L(!1),
|
|
1418
|
-
children:
|
|
1418
|
+
children: n("middag.ui.cancel")
|
|
1419
1419
|
}), /* @__PURE__ */ j(S, {
|
|
1420
1420
|
variant: "destructive",
|
|
1421
1421
|
onClick: () => {
|
|
1422
1422
|
L(!1), i.meta.cancelHref ? te.visit(i.meta.cancelHref) : window.history.back();
|
|
1423
1423
|
},
|
|
1424
|
-
children:
|
|
1424
|
+
children: n("middag.ui.form.dirty_leave")
|
|
1425
1425
|
})] })] })
|
|
1426
1426
|
})] });
|
|
1427
1427
|
}
|