@wcardinal/wcardinal-ui 0.355.0 → 0.356.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.
- package/dist/types/wcardinal/ui/d-diagram-canvas-base.d.ts +4 -0
- package/dist/types/wcardinal/ui/d-diagram-serialized.d.ts +2 -0
- package/dist/wcardinal/ui/d-diagram-canvas-base.js +24 -7
- package/dist/wcardinal/ui/d-diagram-canvas-base.js.map +1 -1
- package/dist/wcardinal/ui/d-diagram-serialized.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark.js +1 -1
- package/dist/wcardinal-ui-theme-dark.min.js +1 -1
- package/dist/wcardinal-ui-theme-white.js +1 -1
- package/dist/wcardinal-ui-theme-white.min.js +1 -1
- package/dist/wcardinal-ui.cjs.js +25 -8
- package/dist/wcardinal-ui.js +25 -8
- package/dist/wcardinal-ui.min.js +2 -2
- package/dist/wcardinal-ui.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -10,6 +10,7 @@ export interface DDiagramCanvasBackgroundOptions extends DBaseBackgroundOptions
|
|
|
10
10
|
}
|
|
11
11
|
export interface DDiagramCanvasBaseOptions<THEME extends DThemeDiagramCanvasBase = DThemeDiagramCanvasBase> extends DCanvasOptions<THEME> {
|
|
12
12
|
label?: string;
|
|
13
|
+
category?: string;
|
|
13
14
|
summary?: string;
|
|
14
15
|
description?: string;
|
|
15
16
|
tile?: DDiagramCanvasTileOptions;
|
|
@@ -23,6 +24,7 @@ export interface DThemeDiagramCanvasBase extends DThemeCanvas {
|
|
|
23
24
|
export declare class DDiagramCanvasBase<THEME extends DThemeDiagramCanvasBase = DThemeDiagramCanvasBase, OPTIONS extends DDiagramCanvasBaseOptions<THEME> = DDiagramCanvasBaseOptions<THEME>> extends DCanvas<THEME, OPTIONS> {
|
|
24
25
|
protected _layer: DDiagramLayerContainer;
|
|
25
26
|
protected _label: string;
|
|
27
|
+
protected _category: string;
|
|
26
28
|
protected _summary: string;
|
|
27
29
|
protected _description: string;
|
|
28
30
|
protected _tile: DDiagramCanvasTile;
|
|
@@ -31,6 +33,8 @@ export declare class DDiagramCanvasBase<THEME extends DThemeDiagramCanvasBase =
|
|
|
31
33
|
protected toBackgroundBase(theme: THEME, options?: OPTIONS): number | null;
|
|
32
34
|
get label(): string;
|
|
33
35
|
set label(label: string);
|
|
36
|
+
get category(): string;
|
|
37
|
+
set category(category: string);
|
|
34
38
|
get summary(): string;
|
|
35
39
|
set summary(summary: string);
|
|
36
40
|
get description(): string;
|
|
@@ -425,6 +425,7 @@ export interface DDiagramSerialized {
|
|
|
425
425
|
label?: string;
|
|
426
426
|
width: number;
|
|
427
427
|
height: number;
|
|
428
|
+
category?: string;
|
|
428
429
|
summary?: string;
|
|
429
430
|
description?: string;
|
|
430
431
|
background?: DDiagramSerializedBackground;
|
|
@@ -448,6 +449,7 @@ export interface DDiagramSerializedSimple {
|
|
|
448
449
|
id: number | undefined;
|
|
449
450
|
name: string;
|
|
450
451
|
label?: string;
|
|
452
|
+
category?: string;
|
|
451
453
|
summary?: string;
|
|
452
454
|
description?: string;
|
|
453
455
|
/**
|
|
@@ -11,7 +11,7 @@ var DDiagramCanvasBase = /** @class */ (function (_super) {
|
|
|
11
11
|
__extends(DDiagramCanvasBase, _super);
|
|
12
12
|
function DDiagramCanvasBase(options) {
|
|
13
13
|
var _this = this;
|
|
14
|
-
var _a, _b, _c;
|
|
14
|
+
var _a, _b, _c, _d;
|
|
15
15
|
_this = _super.call(this, options) || this;
|
|
16
16
|
// Background
|
|
17
17
|
var theme = _this.theme;
|
|
@@ -22,12 +22,19 @@ var DDiagramCanvasBase = /** @class */ (function (_super) {
|
|
|
22
22
|
var layer = new DDiagramLayerContainer(_this.width, _this.height);
|
|
23
23
|
_this._layer = layer;
|
|
24
24
|
_this.addChild(layer);
|
|
25
|
-
// Label
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
// Label, Category, Summary and Description
|
|
26
|
+
if (options != null) {
|
|
27
|
+
_this._label = (_a = options.label) !== null && _a !== void 0 ? _a : "";
|
|
28
|
+
_this._category = (_b = options.category) !== null && _b !== void 0 ? _b : "";
|
|
29
|
+
_this._summary = (_c = options.summary) !== null && _c !== void 0 ? _c : "";
|
|
30
|
+
_this._description = (_d = options.description) !== null && _d !== void 0 ? _d : "";
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
_this._label = "";
|
|
34
|
+
_this._category = "";
|
|
35
|
+
_this._summary = "";
|
|
36
|
+
_this._description = "";
|
|
37
|
+
}
|
|
31
38
|
// Tile
|
|
32
39
|
var tile = new DDiagramCanvasTile(_this, options === null || options === void 0 ? void 0 : options.tile);
|
|
33
40
|
_this._tile = tile;
|
|
@@ -52,6 +59,16 @@ var DDiagramCanvasBase = /** @class */ (function (_super) {
|
|
|
52
59
|
enumerable: false,
|
|
53
60
|
configurable: true
|
|
54
61
|
});
|
|
62
|
+
Object.defineProperty(DDiagramCanvasBase.prototype, "category", {
|
|
63
|
+
get: function () {
|
|
64
|
+
return this._category;
|
|
65
|
+
},
|
|
66
|
+
set: function (category) {
|
|
67
|
+
this._category = category;
|
|
68
|
+
},
|
|
69
|
+
enumerable: false,
|
|
70
|
+
configurable: true
|
|
71
|
+
});
|
|
55
72
|
Object.defineProperty(DDiagramCanvasBase.prototype, "summary", {
|
|
56
73
|
get: function () {
|
|
57
74
|
return this._summary;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"d-diagram-canvas-base.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-diagram-canvas-base.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAIH,OAAO,EAAE,OAAO,EAAgC,MAAM,YAAY,CAAC;AACnE,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAA6B,MAAM,yBAAyB,CAAC;AAExF,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,C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AC,AAhID,CAGU,OAAO,GA6HhB","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { IPoint } from \"pixi.js\";\nimport { DBaseBackgroundOptions } from \"./d-base\";\nimport { DCanvas, DCanvasOptions, DThemeCanvas } from \"./d-canvas\";\nimport { DDiagramCanvasEditorBackground } from \"./d-diagram-canvas-editor-background\";\nimport { DDiagramCanvasTile, DDiagramCanvasTileOptions } from \"./d-diagram-canvas-tile\";\nimport { DDiagramDataMapper } from \"./d-diagram-data-mapper\";\nimport { DDiagramLayerContainer } from \"./d-diagram-layer-container\";\nimport { EShape } from \"./shape/e-shape\";\n\nexport interface DDiagramCanvasBackgroundOptions extends DBaseBackgroundOptions {\n\tbase?: number | null;\n}\n\nexport interface DDiagramCanvasBaseOptions<\n\tTHEME extends DThemeDiagramCanvasBase = DThemeDiagramCanvasBase\n> extends DCanvasOptions<THEME> {\n\tlabel?: string;\n\tcategory?: string;\n\tsummary?: string;\n\tdescription?: string;\n\ttile?: DDiagramCanvasTileOptions;\n\tbackground?: DDiagramCanvasBackgroundOptions;\n\tambient?: boolean;\n}\n\nexport interface DThemeDiagramCanvasBase extends DThemeCanvas {\n\tisAmbient(): boolean;\n\tgetBackgroundBase(): number | null;\n}\n\nexport class DDiagramCanvasBase<\n\tTHEME extends DThemeDiagramCanvasBase = DThemeDiagramCanvasBase,\n\tOPTIONS extends DDiagramCanvasBaseOptions<THEME> = DDiagramCanvasBaseOptions<THEME>\n> extends DCanvas<THEME, OPTIONS> {\n\tprotected _layer: DDiagramLayerContainer;\n\tprotected _label: string;\n\tprotected _category: string;\n\tprotected _summary: string;\n\tprotected _description: string;\n\tprotected _tile: DDiagramCanvasTile;\n\n\tconstructor(options?: OPTIONS) {\n\t\tsuper(options);\n\n\t\t// Background\n\t\tconst theme = this.theme;\n\t\tif (!this.isAmbient(theme, options)) {\n\t\t\tthis._background = new DDiagramCanvasEditorBackground(\n\t\t\t\tthis._background,\n\t\t\t\tthis.toBackgroundBase(theme, options)\n\t\t\t);\n\t\t}\n\n\t\t// Layer\n\t\tconst layer = new DDiagramLayerContainer(this.width, this.height);\n\t\tthis._layer = layer;\n\t\tthis.addChild(layer);\n\n\t\t// Label, Category, Summary and Description\n\t\tif (options != null) {\n\t\t\tthis._label = options.label ?? \"\";\n\t\t\tthis._category = options.category ?? \"\";\n\t\t\tthis._summary = options.summary ?? \"\";\n\t\t\tthis._description = options.description ?? \"\";\n\t\t} else {\n\t\t\tthis._label = \"\";\n\t\t\tthis._category = \"\";\n\t\t\tthis._summary = \"\";\n\t\t\tthis._description = \"\";\n\t\t}\n\n\t\t// Tile\n\t\tconst tile = new DDiagramCanvasTile(this, options?.tile);\n\t\tthis._tile = tile;\n\t\ttile.init();\n\t}\n\n\tprotected isAmbient(theme: THEME, options?: OPTIONS): boolean {\n\t\treturn options?.ambient ?? theme.isAmbient();\n\t}\n\n\tprotected toBackgroundBase(theme: THEME, options?: OPTIONS): number | null {\n\t\treturn options?.background?.base ?? theme.getBackgroundBase();\n\t}\n\n\tget label(): string {\n\t\treturn this._label;\n\t}\n\n\tset label(label: string) {\n\t\tthis._label = label;\n\t}\n\n\tget category(): string {\n\t\treturn this._category;\n\t}\n\n\tset category(category: string) {\n\t\tthis._category = category;\n\t}\n\n\tget summary(): string {\n\t\treturn this._summary;\n\t}\n\n\tset summary(summary: string) {\n\t\tthis._summary = summary;\n\t}\n\n\tget description(): string {\n\t\treturn this._description;\n\t}\n\n\tset description(description: string) {\n\t\tthis._description = description;\n\t}\n\n\tget tile(): DDiagramCanvasTile {\n\t\treturn this._tile;\n\t}\n\n\tget layer(): DDiagramLayerContainer {\n\t\treturn this._layer;\n\t}\n\n\tinitialize(shapes: EShape[], mapper?: DDiagramDataMapper | null): void {\n\t\t// DO NOTHING\n\t}\n\n\tdestroy(): void {\n\t\tif (!this._destroyed) {\n\t\t\tthis.onDestroy();\n\t\t\tsuper.destroy();\n\t\t}\n\t}\n\n\tprotected onDestroy(): void {\n\t\tthis._tile.destroy();\n\t\tthis._layer.destroy();\n\t}\n\n\thitTest(global: IPoint, onHit?: (shape: EShape) => boolean): EShape | null {\n\t\tconst layers = this._layer.children;\n\t\tfor (let i = layers.length - 1; 0 <= i; --i) {\n\t\t\tconst layer = layers[i];\n\t\t\tif (layer.visible) {\n\t\t\t\tconst shape = layer.hitTest(global, onHit);\n\t\t\t\tif (shape != null) {\n\t\t\t\t\treturn shape;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\n\tprotected getType(): string {\n\t\treturn \"DDiagramCanvasBase\";\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"d-diagram-serialized.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-diagram-serialized.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAiBH,MAAM,CAAC,IAAM,yBAAyB,GAAW,CAAC,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DDiagramCanvasTileMapping } from \"./d-diagram-canvas-mapping\";\nimport { EShapeCorner } from \"./shape/e-shape-corner\";\nimport { EShapeStrokeSide } from \"./shape/e-shape-stroke-side\";\nimport { EShapeStrokeStyle } from \"./shape/e-shape-stroke-style\";\nimport { EShapeDataValueOrder } from \"./shape/e-shape-data-value-order\";\nimport { EShapeTextStyle, EShapeTextWeight } from \"./shape/e-shape-text\";\nimport { EShapeTextAlignHorizontal } from \"./shape/e-shape-text-align-horizontal\";\nimport { EShapeTextAlignVertical } from \"./shape/e-shape-text-align-vertical\";\nimport { EShapeTextDirection } from \"./shape/e-shape-text-direction\";\nimport { EShapeType } from \"./shape/e-shape-type\";\nimport { ESnapperTargetValueType } from \"./snapper/e-snapper-target-value\";\nimport { EShapeDataValueRangeType } from \"./shape/e-shape-data-value-range\";\nimport { EShapeDataValueType } from \"./shape/e-shape-data-value-type\";\nimport { EShapeDataValueScope } from \"./shape/e-shape-data-value-scope\";\n\nexport const DDiagramSerializedVersion: number = 1;\n\n/**\n * A serialized data range.\n */\nexport interface DDiagramSerializedDataRange {\n\t/** A type. */\n\t[0]: EShapeDataValueRangeType;\n\n\t/** A lower bound. */\n\t[1]: number;\n\n\t/** An upper bound. */\n\t[2]: number;\n}\n\n/**\n * A serialized data value.\n */\nexport interface DDiagramSerializedDataValue {\n\t/**\n\t * A resource index number of an ID.\n\t */\n\t[0]: number;\n\n\t/**\n\t * A resource index number of an initial value expression.\n\t */\n\t[1]: number;\n\n\t/**\n\t * A resource index number of a format expression.\n\t */\n\t[2]: number;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedDataRange).\n\t */\n\t[3]: number;\n\n\t/**\n\t * A capacity.\n\t */\n\t[4]: number;\n\n\t/**\n\t * A order.\n\t */\n\t[5]: EShapeDataValueOrder;\n\n\t/**\n\t * A type.\n\t */\n\t[6]: EShapeDataValueType | undefined;\n\n\t/**\n\t * A scope.\n\t */\n\t[7]: EShapeDataValueScope | undefined;\n\n\t/**\n\t * A resource index number of an alias.\n\t */\n\t[8]: number | undefined;\n}\n\n/**\n * A serialized system data.\n */\nexport type DDiagramSerializedDataSystem = number[];\n\n/**\n * A serialized data mapping.\n * Each number at the index 2N+0 is a resource index number of the N-th mapping source.\n * Each number at the index 2N+1 is a resource index number of the N-th mapping destination.\n */\nexport type DDiagramSerializedDataMapping = number[];\n\n/**\n * A serialized data with a mapping data.\n */\nexport interface DDiagramSerializedDataWithMapping extends Array<unknown> {\n\t/**\n\t * Each number is a resource index number of JSON.stringify(DDiagramSerializedDataValue).\n\t * The last number is a resource index number of JSON.stringify(DDiagramSerializedDataMapping).\n\t */\n\t[0]: number[];\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedDataSystem).\n\t */\n\t[1]: number | undefined;\n}\n\n/**\n * A serialized data without a mapping data.\n * Each number is a resource index number of JSON.stringify(DDiagramSerializedDataValue).\n */\nexport type DDiagramSerializedDataWithoutMapping = number[];\n\n/**\n * A serialized data.\n */\nexport type DDiagramSerializedData =\n\t| DDiagramSerializedDataWithoutMapping\n\t| DDiagramSerializedDataWithMapping;\n\n/**\n * A serialized fill.\n */\nexport interface DDiagramSerializedFill {\n\t/** 0: Disabled, 1: Enabled */\n\t[0]: number;\n\n\t/** A color. */\n\t[1]: number;\n\n\t/** An alpha. */\n\t[2]: number;\n}\n\n/**\n * A serialized stroke.\n */\nexport interface DDiagramSerializedStroke {\n\t/** 0: Disabled, 1: Enabled */\n\t[0]: number;\n\n\t/** A color. */\n\t[1]: number;\n\n\t/** An alpha. */\n\t[2]: number;\n\n\t/** A width. */\n\t[3]: number;\n\n\t/** An align. */\n\t[4]: number;\n\n\t/** A side. */\n\t[5]: EShapeStrokeSide;\n\n\t/** A style */\n\t[6]: EShapeStrokeStyle | undefined;\n}\n\n/**\n * A serialized text outline.\n */\nexport interface DDiagramSerializedTextOutline {\n\t/** 0: Disabled, 1: Enabled */\n\t[0]: number;\n\n\t/** A color. */\n\t[1]: number;\n\n\t/** An alpha. */\n\t[2]: number;\n\n\t/** A width. */\n\t[3]: number;\n}\n\n/**\n * A serialized text align.\n */\nexport interface DDiagramSerializedTextAlign {\n\t/** A horizontal align. */\n\t[0]: EShapeTextAlignHorizontal;\n\n\t/** A vertical align. */\n\t[1]: EShapeTextAlignVertical;\n}\n\n/**\n * A serialized text offset.\n */\nexport interface DDiagramSerializedTextOffset {\n\t/** A horizontal offset. */\n\t[0]: number;\n\n\t/** A vertical offset. */\n\t[1]: number;\n}\n\n/**\n * A serialized text spacing.\n */\nexport interface DDiagramSerializedTextSpacing {\n\t/** A horizontal spacing. */\n\t[0]: number;\n\n\t/** A vertical spacing. */\n\t[1]: number;\n}\n\n/**\n * A serialized text padding.\n */\nexport interface DDiagramSerializedTextPadding {\n\t/** A horizontal padding. */\n\t[0]: number;\n\n\t/** A vertical padding. */\n\t[1]: number;\n}\n\n/**\n * A serialized text.\n */\nexport interface DDiagramSerializedText {\n\t/** A resource index number of a value. */\n\t[0]: number;\n\n\t/** A color. */\n\t[1]: number;\n\n\t/** An alpha. */\n\t[2]: number;\n\n\t/** A resource index number of a font family. */\n\t[3]: number;\n\n\t/** A size. */\n\t[4]: number;\n\n\t/** A weight. */\n\t[5]: EShapeTextWeight;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedTextAlign).\n\t */\n\t[6]: number;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedTextOffset).\n\t */\n\t[7]: number;\n\n\t/** A style. */\n\t[8]: EShapeTextStyle;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedTextOutline).\n\t */\n\t[9]: number;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedTextSpacing).\n\t */\n\t[10]: number;\n\n\t/** A direction. */\n\t[11]: EShapeTextDirection;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedTextPadding).\n\t */\n\t[12]: number;\n\n\t/** A clipping. (0: Off, 1: On) */\n\t[13]: number;\n\n\t/** A fitting. (0: Off, 1: On) */\n\t[14]: number;\n}\n\n/**\n * A serialized item.\n */\nexport interface DDiagramSerializedItem {\n\t/** A type. */\n\t[0]: EShapeType;\n\n\t/** A resource index number of a ID. */\n\t[1]: number;\n\n\t/** A X-coordinate position. */\n\t[2]: number;\n\n\t/** A Y-coordinate position. */\n\t[3]: number;\n\n\t/** A width. */\n\t[4]: number;\n\n\t/** A height. */\n\t[5]: number;\n\n\t/** A rotation. */\n\t[6]: number;\n\n\t/** A skew. */\n\t[7]: number;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedFill).\n\t */\n\t[8]: number;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedStroke).\n\t */\n\t[9]: number;\n\n\t/** A resource index number of a cursor. */\n\t[10]: number;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedText).\n\t */\n\t[11]: number;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedData).\n\t */\n\t[12]: number;\n\n\t/** A radius. */\n\t[13]: number;\n\n\t/** A corner. */\n\t[14]: EShapeCorner;\n\n\t/** A resource index number of a shape-specific resource. */\n\t[15]: number;\n\n\t/** A layer index number. */\n\t[16]: number;\n\n\t/** Actions */\n\t[17]: number[];\n\n\t/** A resource index number of an image. */\n\t[18]: number;\n\n\t/**\n\t * A resource index number of a stringified serialized gradient.\n\t * A stringified serialized gradient is a stringified number array,\n\t * JSON.stringify(number[]).\n\t *\n\t * * The first number in the array is a direction in degree.\n\t * * Each number at the index 3N + 1 is a color of a N-th point.\n\t * * Each number at the index 3N + 2 is a alpha of a N-th point.\n\t * * Each number at the index 3N + 3 is a position of a N-th point whose range is [0, 1].\n\t */\n\t[19]: number;\n\n\t/** Children. */\n\t[20]: DDiagramSerializedItem[];\n\n\t/** A X pivot. */\n\t[21]: number;\n\n\t/** A Y pivot. */\n\t[22]: number;\n\n\t/** (interactive ? 1 : 0) | (unfocusable ? 2 : 0) */\n\t[23]: number;\n\n\t/** A resource index number of a shortcut. */\n\t[24]: number;\n\n\t/** A resource index number of a title. */\n\t[25]: number;\n\n\t/** UUID */\n\t[26]: number;\n\n\t/** Added capabilities */\n\t[27]: number;\n\n\t/** Removed capabilities */\n\t[28]: number;\n\n\t/** Locked capabilities */\n\t[29]: number;\n}\n\n/**\n * A serialized layer.\n */\nexport interface DDiagramSerializedLayer {\n\t/** A name or a resource index number of a name*/\n\t[0]: string | number;\n\n\t/**\n\t * A visibility.\n\t *\n\t * * 1st bit\n\t * * 0: Invisible when edit mode\n\t * * 1: Visible when edit mode\n\t * * 2nd bit\n\t * * 0: Invisible when non-edit mode\n\t * * 1: Visible when non-edit mode\n\t */\n\t[1]?: number;\n\n\t/** A X-coordinate position. */\n\t[2]?: number;\n\n\t/** A Y-coordinate position. */\n\t[3]?: number;\n\n\t/** A width. */\n\t[4]?: number;\n\n\t/** A height. */\n\t[5]?: number;\n\n\t/**\n\t * A resource index number of a stringified serialized fill,\n\t * JSON.stringify(DDiagramSerializedFill).\n\t */\n\t[6]?: number;\n\n\t/**\n\t * * 1st bit\n\t * * 0: Not interactive\n\t * * 1: Interactive\n\t * * 2nd bit\n\t * * 0: Not draggable\n\t * * 1: Draggable\n\t * * 3rd bit\n\t * * 0: Not pinchable\n\t * * 1: Pinchable\n\t */\n\t[7]?: number;\n}\n\n/**\n * A serialized snap target.\n */\nexport interface DDiagramSerializedSnapTargetValue {\n\t/** A type. */\n\t[0]: ESnapperTargetValueType;\n\n\t/** A position. */\n\t[1]: number;\n}\n\n/**\n * Serialized snap on guide settings.\n */\nexport interface DDiagramSerializedSnapTarget {\n\t/** Snap on guide (0: Off, 1: On) */\n\t[0]: number;\n\n\t/** A visibility (0: Invisible, 1: Visible). */\n\t[1]: number;\n\n\t/** Snap targets. */\n\t[2]: DDiagramSerializedSnapTargetValue[];\n}\n\n/**\n * Serialized grid snap settings without a visibility option.\n */\nexport interface DDiagramSerializedSnapGridWithoutVisibility {\n\t/** Snap on grid (0: Off, 1: On) */\n\t[0]: number;\n\n\t/** A grid size. */\n\t[1]: number;\n}\n\n/**\n * Serialized grid snap settings with a visibility option.\n */\nexport interface DDiagramSerializedSnapGridWithVisibility {\n\t/** Snap on grid (0: Off, 1: On) */\n\t[0]: number;\n\n\t/** A visibility (0: Invisible, 1: Visible). */\n\t[1]: number;\n\n\t/** A grid size. */\n\t[2]: number;\n}\n\n/**\n * Serialized grid snap settings with a visibility.\n */\nexport type DDiagramSerializedSnapGrid =\n\t| DDiagramSerializedSnapGridWithoutVisibility\n\t| DDiagramSerializedSnapGridWithVisibility;\n\n/**\n * Serialized snap settings.\n */\nexport interface DDiagramSerializedSnap {\n\t/** Snap (0: Off, 1: On). */\n\t[0]: number;\n\n\t/** Snap on targets */\n\t[1]: DDiagramSerializedSnapTarget;\n\n\t/** Snap on grid */\n\t[2]: DDiagramSerializedSnapGrid;\n}\n\n/**\n * Serialized background settings.\n */\nexport interface DDiagramSerializedBackground {\n\tcolor?: number | null;\n\talpha?: number;\n}\n\n/**\n * Serialized tile settings.\n */\nexport interface DDiagramSerializedTile {\n\tmapping?: DDiagramCanvasTileMapping;\n}\n\n/**\n * A serialized diagram.\n */\nexport interface DDiagramSerialized {\n\tversion: number;\n\tid?: number;\n\tname: string;\n\tlabel?: string;\n\twidth: number;\n\theight: number;\n\tsummary?: string;\n\tdescription?: string;\n\tbackground?: DDiagramSerializedBackground;\n\ttile?: DDiagramSerializedTile;\n\tresources: string[];\n\t/** @deprecated in favor of {@link data} */\n\ttags?: string[];\n\tdata?: string[];\n\tpieces?: string[];\n\tlayers: DDiagramSerializedLayer[];\n\titems: DDiagramSerializedItem[];\n\tsnap?: DDiagramSerializedSnap;\n\tthumbnail?: string;\n}\n\nexport type DDiagramSerializedSimpleData = Omit<\n\tDDiagramSerialized,\n\t\"version\" | \"id\" | \"name\" | \"thumbnail\"\n>;\n\n/**\n * A simplified version of a serialized diagram.\n */\nexport interface DDiagramSerializedSimple {\n\tversion: number;\n\tid: number | undefined;\n\tname: string;\n\tlabel?: string;\n\tsummary?: string;\n\tdescription?: string;\n\n\t/**\n\t * A stringified {@link DDiagramSerialized#data}.\n\t *\n\t * @deprecated in favor of {@link DDiagramSerializedSimpleData}.\n\t */\n\ttags?: string;\n\n\t/**\n\t * A stringified {@link DDiagramSerialized#pieces}.\n\t *\n\t * @deprecated in favor of {@link DDiagramSerializedSimpleData}.\n\t */\n\tpieces?: string;\n\n\t/**\n\t * Thumbnail data URL.\n\t */\n\tthumbnail?: string;\n\n\t/**\n\t * A stringified {@link DDiagramSerializedSimpleData}.\n\t */\n\tdata: string;\n}\n\nexport interface DDiagramSerializedName {\n\tid: number;\n\tname: string;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"d-diagram-serialized.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-diagram-serialized.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAiBH,MAAM,CAAC,IAAM,yBAAyB,GAAW,CAAC,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DDiagramCanvasTileMapping } from \"./d-diagram-canvas-mapping\";\nimport { EShapeCorner } from \"./shape/e-shape-corner\";\nimport { EShapeStrokeSide } from \"./shape/e-shape-stroke-side\";\nimport { EShapeStrokeStyle } from \"./shape/e-shape-stroke-style\";\nimport { EShapeDataValueOrder } from \"./shape/e-shape-data-value-order\";\nimport { EShapeTextStyle, EShapeTextWeight } from \"./shape/e-shape-text\";\nimport { EShapeTextAlignHorizontal } from \"./shape/e-shape-text-align-horizontal\";\nimport { EShapeTextAlignVertical } from \"./shape/e-shape-text-align-vertical\";\nimport { EShapeTextDirection } from \"./shape/e-shape-text-direction\";\nimport { EShapeType } from \"./shape/e-shape-type\";\nimport { ESnapperTargetValueType } from \"./snapper/e-snapper-target-value\";\nimport { EShapeDataValueRangeType } from \"./shape/e-shape-data-value-range\";\nimport { EShapeDataValueType } from \"./shape/e-shape-data-value-type\";\nimport { EShapeDataValueScope } from \"./shape/e-shape-data-value-scope\";\n\nexport const DDiagramSerializedVersion: number = 1;\n\n/**\n * A serialized data range.\n */\nexport interface DDiagramSerializedDataRange {\n\t/** A type. */\n\t[0]: EShapeDataValueRangeType;\n\n\t/** A lower bound. */\n\t[1]: number;\n\n\t/** An upper bound. */\n\t[2]: number;\n}\n\n/**\n * A serialized data value.\n */\nexport interface DDiagramSerializedDataValue {\n\t/**\n\t * A resource index number of an ID.\n\t */\n\t[0]: number;\n\n\t/**\n\t * A resource index number of an initial value expression.\n\t */\n\t[1]: number;\n\n\t/**\n\t * A resource index number of a format expression.\n\t */\n\t[2]: number;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedDataRange).\n\t */\n\t[3]: number;\n\n\t/**\n\t * A capacity.\n\t */\n\t[4]: number;\n\n\t/**\n\t * A order.\n\t */\n\t[5]: EShapeDataValueOrder;\n\n\t/**\n\t * A type.\n\t */\n\t[6]: EShapeDataValueType | undefined;\n\n\t/**\n\t * A scope.\n\t */\n\t[7]: EShapeDataValueScope | undefined;\n\n\t/**\n\t * A resource index number of an alias.\n\t */\n\t[8]: number | undefined;\n}\n\n/**\n * A serialized system data.\n */\nexport type DDiagramSerializedDataSystem = number[];\n\n/**\n * A serialized data mapping.\n * Each number at the index 2N+0 is a resource index number of the N-th mapping source.\n * Each number at the index 2N+1 is a resource index number of the N-th mapping destination.\n */\nexport type DDiagramSerializedDataMapping = number[];\n\n/**\n * A serialized data with a mapping data.\n */\nexport interface DDiagramSerializedDataWithMapping extends Array<unknown> {\n\t/**\n\t * Each number is a resource index number of JSON.stringify(DDiagramSerializedDataValue).\n\t * The last number is a resource index number of JSON.stringify(DDiagramSerializedDataMapping).\n\t */\n\t[0]: number[];\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedDataSystem).\n\t */\n\t[1]: number | undefined;\n}\n\n/**\n * A serialized data without a mapping data.\n * Each number is a resource index number of JSON.stringify(DDiagramSerializedDataValue).\n */\nexport type DDiagramSerializedDataWithoutMapping = number[];\n\n/**\n * A serialized data.\n */\nexport type DDiagramSerializedData =\n\t| DDiagramSerializedDataWithoutMapping\n\t| DDiagramSerializedDataWithMapping;\n\n/**\n * A serialized fill.\n */\nexport interface DDiagramSerializedFill {\n\t/** 0: Disabled, 1: Enabled */\n\t[0]: number;\n\n\t/** A color. */\n\t[1]: number;\n\n\t/** An alpha. */\n\t[2]: number;\n}\n\n/**\n * A serialized stroke.\n */\nexport interface DDiagramSerializedStroke {\n\t/** 0: Disabled, 1: Enabled */\n\t[0]: number;\n\n\t/** A color. */\n\t[1]: number;\n\n\t/** An alpha. */\n\t[2]: number;\n\n\t/** A width. */\n\t[3]: number;\n\n\t/** An align. */\n\t[4]: number;\n\n\t/** A side. */\n\t[5]: EShapeStrokeSide;\n\n\t/** A style */\n\t[6]: EShapeStrokeStyle | undefined;\n}\n\n/**\n * A serialized text outline.\n */\nexport interface DDiagramSerializedTextOutline {\n\t/** 0: Disabled, 1: Enabled */\n\t[0]: number;\n\n\t/** A color. */\n\t[1]: number;\n\n\t/** An alpha. */\n\t[2]: number;\n\n\t/** A width. */\n\t[3]: number;\n}\n\n/**\n * A serialized text align.\n */\nexport interface DDiagramSerializedTextAlign {\n\t/** A horizontal align. */\n\t[0]: EShapeTextAlignHorizontal;\n\n\t/** A vertical align. */\n\t[1]: EShapeTextAlignVertical;\n}\n\n/**\n * A serialized text offset.\n */\nexport interface DDiagramSerializedTextOffset {\n\t/** A horizontal offset. */\n\t[0]: number;\n\n\t/** A vertical offset. */\n\t[1]: number;\n}\n\n/**\n * A serialized text spacing.\n */\nexport interface DDiagramSerializedTextSpacing {\n\t/** A horizontal spacing. */\n\t[0]: number;\n\n\t/** A vertical spacing. */\n\t[1]: number;\n}\n\n/**\n * A serialized text padding.\n */\nexport interface DDiagramSerializedTextPadding {\n\t/** A horizontal padding. */\n\t[0]: number;\n\n\t/** A vertical padding. */\n\t[1]: number;\n}\n\n/**\n * A serialized text.\n */\nexport interface DDiagramSerializedText {\n\t/** A resource index number of a value. */\n\t[0]: number;\n\n\t/** A color. */\n\t[1]: number;\n\n\t/** An alpha. */\n\t[2]: number;\n\n\t/** A resource index number of a font family. */\n\t[3]: number;\n\n\t/** A size. */\n\t[4]: number;\n\n\t/** A weight. */\n\t[5]: EShapeTextWeight;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedTextAlign).\n\t */\n\t[6]: number;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedTextOffset).\n\t */\n\t[7]: number;\n\n\t/** A style. */\n\t[8]: EShapeTextStyle;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedTextOutline).\n\t */\n\t[9]: number;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedTextSpacing).\n\t */\n\t[10]: number;\n\n\t/** A direction. */\n\t[11]: EShapeTextDirection;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedTextPadding).\n\t */\n\t[12]: number;\n\n\t/** A clipping. (0: Off, 1: On) */\n\t[13]: number;\n\n\t/** A fitting. (0: Off, 1: On) */\n\t[14]: number;\n}\n\n/**\n * A serialized item.\n */\nexport interface DDiagramSerializedItem {\n\t/** A type. */\n\t[0]: EShapeType;\n\n\t/** A resource index number of a ID. */\n\t[1]: number;\n\n\t/** A X-coordinate position. */\n\t[2]: number;\n\n\t/** A Y-coordinate position. */\n\t[3]: number;\n\n\t/** A width. */\n\t[4]: number;\n\n\t/** A height. */\n\t[5]: number;\n\n\t/** A rotation. */\n\t[6]: number;\n\n\t/** A skew. */\n\t[7]: number;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedFill).\n\t */\n\t[8]: number;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedStroke).\n\t */\n\t[9]: number;\n\n\t/** A resource index number of a cursor. */\n\t[10]: number;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedText).\n\t */\n\t[11]: number;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedData).\n\t */\n\t[12]: number;\n\n\t/** A radius. */\n\t[13]: number;\n\n\t/** A corner. */\n\t[14]: EShapeCorner;\n\n\t/** A resource index number of a shape-specific resource. */\n\t[15]: number;\n\n\t/** A layer index number. */\n\t[16]: number;\n\n\t/** Actions */\n\t[17]: number[];\n\n\t/** A resource index number of an image. */\n\t[18]: number;\n\n\t/**\n\t * A resource index number of a stringified serialized gradient.\n\t * A stringified serialized gradient is a stringified number array,\n\t * JSON.stringify(number[]).\n\t *\n\t * * The first number in the array is a direction in degree.\n\t * * Each number at the index 3N + 1 is a color of a N-th point.\n\t * * Each number at the index 3N + 2 is a alpha of a N-th point.\n\t * * Each number at the index 3N + 3 is a position of a N-th point whose range is [0, 1].\n\t */\n\t[19]: number;\n\n\t/** Children. */\n\t[20]: DDiagramSerializedItem[];\n\n\t/** A X pivot. */\n\t[21]: number;\n\n\t/** A Y pivot. */\n\t[22]: number;\n\n\t/** (interactive ? 1 : 0) | (unfocusable ? 2 : 0) */\n\t[23]: number;\n\n\t/** A resource index number of a shortcut. */\n\t[24]: number;\n\n\t/** A resource index number of a title. */\n\t[25]: number;\n\n\t/** UUID */\n\t[26]: number;\n\n\t/** Added capabilities */\n\t[27]: number;\n\n\t/** Removed capabilities */\n\t[28]: number;\n\n\t/** Locked capabilities */\n\t[29]: number;\n}\n\n/**\n * A serialized layer.\n */\nexport interface DDiagramSerializedLayer {\n\t/** A name or a resource index number of a name*/\n\t[0]: string | number;\n\n\t/**\n\t * A visibility.\n\t *\n\t * * 1st bit\n\t * * 0: Invisible when edit mode\n\t * * 1: Visible when edit mode\n\t * * 2nd bit\n\t * * 0: Invisible when non-edit mode\n\t * * 1: Visible when non-edit mode\n\t */\n\t[1]?: number;\n\n\t/** A X-coordinate position. */\n\t[2]?: number;\n\n\t/** A Y-coordinate position. */\n\t[3]?: number;\n\n\t/** A width. */\n\t[4]?: number;\n\n\t/** A height. */\n\t[5]?: number;\n\n\t/**\n\t * A resource index number of a stringified serialized fill,\n\t * JSON.stringify(DDiagramSerializedFill).\n\t */\n\t[6]?: number;\n\n\t/**\n\t * * 1st bit\n\t * * 0: Not interactive\n\t * * 1: Interactive\n\t * * 2nd bit\n\t * * 0: Not draggable\n\t * * 1: Draggable\n\t * * 3rd bit\n\t * * 0: Not pinchable\n\t * * 1: Pinchable\n\t */\n\t[7]?: number;\n}\n\n/**\n * A serialized snap target.\n */\nexport interface DDiagramSerializedSnapTargetValue {\n\t/** A type. */\n\t[0]: ESnapperTargetValueType;\n\n\t/** A position. */\n\t[1]: number;\n}\n\n/**\n * Serialized snap on guide settings.\n */\nexport interface DDiagramSerializedSnapTarget {\n\t/** Snap on guide (0: Off, 1: On) */\n\t[0]: number;\n\n\t/** A visibility (0: Invisible, 1: Visible). */\n\t[1]: number;\n\n\t/** Snap targets. */\n\t[2]: DDiagramSerializedSnapTargetValue[];\n}\n\n/**\n * Serialized grid snap settings without a visibility option.\n */\nexport interface DDiagramSerializedSnapGridWithoutVisibility {\n\t/** Snap on grid (0: Off, 1: On) */\n\t[0]: number;\n\n\t/** A grid size. */\n\t[1]: number;\n}\n\n/**\n * Serialized grid snap settings with a visibility option.\n */\nexport interface DDiagramSerializedSnapGridWithVisibility {\n\t/** Snap on grid (0: Off, 1: On) */\n\t[0]: number;\n\n\t/** A visibility (0: Invisible, 1: Visible). */\n\t[1]: number;\n\n\t/** A grid size. */\n\t[2]: number;\n}\n\n/**\n * Serialized grid snap settings with a visibility.\n */\nexport type DDiagramSerializedSnapGrid =\n\t| DDiagramSerializedSnapGridWithoutVisibility\n\t| DDiagramSerializedSnapGridWithVisibility;\n\n/**\n * Serialized snap settings.\n */\nexport interface DDiagramSerializedSnap {\n\t/** Snap (0: Off, 1: On). */\n\t[0]: number;\n\n\t/** Snap on targets */\n\t[1]: DDiagramSerializedSnapTarget;\n\n\t/** Snap on grid */\n\t[2]: DDiagramSerializedSnapGrid;\n}\n\n/**\n * Serialized background settings.\n */\nexport interface DDiagramSerializedBackground {\n\tcolor?: number | null;\n\talpha?: number;\n}\n\n/**\n * Serialized tile settings.\n */\nexport interface DDiagramSerializedTile {\n\tmapping?: DDiagramCanvasTileMapping;\n}\n\n/**\n * A serialized diagram.\n */\nexport interface DDiagramSerialized {\n\tversion: number;\n\tid?: number;\n\tname: string;\n\tlabel?: string;\n\twidth: number;\n\theight: number;\n\tcategory?: string;\n\tsummary?: string;\n\tdescription?: string;\n\tbackground?: DDiagramSerializedBackground;\n\ttile?: DDiagramSerializedTile;\n\tresources: string[];\n\t/** @deprecated in favor of {@link data} */\n\ttags?: string[];\n\tdata?: string[];\n\tpieces?: string[];\n\tlayers: DDiagramSerializedLayer[];\n\titems: DDiagramSerializedItem[];\n\tsnap?: DDiagramSerializedSnap;\n\tthumbnail?: string;\n}\n\nexport type DDiagramSerializedSimpleData = Omit<\n\tDDiagramSerialized,\n\t\"version\" | \"id\" | \"name\" | \"thumbnail\"\n>;\n\n/**\n * A simplified version of a serialized diagram.\n */\nexport interface DDiagramSerializedSimple {\n\tversion: number;\n\tid: number | undefined;\n\tname: string;\n\tlabel?: string;\n\tcategory?: string;\n\tsummary?: string;\n\tdescription?: string;\n\n\t/**\n\t * A stringified {@link DDiagramSerialized#data}.\n\t *\n\t * @deprecated in favor of {@link DDiagramSerializedSimpleData}.\n\t */\n\ttags?: string;\n\n\t/**\n\t * A stringified {@link DDiagramSerialized#pieces}.\n\t *\n\t * @deprecated in favor of {@link DDiagramSerializedSimpleData}.\n\t */\n\tpieces?: string;\n\n\t/**\n\t * Thumbnail data URL.\n\t */\n\tthumbnail?: string;\n\n\t/**\n\t * A stringified {@link DDiagramSerializedSimpleData}.\n\t */\n\tdata: string;\n}\n\nexport interface DDiagramSerializedName {\n\tid: number;\n\tname: string;\n}\n"]}
|
package/dist/wcardinal-ui.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Winter Cardinal UI v0.
|
|
2
|
+
Winter Cardinal UI v0.356.0
|
|
3
3
|
Copyright (C) 2019 Toshiba Corporation
|
|
4
4
|
SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
|
|
@@ -81182,7 +81182,7 @@ var DDiagramCanvasBase = /** @class */ (function (_super) {
|
|
|
81182
81182
|
__extends(DDiagramCanvasBase, _super);
|
|
81183
81183
|
function DDiagramCanvasBase(options) {
|
|
81184
81184
|
var _this = this;
|
|
81185
|
-
var _a, _b, _c;
|
|
81185
|
+
var _a, _b, _c, _d;
|
|
81186
81186
|
_this = _super.call(this, options) || this;
|
|
81187
81187
|
// Background
|
|
81188
81188
|
var theme = _this.theme;
|
|
@@ -81193,12 +81193,19 @@ var DDiagramCanvasBase = /** @class */ (function (_super) {
|
|
|
81193
81193
|
var layer = new DDiagramLayerContainer(_this.width, _this.height);
|
|
81194
81194
|
_this._layer = layer;
|
|
81195
81195
|
_this.addChild(layer);
|
|
81196
|
-
// Label
|
|
81197
|
-
|
|
81198
|
-
|
|
81199
|
-
|
|
81200
|
-
|
|
81201
|
-
|
|
81196
|
+
// Label, Category, Summary and Description
|
|
81197
|
+
if (options != null) {
|
|
81198
|
+
_this._label = (_a = options.label) !== null && _a !== void 0 ? _a : "";
|
|
81199
|
+
_this._category = (_b = options.category) !== null && _b !== void 0 ? _b : "";
|
|
81200
|
+
_this._summary = (_c = options.summary) !== null && _c !== void 0 ? _c : "";
|
|
81201
|
+
_this._description = (_d = options.description) !== null && _d !== void 0 ? _d : "";
|
|
81202
|
+
}
|
|
81203
|
+
else {
|
|
81204
|
+
_this._label = "";
|
|
81205
|
+
_this._category = "";
|
|
81206
|
+
_this._summary = "";
|
|
81207
|
+
_this._description = "";
|
|
81208
|
+
}
|
|
81202
81209
|
// Tile
|
|
81203
81210
|
var tile = new DDiagramCanvasTile(_this, options === null || options === void 0 ? void 0 : options.tile);
|
|
81204
81211
|
_this._tile = tile;
|
|
@@ -81223,6 +81230,16 @@ var DDiagramCanvasBase = /** @class */ (function (_super) {
|
|
|
81223
81230
|
enumerable: false,
|
|
81224
81231
|
configurable: true
|
|
81225
81232
|
});
|
|
81233
|
+
Object.defineProperty(DDiagramCanvasBase.prototype, "category", {
|
|
81234
|
+
get: function () {
|
|
81235
|
+
return this._category;
|
|
81236
|
+
},
|
|
81237
|
+
set: function (category) {
|
|
81238
|
+
this._category = category;
|
|
81239
|
+
},
|
|
81240
|
+
enumerable: false,
|
|
81241
|
+
configurable: true
|
|
81242
|
+
});
|
|
81226
81243
|
Object.defineProperty(DDiagramCanvasBase.prototype, "summary", {
|
|
81227
81244
|
get: function () {
|
|
81228
81245
|
return this._summary;
|
package/dist/wcardinal-ui.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Winter Cardinal UI v0.
|
|
2
|
+
Winter Cardinal UI v0.356.0
|
|
3
3
|
Copyright (C) 2019 Toshiba Corporation
|
|
4
4
|
SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
|
|
@@ -62626,7 +62626,7 @@
|
|
|
62626
62626
|
__extends(DDiagramCanvasBase, _super);
|
|
62627
62627
|
function DDiagramCanvasBase(options) {
|
|
62628
62628
|
var _this = this;
|
|
62629
|
-
var _a, _b, _c;
|
|
62629
|
+
var _a, _b, _c, _d;
|
|
62630
62630
|
_this = _super.call(this, options) || this;
|
|
62631
62631
|
// Background
|
|
62632
62632
|
var theme = _this.theme;
|
|
@@ -62637,12 +62637,19 @@
|
|
|
62637
62637
|
var layer = new DDiagramLayerContainer(_this.width, _this.height);
|
|
62638
62638
|
_this._layer = layer;
|
|
62639
62639
|
_this.addChild(layer);
|
|
62640
|
-
// Label
|
|
62641
|
-
|
|
62642
|
-
|
|
62643
|
-
|
|
62644
|
-
|
|
62645
|
-
|
|
62640
|
+
// Label, Category, Summary and Description
|
|
62641
|
+
if (options != null) {
|
|
62642
|
+
_this._label = (_a = options.label) !== null && _a !== void 0 ? _a : "";
|
|
62643
|
+
_this._category = (_b = options.category) !== null && _b !== void 0 ? _b : "";
|
|
62644
|
+
_this._summary = (_c = options.summary) !== null && _c !== void 0 ? _c : "";
|
|
62645
|
+
_this._description = (_d = options.description) !== null && _d !== void 0 ? _d : "";
|
|
62646
|
+
}
|
|
62647
|
+
else {
|
|
62648
|
+
_this._label = "";
|
|
62649
|
+
_this._category = "";
|
|
62650
|
+
_this._summary = "";
|
|
62651
|
+
_this._description = "";
|
|
62652
|
+
}
|
|
62646
62653
|
// Tile
|
|
62647
62654
|
var tile = new DDiagramCanvasTile(_this, options === null || options === void 0 ? void 0 : options.tile);
|
|
62648
62655
|
_this._tile = tile;
|
|
@@ -62667,6 +62674,16 @@
|
|
|
62667
62674
|
enumerable: false,
|
|
62668
62675
|
configurable: true
|
|
62669
62676
|
});
|
|
62677
|
+
Object.defineProperty(DDiagramCanvasBase.prototype, "category", {
|
|
62678
|
+
get: function () {
|
|
62679
|
+
return this._category;
|
|
62680
|
+
},
|
|
62681
|
+
set: function (category) {
|
|
62682
|
+
this._category = category;
|
|
62683
|
+
},
|
|
62684
|
+
enumerable: false,
|
|
62685
|
+
configurable: true
|
|
62686
|
+
});
|
|
62670
62687
|
Object.defineProperty(DDiagramCanvasBase.prototype, "summary", {
|
|
62671
62688
|
get: function () {
|
|
62672
62689
|
return this._summary;
|