@middag-io/react 0.5.0 → 0.7.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/{ConditionTreeBlock-Brab4Yig.js → ConditionTreeBlock-Cjp5jC4y.js} +39 -36
- package/dist-lib/{FormBuilderBlock-Dsg3PFQL.js → FormBuilderBlock-CZLYP_2A.js} +773 -772
- package/dist-lib/{MarkdownContent-CEXn51dl.js → MarkdownContent-BXOiFtrq.js} +1322 -1320
- package/dist-lib/{SentenceBuilderBlock-C7pY8tTB.js → SentenceBuilderBlock-CiUpfCrn.js} +39 -38
- package/dist-lib/app/ContractPage.d.ts.map +1 -1
- package/dist-lib/app/LazyBlock.d.ts +28 -0
- package/dist-lib/app/LazyBlock.d.ts.map +1 -0
- package/dist-lib/app/providers/i18n-defaults.d.ts +12 -0
- package/dist-lib/app/providers/i18n-defaults.d.ts.map +1 -0
- package/dist-lib/app/providers/i18n.d.ts.map +1 -1
- package/dist-lib/app/register-defaults.d.ts +4 -0
- package/dist-lib/app/register-defaults.d.ts.map +1 -1
- package/dist-lib/base/blocks/ActionGridBlock.d.ts.map +1 -1
- package/dist-lib/base/blocks/ActivityTimelineBlock.d.ts.map +1 -1
- package/dist-lib/base/blocks/ConditionTreeBlock.d.ts.map +1 -1
- package/dist-lib/base/blocks/DenseTableBlock.d.ts.map +1 -1
- package/dist-lib/base/blocks/DetailPanelBlock.d.ts.map +1 -1
- package/dist-lib/base/blocks/EmptyStateBlock.d.ts.map +1 -1
- package/dist-lib/base/blocks/FormBuilderBlock.d.ts.map +1 -1
- package/dist-lib/base/blocks/FormPanelBlock.d.ts.map +1 -1
- package/dist-lib/base/blocks/SentenceBuilderBlock.d.ts.map +1 -1
- package/dist-lib/base/blocks/TabbedPanelBlock.d.ts.map +1 -1
- package/dist-lib/base/blocks/WorkflowProgressBlock.d.ts +15 -0
- package/dist-lib/base/blocks/WorkflowProgressBlock.d.ts.map +1 -0
- package/dist-lib/base/form/fields/MultiSelectField.d.ts.map +1 -1
- package/dist-lib/base/partials/ActionBar/index.d.ts.map +1 -1
- package/dist-lib/base/partials/ConfirmationDialog/index.d.ts.map +1 -1
- package/dist-lib/base/partials/DataTable/index.d.ts +1 -1
- package/dist-lib/base/partials/DataTable/index.d.ts.map +1 -1
- package/dist-lib/base/partials/EmptyPlaceholder/index.d.ts +4 -2
- package/dist-lib/base/partials/EmptyPlaceholder/index.d.ts.map +1 -1
- package/dist-lib/base/partials/FilterBar/index.d.ts.map +1 -1
- package/dist-lib/base/partials/FormSection/index.d.ts.map +1 -1
- package/dist-lib/base/partials/LogViewer/LogViewerToolbar.d.ts.map +1 -1
- package/dist-lib/base/partials/MarkdownContent/index.d.ts.map +1 -1
- package/dist-lib/base/partials/TimelineList/index.d.ts.map +1 -1
- package/dist-lib/base/shell/AdminShell.d.ts.map +1 -1
- package/dist-lib/base/shell/ProductShell.d.ts.map +1 -1
- package/dist-lib/base/shell/partials/CommandPalette.d.ts.map +1 -1
- package/dist-lib/base/shell/partials/HelpPanel.d.ts.map +1 -1
- package/dist-lib/base/shell/partials/InlineInspector.d.ts.map +1 -1
- package/dist-lib/base/shell/partials/NavErrorBoundary.d.ts.map +1 -1
- package/dist-lib/base/shell/partials/OverlayScreen.d.ts.map +1 -1
- package/dist-lib/base/shell/partials/PageActionButton.d.ts.map +1 -1
- package/dist-lib/base/shell/partials/PageHeader.d.ts.map +1 -1
- package/dist-lib/base/shell/partials/SidebarNav.d.ts.map +1 -1
- package/dist-lib/contracts/block-data.d.ts +16 -0
- package/dist-lib/contracts/block-data.d.ts.map +1 -1
- package/dist-lib/contracts/navigation.d.ts +2 -0
- package/dist-lib/contracts/navigation.d.ts.map +1 -1
- package/dist-lib/contracts/page-contract.d.ts +10 -0
- package/dist-lib/contracts/page-contract.d.ts.map +1 -1
- package/dist-lib/dist-BDvVQ5m8.js +70102 -0
- package/dist-lib/i18n-CWmqBtgM.js +126 -0
- package/dist-lib/index.d.ts +23 -1
- package/dist-lib/index.d.ts.map +1 -1
- package/dist-lib/lib/deprecation.d.ts +1 -1
- package/dist-lib/lottie/calendar/schedule-1.json +1 -0
- package/dist-lib/lottie/calendar/schedule-2.json +1 -0
- package/dist-lib/lottie/celebration/confetti-1.json +1 -0
- package/dist-lib/lottie/celebration/confetti-2.json +1 -0
- package/dist-lib/lottie/celebration/confetti-3.json +1 -0
- package/dist-lib/lottie/cloud/cloud-1.json +1 -0
- package/dist-lib/lottie/cloud/cloud-2.json +1 -0
- package/dist-lib/lottie/connection/network-1.json +1 -0
- package/dist-lib/lottie/connection/network-2.json +1 -0
- package/dist-lib/lottie/connection/network-3.json +1 -0
- package/dist-lib/lottie/dashboard/analytics-1.json +1 -0
- package/dist-lib/lottie/dashboard/analytics-2.json +1 -0
- package/dist-lib/lottie/dashboard/analytics-3.json +1 -0
- package/dist-lib/lottie/email/mail-1.json +1 -0
- package/dist-lib/lottie/email/mail-2.json +1 -0
- package/dist-lib/lottie/email/mail-3.json +1 -0
- package/dist-lib/lottie/empty-state/empty-1.json +1 -0
- package/dist-lib/lottie/empty-state/empty-2.json +1 -0
- package/dist-lib/lottie/empty-state/empty-3.json +1 -0
- package/dist-lib/lottie/error/warning-1.json +1 -0
- package/dist-lib/lottie/error/warning-2.json +1 -0
- package/dist-lib/lottie/error/warning-3.json +1 -0
- package/dist-lib/lottie/index.ts +81 -0
- package/dist-lib/lottie/loading/spinner-1.json +1 -0
- package/dist-lib/lottie/loading/spinner-2.json +1 -0
- package/dist-lib/lottie/loading/spinner-3.json +1 -0
- package/dist-lib/lottie/maintenance/construction-1.json +1 -0
- package/dist-lib/lottie/maintenance/construction-2.json +1 -0
- package/dist-lib/lottie/maintenance/construction-3.json +1 -0
- package/dist-lib/lottie/not-found/404-1.json +1 -0
- package/dist-lib/lottie/not-found/404-2.json +1 -0
- package/dist-lib/lottie/not-found/404-3.json +1 -0
- package/dist-lib/lottie/notification/bell-1.json +1 -0
- package/dist-lib/lottie/notification/bell-2.json +1 -0
- package/dist-lib/lottie/notification/bell-3.json +1 -0
- package/dist-lib/lottie/onboarding/welcome-1.json +1 -0
- package/dist-lib/lottie/onboarding/welcome-2.json +1 -0
- package/dist-lib/lottie/onboarding/welcome-3.json +1 -0
- package/dist-lib/lottie/payment/wallet-1.json +1 -0
- package/dist-lib/lottie/payment/wallet-2.json +1 -0
- package/dist-lib/lottie/payment/wallet-3.json +1 -0
- package/dist-lib/lottie/search/search-1.json +1 -0
- package/dist-lib/lottie/search/search-2.json +1 -0
- package/dist-lib/lottie/search/search-3.json +1 -0
- package/dist-lib/lottie/security/lock-1.json +1 -0
- package/dist-lib/lottie/security/lock-2.json +1 -0
- package/dist-lib/lottie/security/lock-3.json +1 -0
- package/dist-lib/lottie/settings/gear-1.json +1 -0
- package/dist-lib/lottie/settings/gear-2.json +1 -0
- package/dist-lib/lottie/settings/gear-3.json +1 -0
- package/dist-lib/lottie/success/check-1.json +1 -0
- package/dist-lib/lottie/success/check-2.json +1 -0
- package/dist-lib/lottie/success/check-3.json +1 -0
- package/dist-lib/lottie/upload/upload-1.json +1 -0
- package/dist-lib/lottie/upload/upload-2.json +1 -0
- package/dist-lib/lottie/upload/upload-3.json +1 -0
- package/dist-lib/lottie/user/profile-1.json +1 -0
- package/dist-lib/lottie/user/profile-2.json +1 -0
- package/dist-lib/lottie/user/profile-3.json +1 -0
- package/dist-lib/middag-react.css +1 -1
- package/dist-lib/middag-react.js +5107 -5030
- package/package.json +4 -2
- /package/dist-lib/{FlowEditorBlock-BKwzEVAe.js → FlowEditorBlock-CHodeGBw.js} +0 -0
- /package/dist-lib/{index.min-BVLV21vp.js → index.min-Cno07_zY.js} +0 -0
|
@@ -1,83 +1,86 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as e } from "./i18n-CWmqBtgM.js";
|
|
2
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
2
3
|
//#region src/base/blocks/ConditionTreeBlock.tsx
|
|
3
|
-
function
|
|
4
|
-
return /* @__PURE__ */
|
|
5
|
-
className:
|
|
6
|
-
children:
|
|
4
|
+
function r({ logic: e }) {
|
|
5
|
+
return /* @__PURE__ */ t("span", {
|
|
6
|
+
className: e === "and" ? "text-primary inline-flex items-center rounded bg-[oklch(0.93_0.04_264)] px-2 py-0.5 text-xs font-bold uppercase" : "inline-flex items-center rounded bg-[oklch(0.95_0.04_75)] px-2 py-0.5 text-xs font-bold text-[oklch(0.55_0.16_75)] uppercase",
|
|
7
|
+
children: e
|
|
7
8
|
});
|
|
8
9
|
}
|
|
9
|
-
function
|
|
10
|
-
|
|
10
|
+
function i({ rule: r }) {
|
|
11
|
+
let { t: i } = e();
|
|
12
|
+
return /* @__PURE__ */ n("div", {
|
|
11
13
|
className: "bg-background flex items-center gap-2 rounded-md p-2",
|
|
12
14
|
children: [
|
|
13
|
-
/* @__PURE__ */
|
|
15
|
+
/* @__PURE__ */ t("span", {
|
|
14
16
|
className: "border-border bg-muted/50 inline-flex items-center rounded border px-2 py-1 text-sm font-medium",
|
|
15
|
-
children:
|
|
17
|
+
children: r.field
|
|
16
18
|
}),
|
|
17
|
-
/* @__PURE__ */
|
|
19
|
+
/* @__PURE__ */ t("span", {
|
|
18
20
|
className: "text-muted-foreground text-sm",
|
|
19
|
-
children:
|
|
21
|
+
children: r.operator
|
|
20
22
|
}),
|
|
21
|
-
/* @__PURE__ */
|
|
23
|
+
/* @__PURE__ */ t("span", {
|
|
22
24
|
className: "border-border bg-muted/50 inline-flex items-center rounded border px-2 py-1 text-sm font-medium",
|
|
23
|
-
children:
|
|
25
|
+
children: r.value
|
|
24
26
|
}),
|
|
25
|
-
/* @__PURE__ */
|
|
27
|
+
/* @__PURE__ */ t("button", {
|
|
26
28
|
type: "button",
|
|
27
29
|
className: "text-muted-foreground hover:text-destructive ml-auto flex h-6 w-6 items-center justify-center rounded text-sm transition-colors",
|
|
28
30
|
tabIndex: -1,
|
|
29
|
-
"aria-label": "
|
|
31
|
+
"aria-label": i("middag.ui.condition_tree.remove_rule"),
|
|
30
32
|
children: "×"
|
|
31
33
|
})
|
|
32
34
|
]
|
|
33
35
|
});
|
|
34
36
|
}
|
|
35
|
-
function
|
|
36
|
-
|
|
37
|
+
function a({ group: o, depth: s }) {
|
|
38
|
+
let { t: c } = e();
|
|
39
|
+
return /* @__PURE__ */ n("div", {
|
|
37
40
|
className: "bg-muted/30 space-y-2 rounded-lg border p-3",
|
|
38
|
-
style:
|
|
41
|
+
style: s > 0 ? { marginLeft: `${s * 16}px` } : void 0,
|
|
39
42
|
children: [
|
|
40
|
-
/* @__PURE__ */
|
|
43
|
+
/* @__PURE__ */ n("div", {
|
|
41
44
|
className: "flex items-center gap-2",
|
|
42
|
-
children: [/* @__PURE__ */
|
|
45
|
+
children: [/* @__PURE__ */ t(r, { logic: o.logic }), s > 0 && /* @__PURE__ */ t("button", {
|
|
43
46
|
type: "button",
|
|
44
47
|
className: "text-muted-foreground hover:text-destructive ml-auto flex h-6 w-6 items-center justify-center rounded text-sm transition-colors",
|
|
45
48
|
tabIndex: -1,
|
|
46
|
-
"aria-label": "
|
|
49
|
+
"aria-label": c("middag.ui.condition_tree.remove_group"),
|
|
47
50
|
children: "×"
|
|
48
51
|
})]
|
|
49
52
|
}),
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
group:
|
|
53
|
-
depth:
|
|
54
|
-
},
|
|
55
|
-
/* @__PURE__ */
|
|
53
|
+
o.rules.map((e) => /* @__PURE__ */ t(i, { rule: e }, e.id)),
|
|
54
|
+
o.groups.map((e) => /* @__PURE__ */ t(a, {
|
|
55
|
+
group: e,
|
|
56
|
+
depth: s + 1
|
|
57
|
+
}, e.id)),
|
|
58
|
+
/* @__PURE__ */ n("div", {
|
|
56
59
|
className: "flex items-center gap-2 pt-1",
|
|
57
|
-
children: [/* @__PURE__ */
|
|
60
|
+
children: [/* @__PURE__ */ t("button", {
|
|
58
61
|
type: "button",
|
|
59
62
|
className: "text-muted-foreground hover:border-primary hover:text-primary rounded-md border border-dashed px-3 py-1 text-xs transition-colors",
|
|
60
63
|
tabIndex: -1,
|
|
61
|
-
children: "
|
|
62
|
-
}), /* @__PURE__ */
|
|
64
|
+
children: c("middag.ui.condition_tree.add_rule")
|
|
65
|
+
}), /* @__PURE__ */ t("button", {
|
|
63
66
|
type: "button",
|
|
64
67
|
className: "text-muted-foreground hover:border-primary hover:text-primary rounded-md border border-dashed px-3 py-1 text-xs transition-colors",
|
|
65
68
|
tabIndex: -1,
|
|
66
|
-
children: "
|
|
69
|
+
children: c("middag.ui.condition_tree.add_group")
|
|
67
70
|
})]
|
|
68
71
|
})
|
|
69
72
|
]
|
|
70
73
|
});
|
|
71
74
|
}
|
|
72
|
-
function
|
|
73
|
-
let { data: n } =
|
|
74
|
-
return /* @__PURE__ */
|
|
75
|
+
function o({ block: e }) {
|
|
76
|
+
let { data: n } = e;
|
|
77
|
+
return /* @__PURE__ */ t("div", {
|
|
75
78
|
className: "space-y-3",
|
|
76
|
-
children: /* @__PURE__ */
|
|
79
|
+
children: /* @__PURE__ */ t(a, {
|
|
77
80
|
group: n.root,
|
|
78
81
|
depth: 0
|
|
79
82
|
})
|
|
80
83
|
});
|
|
81
84
|
}
|
|
82
85
|
//#endregion
|
|
83
|
-
export {
|
|
86
|
+
export { o as ConditionTreeBlock };
|