@gisce/ooui 0.2.1 → 0.2.4

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/dist/Button.d.ts CHANGED
@@ -24,6 +24,12 @@ declare class Button extends Field {
24
24
  _confirmMessage: string;
25
25
  get confirmMessage(): string;
26
26
  set confirm(value: string);
27
+ _primary: boolean;
28
+ get primary(): boolean;
29
+ set primary(value: boolean);
30
+ _danger: boolean;
31
+ get danger(): boolean;
32
+ set danger(value: boolean);
27
33
  constructor(props: any);
28
34
  }
29
35
  export default Button;
package/dist/Button.js CHANGED
@@ -39,6 +39,8 @@ var Button = /** @class */ (function (_super) {
39
39
  * Confirm string for modal in button types workflow
40
40
  */
41
41
  _this._confirmMessage = "";
42
+ _this._primary = false;
43
+ _this._danger = false;
42
44
  if (props) {
43
45
  if (props.string) {
44
46
  _this._caption = props.string;
@@ -55,6 +57,18 @@ var Button = /** @class */ (function (_super) {
55
57
  if (props.icon) {
56
58
  _this._icon = props.icon;
57
59
  }
60
+ if (props.primary) {
61
+ var primary = props.primary;
62
+ if (primary === "1" || primary === 1 || primary === true) {
63
+ _this._primary = true;
64
+ }
65
+ }
66
+ if (props.danger) {
67
+ var danger = props.danger;
68
+ if (danger === "1" || danger === 1 || danger === true) {
69
+ _this._danger = true;
70
+ }
71
+ }
58
72
  }
59
73
  return _this;
60
74
  }
@@ -102,6 +116,26 @@ var Button = /** @class */ (function (_super) {
102
116
  enumerable: false,
103
117
  configurable: true
104
118
  });
119
+ Object.defineProperty(Button.prototype, "primary", {
120
+ get: function () {
121
+ return this._primary;
122
+ },
123
+ set: function (value) {
124
+ this._primary = value;
125
+ },
126
+ enumerable: false,
127
+ configurable: true
128
+ });
129
+ Object.defineProperty(Button.prototype, "danger", {
130
+ get: function () {
131
+ return this._danger;
132
+ },
133
+ set: function (value) {
134
+ this._danger = value;
135
+ },
136
+ enumerable: false,
137
+ configurable: true
138
+ });
105
139
  return Button;
106
140
  }(Field));
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CAAC,KAAK,CAAC;QACpB,CAAC;aACD,UAAS,KAAyB;YAChC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACrB,CAAC;;;OAHA;IASD,sBAAI,kCAAc;aAAlB;YACE,OAAO,IAAI,CAAC,eAAe,CAAC;QAC9B,CAAC;;;OAAA;IACD,sBAAI,2BAAO;aAAX,UAAY,KAAa;YACvB,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC;QAC/B,CAAC;;;OAAA;IAGD,sBAAI,2BAAO;aAAX;YACE,OAAO,IAAI,CAAC,QAAQ,CAAC;QACvB,CAAC;aACD,UAAY,KAAc;YACxB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACxB,CAAC;;;OAHA;IAMD,sBAAI,0BAAM;aAAV;YACE,OAAO,IAAI,CAAC,OAAO,CAAC;QACtB,CAAC;aACD,UAAW,KAAc;YACvB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACvB,CAAC;;;OAHA;IA6CH,aAAC;AAAD,CAAC,AArGD,CAAqB,KAAK,GAqGzB;AAED,eAAe,MAAM,CAAC"}
@@ -1,9 +1,9 @@
1
- import Action from "./Action";
1
+ import DashboardItem from "./DashboardItem";
2
2
  declare class Dashboard {
3
3
  _string: string | null;
4
4
  get string(): string | null;
5
- _actions: Action[];
6
- get actions(): Action[];
5
+ _items: DashboardItem[];
6
+ get items(): DashboardItem[];
7
7
  constructor(xml: string);
8
8
  }
9
9
  export default Dashboard;
package/dist/Dashboard.js CHANGED
@@ -1,18 +1,18 @@
1
- import Action from "./Action";
1
+ import DashboardItem from "./DashboardItem";
2
2
  import { parseGenericNodes } from "./helpers/nodeParser";
3
3
  var Dashboard = /** @class */ (function () {
4
4
  function Dashboard(xml) {
5
5
  var _this = this;
6
6
  this._string = null;
7
- this._actions = [];
7
+ this._items = [];
8
8
  var parser = new DOMParser();
9
9
  var view = parser.parseFromString(xml, "text/xml");
10
10
  this._string = view.documentElement.getAttribute("string");
11
11
  var documentElement = view.documentElement;
12
12
  var actionsParsed = parseGenericNodes(documentElement.childNodes);
13
13
  actionsParsed.forEach(function (nodeParsed) {
14
- if (nodeParsed.tag === "action") {
15
- _this._actions.push(new Action(nodeParsed.tagAttributes));
14
+ if (nodeParsed.tag === "dashboard_item") {
15
+ _this._items.push(new DashboardItem(nodeParsed.tagAttributes));
16
16
  }
17
17
  });
18
18
  }
@@ -23,9 +23,9 @@ var Dashboard = /** @class */ (function () {
23
23
  enumerable: false,
24
24
  configurable: true
25
25
  });
26
- Object.defineProperty(Dashboard.prototype, "actions", {
26
+ Object.defineProperty(Dashboard.prototype, "items", {
27
27
  get: function () {
28
- return this._actions;
28
+ return this._items;
29
29
  },
30
30
  enumerable: false,
31
31
  configurable: true
@@ -1 +1 @@
1
- {"version":3,"file":"Dashboard.js","sourceRoot":"","sources":["../src/Dashboard.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD;IAWE,mBAAY,GAAW;QAAvB,iBAaC;QAvBD,YAAO,GAAkB,IAAI,CAAC;QAK9B,aAAQ,GAAa,EAAE,CAAC;QAMtB,IAAM,MAAM,GAAG,IAAI,SAAS,EAAE,CAAC;QAC/B,IAAM,IAAI,GAAa,MAAM,CAAC,eAAe,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;QAC/D,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;QAC3D,IAAM,eAAe,GAAG,IAAI,CAAC,eAAe,CAAC;QAE7C,IAAM,aAAa,GAAG,iBAAiB,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;QAEpE,aAAa,CAAC,OAAO,CAAC,UAAC,UAAU;YAC/B,IAAI,UAAU,CAAC,GAAG,KAAK,QAAQ,EAAE;gBAC/B,KAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,UAAU,C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AI,4BAAK;aAAT;YACE,OAAO,IAAI,CAAC,MAAM,CAAC;QACrB,CAAC;;;OAAA;IAgBH,gBAAC;AAAD,CAAC,AAzBD,IAyBC;AAED,eAAe,SAAS,CAAC"}
@@ -0,0 +1,8 @@
1
+ declare class DashboardItem {
2
+ _action_id: string | null;
3
+ get action_id(): string | null;
4
+ _position: string | null;
5
+ get position(): string | null;
6
+ constructor(attributes: any);
7
+ }
8
+ export default DashboardItem;
@@ -0,0 +1,29 @@
1
+ var DashboardItem = /** @class */ (function () {
2
+ function DashboardItem(attributes) {
3
+ this._action_id = null;
4
+ this._position = null;
5
+ if (attributes.action_id) {
6
+ this._action_id = attributes.action_id;
7
+ }
8
+ if (attributes.position) {
9
+ this._position = attributes.position;
10
+ }
11
+ }
12
+ Object.defineProperty(DashboardItem.prototype, "action_id", {
13
+ get: function () {
14
+ return this._action_id;
15
+ },
16
+ enumerable: false,
17
+ configurable: true
18
+ });
19
+ Object.defineProperty(DashboardItem.prototype, "position", {
20
+ get: function () {
21
+ return this._position;
22
+ },
23
+ enumerable: false,
24
+ configurable: true
25
+ });
26
+ return DashboardItem;
27
+ }());
28
+ export default DashboardItem;
29
+ //# sourceMappingURL=DashboardItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DashboardItem.js","sourceRoot":"","sources":["../src/DashboardItem.ts"],"names":[],"mappings":"AAAA;IAWE,uBAAY,UAAe;QAV3B,eAAU,GAAkB,IAAI,CAAC;QAKjC,cAAS,GAAkB,IAAI,CAAC;QAM9B,IAAI,UAAU,CAAC,SAAS,EAAE;YACxB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC,SAAS,CAAC;SACxC;QAED,IAAI,UAAU,CAAC,QAAQ,EAAE;YACvB,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC,QAAQ,CAAC;SACtC;IACH,CAAC;IAjBD,sBAAI,oCAAS;aAAb;YACE,OAAO,IAAI,CAAC,UAAU,CAAC;QACzB,CAAC;;;OAAA;IAGD,sBAAI,mCAAQ;aAAZ;YACE,OAAO,IAAI,CAAC,SAAS,CAAC;QACxB,CAAC;;;OAAA;IAWH,oBAAC;AAAD,CAAC,AApBD,IAoBC;AAED,eAAe,aAAa,CAAC"}
@@ -1,9 +1,15 @@
1
- import Field from "./Field";
2
- declare class Indicator extends Field {
1
+ import Selection from "./Selection";
2
+ declare class Indicator extends Selection {
3
3
  _nolabel: boolean;
4
4
  _card: boolean;
5
5
  get card(): boolean;
6
6
  set card(value: boolean);
7
+ _icon: string;
8
+ get icon(): string;
9
+ set icon(value: string);
10
+ _suffix: string;
11
+ get suffix(): string;
12
+ set suffix(value: string);
7
13
  constructor(props: any);
8
14
  }
9
15
  export default Indicator;
package/dist/Indicator.js CHANGED
@@ -11,15 +11,19 @@ var __extends = (this && this.__extends) || (function () {
11
11
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12
12
  };
13
13
  })();
14
- import Field from "./Field";
14
+ import Selection from "./Selection";
15
15
  var Indicator = /** @class */ (function (_super) {
16
16
  __extends(Indicator, _super);
17
17
  function Indicator(props) {
18
18
  var _this = _super.call(this, props) || this;
19
19
  _this._nolabel = true;
20
20
  _this._card = false;
21
+ _this._icon = "";
22
+ _this._suffix = "";
21
23
  if (_this._parsedWidgetProps) {
22
- _this._card = _this._parsedWidgetProps.card;
24
+ _this._card = _this._parsedWidgetProps.card || false;
25
+ _this._icon = _this._parsedWidgetProps.icon || "";
26
+ _this._suffix = _this._parsedWidgetProps.suffix || "";
23
27
  }
24
28
  return _this;
25
29
  }
@@ -33,7 +37,27 @@ var Indicator = /** @class */ (function (_super) {
33
37
  enumerable: false,
34
38
  configurable: true
35
39
  });
40
+ Object.defineProperty(Indicator.prototype, "icon", {
41
+ get: function () {
42
+ return this._icon;
43
+ },
44
+ set: function (value) {
45
+ this._icon = value;
46
+ },
47
+ enumerable: false,
48
+ configurable: true
49
+ });
50
+ Object.defineProperty(Indicator.prototype, "suffix", {
51
+ get: function () {
52
+ return this._suffix;
53
+ },
54
+ set: function (value) {
55
+ this._suffix = value;
56
+ },
57
+ enumerable: false,
58
+ configurable: true
59
+ });
36
60
  return Indicator;
37
- }(Field));
61
+ }(Selection));
38
62
  export default Indicator;
39
63
  //# sourceMappingURL=Indicator.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Indicator.js","sourceRoot":"","sources":["../src/Indicator.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,SAAS,CAAC;AAE5B;IAAwB,6BAAK;IAW3B,mBAAY,KAAU;QAAtB,YACE,kBAAM,KAAK,CAAC,SAKb;QAhBD,cAAQ,GAAY,IAAI,CAAC;QAYvB,KAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,KAAI,CAAC,kBAAkB,EAAE;YAC3B,KAAI,CAAC,KAAK,GAAG,KAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC;SAC3C;;IACH,CAAC;IAbD,sBAAI,2BAAI;aAAR;YACE,OAAO,IAAI,CAAC,KAAK,CAAC;QACpB,CAAC;aACD,UAAS,KAAc;YACrB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACrB,CAAC;;;OAHA;IAYH,gBAAC;AAAD,CAAC,AAlBD,CAAwB,KAAK,GAkB5B;AAGD,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"Indicator.js","sourceRoot":"","sources":["../src/Indicator.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,OAAO,SAAS,MAAM,aAAa,CAAC;AAEpC;IAAwB,6BAAS;IAyB/B,mBAAY,KAAU;QAAtB,YACE,kBAAM,KAAK,CAAC,SASb;QAlCD,cAAQ,GAAY,IAAI,CAAC;QA0BvB,KAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,KAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,KAAI,CAAC,OAAO,GAAG,EAAE,CAAC;QAClB,IAAI,KAAI,CAAC,kBAAkB,EAAE;YAC3B,KAAI,CAAC,KAAK,GAAG,KAAI,CAAC,kBAAkB,CAAC,IAAI,IAAI,KAAK,CAAC;YACnD,KAAI,CAAC,KAAK,GAAG,KAAI,CAAC,kBAAkB,CAAC,IAAI,IAAI,EAAE,CAAC;YAChD,KAAI,CAAC,OAAO,GAAG,KAAI,CAAC,kBAAkB,CAAC,MAAM,IAAI,EAAE,CAAC;SACrD;;IACH,CAAC;IA/BD,sBAAI,2BAAI;aAAR;YACE,OAAO,IAAI,CAAC,KAAK,CAAC;QACpB,CAAC;aACD,UAAS,KAAc;YACrB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACrB,CAAC;;;OAHA;IAKD,sBAAI,2BAAI;aAAR;YACE,OAAO,IAAI,CAAC,KAAK,CAAC;QACpB,CAAC;aACD,UAAS,KAAa;YACpB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACrB,CAAC;;;OAHA;IAKD,sBAAI,6BAAM;aAAV;YACE,OAAO,IAAI,CAAC,OAAO,CAAC;QACtB,CAAC;aACD,UAAW,KAAa;YACtB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACvB,CAAC;;;OAHA;IAgBH,gBAAC;AAAD,CAAC,AApCD,CAAwB,SAAS,GAoChC;AAGD,eAAe,SAAS,CAAC"}
package/dist/index.d.ts CHANGED
@@ -32,4 +32,5 @@ import { transformDomainForChildWidget } from "./helpers/domainParser";
32
32
  import Timeline from "./Timeline";
33
33
  import Indicator from "./Indicator";
34
34
  import Dashboard from "./Dashboard";
35
- export { Char, Selection, Many2one, Field, Widget, Form, Tree, Boolean, One2many, Integer, Float, FloatTime, Date, DateTime, Many2many, SearchFilter, Container, ContainerWidget, Text, ProgressBar, Notebook, Group, Page, Label, Separator, Button, Reference, Binary, Image, parseContext, transformDomainForChildWidget, Timeline, Indicator, Dashboard, };
35
+ import DashboardItem from "./DashboardItem";
36
+ export { Char, Selection, Many2one, Field, Widget, Form, Tree, Boolean, One2many, Integer, Float, FloatTime, Date, DateTime, Many2many, SearchFilter, Container, ContainerWidget, Text, ProgressBar, Notebook, Group, Page, Label, Separator, Button, Reference, Binary, Image, parseContext, transformDomainForChildWidget, Timeline, Indicator, Dashboard, DashboardItem, };
package/dist/index.js CHANGED
@@ -32,5 +32,6 @@ import { transformDomainForChildWidget } from "./helpers/domainParser";
32
32
  import Timeline from "./Timeline";
33
33
  import Indicator from "./Indicator";
34
34
  import Dashboard from "./Dashboard";
35
- export { Char, Selection, Many2one, Field, Widget, Form, Tree, Boolean, One2many, Integer, Float, FloatTime, Date, DateTime, Many2many, SearchFilter, Container, ContainerWidget, Text, ProgressBar, Notebook, Group, Page, Label, Separator, Button, Reference, Binary, Image, parseContext, transformDomainForChildWidget, Timeline, Indicator, Dashboard, };
35
+ import DashboardItem from "./DashboardItem";
36
+ export { Char, Selection, Many2one, Field, Widget, Form, Tree, Boolean, One2many, Integer, Float, FloatTime, Date, DateTime, Many2many, SearchFilter, Container, ContainerWidget, Text, ProgressBar, Notebook, Group, Page, Label, Separator, Button, Reference, Binary, Image, parseContext, transformDomainForChildWidget, Timeline, Indicator, Dashboard, DashboardItem, };
36
37
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,KAAK,MAAM,S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AC;AACvD,OAAO,EAAE,6BAA6B,EAAE,MAAM,wBAAwB,CAAC;AACvE,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EACL,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,KAAK,EACL,MAAM,EACN,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,OAAO,EACP,KAAK,EACL,SAAS,EACT,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,SAAS,EACT,eAAe,EACf,IAAI,EACJ,WAAW,EACX,QAAQ,EACR,KAAK,EACL,IAAI,EACJ,KAAK,EACL,SAAS,EACT,MAAM,EACN,SAAS,EACT,MAAM,EACN,KAAK,EACL,YAAY,EACZ,6BAA6B,EAC7B,QAAQ,EACR,SAAS,EACT,SAAS,EACT,aAAa,GACd,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gisce/ooui",
3
- "version": "0.2.1",
3
+ "version": "0.2.4",
4
4
  "dependencies": {},
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -16,7 +16,8 @@
16
16
  "prebuild": "rimraf dist",
17
17
  "build": "tsc",
18
18
  "test": "jest",
19
- "test:watch": "jest --watch"
19
+ "test:watch": "jest --watch",
20
+ "prepublishOnly": "npm run build"
20
21
  },
21
22
  "eslintConfig": {},
22
23
  "devDependencies": {
package/src/Button.ts CHANGED
@@ -45,6 +45,22 @@ class Button extends Field {
45
45
  this._confirmMessage = value;
46
46
  }
47
47
 
48
+ _primary: boolean = false;
49
+ get primary(): boolean {
50
+ return this._primary;
51
+ }
52
+ set primary(value: boolean) {
53
+ this._primary = value;
54
+ }
55
+
56
+ _danger: boolean = false;
57
+ get danger(): boolean {
58
+ return this._danger;
59
+ }
60
+ set danger(value: boolean) {
61
+ this._danger = value;
62
+ }
63
+
48
64
  constructor(props: any) {
49
65
  super({
50
66
  ...props,
@@ -71,6 +87,18 @@ class Button extends Field {
71
87
  if (props.icon) {
72
88
  this._icon = props.icon;
73
89
  }
90
+ if (props.primary) {
91
+ const primary = props.primary;
92
+ if (primary === "1" || primary === 1 || primary === true) {
93
+ this._primary = true
94
+ }
95
+ }
96
+ if (props.danger) {
97
+ const danger = props.danger;
98
+ if (danger === "1" || danger === 1 || danger === true) {
99
+ this._danger = true
100
+ }
101
+ }
74
102
  }
75
103
  }
76
104
  }
package/src/Dashboard.ts CHANGED
@@ -1,4 +1,4 @@
1
- import Action from "./Action";
1
+ import DashboardItem from "./DashboardItem";
2
2
  import { parseGenericNodes } from "./helpers/nodeParser";
3
3
 
4
4
  class Dashboard {
@@ -7,9 +7,9 @@ class Dashboard {
7
7
  return this._string;
8
8
  }
9
9
 
10
- _actions: Action[] = [];
11
- get actions(): Action[] {
12
- return this._actions;
10
+ _items: DashboardItem[] = [];
11
+ get items(): DashboardItem[] {
12
+ return this._items;
13
13
  }
14
14
 
15
15
  constructor(xml: string) {
@@ -21,8 +21,8 @@ class Dashboard {
21
21
  const actionsParsed = parseGenericNodes(documentElement.childNodes);
22
22
 
23
23
  actionsParsed.forEach((nodeParsed) => {
24
- if (nodeParsed.tag === "action") {
25
- this._actions.push(new Action(nodeParsed.tagAttributes));
24
+ if (nodeParsed.tag === "dashboard_item") {
25
+ this._items.push(new DashboardItem(nodeParsed.tagAttributes));
26
26
  }
27
27
  });
28
28
  }
@@ -0,0 +1,23 @@
1
+ class DashboardItem {
2
+ _action_id: string | null = null;
3
+ get action_id(): string | null {
4
+ return this._action_id;
5
+ }
6
+
7
+ _position: string | null = null;
8
+ get position(): string | null {
9
+ return this._position;
10
+ }
11
+
12
+ constructor(attributes: any) {
13
+ if (attributes.action_id) {
14
+ this._action_id = attributes.action_id;
15
+ }
16
+
17
+ if (attributes.position) {
18
+ this._position = attributes.position;
19
+ }
20
+ }
21
+ }
22
+
23
+ export default DashboardItem;
package/src/Indicator.ts CHANGED
@@ -1,6 +1,6 @@
1
- import Field from "./Field";
1
+ import Selection from "./Selection";
2
2
 
3
- class Indicator extends Field {
3
+ class Indicator extends Selection {
4
4
  _nolabel: boolean = true;
5
5
 
6
6
  _card: boolean;
@@ -10,12 +10,30 @@ class Indicator extends Field {
10
10
  set card(value: boolean) {
11
11
  this._card = value;
12
12
  }
13
+ _icon: string;
14
+ get icon(): string {
15
+ return this._icon;
16
+ }
17
+ set icon(value: string) {
18
+ this._icon = value;
19
+ }
20
+ _suffix: string;
21
+ get suffix(): string {
22
+ return this._suffix;
23
+ }
24
+ set suffix(value: string) {
25
+ this._suffix = value;
26
+ }
13
27
 
14
28
  constructor(props: any) {
15
29
  super(props);
16
30
  this._card = false;
31
+ this._icon = "";
32
+ this._suffix = "";
17
33
  if (this._parsedWidgetProps) {
18
- this._card = this._parsedWidgetProps.card;
34
+ this._card = this._parsedWidgetProps.card || false;
35
+ this._icon = this._parsedWidgetProps.icon || "";
36
+ this._suffix = this._parsedWidgetProps.suffix || "";
19
37
  }
20
38
  }
21
39
  }
package/src/index.ts CHANGED
@@ -32,6 +32,7 @@ import { transformDomainForChildWidget } from "./helpers/domainParser";
32
32
  import Timeline from "./Timeline";
33
33
  import Indicator from "./Indicator";
34
34
  import Dashboard from "./Dashboard";
35
+ import DashboardItem from "./DashboardItem";
35
36
 
36
37
  export {
37
38
  Char,
@@ -68,4 +69,5 @@ export {
68
69
  Timeline,
69
70
  Indicator,
70
71
  Dashboard,
72
+ DashboardItem,
71
73
  };
@@ -55,4 +55,78 @@ describe("A Button", () => {
55
55
 
56
56
  expect(widget.nolabel).toBe(false);
57
57
  });
58
+ describe('primary attribute', () => {
59
+ it("should have primary attribute as false for default", () => {
60
+ const widgetFactory = new WidgetFactory();
61
+ const props = {
62
+ string: "Button",
63
+ };
64
+ const widget = widgetFactory.createWidget("button", props);
65
+ expect(widget.primary).toBe(false);
66
+ });
67
+ it("should parse primary option for 1", () => {
68
+ const widgetFactory = new WidgetFactory();
69
+ const props = {
70
+ string: "Button",
71
+ primary: 1
72
+ };
73
+ const widget = widgetFactory.createWidget("button", props);
74
+ expect(widget.primary).toBe(true);
75
+ });
76
+ it("should parse primary option for '1'", () => {
77
+ const widgetFactory = new WidgetFactory();
78
+ const props = {
79
+ string: "Button",
80
+ primary: "1"
81
+ };
82
+ const widget = widgetFactory.createWidget("button", props);
83
+ expect(widget.primary).toBe(true);
84
+ });
85
+ it("should parse primary option for true", () => {
86
+ const widgetFactory = new WidgetFactory();
87
+ const props = {
88
+ string: "Button",
89
+ primary: true
90
+ };
91
+ const widget = widgetFactory.createWidget("button", props);
92
+ expect(widget.primary).toBe(true);
93
+ });
94
+ });
95
+ describe('danger attribute', () => {
96
+ it("should have danger attribute as false for default", () => {
97
+ const widgetFactory = new WidgetFactory();
98
+ const props = {
99
+ string: "Button",
100
+ };
101
+ const widget = widgetFactory.createWidget("button", props);
102
+ expect(widget.danger).toBe(false);
103
+ });
104
+ it("should parse danger option for 1", () => {
105
+ const widgetFactory = new WidgetFactory();
106
+ const props = {
107
+ string: "Button",
108
+ danger: 1
109
+ };
110
+ const widget = widgetFactory.createWidget("button", props);
111
+ expect(widget.danger).toBe(true);
112
+ });
113
+ it("should parse danger option for '1'", () => {
114
+ const widgetFactory = new WidgetFactory();
115
+ const props = {
116
+ string: "Button",
117
+ danger: "1"
118
+ };
119
+ const widget = widgetFactory.createWidget("button", props);
120
+ expect(widget.danger).toBe(true);
121
+ });
122
+ it("should parse danger option for true", () => {
123
+ const widgetFactory = new WidgetFactory();
124
+ const props = {
125
+ string: "Button",
126
+ danger: true
127
+ };
128
+ const widget = widgetFactory.createWidget("button", props);
129
+ expect(widget.danger).toBe(true);
130
+ });
131
+ });
58
132
  });
@@ -4,25 +4,25 @@ describe("A Dashboard", () => {
4
4
  it("should parse a basic XML with three actions", () => {
5
5
  const xml = `<?xml version="1.0"?>
6
6
  <dashboard string="My dashboard">
7
- <action name="1497" parms="{ x: 0, y: 0, w: 1, h: 2, static: true }" />
8
- <action name="1496" parms="{ x: 1, y: 0, w: 3, h: 2, minW: 2, maxW: 4 }" />
9
- <action name="1321" parms="{ x: 4, y: 0, w: 1, h: 2 }" />
7
+ <dashboard_item action_id="1497" position="{ x: 0, y: 0, w: 1, h: 2, static: true }" />
8
+ <dashboard_item action_id="1496" position="{ x: 1, y: 0, w: 3, h: 2, minW: 2, maxW: 4 }" />
9
+ <dashboard_item action_id="1321" position="{ x: 4, y: 0, w: 1, h: 2 }" />
10
10
  </dashboard>
11
11
  `;
12
12
 
13
13
  const dashboard = new Dashboard(xml);
14
14
 
15
15
  expect(dashboard.string).toBe("My dashboard");
16
- expect(dashboard.actions.length).toBe(3);
17
- expect(dashboard.actions[0].name).toBe("1497");
18
- expect(dashboard.actions[1].name).toBe("1496");
19
- expect(dashboard.actions[2].name).toBe("1321");
20
- expect(dashboard.actions[0].parms).toBe(
16
+ expect(dashboard.items.length).toBe(3);
17
+ expect(dashboard.items[0].action_id).toBe("1497");
18
+ expect(dashboard.items[1].action_id).toBe("1496");
19
+ expect(dashboard.items[2].action_id).toBe("1321");
20
+ expect(dashboard.items[0].position).toBe(
21
21
  "{ x: 0, y: 0, w: 1, h: 2, static: true }"
22
22
  );
23
- expect(dashboard.actions[1].parms).toBe(
23
+ expect(dashboard.items[1].position).toBe(
24
24
  "{ x: 1, y: 0, w: 3, h: 2, minW: 2, maxW: 4 }"
25
25
  );
26
- expect(dashboard.actions[2].parms).toBe("{ x: 4, y: 0, w: 1, h: 2 }");
26
+ expect(dashboard.items[2].position).toBe("{ x: 4, y: 0, w: 1, h: 2 }");
27
27
  });
28
28
  });
@@ -19,9 +19,28 @@ describe("An Indicator", () => {
19
19
  it('should parse widget props', () => {
20
20
  const widgetFactory = new WidgetFactory();
21
21
  const props = {
22
- widget_props: "{'card': true}"
22
+ widget_props: "{'card': true, 'icon': 'wallet', 'suffix': '€'}"
23
23
  };
24
24
  const widget = widgetFactory.createWidget("indicator", props);
25
25
  expect(widget.card).toBe(true);
26
+ expect(widget.icon).toBe('wallet');
27
+ expect(widget.suffix).toBe('€');
28
+ });
29
+ it('icon and suffix should be an empty string if not defined', () => {
30
+ const widgetFactory = new WidgetFactory();
31
+ const props = {
32
+ widget_props: "{'card': true}"
33
+ };
34
+ const widget = widgetFactory.createWidget("indicator", props);
35
+ expect(widget.icon).toBe("");
36
+ expect(widget.suffix).toBe("");
37
+ });
38
+ it('card should be false if not defined', () => {
39
+ const widgetFactory = new WidgetFactory();
40
+ const props = {
41
+ widget_props: "{'icon': 'wallet'}"
42
+ };
43
+ const widget = widgetFactory.createWidget("indicator", props);
44
+ expect(widget.card).toBe(false);
26
45
  });
27
46
  });
package/dist/Action.d.ts DELETED
@@ -1,8 +0,0 @@
1
- declare class Action {
2
- _name: string | null;
3
- get name(): string | null;
4
- _parms: string | null;
5
- get parms(): string | null;
6
- constructor(attributes: any);
7
- }
8
- export default Action;
package/dist/Action.js DELETED
@@ -1,29 +0,0 @@
1
- var Action = /** @class */ (function () {
2
- function Action(attributes) {
3
- this._name = null;
4
- this._parms = null;
5
- if (attributes.name) {
6
- this._name = attributes.name;
7
- }
8
- if (attributes.parms) {
9
- this._parms = attributes.parms;
10
- }
11
- }
12
- Object.defineProperty(Action.prototype, "name", {
13
- get: function () {
14
- return this._name;
15
- },
16
- enumerable: false,
17
- configurable: true
18
- });
19
- Object.defineProperty(Action.prototype, "parms", {
20
- get: function () {
21
- return this._parms;
22
- },
23
- enumerable: false,
24
- configurable: true
25
- });
26
- return Action;
27
- }());
28
- export default Action;
29
- //# sourceMappingURL=Action.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Action.js","sourceRoot":"","sources":["../src/Action.ts"],"names":[],"mappings":"AAAA;IAWE,gBAAY,UAAe;QAV3B,UAAK,GAAkB,IAAI,CAAC;QAK5B,WAAM,GAAkB,IAAI,CAAC;QAM3B,IAAI,UAAU,CAAC,IAAI,EAAE;YACnB,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC;SAC9B;QAED,IAAI,UAAU,CAAC,KAAK,EAAE;YACpB,IAAI,CAAC,MAAM,GAAG,UAAU,CAAC,KAAK,CAAC;SAChC;IACH,CAAC;IAjBD,sBAAI,wBAAI;aAAR;YACE,OAAO,IAAI,CAAC,KAAK,CAAC;QACpB,CAAC;;;OAAA;IAGD,sBAAI,yBAAK;aAAT;YACE,OAAO,IAAI,CAAC,MAAM,CAAC;QACrB,CAAC;;;OAAA;IAWH,aAAC;AAAD,CAAC,AApBD,IAoBC;AAED,eAAe,MAAM,CAAC"}
package/src/Action.ts DELETED
@@ -1,23 +0,0 @@
1
- class Action {
2
- _name: string | null = null;
3
- get name(): string | null {
4
- return this._name;
5
- }
6
-
7
- _parms: string | null = null;
8
- get parms(): string | null {
9
- return this._parms;
10
- }
11
-
12
- constructor(attributes: any) {
13
- if (attributes.name) {
14
- this._name = attributes.name;
15
- }
16
-
17
- if (attributes.parms) {
18
- this._parms = attributes.parms;
19
- }
20
- }
21
- }
22
-
23
- export default Action;