@hybridcore/ui 1.5.13 → 1.5.15

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.
Files changed (41) hide show
  1. package/dist/{DialogContent-CtA2aNum.js → DialogContent-B8pD_s9h.js} +1 -1
  2. package/dist/{Modal-DzZo-vlm.js → Modal-DpmJpbob.js} +206 -195
  3. package/dist/{Select-ush_fSWy.js → Select-DuyWoyoF.js} +1 -1
  4. package/dist/{TextField-BjFXx91l.js → TextField-CdKnj6de.js} +1 -1
  5. package/dist/assets/index3.css +1 -0
  6. package/dist/components/confirm/dialog.js +2 -2
  7. package/dist/components/confirm/index.js +1 -1
  8. package/dist/components/document-viewer/components/action-buttons/index.js +16 -0
  9. package/dist/components/document-viewer/components/navigation/index.js +26 -0
  10. package/dist/components/document-viewer/components/viewer/custom-renders/txt.js +5 -0
  11. package/dist/components/document-viewer/components/viewer/index.js +35 -0
  12. package/dist/components/document-viewer/data.js +4 -0
  13. package/dist/components/document-viewer/index.js +19 -0
  14. package/dist/components/document-viewer/styled.js +22 -0
  15. package/dist/components/document-viewer/utils.js +4 -0
  16. package/dist/components/instance-form/components/composite-list/index.js +1 -1
  17. package/dist/components/instance-form/components/variable/index.js +7 -7
  18. package/dist/components/instance-form/components/variables/index.js +1 -1
  19. package/dist/components/property-mapping/index.js +1 -1
  20. package/dist/components/range-selector/components/composite-list-range/index.js +1 -1
  21. package/dist/components/range-selector/components/date-range/index.js +1 -1
  22. package/dist/components/range-selector/index.js +1 -1
  23. package/dist/components/template-form/components/property-list/index.js +3 -3
  24. package/dist/components/template-form/components/property-list/property-list-form.js +3 -3
  25. package/dist/components/template-form/components/recognition-property-list/index.js +2 -2
  26. package/dist/components/template-form/components/recognition-property-list/recognition-property-list-form.js +2 -2
  27. package/dist/components/template-form/index.js +2 -2
  28. package/dist/components/template-property-filters/property.js +1 -1
  29. package/dist/components/tree-select/index.js +2 -2
  30. package/dist/{dialog-BDt1r9fh.js → dialog-C7_6_FBz.js} +1 -1
  31. package/dist/empty-GlqisfcO-GlqisfcO.js +4 -0
  32. package/dist/index-4HENfCPg-CwPLzyfw.js +3350 -0
  33. package/dist/index-BepDdkdq-BilQlvph.js +42 -0
  34. package/dist/{index-CAaDu0NI.js → index-CNMnXD0q.js} +1349 -1338
  35. package/dist/{index-D-mTkx9Q.js → index-CdecY907.js} +63 -61
  36. package/dist/main.d.ts +1 -0
  37. package/dist/main.js +1 -1
  38. package/dist/{property-list-form-CLSTkOmv.js → property-list-form-DALcsCp5.js} +92 -104
  39. package/dist/txt-U0b7DL6j.js +19250 -0
  40. package/dist/url-DQYFKQ_E-BH63-AZh.js +558 -0
  41. package/package.json +2 -1
@@ -1,21 +1,21 @@
1
1
  import { jsxs as h, Fragment as M, jsx as n } from "react/jsx-runtime";
2
- import I from "lodash";
2
+ import { KeyboardArrowUp as B, KeyboardArrowDown as N, Add as W, LockOutlined as j } from "@mui/icons-material";
3
+ import { FormControl as Y, FormLabel as $, FormGroup as v, FormControlLabel as _, Checkbox as E, Typography as P, Button as F, Chip as G, Dialog as H, DialogTitle as K, DialogContent as R, DialogActions as U, InputAdornment as J, Tooltip as Q } from "@mui/material";
3
4
  import q from "dayjs";
4
- import { FormControl as B, FormLabel as N, FormGroup as W, FormControlLabel as j, Checkbox as Y, Typography as P, Button as F, Chip as $, Dialog as v, DialogTitle as _, DialogContent as E, DialogActions as G, InputAdornment as H, Tooltip as K } from "@mui/material";
5
- import { Container as R, Values as U, MiniButton as J } from "./components/instance-form/components/composite-list/styled.js";
6
- import { KeyboardArrowUp as Q, KeyboardArrowDown as X, Add as Z, LockOutlined as z } from "@mui/icons-material";
5
+ import I from "lodash";
6
+ import { Container as X, Values as Z, MiniButton as z } from "./components/instance-form/components/composite-list/styled.js";
7
7
  import O from "./hooks/useToggle.js";
8
- import { GeometryPicker as ee } from "./components/geometry-picker/index.js";
9
- import { PhoneInput as ne } from "./components/phone-input/index.js";
10
- import { DateTimePicker as ae } from "./components/date-time-picker/index.js";
11
- import { T as p } from "./TextField-BjFXx91l.js";
8
+ import { DateTimePicker as ee } from "./components/date-time-picker/index.js";
9
+ import { GeometryPicker as ne } from "./components/geometry-picker/index.js";
10
+ import { PhoneInput as ae } from "./components/phone-input/index.js";
11
+ import { T as S } from "./TextField-CdKnj6de.js";
12
12
  import { F as le } from "./FormControlLabel-BNT5EI0b.js";
13
13
  import { C as te } from "./Checkbox-B0P8LhCl.js";
14
14
  import { F as oe, I as de } from "./InputLabel-ClDXuWBr.js";
15
- import { S as ie } from "./Select-ush_fSWy.js";
15
+ import { S as ie } from "./Select-DuyWoyoF.js";
16
16
  import { M as re } from "./MenuItem-Lcjh1XlV.js";
17
17
  import { B as L } from "./Box-SSMZuKnS.js";
18
- import { useState as S } from "react";
18
+ import { useState as p } from "react";
19
19
  function me({
20
20
  property: i,
21
21
  mapboxAccessToken: e,
@@ -25,36 +25,36 @@ function me({
25
25
  onChange: g
26
26
  }) {
27
27
  var C, V, l;
28
- const d = O(!1), [m, T] = S(), [b, w] = S(!1), x = 10, A = (t) => {
28
+ const o = O(!1), [m, T] = p(), [b, w] = p(!1), x = 10, A = (t) => {
29
29
  T(I.get(t, i.propertyId));
30
30
  }, y = () => {
31
- g([...a || [], m]), T(""), d.action.close();
31
+ g([...a || [], m]), T(""), o.action.close();
32
32
  }, D = (t) => () => {
33
33
  if (a) {
34
- const o = [...a];
35
- o.splice(t, 1), g(o);
34
+ const d = [...a];
35
+ d.splice(t, 1), g(d);
36
36
  }
37
37
  }, k = (t) => {
38
- const { value: o, checked: c } = t.target;
38
+ const { value: d, checked: c } = t.target;
39
39
  let s = I.isArray(a) ? a : [];
40
- c ? s.push(o) : s = s.filter((f) => f !== o), g(s);
40
+ c ? s.push(d) : s = s.filter((f) => f !== d), g(s);
41
41
  };
42
42
  if (((V = (C = i.dataTypeInfo) == null ? void 0 : C.innerType) == null ? void 0 : V.type) === "enum") {
43
43
  const { enumValues: t } = i.dataTypeInfo.innerType;
44
44
  return /* @__PURE__ */ h(M, { children: [
45
- /* @__PURE__ */ h(B, { fullWidth: !0, component: "fieldset", variant: u, children: [
46
- /* @__PURE__ */ n(N, { component: "legend", sx: { mb: 1 }, children: i.name }),
47
- /* @__PURE__ */ n(W, { children: t && t.length > 0 ? t.slice(0, b ? 9999 : x).map((o, c) => /* @__PURE__ */ n(
48
- j,
45
+ /* @__PURE__ */ h(Y, { fullWidth: !0, component: "fieldset", variant: u, children: [
46
+ /* @__PURE__ */ n($, { component: "legend", sx: { mb: 1 }, children: i.name }),
47
+ /* @__PURE__ */ n(v, { children: t && t.length > 0 ? t.slice(0, b ? 9999 : x).map((d, c) => /* @__PURE__ */ n(
48
+ _,
49
49
  {
50
- label: o,
50
+ label: d,
51
51
  control: /* @__PURE__ */ n(
52
- Y,
52
+ E,
53
53
  {
54
54
  name: i.propertyId,
55
- value: o,
55
+ value: d,
56
56
  size: "small",
57
- checked: I.isArray(a) ? a.includes(o) : !1,
57
+ checked: I.isArray(a) ? a.includes(d) : !1,
58
58
  onChange: k
59
59
  }
60
60
  ),
@@ -72,8 +72,8 @@ function me({
72
72
  {
73
73
  size: "small",
74
74
  sx: { p: 0, textTransform: "none" },
75
- endIcon: b ? /* @__PURE__ */ n(Q, {}) : /* @__PURE__ */ n(X, {}),
76
- onClick: () => w((o) => !o),
75
+ endIcon: b ? /* @__PURE__ */ n(B, {}) : /* @__PURE__ */ n(N, {}),
76
+ onClick: () => w((d) => !d),
77
77
  children: [
78
78
  "Show ",
79
79
  b ? "Less" : "More"
@@ -83,40 +83,40 @@ function me({
83
83
  ] });
84
84
  }
85
85
  return /* @__PURE__ */ h(M, { children: [
86
- /* @__PURE__ */ h(R, { variant: u, children: [
86
+ /* @__PURE__ */ h(X, { variant: u, children: [
87
87
  /* @__PURE__ */ n(P, { children: i.name }),
88
- /* @__PURE__ */ n(U, { children: I.isArray(a) && a.map((t, o) => {
88
+ /* @__PURE__ */ n(Z, { children: I.isArray(a) && a.map((t, d) => {
89
89
  var c, s;
90
90
  return /* @__PURE__ */ n(
91
- $,
91
+ G,
92
92
  {
93
93
  label: ((s = (c = i.dataTypeInfo) == null ? void 0 : c.innerType) == null ? void 0 : s.type) === "date" ? q(t).format("DD/MM/YYYY HH:mm:ss") : t,
94
94
  size: r,
95
- onDelete: D(o)
95
+ onDelete: D(d)
96
96
  },
97
- o
97
+ d
98
98
  );
99
99
  }) }),
100
100
  /* @__PURE__ */ n(
101
- J,
101
+ z,
102
102
  {
103
- startIcon: /* @__PURE__ */ n(Z, {}),
103
+ startIcon: /* @__PURE__ */ n(W, {}),
104
104
  variant: "text",
105
- onClick: d.action.open,
105
+ onClick: o.action.open,
106
106
  children: "Add"
107
107
  }
108
108
  )
109
109
  ] }),
110
110
  /* @__PURE__ */ h(
111
- v,
111
+ H,
112
112
  {
113
- open: d.state.isOpen,
114
- onClose: d.action.close,
113
+ open: o.state.isOpen,
114
+ onClose: o.action.close,
115
115
  maxWidth: "sm",
116
116
  fullWidth: !0,
117
117
  children: [
118
- /* @__PURE__ */ n(_, { children: "Add List Value" }),
119
- /* @__PURE__ */ n(E, { children: (l = i.dataTypeInfo) != null && l.innerType ? /* @__PURE__ */ n(
118
+ /* @__PURE__ */ n(K, { children: "Add List Value" }),
119
+ /* @__PURE__ */ n(R, { children: (l = i.dataTypeInfo) != null && l.innerType ? /* @__PURE__ */ n(
120
120
  ce,
121
121
  {
122
122
  mapboxAccessToken: e,
@@ -129,13 +129,13 @@ function me({
129
129
  onChange: A
130
130
  }
131
131
  ) : null }),
132
- /* @__PURE__ */ h(G, { children: [
132
+ /* @__PURE__ */ h(U, { children: [
133
133
  /* @__PURE__ */ n(
134
134
  F,
135
135
  {
136
136
  variant: "contained",
137
137
  color: "inherit",
138
- onClick: d.action.close,
138
+ onClick: o.action.close,
139
139
  children: "Cancel"
140
140
  }
141
141
  ),
@@ -153,21 +153,21 @@ function ce({
153
153
  variant: u = "standard",
154
154
  size: r = "medium",
155
155
  defaultExtent: g,
156
- fieldOptions: d,
156
+ fieldOptions: o,
157
157
  // keyAuth,
158
158
  onChange: m
159
159
  }) {
160
160
  var k, C, V;
161
161
  const T = (l) => {
162
- const o = l.target.value.split(",").map((c) => c.trimStart());
162
+ const d = l.target.value.split(",").map((c) => c.trimStart());
163
163
  m({
164
- [e.propertyId]: o
164
+ [e.propertyId]: d
165
165
  });
166
166
  }, b = (l) => {
167
- const { name: t, type: o, checked: c, value: s } = l.target;
167
+ const { name: t, type: d, checked: c, value: s } = l.target;
168
168
  let f = s;
169
169
  e.type === "double" && (f = f.replace(",", "."), f = f.replace(/[^\d.-]+/g, "")), m({
170
- [t]: o === "checkbox" ? c : f
170
+ [t]: d === "checkbox" ? c : f
171
171
  });
172
172
  }, w = (l) => {
173
173
  m({
@@ -190,6 +190,8 @@ function ce({
190
190
  [l]: t
191
191
  });
192
192
  };
193
+ if (o && o[e.propertyId] && o[e.propertyId].component)
194
+ return o[e.propertyId].component;
193
195
  if ([
194
196
  "string",
195
197
  "integer",
@@ -200,7 +202,7 @@ function ce({
200
202
  "bank-account"
201
203
  ].includes(e.type))
202
204
  return /* @__PURE__ */ n(
203
- p,
205
+ S,
204
206
  {
205
207
  label: e.name,
206
208
  name: e.propertyId,
@@ -215,11 +217,11 @@ function ce({
215
217
  fullWidth: !0,
216
218
  InputProps: {
217
219
  size: r,
218
- ...d && d[e.propertyId] && {
219
- tabIndex: d[e.propertyId].order
220
+ ...o && o[e.propertyId] && {
221
+ tabIndex: o[e.propertyId].order
220
222
  },
221
223
  ...e.privacyPreservationMethod === "ENCRYPTION" ? {
222
- endAdornment: /* @__PURE__ */ n(H, { position: "end", children: /* @__PURE__ */ n(K, { title: "Encrypted Field", children: /* @__PURE__ */ n(z, {}) }) })
224
+ endAdornment: /* @__PURE__ */ n(J, { position: "end", children: /* @__PURE__ */ n(Q, { title: "Encrypted Field", children: /* @__PURE__ */ n(j, {}) }) })
223
225
  } : {}
224
226
  }
225
227
  }
@@ -227,7 +229,7 @@ function ce({
227
229
  if (e.type === "date") {
228
230
  const l = a !== void 0 ? q(a).format() : a;
229
231
  return /* @__PURE__ */ n(
230
- ae,
232
+ ee,
231
233
  {
232
234
  label: e.name,
233
235
  value: l,
@@ -235,8 +237,8 @@ function ce({
235
237
  size: r,
236
238
  name: e.propertyId,
237
239
  onChange: w,
238
- ...d && d[e.propertyId] && {
239
- minDate: d[e.propertyId].minDate
240
+ ...o && o[e.propertyId] && {
241
+ minDate: o[e.propertyId].minDate
240
242
  }
241
243
  }
242
244
  );
@@ -244,7 +246,7 @@ function ce({
244
246
  if (e.type === "list") {
245
247
  let l = "";
246
248
  return e.defaultValue && (l = I.isArray(e.defaultValue) ? a.join(", ") : e.defaultValue), a && (l = I.isArray(a) ? a.join(",") : a), /* @__PURE__ */ n(
247
- p,
249
+ S,
248
250
  {
249
251
  label: e.name,
250
252
  name: e.propertyId,
@@ -258,8 +260,8 @@ function ce({
258
260
  InputProps: {
259
261
  size: r,
260
262
  placeholder: r === "small" ? "Add list values with the comma (,) separated string" : "",
261
- ...d && d[e.propertyId] && {
262
- tabIndex: d[e.propertyId].order
263
+ ...o && o[e.propertyId] && {
264
+ tabIndex: o[e.propertyId].order
263
265
  }
264
266
  }
265
267
  }
@@ -302,11 +304,11 @@ function ce({
302
304
  value: a ?? "",
303
305
  onChange: x,
304
306
  inputProps: {
305
- ...d && d[e.propertyId] && {
306
- tabIndex: d[e.propertyId].order
307
+ ...o && o[e.propertyId] && {
308
+ tabIndex: o[e.propertyId].order
307
309
  }
308
310
  },
309
- children: l.map((t, o) => /* @__PURE__ */ n(re, { value: t, children: t }, o))
311
+ children: l.map((t, d) => /* @__PURE__ */ n(re, { value: t, children: t }, d))
310
312
  }
311
313
  )
312
314
  ]
@@ -314,7 +316,7 @@ function ce({
314
316
  );
315
317
  }
316
318
  return e.type === "geometry" ? /* @__PURE__ */ n(L, { sx: { width: "100%" }, children: /* @__PURE__ */ n(
317
- ee,
319
+ ne,
318
320
  {
319
321
  mapboxAccessToken: i,
320
322
  label: e.name,
@@ -324,7 +326,7 @@ function ce({
324
326
  onChange: A(e.propertyId)
325
327
  }
326
328
  ) }) : e.type === "phone-number" ? /* @__PURE__ */ n(L, { sx: { width: "100%" }, children: /* @__PURE__ */ n(
327
- ne,
329
+ ae,
328
330
  {
329
331
  label: e.name,
330
332
  placeholder: "Enter phone number",
package/dist/main.d.ts CHANGED
@@ -229,6 +229,7 @@ declare interface FieldOptions {
229
229
  disabled?: boolean;
230
230
  minDate?: Dayjs;
231
231
  helperText?: React.ReactNode;
232
+ component?: React.ReactNode;
232
233
  [key: string]: string | number | object | boolean;
233
234
  }
234
235
 
package/dist/main.js CHANGED
@@ -33,7 +33,7 @@ import { ThemeProvider as Ee, createTheme as Ue } from "@mui/material";
33
33
  import { a as dt } from "./objectWithoutPropertiesLoose-DJteAcBH.js";
34
34
  import I from "dayjs";
35
35
  import { h as U, j as z } from "./createTheme-DrgvKMA_.js";
36
- import { b as ut } from "./index-CAaDu0NI.js";
36
+ import { b as ut } from "./index-CNMnXD0q.js";
37
37
  var tt = { exports: {} };
38
38
  (function(l, D) {
39
39
  (function(f, c) {