@hybridcore/ui 1.5.62 → 1.5.64

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.
@@ -41,6 +41,7 @@ const K = ({
41
41
  {
42
42
  variant: "contained",
43
43
  size: "small",
44
+ disabled: t.length === 0,
44
45
  onClick: h,
45
46
  children: "Edit Mapping"
46
47
  }
@@ -5,12 +5,12 @@ import { useForm as P, Controller as l } from "react-hook-form";
5
5
  import { CatalogueInstanceSelector as O } from "./components/catalogue-instance-selector/index.js";
6
6
  import j from "./components/property-list/index.js";
7
7
  import K from "./components/recognition-property-list/index.js";
8
- import { FormLabel as L, Button as b } from "@mui/material";
8
+ import { FormLabel as L, Button as g } from "@mui/material";
9
9
  import { getNestedChildrenFromMap as _ } from "../../utils/ontology.js";
10
10
  import { TreeSelect as w } from "../tree-select/index.js";
11
11
  import A from "./components/select-icon/index.js";
12
12
  import { T as m } from "../../TextField-CdKnj6de.js";
13
- import { F as g } from "../../property-list-form-D77cAJ24.js";
13
+ import { F as h } from "../../property-list-form-D77cAJ24.js";
14
14
  import { F as d } from "../../FormControlLabel-BNT5EI0b.js";
15
15
  import { C as c } from "../../Checkbox-B0P8LhCl.js";
16
16
  import { B as p } from "../../Box-SSMZuKnS.js";
@@ -20,7 +20,7 @@ function B(e, x) {
20
20
  handleSubmit: T,
21
21
  control: i,
22
22
  formState: { errors: v },
23
- getValues: h,
23
+ getValues: b,
24
24
  reset: V
25
25
  } = P({
26
26
  defaultValues: e.defaultValues
@@ -31,7 +31,7 @@ function B(e, x) {
31
31
  ...o,
32
32
  label: o.name,
33
33
  value: o.templateKey,
34
- checked: h("parent") === o.templateKey
34
+ checked: b("parent") === o.templateKey
35
35
  });
36
36
  return _(a, !1);
37
37
  }, S = () => {
@@ -44,6 +44,7 @@ function B(e, x) {
44
44
  }
45
45
  };
46
46
  return f.useImperativeHandle(x, () => ({
47
+ getValues: b,
47
48
  resetForm() {
48
49
  V();
49
50
  }
@@ -98,7 +99,7 @@ function B(e, x) {
98
99
  ...s("version")
99
100
  }
100
101
  ),
101
- /* @__PURE__ */ n(g, { sx: { mb: 2 }, children: /* @__PURE__ */ n(
102
+ /* @__PURE__ */ n(h, { sx: { mb: 2 }, children: /* @__PURE__ */ n(
102
103
  l,
103
104
  {
104
105
  name: "parent",
@@ -170,7 +171,7 @@ function B(e, x) {
170
171
  )
171
172
  }
172
173
  ),
173
- /* @__PURE__ */ u(g, { row: !0, sx: { mb: 2 }, children: [
174
+ /* @__PURE__ */ u(h, { row: !0, sx: { mb: 2 }, children: [
174
175
  /* @__PURE__ */ n(
175
176
  d,
176
177
  {
@@ -242,7 +243,7 @@ function B(e, x) {
242
243
  }
243
244
  )
244
245
  ] }),
245
- /* @__PURE__ */ u(g, { children: [
246
+ /* @__PURE__ */ u(h, { children: [
246
247
  /* @__PURE__ */ n(L, { children: "Icon" }),
247
248
  /* @__PURE__ */ n(
248
249
  l,
@@ -288,7 +289,7 @@ function B(e, x) {
288
289
  K,
289
290
  {
290
291
  list: t || [],
291
- getFormValues: h,
292
+ getFormValues: b,
292
293
  onChange: a
293
294
  }
294
295
  )
@@ -296,7 +297,7 @@ function B(e, x) {
296
297
  ),
297
298
  /* @__PURE__ */ u(p, { display: "flex", justifyContent: "space-between", mt: 3, children: [
298
299
  /* @__PURE__ */ n(
299
- b,
300
+ g,
300
301
  {
301
302
  color: "primary",
302
303
  variant: "text",
@@ -307,7 +308,7 @@ function B(e, x) {
307
308
  }
308
309
  ),
309
310
  /* @__PURE__ */ n(p, { children: e.saveButtons ? e.saveButtons.map((t, a) => /* @__PURE__ */ n(
310
- b,
311
+ g,
311
312
  {
312
313
  type: "submit",
313
314
  color: "primary",
@@ -320,7 +321,7 @@ function B(e, x) {
320
321
  },
321
322
  a
322
323
  )) : /* @__PURE__ */ n(
323
- b,
324
+ g,
324
325
  {
325
326
  type: "submit",
326
327
  color: "primary",
package/dist/main.d.ts CHANGED
@@ -930,21 +930,29 @@ export declare const TemplateFilters: React.FC<TemplateFilterProps>;
930
930
 
931
931
  export declare const TemplateForm: <T extends ONTOLOGY.Object | ONTOLOGY.Event | ONTOLOGY.Agent | ONTOLOGY.File, K extends ONTOLOGY.CreateObjectDTO | ONTOLOGY.CreateEventDTO | ONTOLOGY.CreateFileDTO | ONTOLOGY.CreateAgentDTO | ONTOLOGY.UpdateObjectDTO | ONTOLOGY.UpdateEventDTO | ONTOLOGY.UpdateFileDTO | ONTOLOGY.UpdateAgentDTO>(props: TemplateFormProps<T, K> & default_2.RefAttributes<TemplateFormHandle>) => default_2.ReactNode | null;
932
932
 
933
- declare interface TemplateFormHandle {
933
+ export declare interface TemplateFormHandle {
934
+ getValues: (key?: string) => any;
934
935
  resetForm: () => void;
935
936
  }
936
937
 
937
938
  declare interface TemplateFormProps<
938
- T extends ONTOLOGY.Object | ONTOLOGY.Event | ONTOLOGY.Agent | ONTOLOGY.File,
939
+ T extends
940
+ | ONTOLOGY.Object
941
+ | ONTOLOGY.Event
942
+ | ONTOLOGY.Agent
943
+ | ONTOLOGY.File
944
+ | ONTOLOGY.System,
939
945
  K extends
940
946
  | ONTOLOGY.CreateObjectDTO
941
947
  | ONTOLOGY.CreateEventDTO
942
948
  | ONTOLOGY.CreateFileDTO
943
949
  | ONTOLOGY.CreateAgentDTO
950
+ | ONTOLOGY.CreateSystemOntologyDTO
944
951
  | ONTOLOGY.UpdateObjectDTO
945
952
  | ONTOLOGY.UpdateEventDTO
946
953
  | ONTOLOGY.UpdateFileDTO
947
954
  | ONTOLOGY.UpdateAgentDTO
955
+ | ONTOLOGY.UpdateSystemOntologyDTO
948
956
  > {
949
957
  mappedTemplates: Map<string | number, T>;
950
958
 
@@ -953,10 +961,12 @@ K extends
953
961
  ONTOLOGY.CreateEventDTO &
954
962
  ONTOLOGY.CreateFileDTO &
955
963
  ONTOLOGY.CreateAgentDTO &
964
+ ONTOLOGY.CreateSystemOntologyDTO &
956
965
  ONTOLOGY.UpdateObjectDTO &
957
966
  ONTOLOGY.UpdateEventDTO &
958
967
  ONTOLOGY.UpdateFileDTO &
959
- ONTOLOGY.UpdateAgentDTO
968
+ ONTOLOGY.UpdateAgentDTO &
969
+ ONTOLOGY.UpdateSystemOntologyDTO
960
970
  >;
961
971
  loading?: boolean;
962
972
  agentTemplates?: Map<string | number, ONTOLOGY.Agent>;
@@ -1561,11 +1571,40 @@ declare namespace INSTANCE {
1561
1571
  id: number;
1562
1572
  }
1563
1573
 
1574
+ interface System {
1575
+ id: number;
1576
+ title: string;
1577
+ description: string;
1578
+ template: ONTOLOGY.GenericTemplateView;
1579
+ templateHierarchy: ONTOLOGY.GenericTemplateView[];
1580
+ variables: GroupedVariables;
1581
+ createDate?: string;
1582
+ createUser?: string;
1583
+ updateDate?: string;
1584
+ updateUser?: string;
1585
+ securityLevelId: number;
1586
+ disseminationList: string[];
1587
+ }
1588
+
1589
+ interface CreateSystemDTO {
1590
+ title: string;
1591
+ templateId: number;
1592
+ description?: string;
1593
+ variables: Variable;
1594
+ securityLevelId: number;
1595
+ disseminationList: string[];
1596
+ }
1597
+
1598
+ interface UpdateSystemDTO extends CreateSystemDTO {
1599
+ id: number;
1600
+ }
1601
+
1564
1602
  type InstanceType =
1565
1603
  | INSTANCE.Object
1566
1604
  | INSTANCE.Event
1567
1605
  | INSTANCE.File
1568
- | INSTANCE.Agent;
1606
+ | INSTANCE.Agent
1607
+ | INSTANCE.System;
1569
1608
  }
1570
1609
 
1571
1610
  declare namespace ONTOLOGY {
@@ -1766,11 +1805,45 @@ declare namespace ONTOLOGY {
1766
1805
  id: number;
1767
1806
  }
1768
1807
 
1808
+ interface System {
1809
+ id: number;
1810
+ templateKey: string;
1811
+ name: string;
1812
+ description: string;
1813
+ type: string;
1814
+ ontologyId: number;
1815
+ parent: string;
1816
+ icon: string;
1817
+ properties: Property[];
1818
+ version: any;
1819
+ creatable: boolean;
1820
+ editable: boolean;
1821
+ }
1822
+
1823
+ interface CreateSystemOntologyDTO {
1824
+ templateKey: string;
1825
+ name: string;
1826
+ description: string;
1827
+ type: string;
1828
+ ontologyId: number;
1829
+ parent: string;
1830
+ icon: string;
1831
+ properties: Property[];
1832
+ version: any;
1833
+ creatable: boolean;
1834
+ editable: boolean;
1835
+ }
1836
+
1837
+ interface UpdateSystemOntologyDTO extends CreateSystemOntologyDTO {
1838
+ id: number;
1839
+ }
1840
+
1769
1841
  type TemplateType =
1770
1842
  | ONTOLOGY.Object
1771
1843
  | ONTOLOGY.Event
1772
1844
  | ONTOLOGY.Agent
1773
- | ONTOLOGY.File;
1845
+ | ONTOLOGY.File
1846
+ | ONTOLOGY.System;
1774
1847
  }
1775
1848
 
1776
1849
  declare namespace POLICY {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hybridcore/ui",
3
3
  "description": "Hybrid Core UI Library",
4
- "version": "1.5.62",
4
+ "version": "1.5.64",
5
5
  "author": "Hybrid Core",
6
6
  "license": "ISC",
7
7
  "type": "module",