@operato/scene-tab 1.2.76 → 1.2.87

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/CHANGELOG.md CHANGED
@@ -3,6 +3,23 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.2.87](https://github.com/things-scene/operato-scene/compare/v1.2.86...v1.2.87) (2023-11-10)
7
+
8
+ **Note:** Version bump only for package @operato/scene-tab
9
+
10
+
11
+
12
+
13
+
14
+ ## [1.2.82](https://github.com/things-scene/operato-scene/compare/v1.2.81...v1.2.82) (2023-11-06)
15
+
16
+
17
+ ### :bug: Bug Fix
18
+
19
+ * rewrite tab ([47dc94a](https://github.com/things-scene/operato-scene/commit/47dc94a5ac261963fe260306c951b351d66c625b))
20
+
21
+
22
+
6
23
  ## [1.2.76](https://github.com/things-scene/operato-scene/compare/v1.2.75...v1.2.76) (2023-10-28)
7
24
 
8
25
 
@@ -1,18 +1,16 @@
1
1
  import { Component, State } from '@hatiolab/things-scene';
2
- import Tab from './tab';
3
2
  declare const TabButton_base: typeof Component;
4
3
  export default class TabButton extends TabButton_base {
5
- get index(): any;
4
+ get index(): number;
6
5
  get activated(): boolean;
7
- removed(parent: Tab): void;
8
6
  private _fillStyle?;
9
7
  private _fontColor?;
10
8
  private _strokeStyle?;
11
9
  private _lineWidth?;
12
10
  prerender(context: CanvasRenderingContext2D): void;
13
11
  render(context: CanvasRenderingContext2D): void;
14
- postrender(context: CanvasRenderingContext2D): void;
15
12
  onclick(e: MouseEvent): void;
13
+ setStylesFromParent(style: State): void;
16
14
  onchange(after: State): void;
17
15
  }
18
16
  export {};
@@ -4,24 +4,14 @@
4
4
  import { Component, RectPath } from '@hatiolab/things-scene';
5
5
  export default class TabButton extends RectPath(Component) {
6
6
  get index() {
7
- return this.model.index;
7
+ return this.parent.indexOf(this);
8
8
  }
9
9
  get activated() {
10
10
  return this.parent.activeIndex === this.index;
11
11
  }
12
- removed(parent) {
13
- this.dispose();
14
- }
15
12
  prerender(context) {
16
13
  super.prerender(context);
17
- let { fillStyle, activeFillStyle, activeLineColor, activeLineWidth, fontColor, activeFontColor } = this.state;
18
- // backup style
19
- if (!this.hasOwnProperty('_fillStyle')) {
20
- this._fillStyle = fillStyle;
21
- }
22
- if (!this.hasOwnProperty('_fontColor')) {
23
- this._fontColor = fontColor;
24
- }
14
+ let { activeFillStyle, activeLineColor, activeLineWidth, activeFontColor } = this.state;
25
15
  if (this.activated) {
26
16
  this.model.fillStyle = activeFillStyle;
27
17
  this.model.fontColor = activeFontColor;
@@ -37,41 +27,32 @@ export default class TabButton extends RectPath(Component) {
37
27
  }
38
28
  render(context) {
39
29
  var { left = 0, top = 0, width, height } = this.bounds;
40
- // 컨테이너의 바운드를 표현한다.(컨테이너의 기본 그리기 기능)
41
30
  context.beginPath();
42
31
  context.rect(left, top, width, height);
43
32
  this.drawFill(context);
44
33
  this.drawStroke(context);
45
34
  }
46
- postrender(context) {
47
- super.postrender(context);
48
- // restore style
49
- this.model.fillStyle = this._fillStyle;
50
- this.model.fontColor = this._fontColor;
51
- this.model.strokeStyle = this._strokeStyle;
52
- this.model.lineWidth = this._lineWidth;
53
- delete this._fillStyle;
54
- delete this._fontColor;
55
- delete this._strokeStyle;
56
- delete this._lineWidth;
57
- }
58
35
  onclick(e) {
59
36
  ;
60
37
  this.parent.activeIndex = this.index;
61
38
  this.parent.invalidate();
62
39
  }
40
+ setStylesFromParent(style) {
41
+ if ('fillStyle' in style)
42
+ this._fillStyle = style.fillStyle;
43
+ if ('fontColor' in style)
44
+ this._fontColor = style.fontColor;
45
+ if ('strokeStyle' in style)
46
+ this._strokeStyle = style.strokeStyle;
47
+ if ('lineWidth' in style)
48
+ this._lineWidth = style.lineWidth;
49
+ this.set(style);
50
+ }
63
51
  onchange(after) {
64
- if (after.hasOwnProperty('fillStyle'))
65
- this._fillStyle = after.fillStyle;
66
- if (after.hasOwnProperty('fontColor'))
67
- this._fontColor = after.fontColor;
68
- if (after.hasOwnProperty('strokeStyle'))
69
- this._fontColor = after.fontColor;
70
- if (after.hasOwnProperty('lineWidth'))
71
- this._fontColor = after.fontColor;
72
- if (after.hasOwnProperty('text')) {
52
+ var _a;
53
+ if ('text' in after) {
73
54
  ;
74
- this.parent.reference.getAt(this.index).setState('text', after.text);
55
+ (_a = this.parent.reference) === null || _a === void 0 ? void 0 : _a.getAt(this.index).setState('text', after.text);
75
56
  }
76
57
  this.invalidate();
77
58
  }
@@ -1 +1 @@
1
- {"version":3,"file":"tab-button.js","sourceRoot":"","sources":["../src/tab-button.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAS,MAAM,wBAAwB,CAAA;AAInE,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,QAAQ,CAAC,SAAS,CAAC;IACxD,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAA;IACzB,CAAC;IAED,IAAI,SAAS;QACX,OAAQ,IAAI,CAAC,MAAc,CAAC,WAAW,KAAK,IAAI,CAAC,KAAK,CAAA;IACxD,CAAC;IAED,OAAO,CAAC,MAAW;QACjB,IAAI,CAAC,OAAO,EAAE,CAAA;IAChB,CAAC;IAOD,SAAS,CAAC,OAAiC;QACzC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,CAAA;QACxB,IAAI,EAAE,SAAS,EAAE,eAAe,EAAE,eAAe,EAAE,eAAe,EAAE,SAAS,EAAE,eAAe,EAAE,GAAG,IAAI,CAAC,KAAK,CAAA;QAE7G,eAAe;QACf,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC,EAAE;YACtC,IAAI,CAAC,UAAU,GAAG,SAAS,CAAA;SAC5B;QACD,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC,EAAE;YACtC,IAAI,CAAC,UAAU,GAAG,SAAS,CAAA;SAC5B;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from './tab'\n\nexport default class TabButton extends RectPath(Component) {\n get index() {\n return this.model.index\n }\n\n get activated() {\n return (this.parent as Tab).activeIndex === this.index\n }\n\n removed(parent: Tab) {\n this.dispose()\n }\n\n private _fillStyle?: string\n private _fontColor?: string\n private _strokeStyle?: string\n private _lineWidth?: string\n\n prerender(context: CanvasRenderingContext2D) {\n super.prerender(context)\n let { fillStyle, activeFillStyle, activeLineColor, activeLineWidth, fontColor, activeFontColor } = this.state\n\n // backup style\n if (!this.hasOwnProperty('_fillStyle')) {\n this._fillStyle = fillStyle\n }\n if (!this.hasOwnProperty('_fontColor')) {\n this._fontColor = fontColor\n }\n\n if (this.activated) {\n this.model.fillStyle = activeFillStyle\n this.model.fontColor = activeFontColor\n this.model.strokeStyle = activeLineColor\n this.model.lineWidth = activeLineWidth\n } else {\n this.model.fillStyle = this._fillStyle\n this.model.fontColor = this._fontColor\n this.model.strokeStyle = this._strokeStyle\n this.model.lineWidth = this._lineWidth\n }\n }\n\n render(context: CanvasRenderingContext2D) {\n var { left = 0, top = 0, width, height } = this.bounds\n\n // 컨테이너의 바운드를 표현한다.(컨테이너의 기본 그리기 기능)\n context.beginPath()\n\n context.rect(left, top, width, height)\n\n this.drawFill(context)\n this.drawStroke(context)\n }\n\n postrender(context: CanvasRenderingContext2D) {\n super.postrender(context)\n\n // restore style\n this.model.fillStyle = this._fillStyle\n this.model.fontColor = this._fontColor\n this.model.strokeStyle = this._strokeStyle\n this.model.lineWidth = this._lineWidth\n\n delete this._fillStyle\n delete this._fontColor\n delete this._strokeStyle\n delete this._lineWidth\n }\n\n onclick(e: MouseEvent) {\n ;(this.parent as Tab).activeIndex = this.index\n this.parent.invalidate()\n }\n\n onchange(after: State) {\n if (after.hasOwnProperty('fillStyle')) this._fillStyle = after.fillStyle\n\n if (after.hasOwnProperty('fontColor')) this._fontColor = after.fontColor\n\n if (after.hasOwnProperty('strokeStyle')) this._fontColor = after.fontColor\n\n if (after.hasOwnProperty('lineWidth')) this._fontColor = after.fontColor\n\n if (after.hasOwnProperty('text')) {\n ;(this.parent as Tab).reference.getAt(this.index).setState('text', after.text)\n }\n\n this.invalidate()\n }\n}\n\nComponent.register('tab-button', TabButton)\n"]}
1
+ {"version":3,"file":"tab-button.js","sourceRoot":"","sources":["../src/tab-button.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAS,MAAM,wBAAwB,CAAA;AAInE,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,QAAQ,CAAC,SAAS,CAAC;IACxD,IAAI,KAAK;QACP,OAAQ,IAAI,CAAC,MAAc,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IAC3C,CAAC;IAED,IAAI,SAAS;QACX,OAAQ,IAAI,CAAC,MAAc,CAAC,WAAW,KAAK,IAAI,CAAC,KAAK,CAAA;IACxD,CAAC;IAOD,SAAS,CAAC,OAAiC;QACzC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,CAAA;QAExB,IAAI,EAAE,eAAe,EAAE,eAAe,EAAE,eAAe,EAAE,eAAe,EAAE,GAAG,IAAI,CAAC,KAAK,CAAA;QAEvF,IAAI,IAAI,CAAC,SAAS,EAAE;YAClB,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,eAAe,CAAA;YACtC,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,eAAe,CAAA;YACtC,IAAI,CAAC,KAAK,CAAC,WAAW,GAAG,eAAe,CAAA;YACxC,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,eAAe,CAAA;SACvC;aAAM;YACL,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC,UAAU,CAAA;YACtC,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC,UAAU,CAAA;YACtC,IAAI,CAAC,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC,YAAY,CAAA;YAC1C,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC,UAAU,C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U,EAAE,CAAA;IACnB,CAAC;CACF;AAED,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,SAAS,CAAC,CAAA","sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\nimport { Component, RectPath, State } from '@hatiolab/things-scene'\n\nimport Tab from './tab'\n\nexport default class TabButton extends RectPath(Component) {\n get index() {\n return (this.parent as Tab).indexOf(this)\n }\n\n get activated() {\n return (this.parent as Tab).activeIndex === this.index\n }\n\n private _fillStyle?: string\n private _fontColor?: string\n private _strokeStyle?: string\n private _lineWidth?: string\n\n prerender(context: CanvasRenderingContext2D) {\n super.prerender(context)\n\n let { activeFillStyle, activeLineColor, activeLineWidth, activeFontColor } = this.state\n\n if (this.activated) {\n this.model.fillStyle = activeFillStyle\n this.model.fontColor = activeFontColor\n this.model.strokeStyle = activeLineColor\n this.model.lineWidth = activeLineWidth\n } else {\n this.model.fillStyle = this._fillStyle\n this.model.fontColor = this._fontColor\n this.model.strokeStyle = this._strokeStyle\n this.model.lineWidth = this._lineWidth\n }\n }\n\n render(context: CanvasRenderingContext2D) {\n var { left = 0, top = 0, width, height } = this.bounds\n\n context.beginPath()\n\n context.rect(left, top, width, height)\n\n this.drawFill(context)\n this.drawStroke(context)\n }\n\n onclick(e: MouseEvent) {\n ;(this.parent as Tab).activeIndex = this.index\n this.parent.invalidate()\n }\n\n setStylesFromParent(style: State) {\n if ('fillStyle' in style) this._fillStyle = style.fillStyle\n if ('fontColor' in style) this._fontColor = style.fontColor\n if ('strokeStyle' in style) this._strokeStyle = style.strokeStyle\n if ('lineWidth' in style) this._lineWidth = style.lineWidth\n\n this.set(style)\n }\n\n onchange(after: State) {\n if ('text' in after) {\n ;(this.parent as Tab).reference?.getAt(this.index).setState('text', after.text)\n }\n\n this.invalidate()\n }\n}\n\nComponent.register('tab-button', TabButton)\n"]}
package/dist/tab.d.ts CHANGED
@@ -4,7 +4,6 @@ export default class Tab extends Container {
4
4
  get nature(): ComponentNature;
5
5
  get focusible(): boolean;
6
6
  get reference(): any;
7
- get labelHeight(): any;
8
7
  get activeIndex(): any;
9
8
  private _reference;
10
9
  set reference(reference: any);
@@ -12,9 +11,7 @@ export default class Tab extends Container {
12
11
  ready(): void;
13
12
  render(context: CanvasRenderingContext2D): void;
14
13
  contains(x: number, y: number): boolean;
15
- dispose(): void;
16
14
  rebuildTabButtons(): void;
17
15
  setTabButtonsStyle(style: Style): void;
18
- onRefChanged(after: any, before: any, hint: any): void;
19
16
  onchange(after: State, before: State): void;
20
17
  }
package/dist/tab.js CHANGED
@@ -74,7 +74,6 @@ export default class Tab extends Container {
74
74
  get nature() {
75
75
  return NATURE;
76
76
  }
77
- // 컴포넌트를 임의로 추가 및 삭제할 수 있는 지를 지정하는 속성임.
78
77
  get focusible() {
79
78
  return false;
80
79
  }
@@ -85,22 +84,15 @@ export default class Tab extends Container {
85
84
  }
86
85
  if (!this._reference) {
87
86
  this._reference = this.root.findById(reference);
88
- if (this._reference)
89
- this._reference.on('change', this.onRefChanged, this);
87
+ // this._reference?.on('change', this.onRefChanged, this)
90
88
  }
91
89
  return this._reference;
92
90
  }
93
- get labelHeight() {
94
- var components = this.reference.components.length;
95
- var { height } = this.state;
96
- return (components > 0 && height / components) || height;
97
- }
98
91
  get activeIndex() {
99
92
  return this.getState('activeIndex');
100
93
  }
101
94
  set reference(reference) {
102
- if (this.reference)
103
- this.reference.off('change', this.onRefChanged, this);
95
+ // this.reference?.off('change', this.onRefChanged, this)
104
96
  this._reference = null;
105
97
  this.model.reference = reference;
106
98
  }
@@ -114,12 +106,14 @@ export default class Tab extends Container {
114
106
  var _a;
115
107
  super.ready();
116
108
  this.data = ((_a = this.state) === null || _a === void 0 ? void 0 : _a.activeIndex) || 0;
109
+ this.setTabButtonsStyle(this.state);
117
110
  }
118
111
  render(context) {
119
112
  super.render(context);
120
113
  if (this.reference) {
121
- if (this.size() !== this.reference.size())
114
+ if (this.size() !== this.reference.size()) {
122
115
  this.rebuildTabButtons();
116
+ }
123
117
  }
124
118
  else {
125
119
  // TODO reference 가 잘못되거나 안되어있다는 경고 의미로 뭔가 그려라..
@@ -131,10 +125,12 @@ export default class Tab extends Container {
131
125
  }
132
126
  }
133
127
  contains(x, y) {
134
- if (!this.app.isEditMode)
128
+ if (!this.app.isEditMode) {
135
129
  return super.contains(x, y);
136
- if (super.contains(x, y))
130
+ }
131
+ if (super.contains(x, y)) {
137
132
  return true;
133
+ }
138
134
  var { left, top, width } = this.bounds;
139
135
  var right = left + width;
140
136
  var h = HANDLE_HEIGHT;
@@ -143,17 +139,15 @@ export default class Tab extends Container {
143
139
  y < Math.max(top + h, top) &&
144
140
  y > Math.min(top + h, top));
145
141
  }
146
- dispose() {
147
- if (this.reference)
148
- this.reference.off('change', this.onRefChanged, this);
149
- super.dispose();
150
- }
142
+ // dispose() {
143
+ // this.reference?.off('change', this.onRefChanged, this)
144
+ // super.dispose()
145
+ // }
151
146
  rebuildTabButtons() {
152
- var { tabIndex = 0, left, top, width, height, fillStyle, activeFillStyle, activeLineColor, activeLineWidth, strokeStyle, fontColor, activeFontColor, fontFamily, fontSize, lineHeight, italic, bold, lineWidth = 0 } = this.state;
147
+ var { width, height, fillStyle, activeFillStyle, activeLineColor, activeLineWidth, strokeStyle, fontColor, activeFontColor, fontFamily, fontSize, lineHeight, italic, bold, lineWidth = 0 } = this.state;
153
148
  var reference = this.reference;
154
149
  let children = [];
155
150
  let components = reference.components;
156
- let label_height = this.labelHeight;
157
151
  let componentsLength = this.components.length;
158
152
  for (var i = componentsLength - 1; i >= 0; i--) {
159
153
  this.removeComponent(this.components[i]);
@@ -172,8 +166,8 @@ export default class Tab extends Container {
172
166
  activeFillStyle: activeFillStyle,
173
167
  activeLineColor: activeLineColor,
174
168
  activeLineWidth: activeLineWidth,
175
- fontColor: fontColor,
176
169
  activeFontColor: activeFontColor || fontColor,
170
+ fontColor: fontColor,
177
171
  fontFamily: fontFamily,
178
172
  fontSize: fontSize,
179
173
  lineHeight: lineHeight,
@@ -192,20 +186,36 @@ export default class Tab extends Container {
192
186
  this.activeIndex = this.state.activeIndex || 0;
193
187
  }
194
188
  setTabButtonsStyle(style) {
189
+ const toCopy = {};
190
+ if ('fillStyle' in style)
191
+ toCopy.fillStyle = style.fillStyle;
192
+ if ('fontColor' in style)
193
+ toCopy.fontColor = style.fontColor;
194
+ if ('strokeStyle' in style)
195
+ toCopy.strokeStyle = style.strokeStyle;
196
+ if ('lineWidth' in style)
197
+ toCopy.lineWidth = style.lineWidth;
198
+ if ('activeFillStyle' in style)
199
+ toCopy.activeFillStyle = style.activeFillStyle;
200
+ if ('activeFontColor' in style)
201
+ toCopy.activeFontColor = style.activeFontColor;
202
+ if ('activeLineWidth' in style)
203
+ toCopy.activeLineWidth = style.activeLineWidth;
204
+ if ('activeLineColor' in style)
205
+ toCopy.activeLineColor = style.activeLineColor;
195
206
  var children = this.components;
196
207
  for (var i in children) {
197
208
  var tabBtn = children[i];
198
- tabBtn.set(style);
209
+ tabBtn.setStylesFromParent(toCopy);
199
210
  }
200
211
  }
201
- // reference가 변했을 (tab에 변화를 주기위해)
202
- onRefChanged(after, before, hint) {
203
- // let sourceIndex = hint.deliverer.indexOf(hint.origin)
204
- // if(this.components[sourceIndex]) {
205
- // this.components[sourceIndex].set(after)
206
- // this.invalidate()
207
- // }
208
- }
212
+ // onRefChanged(after: any, before: any, hint: any) {
213
+ // let sourceIndex = hint.deliverer.indexOf(hint.origin)
214
+ // if (this.components[sourceIndex]) {
215
+ // this.components[sourceIndex].set(after)
216
+ // this.invalidate()
217
+ // }
218
+ // }
209
219
  onchange(after, before) {
210
220
  if ('reference' in after) {
211
221
  this.reference = after.reference;
package/dist/tab.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"tab.js","sourceRoot":"","sources":["../src/tab.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EACL,SAAS,EAET,SAAS,EACT,sBAAsB,EACtB,oBAAoB,EACpB,KAAK,EAGN,MAAM,wBAAwB,CAAA;AAE/B,MAA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,EAAE,SAAS;gBACpB,IAAI,EAAE,CAAC;gBACP,GAAG,EAAE,CAAC;gBACN,KAAK,EAAE,KAAK;gBACZ,MAAM,EAAE,MAAM;aACf,CAAC,CACH,CAAA;SACF;QAED,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;QAElB,IAAI,CAAC,MAAM,EAAE,CAAA;QAEb,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,IAAI,CAAC,CAAA;IAChD,CAAC;IAED,kBAAkB,CAAC,KAAY;QAC7B,IAAI,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAA;QAE9B,KAAK,IAAI,CAAC,IAAI,QAAQ,EAAE;YACtB,IAAI,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAA;YACxB,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;SAClB;IACH,CAAC;IAED,mCAAmC;IACnC,YAAY,CAAC,KAAU,EAAE,MAAW,EAAE,IAAS;QAC7C,wDAAwD;QACxD,qCAAqC;QACrC,4CAA4C;QAC5C,sBAAsB;QACtB,IAAI;IACN,CAAC;IAED,QAAQ,CAAC,KAAY,EAAE,MAAa;QAClC,IAAI,WAAW,IAAI,KAAK,EAAE;YACxB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,CAAA;YAChC,IAAI,CAAC,UAAU,EAAE,CAAA;SAClB;QAED,IAAI,aAAa,IAAI,KAAK,EAAE;YAC1B,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,WAAW,CAAA;SAC9B;QAED,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAA;IAChC,CAAC;CACF;AAED,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA","sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\nimport {\n Component,\n ComponentNature,\n Container,\n LinearHorizontalLayout,\n LinearVerticalLayout,\n Model,\n State,\n Style\n} from '@hatiolab/things-scene'\n\nconst HANDLE_WIDTH = 25\nconst HANDLE_HEIGHT = 25\n\nfunction rgba(r: number, g: number, b: number, a: number) {\n return `rgba(${r}, ${g}, ${b}, ${a})`\n}\n\nconst NATURE: ComponentNature = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [\n {\n type: 'id-input',\n label: 'tab-reference',\n name: 'reference',\n property: {\n component: (c: Component) => {\n /* this means compare target component */\n const ret = ['tab-container', 'indoor-map'].includes(c.model.type as string)\n return ret\n }\n }\n },\n {\n type: 'number',\n label: 'tab-active-index',\n name: 'activeIndex',\n property: {\n min: 0,\n step: 1\n }\n },\n {\n type: 'color',\n label: 'active-fill-style',\n name: 'activeFillStyle',\n property: 'activeFillStyle'\n },\n {\n type: 'color',\n label: 'active-font-color',\n name: 'activeFontColor',\n property: 'activeFontColor'\n },\n {\n type: 'color',\n label: 'active-line-color',\n name: 'activeLineColor',\n property: 'activeLineColor'\n },\n {\n type: 'number',\n label: 'active-line-width',\n name: 'activeLineWidth',\n property: 'activeLineWidth'\n }\n ],\n 'value-property': 'activeIndex',\n help: 'scene/component/tab'\n}\n\nexport default class Tab extends Container {\n get layout() {\n let { width, height } = this.state\n\n if (width >= height) {\n return LinearHorizontalLayout\n } else {\n return LinearVerticalLayout\n }\n }\n\n get nature() {\n return NATURE\n }\n\n // 컴포넌트를 임의로 추가 및 삭제할 수 있는 지를 지정하는 속성임.\n get focusible() {\n return false\n }\n\n get reference() {\n var { reference } = this.state\n if (!reference) {\n return null\n }\n\n if (!this._reference) {\n this._reference = this.root.findById(reference)\n if (this._reference) this._reference.on('change', this.onRefChanged, this)\n }\n\n return this._reference\n }\n\n get labelHeight() {\n var components = this.reference.components.length\n var { height } = this.state\n\n return (components > 0 && height / components) || height\n }\n\n get activeIndex() {\n return this.getState('activeIndex')\n }\n\n private _reference: any\n\n set reference(reference) {\n if (this.reference) this.reference.off('change', this.onRefChanged, this)\n\n this._reference = null\n this.model.reference = reference\n }\n\n set activeIndex(index) {\n this.setState('activeIndex', index)\n if (this.reference) {\n this.reference.activeIndex = index\n }\n }\n\n ready() {\n super.ready()\n\n this.data = this.state?.activeIndex || 0\n }\n\n render(context: CanvasRenderingContext2D) {\n super.render(context)\n\n if (this.reference) {\n if (this.size() !== this.reference.size()) this.rebuildTabButtons()\n } else {\n // TODO reference 가 잘못되거나 안되어있다는 경고 의미로 뭔가 그려라..\n var componentsLength = this.components.length\n for (var i = componentsLength - 1; i >= 0; i--) {\n var tabBtn = this.components[i]\n this.removeComponent(tabBtn)\n }\n }\n }\n\n contains(x: number, y: number) {\n if (!this.app.isEditMode) return super.contains(x, y)\n\n if (super.contains(x, y)) return true\n\n var { left, top, width } = this.bounds\n\n var right = left + width\n\n var h = HANDLE_HEIGHT\n\n return (\n x < Math.max(right + HANDLE_WIDTH, right) &&\n x > Math.min(right + HANDLE_WIDTH, right) &&\n y < Math.max(top + h, top) &&\n y > Math.min(top + h, top)\n )\n }\n\n dispose() {\n if (this.reference) this.reference.off('change', this.onRefChanged, this)\n\n super.dispose()\n }\n\n rebuildTabButtons() {\n var {\n tabIndex = 0,\n left,\n top,\n width,\n height,\n fillStyle,\n activeFillStyle,\n activeLineColor,\n activeLineWidth,\n strokeStyle,\n fontColor,\n activeFontColor,\n fontFamily,\n fontSize,\n lineHeight,\n italic,\n bold,\n lineWidth = 0\n } = this.state\n\n var reference = this.reference\n let children = []\n\n let components = reference.components\n let label_height = this.labelHeight\n\n let componentsLength = this.components.length\n\n for (var i = componentsLength - 1; i >= 0; i--) {\n this.removeComponent(this.components[i])\n }\n\n for (let i = 0; i < components.length; i++) {\n const componentType = components[i].model.type\n if (componentType != 'tab-card' && componentType != 'floor') {\n continue\n }\n\n let tabCardText = components[i].text || ''\n\n children.push(\n Model.compile({\n type: 'tab-button',\n index: i,\n text: tabCardText || String(i + 1),\n fillStyle: fillStyle || 'transparent',\n activeFillStyle: activeFillStyle,\n activeLineColor: activeLineColor,\n activeLineWidth: activeLineWidth,\n fontColor: fontColor,\n activeFontColor: activeFontColor || fontColor,\n fontFamily: fontFamily,\n fontSize: fontSize,\n lineHeight: lineHeight,\n italic: italic,\n bold: bold,\n strokeStyle: strokeStyle,\n lineWidth: lineWidth,\n left: 0,\n top: 0,\n width: width,\n height: height\n })\n )\n }\n\n this.add(children)\n\n this.reflow()\n\n this.activeIndex = this.state.activeIndex || 0\n }\n\n setTabButtonsStyle(style: Style) {\n var children = this.components\n\n for (var i in children) {\n var tabBtn = children[i]\n tabBtn.set(style)\n }\n }\n\n // reference가 변했을 때 (tab에 변화를 주기위해)\n onRefChanged(after: any, before: any, hint: any) {\n // let sourceIndex = hint.deliverer.indexOf(hint.origin)\n // if(this.components[sourceIndex]) {\n // this.components[sourceIndex].set(after)\n // this.invalidate()\n // }\n }\n\n onchange(after: State, before: State) {\n if ('reference' in after) {\n this.reference = after.reference\n this.invalidate()\n }\n\n if ('activeIndex' in after) {\n this.data = after.activeIndex\n }\n\n this.setTabButtonsStyle(after)\n }\n}\n\nComponent.register('tab', Tab)\n"]}
1
+ {"version":3,"file":"tab.js","sourceRoot":"","sources":["../src/tab.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EACL,SAAS,EAET,SAAS,EACT,sBAAsB,EACtB,oBAAoB,EACpB,KAAK,EAGN,MAAM,wBAAwB,CAAA;AAG/B,MAAM,YAAY,GAAG,EAAE,CAAA;AACvB,MAAM,aAAa,GAAG,EAAE,CAAA;AAExB,SAAS,IAAI,CAAC,CAAS,EAAE,CAAS,EAAE,CAAS,EAAE,CAAS;IACtD,OAAO,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAA;AACvC,CAAC;AAED,MAAM,MAAM,GAAoB;IAC9B,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,IAAI;IACf,UAAU,EAAE;QACV;YACE,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,eAAe;YACtB,IAAI,EAAE,WAAW;YACjB,QAAQ,EAAE;gB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,CAAC,eAAe,CAAA;QAE9E,IAAI,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAA;QAE9B,KAAK,IAAI,CAAC,IAAI,QAAQ,EAAE;YACtB,IAAI,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,CACvB;YAAC,MAAoB,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAA;SACnD;IACH,CAAC;IAED,qDAAqD;IACrD,0DAA0D;IAC1D,wCAAwC;IACxC,8CAA8C;IAC9C,wBAAwB;IACxB,MAAM;IACN,IAAI;IAEJ,QAAQ,CAAC,KAAY,EAAE,MAAa;QAClC,IAAI,WAAW,IAAI,KAAK,EAAE;YACxB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,CAAA;YAChC,IAAI,CAAC,UAAU,EAAE,CAAA;SAClB;QAED,IAAI,aAAa,IAAI,KAAK,EAAE;YAC1B,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,WAAW,CAAA;SAC9B;QAED,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAA;IAChC,CAAC;CACF;AAED,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA","sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\nimport {\n Component,\n ComponentNature,\n Container,\n LinearHorizontalLayout,\n LinearVerticalLayout,\n Model,\n State,\n Style\n} from '@hatiolab/things-scene'\nimport TabButton from './tab-button'\n\nconst HANDLE_WIDTH = 25\nconst HANDLE_HEIGHT = 25\n\nfunction rgba(r: number, g: number, b: number, a: number) {\n return `rgba(${r}, ${g}, ${b}, ${a})`\n}\n\nconst NATURE: ComponentNature = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [\n {\n type: 'id-input',\n label: 'tab-reference',\n name: 'reference',\n property: {\n component: (c: Component) => {\n /* this means compare target component */\n const ret = ['tab-container', 'indoor-map'].includes(c.model.type as string)\n return ret\n }\n }\n },\n {\n type: 'number',\n label: 'tab-active-index',\n name: 'activeIndex',\n property: {\n min: 0,\n step: 1\n }\n },\n {\n type: 'color',\n label: 'active-fill-style',\n name: 'activeFillStyle',\n property: 'activeFillStyle'\n },\n {\n type: 'color',\n label: 'active-font-color',\n name: 'activeFontColor',\n property: 'activeFontColor'\n },\n {\n type: 'color',\n label: 'active-line-color',\n name: 'activeLineColor',\n property: 'activeLineColor'\n },\n {\n type: 'number',\n label: 'active-line-width',\n name: 'activeLineWidth',\n property: 'activeLineWidth'\n }\n ],\n 'value-property': 'activeIndex',\n help: 'scene/component/tab'\n}\n\nexport default class Tab extends Container {\n get layout() {\n let { width, height } = this.state\n\n if (width >= height) {\n return LinearHorizontalLayout\n } else {\n return LinearVerticalLayout\n }\n }\n\n get nature() {\n return NATURE\n }\n\n get focusible() {\n return false\n }\n\n get reference() {\n var { reference } = this.state\n if (!reference) {\n return null\n }\n\n if (!this._reference) {\n this._reference = this.root.findById(reference)\n // this._reference?.on('change', this.onRefChanged, this)\n }\n\n return this._reference\n }\n\n get activeIndex() {\n return this.getState('activeIndex')\n }\n\n private _reference: any\n\n set reference(reference) {\n // this.reference?.off('change', this.onRefChanged, this)\n\n this._reference = null\n this.model.reference = reference\n }\n\n set activeIndex(index) {\n this.setState('activeIndex', index)\n if (this.reference) {\n this.reference.activeIndex = index\n }\n }\n\n ready() {\n super.ready()\n\n this.data = this.state?.activeIndex || 0\n\n this.setTabButtonsStyle(this.state)\n }\n\n render(context: CanvasRenderingContext2D) {\n super.render(context)\n\n if (this.reference) {\n if (this.size() !== this.reference.size()) {\n this.rebuildTabButtons()\n }\n } else {\n // TODO reference 가 잘못되거나 안되어있다는 경고 의미로 뭔가 그려라..\n var componentsLength = this.components.length\n\n for (var i = componentsLength - 1; i >= 0; i--) {\n var tabBtn = this.components[i]\n this.removeComponent(tabBtn)\n }\n }\n }\n\n contains(x: number, y: number) {\n if (!this.app.isEditMode) {\n return super.contains(x, y)\n }\n\n if (super.contains(x, y)) {\n return true\n }\n\n var { left, top, width } = this.bounds\n\n var right = left + width\n\n var h = HANDLE_HEIGHT\n\n return (\n x < Math.max(right + HANDLE_WIDTH, right) &&\n x > Math.min(right + HANDLE_WIDTH, right) &&\n y < Math.max(top + h, top) &&\n y > Math.min(top + h, top)\n )\n }\n\n // dispose() {\n // this.reference?.off('change', this.onRefChanged, this)\n\n // super.dispose()\n // }\n\n rebuildTabButtons() {\n var {\n width,\n height,\n fillStyle,\n activeFillStyle,\n activeLineColor,\n activeLineWidth,\n strokeStyle,\n fontColor,\n activeFontColor,\n fontFamily,\n fontSize,\n lineHeight,\n italic,\n bold,\n lineWidth = 0\n } = this.state\n\n var reference = this.reference\n let children = []\n\n let components = reference.components\n\n let componentsLength = this.components.length\n\n for (var i = componentsLength - 1; i >= 0; i--) {\n this.removeComponent(this.components[i])\n }\n\n for (let i = 0; i < components.length; i++) {\n const componentType = components[i].model.type\n if (componentType != 'tab-card' && componentType != 'floor') {\n continue\n }\n\n let tabCardText = components[i].text || ''\n\n children.push(\n Model.compile({\n type: 'tab-button',\n index: i,\n text: tabCardText || String(i + 1),\n fillStyle: fillStyle || 'transparent',\n activeFillStyle: activeFillStyle,\n activeLineColor: activeLineColor,\n activeLineWidth: activeLineWidth,\n activeFontColor: activeFontColor || fontColor,\n fontColor: fontColor,\n fontFamily: fontFamily,\n fontSize: fontSize,\n lineHeight: lineHeight,\n italic: italic,\n bold: bold,\n strokeStyle: strokeStyle,\n lineWidth: lineWidth,\n left: 0,\n top: 0,\n width: width,\n height: height\n })\n )\n }\n\n this.add(children)\n\n this.reflow()\n\n this.activeIndex = this.state.activeIndex || 0\n }\n\n setTabButtonsStyle(style: Style) {\n const toCopy = {} as any\n\n if ('fillStyle' in style) toCopy.fillStyle = style.fillStyle\n if ('fontColor' in style) toCopy.fontColor = style.fontColor\n if ('strokeStyle' in style) toCopy.strokeStyle = style.strokeStyle\n if ('lineWidth' in style) toCopy.lineWidth = style.lineWidth\n\n if ('activeFillStyle' in style) toCopy.activeFillStyle = style.activeFillStyle\n if ('activeFontColor' in style) toCopy.activeFontColor = style.activeFontColor\n if ('activeLineWidth' in style) toCopy.activeLineWidth = style.activeLineWidth\n if ('activeLineColor' in style) toCopy.activeLineColor = style.activeLineColor\n\n var children = this.components\n\n for (var i in children) {\n var tabBtn = children[i]\n ;(tabBtn as TabButton).setStylesFromParent(toCopy)\n }\n }\n\n // onRefChanged(after: any, before: any, hint: any) {\n // let sourceIndex = hint.deliverer.indexOf(hint.origin)\n // if (this.components[sourceIndex]) {\n // this.components[sourceIndex].set(after)\n // this.invalidate()\n // }\n // }\n\n onchange(after: State, before: State) {\n if ('reference' in after) {\n this.reference = after.reference\n this.invalidate()\n }\n\n if ('activeIndex' in after) {\n this.data = after.activeIndex\n }\n\n this.setTabButtonsStyle(after)\n }\n}\n\nComponent.register('tab', Tab)\n"]}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@operato/scene-tab",
3
3
  "description": "Tab style container for Things Scene",
4
4
  "author": "heartyoh",
5
- "version": "1.2.76",
5
+ "version": "1.2.87",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
8
8
  "license": "MIT",
@@ -57,5 +57,5 @@
57
57
  "prettier --write"
58
58
  ]
59
59
  },
60
- "gitHead": "c134e8af29c863a4eaaf5e9d9dd309a41c334c44"
60
+ "gitHead": "d795a8b7767e8b82729cd2d08d65814d3aca06b4"
61
61
  }
package/schema.graphql CHANGED
@@ -413,13 +413,14 @@ type BoardTemplate {
413
413
  description: String
414
414
  domain: Domain
415
415
  id: ID!
416
+ mine: Boolean!
416
417
  model: String
417
418
  name: String
418
- state: String
419
+ tags: Object
419
420
  thumbnail: String
420
421
  updatedAt: DateTimeISO
421
422
  updater: User
422
- version: Float
423
+ visibility: String
423
424
  }
424
425
 
425
426
  type BoardTemplateList {
@@ -431,16 +432,10 @@ input BoardTemplatePatch {
431
432
  cuFlag: String
432
433
  description: String
433
434
  id: ID
434
- model: String!
435
+ model: String
435
436
  name: String
436
- state: BoardTemplateStatus
437
437
  thumbnail: String
438
- }
439
-
440
- """state enumeration of a boardTemplate"""
441
- enum BoardTemplateStatus {
442
- DRAFT
443
- RELEASED
438
+ visibility: String
444
439
  }
445
440
 
446
441
  input ChatCompletionInput {
@@ -1943,7 +1938,22 @@ type Mutation {
1943
1938
  """To refresh oauth2 access token"""
1944
1939
  refreshOauth2AccessToken(id: String!): Oauth2Client!
1945
1940
 
1946
- """To release Board information"""
1941
+ """To register a board as a board template with the given ID"""
1942
+ registerBoardAsTemplate(
1943
+ """description of board template to be regiestered"""
1944
+ description: String!
1945
+
1946
+ """board Id to be regiestered"""
1947
+ id: String!
1948
+
1949
+ """name of board template to be regiestered"""
1950
+ name: String!
1951
+
1952
+ """visibility of board template to be regiestered"""
1953
+ visibility: String!
1954
+ ): BoardTemplate!
1955
+
1956
+ """To release a Board"""
1947
1957
  releaseBoard(id: String!): Board!
1948
1958
  renewApplicationAccessToken(id: String!, scope: String!): AccessToken!
1949
1959
 
@@ -2249,11 +2259,11 @@ input NewBoard {
2249
2259
  }
2250
2260
 
2251
2261
  input NewBoardTemplate {
2252
- description: String
2262
+ description: String!
2253
2263
  model: String!
2254
2264
  name: String!
2255
- state: BoardTemplateStatus
2256
2265
  thumbnail: String
2266
+ visibility: String!
2257
2267
  }
2258
2268
 
2259
2269
  input NewCommonCode {
@@ -3163,9 +3173,6 @@ type Query {
3163
3173
  """To fetch a BoardTemplate"""
3164
3174
  boardTemplate(id: String!): BoardTemplate
3165
3175
 
3166
- """To fetch a BoardTemplate by name"""
3167
- boardTemplateByName(name: String!): BoardTemplate
3168
-
3169
3176
  """To fetch multiple BoardTemplates"""
3170
3177
  boardTemplates(filters: [Filter!], inherited: InheritedValueType, pagination: Pagination, sortings: [Sorting!]): BoardTemplateList!
3171
3178
 
@@ -3427,7 +3434,7 @@ type Query {
3427
3434
  """To fetch Menus by role"""
3428
3435
  roleMenus(roleId: String!): MenuList!
3429
3436
 
3430
- """To fetch priviliges of a role"""
3437
+ """To fetch privileges of a role"""
3431
3438
  rolePrivileges(roleId: String!): [RolePrivilege!]!
3432
3439
 
3433
3440
  """To fetch multiple users"""
package/src/tab-button.ts CHANGED
@@ -7,17 +7,13 @@ import Tab from './tab'
7
7
 
8
8
  export default class TabButton extends RectPath(Component) {
9
9
  get index() {
10
- return this.model.index
10
+ return (this.parent as Tab).indexOf(this)
11
11
  }
12
12
 
13
13
  get activated() {
14
14
  return (this.parent as Tab).activeIndex === this.index
15
15
  }
16
16
 
17
- removed(parent: Tab) {
18
- this.dispose()
19
- }
20
-
21
17
  private _fillStyle?: string
22
18
  private _fontColor?: string
23
19
  private _strokeStyle?: string
@@ -25,15 +21,8 @@ export default class TabButton extends RectPath(Component) {
25
21
 
26
22
  prerender(context: CanvasRenderingContext2D) {
27
23
  super.prerender(context)
28
- let { fillStyle, activeFillStyle, activeLineColor, activeLineWidth, fontColor, activeFontColor } = this.state
29
24
 
30
- // backup style
31
- if (!this.hasOwnProperty('_fillStyle')) {
32
- this._fillStyle = fillStyle
33
- }
34
- if (!this.hasOwnProperty('_fontColor')) {
35
- this._fontColor = fontColor
36
- }
25
+ let { activeFillStyle, activeLineColor, activeLineWidth, activeFontColor } = this.state
37
26
 
38
27
  if (this.activated) {
39
28
  this.model.fillStyle = activeFillStyle
@@ -51,7 +40,6 @@ export default class TabButton extends RectPath(Component) {
51
40
  render(context: CanvasRenderingContext2D) {
52
41
  var { left = 0, top = 0, width, height } = this.bounds
53
42
 
54
- // 컨테이너의 바운드를 표현한다.(컨테이너의 기본 그리기 기능)
55
43
  context.beginPath()
56
44
 
57
45
  context.rect(left, top, width, height)
@@ -60,37 +48,23 @@ export default class TabButton extends RectPath(Component) {
60
48
  this.drawStroke(context)
61
49
  }
62
50
 
63
- postrender(context: CanvasRenderingContext2D) {
64
- super.postrender(context)
65
-
66
- // restore style
67
- this.model.fillStyle = this._fillStyle
68
- this.model.fontColor = this._fontColor
69
- this.model.strokeStyle = this._strokeStyle
70
- this.model.lineWidth = this._lineWidth
71
-
72
- delete this._fillStyle
73
- delete this._fontColor
74
- delete this._strokeStyle
75
- delete this._lineWidth
76
- }
77
-
78
51
  onclick(e: MouseEvent) {
79
52
  ;(this.parent as Tab).activeIndex = this.index
80
53
  this.parent.invalidate()
81
54
  }
82
55
 
83
- onchange(after: State) {
84
- if (after.hasOwnProperty('fillStyle')) this._fillStyle = after.fillStyle
85
-
86
- if (after.hasOwnProperty('fontColor')) this._fontColor = after.fontColor
56
+ setStylesFromParent(style: State) {
57
+ if ('fillStyle' in style) this._fillStyle = style.fillStyle
58
+ if ('fontColor' in style) this._fontColor = style.fontColor
59
+ if ('strokeStyle' in style) this._strokeStyle = style.strokeStyle
60
+ if ('lineWidth' in style) this._lineWidth = style.lineWidth
87
61
 
88
- if (after.hasOwnProperty('strokeStyle')) this._fontColor = after.fontColor
89
-
90
- if (after.hasOwnProperty('lineWidth')) this._fontColor = after.fontColor
62
+ this.set(style)
63
+ }
91
64
 
92
- if (after.hasOwnProperty('text')) {
93
- ;(this.parent as Tab).reference.getAt(this.index).setState('text', after.text)
65
+ onchange(after: State) {
66
+ if ('text' in after) {
67
+ ;(this.parent as Tab).reference?.getAt(this.index).setState('text', after.text)
94
68
  }
95
69
 
96
70
  this.invalidate()
package/src/tab.ts CHANGED
@@ -11,6 +11,7 @@ import {
11
11
  State,
12
12
  Style
13
13
  } from '@hatiolab/things-scene'
14
+ import TabButton from './tab-button'
14
15
 
15
16
  const HANDLE_WIDTH = 25
16
17
  const HANDLE_HEIGHT = 25
@@ -89,7 +90,6 @@ export default class Tab extends Container {
89
90
  return NATURE
90
91
  }
91
92
 
92
- // 컴포넌트를 임의로 추가 및 삭제할 수 있는 지를 지정하는 속성임.
93
93
  get focusible() {
94
94
  return false
95
95
  }
@@ -102,19 +102,12 @@ export default class Tab extends Container {
102
102
 
103
103
  if (!this._reference) {
104
104
  this._reference = this.root.findById(reference)
105
- if (this._reference) this._reference.on('change', this.onRefChanged, this)
105
+ // this._reference?.on('change', this.onRefChanged, this)
106
106
  }
107
107
 
108
108
  return this._reference
109
109
  }
110
110
 
111
- get labelHeight() {
112
- var components = this.reference.components.length
113
- var { height } = this.state
114
-
115
- return (components > 0 && height / components) || height
116
- }
117
-
118
111
  get activeIndex() {
119
112
  return this.getState('activeIndex')
120
113
  }
@@ -122,7 +115,7 @@ export default class Tab extends Container {
122
115
  private _reference: any
123
116
 
124
117
  set reference(reference) {
125
- if (this.reference) this.reference.off('change', this.onRefChanged, this)
118
+ // this.reference?.off('change', this.onRefChanged, this)
126
119
 
127
120
  this._reference = null
128
121
  this.model.reference = reference
@@ -139,16 +132,21 @@ export default class Tab extends Container {
139
132
  super.ready()
140
133
 
141
134
  this.data = this.state?.activeIndex || 0
135
+
136
+ this.setTabButtonsStyle(this.state)
142
137
  }
143
138
 
144
139
  render(context: CanvasRenderingContext2D) {
145
140
  super.render(context)
146
141
 
147
142
  if (this.reference) {
148
- if (this.size() !== this.reference.size()) this.rebuildTabButtons()
143
+ if (this.size() !== this.reference.size()) {
144
+ this.rebuildTabButtons()
145
+ }
149
146
  } else {
150
147
  // TODO reference 가 잘못되거나 안되어있다는 경고 의미로 뭔가 그려라..
151
148
  var componentsLength = this.components.length
149
+
152
150
  for (var i = componentsLength - 1; i >= 0; i--) {
153
151
  var tabBtn = this.components[i]
154
152
  this.removeComponent(tabBtn)
@@ -157,9 +155,13 @@ export default class Tab extends Container {
157
155
  }
158
156
 
159
157
  contains(x: number, y: number) {
160
- if (!this.app.isEditMode) return super.contains(x, y)
158
+ if (!this.app.isEditMode) {
159
+ return super.contains(x, y)
160
+ }
161
161
 
162
- if (super.contains(x, y)) return true
162
+ if (super.contains(x, y)) {
163
+ return true
164
+ }
163
165
 
164
166
  var { left, top, width } = this.bounds
165
167
 
@@ -175,17 +177,14 @@ export default class Tab extends Container {
175
177
  )
176
178
  }
177
179
 
178
- dispose() {
179
- if (this.reference) this.reference.off('change', this.onRefChanged, this)
180
+ // dispose() {
181
+ // this.reference?.off('change', this.onRefChanged, this)
180
182
 
181
- super.dispose()
182
- }
183
+ // super.dispose()
184
+ // }
183
185
 
184
186
  rebuildTabButtons() {
185
187
  var {
186
- tabIndex = 0,
187
- left,
188
- top,
189
188
  width,
190
189
  height,
191
190
  fillStyle,
@@ -207,7 +206,6 @@ export default class Tab extends Container {
207
206
  let children = []
208
207
 
209
208
  let components = reference.components
210
- let label_height = this.labelHeight
211
209
 
212
210
  let componentsLength = this.components.length
213
211
 
@@ -232,8 +230,8 @@ export default class Tab extends Container {
232
230
  activeFillStyle: activeFillStyle,
233
231
  activeLineColor: activeLineColor,
234
232
  activeLineWidth: activeLineWidth,
235
- fontColor: fontColor,
236
233
  activeFontColor: activeFontColor || fontColor,
234
+ fontColor: fontColor,
237
235
  fontFamily: fontFamily,
238
236
  fontSize: fontSize,
239
237
  lineHeight: lineHeight,
@@ -257,22 +255,33 @@ export default class Tab extends Container {
257
255
  }
258
256
 
259
257
  setTabButtonsStyle(style: Style) {
258
+ const toCopy = {} as any
259
+
260
+ if ('fillStyle' in style) toCopy.fillStyle = style.fillStyle
261
+ if ('fontColor' in style) toCopy.fontColor = style.fontColor
262
+ if ('strokeStyle' in style) toCopy.strokeStyle = style.strokeStyle
263
+ if ('lineWidth' in style) toCopy.lineWidth = style.lineWidth
264
+
265
+ if ('activeFillStyle' in style) toCopy.activeFillStyle = style.activeFillStyle
266
+ if ('activeFontColor' in style) toCopy.activeFontColor = style.activeFontColor
267
+ if ('activeLineWidth' in style) toCopy.activeLineWidth = style.activeLineWidth
268
+ if ('activeLineColor' in style) toCopy.activeLineColor = style.activeLineColor
269
+
260
270
  var children = this.components
261
271
 
262
272
  for (var i in children) {
263
273
  var tabBtn = children[i]
264
- tabBtn.set(style)
274
+ ;(tabBtn as TabButton).setStylesFromParent(toCopy)
265
275
  }
266
276
  }
267
277
 
268
- // reference가 변했을 (tab에 변화를 주기위해)
269
- onRefChanged(after: any, before: any, hint: any) {
270
- // let sourceIndex = hint.deliverer.indexOf(hint.origin)
271
- // if(this.components[sourceIndex]) {
272
- // this.components[sourceIndex].set(after)
273
- // this.invalidate()
274
- // }
275
- }
278
+ // onRefChanged(after: any, before: any, hint: any) {
279
+ // let sourceIndex = hint.deliverer.indexOf(hint.origin)
280
+ // if (this.components[sourceIndex]) {
281
+ // this.components[sourceIndex].set(after)
282
+ // this.invalidate()
283
+ // }
284
+ // }
276
285
 
277
286
  onchange(after: State, before: State) {
278
287
  if ('reference' in after) {
@@ -1 +1 @@
1
- {"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/typescript/lib/lib.decorators.d.ts","../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../node_modules/tslib/tslib.d.ts","../../node_modules/@hatiolab/things-scene/things-scene.d.ts","./src/tab-container.ts","./src/tab-card.ts","./src/tab.ts","./src/tab-button.ts","./src/index.ts","./src/templates/tab-container.ts","./src/templates/tab.ts","./src/templates/index.ts"],"fileInfos":[{"version":"2ac9cdcfb8f8875c18d14ec5796a8b029c426f73ad6dc3ffb580c228b58d1c44","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","dc48272d7c333ccf58034c0026162576b7d50ea0e69c3b9292f803fc20720fd5","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7",{"version":"0075fa5ceda385bcdf3488e37786b5a33be730e8bc4aa3cf1e78c63891752ce8","affectsGlobalScope":true},{"version":"f296963760430fb65b4e5d91f0ed770a91c6e77455bacf8fa23a1501654ede0e","affectsGlobalScope":true},{"version":"09226e53d1cfda217317074a97724da3e71e2c545e18774484b61562afc53cd2","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"8b41361862022eb72fcc8a7f34680ac842aca802cf4bc1f915e8c620c9ce4331","affectsGlobalScope":true},{"version":"f7bd636ae3a4623c503359ada74510c4005df5b36de7f23e1db8a5c543fd176b","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"0c20f4d2358eb679e4ae8a4432bdd96c857a2960fd6800b21ec4008ec59d60ea","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"82d0d8e269b9eeac02c3bd1c9e884e85d483fcb2cd168bccd6bc54df663da031","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true},{"version":"b8deab98702588840be73d67f02412a2d45a417a3c097b2e96f7f3a42ac483d1","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"376d554d042fb409cb55b5cbaf0b2b4b7e669619493c5d18d5fa8bd67273f82a","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"c4138a3dd7cd6cf1f363ca0f905554e8d81b45844feea17786cdf1626cb8ea06","affectsGlobalScope":true},{"version":"6ff3e2452b055d8f0ec026511c6582b55d935675af67cdb67dd1dc671e8065df","affectsGlobalScope":true},{"version":"03de17b810f426a2f47396b0b99b53a82c1b60e9cba7a7edda47f9bb077882f4","affectsGlobalScope":true},{"version":"8184c6ddf48f0c98429326b428478ecc6143c27f79b79e85740f17e6feb090f1","affectsGlobalScope":true},{"version":"261c4d2cf86ac5a89ad3fb3fafed74cbb6f2f7c1d139b0540933df567d64a6ca","affectsGlobalScope":true},{"version":"6af1425e9973f4924fca986636ac19a0cf9909a7e0d9d3009c349e6244e957b6","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"15a630d6817718a2ddd7088c4f83e4673fde19fa992d2eae2cf51132a302a5d3","affectsGlobalScope":true},{"version":"f35a831e4f0fe3b3697f4a0fe0e3caa7624c92b78afbecaf142c0f93abfaf379","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},"7a1971efcba559ea9002ada4c4e3c925004fb67a755300d53b5edf9399354900","7a32eb197b39b1829c1e0490e89203a439c1a363991af2475c08b2fc53acf8da",{"version":"43157af160186026ab64fb0b618b19e8fcfe5427e9f72b93b7e86266707e8a14","signature":"4272b1b18af2ee717d5ee74400c801837c5a9ac2509d792c177827fd6d7c563a"},{"version":"61b8b1a87df8810b18d96e5540ce18140708b6ff9bcd6e0a41da5b01834dd77f","signature":"903336d4b0a83371879de11f43ac82d819d200198638bc27d1c5324575863569"},{"version":"238cb2e5631df02a956818b040cd96afce8122420629ef0999fec94d182badb4","signature":"829f6c08106f30bc9ab6df22d69aac9fe59e6d501e76324225e7ea638b9460f9"},{"version":"43764e902042ce56678cfdf9b932aae1e51d50c1c68fa2c536f20882b0f0cd9b","signature":"1e29443446bc89c0d939030c3c55e8476a81f64da3fa633f108370bb9ef56f39"},{"version":"0f300668d702080921c78d3c4edd493925de582dce2a50c0993ac4b8c62bb7d4","signature":"88132cd35f670e57b6d85e802f4453aff313270908886369da0561fbc599c354"},{"version":"b668e19c84a1d923f78e4def083d7eb2cb0cc7b834d38e130be5a60f33d2a41f","signature":"ce7354820bf2fb9fad3221a704dbede20b61e9f30f384128b3be81f685c63a08"},{"version":"9958af937b59735fadadb4cac852bdde6aea78bfcf803deecc2f63a2f3127918","signature":"b21130ee402d2f055d24259958864b717e89897989b3663d6fe8fafbf692dd7f"},{"version":"66603f5a0bd2d7052120523791e8edb77078229aaf5314522886798ce92151bb","signature":"05890472fb38b7b901355c9294924f1da43644a9150fe916eab7b020d77aadb6"}],"root":[[38,45]],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"esModuleInterop":false,"experimentalDecorators":true,"importHelpers":true,"inlineSources":true,"module":99,"noEmitOnError":true,"outDir":"./dist","rootDir":"./src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":5},"fileIdsList":[[36,38,39,40,41],[36,37,40],[36,37,38],[36,37,39],[36,37],[36,43,44],[36],[38,39,40,41],[37,40],[37],[37,39]],"referencedMap":[[42,1],[41,2],[39,3],[38,4],[40,5],[45,6],[43,7],[44,7]],"exportedModulesMap":[[42,8],[41,9],[39,10],[38,11],[40,10]],"semanticDiagnosticsPerFile":[37,36,34,35,7,9,8,2,10,11,12,13,14,15,16,17,3,4,18,22,19,20,21,23,24,25,5,26,27,28,29,6,33,30,31,32,1,42,41,39,38,40,45,43,44]},"version":"5.2.2"}
1
+ {"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/typescript/lib/lib.decorators.d.ts","../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../node_modules/tslib/tslib.d.ts","../../node_modules/@hatiolab/things-scene/things-scene.d.ts","./src/tab-container.ts","./src/tab-card.ts","./src/tab-button.ts","./src/tab.ts","./src/index.ts","./src/templates/tab-container.ts","./src/templates/tab.ts","./src/templates/index.ts"],"fileInfos":[{"version":"2ac9cdcfb8f8875c18d14ec5796a8b029c426f73ad6dc3ffb580c228b58d1c44","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","dc48272d7c333ccf58034c0026162576b7d50ea0e69c3b9292f803fc20720fd5","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7",{"version":"0075fa5ceda385bcdf3488e37786b5a33be730e8bc4aa3cf1e78c63891752ce8","affectsGlobalScope":true},{"version":"f296963760430fb65b4e5d91f0ed770a91c6e77455bacf8fa23a1501654ede0e","affectsGlobalScope":true},{"version":"09226e53d1cfda217317074a97724da3e71e2c545e18774484b61562afc53cd2","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"8b41361862022eb72fcc8a7f34680ac842aca802cf4bc1f915e8c620c9ce4331","affectsGlobalScope":true},{"version":"f7bd636ae3a4623c503359ada74510c4005df5b36de7f23e1db8a5c543fd176b","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"0c20f4d2358eb679e4ae8a4432bdd96c857a2960fd6800b21ec4008ec59d60ea","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"82d0d8e269b9eeac02c3bd1c9e884e85d483fcb2cd168bccd6bc54df663da031","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true},{"version":"b8deab98702588840be73d67f02412a2d45a417a3c097b2e96f7f3a42ac483d1","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"376d554d042fb409cb55b5cbaf0b2b4b7e669619493c5d18d5fa8bd67273f82a","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"c4138a3dd7cd6cf1f363ca0f905554e8d81b45844feea17786cdf1626cb8ea06","affectsGlobalScope":true},{"version":"6ff3e2452b055d8f0ec026511c6582b55d935675af67cdb67dd1dc671e8065df","affectsGlobalScope":true},{"version":"03de17b810f426a2f47396b0b99b53a82c1b60e9cba7a7edda47f9bb077882f4","affectsGlobalScope":true},{"version":"8184c6ddf48f0c98429326b428478ecc6143c27f79b79e85740f17e6feb090f1","affectsGlobalScope":true},{"version":"261c4d2cf86ac5a89ad3fb3fafed74cbb6f2f7c1d139b0540933df567d64a6ca","affectsGlobalScope":true},{"version":"6af1425e9973f4924fca986636ac19a0cf9909a7e0d9d3009c349e6244e957b6","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"15a630d6817718a2ddd7088c4f83e4673fde19fa992d2eae2cf51132a302a5d3","affectsGlobalScope":true},{"version":"f35a831e4f0fe3b3697f4a0fe0e3caa7624c92b78afbecaf142c0f93abfaf379","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},"7a1971efcba559ea9002ada4c4e3c925004fb67a755300d53b5edf9399354900","7a32eb197b39b1829c1e0490e89203a439c1a363991af2475c08b2fc53acf8da",{"version":"43157af160186026ab64fb0b618b19e8fcfe5427e9f72b93b7e86266707e8a14","signature":"4272b1b18af2ee717d5ee74400c801837c5a9ac2509d792c177827fd6d7c563a"},{"version":"61b8b1a87df8810b18d96e5540ce18140708b6ff9bcd6e0a41da5b01834dd77f","signature":"903336d4b0a83371879de11f43ac82d819d200198638bc27d1c5324575863569"},{"version":"068cb3bf28e623cc10c030b3530b36fe8f62cfe835e537d819a2fce13ea82069","signature":"021a7c1be310ba85bf00556b0caf252ebd327042e3b469ac9c1c58f5a9ce6370"},{"version":"5c0b95b23a0fde245ff0b23bd9b7acfc36113e343cff0aead0364d50cf1698c2","signature":"b53d976bb1f6724b4c0cddbb416f52b79e20adc9c7efb5aac5f9da2861c46439"},{"version":"0f300668d702080921c78d3c4edd493925de582dce2a50c0993ac4b8c62bb7d4","signature":"88132cd35f670e57b6d85e802f4453aff313270908886369da0561fbc599c354"},{"version":"b668e19c84a1d923f78e4def083d7eb2cb0cc7b834d38e130be5a60f33d2a41f","signature":"ce7354820bf2fb9fad3221a704dbede20b61e9f30f384128b3be81f685c63a08"},{"version":"9958af937b59735fadadb4cac852bdde6aea78bfcf803deecc2f63a2f3127918","signature":"b21130ee402d2f055d24259958864b717e89897989b3663d6fe8fafbf692dd7f"},{"version":"66603f5a0bd2d7052120523791e8edb77078229aaf5314522886798ce92151bb","signature":"05890472fb38b7b901355c9294924f1da43644a9150fe916eab7b020d77aadb6"}],"root":[[38,45]],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"esModuleInterop":false,"experimentalDecorators":true,"importHelpers":true,"inlineSources":true,"module":99,"noEmitOnError":true,"outDir":"./dist","rootDir":"./src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":5},"fileIdsList":[[36,38,39,40,41],[36,37,41],[36,37,38],[36,37,39],[36,37,40],[36,43,44],[36],[38,39,40,41],[37],[37,39]],"referencedMap":[[42,1],[40,2],[39,3],[38,4],[41,5],[45,6],[43,7],[44,7]],"exportedModulesMap":[[42,8],[40,9],[39,9],[38,10],[41,9]],"semanticDiagnosticsPerFile":[37,36,34,35,7,9,8,2,10,11,12,13,14,15,16,17,3,4,18,22,19,20,21,23,24,25,5,26,27,28,29,6,33,30,31,32,1,42,40,39,38,41,45,43,44]},"version":"5.2.2"}