@gisce/ooui 2.32.0 → 2.32.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gisce/ooui",
3
- "version": "2.32.0",
3
+ "version": "2.32.1",
4
4
  "engines": {
5
5
  "node": "20.5.0"
6
6
  },
package/src/Many2one.ts CHANGED
@@ -28,16 +28,16 @@ class Many2one extends Field {
28
28
  this._relation = value;
29
29
  }
30
30
 
31
- get showFolder(): boolean {
32
- return this.parsedWidgetProps.showFolder ?? true;
31
+ get showFolder(): boolean | undefined {
32
+ return this.parsedWidgetProps.showFolder;
33
33
  }
34
34
 
35
- get showSearch(): boolean {
36
- return this.parsedWidgetProps.showSearch ?? true;
35
+ get showSearch(): boolean | undefined {
36
+ return this.parsedWidgetProps.showSearch;
37
37
  }
38
38
 
39
- get showMenu(): boolean {
40
- return this.parsedWidgetProps.showMenu ?? true;
39
+ get showMenu(): boolean | undefined {
40
+ return this.parsedWidgetProps.showMenu;
41
41
  }
42
42
 
43
43
  constructor(props: any) {
@@ -35,14 +35,14 @@ describe("A Many2one", () => {
35
35
  expect(widget.relation).toBe("res.country");
36
36
  });
37
37
  describe("Hiding buttons", () => {
38
- it("should default showFolder to true", () => {
38
+ it("should default showFolder to undefined", () => {
39
39
  const widgetFactory = new WidgetFactory();
40
40
  const props = {
41
41
  name: "many2one1",
42
42
  relation: "res.country",
43
43
  };
44
44
  const widget = widgetFactory.createWidget("many2one", props);
45
- expect(widget.showFolder).toBe(true);
45
+ expect(widget.showFolder).toBeUndefined();
46
46
  });
47
47
  it("should have a property to hide the folder through widget props", () => {
48
48
  const widgetFactory = new WidgetFactory();
@@ -54,14 +54,14 @@ describe("A Many2one", () => {
54
54
  const widget = widgetFactory.createWidget("many2one", props);
55
55
  expect(widget.showFolder).toBe(false);
56
56
  });
57
- it("should default showSearch to true", () => {
57
+ it("should default showSearch to undefined", () => {
58
58
  const widgetFactory = new WidgetFactory();
59
59
  const props = {
60
60
  name: "many2one1",
61
61
  relation: "res.country",
62
62
  };
63
63
  const widget = widgetFactory.createWidget("many2one", props);
64
- expect(widget.showSearch).toBe(true);
64
+ expect(widget.showSearch).toBeUndefined();
65
65
  });
66
66
  it("should have a property to hide the search button through widget props", () => {
67
67
  const widgetFactory = new WidgetFactory();
@@ -73,14 +73,14 @@ describe("A Many2one", () => {
73
73
  const widget = widgetFactory.createWidget("many2one", props);
74
74
  expect(widget.showSearch).toBe(false);
75
75
  });
76
- it("should default showMenu to true", () => {
76
+ it("should default showMenu to undefined", () => {
77
77
  const widgetFactory = new WidgetFactory();
78
78
  const props = {
79
79
  name: "many2one1",
80
80
  relation: "res.country",
81
81
  };
82
82
  const widget = widgetFactory.createWidget("many2one", props);
83
- expect(widget.showMenu).toBe(true);
83
+ expect(widget.showMenu).toBeUndefined();
84
84
  });
85
85
  it("should have a property to hide the menu through widget props", () => {
86
86
  const widgetFactory = new WidgetFactory();