@wcardinal/wcardinal-ui 0.287.0 → 0.289.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.
@@ -23,7 +23,7 @@ export declare class DChartAxisBaseTickContainer<CHART extends DBase> implements
23
23
  bind(container: DChartAxisContainer<CHART>, index: number): void;
24
24
  unbind(): void;
25
25
  update(): boolean;
26
- protected updateX(domainMin: number, domainMax: number, coordinate: DChartCoordinate<CHART>, majorShapes: EShape[], minorShapes: EShape[], gridlineShapes: EShape[] | null, shapePositionY: number, transform: Matrix, plotAreaHeight: number): boolean;
27
- protected updateY(domainMin: number, domainMax: number, coordinate: DChartCoordinate<CHART>, majorShapes: EShape[], minorShapes: EShape[], gridlineShapes: EShape[] | null, shapePositionX: number, transform: Matrix, plotAreaWidth: number): boolean;
26
+ protected updateX(domainMin: number, domainMax: number, coordinate: DChartCoordinate<CHART>, majorShapes: EShape[], minorShapes: EShape[], gridlineShapes: EShape[], shapePositionY: number, transform: Matrix, plotAreaHeight: number): boolean;
27
+ protected updateY(domainMin: number, domainMax: number, coordinate: DChartCoordinate<CHART>, majorShapes: EShape[], minorShapes: EShape[], gridlineShapes: EShape[], shapePositionX: number, transform: Matrix, plotAreaWidth: number): boolean;
28
28
  destroy(): void;
29
29
  }
@@ -118,7 +118,7 @@ var DChartAxisBaseTickContainer = /** @class */ (function () {
118
118
  majorShape.transform.position.set(majotTickPositionX, shapePositionY);
119
119
  majorShape.text.value = majorFormatter.format(majorTickPosition, majorTickStep);
120
120
  majorShape.allowUploadedUpdate();
121
- if (gridlineShapes) {
121
+ if (i < gridlineShapes.length) {
122
122
  var gridlineShape = gridlineShapes[i];
123
123
  gridlineShape.disallowUploadedUpdate();
124
124
  gridlineShape.visible = true;
@@ -180,7 +180,7 @@ var DChartAxisBaseTickContainer = /** @class */ (function () {
180
180
  majorShape.transform.position.set(shapePositionX, majotTickPositionY);
181
181
  majorShape.text.value = majorFormatter.format(majorTickPosition, majorTickStep);
182
182
  majorShape.allowUploadedUpdate();
183
- if (gridlineShapes) {
183
+ if (i < gridlineShapes.length) {
184
184
  var gridlineShape = gridlineShapes[i];
185
185
  gridlineShape.disallowUploadedUpdate();
186
186
  gridlineShape.visible = true;
@@ -1 +1 @@
1
- {"version":3,"file":"d-chart-axis-base-tick-container.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-chart-axis-base-tick-container.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAEzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAO7D;IAWC,qCAAY,MAAkC;QAC7C,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAChB,IAAI,CAAC,MAAM,GAAG,IAAI,uBAAuB,CAAC,MAAM,CAAC,CAAC;QAClD,IAAI,CAAC,MAAM,GAAG,IAAI,uBAAuB,CAAC,MAAM,CAAC,CAAC;QAClD,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;QACtB,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;IACvB,CAAC;IAED,sBAAI,8CAAK;aAAT;YACC,OAAO,IAAI,CAAC,MAAM,CAAC;QACpB,CAAC;;;OAAA;IAED,sBAAI,8CAAK;aAAT;YACC,OAAO,IAAI,CAAC,MAAM,CAAC;QACpB,CAAC;;;OAAA;IAED,0CAAI,GAAJ,UAAK,SAAqC,EAAE,KAAa;QACxD,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QACnC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IACpC,CAA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tB,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAChB,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;IAC7B,CAAC;IACF,kCAAC;AAAD,CAAC,AAzUD,IAyUC","sourcesContent":["import { Matrix } from \"pixi.js\";\nimport { DBase } from \"./d-base\";\nimport { DChartAxisBaseOptionParser } from \"./d-chart-axis-base-options-parser\";\nimport { DChartAxisBaseTickMajor } from \"./d-chart-axis-base-tick-major\";\nimport { DChartAxisBaseTickMinor } from \"./d-chart-axis-base-tick-minor\";\nimport { DChartAxisContainer } from \"./d-chart-axis-container\";\nimport { DChartAxisPosition } from \"./d-chart-axis-position\";\nimport { DChartAxisTickContainer } from \"./d-chart-axis-tick-container\";\nimport { DChartAxisTickMajor } from \"./d-chart-axis-tick-major\";\nimport { DChartAxisTickMinor } from \"./d-chart-axis-tick-minor\";\nimport { DChartCoordinate } from \"./d-chart-coordinate\";\nimport { EShape } from \"./shape/e-shape\";\n\nexport class DChartAxisBaseTickContainer<CHART extends DBase>\n\timplements DChartAxisTickContainer<CHART>\n{\n\tprotected _parser: DChartAxisBaseOptionParser;\n\tprotected _container?: DChartAxisContainer<CHART>;\n\tprotected _index: number;\n\tprotected _major: DChartAxisBaseTickMajor<CHART>;\n\tprotected _minor: DChartAxisBaseTickMinor<CHART>;\n\tprotected _majorTicks: number[];\n\tprotected _minorTicks: number[];\n\n\tconstructor(parser: DChartAxisBaseOptionParser) {\n\t\tthis._parser = parser;\n\t\tthis._index = 0;\n\t\tthis._major = new DChartAxisBaseTickMajor(parser);\n\t\tthis._minor = new DChartAxisBaseTickMinor(parser);\n\t\tthis._majorTicks = [];\n\t\tthis._minorTicks = [];\n\t}\n\n\tget major(): DChartAxisTickMajor<CHART> {\n\t\treturn this._major;\n\t}\n\n\tget minor(): DChartAxisTickMinor<CHART> {\n\t\treturn this._minor;\n\t}\n\n\tbind(container: DChartAxisContainer<CHART>, index: number): void {\n\t\tthis._container = container;\n\t\tthis._index = index;\n\t\tthis._major.bind(container, index);\n\t\tthis._minor.bind(container, index);\n\t}\n\n\tunbind(): void {\n\t\tthis._minor.unbind();\n\t\tthis._major.unbind();\n\t\tthis._index = 0;\n\t\tthis._container = undefined;\n\t}\n\n\tupdate(): boolean {\n\t\tconst container = this._container;\n\t\tconst majorShapes = this._major.shapes;\n\t\tconst minorShapes = this._minor.shapes;\n\t\tif (container != null && majorShapes && minorShapes) {\n\t\t\tconst plotArea = container.plotArea;\n\t\t\tconst bounds = plotArea.getBoundsInContainer();\n\t\t\tconst transform = plotArea.container.transform.localTransform;\n\t\t\tconst gridlineShapes = this._major.gridline.shapes;\n\n\t\t\tconst parser = this._parser;\n\t\t\tconst offset = parser.padding * this._index;\n\t\t\tlet coordinate: DChartCoordinate<CHART> | null;\n\t\t\tswitch (parser.position) {\n\t\t\t\tcase DChartAxisPosition.TOP:\n\t\t\t\t\tcoordinate = plotArea.coordinate.x.get(parser.coordinateIndex);\n\t\t\t\t\tif (coordinate) {\n\t\t\t\t\t\tconst domainFrom = coordinate.unmap(coordinate.transform.unmap(bounds.x));\n\t\t\t\t\t\tconst domainTo = coordinate.unmap(\n\t\t\t\t\t\t\tcoordinate.transform.unmap(bounds.x + bounds.width)\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst plotAreaHeight = plotArea.height;\n\t\t\t\t\t\treturn this.updateX(\n\t\t\t\t\t\t\tdomainFrom,\n\t\t\t\t\t\t\tdomainTo,\n\t\t\t\t\t\t\tcoordinate,\n\t\t\t\t\t\t\tmajorShapes,\n\t\t\t\t\t\t\tminorShapes,\n\t\t\t\t\t\t\tgridlineShapes,\n\t\t\t\t\t\t\t0 - offset,\n\t\t\t\t\t\t\ttransform,\n\t\t\t\t\t\t\tplotAreaHeight\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase DChartAxisPosition.BOTTOM:\n\t\t\t\t\tcoordinate = plotArea.coordinate.x.get(parser.coordinateIndex);\n\t\t\t\t\tif (coordinate) {\n\t\t\t\t\t\tconst domainFrom = coordinate.unmap(coordinate.transform.unmap(bounds.x));\n\t\t\t\t\t\tconst domainTo = coordinate.unmap(\n\t\t\t\t\t\t\tcoordinate.transform.unmap(bounds.x + bounds.width)\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst plotAreaHeight = plotArea.height;\n\t\t\t\t\t\treturn this.updateX(\n\t\t\t\t\t\t\tdomainFrom,\n\t\t\t\t\t\t\tdomainTo,\n\t\t\t\t\t\t\tcoordinate,\n\t\t\t\t\t\t\tmajorShapes,\n\t\t\t\t\t\t\tminorShapes,\n\t\t\t\t\t\t\tgridlineShapes,\n\t\t\t\t\t\t\tplotAreaHeight + offset,\n\t\t\t\t\t\t\ttransform,\n\t\t\t\t\t\t\tplotAreaHeight\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase DChartAxisPosition.LEFT:\n\t\t\t\t\tcoordinate = plotArea.coordinate.y.get(parser.coordinateIndex);\n\t\t\t\t\tif (coordinate) {\n\t\t\t\t\t\tconst domainFrom = coordinate.unmap(coordinate.transform.unmap(bounds.y));\n\t\t\t\t\t\tconst domainTo = coordinate.unmap(\n\t\t\t\t\t\t\tcoordinate.transform.unmap(bounds.y + bounds.height)\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst plotAreaWidth = plotArea.width;\n\t\t\t\t\t\treturn this.updateY(\n\t\t\t\t\t\t\tdomainFrom,\n\t\t\t\t\t\t\tdomainTo,\n\t\t\t\t\t\t\tcoordinate,\n\t\t\t\t\t\t\tmajorShapes,\n\t\t\t\t\t\t\tminorShapes,\n\t\t\t\t\t\t\tgridlineShapes,\n\t\t\t\t\t\t\t0 - offset,\n\t\t\t\t\t\t\ttransform,\n\t\t\t\t\t\t\tplotAreaWidth\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase DChartAxisPosition.RIGHT:\n\t\t\t\t\tcoordinate = plotArea.coordinate.y.get(parser.coordinateIndex);\n\t\t\t\t\tif (coordinate) {\n\t\t\t\t\t\tconst domainFrom = coordinate.unmap(coordinate.transform.unmap(bounds.y));\n\t\t\t\t\t\tconst domainTo = coordinate.unmap(\n\t\t\t\t\t\t\tcoordinate.transform.unmap(bounds.y + bounds.height)\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst plotAreaWidth = plotArea.width;\n\t\t\t\t\t\treturn this.updateY(\n\t\t\t\t\t\t\tdomainFrom,\n\t\t\t\t\t\t\tdomainTo,\n\t\t\t\t\t\t\tcoordinate,\n\t\t\t\t\t\t\tmajorShapes,\n\t\t\t\t\t\t\tminorShapes,\n\t\t\t\t\t\t\tgridlineShapes,\n\t\t\t\t\t\t\tplotAreaWidth + offset,\n\t\t\t\t\t\t\ttransform,\n\t\t\t\t\t\t\tplotAreaWidth\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tprotected updateX(\n\t\tdomainMin: number,\n\t\tdomainMax: number,\n\t\tcoordinate: DChartCoordinate<CHART>,\n\t\tmajorShapes: EShape[],\n\t\tminorShapes: EShape[],\n\t\tgridlineShapes: EShape[] | null,\n\t\tshapePositionY: number,\n\t\ttransform: Matrix,\n\t\tplotAreaHeight: number\n\t): boolean {\n\t\tconst tick = this._parser.tick;\n\t\tconst majorTick = tick.major;\n\t\tconst majorCount = majorTick.count;\n\t\tconst majorCapacity = majorTick.capacity;\n\t\tconst majorStep = majorTick.step;\n\t\tconst majorFormatter = majorTick.formatter;\n\t\tconst minorTick = tick.minor;\n\t\tconst minorCountPerMajor = minorTick.count;\n\t\tconst minorCount = (majorCapacity + 1) * minorCountPerMajor;\n\t\tconst minorStep = minorTick.step;\n\t\tconst majorTicks = this._majorTicks;\n\t\tconst minorTicks = this._minorTicks;\n\t\tcoordinate.ticks(\n\t\t\tdomainMin,\n\t\t\tdomainMax,\n\t\t\tmajorCount,\n\t\t\tmajorCapacity,\n\t\t\tmajorStep,\n\t\t\tminorCountPerMajor,\n\t\t\tminorCount,\n\t\t\tminorStep,\n\t\t\tmajorTicks,\n\t\t\tminorTicks\n\t\t);\n\n\t\tconst a = transform.a;\n\t\tconst tx = transform.tx;\n\t\tfor (let i = 0; i < majorCapacity; ++i) {\n\t\t\tconst majorShape = majorShapes[i];\n\t\t\tconst imajorTick = i * 3;\n\t\t\tconst majorTickPosition = majorTicks[imajorTick + 0];\n\t\t\tif (!isNaN(majorTickPosition)) {\n\t\t\t\tconst majorTickProjectedPosition = majorTicks[imajorTick + 1];\n\t\t\t\tconst majotTickPositionX = a * majorTickProjectedPosition + tx;\n\t\t\t\tconst majorTickStep = majorTicks[imajorTick + 2];\n\n\t\t\t\tmajorShape.disallowUploadedUpdate();\n\t\t\t\tmajorShape.visible = true;\n\t\t\t\tmajorShape.transform.position.set(majotTickPositionX, shapePositionY);\n\t\t\t\tmajorShape.text.value = majorFormatter.format(majorTickPosition, majorTickStep);\n\t\t\t\tmajorShape.allowUploadedUpdate();\n\n\t\t\t\tif (gridlineShapes) {\n\t\t\t\t\tconst gridlineShape = gridlineShapes[i];\n\t\t\t\t\tgridlineShape.disallowUploadedUpdate();\n\t\t\t\t\tgridlineShape.visible = true;\n\t\t\t\t\tgridlineShape.transform.position.set(majotTickPositionX, plotAreaHeight * 0.5);\n\t\t\t\t\tgridlineShape.size.set(0, plotAreaHeight);\n\t\t\t\t\tgridlineShape.allowUploadedUpdate();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tmajorShape.visible = false;\n\t\t\t\tif (gridlineShapes) {\n\t\t\t\t\tgridlineShapes[i].visible = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (let i = 0; i < minorCount; ++i) {\n\t\t\tconst minorShape = minorShapes[i];\n\t\t\tconst iminorTick = i * 3;\n\t\t\tconst minorTickPosition = minorTicks[iminorTick + 0];\n\t\t\tconst minorTickProjectedPosition = minorTicks[iminorTick + 1];\n\t\t\tif (!isNaN(minorTickPosition)) {\n\t\t\t\tminorShape.disallowUploadedUpdate();\n\t\t\t\tminorShape.visible = true;\n\t\t\t\tminorShape.transform.position.set(\n\t\t\t\t\ta * minorTickProjectedPosition + tx,\n\t\t\t\t\tshapePositionY\n\t\t\t\t);\n\t\t\t\tminorShape.allowUploadedUpdate();\n\t\t\t} else {\n\t\t\t\tminorShape.visible = false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\tprotected updateY(\n\t\tdomainMin: number,\n\t\tdomainMax: number,\n\t\tcoordinate: DChartCoordinate<CHART>,\n\t\tmajorShapes: EShape[],\n\t\tminorShapes: EShape[],\n\t\tgridlineShapes: EShape[] | null,\n\t\tshapePositionX: number,\n\t\ttransform: Matrix,\n\t\tplotAreaWidth: number\n\t): boolean {\n\t\tconst tick = this._parser.tick;\n\t\tconst majorTick = tick.major;\n\t\tconst majorCount = majorTick.count;\n\t\tconst majorCapacity = majorTick.capacity;\n\t\tconst majorStep = majorTick.step;\n\t\tconst majorFormatter = majorTick.formatter;\n\t\tconst minorTick = tick.minor;\n\t\tconst minorCountPerMajor = minorTick.count;\n\t\tconst minorCount = (majorCapacity + 1) * minorCountPerMajor;\n\t\tconst minorStep = minorTick.step;\n\t\tconst majorTicks = this._majorTicks;\n\t\tconst minorTicks = this._minorTicks;\n\t\tcoordinate.ticks(\n\t\t\tdomainMin,\n\t\t\tdomainMax,\n\t\t\tmajorCount,\n\t\t\tmajorCapacity,\n\t\t\tmajorStep,\n\t\t\tminorCountPerMajor,\n\t\t\tminorCount,\n\t\t\tminorStep,\n\t\t\tmajorTicks,\n\t\t\tminorTicks\n\t\t);\n\n\t\tconst d = transform.d;\n\t\tconst ty = transform.ty;\n\t\tfor (let i = 0; i < majorCapacity; ++i) {\n\t\t\tconst majorShape = majorShapes[i];\n\t\t\tconst imajorTick = i * 3;\n\t\t\tconst majorTickPosition = majorTicks[imajorTick + 0];\n\t\t\tif (!isNaN(majorTickPosition)) {\n\t\t\t\tconst majorTickProjectedPosition = majorTicks[imajorTick + 1];\n\t\t\t\tconst majotTickPositionY = d * majorTickProjectedPosition + ty;\n\t\t\t\tconst majorTickStep = majorTicks[imajorTick + 2];\n\n\t\t\t\tmajorShape.disallowUploadedUpdate();\n\t\t\t\tmajorShape.visible = true;\n\t\t\t\tmajorShape.transform.position.set(shapePositionX, majotTickPositionY);\n\t\t\t\tmajorShape.text.value = majorFormatter.format(majorTickPosition, majorTickStep);\n\t\t\t\tmajorShape.allowUploadedUpdate();\n\n\t\t\t\tif (gridlineShapes) {\n\t\t\t\t\tconst gridlineShape = gridlineShapes[i];\n\t\t\t\t\tgridlineShape.disallowUploadedUpdate();\n\t\t\t\t\tgridlineShape.visible = true;\n\t\t\t\t\tgridlineShape.transform.position.set(plotAreaWidth * 0.5, majotTickPositionY);\n\t\t\t\t\tgridlineShape.size.set(plotAreaWidth, 0);\n\t\t\t\t\tgridlineShape.allowUploadedUpdate();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tmajorShape.visible = false;\n\t\t\t\tif (gridlineShapes) {\n\t\t\t\t\tgridlineShapes[i].visible = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (let i = 0; i < minorCount; ++i) {\n\t\t\tconst minorShape = minorShapes[i];\n\t\t\tconst iminorTick = i * 3;\n\t\t\tconst minorTickPosition = minorTicks[iminorTick + 0];\n\t\t\tconst minorTickProjectedPosition = minorTicks[iminorTick + 1];\n\t\t\tif (!isNaN(minorTickPosition)) {\n\t\t\t\tminorShape.disallowUploadedUpdate();\n\t\t\t\tminorShape.visible = true;\n\t\t\t\tminorShape.transform.position.set(\n\t\t\t\t\tshapePositionX,\n\t\t\t\t\td * minorTickProjectedPosition + ty\n\t\t\t\t);\n\t\t\t\tminorShape.allowUploadedUpdate();\n\t\t\t} else {\n\t\t\t\tminorShape.visible = false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\tdestroy(): void {\n\t\tthis._major.destroy();\n\t\tthis._minor.destroy();\n\t\tthis._index = 0;\n\t\tthis._container = undefined;\n\t}\n}\n"]}
1
+ {"version":3,"file":"d-chart-axis-base-tick-container.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-chart-axis-base-tick-container.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAEzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAO7D;IAWC,qCAAY,MAAkC;QAC7C,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAChB,IAAI,CAAC,MAAM,GAAG,IAAI,uBAAuB,CAAC,MAAM,CAAC,CAAC;QAClD,IAAI,CAAC,MAAM,GAAG,IAAI,uBAAuB,CAAC,MAAM,CAAC,CAAC;QAClD,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;QACtB,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;IACvB,CAAC;IAED,sBAAI,8CAAK;aAAT;YACC,OAAO,IAAI,CAAC,MAAM,CAAC;QACpB,CAAC;;;OAAA;IAED,sBAAI,8CAAK;aAAT;YACC,OAAO,IAAI,CAAC,MAAM,CAAC;QACpB,CAAC;;;OAAA;IAED,0CAAI,GAAJ,UAAK,SAAqC,EAAE,KAAa;QACxD,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QACnC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IACpC,CAAC;IAED,4CAAM,GAAN;QACC,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;QACrB,IAAI,CAAC,MAAM,CAAC,MAAM,EA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UAAU,GAAG,SAAS,CAAC;IAC7B,CAAC;IACF,kCAAC;AAAD,CAAC,AAzUD,IAyUC","sourcesContent":["import { Matrix } from \"pixi.js\";\nimport { DBase } from \"./d-base\";\nimport { DChartAxisBaseOptionParser } from \"./d-chart-axis-base-options-parser\";\nimport { DChartAxisBaseTickMajor } from \"./d-chart-axis-base-tick-major\";\nimport { DChartAxisBaseTickMinor } from \"./d-chart-axis-base-tick-minor\";\nimport { DChartAxisContainer } from \"./d-chart-axis-container\";\nimport { DChartAxisPosition } from \"./d-chart-axis-position\";\nimport { DChartAxisTickContainer } from \"./d-chart-axis-tick-container\";\nimport { DChartAxisTickMajor } from \"./d-chart-axis-tick-major\";\nimport { DChartAxisTickMinor } from \"./d-chart-axis-tick-minor\";\nimport { DChartCoordinate } from \"./d-chart-coordinate\";\nimport { EShape } from \"./shape/e-shape\";\n\nexport class DChartAxisBaseTickContainer<CHART extends DBase>\n\timplements DChartAxisTickContainer<CHART>\n{\n\tprotected _parser: DChartAxisBaseOptionParser;\n\tprotected _container?: DChartAxisContainer<CHART>;\n\tprotected _index: number;\n\tprotected _major: DChartAxisBaseTickMajor<CHART>;\n\tprotected _minor: DChartAxisBaseTickMinor<CHART>;\n\tprotected _majorTicks: number[];\n\tprotected _minorTicks: number[];\n\n\tconstructor(parser: DChartAxisBaseOptionParser) {\n\t\tthis._parser = parser;\n\t\tthis._index = 0;\n\t\tthis._major = new DChartAxisBaseTickMajor(parser);\n\t\tthis._minor = new DChartAxisBaseTickMinor(parser);\n\t\tthis._majorTicks = [];\n\t\tthis._minorTicks = [];\n\t}\n\n\tget major(): DChartAxisTickMajor<CHART> {\n\t\treturn this._major;\n\t}\n\n\tget minor(): DChartAxisTickMinor<CHART> {\n\t\treturn this._minor;\n\t}\n\n\tbind(container: DChartAxisContainer<CHART>, index: number): void {\n\t\tthis._container = container;\n\t\tthis._index = index;\n\t\tthis._major.bind(container, index);\n\t\tthis._minor.bind(container, index);\n\t}\n\n\tunbind(): void {\n\t\tthis._minor.unbind();\n\t\tthis._major.unbind();\n\t\tthis._index = 0;\n\t\tthis._container = undefined;\n\t}\n\n\tupdate(): boolean {\n\t\tconst container = this._container;\n\t\tconst majorShapes = this._major.shapes;\n\t\tconst minorShapes = this._minor.shapes;\n\t\tif (container != null && majorShapes && minorShapes) {\n\t\t\tconst plotArea = container.plotArea;\n\t\t\tconst bounds = plotArea.getBoundsInContainer();\n\t\t\tconst transform = plotArea.container.transform.localTransform;\n\t\t\tconst gridlineShapes = this._major.gridline.shapes;\n\n\t\t\tconst parser = this._parser;\n\t\t\tconst offset = parser.padding * this._index;\n\t\t\tlet coordinate: DChartCoordinate<CHART> | null;\n\t\t\tswitch (parser.position) {\n\t\t\t\tcase DChartAxisPosition.TOP:\n\t\t\t\t\tcoordinate = plotArea.coordinate.x.get(parser.coordinateIndex);\n\t\t\t\t\tif (coordinate) {\n\t\t\t\t\t\tconst domainFrom = coordinate.unmap(coordinate.transform.unmap(bounds.x));\n\t\t\t\t\t\tconst domainTo = coordinate.unmap(\n\t\t\t\t\t\t\tcoordinate.transform.unmap(bounds.x + bounds.width)\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst plotAreaHeight = plotArea.height;\n\t\t\t\t\t\treturn this.updateX(\n\t\t\t\t\t\t\tdomainFrom,\n\t\t\t\t\t\t\tdomainTo,\n\t\t\t\t\t\t\tcoordinate,\n\t\t\t\t\t\t\tmajorShapes,\n\t\t\t\t\t\t\tminorShapes,\n\t\t\t\t\t\t\tgridlineShapes,\n\t\t\t\t\t\t\t0 - offset,\n\t\t\t\t\t\t\ttransform,\n\t\t\t\t\t\t\tplotAreaHeight\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase DChartAxisPosition.BOTTOM:\n\t\t\t\t\tcoordinate = plotArea.coordinate.x.get(parser.coordinateIndex);\n\t\t\t\t\tif (coordinate) {\n\t\t\t\t\t\tconst domainFrom = coordinate.unmap(coordinate.transform.unmap(bounds.x));\n\t\t\t\t\t\tconst domainTo = coordinate.unmap(\n\t\t\t\t\t\t\tcoordinate.transform.unmap(bounds.x + bounds.width)\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst plotAreaHeight = plotArea.height;\n\t\t\t\t\t\treturn this.updateX(\n\t\t\t\t\t\t\tdomainFrom,\n\t\t\t\t\t\t\tdomainTo,\n\t\t\t\t\t\t\tcoordinate,\n\t\t\t\t\t\t\tmajorShapes,\n\t\t\t\t\t\t\tminorShapes,\n\t\t\t\t\t\t\tgridlineShapes,\n\t\t\t\t\t\t\tplotAreaHeight + offset,\n\t\t\t\t\t\t\ttransform,\n\t\t\t\t\t\t\tplotAreaHeight\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase DChartAxisPosition.LEFT:\n\t\t\t\t\tcoordinate = plotArea.coordinate.y.get(parser.coordinateIndex);\n\t\t\t\t\tif (coordinate) {\n\t\t\t\t\t\tconst domainFrom = coordinate.unmap(coordinate.transform.unmap(bounds.y));\n\t\t\t\t\t\tconst domainTo = coordinate.unmap(\n\t\t\t\t\t\t\tcoordinate.transform.unmap(bounds.y + bounds.height)\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst plotAreaWidth = plotArea.width;\n\t\t\t\t\t\treturn this.updateY(\n\t\t\t\t\t\t\tdomainFrom,\n\t\t\t\t\t\t\tdomainTo,\n\t\t\t\t\t\t\tcoordinate,\n\t\t\t\t\t\t\tmajorShapes,\n\t\t\t\t\t\t\tminorShapes,\n\t\t\t\t\t\t\tgridlineShapes,\n\t\t\t\t\t\t\t0 - offset,\n\t\t\t\t\t\t\ttransform,\n\t\t\t\t\t\t\tplotAreaWidth\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase DChartAxisPosition.RIGHT:\n\t\t\t\t\tcoordinate = plotArea.coordinate.y.get(parser.coordinateIndex);\n\t\t\t\t\tif (coordinate) {\n\t\t\t\t\t\tconst domainFrom = coordinate.unmap(coordinate.transform.unmap(bounds.y));\n\t\t\t\t\t\tconst domainTo = coordinate.unmap(\n\t\t\t\t\t\t\tcoordinate.transform.unmap(bounds.y + bounds.height)\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst plotAreaWidth = plotArea.width;\n\t\t\t\t\t\treturn this.updateY(\n\t\t\t\t\t\t\tdomainFrom,\n\t\t\t\t\t\t\tdomainTo,\n\t\t\t\t\t\t\tcoordinate,\n\t\t\t\t\t\t\tmajorShapes,\n\t\t\t\t\t\t\tminorShapes,\n\t\t\t\t\t\t\tgridlineShapes,\n\t\t\t\t\t\t\tplotAreaWidth + offset,\n\t\t\t\t\t\t\ttransform,\n\t\t\t\t\t\t\tplotAreaWidth\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tprotected updateX(\n\t\tdomainMin: number,\n\t\tdomainMax: number,\n\t\tcoordinate: DChartCoordinate<CHART>,\n\t\tmajorShapes: EShape[],\n\t\tminorShapes: EShape[],\n\t\tgridlineShapes: EShape[],\n\t\tshapePositionY: number,\n\t\ttransform: Matrix,\n\t\tplotAreaHeight: number\n\t): boolean {\n\t\tconst tick = this._parser.tick;\n\t\tconst majorTick = tick.major;\n\t\tconst majorCount = majorTick.count;\n\t\tconst majorCapacity = majorTick.capacity;\n\t\tconst majorStep = majorTick.step;\n\t\tconst majorFormatter = majorTick.formatter;\n\t\tconst minorTick = tick.minor;\n\t\tconst minorCountPerMajor = minorTick.count;\n\t\tconst minorCount = (majorCapacity + 1) * minorCountPerMajor;\n\t\tconst minorStep = minorTick.step;\n\t\tconst majorTicks = this._majorTicks;\n\t\tconst minorTicks = this._minorTicks;\n\t\tcoordinate.ticks(\n\t\t\tdomainMin,\n\t\t\tdomainMax,\n\t\t\tmajorCount,\n\t\t\tmajorCapacity,\n\t\t\tmajorStep,\n\t\t\tminorCountPerMajor,\n\t\t\tminorCount,\n\t\t\tminorStep,\n\t\t\tmajorTicks,\n\t\t\tminorTicks\n\t\t);\n\n\t\tconst a = transform.a;\n\t\tconst tx = transform.tx;\n\t\tfor (let i = 0; i < majorCapacity; ++i) {\n\t\t\tconst majorShape = majorShapes[i];\n\t\t\tconst imajorTick = i * 3;\n\t\t\tconst majorTickPosition = majorTicks[imajorTick + 0];\n\t\t\tif (!isNaN(majorTickPosition)) {\n\t\t\t\tconst majorTickProjectedPosition = majorTicks[imajorTick + 1];\n\t\t\t\tconst majotTickPositionX = a * majorTickProjectedPosition + tx;\n\t\t\t\tconst majorTickStep = majorTicks[imajorTick + 2];\n\n\t\t\t\tmajorShape.disallowUploadedUpdate();\n\t\t\t\tmajorShape.visible = true;\n\t\t\t\tmajorShape.transform.position.set(majotTickPositionX, shapePositionY);\n\t\t\t\tmajorShape.text.value = majorFormatter.format(majorTickPosition, majorTickStep);\n\t\t\t\tmajorShape.allowUploadedUpdate();\n\n\t\t\t\tif (i < gridlineShapes.length) {\n\t\t\t\t\tconst gridlineShape = gridlineShapes[i];\n\t\t\t\t\tgridlineShape.disallowUploadedUpdate();\n\t\t\t\t\tgridlineShape.visible = true;\n\t\t\t\t\tgridlineShape.transform.position.set(majotTickPositionX, plotAreaHeight * 0.5);\n\t\t\t\t\tgridlineShape.size.set(0, plotAreaHeight);\n\t\t\t\t\tgridlineShape.allowUploadedUpdate();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tmajorShape.visible = false;\n\t\t\t\tif (gridlineShapes) {\n\t\t\t\t\tgridlineShapes[i].visible = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (let i = 0; i < minorCount; ++i) {\n\t\t\tconst minorShape = minorShapes[i];\n\t\t\tconst iminorTick = i * 3;\n\t\t\tconst minorTickPosition = minorTicks[iminorTick + 0];\n\t\t\tconst minorTickProjectedPosition = minorTicks[iminorTick + 1];\n\t\t\tif (!isNaN(minorTickPosition)) {\n\t\t\t\tminorShape.disallowUploadedUpdate();\n\t\t\t\tminorShape.visible = true;\n\t\t\t\tminorShape.transform.position.set(\n\t\t\t\t\ta * minorTickProjectedPosition + tx,\n\t\t\t\t\tshapePositionY\n\t\t\t\t);\n\t\t\t\tminorShape.allowUploadedUpdate();\n\t\t\t} else {\n\t\t\t\tminorShape.visible = false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\tprotected updateY(\n\t\tdomainMin: number,\n\t\tdomainMax: number,\n\t\tcoordinate: DChartCoordinate<CHART>,\n\t\tmajorShapes: EShape[],\n\t\tminorShapes: EShape[],\n\t\tgridlineShapes: EShape[],\n\t\tshapePositionX: number,\n\t\ttransform: Matrix,\n\t\tplotAreaWidth: number\n\t): boolean {\n\t\tconst tick = this._parser.tick;\n\t\tconst majorTick = tick.major;\n\t\tconst majorCount = majorTick.count;\n\t\tconst majorCapacity = majorTick.capacity;\n\t\tconst majorStep = majorTick.step;\n\t\tconst majorFormatter = majorTick.formatter;\n\t\tconst minorTick = tick.minor;\n\t\tconst minorCountPerMajor = minorTick.count;\n\t\tconst minorCount = (majorCapacity + 1) * minorCountPerMajor;\n\t\tconst minorStep = minorTick.step;\n\t\tconst majorTicks = this._majorTicks;\n\t\tconst minorTicks = this._minorTicks;\n\t\tcoordinate.ticks(\n\t\t\tdomainMin,\n\t\t\tdomainMax,\n\t\t\tmajorCount,\n\t\t\tmajorCapacity,\n\t\t\tmajorStep,\n\t\t\tminorCountPerMajor,\n\t\t\tminorCount,\n\t\t\tminorStep,\n\t\t\tmajorTicks,\n\t\t\tminorTicks\n\t\t);\n\n\t\tconst d = transform.d;\n\t\tconst ty = transform.ty;\n\t\tfor (let i = 0; i < majorCapacity; ++i) {\n\t\t\tconst majorShape = majorShapes[i];\n\t\t\tconst imajorTick = i * 3;\n\t\t\tconst majorTickPosition = majorTicks[imajorTick + 0];\n\t\t\tif (!isNaN(majorTickPosition)) {\n\t\t\t\tconst majorTickProjectedPosition = majorTicks[imajorTick + 1];\n\t\t\t\tconst majotTickPositionY = d * majorTickProjectedPosition + ty;\n\t\t\t\tconst majorTickStep = majorTicks[imajorTick + 2];\n\n\t\t\t\tmajorShape.disallowUploadedUpdate();\n\t\t\t\tmajorShape.visible = true;\n\t\t\t\tmajorShape.transform.position.set(shapePositionX, majotTickPositionY);\n\t\t\t\tmajorShape.text.value = majorFormatter.format(majorTickPosition, majorTickStep);\n\t\t\t\tmajorShape.allowUploadedUpdate();\n\n\t\t\t\tif (i < gridlineShapes.length) {\n\t\t\t\t\tconst gridlineShape = gridlineShapes[i];\n\t\t\t\t\tgridlineShape.disallowUploadedUpdate();\n\t\t\t\t\tgridlineShape.visible = true;\n\t\t\t\t\tgridlineShape.transform.position.set(plotAreaWidth * 0.5, majotTickPositionY);\n\t\t\t\t\tgridlineShape.size.set(plotAreaWidth, 0);\n\t\t\t\t\tgridlineShape.allowUploadedUpdate();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tmajorShape.visible = false;\n\t\t\t\tif (gridlineShapes) {\n\t\t\t\t\tgridlineShapes[i].visible = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (let i = 0; i < minorCount; ++i) {\n\t\t\tconst minorShape = minorShapes[i];\n\t\t\tconst iminorTick = i * 3;\n\t\t\tconst minorTickPosition = minorTicks[iminorTick + 0];\n\t\t\tconst minorTickProjectedPosition = minorTicks[iminorTick + 1];\n\t\t\tif (!isNaN(minorTickPosition)) {\n\t\t\t\tminorShape.disallowUploadedUpdate();\n\t\t\t\tminorShape.visible = true;\n\t\t\t\tminorShape.transform.position.set(\n\t\t\t\t\tshapePositionX,\n\t\t\t\t\td * minorTickProjectedPosition + ty\n\t\t\t\t);\n\t\t\t\tminorShape.allowUploadedUpdate();\n\t\t\t} else {\n\t\t\t\tminorShape.visible = false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\tdestroy(): void {\n\t\tthis._major.destroy();\n\t\tthis._minor.destroy();\n\t\tthis._index = 0;\n\t\tthis._container = undefined;\n\t}\n}\n"]}
@@ -11,63 +11,72 @@ var setShortcutKeyAndWhich = function (shortcut) {
11
11
  shortcut.key = key.toUpperCase();
12
12
  }
13
13
  var code = key.charCodeAt(0);
14
- if (97 <= code && code <= 122) {
15
- // a ... z
16
- shortcut.which = code - 32;
17
- }
18
- else {
19
- shortcut.which = code;
20
- }
14
+ shortcut.which = 97 <= code && code <= 122 ? code - 32 : code;
21
15
  }
22
16
  else {
23
17
  switch (key) {
24
- case "Enter":
18
+ case "enter":
19
+ shortcut.key = "Enter";
25
20
  shortcut.which = 13;
26
21
  break;
27
- case "Space":
22
+ case "space":
28
23
  shortcut.key = " ";
29
24
  shortcut.which = 32;
30
25
  break;
31
- case "Escape":
26
+ case "escape":
27
+ shortcut.key = "Escape";
32
28
  shortcut.which = 27;
33
29
  break;
34
- case "F1":
30
+ case "f1":
31
+ shortcut.key = "F1";
35
32
  shortcut.which = 112;
36
33
  break;
37
- case "F2":
34
+ case "f2":
35
+ shortcut.key = "F2";
38
36
  shortcut.which = 113;
39
37
  break;
40
- case "F3":
38
+ case "f3":
39
+ shortcut.key = "F3";
41
40
  shortcut.which = 114;
42
41
  break;
43
- case "F4":
42
+ case "f4":
43
+ shortcut.key = "F4";
44
44
  shortcut.which = 115;
45
45
  break;
46
- case "F5":
46
+ case "f5":
47
+ shortcut.key = "F5";
47
48
  shortcut.which = 116;
48
49
  break;
49
- case "F6":
50
+ case "f6":
51
+ shortcut.key = "F6";
50
52
  shortcut.which = 117;
51
53
  break;
52
- case "F7":
54
+ case "f7":
55
+ shortcut.key = "F7";
53
56
  shortcut.which = 118;
54
57
  break;
55
- case "F8":
58
+ case "f8":
59
+ shortcut.key = "F8";
56
60
  shortcut.which = 119;
57
61
  break;
58
- case "F9":
62
+ case "f9":
63
+ shortcut.key = "F9";
59
64
  shortcut.which = 120;
60
65
  break;
61
- case "F10":
66
+ case "f10":
67
+ shortcut.key = "F10";
62
68
  shortcut.which = 121;
63
69
  break;
64
- case "F11":
70
+ case "f11":
71
+ shortcut.key = "F11";
65
72
  shortcut.which = 122;
66
73
  break;
67
- case "F12":
74
+ case "f12":
75
+ shortcut.key = "F12";
68
76
  shortcut.which = 123;
69
77
  break;
70
- case "CapsLock":
78
+ case "capslock":
79
+ shortcut.key = "CapsLock";
71
80
  if (shortcut.shift) {
72
81
  shortcut.which = 20;
73
82
  }
@@ -75,45 +84,70 @@ var setShortcutKeyAndWhich = function (shortcut) {
75
84
  shortcut.which = 240;
76
85
  }
77
86
  break;
78
- case "ArrowUp":
87
+ case "arrowup":
88
+ shortcut.key = "ArrowUp";
79
89
  shortcut.which = 38;
80
90
  break;
81
- case "ArrowDown":
91
+ case "arrowdown":
92
+ shortcut.key = "ArrowDown";
82
93
  shortcut.which = 40;
83
94
  break;
84
- case "ArrowLeft":
95
+ case "arrowleft":
96
+ shortcut.key = "ArrowLeft";
85
97
  shortcut.which = 37;
86
98
  break;
87
- case "ArrowRight":
99
+ case "arrowright":
100
+ shortcut.key = "ArrowRight";
88
101
  shortcut.which = 39;
89
102
  break;
90
- case "Insert":
103
+ case "insert":
104
+ shortcut.key = "Insert";
91
105
  shortcut.which = 45;
92
106
  break;
93
- case "Delete":
107
+ case "delete":
108
+ shortcut.key = "Delete";
94
109
  shortcut.which = 46;
95
110
  break;
96
- case "PageUp":
111
+ case "pageup":
112
+ shortcut.key = "PageUp";
97
113
  shortcut.which = 33;
98
114
  break;
99
- case "PageDown":
115
+ case "pagedown":
116
+ shortcut.key = "PageDown";
100
117
  shortcut.which = 34;
101
118
  break;
102
- case "Backspace":
119
+ case "backspace":
120
+ shortcut.key = "Backspace";
103
121
  shortcut.which = 8;
104
122
  break;
105
- case ";":
123
+ case "colon":
124
+ shortcut.key = ":";
125
+ shortcut.which = 186;
126
+ break;
127
+ case "semicolon":
128
+ shortcut.key = ";";
106
129
  shortcut.which = 187;
107
130
  break;
108
- case "Pause":
131
+ case "pause":
132
+ shortcut.key = "Pause";
109
133
  shortcut.which = 19;
110
134
  break;
111
- case "ScrollLock":
135
+ case "scrolllock":
136
+ shortcut.key = "ScrollLock";
112
137
  shortcut.which = 145;
113
138
  break;
114
- case "Tab":
139
+ case "tab":
140
+ shortcut.key = "Tab";
115
141
  shortcut.which = 9;
116
142
  break;
143
+ case "plus":
144
+ shortcut.key = "+";
145
+ shortcut.which = 187;
146
+ break;
147
+ case "minus":
148
+ shortcut.key = "-";
149
+ shortcut.which = 189;
150
+ break;
117
151
  }
118
152
  }
119
153
  return shortcut;
@@ -1 +1 @@
1
- {"version":3,"file":"util-keyboard-event.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/util/util-keyboard-event.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGlD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAoBvC,IAAM,sBAAsB,GAAG,UAAC,QAAmC;IAClE,IAAM,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC;IACzB,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,EAAE;QACpB,IAAI,QAAQ,CAAC,KAAK,EAAE;YACnB,QAAQ,CAAC,GAAG,GAAG,GAAG,CAAC,WAAW,EAAE,CAAC;SACjC;QACD,IAAM,IAAI,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAC/B,IAAI,EAAE,IAAI,IAAI,IAAI,IAAI,IAAI,GAAG,EAAE;YAC9B,UAAU;YACV,QAAQ,CAAC,KAAK,GAAG,IAAI,GAAG,EAAE,CAAC;SAC3B;aAAM;YACN,QAAQ,CAAC,KAAK,GAAG,IAAI,CAAC;SACtB;KACD;SAAM;QACN,QAAQ,GAAG,EAAE;YACZ,KAAK,OAAO;gBACX,QAAQ,CAAC,KAAK,GAAG,EAAE,CAAC;gBACpB,MAAM;YACP,KAAK,OAAO;gBACX,QAAQ,CAAC,GAAG,GAAG,GAAG,CAAC;gBACnB,QAAQ,CAAC,KAAK,GAAG,EAAE,CAAC;gBACp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C,IAAI,OAAO,IAAI,IAAI,EAAE;gBACpB,IAAM,IAAI,GAAG,eAAe,CAAC,IAAI,CAChC,OAAO,EACP,KAAK,EACL,OAAO,CAAC,KAAK,CAAC,WAAW,IAAI,SAAS,EACtC,SAAS,EACT,MAAM,CACN,CAAC;gBACF,IAAI,IAAI,IAAI,IAAI,EAAE;oBACjB,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;oBAC5B,OAAO,IAAI,CAAC;iBACZ;aACD;SACD;QACD,OAAO,KAAK,CAAC;IACd,CAAC;IACF,wBAAC;AAAD,CAAC,AAvND,IAuNC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DApplicationLayerLike } from \"../d-application-layer-like\";\nimport { DApplications } from \"../d-applications\";\nimport { DBase } from \"../d-base\";\nimport { DBaseStateSet } from \"../d-base-state-set\";\nimport { isString } from \"./is-string\";\n\nexport interface UtilKeyboardEventLayerPicker {\n\tpicked: DApplicationLayerLike | null;\n}\n\nexport interface UtilKeyboardEventShortcut {\n\talt: boolean;\n\tctrl: boolean;\n\tshift: boolean;\n\tkey: string;\n\twhich: number;\n\tevent?: string;\n}\n\nexport interface UtilKeyboardEventShortcutTarget {\n\tstate: DBaseStateSet;\n\temit(eventName: string): void;\n}\n\nconst setShortcutKeyAndWhich = (shortcut: UtilKeyboardEventShortcut): UtilKeyboardEventShortcut => {\n\tconst key = shortcut.key;\n\tif (key.length <= 1) {\n\t\tif (shortcut.shift) {\n\t\t\tshortcut.key = key.toUpperCase();\n\t\t}\n\t\tconst code = key.charCodeAt(0);\n\t\tif (97 <= code && code <= 122) {\n\t\t\t// a ... z\n\t\t\tshortcut.which = code - 32;\n\t\t} else {\n\t\t\tshortcut.which = code;\n\t\t}\n\t} else {\n\t\tswitch (key) {\n\t\t\tcase \"Enter\":\n\t\t\t\tshortcut.which = 13;\n\t\t\t\tbreak;\n\t\t\tcase \"Space\":\n\t\t\t\tshortcut.key = \" \";\n\t\t\t\tshortcut.which = 32;\n\t\t\t\tbreak;\n\t\t\tcase \"Escape\":\n\t\t\t\tshortcut.which = 27;\n\t\t\t\tbreak;\n\t\t\tcase \"F1\":\n\t\t\t\tshortcut.which = 112;\n\t\t\t\tbreak;\n\t\t\tcase \"F2\":\n\t\t\t\tshortcut.which = 113;\n\t\t\t\tbreak;\n\t\t\tcase \"F3\":\n\t\t\t\tshortcut.which = 114;\n\t\t\t\tbreak;\n\t\t\tcase \"F4\":\n\t\t\t\tshortcut.which = 115;\n\t\t\t\tbreak;\n\t\t\tcase \"F5\":\n\t\t\t\tshortcut.which = 116;\n\t\t\t\tbreak;\n\t\t\tcase \"F6\":\n\t\t\t\tshortcut.which = 117;\n\t\t\t\tbreak;\n\t\t\tcase \"F7\":\n\t\t\t\tshortcut.which = 118;\n\t\t\t\tbreak;\n\t\t\tcase \"F8\":\n\t\t\t\tshortcut.which = 119;\n\t\t\t\tbreak;\n\t\t\tcase \"F9\":\n\t\t\t\tshortcut.which = 120;\n\t\t\t\tbreak;\n\t\t\tcase \"F10\":\n\t\t\t\tshortcut.which = 121;\n\t\t\t\tbreak;\n\t\t\tcase \"F11\":\n\t\t\t\tshortcut.which = 122;\n\t\t\t\tbreak;\n\t\t\tcase \"F12\":\n\t\t\t\tshortcut.which = 123;\n\t\t\t\tbreak;\n\t\t\tcase \"CapsLock\":\n\t\t\t\tif (shortcut.shift) {\n\t\t\t\t\tshortcut.which = 20;\n\t\t\t\t} else {\n\t\t\t\t\tshortcut.which = 240;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"ArrowUp\":\n\t\t\t\tshortcut.which = 38;\n\t\t\t\tbreak;\n\t\t\tcase \"ArrowDown\":\n\t\t\t\tshortcut.which = 40;\n\t\t\t\tbreak;\n\t\t\tcase \"ArrowLeft\":\n\t\t\t\tshortcut.which = 37;\n\t\t\t\tbreak;\n\t\t\tcase \"ArrowRight\":\n\t\t\t\tshortcut.which = 39;\n\t\t\t\tbreak;\n\t\t\tcase \"Insert\":\n\t\t\t\tshortcut.which = 45;\n\t\t\t\tbreak;\n\t\t\tcase \"Delete\":\n\t\t\t\tshortcut.which = 46;\n\t\t\t\tbreak;\n\t\t\tcase \"PageUp\":\n\t\t\t\tshortcut.which = 33;\n\t\t\t\tbreak;\n\t\t\tcase \"PageDown\":\n\t\t\t\tshortcut.which = 34;\n\t\t\t\tbreak;\n\t\t\tcase \"Backspace\":\n\t\t\t\tshortcut.which = 8;\n\t\t\t\tbreak;\n\t\t\tcase \";\":\n\t\t\t\tshortcut.which = 187;\n\t\t\t\tbreak;\n\t\t\tcase \"Pause\":\n\t\t\t\tshortcut.which = 19;\n\t\t\t\tbreak;\n\t\t\tcase \"ScrollLock\":\n\t\t\t\tshortcut.which = 145;\n\t\t\t\tbreak;\n\t\t\tcase \"Tab\":\n\t\t\t\tshortcut.which = 9;\n\t\t\t\tbreak;\n\t\t}\n\t}\n\treturn shortcut;\n};\n\nexport class UtilKeyboardEvent {\n\tstatic isActivateKey(e: KeyboardEvent): boolean {\n\t\treturn e.key === \"Space\" || e.key === \"Enter\" || e.which === 32 || e.which === 13;\n\t}\n\n\tstatic isArrowUpKey(e: KeyboardEvent): boolean {\n\t\treturn e.key === \"ArrowUp\" || e.which === 38;\n\t}\n\n\tstatic isArrowDownKey(e: KeyboardEvent): boolean {\n\t\treturn e.key === \"ArrowDown\" || e.which === 40;\n\t}\n\n\tstatic isArrowLeftKey(e: KeyboardEvent): boolean {\n\t\treturn e.key === \"ArrowLeft\" || e.which === 37;\n\t}\n\n\tstatic isArrowRightKey(e: KeyboardEvent): boolean {\n\t\treturn e.key === \"ArrowRight\" || e.which === 39;\n\t}\n\n\tstatic isCancelKey(e: KeyboardEvent): boolean {\n\t\treturn e.key === \"Esc\" || e.which === 27;\n\t}\n\n\tstatic isFocusKey(e: KeyboardEvent): boolean {\n\t\treturn e.key === \"Tab\" || e.which === 9;\n\t}\n\n\tstatic isUndoKey(e: KeyboardEvent): boolean {\n\t\treturn e.ctrlKey && (e.key === \"z\" || e.which === 90);\n\t}\n\n\tstatic isRedoKey(e: KeyboardEvent): boolean {\n\t\treturn e.ctrlKey && (e.key === \"y\" || e.which === 89);\n\t}\n\n\tstatic isSaveKey(e: KeyboardEvent): boolean {\n\t\treturn e.ctrlKey && !e.shiftKey && (e.key === \"s\" || e.which === 83);\n\t}\n\n\tstatic isSaveAsKey(e: KeyboardEvent): boolean {\n\t\treturn e.ctrlKey && e.shiftKey && (e.key === \"S\" || e.which === 83);\n\t}\n\n\tstatic isDeleteKey(e: KeyboardEvent): boolean {\n\t\treturn e.key === \"Delete\" || e.which === 46;\n\t}\n\n\tstatic isSelectAllKey(e: KeyboardEvent): boolean {\n\t\treturn e.ctrlKey && !e.shiftKey && (e.key === \"a\" || e.which === 65);\n\t}\n\n\tstatic isOkKey(e: KeyboardEvent): boolean {\n\t\treturn e.key === \"Enter\" || e.which === 13;\n\t}\n\n\tstatic getFocusDirection(e: KeyboardEvent): boolean {\n\t\treturn e.shiftKey !== true;\n\t}\n\n\tstatic toShortcut(\n\t\texpressionOrShortcut: string | UtilKeyboardEventShortcut\n\t): UtilKeyboardEventShortcut {\n\t\tif (!isString(expressionOrShortcut)) {\n\t\t\treturn expressionOrShortcut;\n\t\t} else {\n\t\t\tconst expression = expressionOrShortcut;\n\t\t\tconst arrowIndex = expression.indexOf(\"->\");\n\t\t\tlet keyExpression: string;\n\t\t\tlet event: string | undefined;\n\t\t\tif (0 <= arrowIndex) {\n\t\t\t\tkeyExpression = expression.substring(0, arrowIndex).trim().toLowerCase();\n\t\t\t\tevent = expression.substring(arrowIndex + 2).trim();\n\t\t\t} else {\n\t\t\t\tkeyExpression = expression.trim().toLowerCase();\n\t\t\t}\n\t\t\tlet alt = false;\n\t\t\tlet ctrl = false;\n\t\t\tlet shift = false;\n\t\t\tlet key = \"a\";\n\t\t\tconst length = keyExpression.length;\n\t\t\tlet i = 0;\n\t\t\tlet j = 1;\n\t\t\tfor (; j < length; ++j) {\n\t\t\t\tconst c = keyExpression.charAt(j);\n\t\t\t\tif (c === \"+\") {\n\t\t\t\t\tconst part = keyExpression.substring(i, j);\n\t\t\t\t\tswitch (part) {\n\t\t\t\t\t\tcase \"alt\":\n\t\t\t\t\t\t\talt = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"ctrl\":\n\t\t\t\t\t\t\tctrl = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"shift\":\n\t\t\t\t\t\t\tshift = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tkey = part;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tj += 1;\n\t\t\t\t\ti = j;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (i !== j) {\n\t\t\t\tkey = keyExpression.substring(i, j);\n\t\t\t}\n\t\t\treturn setShortcutKeyAndWhich({\n\t\t\t\talt,\n\t\t\t\tctrl,\n\t\t\t\tshift,\n\t\t\t\tkey,\n\t\t\t\twhich: 0,\n\t\t\t\tevent\n\t\t\t});\n\t\t}\n\t}\n\n\tstatic toString(shortcut: UtilKeyboardEventShortcut): string {\n\t\tconst parts = [];\n\t\tif (shortcut.ctrl) {\n\t\t\tparts.push(\"Ctrl\");\n\t\t}\n\t\tif (shortcut.shift) {\n\t\t\tparts.push(\"Shift\");\n\t\t}\n\t\tif (shortcut.alt) {\n\t\t\tparts.push(\"Alt\");\n\t\t}\n\t\tparts.push(shortcut.key.toUpperCase());\n\t\treturn parts.join(\"+\");\n\t}\n\n\tstatic on(\n\t\ttarget: UtilKeyboardEventShortcutTarget,\n\t\texpressionOrShortcut: string | UtilKeyboardEventShortcut,\n\t\thandler?: (e: KeyboardEvent) => void\n\t): void {\n\t\tconst shortcut = this.toShortcut(expressionOrShortcut);\n\t\tdocument.body.addEventListener(\"keydown\", (e: KeyboardEvent): void => {\n\t\t\tif (\n\t\t\t\te.altKey === shortcut.alt &&\n\t\t\t\te.ctrlKey === shortcut.ctrl &&\n\t\t\t\te.shiftKey === shortcut.shift &&\n\t\t\t\t(e.key === shortcut.key || e.which === shortcut.which)\n\t\t\t) {\n\t\t\t\tif (target.state.isActionable) {\n\t\t\t\t\tif (shortcut.event != null) {\n\t\t\t\t\t\ttarget.emit(shortcut.event);\n\t\t\t\t\t} else if (handler != null) {\n\t\t\t\t\t\thandler(e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\te.preventDefault();\n\t\t\t}\n\t\t});\n\t}\n\n\tstatic moveFocusVertically(\n\t\te: KeyboardEvent,\n\t\ttarget: DBase,\n\t\tpicker?: UtilKeyboardEventLayerPicker\n\t): boolean {\n\t\tif (target.state.isActionable) {\n\t\t\tconst isBackward = UtilKeyboardEvent.isArrowUpKey(e);\n\t\t\tconst isForward = UtilKeyboardEvent.isArrowDownKey(e);\n\t\t\tif (isBackward || isForward) {\n\t\t\t\treturn this.moveFocus(isForward, target, picker);\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tstatic moveFocusHorizontally(\n\t\te: KeyboardEvent,\n\t\ttarget: DBase,\n\t\tpicker?: UtilKeyboardEventLayerPicker\n\t): boolean {\n\t\tif (target.state.isActionable) {\n\t\t\tconst isBackward = UtilKeyboardEvent.isArrowLeftKey(e);\n\t\t\tconst isForward = UtilKeyboardEvent.isArrowRightKey(e);\n\t\t\tif (isBackward || isForward) {\n\t\t\t\treturn this.moveFocus(isForward, target, picker);\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tstatic moveFocus(\n\t\tdirection: boolean,\n\t\ttarget: DBase,\n\t\tpicker?: UtilKeyboardEventLayerPicker\n\t): boolean {\n\t\tconst layer = picker?.picked ?? DApplications.getLayer(target);\n\t\tif (layer) {\n\t\t\tconst focusController = layer.getFocusController();\n\t\t\tconst focused = focusController.get();\n\t\t\tif (focused != null) {\n\t\t\t\tconst next = focusController.find(\n\t\t\t\t\tfocused,\n\t\t\t\t\tfalse,\n\t\t\t\t\tfocused.state.isFocusRoot || direction,\n\t\t\t\t\tdirection,\n\t\t\t\t\ttarget\n\t\t\t\t);\n\t\t\t\tif (next != null) {\n\t\t\t\t\tfocusController.focus(next);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n}\n"]}
1
+ {"version":3,"file":"util-keyboard-event.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/util/util-keyboard-event.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGlD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAoBvC,IAAM,sBAAsB,GAAG,UAAC,QAAmC;IAClE,IAAM,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC;IACzB,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,EAAE;QACpB,IAAI,QAAQ,CAAC,KAAK,EAAE;YACnB,QAAQ,CAAC,GAAG,GAAG,GAAG,CAAC,WAAW,EAAE,CAAC;SACjC;QACD,IAAM,IAAI,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAC/B,QAAQ,CAAC,KAAK,GAAG,EAAE,IAAI,IAAI,IAAI,IAAI,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;KAC9D;SAAM;QACN,QAAQ,GAAG,EAAE;YACZ,KAAK,OAAO;gBACX,QAAQ,CAAC,GAAG,GAAG,OAAO,CAAC;gBACvB,QAAQ,CAAC,KAAK,GAAG,EAAE,CAAC;gBACpB,MAAM;YACP,KAAK,OAAO;gBACX,QAAQ,CAAC,GAAG,GAAG,GAAG,CAAC;gBACnB,QAAQ,CAAC,KAAK,GAAG,EAAE,CAAC;gBACpB,MAAM;YACP,KAAK,QAAQ;gBACZ,QAAQ,CAAC,GAAG,GAAG,QAAQ,CAAC;gBACx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ErC,IAAM,KAAK,GAAG,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,MAAM,mCAAI,aAAa,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QAC/D,IAAI,KAAK,EAAE;YACV,IAAM,eAAe,GAAG,KAAK,CAAC,kBAAkB,EAAE,CAAC;YACnD,IAAM,OAAO,GAAG,eAAe,CAAC,GAAG,EAAE,CAAC;YACtC,IAAI,OAAO,IAAI,IAAI,EAAE;gBACpB,IAAM,IAAI,GAAG,eAAe,CAAC,IAAI,CAChC,OAAO,EACP,KAAK,EACL,OAAO,CAAC,KAAK,CAAC,WAAW,IAAI,SAAS,EACtC,SAAS,EACT,MAAM,CACN,CAAC;gBACF,IAAI,IAAI,IAAI,IAAI,EAAE;oBACjB,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;oBAC5B,OAAO,IAAI,CAAC;iBACZ;aACD;SACD;QACD,OAAO,KAAK,CAAC;IACd,CAAC;IACF,wBAAC;AAAD,CAAC,AAvND,IAuNC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DApplicationLayerLike } from \"../d-application-layer-like\";\nimport { DApplications } from \"../d-applications\";\nimport { DBase } from \"../d-base\";\nimport { DBaseStateSet } from \"../d-base-state-set\";\nimport { isString } from \"./is-string\";\n\nexport interface UtilKeyboardEventLayerPicker {\n\tpicked: DApplicationLayerLike | null;\n}\n\nexport interface UtilKeyboardEventShortcut {\n\talt: boolean;\n\tctrl: boolean;\n\tshift: boolean;\n\tkey: string;\n\twhich: number;\n\tevent?: string;\n}\n\nexport interface UtilKeyboardEventShortcutTarget {\n\tstate: DBaseStateSet;\n\temit(eventName: string): void;\n}\n\nconst setShortcutKeyAndWhich = (shortcut: UtilKeyboardEventShortcut): UtilKeyboardEventShortcut => {\n\tconst key = shortcut.key;\n\tif (key.length <= 1) {\n\t\tif (shortcut.shift) {\n\t\t\tshortcut.key = key.toUpperCase();\n\t\t}\n\t\tconst code = key.charCodeAt(0);\n\t\tshortcut.which = 97 <= code && code <= 122 ? code - 32 : code;\n\t} else {\n\t\tswitch (key) {\n\t\t\tcase \"enter\":\n\t\t\t\tshortcut.key = \"Enter\";\n\t\t\t\tshortcut.which = 13;\n\t\t\t\tbreak;\n\t\t\tcase \"space\":\n\t\t\t\tshortcut.key = \" \";\n\t\t\t\tshortcut.which = 32;\n\t\t\t\tbreak;\n\t\t\tcase \"escape\":\n\t\t\t\tshortcut.key = \"Escape\";\n\t\t\t\tshortcut.which = 27;\n\t\t\t\tbreak;\n\t\t\tcase \"f1\":\n\t\t\t\tshortcut.key = \"F1\";\n\t\t\t\tshortcut.which = 112;\n\t\t\t\tbreak;\n\t\t\tcase \"f2\":\n\t\t\t\tshortcut.key = \"F2\";\n\t\t\t\tshortcut.which = 113;\n\t\t\t\tbreak;\n\t\t\tcase \"f3\":\n\t\t\t\tshortcut.key = \"F3\";\n\t\t\t\tshortcut.which = 114;\n\t\t\t\tbreak;\n\t\t\tcase \"f4\":\n\t\t\t\tshortcut.key = \"F4\";\n\t\t\t\tshortcut.which = 115;\n\t\t\t\tbreak;\n\t\t\tcase \"f5\":\n\t\t\t\tshortcut.key = \"F5\";\n\t\t\t\tshortcut.which = 116;\n\t\t\t\tbreak;\n\t\t\tcase \"f6\":\n\t\t\t\tshortcut.key = \"F6\";\n\t\t\t\tshortcut.which = 117;\n\t\t\t\tbreak;\n\t\t\tcase \"f7\":\n\t\t\t\tshortcut.key = \"F7\";\n\t\t\t\tshortcut.which = 118;\n\t\t\t\tbreak;\n\t\t\tcase \"f8\":\n\t\t\t\tshortcut.key = \"F8\";\n\t\t\t\tshortcut.which = 119;\n\t\t\t\tbreak;\n\t\t\tcase \"f9\":\n\t\t\t\tshortcut.key = \"F9\";\n\t\t\t\tshortcut.which = 120;\n\t\t\t\tbreak;\n\t\t\tcase \"f10\":\n\t\t\t\tshortcut.key = \"F10\";\n\t\t\t\tshortcut.which = 121;\n\t\t\t\tbreak;\n\t\t\tcase \"f11\":\n\t\t\t\tshortcut.key = \"F11\";\n\t\t\t\tshortcut.which = 122;\n\t\t\t\tbreak;\n\t\t\tcase \"f12\":\n\t\t\t\tshortcut.key = \"F12\";\n\t\t\t\tshortcut.which = 123;\n\t\t\t\tbreak;\n\t\t\tcase \"capslock\":\n\t\t\t\tshortcut.key = \"CapsLock\";\n\t\t\t\tif (shortcut.shift) {\n\t\t\t\t\tshortcut.which = 20;\n\t\t\t\t} else {\n\t\t\t\t\tshortcut.which = 240;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"arrowup\":\n\t\t\t\tshortcut.key = \"ArrowUp\";\n\t\t\t\tshortcut.which = 38;\n\t\t\t\tbreak;\n\t\t\tcase \"arrowdown\":\n\t\t\t\tshortcut.key = \"ArrowDown\";\n\t\t\t\tshortcut.which = 40;\n\t\t\t\tbreak;\n\t\t\tcase \"arrowleft\":\n\t\t\t\tshortcut.key = \"ArrowLeft\";\n\t\t\t\tshortcut.which = 37;\n\t\t\t\tbreak;\n\t\t\tcase \"arrowright\":\n\t\t\t\tshortcut.key = \"ArrowRight\";\n\t\t\t\tshortcut.which = 39;\n\t\t\t\tbreak;\n\t\t\tcase \"insert\":\n\t\t\t\tshortcut.key = \"Insert\";\n\t\t\t\tshortcut.which = 45;\n\t\t\t\tbreak;\n\t\t\tcase \"delete\":\n\t\t\t\tshortcut.key = \"Delete\";\n\t\t\t\tshortcut.which = 46;\n\t\t\t\tbreak;\n\t\t\tcase \"pageup\":\n\t\t\t\tshortcut.key = \"PageUp\";\n\t\t\t\tshortcut.which = 33;\n\t\t\t\tbreak;\n\t\t\tcase \"pagedown\":\n\t\t\t\tshortcut.key = \"PageDown\";\n\t\t\t\tshortcut.which = 34;\n\t\t\t\tbreak;\n\t\t\tcase \"backspace\":\n\t\t\t\tshortcut.key = \"Backspace\";\n\t\t\t\tshortcut.which = 8;\n\t\t\t\tbreak;\n\t\t\tcase \"colon\":\n\t\t\t\tshortcut.key = \":\";\n\t\t\t\tshortcut.which = 186;\n\t\t\t\tbreak;\n\t\t\tcase \"semicolon\":\n\t\t\t\tshortcut.key = \";\";\n\t\t\t\tshortcut.which = 187;\n\t\t\t\tbreak;\n\t\t\tcase \"pause\":\n\t\t\t\tshortcut.key = \"Pause\";\n\t\t\t\tshortcut.which = 19;\n\t\t\t\tbreak;\n\t\t\tcase \"scrolllock\":\n\t\t\t\tshortcut.key = \"ScrollLock\";\n\t\t\t\tshortcut.which = 145;\n\t\t\t\tbreak;\n\t\t\tcase \"tab\":\n\t\t\t\tshortcut.key = \"Tab\";\n\t\t\t\tshortcut.which = 9;\n\t\t\t\tbreak;\n\t\t\tcase \"plus\":\n\t\t\t\tshortcut.key = \"+\";\n\t\t\t\tshortcut.which = 187;\n\t\t\t\tbreak;\n\t\t\tcase \"minus\":\n\t\t\t\tshortcut.key = \"-\";\n\t\t\t\tshortcut.which = 189;\n\t\t\t\tbreak;\n\t\t}\n\t}\n\treturn shortcut;\n};\n\nexport class UtilKeyboardEvent {\n\tstatic isActivateKey(e: KeyboardEvent): boolean {\n\t\treturn e.key === \"Space\" || e.key === \"Enter\" || e.which === 32 || e.which === 13;\n\t}\n\n\tstatic isArrowUpKey(e: KeyboardEvent): boolean {\n\t\treturn e.key === \"ArrowUp\" || e.which === 38;\n\t}\n\n\tstatic isArrowDownKey(e: KeyboardEvent): boolean {\n\t\treturn e.key === \"ArrowDown\" || e.which === 40;\n\t}\n\n\tstatic isArrowLeftKey(e: KeyboardEvent): boolean {\n\t\treturn e.key === \"ArrowLeft\" || e.which === 37;\n\t}\n\n\tstatic isArrowRightKey(e: KeyboardEvent): boolean {\n\t\treturn e.key === \"ArrowRight\" || e.which === 39;\n\t}\n\n\tstatic isCancelKey(e: KeyboardEvent): boolean {\n\t\treturn e.key === \"Esc\" || e.which === 27;\n\t}\n\n\tstatic isFocusKey(e: KeyboardEvent): boolean {\n\t\treturn e.key === \"Tab\" || e.which === 9;\n\t}\n\n\tstatic isUndoKey(e: KeyboardEvent): boolean {\n\t\treturn e.ctrlKey && (e.key === \"z\" || e.which === 90);\n\t}\n\n\tstatic isRedoKey(e: KeyboardEvent): boolean {\n\t\treturn e.ctrlKey && (e.key === \"y\" || e.which === 89);\n\t}\n\n\tstatic isSaveKey(e: KeyboardEvent): boolean {\n\t\treturn e.ctrlKey && !e.shiftKey && (e.key === \"s\" || e.which === 83);\n\t}\n\n\tstatic isSaveAsKey(e: KeyboardEvent): boolean {\n\t\treturn e.ctrlKey && e.shiftKey && (e.key === \"S\" || e.which === 83);\n\t}\n\n\tstatic isDeleteKey(e: KeyboardEvent): boolean {\n\t\treturn e.key === \"Delete\" || e.which === 46;\n\t}\n\n\tstatic isSelectAllKey(e: KeyboardEvent): boolean {\n\t\treturn e.ctrlKey && !e.shiftKey && (e.key === \"a\" || e.which === 65);\n\t}\n\n\tstatic isOkKey(e: KeyboardEvent): boolean {\n\t\treturn e.key === \"Enter\" || e.which === 13;\n\t}\n\n\tstatic getFocusDirection(e: KeyboardEvent): boolean {\n\t\treturn e.shiftKey !== true;\n\t}\n\n\tstatic toShortcut(\n\t\texpressionOrShortcut: string | UtilKeyboardEventShortcut\n\t): UtilKeyboardEventShortcut {\n\t\tif (!isString(expressionOrShortcut)) {\n\t\t\treturn expressionOrShortcut;\n\t\t} else {\n\t\t\tconst expression = expressionOrShortcut;\n\t\t\tconst arrowIndex = expression.indexOf(\"->\");\n\t\t\tlet keyExpression: string;\n\t\t\tlet event: string | undefined;\n\t\t\tif (0 <= arrowIndex) {\n\t\t\t\tkeyExpression = expression.substring(0, arrowIndex).trim().toLowerCase();\n\t\t\t\tevent = expression.substring(arrowIndex + 2).trim();\n\t\t\t} else {\n\t\t\t\tkeyExpression = expression.trim().toLowerCase();\n\t\t\t}\n\t\t\tlet alt = false;\n\t\t\tlet ctrl = false;\n\t\t\tlet shift = false;\n\t\t\tlet key = \"a\";\n\t\t\tconst length = keyExpression.length;\n\t\t\tlet i = 0;\n\t\t\tlet j = 1;\n\t\t\tfor (; j < length; ++j) {\n\t\t\t\tconst c = keyExpression.charAt(j);\n\t\t\t\tif (c === \"+\") {\n\t\t\t\t\tconst part = keyExpression.substring(i, j);\n\t\t\t\t\tswitch (part) {\n\t\t\t\t\t\tcase \"alt\":\n\t\t\t\t\t\t\talt = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"ctrl\":\n\t\t\t\t\t\t\tctrl = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"shift\":\n\t\t\t\t\t\t\tshift = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tkey = part;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tj += 1;\n\t\t\t\t\ti = j;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (i !== j) {\n\t\t\t\tkey = keyExpression.substring(i, j);\n\t\t\t}\n\t\t\treturn setShortcutKeyAndWhich({\n\t\t\t\talt,\n\t\t\t\tctrl,\n\t\t\t\tshift,\n\t\t\t\tkey,\n\t\t\t\twhich: 0,\n\t\t\t\tevent\n\t\t\t});\n\t\t}\n\t}\n\n\tstatic toString(shortcut: UtilKeyboardEventShortcut): string {\n\t\tconst parts = [];\n\t\tif (shortcut.ctrl) {\n\t\t\tparts.push(\"Ctrl\");\n\t\t}\n\t\tif (shortcut.shift) {\n\t\t\tparts.push(\"Shift\");\n\t\t}\n\t\tif (shortcut.alt) {\n\t\t\tparts.push(\"Alt\");\n\t\t}\n\t\tparts.push(shortcut.key.toUpperCase());\n\t\treturn parts.join(\"+\");\n\t}\n\n\tstatic on(\n\t\ttarget: UtilKeyboardEventShortcutTarget,\n\t\texpressionOrShortcut: string | UtilKeyboardEventShortcut,\n\t\thandler?: (e: KeyboardEvent) => void\n\t): void {\n\t\tconst shortcut = this.toShortcut(expressionOrShortcut);\n\t\tdocument.body.addEventListener(\"keydown\", (e: KeyboardEvent): void => {\n\t\t\tif (\n\t\t\t\te.altKey === shortcut.alt &&\n\t\t\t\te.ctrlKey === shortcut.ctrl &&\n\t\t\t\te.shiftKey === shortcut.shift &&\n\t\t\t\t(e.key === shortcut.key || e.which === shortcut.which)\n\t\t\t) {\n\t\t\t\tif (target.state.isActionable) {\n\t\t\t\t\tif (shortcut.event != null) {\n\t\t\t\t\t\ttarget.emit(shortcut.event);\n\t\t\t\t\t} else if (handler != null) {\n\t\t\t\t\t\thandler(e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\te.preventDefault();\n\t\t\t}\n\t\t});\n\t}\n\n\tstatic moveFocusVertically(\n\t\te: KeyboardEvent,\n\t\ttarget: DBase,\n\t\tpicker?: UtilKeyboardEventLayerPicker\n\t): boolean {\n\t\tif (target.state.isActionable) {\n\t\t\tconst isBackward = UtilKeyboardEvent.isArrowUpKey(e);\n\t\t\tconst isForward = UtilKeyboardEvent.isArrowDownKey(e);\n\t\t\tif (isBackward || isForward) {\n\t\t\t\treturn this.moveFocus(isForward, target, picker);\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tstatic moveFocusHorizontally(\n\t\te: KeyboardEvent,\n\t\ttarget: DBase,\n\t\tpicker?: UtilKeyboardEventLayerPicker\n\t): boolean {\n\t\tif (target.state.isActionable) {\n\t\t\tconst isBackward = UtilKeyboardEvent.isArrowLeftKey(e);\n\t\t\tconst isForward = UtilKeyboardEvent.isArrowRightKey(e);\n\t\t\tif (isBackward || isForward) {\n\t\t\t\treturn this.moveFocus(isForward, target, picker);\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tstatic moveFocus(\n\t\tdirection: boolean,\n\t\ttarget: DBase,\n\t\tpicker?: UtilKeyboardEventLayerPicker\n\t): boolean {\n\t\tconst layer = picker?.picked ?? DApplications.getLayer(target);\n\t\tif (layer) {\n\t\t\tconst focusController = layer.getFocusController();\n\t\t\tconst focused = focusController.get();\n\t\t\tif (focused != null) {\n\t\t\t\tconst next = focusController.find(\n\t\t\t\t\tfocused,\n\t\t\t\t\tfalse,\n\t\t\t\t\tfocused.state.isFocusRoot || direction,\n\t\t\t\t\tdirection,\n\t\t\t\t\ttarget\n\t\t\t\t);\n\t\t\t\tif (next != null) {\n\t\t\t\t\tfocusController.focus(next);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.287.0
2
+ Winter Cardinal UI v0.289.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.287.0
2
+ Winter Cardinal UI v0.289.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.287.0
2
+ Winter Cardinal UI v0.289.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.287.0
2
+ Winter Cardinal UI v0.289.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5