@gisce/react-ooui 1.1.64 → 1.1.65

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.
@@ -1 +1 @@
1
- {"version":3,"file":"SearchField.d.ts","sourceRoot":"","sources":["SearchField.tsx"],"names":[],"mappings":";AAUA,OAAO,EAAE,KAAK,EAA8B,MAAM,aAAa,CAAC;AAGhE,aAAK,KAAK,GAAG;IACX,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AAgBF,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,eAyCvC"}
1
+ {"version":3,"file":"SearchField.d.ts","sourceRoot":"","sources":["SearchField.tsx"],"names":[],"mappings":";AAUA,OAAO,EAAE,KAAK,EAAgD,MAAM,aAAa,CAAC;AAGlF,aAAK,KAAK,GAAG;IACX,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AAEF,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,eAyCvC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gisce/react-ooui",
3
- "version": "1.1.64",
3
+ "version": "1.1.65",
4
4
  "files": [
5
5
  "dist",
6
6
  "src",
@@ -36,7 +36,7 @@
36
36
  },
37
37
  "dependencies": {
38
38
  "@ant-design/plots": "^1.0.9",
39
- "@gisce/ooui": "^0.19.4",
39
+ "@gisce/ooui": "^0.19.5",
40
40
  "@gisce/react-formiga-table": "^0.5.0",
41
41
  "@monaco-editor/react": "^4.4.5",
42
42
  "@tabler/icons-react": "^2.11.0",
@@ -8,27 +8,13 @@ import { PairFields } from "./PairFields";
8
8
 
9
9
  import { LocaleContext, LocaleContextType } from "@/context/LocaleContext";
10
10
 
11
- import { Field, Selection as SelectionOoui } from "@gisce/ooui";
11
+ import { Field, SearchFieldTypes, Selection as SelectionOoui } from "@gisce/ooui";
12
12
  import { MultiSelection } from "@/widgets/base/MultiSelection";
13
13
 
14
14
  type Props = {
15
15
  field: Field;
16
16
  };
17
17
 
18
- const types = {
19
- text: "text",
20
- many2one: "many2one",
21
- char: "char",
22
- boolean: "boolean",
23
- selection: "selection",
24
- float: "float",
25
- float_time: "float_time",
26
- progressbar: "progressbar",
27
- integer: "integer",
28
- date: "date",
29
- datetime: "datetime",
30
- };
31
-
32
18
  export function SearchField(props: Props) {
33
19
  const { field } = props;
34
20
  field.readOnly = false;
@@ -39,7 +25,7 @@ export function SearchField(props: Props) {
39
25
  const widgetType = field.type;
40
26
 
41
27
  switch (widgetType) {
42
- case types.boolean: {
28
+ case SearchFieldTypes.boolean: {
43
29
  const ooui = new SelectionOoui({
44
30
  name: field._id,
45
31
  string: field.label,
@@ -51,19 +37,19 @@ export function SearchField(props: Props) {
51
37
 
52
38
  return <Selection layout="vertical" ooui={ooui} showLabel />;
53
39
  }
54
- case types.float:
55
- case types.progressbar:
56
- case types.float_time:
57
- case types.integer: {
40
+ case SearchFieldTypes.float:
41
+ case SearchFieldTypes.progressbar:
42
+ case SearchFieldTypes.float_time:
43
+ case SearchFieldTypes.integer: {
58
44
  return <PairFields ooui={field} showLabel />;
59
45
  }
60
- case types.date: {
46
+ case SearchFieldTypes.date: {
61
47
  return <DateRangePicker ooui={field} layout="vertical" showLabel />;
62
48
  }
63
- case types.datetime: {
49
+ case SearchFieldTypes.datetime: {
64
50
  return <DateTimeRangePicker ooui={field} layout="vertical" showLabel />;
65
51
  }
66
- case types.selection: {
52
+ case SearchFieldTypes.selection: {
67
53
  return <MultiSelection layout="vertical" ooui={field} showLabel />;
68
54
  }
69
55
  default: {