@wcardinal/wcardinal-ui 0.188.0 → 0.189.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/shape/action/e-shape-action-open-opener.d.ts +2 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-open-opener.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtimes.js +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtimes.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 +2 -2
- package/dist/wcardinal-ui.js +2 -2
- package/dist/wcardinal-ui.min.js +2 -2
- package/dist/wcardinal-ui.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import { EShape } from "../e-shape";
|
|
2
|
+
export declare type EShapeActionOpenOpener = (target: string, inNewWindow: boolean, shape: EShape) => void;
|
|
2
3
|
export declare const EShapeActionOpenOpeners: Record<number, EShapeActionOpenOpener>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape-action-open-opener.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-open-opener.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"e-shape-action-open-opener.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-open-opener.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,MAAM,CAAC,IAAM,uBAAuB,GAA2C,EAAE,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShape } from \"../e-shape\";\n\nexport type EShapeActionOpenOpener = (target: string, inNewWindow: boolean, shape: EShape) => void;\n\nexport const EShapeActionOpenOpeners: Record<number, EShapeActionOpenOpener> = {};\n"]}
|
|
@@ -30,7 +30,7 @@ var EShapeActionRuntimes = /** @class */ (function () {
|
|
|
30
30
|
EShapeActionRuntimes.open = function (shape, type, target, inNewWindow) {
|
|
31
31
|
var opener = EShapeActionOpenOpeners[type];
|
|
32
32
|
if (opener != null) {
|
|
33
|
-
opener(target, inNewWindow);
|
|
33
|
+
opener(target, inNewWindow, shape);
|
|
34
34
|
}
|
|
35
35
|
else {
|
|
36
36
|
switch (type) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape-action-runtimes.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-runtimes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAEN,8BAA8B,EAC9B,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAgCvE;IAAA;IA8GA,CAAC;IA7GO,gCAAW,GAAlB,UAAmB,MAAe;QACjC,OAAO,MAAM,YAAY,gBAAgB,CAAC;IAC3C,CAAC;IAEM,+BAAU,GAAjB,UAAkB,MAAe;QAChC,OAAO,MAAM,YAAY,cAAc,CAAC;IACzC,CAAC;IAEM,gCAAW,GAAlB,UAAmB,KAAqB;QACvC,IAAI,OAAO,GAAuC,KAAK,CAAC;QACxD,OAAO,OAAO,IAAI,IAAI,EAAE;YACvB,IAAI,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE;gBAC9B,OAAO,OAAO,CAAC;aACf;YACD,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC;SACzB;QACD,OAAO,IAAI,CAAC;IACb,CAAC;IAEM,yBAAI,GAAX,UACC,KAAa,EACb,IAAoC,EACpC,MAAc,EACd,WAAoB;QAEpB,IAAM,MAAM,GAAG,uBAAuB,CAAC,IAAI,CAAC,CAAC;QAC7C,IAAI,MAAM,IAAI,IAAI,EAAE;YACnB,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"e-shape-action-runtimes.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-runtimes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAEN,8BAA8B,EAC9B,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAgCvE;IAAA;IA8GA,CAAC;IA7GO,gCAAW,GAAlB,UAAmB,MAAe;QACjC,OAAO,MAAM,YAAY,gBAAgB,CAAC;IAC3C,CAAC;IAEM,+BAAU,GAAjB,UAAkB,MAAe;QAChC,OAAO,MAAM,YAAY,cAAc,CAAC;IACzC,CAAC;IAEM,gCAAW,GAAlB,UAAmB,KAAqB;QACvC,IAAI,OAAO,GAAuC,KAAK,CAAC;QACxD,OAAO,OAAO,IAAI,IAAI,EAAE;YACvB,IAAI,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE;gBAC9B,OAAO,OAAO,CAAC;aACf;YACD,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC;SACzB;QACD,OAAO,IAAI,CAAC;IACb,CAAC;IAEM,yBAAI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,CAAC,CAAC;YACxB,IAAI,SAAS,EAAE;gBACd,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;aAClC;SACD;aAAM;YACN,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;YACrC,IAAI,SAAS,EAAE;gBACd,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;aAC/C;SACD;IACF,CAAC;IACF,2BAAC;AAAD,CAAC,AA9GD,IA8GC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DApplications } from \"../../d-applications\";\nimport { DCanvasContainer } from \"../../d-canvas-container\";\nimport {\n\tDDiagramBaseController,\n\tDDiagramBaseControllerOpenType\n} from \"../../d-diagram-base-controller\";\nimport { DDiagramSerialized } from \"../../d-diagram-serialized\";\nimport { DDiagrams } from \"../../d-diagrams\";\nimport { EShape } from \"../e-shape\";\nimport { EShapeEmbedded } from \"../variant/e-shape-embedded\";\nimport { EShapeActionOpenOpeners } from \"./e-shape-action-open-opener\";\n\nexport interface EShapeActionRuntimeContainerDataScoped {\n\tset(id: string, value: unknown, time: number): boolean;\n}\n\nexport interface EShapeActionRuntimeContainerData {\n\treadonly remote: EShapeActionRuntimeContainerDataScoped;\n\treadonly private: EShapeActionRuntimeContainerDataScoped;\n\treadonly protected: EShapeActionRuntimeContainerDataScoped;\n\n\tset(\n\t\tid: string,\n\t\tvalue: unknown,\n\t\ttime?: number,\n\t\tfrom?: number | null,\n\t\tto?: number | null\n\t): boolean;\n}\n\nexport interface EShapeActionRuntimeContainerShape {\n\temit(name: string, ...args: unknown[]): void;\n}\n\nexport interface EShapeActionRuntimeContainer extends DCanvasContainer {\n\treadonly shape: EShapeActionRuntimeContainerShape;\n\treadonly data: EShapeActionRuntimeContainerData;\n\treadonly controller: DDiagramBaseController | null;\n\n\tset(serialized: DDiagramSerialized | null): void;\n}\n\nexport class EShapeActionRuntimes {\n\tstatic isContainer(target: unknown): target is EShapeActionRuntimeContainer {\n\t\treturn target instanceof DCanvasContainer;\n\t}\n\n\tstatic isEmbedded(target: unknown): target is EShapeEmbedded {\n\t\treturn target instanceof EShapeEmbedded;\n\t}\n\n\tstatic toContainer(shape?: EShape | null): EShapeActionRuntimeContainer | null {\n\t\tlet current: { parent: any } | null | undefined = shape;\n\t\twhile (current != null) {\n\t\t\tif (this.isContainer(current)) {\n\t\t\t\treturn current;\n\t\t\t}\n\t\t\tcurrent = current.parent;\n\t\t}\n\t\treturn null;\n\t}\n\n\tstatic open(\n\t\tshape: EShape,\n\t\ttype: DDiagramBaseControllerOpenType,\n\t\ttarget: string,\n\t\tinNewWindow: boolean\n\t): void {\n\t\tconst opener = EShapeActionOpenOpeners[type];\n\t\tif (opener != null) {\n\t\t\topener(target, inNewWindow, shape);\n\t\t} else {\n\t\t\tswitch (type) {\n\t\t\t\tcase DDiagramBaseControllerOpenType.DIAGRAM:\n\t\t\t\t\tconst container = this.toContainer(shape);\n\t\t\t\t\tif (container) {\n\t\t\t\t\t\tconst controller = container.controller;\n\t\t\t\t\t\tif (controller) {\n\t\t\t\t\t\t\tcontroller.getByName(target).then((found): void => {\n\t\t\t\t\t\t\t\tcontainer.set(DDiagrams.toSerialized(found));\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase DDiagramBaseControllerOpenType.PAGE:\n\t\t\t\t\tif (inNewWindow) {\n\t\t\t\t\t\twindow.open(target);\n\t\t\t\t\t} else {\n\t\t\t\t\t\twindow.location.href = target;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tstatic write(\n\t\tshape: EShape,\n\t\tid: string,\n\t\tvalue: unknown,\n\t\ttime: number,\n\t\tremote: boolean\n\t): boolean {\n\t\tif (remote) {\n\t\t\tconst container = this.toContainer(shape);\n\t\t\tif (container) {\n\t\t\t\treturn container.data.remote.set(id, value, time);\n\t\t\t}\n\t\t} else {\n\t\t\tlet current: { parent: any } | null | undefined = shape;\n\t\t\twhile (current != null) {\n\t\t\t\tif (this.isContainer(current)) {\n\t\t\t\t\tif (current.data.private.set(id, value, time)) {\n\t\t\t\t\t\tDApplications.update(current);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t} else if (current.data.protected.set(id, value, time)) {\n\t\t\t\t\t\tDApplications.update(current);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (current.data.set(id, value, time)) {\n\t\t\t\t\t\t\tDApplications.update(current);\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t\t} else if (this.isEmbedded(current)) {\n\t\t\t\t\tif (current.data.getPrivate()?.set(id, value, time)) {\n\t\t\t\t\t\tDApplications.update(current);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcurrent = current.parent;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tstatic emit(shape: EShape, name: string): void;\n\tstatic emit(shape: EShape, name: string, value: unknown, time: number): void;\n\tstatic emit(shape: EShape, name: string, value?: unknown, time?: number): void {\n\t\tconst container = EShapeActionRuntimes.toContainer(shape);\n\t\tif (time === undefined) {\n\t\t\tshape.emit(name, shape);\n\t\t\tif (container) {\n\t\t\t\tcontainer.shape.emit(name, shape);\n\t\t\t}\n\t\t} else {\n\t\t\tshape.emit(name, value, time, shape);\n\t\t\tif (container) {\n\t\t\t\tcontainer.shape.emit(name, value, time, shape);\n\t\t\t}\n\t\t}\n\t}\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.189.0
|
|
3
3
|
Copyright (C) 2019 Toshiba Corporation
|
|
4
4
|
SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
|
|
@@ -21935,7 +21935,7 @@ var EShapeActionRuntimes = /** @class */ (function () {
|
|
|
21935
21935
|
EShapeActionRuntimes.open = function (shape, type, target, inNewWindow) {
|
|
21936
21936
|
var opener = EShapeActionOpenOpeners[type];
|
|
21937
21937
|
if (opener != null) {
|
|
21938
|
-
opener(target, inNewWindow);
|
|
21938
|
+
opener(target, inNewWindow, shape);
|
|
21939
21939
|
}
|
|
21940
21940
|
else {
|
|
21941
21941
|
switch (type) {
|
package/dist/wcardinal-ui.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Winter Cardinal UI v0.
|
|
2
|
+
Winter Cardinal UI v0.189.0
|
|
3
3
|
Copyright (C) 2019 Toshiba Corporation
|
|
4
4
|
SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
|
|
@@ -21932,7 +21932,7 @@
|
|
|
21932
21932
|
EShapeActionRuntimes.open = function (shape, type, target, inNewWindow) {
|
|
21933
21933
|
var opener = EShapeActionOpenOpeners[type];
|
|
21934
21934
|
if (opener != null) {
|
|
21935
|
-
opener(target, inNewWindow);
|
|
21935
|
+
opener(target, inNewWindow, shape);
|
|
21936
21936
|
}
|
|
21937
21937
|
else {
|
|
21938
21938
|
switch (type) {
|