@gisce/ooui 0.15.0 → 0.16.2

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,8 +1,15 @@
1
1
  import ContainerWidget from "./ContainerWidget";
2
+ import Page from "./Page";
3
+ export declare type TabPosition = "top" | "bottom" | "left" | "right";
2
4
  declare class Notebook extends ContainerWidget {
3
5
  static _defaultColspan: number;
4
6
  static get defaultColspan(): number;
5
7
  static set defaultColspan(value: number);
8
+ _tabPosition: TabPosition;
9
+ get tabPosition(): TabPosition;
10
+ set tabPosition(value: TabPosition);
11
+ _pages: Page[];
12
+ get pages(): Page[];
6
13
  constructor(props: any);
7
14
  }
8
15
  export default Notebook;
package/dist/Notebook.js CHANGED
@@ -16,11 +16,16 @@ var Notebook = /** @class */ (function (_super) {
16
16
  __extends(Notebook, _super);
17
17
  function Notebook(props) {
18
18
  var _this = _super.call(this, props) || this;
19
+ _this._tabPosition = "top";
20
+ _this._pages = [];
19
21
  _this.colspan = Notebook._defaultColspan;
20
22
  if (props) {
21
23
  if (props.colspan) {
22
24
  _this.colspan = props.colspan;
23
25
  }
26
+ if (props.tabpos) {
27
+ _this._tabPosition = props.tabpos;
28
+ }
24
29
  }
25
30
  return _this;
26
31
  }
@@ -34,6 +39,23 @@ var Notebook = /** @class */ (function (_super) {
34
39
  enumerable: false,
35
40
  configurable: true
36
41
  });
42
+ Object.defineProperty(Notebook.prototype, "tabPosition", {
43
+ get: function () {
44
+ return this._tabPosition;
45
+ },
46
+ set: function (value) {
47
+ this._tabPosition = value;
48
+ },
49
+ enumerable: false,
50
+ configurable: true
51
+ });
52
+ Object.defineProperty(Notebook.prototype, "pages", {
53
+ get: function () {
54
+ return this._container.rows.flat();
55
+ },
56
+ enumerable: false,
57
+ configurable: true
58
+ });
37
59
  Notebook._defaultColspan = 3;
38
60
  return Notebook;
39
61
  }(ContainerWidget));
@@ -1 +1 @@
1
- {"version":3,"file":"Notebook.js","sourceRoot":"","sources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eAAe,CAAC;QAClC,CAAC;aACD,UAA0B,KAAa;YACrC,QAAQ,CAAC,eAAe,GAAG,KAAK,CAAC;QACnC,CAAC;;;OAHA;IAMD,sBAAI,iCAAW;aAAf;YACE,OAAO,IAAI,CAAC,YAAY,CAAC;QAC3B,CAAC;aACD,UAAgB,KAAkB;YAChC,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;QAC5B,CAAC;;;OAHA;IAMD,sBAAI,2BAAK;aAAT;YACE,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAY,CAAC;QAC/C,CAAC;;;OAAA;IAnBM,wBAAe,GAAW,CAAC,CAAC;IAkCrC,eAAC;CAAA,AAnCD,CAAuB,eAAe,GAmCrC;AAED,eAAe,QAAQ,CAAC"}
package/dist/Page.d.ts CHANGED
@@ -1,5 +1,8 @@
1
1
  import ContainerWidget from "./ContainerWidget";
2
2
  declare class Page extends ContainerWidget {
3
+ _icon: string | null;
4
+ get icon(): string | null;
5
+ set icon(value: string | null);
3
6
  constructor(props: any);
4
7
  }
5
8
  export default Page;
package/dist/Page.js CHANGED
@@ -15,8 +15,23 @@ import ContainerWidget from "./ContainerWidget";
15
15
  var Page = /** @class */ (function (_super) {
16
16
  __extends(Page, _super);
17
17
  function Page(props) {
18
- return _super.call(this, props) || this;
18
+ var _this = _super.call(this, props) || this;
19
+ _this._icon = null;
20
+ if (props.icon) {
21
+ _this._icon = props.icon;
22
+ }
23
+ return _this;
19
24
  }
25
+ Object.defineProperty(Page.prototype, "icon", {
26
+ get: function () {
27
+ return this._icon;
28
+ },
29
+ set: function (value) {
30
+ this._icon = value;
31
+ },
32
+ enumerable: false,
33
+ configurable: true
34
+ });
20
35
  return Page;
21
36
  }(ContainerWidget));
22
37
  export default Page;
package/dist/Page.js.map CHANGED
@@ -1 +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"}
1
+ {"version":3,"file":"Page.js","sourceRoot":"","sources":["../src/Page.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAEhD;IAAmB,wBAAe;IAUhC,cAAY,KAAU;QAAtB,YACE,kBAAM,KAAK,CAAC,SAIb;QAbD,WAAK,GAAkB,IAAI,CAAC;QAU1B,IAAI,KAAK,CAAC,IAAI,EAAE;YACd,KAAI,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC;SACzB;;IACH,CAAC;IAZD,sBAAI,sBAAI;aAAR;YACE,OAAO,IAAI,CAAC,KAAK,CAAC;QACpB,CAAC;aACD,UAAS,KAAoB;YAC3B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACrB,CAAC;;;OAHA;IAWH,WAAC;AAAD,CAAC,AAhBD,CAAmB,eAAe,GAgBjC;AAED,eAAe,IAAI,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gisce/ooui",
3
- "version": "0.15.0",
3
+ "version": "0.16.2",
4
4
  "dependencies": {
5
5
  "moment": "^2.29.3"
6
6
  },
package/src/Notebook.ts CHANGED
@@ -1,4 +1,7 @@
1
1
  import ContainerWidget from "./ContainerWidget";
2
+ import Page from "./Page";
3
+
4
+ export type TabPosition = "top" | "bottom" | "left" | "right";
2
5
 
3
6
  class Notebook extends ContainerWidget {
4
7
  static _defaultColspan: number = 3;
@@ -9,6 +12,19 @@ class Notebook extends ContainerWidget {
9
12
  Notebook._defaultColspan = value;
10
13
  }
11
14
 
15
+ _tabPosition: TabPosition = "top";
16
+ get tabPosition(): TabPosition {
17
+ return this._tabPosition;
18
+ }
19
+ set tabPosition(value: TabPosition) {
20
+ this._tabPosition = value;
21
+ }
22
+
23
+ _pages: Page[] = [];
24
+ get pages(): Page[] {
25
+ return this._container.rows.flat() as Page[];
26
+ }
27
+
12
28
  constructor(props: any) {
13
29
  super(props);
14
30
  this.colspan = Notebook._defaultColspan;
@@ -17,6 +33,9 @@ class Notebook extends ContainerWidget {
17
33
  if (props.colspan) {
18
34
  this.colspan = props.colspan;
19
35
  }
36
+ if (props.tabpos) {
37
+ this._tabPosition = props.tabpos;
38
+ }
20
39
  }
21
40
  }
22
41
  }
package/src/Page.ts CHANGED
@@ -1,8 +1,20 @@
1
1
  import ContainerWidget from "./ContainerWidget";
2
2
 
3
3
  class Page extends ContainerWidget {
4
+
5
+ _icon: string | null = null;
6
+ get icon(): string | null {
7
+ return this._icon;
8
+ }
9
+ set icon(value: string | null) {
10
+ this._icon = value;
11
+ }
12
+
4
13
  constructor(props: any) {
5
14
  super(props);
15
+ if (props.icon) {
16
+ this._icon = props.icon;
17
+ }
6
18
  }
7
19
  }
8
20