@gisce/ooui 0.1.0

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 (191) hide show
  1. package/README.md +10 -0
  2. package/dist/Binary.d.ts +14 -0
  3. package/dist/Binary.js +46 -0
  4. package/dist/Binary.js.map +1 -0
  5. package/dist/Boolean.d.ts +8 -0
  6. package/dist/Boolean.js +26 -0
  7. package/dist/Boolean.js.map +1 -0
  8. package/dist/Button.d.ts +29 -0
  9. package/dist/Button.js +108 -0
  10. package/dist/Button.js.map +1 -0
  11. package/dist/Char.d.ts +26 -0
  12. package/dist/Char.js +89 -0
  13. package/dist/Char.js.map +1 -0
  14. package/dist/Container.d.ts +44 -0
  15. package/dist/Container.js +148 -0
  16. package/dist/Container.js.map +1 -0
  17. package/dist/ContainerWidget.d.ts +42 -0
  18. package/dist/ContainerWidget.js +125 -0
  19. package/dist/ContainerWidget.js.map +1 -0
  20. package/dist/Date.d.ts +8 -0
  21. package/dist/Date.js +26 -0
  22. package/dist/Date.js.map +1 -0
  23. package/dist/DateTime.d.ts +8 -0
  24. package/dist/DateTime.js +26 -0
  25. package/dist/DateTime.js.map +1 -0
  26. package/dist/FiberGrid.d.ts +5 -0
  27. package/dist/FiberGrid.js +23 -0
  28. package/dist/FiberGrid.js.map +1 -0
  29. package/dist/Field.d.ts +59 -0
  30. package/dist/Field.js +162 -0
  31. package/dist/Field.js.map +1 -0
  32. package/dist/Float.d.ts +24 -0
  33. package/dist/Float.js +64 -0
  34. package/dist/Float.js.map +1 -0
  35. package/dist/FloatTime.d.ts +7 -0
  36. package/dist/FloatTime.js +26 -0
  37. package/dist/FloatTime.js.map +1 -0
  38. package/dist/Form.d.ts +53 -0
  39. package/dist/Form.js +199 -0
  40. package/dist/Form.js.map +1 -0
  41. package/dist/Group.d.ts +5 -0
  42. package/dist/Group.js +23 -0
  43. package/dist/Group.js.map +1 -0
  44. package/dist/Image.d.ts +7 -0
  45. package/dist/Image.js +26 -0
  46. package/dist/Image.js.map +1 -0
  47. package/dist/Integer.d.ts +8 -0
  48. package/dist/Integer.js +26 -0
  49. package/dist/Integer.js.map +1 -0
  50. package/dist/Label.d.ts +23 -0
  51. package/dist/Label.js +80 -0
  52. package/dist/Label.js.map +1 -0
  53. package/dist/Many2many.d.ts +26 -0
  54. package/dist/Many2many.js +80 -0
  55. package/dist/Many2many.js.map +1 -0
  56. package/dist/Many2one.d.ts +20 -0
  57. package/dist/Many2one.js +63 -0
  58. package/dist/Many2one.js.map +1 -0
  59. package/dist/NewLine.d.ts +5 -0
  60. package/dist/NewLine.js +26 -0
  61. package/dist/NewLine.js.map +1 -0
  62. package/dist/Notebook.d.ts +8 -0
  63. package/dist/Notebook.js +41 -0
  64. package/dist/Notebook.js.map +1 -0
  65. package/dist/One2many.d.ts +44 -0
  66. package/dist/One2many.js +130 -0
  67. package/dist/One2many.js.map +1 -0
  68. package/dist/Page.d.ts +5 -0
  69. package/dist/Page.js +23 -0
  70. package/dist/Page.js.map +1 -0
  71. package/dist/ProgressBar.d.ts +7 -0
  72. package/dist/ProgressBar.js +26 -0
  73. package/dist/ProgressBar.js.map +1 -0
  74. package/dist/Reference.d.ts +7 -0
  75. package/dist/Reference.js +26 -0
  76. package/dist/Reference.js.map +1 -0
  77. package/dist/SearchFilter.d.ts +28 -0
  78. package/dist/SearchFilter.js +81 -0
  79. package/dist/SearchFilter.js.map +1 -0
  80. package/dist/Selection.d.ts +20 -0
  81. package/dist/Selection.js +63 -0
  82. package/dist/Selection.js.map +1 -0
  83. package/dist/Separator.d.ts +12 -0
  84. package/dist/Separator.js +46 -0
  85. package/dist/Separator.js.map +1 -0
  86. package/dist/Text.d.ts +29 -0
  87. package/dist/Text.js +96 -0
  88. package/dist/Text.js.map +1 -0
  89. package/dist/Timeline.d.ts +17 -0
  90. package/dist/Timeline.js +56 -0
  91. package/dist/Timeline.js.map +1 -0
  92. package/dist/Tree.d.ts +31 -0
  93. package/dist/Tree.js +96 -0
  94. package/dist/Tree.js.map +1 -0
  95. package/dist/Widget.d.ts +47 -0
  96. package/dist/Widget.js +116 -0
  97. package/dist/Widget.js.map +1 -0
  98. package/dist/WidgetFactory.d.ts +9 -0
  99. package/dist/WidgetFactory.js +157 -0
  100. package/dist/WidgetFactory.js.map +1 -0
  101. package/dist/helpers/attributeParser.d.ts +6 -0
  102. package/dist/helpers/attributeParser.js +83 -0
  103. package/dist/helpers/attributeParser.js.map +1 -0
  104. package/dist/helpers/contextParser.d.ts +5 -0
  105. package/dist/helpers/contextParser.js +52 -0
  106. package/dist/helpers/contextParser.js.map +1 -0
  107. package/dist/helpers/domainParser.d.ts +5 -0
  108. package/dist/helpers/domainParser.js +26 -0
  109. package/dist/helpers/domainParser.js.map +1 -0
  110. package/dist/helpers/fieldParser.d.ts +5 -0
  111. package/dist/helpers/fieldParser.js +20 -0
  112. package/dist/helpers/fieldParser.js.map +1 -0
  113. package/dist/helpers/nodeParser.d.ts +7 -0
  114. package/dist/helpers/nodeParser.js +50 -0
  115. package/dist/helpers/nodeParser.js.map +1 -0
  116. package/dist/helpers/onChangeParser.d.ts +5 -0
  117. package/dist/helpers/onChangeParser.js +16 -0
  118. package/dist/helpers/onChangeParser.js.map +1 -0
  119. package/dist/helpers/stateParser.d.ts +14 -0
  120. package/dist/helpers/stateParser.js +46 -0
  121. package/dist/helpers/stateParser.js.map +1 -0
  122. package/dist/index.d.ts +33 -0
  123. package/dist/index.js +34 -0
  124. package/dist/index.js.map +1 -0
  125. package/package.json +49 -0
  126. package/src/Binary.ts +29 -0
  127. package/src/Boolean.ts +12 -0
  128. package/src/Button.ts +78 -0
  129. package/src/Char.ts +65 -0
  130. package/src/Container.ts +171 -0
  131. package/src/ContainerWidget.ts +105 -0
  132. package/src/Date.ts +12 -0
  133. package/src/DateTime.ts +12 -0
  134. package/src/FiberGrid.ts +9 -0
  135. package/src/Field.ts +147 -0
  136. package/src/Float.ts +45 -0
  137. package/src/FloatTime.ts +8 -0
  138. package/src/Form.ts +212 -0
  139. package/src/Group.ts +9 -0
  140. package/src/Image.ts +8 -0
  141. package/src/Integer.ts +13 -0
  142. package/src/Label.ts +46 -0
  143. package/src/Many2many.ts +59 -0
  144. package/src/Many2one.ts +44 -0
  145. package/src/NewLine.ts +9 -0
  146. package/src/Notebook.ts +24 -0
  147. package/src/One2many.ts +106 -0
  148. package/src/Page.ts +9 -0
  149. package/src/ProgressBar.ts +8 -0
  150. package/src/Reference.ts +10 -0
  151. package/src/SearchFilter.ts +81 -0
  152. package/src/Selection.ts +44 -0
  153. package/src/Separator.ts +30 -0
  154. package/src/Text.ts +76 -0
  155. package/src/Timeline.ts +44 -0
  156. package/src/Tree.ts +93 -0
  157. package/src/Widget.ts +121 -0
  158. package/src/WidgetFactory.ts +158 -0
  159. package/src/helpers/attributeParser.ts +108 -0
  160. package/src/helpers/contextParser.ts +66 -0
  161. package/src/helpers/domainParser.ts +39 -0
  162. package/src/helpers/fieldParser.ts +27 -0
  163. package/src/helpers/nodeParser.ts +57 -0
  164. package/src/helpers/onChangeParser.ts +18 -0
  165. package/src/helpers/stateParser.ts +62 -0
  166. package/src/index.ts +67 -0
  167. package/src/spec/Boolean.spec.ts +36 -0
  168. package/src/spec/Button.spec.ts +58 -0
  169. package/src/spec/Char.spec.ts +80 -0
  170. package/src/spec/Container.spec.ts +47 -0
  171. package/src/spec/ContainerWidget.spec.ts +35 -0
  172. package/src/spec/Date.spec.ts +36 -0
  173. package/src/spec/DateTime.spec.ts +36 -0
  174. package/src/spec/Float.spec.ts +29 -0
  175. package/src/spec/Form.spec.ts +976 -0
  176. package/src/spec/Group.spec.ts +32 -0
  177. package/src/spec/Label.spec.ts +46 -0
  178. package/src/spec/Many2many.spec.ts +36 -0
  179. package/src/spec/Many2one.spec.ts +36 -0
  180. package/src/spec/One2many.spec.ts +354 -0
  181. package/src/spec/SearchFilter.spec.ts +955 -0
  182. package/src/spec/Selection.spec.ts +52 -0
  183. package/src/spec/Separator.spec.ts +14 -0
  184. package/src/spec/Tree.spec.ts +214 -0
  185. package/src/spec/Widget.spec.ts +45 -0
  186. package/src/spec/WidgetFactory.spec.ts +40 -0
  187. package/src/spec/attributeParser.spec.ts +173 -0
  188. package/src/spec/contextParser.spec.ts +57 -0
  189. package/src/spec/domainParser.spec.ts +40 -0
  190. package/src/spec/fixtures/WidgetImpl.ts +10 -0
  191. package/src/spec/stateParser.spec.ts +161 -0
@@ -0,0 +1,8 @@
1
+ import ContainerWidget from "./ContainerWidget";
2
+ declare class Notebook extends ContainerWidget {
3
+ static _defaultColspan: number;
4
+ static get defaultColspan(): number;
5
+ static set defaultColspan(value: number);
6
+ constructor(props: any);
7
+ }
8
+ export default Notebook;
@@ -0,0 +1,41 @@
1
+ var __extends = (this && this.__extends) || (function () {
2
+ var extendStatics = function (d, b) {
3
+ extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
+ return extendStatics(d, b);
7
+ };
8
+ return function (d, b) {
9
+ extendStatics(d, b);
10
+ function __() { this.constructor = d; }
11
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12
+ };
13
+ })();
14
+ import ContainerWidget from "./ContainerWidget";
15
+ var Notebook = /** @class */ (function (_super) {
16
+ __extends(Notebook, _super);
17
+ function Notebook(props) {
18
+ var _this = _super.call(this, props) || this;
19
+ _this.colspan = Notebook._defaultColspan;
20
+ if (props) {
21
+ if (props.colspan) {
22
+ _this.colspan = props.colspan;
23
+ }
24
+ }
25
+ return _this;
26
+ }
27
+ Object.defineProperty(Notebook, "defaultColspan", {
28
+ get: function () {
29
+ return Notebook._defaultColspan;
30
+ },
31
+ set: function (value) {
32
+ Notebook._defaultColspan = value;
33
+ },
34
+ enumerable: false,
35
+ configurable: true
36
+ });
37
+ Notebook._defaultColspan = 3;
38
+ return Notebook;
39
+ }(ContainerWidget));
40
+ export default Notebook;
41
+ //# sourceMappingURL=Notebook.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Notebook.js","sourceRoot":"","sources":["../src/Notebook.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAEhD;IAAuB,4BAAe;IASpC,kBAAY,KAAU;QAAtB,YACE,kBAAM,KAAK,CAAC,SAQb;QAPC,KAAI,CAAC,OAAO,GAAG,QAAQ,CAAC,eAAe,CAAC;QAExC,IAAI,KAAK,EAAE;YACT,IAAI,KAAK,CAAC,OAAO,EAAE;gBACjB,KAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;aAC9B;SACF;;IACH,CAAC;IAhBD,sBAAW,0BAAc;aAAzB;YACE,OAAO,QAAQ,CAAC,eAAe,CAAC;QAClC,CAAC;aACD,UAA0B,KAAa;YACrC,QAAQ,CAAC,eAAe,GAAG,KAAK,CAAC;QACnC,CAAC;;;OAHA;IAHM,wBAAe,GAAW,CAAC,CAAC;IAkBrC,eAAC;CAAA,AAnBD,CAAuB,eAAe,GAmBrC;AAED,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,44 @@
1
+ import Field from "./Field";
2
+ /**
3
+ * A One2Many relationship field
4
+ */
5
+ declare class One2many extends Field {
6
+ /**
7
+ * Field size
8
+ */
9
+ _size: number;
10
+ get size(): number;
11
+ set size(value: number);
12
+ /**
13
+ * Relation
14
+ */
15
+ _relation: string;
16
+ get relation(): string;
17
+ set relation(value: string);
18
+ /**
19
+ * Inv_field
20
+ */
21
+ _inv_field: string | undefined;
22
+ get inv_field(): string | undefined;
23
+ set inv_field(value: string | undefined);
24
+ /**
25
+ * Views
26
+ */
27
+ _views: any;
28
+ get views(): any;
29
+ set views(value: any);
30
+ /**
31
+ * Mode
32
+ */
33
+ _mode: Array<string>;
34
+ get mode(): Array<string>;
35
+ set mode(value: Array<string>);
36
+ /**
37
+ * Must expand widget
38
+ */
39
+ _mustExpand: boolean;
40
+ get mustExpand(): boolean;
41
+ set mustExpand(value: boolean);
42
+ constructor(props: any);
43
+ }
44
+ export default One2many;
@@ -0,0 +1,130 @@
1
+ var __extends = (this && this.__extends) || (function () {
2
+ var extendStatics = function (d, b) {
3
+ extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
+ return extendStatics(d, b);
7
+ };
8
+ return function (d, b) {
9
+ extendStatics(d, b);
10
+ function __() { this.constructor = d; }
11
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12
+ };
13
+ })();
14
+ import Field from "./Field";
15
+ /**
16
+ * A One2Many relationship field
17
+ */
18
+ var One2many = /** @class */ (function (_super) {
19
+ __extends(One2many, _super);
20
+ function One2many(props) {
21
+ var _this = _super.call(this, props) || this;
22
+ /**
23
+ * Field size
24
+ */
25
+ _this._size = 150;
26
+ /**
27
+ * Relation
28
+ */
29
+ _this._relation = "";
30
+ /**
31
+ * Views
32
+ */
33
+ _this._views = null;
34
+ /**
35
+ * Mode
36
+ */
37
+ _this._mode = [];
38
+ /**
39
+ * Must expand widget
40
+ */
41
+ _this._mustExpand = false;
42
+ if (props) {
43
+ if (props.size) {
44
+ _this._size = props.size;
45
+ }
46
+ if (props.relation) {
47
+ _this._relation = props.relation;
48
+ }
49
+ if (props.mode) {
50
+ _this._mode = props.mode.split(",");
51
+ }
52
+ if (props.views) {
53
+ _this._views = props.views;
54
+ }
55
+ if (props.colspan) {
56
+ _this.colspan = props.colspan;
57
+ }
58
+ else {
59
+ _this._mustExpand = true;
60
+ }
61
+ if (props.inv_field) {
62
+ _this._inv_field = props.inv_field;
63
+ }
64
+ }
65
+ return _this;
66
+ }
67
+ Object.defineProperty(One2many.prototype, "size", {
68
+ get: function () {
69
+ return this._size;
70
+ },
71
+ set: function (value) {
72
+ this._size = value;
73
+ },
74
+ enumerable: false,
75
+ configurable: true
76
+ });
77
+ Object.defineProperty(One2many.prototype, "relation", {
78
+ get: function () {
79
+ return this._relation;
80
+ },
81
+ set: function (value) {
82
+ this._relation = value;
83
+ },
84
+ enumerable: false,
85
+ configurable: true
86
+ });
87
+ Object.defineProperty(One2many.prototype, "inv_field", {
88
+ get: function () {
89
+ return this._inv_field;
90
+ },
91
+ set: function (value) {
92
+ this._inv_field = value;
93
+ },
94
+ enumerable: false,
95
+ configurable: true
96
+ });
97
+ Object.defineProperty(One2many.prototype, "views", {
98
+ get: function () {
99
+ return this._views;
100
+ },
101
+ set: function (value) {
102
+ this._views = value;
103
+ },
104
+ enumerable: false,
105
+ configurable: true
106
+ });
107
+ Object.defineProperty(One2many.prototype, "mode", {
108
+ get: function () {
109
+ return this._mode;
110
+ },
111
+ set: function (value) {
112
+ this._mode = value;
113
+ },
114
+ enumerable: false,
115
+ configurable: true
116
+ });
117
+ Object.defineProperty(One2many.prototype, "mustExpand", {
118
+ get: function () {
119
+ return this._mustExpand;
120
+ },
121
+ set: function (value) {
122
+ this._mustExpand = value;
123
+ },
124
+ enumerable: false,
125
+ configurable: true
126
+ });
127
+ return One2many;
128
+ }(Field));
129
+ export default One2many;
130
+ //# sourceMappingURL=One2many.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"One2many.js","sourceRoot":"","sources":["../src/One2many.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,SAAS,CAAC;AAE5B;;GAEG;AACH;IAAuB,4BAAK;IAmE1B,kBAAY,KAAU;QAAtB,YACE,kBAAM,KAAK,CAAC,SA6Bb;QAhGD;;WAEG;QACH,WAAK,GAAW,GAAG,CAAC;QAQpB;;WAEG;QACH,eAAS,GAAW,EAAE,CAAC;QAmBvB;;WAEG;QACH,YAAM,GAAQ,IAAI,CAAC;QAQnB;;WAEG;QACH,WAAK,GAAkB,EAAE,CAAC;QAQ1B;;WAEG;QACH,iBAAW,GAAY,KAAK,CAAC;QAW3B,I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aACD,UAAU,KAAU;YAClB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACtB,CAAC;;;OAHA;IASD,sBAAI,0BAAI;aAAR;YACE,OAAO,IAAI,CAAC,KAAK,CAAC;QACpB,CAAC;aACD,UAAS,KAAoB;YAC3B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACrB,CAAC;;;OAHA;IASD,sBAAI,gCAAU;aAAd;YACE,OAAO,IAAI,CAAC,WAAW,CAAC;QAC1B,CAAC;aACD,UAAe,KAAc;YAC3B,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;QAC3B,CAAC;;;OAHA;IAoCH,eAAC;AAAD,CAAC,AAlGD,CAAuB,KAAK,GAkG3B;AAED,eAAe,QAAQ,CAAC"}
package/dist/Page.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ import ContainerWidget from "./ContainerWidget";
2
+ declare class Page extends ContainerWidget {
3
+ constructor(props: any);
4
+ }
5
+ export default Page;
package/dist/Page.js ADDED
@@ -0,0 +1,23 @@
1
+ var __extends = (this && this.__extends) || (function () {
2
+ var extendStatics = function (d, b) {
3
+ extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
+ return extendStatics(d, b);
7
+ };
8
+ return function (d, b) {
9
+ extendStatics(d, b);
10
+ function __() { this.constructor = d; }
11
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12
+ };
13
+ })();
14
+ import ContainerWidget from "./ContainerWidget";
15
+ var Page = /** @class */ (function (_super) {
16
+ __extends(Page, _super);
17
+ function Page(props) {
18
+ return _super.call(this, props) || this;
19
+ }
20
+ return Page;
21
+ }(ContainerWidget));
22
+ export default Page;
23
+ //# sourceMappingURL=Page.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Page.js","sourceRoot":"","sources":["../src/Page.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAEhD;IAAmB,wBAAe;IAChC,cAAY,KAAU;eACpB,kBAAM,KAAK,CAAC;IACd,CAAC;IACH,WAAC;AAAD,CAAC,AAJD,CAAmB,eAAe,GAIjC;AAED,eAAe,IAAI,CAAC"}
@@ -0,0 +1,7 @@
1
+ import Float from "./Float";
2
+ /**
3
+ * ProgressBar input
4
+ */
5
+ declare class ProgressBar extends Float {
6
+ }
7
+ export default ProgressBar;
@@ -0,0 +1,26 @@
1
+ var __extends = (this && this.__extends) || (function () {
2
+ var extendStatics = function (d, b) {
3
+ extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
+ return extendStatics(d, b);
7
+ };
8
+ return function (d, b) {
9
+ extendStatics(d, b);
10
+ function __() { this.constructor = d; }
11
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12
+ };
13
+ })();
14
+ import Float from "./Float";
15
+ /**
16
+ * ProgressBar input
17
+ */
18
+ var ProgressBar = /** @class */ (function (_super) {
19
+ __extends(ProgressBar, _super);
20
+ function ProgressBar() {
21
+ return _super !== null && _super.apply(this, arguments) || this;
22
+ }
23
+ return ProgressBar;
24
+ }(Float));
25
+ export default ProgressBar;
26
+ //# sourceMappingURL=ProgressBar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProgressBar.js","sourceRoot":"","sources":["../src/ProgressBar.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,SAAS,CAAC;AAE5B;;GAEG;AACH;IAA0B,+BAAK;IAA/B;;IAAiC,CAAC;IAAD,kBAAC;AAAD,CAAC,AAAlC,CAA0B,KAAK,GAAG;AAElC,eAAe,WAAW,CAAC"}
@@ -0,0 +1,7 @@
1
+ import Selection from "./Selection";
2
+ /**
3
+ * Reference field for key-value Many2One behaviour
4
+ */
5
+ declare class Reference extends Selection {
6
+ }
7
+ export default Reference;
@@ -0,0 +1,26 @@
1
+ var __extends = (this && this.__extends) || (function () {
2
+ var extendStatics = function (d, b) {
3
+ extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
+ return extendStatics(d, b);
7
+ };
8
+ return function (d, b) {
9
+ extendStatics(d, b);
10
+ function __() { this.constructor = d; }
11
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12
+ };
13
+ })();
14
+ import Selection from "./Selection";
15
+ /**
16
+ * Reference field for key-value Many2One behaviour
17
+ */
18
+ var Reference = /** @class */ (function (_super) {
19
+ __extends(Reference, _super);
20
+ function Reference() {
21
+ return _super !== null && _super.apply(this, arguments) || this;
22
+ }
23
+ return Reference;
24
+ }(Selection));
25
+ export default Reference;
26
+ //# sourceMappingURL=Reference.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Reference.js","sourceRoot":"","sources":["../src/Reference.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,OAAO,SAAS,MAAM,aAAa,CAAC;AAEpC;;GAEG;AACH;IAAwB,6BAAS;IAAjC;;IAEA,CAAC;IAAD,gBAAC;AAAD,CAAC,AAFD,CAAwB,SAAS,GAEhC;AAED,eAAe,SAAS,CAAC"}
@@ -0,0 +1,28 @@
1
+ import WidgetFactory from "./WidgetFactory";
2
+ import Container from "./Container";
3
+ import Widget from "./Widget";
4
+ declare class SearchFilter {
5
+ /**
6
+ * Object containing the specific fields for primary and secondary search fields
7
+ */
8
+ _searchFields: any;
9
+ get searchFields(): any;
10
+ /**
11
+ * Object containing all the fields specification of the whole form
12
+ */
13
+ _fields: any;
14
+ get fields(): any;
15
+ _simpleSearchContainer: Container;
16
+ get simpleSearchContainer(): Container;
17
+ _advancedSearchContainer: Container;
18
+ get advancedSearchContainer(): Container;
19
+ constructor(searchFields: Object, fields: Object, columns?: number);
20
+ parse(): void;
21
+ parseFields(searchFields: string[], widgetFactory: WidgetFactory): any[];
22
+ /**
23
+ * Calls container's findById method to find the widgets matching with param id
24
+ * @param {string} id id to find
25
+ */
26
+ findById(id: string): Widget | null;
27
+ }
28
+ export default SearchFilter;
@@ -0,0 +1,81 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import WidgetFactory from "./WidgetFactory";
13
+ import Container from "./Container";
14
+ var SearchFilter = /** @class */ (function () {
15
+ function SearchFilter(searchFields, fields, columns) {
16
+ if (columns === void 0) { columns = 8; }
17
+ this._searchFields = searchFields;
18
+ this._fields = fields;
19
+ this._simpleSearchContainer = new Container(columns);
20
+ this._advancedSearchContainer = new Container(columns);
21
+ }
22
+ Object.defineProperty(SearchFilter.prototype, "searchFields", {
23
+ get: function () {
24
+ return this._searchFields;
25
+ },
26
+ enumerable: false,
27
+ configurable: true
28
+ });
29
+ Object.defineProperty(SearchFilter.prototype, "fields", {
30
+ get: function () {
31
+ return this._fields;
32
+ },
33
+ enumerable: false,
34
+ configurable: true
35
+ });
36
+ Object.defineProperty(SearchFilter.prototype, "simpleSearchContainer", {
37
+ get: function () {
38
+ return this._simpleSearchContainer;
39
+ },
40
+ enumerable: false,
41
+ configurable: true
42
+ });
43
+ Object.defineProperty(SearchFilter.prototype, "advancedSearchContainer", {
44
+ get: function () {
45
+ return this._advancedSearchContainer;
46
+ },
47
+ enumerable: false,
48
+ configurable: true
49
+ });
50
+ SearchFilter.prototype.parse = function () {
51
+ var _this = this;
52
+ var widgetFactory = new WidgetFactory();
53
+ var simpleSearchWidgets = this.parseFields(this.searchFields.primary, widgetFactory);
54
+ simpleSearchWidgets.forEach(function (widget) {
55
+ _this.simpleSearchContainer.addWidget(widget, { addLabel: false });
56
+ _this.advancedSearchContainer.addWidget(widget, { addLabel: false });
57
+ });
58
+ var advancedSearchWidgets = this.parseFields(this.searchFields.secondary, widgetFactory);
59
+ advancedSearchWidgets.forEach(function (widget) {
60
+ _this.advancedSearchContainer.addWidget(widget, { addLabel: false });
61
+ });
62
+ };
63
+ SearchFilter.prototype.parseFields = function (searchFields, widgetFactory) {
64
+ var _this = this;
65
+ return searchFields.map(function (searchField) {
66
+ var fieldAttributes = __assign(__assign({}, _this.fields[searchField]), { name: searchField, colspan: 2 });
67
+ var type = fieldAttributes.type;
68
+ return widgetFactory.createWidget(type, fieldAttributes);
69
+ });
70
+ };
71
+ /**
72
+ * Calls container's findById method to find the widgets matching with param id
73
+ * @param {string} id id to find
74
+ */
75
+ SearchFilter.prototype.findById = function (id) {
76
+ return this.advancedSearchContainer.findById(id);
77
+ };
78
+ return SearchFilter;
79
+ }());
80
+ export default SearchFilter;
81
+ //# sourceMappingURL=SearchFilter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchFilter.js","sourceRoot":"","sources":["../src/SearchFilter.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,SAAS,MAAM,aAAa,CAAC;AAGpC;IA2BE,sBAAY,YAAoB,EAAE,MAAc,EAAE,OAAmB;QAAnB,wBAAA,EAAA,WAAmB;QACnE,IAAI,CAAC,aAAa,GAAG,YAAY,CAAC;QAClC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,sBAAsB,GAAG,IAAI,SAAS,CAAC,OAAO,CAAC,CAAC;QACrD,IAAI,CAAC,wBAAwB,GAAG,IAAI,SAAS,CAAC,OAAO,CAAC,CAAC;IACzD,CAAC;IA3BD,sBA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AC,KAC3B,IAAI,EAAE,WAAW,EACjB,OAAO,EAAE,CAAC,GACX,CAAC;YACM,IAAA,IAAI,GAAK,eAAe,KAApB,CAAqB;YACjC,OAAO,aAAa,CAAC,YAAY,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;QAC3D,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,+BAAQ,GAAR,UAAS,EAAU;QACjB,OAAO,IAAI,CAAC,uBAAuB,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IACnD,CAAC;IACH,mBAAC;AAAD,CAAC,AA1ED,IA0EC;AAED,eAAe,YAAY,CAAC"}
@@ -0,0 +1,20 @@
1
+ import Field from "./Field";
2
+ /**
3
+ * Selection field for key-value lists
4
+ */
5
+ declare class Selection extends Field {
6
+ /**
7
+ * Field size
8
+ */
9
+ _size: number;
10
+ get size(): number;
11
+ set size(value: number);
12
+ /**
13
+ * Values and keys
14
+ */
15
+ _selectionValues: Map<string, string>;
16
+ get selectionValues(): Map<string, string>;
17
+ set selectionValues(value: Map<string, string>);
18
+ constructor(props: any);
19
+ }
20
+ export default Selection;
@@ -0,0 +1,63 @@
1
+ var __extends = (this && this.__extends) || (function () {
2
+ var extendStatics = function (d, b) {
3
+ extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
+ return extendStatics(d, b);
7
+ };
8
+ return function (d, b) {
9
+ extendStatics(d, b);
10
+ function __() { this.constructor = d; }
11
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12
+ };
13
+ })();
14
+ import Field from "./Field";
15
+ /**
16
+ * Selection field for key-value lists
17
+ */
18
+ var Selection = /** @class */ (function (_super) {
19
+ __extends(Selection, _super);
20
+ function Selection(props) {
21
+ var _this = _super.call(this, props) || this;
22
+ /**
23
+ * Field size
24
+ */
25
+ _this._size = 150;
26
+ /**
27
+ * Values and keys
28
+ */
29
+ _this._selectionValues = new Map([]);
30
+ if (props) {
31
+ if (props.size) {
32
+ _this._size = props.size;
33
+ }
34
+ if (props.selection) {
35
+ _this._selectionValues = new Map(props.selection);
36
+ }
37
+ }
38
+ return _this;
39
+ }
40
+ Object.defineProperty(Selection.prototype, "size", {
41
+ get: function () {
42
+ return this._size;
43
+ },
44
+ set: function (value) {
45
+ this._size = value;
46
+ },
47
+ enumerable: false,
48
+ configurable: true
49
+ });
50
+ Object.defineProperty(Selection.prototype, "selectionValues", {
51
+ get: function () {
52
+ return this._selectionValues;
53
+ },
54
+ set: function (value) {
55
+ this._selectionValues = value;
56
+ },
57
+ enumerable: false,
58
+ configurable: true
59
+ });
60
+ return Selection;
61
+ }(Field));
62
+ export default Selection;
63
+ //# sourceMappingURL=Selection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Selection.js","sourceRoot":"","sources":["../src/Selection.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,SAAS,CAAC;AAE5B;;GAEG;AACH;IAAwB,6BAAK;IAuB3B,mBAAY,KAAU;QAAtB,YACE,kBAAM,KAAK,CAAC,SAWb;QAlCD;;WAEG;QACH,WAAK,GAAW,GAAG,CAAC;QAQpB;;WAEG;QACH,sBAAgB,GAAwB,IAAI,GAAG,CAAC,EAAE,CAAC,CAAC;QAWlD,IAAI,KAAK,EAAE;YACT,IAAI,KAAK,CAAC,IAAI,EAAE;gBACd,KAAI,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC;aACzB;YAED,IAAI,KAAK,CAAC,SAAS,EAAE;gBACnB,KAAI,CAAC,gBAAgB,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;aAClD;SACF;;IACH,CAAC;IA9BD,sBAAI,2BAAI;aAAR;YACE,OAAO,IAAI,CAAC,KAAK,CAAC;QACpB,CAAC;aACD,UAAS,KAAa;YACpB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACrB,CAAC;;;OAHA;IASD,sBAAI,sCAAe;aAAnB;YACE,OAAO,IAAI,CAAC,gBAAgB,CAAC;QAC/B,CAAC;aACD,UAAoB,KAA0B;YAC5C,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC;QAChC,CAAC;;;OAHA;IAkBH,gBAAC;AAAD,CAAC,AApCD,CAAwB,KAAK,GAoC5B;AAED,eAAe,SAAS,CAAC"}
@@ -0,0 +1,12 @@
1
+ import Widget from "./Widget";
2
+ declare class Separator extends Widget {
3
+ /**
4
+ * Label
5
+ */
6
+ _label: string;
7
+ get label(): string;
8
+ set label(value: string);
9
+ constructor(props: any);
10
+ findById(id: string): null;
11
+ }
12
+ export default Separator;
@@ -0,0 +1,46 @@
1
+ var __extends = (this && this.__extends) || (function () {
2
+ var extendStatics = function (d, b) {
3
+ extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
+ return extendStatics(d, b);
7
+ };
8
+ return function (d, b) {
9
+ extendStatics(d, b);
10
+ function __() { this.constructor = d; }
11
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12
+ };
13
+ })();
14
+ import Widget from "./Widget";
15
+ var Separator = /** @class */ (function (_super) {
16
+ __extends(Separator, _super);
17
+ function Separator(props) {
18
+ var _this = _super.call(this, props) || this;
19
+ /**
20
+ * Label
21
+ */
22
+ _this._label = "";
23
+ if (props) {
24
+ if (props.string) {
25
+ _this._label = props.string;
26
+ }
27
+ }
28
+ return _this;
29
+ }
30
+ Object.defineProperty(Separator.prototype, "label", {
31
+ get: function () {
32
+ return this._label;
33
+ },
34
+ set: function (value) {
35
+ this._label = value;
36
+ },
37
+ enumerable: false,
38
+ configurable: true
39
+ });
40
+ Separator.prototype.findById = function (id) {
41
+ return null;
42
+ };
43
+ return Separator;
44
+ }(Widget));
45
+ export default Separator;
46
+ //# sourceMappingURL=Separator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Separator.js","sourceRoot":"","sources":["../src/Separator.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B;IAAwB,6BAAM;IAY5B,mBAAY,KAAU;QAAtB,YACE,kBAAM,KAAK,CAAC,SAOb;QAnBD;;WAEG;QACH,YAAM,GAAW,EAAE,CAAC;QAWlB,IAAI,KAAK,EAAE;YACT,IAAI,KAAK,CAAC,MAAM,EAAE;gBAChB,KAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;aAC5B;SACF;;IACH,CAAC;IAfD,sBAAI,4BAAK;aAAT;YACE,OAAO,IAAI,CAAC,MAAM,CAAC;QACrB,CAAC;aACD,UAAU,KAAa;YACrB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACtB,CAAC;;;OAHA;IAeD,4BAAQ,GAAR,UAAS,EAAU;QACjB,OAAO,IAAI,CAAC;IACd,CAAC;IACH,gBAAC;AAAD,CAAC,AAzBD,CAAwB,MAAM,GAyB7B;AAED,eAAe,SAAS,CAAC"}
package/dist/Text.d.ts ADDED
@@ -0,0 +1,29 @@
1
+ import Field from "./Field";
2
+ /**
3
+ * Multiline input with no length limit.
4
+ */
5
+ declare class Text extends Field {
6
+ /**
7
+ * Field place holder
8
+ */
9
+ _placeholder: string;
10
+ get placeholder(): string;
11
+ set placeholder(value: string);
12
+ /**
13
+ * Must expand widget
14
+ */
15
+ _mustExpand: boolean;
16
+ get mustExpand(): boolean;
17
+ set mustExpand(value: boolean);
18
+ /**
19
+ * Height
20
+ */
21
+ _height: number | undefined;
22
+ get height(): number | undefined;
23
+ set height(value: number | undefined);
24
+ _translatable: boolean;
25
+ get translatable(): boolean;
26
+ set translatable(value: boolean);
27
+ constructor(props: any);
28
+ }
29
+ export default Text;