@nice2dev/ui 1.4.14 → 1.4.16
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/CHANGELOG.md +80 -0
- package/dist/{NiceColorPicker-BLwYNSXJ.cjs → NiceColorPicker-79rkvaSk.cjs} +1 -1
- package/dist/NiceDataGrid-B1AOjgjm.cjs +10 -0
- package/dist/NiceForm-fmePSeA9.cjs +1 -0
- package/dist/{NiceHtmlEditor-BzECmDO3.cjs → NiceHtmlEditor-By7R1wRo.cjs} +1 -1
- package/dist/{NiceMention-CYRqPKGU.cjs → NiceMention-i7n2BoMw.cjs} +1 -1
- package/dist/{NiceModuleLifecyclePanel-CiYbPcHV.cjs → NiceModuleLifecyclePanel-DVHQuhc-.cjs} +1 -1
- package/dist/{NicePagination-BAxwqeEd.cjs → NicePagination-D9JguOl0.cjs} +1 -1
- package/dist/NicePivotGrid-B_7iQJys.cjs +2 -0
- package/dist/NiceSavedQueryPanel-ChY4HwpM.cjs +587 -0
- package/dist/{NiceScheduler-BqYiHPvz.cjs → NiceScheduler-B2DamQ_L.cjs} +1 -1
- package/dist/backup/NiceBackupScheduler.mjs +171 -119
- package/dist/charts/NiceOrganizationChart.mjs +159 -59
- package/dist/charts/orgChartExport.mjs +71 -0
- package/dist/charts/tidyTree.mjs +43 -0
- package/dist/charts-C3Q3r8Yz.cjs +918 -0
- package/dist/charts.cjs +1 -1
- package/dist/charts.d.ts +9 -0
- package/dist/{core-lazy-BQexApr7.cjs → core-lazy-ChKRuEPb.cjs} +1 -1
- package/dist/data/NiceDataGrid.mjs +301 -320
- package/dist/data/NiceRowEditDialog.mjs +57 -0
- package/dist/data/NiceTreeGrid.mjs +478 -433
- package/dist/data.cjs +1 -1
- package/dist/data.d.ts +43 -2
- package/dist/{devops-cgRBnZVX.cjs → devops-o6Zm0VKB.cjs} +3 -3
- package/dist/devops.cjs +1 -1
- package/dist/editors/forms/NiceForm.mjs +216 -167
- package/dist/editors/inputs/NiceUpload.mjs +238 -238
- package/dist/editors.cjs +1 -1
- package/dist/editors.d.ts +13 -1
- package/dist/feedback.cjs +1 -1
- package/dist/index.cjs +254 -254
- package/dist/index.d.ts +198 -5
- package/dist/index.mjs +928 -920
- package/dist/lazy.cjs +1 -1
- package/dist/lazy.d.ts +11 -1
- package/dist/navigation.cjs +1 -1
- package/dist/no-code/NiceDataMapper.mjs +398 -361
- package/dist/no-code-CN_q6TcB.cjs +331 -0
- package/dist/no-code.cjs +1 -1
- package/dist/no-code.d.ts +11 -1
- package/dist/style.css +1 -1
- package/dist/tools/NicePermissionMatrix.mjs +171 -138
- package/dist/tools/NiceRoleEditor.mjs +334 -297
- package/package.json +4 -4
- package/dist/NiceDataGrid-D3qRQSjy.cjs +0 -10
- package/dist/NiceForm-BWb4LTQJ.cjs +0 -1
- package/dist/NicePivotGrid-Cxu5PECg.cjs +0 -152
- package/dist/NiceSavedQueryPanel-C1nxEmMu.cjs +0 -587
- package/dist/charts-BzlvCCg9.cjs +0 -768
- package/dist/no-code-B1jzfUF5.cjs +0 -331
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { useNiceTranslation as s } from "@nice2dev/ui-core";
|
|
3
|
+
import { NiceForm as f } from "../editors/forms/NiceForm.mjs";
|
|
4
|
+
import { NiceModal as p } from "../feedback/NiceModal.mjs";
|
|
5
|
+
const u = [];
|
|
6
|
+
function h(a, o) {
|
|
7
|
+
return a.filter((e) => !e.hidden && e.field !== o).map((e) => {
|
|
8
|
+
let t = "text";
|
|
9
|
+
return e.dataType === "number" || e.dataType === "currency" || e.dataType === "percent" ? t = "number" : e.dataType === "boolean" ? t = "checkbox" : e.dataType === "date" && (t = "date"), {
|
|
10
|
+
field: e.field,
|
|
11
|
+
label: e.header,
|
|
12
|
+
type: t,
|
|
13
|
+
required: e.validation?.required
|
|
14
|
+
};
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
function E({
|
|
18
|
+
isNew: a = !1,
|
|
19
|
+
title: o,
|
|
20
|
+
items: e = u,
|
|
21
|
+
data: t,
|
|
22
|
+
columns: n = 2,
|
|
23
|
+
formProps: l,
|
|
24
|
+
onFieldChange: c,
|
|
25
|
+
onSubmit: m,
|
|
26
|
+
onClose: d
|
|
27
|
+
}) {
|
|
28
|
+
const { t: r } = s();
|
|
29
|
+
return /* @__PURE__ */ i(
|
|
30
|
+
p,
|
|
31
|
+
{
|
|
32
|
+
open: !0,
|
|
33
|
+
onClose: d,
|
|
34
|
+
title: o ?? (a ? r("datagrid.addRow", "Add row") : r("datagrid.editRow", "Edit row")),
|
|
35
|
+
size: "lg",
|
|
36
|
+
children: /* @__PURE__ */ i(
|
|
37
|
+
f,
|
|
38
|
+
{
|
|
39
|
+
items: e,
|
|
40
|
+
data: t,
|
|
41
|
+
columns: n,
|
|
42
|
+
showActions: !0,
|
|
43
|
+
submitLabel: a ? r("controls.add", "Add") : r("controls.save", "Save"),
|
|
44
|
+
cancelLabel: r("controls.cancel", "Cancel"),
|
|
45
|
+
onCancel: d,
|
|
46
|
+
...l,
|
|
47
|
+
onFieldChange: c,
|
|
48
|
+
onSubmit: m
|
|
49
|
+
}
|
|
50
|
+
)
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
export {
|
|
55
|
+
E as NiceRowEditDialog,
|
|
56
|
+
h as rowEditFormItems
|
|
57
|
+
};
|