@dialob/composer-material 0.0.7 → 0.0.8
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/index.js +24 -24
- package/package.json +1 -1
package/dist-lib/index.js
CHANGED
|
@@ -33296,17 +33296,15 @@ const T4 = {
|
|
|
33296
33296
|
if (!s || t === "validations" && e === void 0)
|
|
33297
33297
|
return null;
|
|
33298
33298
|
const d = (f, p) => {
|
|
33299
|
-
|
|
33300
|
-
|
|
33301
|
-
|
|
33302
|
-
|
|
33303
|
-
|
|
33304
|
-
|
|
33305
|
-
|
|
33306
|
-
|
|
33307
|
-
|
|
33308
|
-
o(s.id, t, g);
|
|
33309
|
-
}
|
|
33299
|
+
const g = {
|
|
33300
|
+
...u,
|
|
33301
|
+
[p]: f
|
|
33302
|
+
};
|
|
33303
|
+
if (t === "validations" && e && n) {
|
|
33304
|
+
const m = { ...e, validationRule: { ...e.validationRule, message: g } };
|
|
33305
|
+
n(m), o(s.id, t, g, e.index);
|
|
33306
|
+
} else
|
|
33307
|
+
o(s.id, t, g);
|
|
33310
33308
|
};
|
|
33311
33309
|
return /* @__PURE__ */ h.jsxs(h.Fragment, { children: [
|
|
33312
33310
|
/* @__PURE__ */ h.jsxs(ae, { display: "flex", width: "100%", children: [
|
|
@@ -33378,7 +33376,7 @@ const T4 = {
|
|
|
33378
33376
|
}, Xl = ({ type: t }) => {
|
|
33379
33377
|
var c, u;
|
|
33380
33378
|
const { savingState: e, updateItem: n } = ft(), { editor: r } = Ne(), { config: i } = yt(), o = i.itemTypes ?? $u, s = e.item, a = (c = r.errors) == null ? void 0 : c.filter((d) => d.itemId === (s == null ? void 0 : s.id) && d.type === t.toUpperCase()), l = (d) => {
|
|
33381
|
-
s && d !== s[Sf(t)] &&
|
|
33379
|
+
s && d !== s[Sf(t)] && n(s.id, Sf(t), d);
|
|
33382
33380
|
};
|
|
33383
33381
|
return !s || !((u = o.categories.find((d) => d.type === "input")) != null && u.items.find((d) => d.config.type === s.type)) && t === "requirement" || s.type !== "rowgroup" && (t === "canaddrow" || t === "canremoverow") ? null : /* @__PURE__ */ h.jsxs(ae, { sx: { mb: 2 }, children: [
|
|
33384
33382
|
/* @__PURE__ */ h.jsx(X, { color: "text.hint", children: /* @__PURE__ */ h.jsx(F, { id: `dialogs.options.rules.${t}` }) }),
|
|
@@ -33418,7 +33416,7 @@ const T4 = {
|
|
|
33418
33416
|
m.push(b), u(m[m.length - 1]), n(o.id);
|
|
33419
33417
|
}, p = (m) => {
|
|
33420
33418
|
var b, v;
|
|
33421
|
-
c && (u({ ...c, validationRule: { ...c.validationRule, rule: m } }), o && c && ((b = o.validations) != null && b[c.index]) && m !== ((v = o.validations) == null ? void 0 : v[c.index].rule) &&
|
|
33419
|
+
c && (u({ ...c, validationRule: { ...c.validationRule, rule: m } }), o && c && ((b = o.validations) != null && b[c.index]) && m !== ((v = o.validations) == null ? void 0 : v[c.index].rule) && i(o.id, c.index, m));
|
|
33422
33420
|
};
|
|
33423
33421
|
return /* @__PURE__ */ h.jsxs(h.Fragment, { children: [
|
|
33424
33422
|
/* @__PURE__ */ h.jsxs(ae, { sx: { display: "flex", alignItems: "center" }, children: [
|
|
@@ -41059,7 +41057,7 @@ const jG = (t, e, n) => {
|
|
|
41059
41057
|
/* @__PURE__ */ h.jsx(be, { onClick: e, endIcon: /* @__PURE__ */ h.jsx(un, {}), children: /* @__PURE__ */ h.jsx(F, { id: "buttons.close" }) })
|
|
41060
41058
|
] })
|
|
41061
41059
|
] });
|
|
41062
|
-
}, ZG = "0.0.
|
|
41060
|
+
}, ZG = "0.0.8", e7 = [
|
|
41063
41061
|
{ value: "ONLY_ENABLED", label: "dialogs.form.options.visibility.ONLY_ENABLED" },
|
|
41064
41062
|
{ value: "SHOW_DISABLED", label: "dialogs.form.options.visibility.SHOW_DISABLED" },
|
|
41065
41063
|
{ value: "ALL", label: "dialogs.form.options.visibility.ALL" }
|
|
@@ -41369,12 +41367,13 @@ const jG = (t, e, n) => {
|
|
|
41369
41367
|
}, j7 = (t, e) => _m(t, (r) => {
|
|
41370
41368
|
e.type === "updateItem" ? i7(r, e.attribute, e.value, e.language) : e.type === "updateItemId" ? o7(r, e.itemId) : e.type === "updateLocalizedString" ? s7(r, e.attribute, e.value, e.index) : e.type === "changeItemType" ? a7(r, e.config) : e.type === "setItemProp" ? l7(r, e.key, e.value) : e.type === "deleteItemProp" ? c7(r, e.key) : e.type === "createValidation" ? u7(r, e.rule) : e.type === "setValidationMessage" ? d7(r, e.index, e.language, e.message) : e.type === "setValidationExpression" ? f7(r, e.index, e.expression) : e.type === "deleteValidation" ? h7(r, e.index) : e.type === "createValueSet" ? p7(r, e.itemId, e.entries) : e.type === "setValueSetEntries" ? m7(r, e.valueSetId, e.entries) : e.type === "addValueSetEntry" ? g7(r, e.valueSetId, e.entry) : e.type === "updateValueSetEntry" ? v7(r, e.valueSetId, e.index, e.entry) : e.type === "updateValueSetEntryLabel" ? b7(r, e.valueSetId, e.index, e.text, e.language) : e.type === "deleteValueSetentry" ? y7(r, e.valueSetId, e.index) : e.type === "moveValueSetEntry" ? x7(r, e.valueSetId, e.from, e.to) : e.type === "setGlobalValueSetName" ? w7(r, e.valueSetId, e.name) : e.type === "deleteLocalValueSet" ? S7(r, e.valueSetId) : e.type === "deleteGlobalValueSet" ? C7(r, e.valueSetId) : e.type === "createVariable" ? E7(r, e.context) : e.type === "updateContextVariable" ? k7(r, e.variableId, e.contextType, e.defaultValue) : e.type === "updateExpressionVariable" ? I7(r, e.variableId, e.expression) : e.type === "updateVariablePublishing" ? O7(r, e.variableId, e.published) : e.type === "updateVariableDescription" ? T7(r, e.variableId, e.description) : e.type === "deleteVariable" ? D7(r, e.variableId) : e.type === "moveVariable" ? A7(r, e.origin, e.destination) : e.type === "changeVariableId" && P7(r, e.variables);
|
|
41371
41369
|
}), R7 = () => {
|
|
41370
|
+
var o;
|
|
41372
41371
|
const { form: t, applyListChanges: e } = je(), { savingState: n } = ft(), r = z.useMemo(() => {
|
|
41373
|
-
var
|
|
41374
|
-
return
|
|
41375
|
-
}, [n]), i = () => {
|
|
41376
|
-
var
|
|
41377
|
-
n.valueSets && ((
|
|
41372
|
+
var s, a, l;
|
|
41373
|
+
return n.valueSets && JSON.stringify(n.valueSets) !== JSON.stringify(t.valueSets) || ((s = n.composerMetadata) == null ? void 0 : s.globalValueSets) && JSON.stringify((a = n.composerMetadata) == null ? void 0 : a.globalValueSets) !== JSON.stringify((l = t.metadata.composer) == null ? void 0 : l.globalValueSets);
|
|
41374
|
+
}, [n, t.valueSets, (o = t.metadata.composer) == null ? void 0 : o.globalValueSets]), i = () => {
|
|
41375
|
+
var s;
|
|
41376
|
+
n.valueSets && ((s = n.composerMetadata) != null && s.globalValueSets) && e(n);
|
|
41378
41377
|
};
|
|
41379
41378
|
return /* @__PURE__ */ h.jsx(
|
|
41380
41379
|
be,
|
|
@@ -41543,10 +41542,11 @@ const jG = (t, e, n) => {
|
|
|
41543
41542
|
marginLeft: t.spacing(1)
|
|
41544
41543
|
}
|
|
41545
41544
|
})), L7 = () => {
|
|
41545
|
+
var o;
|
|
41546
41546
|
const { form: t, applyItemChanges: e } = je(), { savingState: n } = ft(), r = z.useMemo(() => {
|
|
41547
|
-
var
|
|
41548
|
-
return
|
|
41549
|
-
}, [n]), i = () => {
|
|
41547
|
+
var s, a;
|
|
41548
|
+
return n.item && JSON.stringify(n.item) !== JSON.stringify(t.data[n.item.id]) || n.valueSets && JSON.stringify(n.valueSets) !== JSON.stringify(t.valueSets) || ((s = n.composerMetadata) == null ? void 0 : s.globalValueSets) && JSON.stringify(n.composerMetadata.globalValueSets) !== JSON.stringify((a = t.metadata.composer) == null ? void 0 : a.globalValueSets);
|
|
41549
|
+
}, [n, t.data, t.valueSets, (o = t.metadata.composer) == null ? void 0 : o.globalValueSets]), i = () => {
|
|
41550
41550
|
n.item && e(n);
|
|
41551
41551
|
};
|
|
41552
41552
|
return /* @__PURE__ */ h.jsx(
|
|
@@ -41660,7 +41660,7 @@ const jG = (t, e, n) => {
|
|
|
41660
41660
|
const { setContextValue: n } = je(), [r, i] = z.useState(e);
|
|
41661
41661
|
return z.useEffect(() => {
|
|
41662
41662
|
const o = setTimeout(() => {
|
|
41663
|
-
r !==
|
|
41663
|
+
r !== e && n(t, r);
|
|
41664
41664
|
}, 300);
|
|
41665
41665
|
return () => clearTimeout(o);
|
|
41666
41666
|
}, [r]), /* @__PURE__ */ h.jsxs(Ge, { children: [
|
|
@@ -41731,7 +41731,7 @@ const jG = (t, e, n) => {
|
|
|
41731
41731
|
/* @__PURE__ */ h.jsx(Sr, { children: /* @__PURE__ */ h.jsx(be, { onClick: e, endIcon: /* @__PURE__ */ h.jsx(un, {}), children: /* @__PURE__ */ h.jsx(F, { id: "buttons.close" }) }) })
|
|
41732
41732
|
] });
|
|
41733
41733
|
}, z7 = () => {
|
|
41734
|
-
const { form: t, applyVariableChanges: e } = je(), { savingState: n } = ft(), r = z.useMemo(() => n.variables ? JSON.stringify(n.variables) !== JSON.stringify(t.variables) : !1, [n]), i = () => {
|
|
41734
|
+
const { form: t, applyVariableChanges: e } = je(), { savingState: n } = ft(), r = z.useMemo(() => n.variables ? n.variables && JSON.stringify(n.variables) !== JSON.stringify(t.variables) : !1, [n, t.variables]), i = () => {
|
|
41735
41735
|
n.variables && e(n);
|
|
41736
41736
|
};
|
|
41737
41737
|
return /* @__PURE__ */ h.jsx(
|