@wcardinal/wcardinal-ui 0.241.0 → 0.243.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/dist/types/wcardinal/ui/d-base.d.ts +9 -1
  2. package/dist/types/wcardinal/ui/shape/e-shape-connector-edge-impl.d.ts +1 -0
  3. package/dist/types/wcardinal/ui/shape/e-shape-connector-edge.d.ts +2 -0
  4. package/dist/wcardinal/ui/d-base.js +69 -46
  5. package/dist/wcardinal/ui/d-base.js.map +1 -1
  6. package/dist/wcardinal/ui/shape/e-shape-connector-edge-impl.js +7 -0
  7. package/dist/wcardinal/ui/shape/e-shape-connector-edge-impl.js.map +1 -1
  8. package/dist/wcardinal/ui/shape/e-shape-connector-edge.js.map +1 -1
  9. package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-axis-x-datetime.js +41 -37
  10. package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-axis-x-datetime.js.map +1 -1
  11. package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-coordinate-tick.js +11 -7
  12. package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-coordinate-tick.js.map +1 -1
  13. package/dist/wcardinal/ui/theme/white/d-theme-white-chart-axis-x-datetime.js +41 -37
  14. package/dist/wcardinal/ui/theme/white/d-theme-white-chart-axis-x-datetime.js.map +1 -1
  15. package/dist/wcardinal/ui/theme/white/d-theme-white-chart-coordinate-tick.js +11 -7
  16. package/dist/wcardinal/ui/theme/white/d-theme-white-chart-coordinate-tick.js.map +1 -1
  17. package/dist/wcardinal-ui-theme-dark.js +53 -45
  18. package/dist/wcardinal-ui-theme-dark.min.js +2 -2
  19. package/dist/wcardinal-ui-theme-dark.min.js.map +1 -1
  20. package/dist/wcardinal-ui-theme-white.js +53 -45
  21. package/dist/wcardinal-ui-theme-white.min.js +2 -2
  22. package/dist/wcardinal-ui-theme-white.min.js.map +1 -1
  23. package/dist/wcardinal-ui.cjs.js +181 -135
  24. package/dist/wcardinal-ui.js +77 -47
  25. package/dist/wcardinal-ui.min.js +2 -2
  26. package/dist/wcardinal-ui.min.js.map +1 -1
  27. package/package.json +1 -1
@@ -334,9 +334,17 @@ export interface DBaseOptions<THEME extends DThemeBase = DThemeBase, EMITTER = a
334
334
  * A visibility.
335
335
  * Set to true to make {@link DBase} visible.
336
336
  * Set to false to make {@link DBase} invisible.
337
- * The default values is true.
337
+ * The default value is true.
338
338
  */
339
339
  visible?: boolean;
340
+ /**
341
+ * A renderability.
342
+ * Unlike {@link visible}, non-renderable element occupies a space.
343
+ * Set to true to make {@link DBase} renderable.
344
+ * Set to false to make {@link DBase} not renderable.
345
+ * The default value is true.
346
+ */
347
+ renderable?: boolean;
340
348
  /** A default state. */
341
349
  state?: string | string[];
342
350
  /** An interactivity option. */
@@ -26,6 +26,7 @@ export declare class EShapeConnectorEdgeImpl implements EShapeConnectorEdge {
26
26
  constructor(parent: EShapeConnector, onChange: () => void);
27
27
  lock(): void;
28
28
  unlock(): void;
29
+ get parent(): EShapeConnector;
29
30
  get acceptor(): EShapeConnectorEdgeAcceptor;
30
31
  get local(): IPoint;
31
32
  get localId(): number;
@@ -1,5 +1,6 @@
1
1
  import { IPoint } from "pixi.js";
2
2
  import { EShape } from "./e-shape";
3
+ import { EShapeConnector } from "./e-shape-connector";
3
4
  import { EShapeConnectorEdgeAcceptor } from "./e-shape-connector-edge-acceptor";
4
5
  import { EShapeResourceManagerDeserialization } from "./e-shape-resource-manager-deserialization";
5
6
  import { EShapeResourceManagerSerialization } from "./e-shape-resource-manager-serialization";
@@ -14,6 +15,7 @@ export declare type EShapeConnectorEdgeSerialized = [
14
15
  number?
15
16
  ];
16
17
  export interface EShapeConnectorEdge {
18
+ readonly parent: EShapeConnector;
17
19
  readonly acceptor: EShapeConnectorEdgeAcceptor;
18
20
  readonly local: IPoint;
19
21
  readonly localId: number;
@@ -150,9 +150,18 @@ var DBase = /** @class */ (function (_super) {
150
150
  _this._height = 100;
151
151
  }
152
152
  // Visibility
153
- var visible = options === null || options === void 0 ? void 0 : options.visible;
154
- if (visible != null) {
155
- _this.visible = visible;
153
+ if (options != null) {
154
+ var visible = options.visible;
155
+ if (visible != null) {
156
+ _this.visible = visible;
157
+ }
158
+ }
159
+ // Renderability
160
+ if (options != null) {
161
+ var renderable = options.renderable;
162
+ if (renderable != null) {
163
+ _this.renderable = renderable;
164
+ }
156
165
  }
157
166
  // State
158
167
  _this._state = new DBaseStateSetImplObservable(function (newState, oldState) {
@@ -163,12 +172,14 @@ var DBase = /** @class */ (function (_super) {
163
172
  _this.interactive = !!(interactive & DBaseInteractive.SELF);
164
173
  _this.interactiveChildren = !!(interactive & DBaseInteractive.CHILDREN);
165
174
  // Events
166
- var on = options === null || options === void 0 ? void 0 : options.on;
167
- if (on) {
168
- for (var name_1 in on) {
169
- var handler = on[name_1];
170
- if (handler) {
171
- _this.on(name_1, handler);
175
+ if (options != null) {
176
+ var on = options.on;
177
+ if (on != null) {
178
+ for (var name_1 in on) {
179
+ var handler = on[name_1];
180
+ if (handler) {
181
+ _this.on(name_1, handler);
182
+ }
172
183
  }
173
184
  }
174
185
  }
@@ -182,9 +193,12 @@ var DBase = /** @class */ (function (_super) {
182
193
  _this._onShadowUpdateBound = function () {
183
194
  DApplications.update(_this);
184
195
  };
185
- var shadow = options === null || options === void 0 ? void 0 : options.shadow;
186
- if (shadow === undefined) {
187
- shadow = theme.getShadow();
196
+ var shadow;
197
+ if (options != null) {
198
+ shadow = options.shadow;
199
+ if (shadow === undefined) {
200
+ shadow = theme.getShadow();
201
+ }
188
202
  }
189
203
  if (shadow) {
190
204
  if (isString(shadow)) {
@@ -249,33 +263,42 @@ var DBase = /** @class */ (function (_super) {
249
263
  _this.init(options);
250
264
  // State Override
251
265
  theme.newState(_this._state);
252
- var state = options === null || options === void 0 ? void 0 : options.state;
253
- if (state != null) {
254
- if (isString(state)) {
255
- _this._state.add(state);
256
- }
257
- else {
258
- _this._state.addAll(state);
266
+ if (options != null) {
267
+ var state = options.state;
268
+ if (state != null) {
269
+ if (isString(state)) {
270
+ _this._state.add(state);
271
+ }
272
+ else {
273
+ _this._state.addAll(state);
274
+ }
259
275
  }
260
276
  }
261
277
  // Parent
262
- var parent = options === null || options === void 0 ? void 0 : options.parent;
263
- if (parent != null) {
264
- parent.addChild(_this);
278
+ if (options != null) {
279
+ var parent_1 = options.parent;
280
+ if (parent_1 != null) {
281
+ parent_1.addChild(_this);
282
+ }
265
283
  }
266
284
  // Children
267
- var children = options === null || options === void 0 ? void 0 : options.children;
268
- if (children != null) {
269
- for (var i = 0, imax = children.length; i < imax; ++i) {
270
- var child = children[i];
271
- if (child != null) {
272
- _this.addChild(child);
285
+ if (options != null) {
286
+ var children = options.children;
287
+ if (children != null) {
288
+ for (var i = 0, imax = children.length; i < imax; ++i) {
289
+ var child = children[i];
290
+ if (child != null) {
291
+ _this.addChild(child);
292
+ }
273
293
  }
274
294
  }
275
295
  }
276
296
  // Cursor
277
- var cursor = options === null || options === void 0 ? void 0 : options.cursor;
278
- _this._cursor = cursor;
297
+ var cursor;
298
+ if (options != null) {
299
+ cursor = options.cursor;
300
+ _this._cursor = cursor;
301
+ }
279
302
  _this.cursor = _this.toCursor(cursor, _this._state);
280
303
  // Done
281
304
  _this.emit("init", _this);
@@ -361,9 +384,9 @@ var DBase = /** @class */ (function (_super) {
361
384
  var scalarSet = this._scalarSet;
362
385
  if (scalarSet.x != null) {
363
386
  var position = this._position;
364
- var parent_1 = this.getParentOfSize();
365
- if (parent_1) {
366
- this._position.x = scalarSet.x(parent_1.width, newWidth, parent_1.padding.getLeft(), position.x);
387
+ var parent_2 = this.getParentOfSize();
388
+ if (parent_2) {
389
+ this._position.x = scalarSet.x(parent_2.width, newWidth, parent_2.padding.getLeft(), position.x);
367
390
  }
368
391
  }
369
392
  }
@@ -371,9 +394,9 @@ var DBase = /** @class */ (function (_super) {
371
394
  var scalarSet = this._scalarSet;
372
395
  if (scalarSet.y != null) {
373
396
  var position = this._position;
374
- var parent_2 = this.getParentOfSize();
375
- if (parent_2) {
376
- this._position.y = scalarSet.y(parent_2.height, newHeight, parent_2.padding.getTop(), position.y);
397
+ var parent_3 = this.getParentOfSize();
398
+ if (parent_3) {
399
+ this._position.y = scalarSet.y(parent_3.height, newHeight, parent_3.padding.getTop(), position.y);
377
400
  }
378
401
  }
379
402
  }
@@ -530,9 +553,9 @@ var DBase = /** @class */ (function (_super) {
530
553
  this.onResize(width, height, oldWidth, height);
531
554
  if (scalarSet.x != null) {
532
555
  var position = this._position;
533
- var parent_3 = this.getParentOfSize();
534
- if (parent_3) {
535
- position.x = scalarSet.x(parent_3.width, width, parent_3.padding.getLeft(), position.x);
556
+ var parent_4 = this.getParentOfSize();
557
+ if (parent_4) {
558
+ position.x = scalarSet.x(parent_4.width, width, parent_4.padding.getLeft(), position.x);
536
559
  }
537
560
  }
538
561
  }
@@ -585,9 +608,9 @@ var DBase = /** @class */ (function (_super) {
585
608
  this.onResize(width, height, width, oldHeight);
586
609
  if (scalarSet.y != null) {
587
610
  var position = this._position;
588
- var parent_4 = this.getParentOfSize();
589
- if (parent_4) {
590
- position.y = scalarSet.y(parent_4.height, height, parent_4.padding.getTop(), position.y);
611
+ var parent_5 = this.getParentOfSize();
612
+ if (parent_5) {
613
+ position.y = scalarSet.y(parent_5.height, height, parent_5.padding.getTop(), position.y);
591
614
  }
592
615
  }
593
616
  }
@@ -1072,11 +1095,11 @@ var DBase = /** @class */ (function (_super) {
1072
1095
  return true;
1073
1096
  }
1074
1097
  else if (target != null && !(target instanceof DBase && target.interactive)) {
1075
- var parent_5 = target.parent;
1076
- while (parent_5 != null && !(parent_5 instanceof DBase && parent_5.interactive)) {
1077
- parent_5 = parent_5.parent;
1098
+ var parent_6 = target.parent;
1099
+ while (parent_6 != null && !(parent_6 instanceof DBase && parent_6.interactive)) {
1100
+ parent_6 = parent_6.parent;
1078
1101
  }
1079
- return parent_5 === this;
1102
+ return parent_6 === this;
1080
1103
  }
1081
1104
  return false;
1082
1105
  };