@juicemantics/veloiq-ui 0.2.1 → 0.2.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/index.js +46 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +46 -13
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7720,6 +7720,7 @@ var renderInput = (field, allModels, model, currentId) => {
|
|
|
7720
7720
|
};
|
|
7721
7721
|
var _23 = window._ || ((text) => text);
|
|
7722
7722
|
var { Title: Title2 } = antd.Typography;
|
|
7723
|
+
var requiredMark = (field) => field.required ? /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "#ff4d4f", marginLeft: 3 }, children: "*" }) : null;
|
|
7723
7724
|
var DynamicCreate = ({ model: modelProp, allModels, journeyCallbacks, injectedValues }) => {
|
|
7724
7725
|
const model = useRoleFilteredModel(modelProp);
|
|
7725
7726
|
applyI18nLabelsToModel(model);
|
|
@@ -7975,7 +7976,10 @@ var DynamicCreate = ({ model: modelProp, allModels, journeyCallbacks, injectedVa
|
|
|
7975
7976
|
return /* @__PURE__ */ jsxRuntime.jsx(antd.Form.Item, { name: field.key, hidden: true, rules: field.required ? [{ required: true }] : [], children: renderInput(field, allModels, model) }, `${field.key}-${index}`);
|
|
7976
7977
|
}
|
|
7977
7978
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginBottom: 4 }, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "grid", gridTemplateColumns: showLabel ? "200px 1fr" : "1fr", alignItems: "start", columnGap: 6 }, children: [
|
|
7978
|
-
showLabel && /* @__PURE__ */ jsxRuntime.
|
|
7979
|
+
showLabel && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { ...labelStyle, backgroundColor: labelBackground, padding: "2px 4px", borderRadius: 4 }, children: [
|
|
7980
|
+
field.label,
|
|
7981
|
+
requiredMark(field)
|
|
7982
|
+
] }),
|
|
7979
7983
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { padding: "2px 4px", lineHeight: 1.15, background: valueBackground, borderRadius: 6, border: `1px solid ${token.colorBorder}`, maxWidth: "100%", overflowWrap: "anywhere", ...parseInlineStyle(item.html_format) }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7980
7984
|
antd.Form.Item,
|
|
7981
7985
|
{
|
|
@@ -8044,7 +8048,10 @@ var DynamicCreate = ({ model: modelProp, allModels, journeyCallbacks, injectedVa
|
|
|
8044
8048
|
...parseInlineStyle(item.html_format)
|
|
8045
8049
|
};
|
|
8046
8050
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginBottom: 4 }, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "grid", gridTemplateColumns: showLabel ? "200px 1fr" : "1fr", alignItems: "start", columnGap: 6 }, children: [
|
|
8047
|
-
showLabel && /* @__PURE__ */ jsxRuntime.
|
|
8051
|
+
showLabel && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { ...labelStyle, backgroundColor: labelBackground, padding: "2px 4px", borderRadius: 4 }, children: [
|
|
8052
|
+
field.label,
|
|
8053
|
+
requiredMark(field)
|
|
8054
|
+
] }),
|
|
8048
8055
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: readonlyValueStyle, children: renderFieldValue(field, createdRecord, allModels) })
|
|
8049
8056
|
] }) }, `${field.key}-${index}`);
|
|
8050
8057
|
};
|
|
@@ -8073,7 +8080,10 @@ var DynamicCreate = ({ model: modelProp, allModels, journeyCallbacks, injectedVa
|
|
|
8073
8080
|
return /* @__PURE__ */ jsxRuntime.jsx(antd.Form.Item, { name: field.key, hidden: true, rules: field.required ? [{ required: true }] : [], children: renderInput(field, allModels, model) }, field.key);
|
|
8074
8081
|
}
|
|
8075
8082
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "grid", gridTemplateColumns: "200px 1fr", justifyContent: "start", alignItems: "start", columnGap: 6 }, children: [
|
|
8076
|
-
/* @__PURE__ */ jsxRuntime.
|
|
8083
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { style: labelStyle, children: [
|
|
8084
|
+
field.label,
|
|
8085
|
+
requiredMark(field)
|
|
8086
|
+
] }),
|
|
8077
8087
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { padding: "2px 4px", lineHeight: 1.15, maxWidth: "100%", overflowWrap: "anywhere" }, children: /* @__PURE__ */ jsxRuntime.jsx(antd.Form.Item, { name: field.key, rules: field.required ? [{ required: true }] : [], valuePropName: field.type === "boolean" ? "checked" : void 0, getValueProps: (val) => (field.type === "date" || field.type === "datetime") && val ? { value: dayjs8__default.default(val) } : field.type === "time" && val ? { value: dayjs8__default.default("1970-01-01T" + val) } : { value: val }, style: { margin: 0 }, children: renderInput(field, allModels, model) }) })
|
|
8078
8088
|
] }, field.key);
|
|
8079
8089
|
}) }) })
|
|
@@ -8208,7 +8218,10 @@ var DynamicCreate = ({ model: modelProp, allModels, journeyCallbacks, injectedVa
|
|
|
8208
8218
|
return /* @__PURE__ */ jsxRuntime.jsx(antd.Form.Item, { name: field.key, hidden: true, rules: field.required ? [{ required: true }] : [], children: isOtherKey && field.reference && hasReferenceModel(field.reference, allModels) ? /* @__PURE__ */ jsxRuntime.jsx(RelationSelect, { field, allModels, multiple: true }) : renderInput(field, allModels, model) }, field.key);
|
|
8209
8219
|
}
|
|
8210
8220
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "grid", gridTemplateColumns: "200px 1fr", justifyContent: "start", alignItems: "start", columnGap: 6 }, children: [
|
|
8211
|
-
/* @__PURE__ */ jsxRuntime.
|
|
8221
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { style: labelStyle, children: [
|
|
8222
|
+
field.label,
|
|
8223
|
+
requiredMark(field)
|
|
8224
|
+
] }),
|
|
8212
8225
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { padding: "2px 4px", lineHeight: 1.15, maxWidth: "100%", overflowWrap: "anywhere" }, children: /* @__PURE__ */ jsxRuntime.jsx(antd.Form.Item, { name: field.key, rules: field.required ? [{ required: true }] : [], style: { margin: 0 }, children: isOtherKey && field.reference && hasReferenceModel(field.reference, allModels) ? /* @__PURE__ */ jsxRuntime.jsx(RelationSelect, { field, allModels, multiple: true }) : renderInput(field, allModels, model) }) })
|
|
8213
8226
|
] }, field.key);
|
|
8214
8227
|
}) })
|
|
@@ -8304,6 +8317,7 @@ var NLSentenceBlock = ({ eid, title: titleProp, showLabel }) => {
|
|
|
8304
8317
|
};
|
|
8305
8318
|
var _24 = window._ || ((text) => text);
|
|
8306
8319
|
var { Title: Title3 } = antd.Typography;
|
|
8320
|
+
var requiredMark2 = (field) => field.required ? /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "#ff4d4f", marginLeft: 3 }, children: "*" }) : null;
|
|
8307
8321
|
var DynamicEdit = ({ model: modelProp, allModels, topContent, extraHeaderButtons, journeyCallbacks, idOverride }) => {
|
|
8308
8322
|
const model = useRoleFilteredModel(modelProp);
|
|
8309
8323
|
applyI18nLabelsToModel(model);
|
|
@@ -8626,7 +8640,10 @@ var DynamicEdit = ({ model: modelProp, allModels, topContent, extraHeaderButtons
|
|
|
8626
8640
|
gap: "4px 6px"
|
|
8627
8641
|
},
|
|
8628
8642
|
children: [
|
|
8629
|
-
/* @__PURE__ */ jsxRuntime.
|
|
8643
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { style: { ...labelStyle, flex: "0 0 200px" }, children: [
|
|
8644
|
+
field.label,
|
|
8645
|
+
requiredMark2(field)
|
|
8646
|
+
] }),
|
|
8630
8647
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { flex: "1 0 200px", padding: "2px 4px", lineHeight: 1.15, overflowWrap: "anywhere", background: valueBackground, borderRadius: 6 }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8631
8648
|
antd.Form.Item,
|
|
8632
8649
|
{
|
|
@@ -8771,7 +8788,7 @@ var DynamicEdit = ({ model: modelProp, allModels, topContent, extraHeaderButtons
|
|
|
8771
8788
|
gap: 2
|
|
8772
8789
|
},
|
|
8773
8790
|
children: [
|
|
8774
|
-
showLabel && /* @__PURE__ */ jsxRuntime.
|
|
8791
|
+
showLabel && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8775
8792
|
"div",
|
|
8776
8793
|
{
|
|
8777
8794
|
style: {
|
|
@@ -8780,7 +8797,10 @@ var DynamicEdit = ({ model: modelProp, allModels, topContent, extraHeaderButtons
|
|
|
8780
8797
|
padding: "2px 4px",
|
|
8781
8798
|
borderRadius: 4
|
|
8782
8799
|
},
|
|
8783
|
-
children:
|
|
8800
|
+
children: [
|
|
8801
|
+
field.label,
|
|
8802
|
+
requiredMark2(field)
|
|
8803
|
+
]
|
|
8784
8804
|
}
|
|
8785
8805
|
),
|
|
8786
8806
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: readonlyValueStyle, children: renderFieldValue(field, record, allModels) })
|
|
@@ -8797,7 +8817,7 @@ var DynamicEdit = ({ model: modelProp, allModels, topContent, extraHeaderButtons
|
|
|
8797
8817
|
gap: 2
|
|
8798
8818
|
},
|
|
8799
8819
|
children: [
|
|
8800
|
-
showLabel && /* @__PURE__ */ jsxRuntime.
|
|
8820
|
+
showLabel && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8801
8821
|
"div",
|
|
8802
8822
|
{
|
|
8803
8823
|
style: {
|
|
@@ -8806,7 +8826,10 @@ var DynamicEdit = ({ model: modelProp, allModels, topContent, extraHeaderButtons
|
|
|
8806
8826
|
padding: "2px 4px",
|
|
8807
8827
|
borderRadius: 4
|
|
8808
8828
|
},
|
|
8809
|
-
children:
|
|
8829
|
+
children: [
|
|
8830
|
+
field.label,
|
|
8831
|
+
requiredMark2(field)
|
|
8832
|
+
]
|
|
8810
8833
|
}
|
|
8811
8834
|
),
|
|
8812
8835
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: {
|
|
@@ -8931,7 +8954,10 @@ var DynamicEdit = ({ model: modelProp, allModels, topContent, extraHeaderButtons
|
|
|
8931
8954
|
const showLabel = item.show_label !== false;
|
|
8932
8955
|
const editable = isAttributeValueEditable(item, "edit");
|
|
8933
8956
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginBottom: 4 }, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 2 }, children: [
|
|
8934
|
-
showLabel && /* @__PURE__ */ jsxRuntime.
|
|
8957
|
+
showLabel && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { ...labelStyle, backgroundColor: labelBackground, padding: "2px 4px", borderRadius: 4 }, children: [
|
|
8958
|
+
field.label,
|
|
8959
|
+
requiredMark2(field)
|
|
8960
|
+
] }),
|
|
8935
8961
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { padding: "2px 4px", lineHeight: 1.15, background: valueBackground, borderRadius: 6, border: `1px solid ${token.colorBorder}`, maxWidth: "100%", overflowWrap: "anywhere", ...parseInlineStyle(item.html_format) }, children: editable ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
8936
8962
|
antd.Form.Item,
|
|
8937
8963
|
{
|
|
@@ -9081,6 +9107,7 @@ var ReadAndEditReference = ({ value, onChange, field, allModels, model, currentI
|
|
|
9081
9107
|
};
|
|
9082
9108
|
var _26 = window._ || ((text) => text);
|
|
9083
9109
|
var { Title: Title4 } = antd.Typography;
|
|
9110
|
+
var requiredMark3 = (field) => field.required ? /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "#ff4d4f", marginLeft: 3 }, children: "*" }) : null;
|
|
9084
9111
|
function coerce(v) {
|
|
9085
9112
|
if (v && typeof v === "object" && typeof v.valueOf === "function") return v.valueOf();
|
|
9086
9113
|
return v;
|
|
@@ -9232,7 +9259,10 @@ var useStandardShowTabs = (model, record, allModels, actionsState, editForm, ove
|
|
|
9232
9259
|
gap: "4px 6px"
|
|
9233
9260
|
},
|
|
9234
9261
|
children: [
|
|
9235
|
-
/* @__PURE__ */ jsxRuntime.
|
|
9262
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { style: { ...labelStyle, flex: "0 0 200px" }, children: [
|
|
9263
|
+
field.label,
|
|
9264
|
+
requiredMark3(field)
|
|
9265
|
+
] }),
|
|
9236
9266
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9237
9267
|
"div",
|
|
9238
9268
|
{
|
|
@@ -9370,7 +9400,7 @@ var useStandardShowTabs = (model, record, allModels, actionsState, editForm, ove
|
|
|
9370
9400
|
gap: 2
|
|
9371
9401
|
},
|
|
9372
9402
|
children: [
|
|
9373
|
-
showLabel && /* @__PURE__ */ jsxRuntime.
|
|
9403
|
+
showLabel && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9374
9404
|
"div",
|
|
9375
9405
|
{
|
|
9376
9406
|
style: {
|
|
@@ -9379,7 +9409,10 @@ var useStandardShowTabs = (model, record, allModels, actionsState, editForm, ove
|
|
|
9379
9409
|
padding: "2px 4px",
|
|
9380
9410
|
borderRadius: 4
|
|
9381
9411
|
},
|
|
9382
|
-
children:
|
|
9412
|
+
children: [
|
|
9413
|
+
field.label,
|
|
9414
|
+
requiredMark3(field)
|
|
9415
|
+
]
|
|
9383
9416
|
}
|
|
9384
9417
|
),
|
|
9385
9418
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { ...valueStyle, border: `1px solid ${token.colorBorder}` }, children: editable || forceReadOnly ? renderShowEditableInput(field, forceReadOnly) : renderFieldValue(field, record, allModels) })
|