@wcardinal/wcardinal-ui 0.154.0 → 0.155.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-application-layer-options.d.ts +3 -4
- package/dist/types/wcardinal/ui/d-base-background.d.ts +2 -4
- package/dist/types/wcardinal/ui/d-base-border.d.ts +2 -4
- package/dist/types/wcardinal/ui/d-base-corner.d.ts +1 -3
- package/dist/types/wcardinal/ui/d-base-outline.d.ts +2 -4
- package/dist/types/wcardinal/ui/d-base-padding.d.ts +2 -4
- package/dist/types/wcardinal/ui/d-chart-series-base-coordinate-container.d.ts +1 -2
- package/dist/types/wcardinal/ui/d-color-gradient-point-observable.d.ts +2 -4
- package/dist/types/wcardinal/ui/d-diagram-canvas-data-map.d.ts +1 -3
- package/dist/types/wcardinal/ui/d-diagram-canvas-id-map.d.ts +1 -3
- package/dist/types/wcardinal/ui/d-dynamic-text-geometry.d.ts +2 -3
- package/dist/types/wcardinal/ui/d-dynamic-text-measure.d.ts +2 -3
- package/dist/types/wcardinal/ui/d-dynamic-text.d.ts +8 -8
- package/dist/types/wcardinal/ui/d-input-and-label.d.ts +4 -5
- package/dist/types/wcardinal/ui/d-on-options.d.ts +1 -3
- package/dist/types/wcardinal/ui/d-pagination-button-last.d.ts +8 -0
- package/dist/types/wcardinal/ui/d-pagination-button-next.d.ts +8 -0
- package/dist/types/wcardinal/ui/d-pagination-button-page.d.ts +8 -0
- package/dist/types/wcardinal/ui/d-pagination-button-previous.d.ts +8 -0
- package/dist/types/wcardinal/ui/d-pagination-button-top.d.ts +8 -0
- package/dist/types/wcardinal/ui/d-pagination-dots.d.ts +8 -0
- package/dist/types/wcardinal/ui/d-pagination-page.d.ts +8 -0
- package/dist/types/wcardinal/ui/d-pagination.d.ts +137 -44
- package/dist/types/wcardinal/ui/d-picker-color-gradient-view.d.ts +4 -5
- package/dist/types/wcardinal/ui/d-scalar-expression.d.ts +68 -66
- package/dist/types/wcardinal/ui/d-table-data-list-filter.d.ts +1 -2
- package/dist/types/wcardinal/ui/d-table-data-list-selection.d.ts +1 -3
- package/dist/types/wcardinal/ui/d-table-data-selection.d.ts +1 -3
- package/dist/types/wcardinal/ui/d-table-data-tree-filter.d.ts +1 -2
- package/dist/types/wcardinal/ui/d-table-data-tree-selection-impl.d.ts +1 -3
- package/dist/types/wcardinal/ui/index.d.ts +11 -3
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-runtimes.d.ts +4 -5
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-value-change-color.d.ts +5 -6
- package/dist/types/wcardinal/ui/shape/e-shape-capabilities.d.ts +1 -3
- package/dist/types/wcardinal/ui/shape/e-shape-connector-edge-acceptor-impl.d.ts +1 -2
- package/dist/types/wcardinal/ui/shape/e-shape-deserializers.d.ts +2 -6
- package/dist/types/wcardinal/ui/shape/e-shape-runtimes.d.ts +2 -3
- package/dist/types/wcardinal/ui/shape/e-shape-text.d.ts +1 -3
- package/dist/types/wcardinal/ui/shape/e-shape-uploadeds.d.ts +1 -3
- package/dist/types/wcardinal/ui/shape/variant/create-line-of-any-uploaded.d.ts +1 -2
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-pagination-button-last.d.ts +8 -0
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-pagination-button-next.d.ts +8 -0
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-pagination-button-page.d.ts +9 -0
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-pagination-button-previous.d.ts +8 -0
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-pagination-button-top.d.ts +8 -0
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-pagination-dots.d.ts +10 -0
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-pagination-page.d.ts +13 -0
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-pagination.d.ts +2 -1
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark.d.ts +2 -9
- package/dist/types/wcardinal/ui/theme/dark/index.d.ts +7 -3
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-pagination-button-last.d.ts +8 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-pagination-button-next.d.ts +8 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-pagination-button-page.d.ts +9 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-pagination-button-previous.d.ts +8 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-pagination-button-top.d.ts +8 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-pagination-dots.d.ts +10 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-pagination-page.d.ts +13 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-pagination.d.ts +2 -1
- package/dist/types/wcardinal/ui/theme/white/d-theme-white.d.ts +2 -9
- package/dist/types/wcardinal/ui/theme/white/index.d.ts +7 -3
- package/dist/types/wcardinal/ui/util/dynamic-atlas.d.ts +2 -6
- package/dist/types/wcardinal/ui/util/dynamic-font-atlas-characters.d.ts +1 -3
- package/dist/types/wcardinal/ui/util/dynamic-sdf-font-atlases.d.ts +1 -3
- package/dist/types/wcardinal/ui/util/format-node/{format-noder-d.d.ts → format-node-rd.d.ts} +0 -0
- package/dist/types/wcardinal/ui/util/format-node/index.d.ts +31 -0
- package/dist/types/wcardinal/ui/util/index.d.ts +5 -0
- package/dist/types/wcardinal/ui/util/util-name.d.ts +1 -3
- package/dist/types/wcardinal/ui/util/util-svg-atlas-builder.d.ts +4 -12
- package/dist/wcardinal/ui/d-application-layer-options.js.map +1 -1
- package/dist/wcardinal/ui/d-base-background.js.map +1 -1
- package/dist/wcardinal/ui/d-base-border.js.map +1 -1
- package/dist/wcardinal/ui/d-base-corner.js.map +1 -1
- package/dist/wcardinal/ui/d-base-outline.js.map +1 -1
- package/dist/wcardinal/ui/d-base-padding.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-series-base-coordinate-container.js.map +1 -1
- package/dist/wcardinal/ui/d-color-gradient-point-observable.js.map +1 -1
- package/dist/wcardinal/ui/d-diagram-canvas-data-map.js.map +1 -1
- package/dist/wcardinal/ui/d-diagram-canvas-id-map.js.map +1 -1
- package/dist/wcardinal/ui/d-diagram.js.map +1 -1
- package/dist/wcardinal/ui/d-dynamic-text-geometry.js.map +1 -1
- package/dist/wcardinal/ui/d-dynamic-text-measure.js.map +1 -1
- package/dist/wcardinal/ui/d-dynamic-text.js.map +1 -1
- package/dist/wcardinal/ui/d-input-and-label.js.map +1 -1
- package/dist/wcardinal/ui/d-on-options.js.map +1 -1
- package/dist/wcardinal/ui/d-pagination-button-last.js +18 -0
- package/dist/wcardinal/ui/d-pagination-button-last.js.map +1 -0
- package/dist/wcardinal/ui/d-pagination-button-next.js +18 -0
- package/dist/wcardinal/ui/d-pagination-button-next.js.map +1 -0
- package/dist/wcardinal/ui/d-pagination-button-page.js +18 -0
- package/dist/wcardinal/ui/d-pagination-button-page.js.map +1 -0
- package/dist/wcardinal/ui/d-pagination-button-previous.js +18 -0
- package/dist/wcardinal/ui/d-pagination-button-previous.js.map +1 -0
- package/dist/wcardinal/ui/d-pagination-button-top.js +18 -0
- package/dist/wcardinal/ui/d-pagination-button-top.js.map +1 -0
- package/dist/wcardinal/ui/d-pagination-dots.js +18 -0
- package/dist/wcardinal/ui/d-pagination-dots.js.map +1 -0
- package/dist/wcardinal/ui/d-pagination-page.js +18 -0
- package/dist/wcardinal/ui/d-pagination-page.js.map +1 -0
- package/dist/wcardinal/ui/d-pagination.js +455 -212
- package/dist/wcardinal/ui/d-pagination.js.map +1 -1
- package/dist/wcardinal/ui/d-picker-color-gradient-view.js.map +1 -1
- package/dist/wcardinal/ui/d-scalar-expression.js +107 -79
- package/dist/wcardinal/ui/d-scalar-expression.js.map +1 -1
- package/dist/wcardinal/ui/d-table-data-list-filter.js.map +1 -1
- package/dist/wcardinal/ui/d-table-data-list-selection.js.map +1 -1
- package/dist/wcardinal/ui/d-table-data-selection.js.map +1 -1
- package/dist/wcardinal/ui/d-table-data-tree-filter.js.map +1 -1
- package/dist/wcardinal/ui/d-table-data-tree-selection-impl.js.map +1 -1
- package/dist/wcardinal/ui/index.js +11 -3
- package/dist/wcardinal/ui/index.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtimes.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-value-change-color.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-capabilities.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-connector-edge-acceptor-impl.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-deserializers.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-runtimes.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-text.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-uploadeds.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/create-line-of-any-uploaded.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/to-image-element.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-pagination-button-last.js +28 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-pagination-button-last.js.map +1 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-pagination-button-next.js +27 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-pagination-button-next.js.map +1 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-pagination-button-page.js +24 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-pagination-button-page.js.map +1 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-pagination-button-previous.js +27 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-pagination-button-previous.js.map +1 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-pagination-button-top.js +28 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-pagination-button-top.js.map +1 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-pagination-dots.js +36 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-pagination-dots.js.map +1 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-pagination-page.js +35 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-pagination-page.js.map +1 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-pagination.js +5 -2
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-pagination.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/index.js +7 -3
- package/dist/wcardinal/ui/theme/dark/index.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/load/load-theme-dark-pagination.js +14 -6
- package/dist/wcardinal/ui/theme/dark/load/load-theme-dark-pagination.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-pagination-button-last.js +28 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-pagination-button-last.js.map +1 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-pagination-button-next.js +27 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-pagination-button-next.js.map +1 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-pagination-button-page.js +24 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-pagination-button-page.js.map +1 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-pagination-button-previous.js +27 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-pagination-button-previous.js.map +1 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-pagination-button-top.js +28 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-pagination-button-top.js.map +1 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-pagination-dots.js +36 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-pagination-dots.js.map +1 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-pagination-page.js +35 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-pagination-page.js.map +1 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-pagination.js +5 -2
- package/dist/wcardinal/ui/theme/white/d-theme-white-pagination.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/index.js +7 -3
- package/dist/wcardinal/ui/theme/white/index.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/load/load-theme-white-pagination.js +14 -6
- package/dist/wcardinal/ui/theme/white/load/load-theme-white-pagination.js.map +1 -1
- package/dist/wcardinal/ui/util/dynamic-atlas.js.map +1 -1
- package/dist/wcardinal/ui/util/dynamic-font-atlas-characters.js.map +1 -1
- package/dist/wcardinal/ui/util/dynamic-sdf-font-atlases.js.map +1 -1
- package/dist/wcardinal/ui/util/format-node/{format-noder-d.js → format-node-rd.js} +1 -1
- package/dist/wcardinal/ui/util/format-node/{format-noder-d.js.map → format-node-rd.js.map} +1 -1
- package/dist/wcardinal/ui/util/format-node/index.js +36 -0
- package/dist/wcardinal/ui/util/format-node/index.js.map +1 -0
- package/dist/wcardinal/ui/util/index.js +5 -0
- package/dist/wcardinal/ui/util/index.js.map +1 -1
- package/dist/wcardinal/ui/util/number-formatter-impl.js +1 -1
- package/dist/wcardinal/ui/util/number-formatter-impl.js.map +1 -1
- package/dist/wcardinal/ui/util/util-name.js.map +1 -1
- package/dist/wcardinal/ui/util/util-svg-atlas-builder.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark.js +163 -39
- package/dist/wcardinal-ui-theme-dark.min.js +2 -2
- package/dist/wcardinal-ui-theme-dark.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-white.js +163 -39
- package/dist/wcardinal-ui-theme-white.min.js +2 -2
- package/dist/wcardinal-ui-theme-white.min.js.map +1 -1
- package/dist/wcardinal-ui.cjs.js +999 -446
- package/dist/wcardinal-ui.js +675 -370
- package/dist/wcardinal-ui.min.js +2 -2
- package/dist/wcardinal-ui.min.js.map +1 -1
- package/package.json +3 -3
- package/dist/types/wcardinal/ui/d-pagination-dots-button.d.ts +0 -8
- package/dist/types/wcardinal/ui/d-pagination-dynamic-buttons.d.ts +0 -21
- package/dist/types/wcardinal/ui/d-pagination-navigation-button.d.ts +0 -8
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-pagination-dots-button.d.ts +0 -9
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-pagination-dynamic-buttons.d.ts +0 -6
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-pagination-navigation-button.d.ts +0 -4
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-pagination-dots-button.d.ts +0 -9
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-pagination-dynamic-buttons.d.ts +0 -6
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-pagination-navigation-button.d.ts +0 -4
- package/dist/wcardinal/ui/d-pagination-dots-button.js +0 -18
- package/dist/wcardinal/ui/d-pagination-dots-button.js.map +0 -1
- package/dist/wcardinal/ui/d-pagination-dynamic-buttons.js +0 -81
- package/dist/wcardinal/ui/d-pagination-dynamic-buttons.js.map +0 -1
- package/dist/wcardinal/ui/d-pagination-navigation-button.js +0 -18
- package/dist/wcardinal/ui/d-pagination-navigation-button.js.map +0 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-pagination-dots-button.js +0 -24
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-pagination-dots-button.js.map +0 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-pagination-dynamic-buttons.js +0 -18
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-pagination-dynamic-buttons.js.map +0 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-pagination-navigation-button.js +0 -32
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-pagination-navigation-button.js.map +0 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-pagination-dots-button.js +0 -24
- package/dist/wcardinal/ui/theme/white/d-theme-white-pagination-dots-button.js.map +0 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-pagination-dynamic-buttons.js +0 -18
- package/dist/wcardinal/ui/theme/white/d-theme-white-pagination-dynamic-buttons.js.map +0 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-pagination-navigation-button.js +0 -32
- package/dist/wcardinal/ui/theme/white/d-theme-white-pagination-navigation-button.js.map +0 -1
package/dist/wcardinal-ui.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Winter Cardinal UI v0.
|
|
2
|
+
Winter Cardinal UI v0.155.0
|
|
3
3
|
Copyright (C) 2019 Toshiba Corporation
|
|
4
4
|
SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
|
|
@@ -11259,48 +11259,30 @@
|
|
|
11259
11259
|
* Copyright (C) 2019 Toshiba Corporation
|
|
11260
11260
|
* SPDX-License-Identifier: Apache-2.0
|
|
11261
11261
|
*/
|
|
11262
|
-
var
|
|
11263
|
-
(function (NodeType) {
|
|
11262
|
+
var DScalarExpressionNodeType = {
|
|
11264
11263
|
// Parensesis
|
|
11265
|
-
|
|
11266
|
-
|
|
11267
|
-
|
|
11264
|
+
OPEN: 0,
|
|
11265
|
+
CLOSE: 1,
|
|
11266
|
+
PARENSESIS: 2,
|
|
11268
11267
|
// Operations
|
|
11269
|
-
|
|
11270
|
-
|
|
11271
|
-
|
|
11272
|
-
|
|
11273
|
-
|
|
11274
|
-
|
|
11275
|
-
|
|
11276
|
-
|
|
11268
|
+
ADD_OR_PLUS: 3,
|
|
11269
|
+
SUB_OR_MINUS: 4,
|
|
11270
|
+
PLUS: 5,
|
|
11271
|
+
MINUS: 6,
|
|
11272
|
+
ADD: 7,
|
|
11273
|
+
SUB: 8,
|
|
11274
|
+
MUL: 9,
|
|
11275
|
+
DIV: 10,
|
|
11277
11276
|
// Functions
|
|
11278
|
-
|
|
11279
|
-
|
|
11280
|
-
|
|
11277
|
+
MIN: 11,
|
|
11278
|
+
MAX: 12,
|
|
11279
|
+
COMMA: 13,
|
|
11281
11280
|
// Literals
|
|
11282
|
-
|
|
11283
|
-
|
|
11284
|
-
|
|
11285
|
-
|
|
11286
|
-
|
|
11287
|
-
})(NodeType || (NodeType = {}));
|
|
11288
|
-
var TOKEN_MAPPING_OPERATOR = {
|
|
11289
|
-
"+": 3 /* ADD_OR_PLUS */,
|
|
11290
|
-
"-": 4 /* SUB_OR_MINUS */,
|
|
11291
|
-
"*": 9 /* MUL */,
|
|
11292
|
-
"/": 10 /* DIV */,
|
|
11293
|
-
"(": 0 /* OPEN */,
|
|
11294
|
-
")": 1 /* CLOSE */,
|
|
11295
|
-
",": 13 /* COMMA */,
|
|
11296
|
-
min: 11 /* MIN */,
|
|
11297
|
-
max: 12 /* MAX */
|
|
11298
|
-
};
|
|
11299
|
-
var TOKEN_MAPPING_LITERAL = {
|
|
11300
|
-
"%": 14 /* PARENT */,
|
|
11301
|
-
s: 15 /* SELF */,
|
|
11302
|
-
p: 16 /* PADDING */,
|
|
11303
|
-
c: 17 /* CURRENT */
|
|
11281
|
+
PARENT: 14,
|
|
11282
|
+
SELF: 15,
|
|
11283
|
+
PADDING: 16,
|
|
11284
|
+
CURRENT: 17,
|
|
11285
|
+
NUMBER: 18
|
|
11304
11286
|
};
|
|
11305
11287
|
/**
|
|
11306
11288
|
* Parser and evaluator of the scalar expressions like `100% - 50s`.
|
|
@@ -11340,8 +11322,8 @@
|
|
|
11340
11322
|
i = this.toParensesis(nodes, i);
|
|
11341
11323
|
} while (i < nodes.length);
|
|
11342
11324
|
this.toUnary(nodes);
|
|
11343
|
-
this.toArithmetic(nodes,
|
|
11344
|
-
this.toArithmetic(nodes,
|
|
11325
|
+
this.toArithmetic(nodes, DScalarExpressionNodeType.MUL, DScalarExpressionNodeType.DIV);
|
|
11326
|
+
this.toArithmetic(nodes, DScalarExpressionNodeType.ADD, DScalarExpressionNodeType.SUB);
|
|
11345
11327
|
if (nodes.length === 1) {
|
|
11346
11328
|
var node = nodes[0];
|
|
11347
11329
|
if (!isNumber(node)) {
|
|
@@ -11355,24 +11337,25 @@
|
|
|
11355
11337
|
var ito = nodes.length;
|
|
11356
11338
|
for (var i = ifrom; i < ito; ++i) {
|
|
11357
11339
|
var inode = nodes[i];
|
|
11358
|
-
if (inode ===
|
|
11340
|
+
if (inode === DScalarExpressionNodeType.OPEN) {
|
|
11359
11341
|
var istart = i;
|
|
11360
|
-
var nodeType =
|
|
11342
|
+
var nodeType = DScalarExpressionNodeType.PARENSESIS;
|
|
11361
11343
|
if (0 < i) {
|
|
11362
11344
|
var nodeTypePrev = nodes[i - 1];
|
|
11363
|
-
if (nodeTypePrev ===
|
|
11345
|
+
if (nodeTypePrev === DScalarExpressionNodeType.MIN ||
|
|
11346
|
+
nodeTypePrev === DScalarExpressionNodeType.MAX) {
|
|
11364
11347
|
istart -= 1;
|
|
11365
11348
|
nodeType = nodeTypePrev;
|
|
11366
11349
|
}
|
|
11367
11350
|
}
|
|
11368
11351
|
for (var j = i + 1; j < ito; ++j) {
|
|
11369
11352
|
var jnode = nodes[j];
|
|
11370
|
-
if (jnode ===
|
|
11353
|
+
if (jnode === DScalarExpressionNodeType.CLOSE) {
|
|
11371
11354
|
nodes[istart] = [nodeType, this.toComma(nodes, i + 1, j)];
|
|
11372
11355
|
nodes.splice(istart + 1, j - istart);
|
|
11373
11356
|
return istart + 1;
|
|
11374
11357
|
}
|
|
11375
|
-
else if (jnode ===
|
|
11358
|
+
else if (jnode === DScalarExpressionNodeType.OPEN) {
|
|
11376
11359
|
j = this.toParensesis(nodes, j) - 1;
|
|
11377
11360
|
ito = nodes.length;
|
|
11378
11361
|
}
|
|
@@ -11385,7 +11368,7 @@
|
|
|
11385
11368
|
DScalarExpression.prototype.toCommaOf = function (nodes, ifrom, ito) {
|
|
11386
11369
|
var l = ito - ifrom;
|
|
11387
11370
|
if (l <= 0) {
|
|
11388
|
-
return [
|
|
11371
|
+
return [DScalarExpressionNodeType.NUMBER, 0];
|
|
11389
11372
|
}
|
|
11390
11373
|
else if (l <= 1) {
|
|
11391
11374
|
return nodes[ifrom];
|
|
@@ -11395,7 +11378,7 @@
|
|
|
11395
11378
|
for (var j = ifrom; j < ito; ++j) {
|
|
11396
11379
|
operand.push(nodes[j]);
|
|
11397
11380
|
}
|
|
11398
|
-
return [
|
|
11381
|
+
return [DScalarExpressionNodeType.PARENSESIS, operand];
|
|
11399
11382
|
}
|
|
11400
11383
|
};
|
|
11401
11384
|
DScalarExpression.prototype.toComma = function (nodes, ifrom, ito) {
|
|
@@ -11403,7 +11386,7 @@
|
|
|
11403
11386
|
var iprev = ifrom;
|
|
11404
11387
|
for (var i = ifrom; i < ito; ++i) {
|
|
11405
11388
|
var node = nodes[i];
|
|
11406
|
-
if (node ===
|
|
11389
|
+
if (node === DScalarExpressionNodeType.COMMA) {
|
|
11407
11390
|
result = result || [];
|
|
11408
11391
|
result.push(this.toCommaOf(nodes, iprev, i));
|
|
11409
11392
|
iprev = i + 1;
|
|
@@ -11425,9 +11408,9 @@
|
|
|
11425
11408
|
};
|
|
11426
11409
|
DScalarExpression.prototype.toUnaryNode = function (node) {
|
|
11427
11410
|
if (!isNumber(node)) {
|
|
11428
|
-
if (node[0] ===
|
|
11429
|
-
node[0] ===
|
|
11430
|
-
node[0] ===
|
|
11411
|
+
if (node[0] === DScalarExpressionNodeType.PARENSESIS ||
|
|
11412
|
+
node[0] === DScalarExpressionNodeType.MIN ||
|
|
11413
|
+
node[0] === DScalarExpressionNodeType.MAX) {
|
|
11431
11414
|
this.toUnary(node[1]);
|
|
11432
11415
|
}
|
|
11433
11416
|
}
|
|
@@ -11435,11 +11418,14 @@
|
|
|
11435
11418
|
DScalarExpression.prototype.toUnary = function (nodes) {
|
|
11436
11419
|
for (var i = 0, imax = nodes.length; i < imax; ++i) {
|
|
11437
11420
|
var node = nodes[i];
|
|
11438
|
-
if (node ===
|
|
11421
|
+
if (node === DScalarExpressionNodeType.ADD_OR_PLUS ||
|
|
11422
|
+
node === DScalarExpressionNodeType.SUB_OR_MINUS) {
|
|
11439
11423
|
if (i <= 0 || isNumber(nodes[i - 1])) {
|
|
11440
11424
|
if (i + 1 < imax && !isNumber(nodes[i + 1])) {
|
|
11441
11425
|
var operand = nodes.splice(i + 1, 1)[0];
|
|
11442
|
-
var type = node ===
|
|
11426
|
+
var type = node === DScalarExpressionNodeType.ADD_OR_PLUS
|
|
11427
|
+
? DScalarExpressionNodeType.PLUS
|
|
11428
|
+
: DScalarExpressionNodeType.MINUS;
|
|
11443
11429
|
nodes[i] = [type, operand];
|
|
11444
11430
|
imax = nodes.length;
|
|
11445
11431
|
this.toUnaryNode(operand);
|
|
@@ -11449,7 +11435,9 @@
|
|
|
11449
11435
|
}
|
|
11450
11436
|
}
|
|
11451
11437
|
else {
|
|
11452
|
-
var type = node ===
|
|
11438
|
+
var type = node === DScalarExpressionNodeType.ADD_OR_PLUS
|
|
11439
|
+
? DScalarExpressionNodeType.ADD
|
|
11440
|
+
: DScalarExpressionNodeType.SUB;
|
|
11453
11441
|
nodes[i] = type;
|
|
11454
11442
|
}
|
|
11455
11443
|
}
|
|
@@ -11461,18 +11449,19 @@
|
|
|
11461
11449
|
};
|
|
11462
11450
|
DScalarExpression.prototype.toArithmeticNode = function (node, operatorA, operatorB) {
|
|
11463
11451
|
if (!isNumber(node)) {
|
|
11464
|
-
if (node[0] ===
|
|
11465
|
-
node[0] ===
|
|
11466
|
-
node[0] ===
|
|
11452
|
+
if (node[0] === DScalarExpressionNodeType.PARENSESIS ||
|
|
11453
|
+
node[0] === DScalarExpressionNodeType.MIN ||
|
|
11454
|
+
node[0] === DScalarExpressionNodeType.MAX) {
|
|
11467
11455
|
this.toArithmetic(node[1], operatorA, operatorB);
|
|
11468
11456
|
}
|
|
11469
|
-
else if (node[0] ===
|
|
11457
|
+
else if (node[0] === DScalarExpressionNodeType.PLUS ||
|
|
11458
|
+
node[0] === DScalarExpressionNodeType.MINUS) {
|
|
11470
11459
|
this.toArithmeticNode(node[1], operatorA, operatorB);
|
|
11471
11460
|
}
|
|
11472
|
-
else if (node[0] ===
|
|
11473
|
-
node[0] ===
|
|
11474
|
-
node[0] ===
|
|
11475
|
-
node[0] ===
|
|
11461
|
+
else if (node[0] === DScalarExpressionNodeType.ADD ||
|
|
11462
|
+
node[0] === DScalarExpressionNodeType.SUB ||
|
|
11463
|
+
node[0] === DScalarExpressionNodeType.MUL ||
|
|
11464
|
+
node[0] === DScalarExpressionNodeType.DIV) {
|
|
11476
11465
|
this.toArithmeticNode(node[1], operatorA, operatorB);
|
|
11477
11466
|
this.toArithmeticNode(node[2], operatorA, operatorB);
|
|
11478
11467
|
}
|
|
@@ -11509,7 +11498,7 @@
|
|
|
11509
11498
|
var matched = DScalarExpression.TOKEN_REGEX.exec(expression);
|
|
11510
11499
|
if (matched != null) {
|
|
11511
11500
|
var token = matched[0];
|
|
11512
|
-
var tokenTypeOperator =
|
|
11501
|
+
var tokenTypeOperator = this.toTokenOperator(token);
|
|
11513
11502
|
if (tokenTypeOperator != null) {
|
|
11514
11503
|
tokens.push(tokenTypeOperator);
|
|
11515
11504
|
}
|
|
@@ -11518,12 +11507,12 @@
|
|
|
11518
11507
|
if (parsedToken !== parsedToken) {
|
|
11519
11508
|
throw new Error("Unexpected token '" + token + "' at " + matched.index + " in '" + expression + "'");
|
|
11520
11509
|
}
|
|
11521
|
-
var tokenTypeLiteral =
|
|
11510
|
+
var tokenTypeLiteral = this.toTokenLiteral(token);
|
|
11522
11511
|
if (tokenTypeLiteral != null) {
|
|
11523
11512
|
tokens.push([tokenTypeLiteral, parsedToken * 0.01]);
|
|
11524
11513
|
}
|
|
11525
11514
|
else {
|
|
11526
|
-
tokens.push([
|
|
11515
|
+
tokens.push([DScalarExpressionNodeType.NUMBER, parsedToken]);
|
|
11527
11516
|
}
|
|
11528
11517
|
}
|
|
11529
11518
|
}
|
|
@@ -11533,31 +11522,70 @@
|
|
|
11533
11522
|
}
|
|
11534
11523
|
return tokens;
|
|
11535
11524
|
};
|
|
11525
|
+
DScalarExpression.prototype.toTokenOperator = function (token) {
|
|
11526
|
+
switch (token) {
|
|
11527
|
+
case "+":
|
|
11528
|
+
return DScalarExpressionNodeType.ADD_OR_PLUS;
|
|
11529
|
+
case "-":
|
|
11530
|
+
return DScalarExpressionNodeType.SUB_OR_MINUS;
|
|
11531
|
+
case "*":
|
|
11532
|
+
return DScalarExpressionNodeType.MUL;
|
|
11533
|
+
case "/":
|
|
11534
|
+
return DScalarExpressionNodeType.DIV;
|
|
11535
|
+
case "(":
|
|
11536
|
+
return DScalarExpressionNodeType.OPEN;
|
|
11537
|
+
case ")":
|
|
11538
|
+
return DScalarExpressionNodeType.CLOSE;
|
|
11539
|
+
case ",":
|
|
11540
|
+
return DScalarExpressionNodeType.COMMA;
|
|
11541
|
+
case "min":
|
|
11542
|
+
return DScalarExpressionNodeType.MIN;
|
|
11543
|
+
case "max":
|
|
11544
|
+
return DScalarExpressionNodeType.MAX;
|
|
11545
|
+
}
|
|
11546
|
+
return null;
|
|
11547
|
+
};
|
|
11548
|
+
DScalarExpression.prototype.toTokenLiteral = function (token) {
|
|
11549
|
+
var tokenLength = token.length;
|
|
11550
|
+
if (0 < tokenLength) {
|
|
11551
|
+
switch (token[tokenLength - 1]) {
|
|
11552
|
+
case "%":
|
|
11553
|
+
return DScalarExpressionNodeType.PARENT;
|
|
11554
|
+
case "s":
|
|
11555
|
+
return DScalarExpressionNodeType.SELF;
|
|
11556
|
+
case "p":
|
|
11557
|
+
return DScalarExpressionNodeType.PADDING;
|
|
11558
|
+
case "c":
|
|
11559
|
+
return DScalarExpressionNodeType.CURRENT;
|
|
11560
|
+
}
|
|
11561
|
+
}
|
|
11562
|
+
return null;
|
|
11563
|
+
};
|
|
11536
11564
|
DScalarExpression.prototype.evaluate = function (node, parent, self, padding, current) {
|
|
11537
11565
|
switch (node[0]) {
|
|
11538
|
-
case
|
|
11566
|
+
case DScalarExpressionNodeType.PARENSESIS:
|
|
11539
11567
|
var nodes = node[1];
|
|
11540
11568
|
return this.evaluate(nodes[nodes.length - 1], parent, self, padding, current);
|
|
11541
11569
|
// Unary operators
|
|
11542
|
-
case
|
|
11570
|
+
case DScalarExpressionNodeType.PLUS:
|
|
11543
11571
|
return +this.evaluate(node[1], parent, self, padding, current);
|
|
11544
|
-
case
|
|
11572
|
+
case DScalarExpressionNodeType.MINUS:
|
|
11545
11573
|
return -this.evaluate(node[1], parent, self, padding, current);
|
|
11546
11574
|
// Four arithmetic operators
|
|
11547
|
-
case
|
|
11575
|
+
case DScalarExpressionNodeType.ADD:
|
|
11548
11576
|
return (this.evaluate(node[1], parent, self, padding, current) +
|
|
11549
11577
|
this.evaluate(node[2], parent, self, padding, current));
|
|
11550
|
-
case
|
|
11578
|
+
case DScalarExpressionNodeType.SUB:
|
|
11551
11579
|
return (this.evaluate(node[1], parent, self, padding, current) -
|
|
11552
11580
|
this.evaluate(node[2], parent, self, padding, current));
|
|
11553
|
-
case
|
|
11581
|
+
case DScalarExpressionNodeType.MUL:
|
|
11554
11582
|
return (this.evaluate(node[1], parent, self, padding, current) *
|
|
11555
11583
|
this.evaluate(node[2], parent, self, padding, current));
|
|
11556
|
-
case
|
|
11584
|
+
case DScalarExpressionNodeType.DIV:
|
|
11557
11585
|
return (this.evaluate(node[1], parent, self, padding, current) /
|
|
11558
11586
|
this.evaluate(node[2], parent, self, padding, current));
|
|
11559
11587
|
// Functions
|
|
11560
|
-
case
|
|
11588
|
+
case DScalarExpressionNodeType.MIN:
|
|
11561
11589
|
if (0 < node[1].length) {
|
|
11562
11590
|
var args = node[1];
|
|
11563
11591
|
var result = this.evaluate(args[0], parent, self, padding, current);
|
|
@@ -11567,7 +11595,7 @@
|
|
|
11567
11595
|
return result;
|
|
11568
11596
|
}
|
|
11569
11597
|
return 0;
|
|
11570
|
-
case
|
|
11598
|
+
case DScalarExpressionNodeType.MAX:
|
|
11571
11599
|
if (0 < node[1].length) {
|
|
11572
11600
|
var args = node[1];
|
|
11573
11601
|
var result = this.evaluate(args[0], parent, self, padding, current);
|
|
@@ -11578,15 +11606,15 @@
|
|
|
11578
11606
|
}
|
|
11579
11607
|
return 0;
|
|
11580
11608
|
// Literals
|
|
11581
|
-
case
|
|
11609
|
+
case DScalarExpressionNodeType.PARENT:
|
|
11582
11610
|
return node[1] * parent;
|
|
11583
|
-
case
|
|
11611
|
+
case DScalarExpressionNodeType.SELF:
|
|
11584
11612
|
return node[1] * self;
|
|
11585
|
-
case
|
|
11613
|
+
case DScalarExpressionNodeType.PADDING:
|
|
11586
11614
|
return node[1] * padding;
|
|
11587
|
-
case
|
|
11615
|
+
case DScalarExpressionNodeType.CURRENT:
|
|
11588
11616
|
return node[1] * current;
|
|
11589
|
-
case
|
|
11617
|
+
case DScalarExpressionNodeType.NUMBER:
|
|
11590
11618
|
return node[1];
|
|
11591
11619
|
}
|
|
11592
11620
|
return 0;
|
|
@@ -59034,370 +59062,607 @@
|
|
|
59034
59062
|
* Copyright (C) 2019 Toshiba Corporation
|
|
59035
59063
|
* SPDX-License-Identifier: Apache-2.0
|
|
59036
59064
|
*/
|
|
59037
|
-
var
|
|
59038
|
-
__extends(
|
|
59039
|
-
function
|
|
59065
|
+
var DPaginationButtonLast = /** @class */ (function (_super) {
|
|
59066
|
+
__extends(DPaginationButtonLast, _super);
|
|
59067
|
+
function DPaginationButtonLast() {
|
|
59040
59068
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
59041
59069
|
}
|
|
59042
|
-
|
|
59043
|
-
return "
|
|
59070
|
+
DPaginationButtonLast.prototype.getType = function () {
|
|
59071
|
+
return "DPaginationButtonLast";
|
|
59044
59072
|
};
|
|
59045
|
-
return
|
|
59073
|
+
return DPaginationButtonLast;
|
|
59046
59074
|
}(DButtonAmbient));
|
|
59047
59075
|
|
|
59048
59076
|
/*
|
|
59049
59077
|
* Copyright (C) 2019 Toshiba Corporation
|
|
59050
59078
|
* SPDX-License-Identifier: Apache-2.0
|
|
59051
59079
|
*/
|
|
59052
|
-
var
|
|
59053
|
-
__extends(
|
|
59054
|
-
function
|
|
59080
|
+
var DPaginationButtonNext = /** @class */ (function (_super) {
|
|
59081
|
+
__extends(DPaginationButtonNext, _super);
|
|
59082
|
+
function DPaginationButtonNext() {
|
|
59055
59083
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
59056
59084
|
}
|
|
59057
|
-
|
|
59058
|
-
|
|
59059
|
-
this._dotsBtnLeft = new DPaginationDotsButton({
|
|
59060
|
-
width: options.button.width,
|
|
59061
|
-
visible: !!options.button.dotsLeft
|
|
59062
|
-
});
|
|
59063
|
-
this._dotsBtnRight = new DPaginationDotsButton({
|
|
59064
|
-
width: options.button.width,
|
|
59065
|
-
visible: !!options.button.dotsRight
|
|
59066
|
-
});
|
|
59067
|
-
this.addChild(this._dotsBtnLeft);
|
|
59068
|
-
this.addChild(this._dotsBtnRight);
|
|
59085
|
+
DPaginationButtonNext.prototype.getType = function () {
|
|
59086
|
+
return "DPaginationButtonNext";
|
|
59069
59087
|
};
|
|
59070
|
-
|
|
59071
|
-
|
|
59072
|
-
|
|
59073
|
-
|
|
59074
|
-
|
|
59075
|
-
|
|
59076
|
-
|
|
59077
|
-
|
|
59078
|
-
|
|
59079
|
-
|
|
59080
|
-
|
|
59081
|
-
|
|
59082
|
-
|
|
59083
|
-
|
|
59084
|
-
_this.emit("active", clickedBtn);
|
|
59085
|
-
});
|
|
59086
|
-
}
|
|
59087
|
-
// re-new "pageButtons" after add new buttons
|
|
59088
|
-
pageButtons = this.children.slice(1, this.children.length - 1);
|
|
59089
|
-
}
|
|
59090
|
-
else if (pageButtons.length > btnsCount) {
|
|
59091
|
-
for (var i = btnsCount; i < pageButtons.length; i++) {
|
|
59092
|
-
pageButtons[i].hide();
|
|
59093
|
-
}
|
|
59094
|
-
}
|
|
59095
|
-
// update button text and active state
|
|
59096
|
-
for (var i = 0; i < btnsCount; i++) {
|
|
59097
|
-
var btn = pageButtons[i];
|
|
59098
|
-
btn.text = options.start + i + 1;
|
|
59099
|
-
btn.state.isActive = options.start + i === options.selected;
|
|
59100
|
-
if (btn.isHidden()) {
|
|
59101
|
-
btn.show();
|
|
59102
|
-
}
|
|
59103
|
-
}
|
|
59104
|
-
// update visible state of dots buttons
|
|
59105
|
-
if (options.button.dotsLeft) {
|
|
59106
|
-
this._dotsBtnLeft.show();
|
|
59107
|
-
}
|
|
59108
|
-
else {
|
|
59109
|
-
this._dotsBtnLeft.hide();
|
|
59110
|
-
}
|
|
59111
|
-
if (options.button.dotsRight) {
|
|
59112
|
-
this._dotsBtnRight.show();
|
|
59113
|
-
}
|
|
59114
|
-
else {
|
|
59115
|
-
this._dotsBtnRight.hide();
|
|
59116
|
-
}
|
|
59088
|
+
return DPaginationButtonNext;
|
|
59089
|
+
}(DButtonAmbient));
|
|
59090
|
+
|
|
59091
|
+
/*
|
|
59092
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
59093
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
59094
|
+
*/
|
|
59095
|
+
var DPaginationButtonPage = /** @class */ (function (_super) {
|
|
59096
|
+
__extends(DPaginationButtonPage, _super);
|
|
59097
|
+
function DPaginationButtonPage() {
|
|
59098
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
59099
|
+
}
|
|
59100
|
+
DPaginationButtonPage.prototype.getType = function () {
|
|
59101
|
+
return "DPaginationButtonPage";
|
|
59117
59102
|
};
|
|
59118
|
-
|
|
59119
|
-
|
|
59103
|
+
return DPaginationButtonPage;
|
|
59104
|
+
}(DButtonAmbient));
|
|
59105
|
+
|
|
59106
|
+
/*
|
|
59107
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
59108
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
59109
|
+
*/
|
|
59110
|
+
var DPaginationButtonPrevious = /** @class */ (function (_super) {
|
|
59111
|
+
__extends(DPaginationButtonPrevious, _super);
|
|
59112
|
+
function DPaginationButtonPrevious() {
|
|
59113
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
59114
|
+
}
|
|
59115
|
+
DPaginationButtonPrevious.prototype.getType = function () {
|
|
59116
|
+
return "DPaginationButtonPrevious";
|
|
59120
59117
|
};
|
|
59121
|
-
return
|
|
59122
|
-
}(
|
|
59118
|
+
return DPaginationButtonPrevious;
|
|
59119
|
+
}(DButtonAmbient));
|
|
59123
59120
|
|
|
59124
59121
|
/*
|
|
59125
59122
|
* Copyright (C) 2019 Toshiba Corporation
|
|
59126
59123
|
* SPDX-License-Identifier: Apache-2.0
|
|
59127
59124
|
*/
|
|
59128
|
-
var
|
|
59129
|
-
__extends(
|
|
59130
|
-
function
|
|
59125
|
+
var DPaginationButtonTop = /** @class */ (function (_super) {
|
|
59126
|
+
__extends(DPaginationButtonTop, _super);
|
|
59127
|
+
function DPaginationButtonTop() {
|
|
59131
59128
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
59132
59129
|
}
|
|
59133
|
-
|
|
59134
|
-
return "
|
|
59130
|
+
DPaginationButtonTop.prototype.getType = function () {
|
|
59131
|
+
return "DPaginationButtonTop";
|
|
59135
59132
|
};
|
|
59136
|
-
return
|
|
59133
|
+
return DPaginationButtonTop;
|
|
59137
59134
|
}(DButtonAmbient));
|
|
59138
59135
|
|
|
59136
|
+
/*
|
|
59137
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
59138
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
59139
|
+
*/
|
|
59140
|
+
var DPaginationDots = /** @class */ (function (_super) {
|
|
59141
|
+
__extends(DPaginationDots, _super);
|
|
59142
|
+
function DPaginationDots() {
|
|
59143
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
59144
|
+
}
|
|
59145
|
+
DPaginationDots.prototype.getType = function () {
|
|
59146
|
+
return "DPaginationDots";
|
|
59147
|
+
};
|
|
59148
|
+
return DPaginationDots;
|
|
59149
|
+
}(DImageBase));
|
|
59150
|
+
|
|
59151
|
+
/*
|
|
59152
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
59153
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
59154
|
+
*/
|
|
59155
|
+
var DPaginationPage = /** @class */ (function (_super) {
|
|
59156
|
+
__extends(DPaginationPage, _super);
|
|
59157
|
+
function DPaginationPage() {
|
|
59158
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
59159
|
+
}
|
|
59160
|
+
DPaginationPage.prototype.getType = function () {
|
|
59161
|
+
return "DPaginationPage";
|
|
59162
|
+
};
|
|
59163
|
+
return DPaginationPage;
|
|
59164
|
+
}(DImageBase));
|
|
59165
|
+
|
|
59139
59166
|
/*
|
|
59140
59167
|
* Copyright (C) 2019 Toshiba Corporation
|
|
59141
59168
|
* SPDX-License-Identifier: Apache-2.0
|
|
59142
59169
|
*/
|
|
59143
59170
|
var DPagination = /** @class */ (function (_super) {
|
|
59144
59171
|
__extends(DPagination, _super);
|
|
59145
|
-
function DPagination() {
|
|
59146
|
-
|
|
59172
|
+
function DPagination(options) {
|
|
59173
|
+
var _a, _b, _c, _d;
|
|
59174
|
+
var _this = _super.call(this, options) || this;
|
|
59175
|
+
if (options != null) {
|
|
59176
|
+
_this._size = (_b = (_a = options.size) !== null && _a !== void 0 ? _a : options.total) !== null && _b !== void 0 ? _b : 10;
|
|
59177
|
+
_this._value = (_d = (_c = options.value) !== null && _c !== void 0 ? _c : options.selected) !== null && _d !== void 0 ? _d : 0;
|
|
59178
|
+
}
|
|
59179
|
+
else {
|
|
59180
|
+
_this._size = 10;
|
|
59181
|
+
_this._value = 0;
|
|
59182
|
+
}
|
|
59183
|
+
var buttonTop = _this.buttonTop;
|
|
59184
|
+
var buttonPrevious = _this.buttonPrevious;
|
|
59185
|
+
if (buttonTop != null) {
|
|
59186
|
+
_this.addChild(buttonTop);
|
|
59187
|
+
}
|
|
59188
|
+
if (buttonPrevious != null) {
|
|
59189
|
+
_this.addChild(buttonPrevious);
|
|
59190
|
+
}
|
|
59191
|
+
if (buttonTop != null || buttonPrevious != null) {
|
|
59192
|
+
_this.addChild(_this.newSpace());
|
|
59193
|
+
}
|
|
59194
|
+
var buttonPages0 = _this.buttonPages0;
|
|
59195
|
+
var buttonPages0Length = buttonPages0.length;
|
|
59196
|
+
_this.addChild(buttonPages0[buttonPages0Length - 1]);
|
|
59197
|
+
_this.addChild(_this.dots0);
|
|
59198
|
+
for (var i = buttonPages0Length - 2; 0 <= i; --i) {
|
|
59199
|
+
_this.addChild(buttonPages0[i]);
|
|
59200
|
+
}
|
|
59201
|
+
_this.addChild(_this.page);
|
|
59202
|
+
var buttonPages1 = _this.buttonPages1;
|
|
59203
|
+
var buttonPages1Length = buttonPages1.length;
|
|
59204
|
+
for (var i = 0, imax = buttonPages1Length - 1; i < imax; ++i) {
|
|
59205
|
+
_this.addChild(buttonPages1[i]);
|
|
59206
|
+
}
|
|
59207
|
+
_this.addChild(_this.dots1);
|
|
59208
|
+
_this.addChild(buttonPages1[buttonPages1Length - 1]);
|
|
59209
|
+
var buttonNext = _this.buttonNext;
|
|
59210
|
+
var buttonLast = _this.buttonLast;
|
|
59211
|
+
if (buttonNext != null || buttonLast != null) {
|
|
59212
|
+
_this.addChild(_this.newSpace());
|
|
59213
|
+
}
|
|
59214
|
+
if (buttonNext != null) {
|
|
59215
|
+
_this.addChild(buttonNext);
|
|
59216
|
+
}
|
|
59217
|
+
if (buttonLast != null) {
|
|
59218
|
+
_this.addChild(buttonLast);
|
|
59219
|
+
}
|
|
59220
|
+
_this.update();
|
|
59221
|
+
return _this;
|
|
59147
59222
|
}
|
|
59148
|
-
DPagination.prototype.
|
|
59149
|
-
var
|
|
59150
|
-
|
|
59151
|
-
|
|
59152
|
-
this.DEFAULT_SELECTED = 0; // set default selected index page is page 0
|
|
59153
|
-
// get total pages
|
|
59154
|
-
this._total = options.total;
|
|
59155
|
-
// get selected page
|
|
59156
|
-
this._selected = (_a = options.selected) !== null && _a !== void 0 ? _a : this.DEFAULT_SELECTED;
|
|
59157
|
-
// get button options
|
|
59158
|
-
var button = options.button;
|
|
59159
|
-
this._buttonOptions = {
|
|
59160
|
-
first: !!(button === null || button === void 0 ? void 0 : button.first),
|
|
59161
|
-
last: !!(button === null || button === void 0 ? void 0 : button.last),
|
|
59162
|
-
width: button === null || button === void 0 ? void 0 : button.width
|
|
59163
|
-
};
|
|
59164
|
-
this.initButtons(this.getButtonWidth());
|
|
59165
|
-
this.listenButtonClicked();
|
|
59166
|
-
this.on("resize", function () {
|
|
59167
|
-
_this._numberPageButtonVisible = _this.toNumberVisible();
|
|
59168
|
-
_this.update();
|
|
59223
|
+
DPagination.prototype.newSpace = function () {
|
|
59224
|
+
var _a, _b, _c;
|
|
59225
|
+
return new DLayoutSpace({
|
|
59226
|
+
width: (_c = (_b = (_a = this._options) === null || _a === void 0 ? void 0 : _a.button) === null || _b === void 0 ? void 0 : _b.space) !== null && _c !== void 0 ? _c : this.theme.getButtonSpace()
|
|
59169
59227
|
});
|
|
59170
59228
|
};
|
|
59229
|
+
Object.defineProperty(DPagination.prototype, "value", {
|
|
59230
|
+
/**
|
|
59231
|
+
* Returns a value that is an index of a current page.
|
|
59232
|
+
*
|
|
59233
|
+
* @returns a value that is an index of a selected page.
|
|
59234
|
+
*/
|
|
59235
|
+
get: function () {
|
|
59236
|
+
return this._value;
|
|
59237
|
+
},
|
|
59238
|
+
/**
|
|
59239
|
+
* Sets a value that is an index of a current page.
|
|
59240
|
+
*
|
|
59241
|
+
* @param value a value that is an index of a page
|
|
59242
|
+
*/
|
|
59243
|
+
set: function (value) {
|
|
59244
|
+
if (0 <= value && value < this._size && this._value !== value) {
|
|
59245
|
+
this._value = value;
|
|
59246
|
+
this.update();
|
|
59247
|
+
}
|
|
59248
|
+
},
|
|
59249
|
+
enumerable: false,
|
|
59250
|
+
configurable: true
|
|
59251
|
+
});
|
|
59171
59252
|
Object.defineProperty(DPagination.prototype, "selected", {
|
|
59172
59253
|
/**
|
|
59173
|
-
*
|
|
59254
|
+
* Returns an index of the selected page.
|
|
59174
59255
|
*
|
|
59175
|
-
* @returns index of selected page.
|
|
59256
|
+
* @returns an index of the selected page.
|
|
59257
|
+
* @deprecated in favor of {@link value}.
|
|
59176
59258
|
*/
|
|
59177
59259
|
get: function () {
|
|
59178
|
-
return this.
|
|
59260
|
+
return this.value;
|
|
59179
59261
|
},
|
|
59180
59262
|
/**
|
|
59181
|
-
*
|
|
59263
|
+
* Selects a page.
|
|
59182
59264
|
*
|
|
59183
|
-
* @param
|
|
59265
|
+
* @param index an index of a page
|
|
59266
|
+
* @deprecated in favor of {@link #value}.
|
|
59184
59267
|
*/
|
|
59185
|
-
set: function (
|
|
59186
|
-
|
|
59187
|
-
|
|
59268
|
+
set: function (index) {
|
|
59269
|
+
this.value = index;
|
|
59270
|
+
},
|
|
59271
|
+
enumerable: false,
|
|
59272
|
+
configurable: true
|
|
59273
|
+
});
|
|
59274
|
+
Object.defineProperty(DPagination.prototype, "size", {
|
|
59275
|
+
/**
|
|
59276
|
+
* Returns a number of total pages.
|
|
59277
|
+
*
|
|
59278
|
+
* @returns a number of total pages.
|
|
59279
|
+
*/
|
|
59280
|
+
get: function () {
|
|
59281
|
+
return this._size;
|
|
59282
|
+
},
|
|
59283
|
+
/**
|
|
59284
|
+
* Sets a number of total pages.
|
|
59285
|
+
*
|
|
59286
|
+
* @param size a number of pages
|
|
59287
|
+
*/
|
|
59288
|
+
set: function (size) {
|
|
59289
|
+
if (0 <= size && this._size !== size) {
|
|
59290
|
+
this._size = size;
|
|
59291
|
+
if (size === 0) {
|
|
59292
|
+
this._value = -1;
|
|
59293
|
+
}
|
|
59294
|
+
else {
|
|
59295
|
+
this._value = Math.max(0, Math.min(this._size - 1, this._value));
|
|
59296
|
+
}
|
|
59297
|
+
this.update();
|
|
59188
59298
|
}
|
|
59189
|
-
this._selected = selected;
|
|
59190
|
-
this.update();
|
|
59191
59299
|
},
|
|
59192
59300
|
enumerable: false,
|
|
59193
59301
|
configurable: true
|
|
59194
59302
|
});
|
|
59195
59303
|
Object.defineProperty(DPagination.prototype, "total", {
|
|
59196
59304
|
/**
|
|
59197
|
-
*
|
|
59305
|
+
* Returns a number of total pages.
|
|
59198
59306
|
*
|
|
59199
|
-
* @returns number of total pages.
|
|
59307
|
+
* @returns a number of total pages.
|
|
59308
|
+
* @deprecated in favor of {@link size}
|
|
59200
59309
|
*/
|
|
59201
59310
|
get: function () {
|
|
59202
|
-
return this.
|
|
59311
|
+
return this.size;
|
|
59203
59312
|
},
|
|
59204
59313
|
/**
|
|
59205
|
-
*
|
|
59314
|
+
* Sets a number of total pages.
|
|
59206
59315
|
*
|
|
59207
|
-
* @param total number of
|
|
59316
|
+
* @param total a number of pages
|
|
59317
|
+
* @deprecated in favor of {@link size}
|
|
59208
59318
|
*/
|
|
59209
59319
|
set: function (total) {
|
|
59210
|
-
|
|
59211
|
-
|
|
59212
|
-
|
|
59213
|
-
|
|
59214
|
-
|
|
59215
|
-
|
|
59320
|
+
this.size = total;
|
|
59321
|
+
},
|
|
59322
|
+
enumerable: false,
|
|
59323
|
+
configurable: true
|
|
59324
|
+
});
|
|
59325
|
+
Object.defineProperty(DPagination.prototype, "dots0", {
|
|
59326
|
+
get: function () {
|
|
59327
|
+
var result = this._dots0;
|
|
59328
|
+
if (result == null) {
|
|
59329
|
+
result = this.newDots();
|
|
59330
|
+
this._dots0 = result;
|
|
59216
59331
|
}
|
|
59332
|
+
return result;
|
|
59217
59333
|
},
|
|
59218
59334
|
enumerable: false,
|
|
59219
59335
|
configurable: true
|
|
59220
59336
|
});
|
|
59221
|
-
DPagination.prototype
|
|
59222
|
-
|
|
59223
|
-
|
|
59224
|
-
|
|
59225
|
-
|
|
59226
|
-
|
|
59337
|
+
Object.defineProperty(DPagination.prototype, "dots1", {
|
|
59338
|
+
get: function () {
|
|
59339
|
+
var result = this._dots1;
|
|
59340
|
+
if (result == null) {
|
|
59341
|
+
result = this.newDots();
|
|
59342
|
+
this._dots1 = result;
|
|
59227
59343
|
}
|
|
59228
|
-
|
|
59229
|
-
|
|
59230
|
-
|
|
59231
|
-
|
|
59232
|
-
|
|
59344
|
+
return result;
|
|
59345
|
+
},
|
|
59346
|
+
enumerable: false,
|
|
59347
|
+
configurable: true
|
|
59348
|
+
});
|
|
59349
|
+
DPagination.prototype.newDots = function () {
|
|
59350
|
+
return new DPaginationDots();
|
|
59351
|
+
};
|
|
59352
|
+
Object.defineProperty(DPagination.prototype, "buttonLast", {
|
|
59353
|
+
get: function () {
|
|
59354
|
+
var result = this._buttonLast;
|
|
59355
|
+
if (result === undefined) {
|
|
59356
|
+
result = this.newButtonLast();
|
|
59357
|
+
this._buttonLast = result;
|
|
59233
59358
|
}
|
|
59234
|
-
|
|
59235
|
-
|
|
59236
|
-
|
|
59237
|
-
|
|
59238
|
-
|
|
59239
|
-
|
|
59240
|
-
|
|
59241
|
-
|
|
59242
|
-
|
|
59243
|
-
|
|
59244
|
-
|
|
59245
|
-
|
|
59246
|
-
|
|
59247
|
-
|
|
59248
|
-
|
|
59249
|
-
|
|
59250
|
-
|
|
59251
|
-
|
|
59252
|
-
|
|
59253
|
-
|
|
59359
|
+
return result;
|
|
59360
|
+
},
|
|
59361
|
+
enumerable: false,
|
|
59362
|
+
configurable: true
|
|
59363
|
+
});
|
|
59364
|
+
DPagination.prototype.newButtonLast = function () {
|
|
59365
|
+
var _this = this;
|
|
59366
|
+
var _a, _b;
|
|
59367
|
+
var last = (_b = (_a = this._options) === null || _a === void 0 ? void 0 : _a.button) === null || _b === void 0 ? void 0 : _b.last;
|
|
59368
|
+
if (last !== null && last !== false && last !== undefined) {
|
|
59369
|
+
var result = new DPaginationButtonLast(last !== true ? last : undefined);
|
|
59370
|
+
result.on("active", function () {
|
|
59371
|
+
_this.onButtonLastActive();
|
|
59372
|
+
});
|
|
59373
|
+
return result;
|
|
59374
|
+
}
|
|
59375
|
+
return null;
|
|
59376
|
+
};
|
|
59377
|
+
DPagination.prototype.onButtonLastActive = function () {
|
|
59378
|
+
this.moveTo(this._size - 1);
|
|
59379
|
+
};
|
|
59380
|
+
DPagination.prototype.moveTo = function (index) {
|
|
59381
|
+
if (0 <= index && index < this._size && this._value !== index) {
|
|
59382
|
+
var oldIndex = this._value;
|
|
59383
|
+
this._value = index;
|
|
59384
|
+
this.emit("change", index, oldIndex, this);
|
|
59385
|
+
this.update();
|
|
59386
|
+
}
|
|
59387
|
+
};
|
|
59388
|
+
Object.defineProperty(DPagination.prototype, "buttonNext", {
|
|
59389
|
+
get: function () {
|
|
59390
|
+
var result = this._buttonNext;
|
|
59391
|
+
if (result === undefined) {
|
|
59392
|
+
result = this.newButtonNext();
|
|
59393
|
+
this._buttonNext = result;
|
|
59254
59394
|
}
|
|
59255
|
-
|
|
59256
|
-
|
|
59257
|
-
|
|
59258
|
-
|
|
59259
|
-
|
|
59395
|
+
return result;
|
|
59396
|
+
},
|
|
59397
|
+
enumerable: false,
|
|
59398
|
+
configurable: true
|
|
59399
|
+
});
|
|
59400
|
+
DPagination.prototype.newButtonNext = function () {
|
|
59401
|
+
var _this = this;
|
|
59402
|
+
var _a, _b;
|
|
59403
|
+
var next = (_b = (_a = this._options) === null || _a === void 0 ? void 0 : _a.button) === null || _b === void 0 ? void 0 : _b.next;
|
|
59404
|
+
if (next !== null && next !== false) {
|
|
59405
|
+
var result = new DPaginationButtonNext(next !== true ? next : undefined);
|
|
59406
|
+
result.on("active", function () {
|
|
59407
|
+
_this.onButtonNextActive();
|
|
59408
|
+
});
|
|
59409
|
+
return result;
|
|
59410
|
+
}
|
|
59411
|
+
return null;
|
|
59412
|
+
};
|
|
59413
|
+
DPagination.prototype.onButtonNextActive = function () {
|
|
59414
|
+
this.moveTo(this._value + 1);
|
|
59415
|
+
};
|
|
59416
|
+
Object.defineProperty(DPagination.prototype, "buttonPrevious", {
|
|
59417
|
+
get: function () {
|
|
59418
|
+
var result = this._buttonPrevious;
|
|
59419
|
+
if (result === undefined) {
|
|
59420
|
+
result = this.newButtonPrevious();
|
|
59421
|
+
this._buttonPrevious = result;
|
|
59260
59422
|
}
|
|
59261
|
-
|
|
59262
|
-
|
|
59263
|
-
|
|
59264
|
-
|
|
59265
|
-
|
|
59423
|
+
return result;
|
|
59424
|
+
},
|
|
59425
|
+
enumerable: false,
|
|
59426
|
+
configurable: true
|
|
59427
|
+
});
|
|
59428
|
+
DPagination.prototype.newButtonPrevious = function () {
|
|
59429
|
+
var _this = this;
|
|
59430
|
+
var _a, _b;
|
|
59431
|
+
var previous = (_b = (_a = this._options) === null || _a === void 0 ? void 0 : _a.button) === null || _b === void 0 ? void 0 : _b.previous;
|
|
59432
|
+
if (previous !== null && previous !== false) {
|
|
59433
|
+
var result = new DPaginationButtonPrevious(previous !== true ? previous : undefined);
|
|
59434
|
+
result.on("active", function () {
|
|
59435
|
+
_this.onButtonPreviousActive();
|
|
59436
|
+
});
|
|
59437
|
+
return result;
|
|
59438
|
+
}
|
|
59439
|
+
return null;
|
|
59440
|
+
};
|
|
59441
|
+
DPagination.prototype.onButtonPreviousActive = function () {
|
|
59442
|
+
this.moveTo(this._value - 1);
|
|
59443
|
+
};
|
|
59444
|
+
Object.defineProperty(DPagination.prototype, "buttonTop", {
|
|
59445
|
+
get: function () {
|
|
59446
|
+
var result = this._buttonTop;
|
|
59447
|
+
if (result === undefined) {
|
|
59448
|
+
result = this.newButtonTop();
|
|
59449
|
+
this._buttonTop = result;
|
|
59266
59450
|
}
|
|
59267
|
-
|
|
59268
|
-
|
|
59269
|
-
|
|
59270
|
-
|
|
59271
|
-
|
|
59272
|
-
|
|
59273
|
-
this.addChild(this._nextBtn);
|
|
59274
|
-
this.addChild(this._goLastBtn);
|
|
59275
|
-
};
|
|
59276
|
-
DPagination.prototype.listenButtonClicked = function () {
|
|
59451
|
+
return result;
|
|
59452
|
+
},
|
|
59453
|
+
enumerable: false,
|
|
59454
|
+
configurable: true
|
|
59455
|
+
});
|
|
59456
|
+
DPagination.prototype.newButtonTop = function () {
|
|
59277
59457
|
var _this = this;
|
|
59278
|
-
|
|
59279
|
-
|
|
59280
|
-
|
|
59281
|
-
|
|
59282
|
-
|
|
59283
|
-
|
|
59284
|
-
|
|
59285
|
-
|
|
59286
|
-
}
|
|
59287
|
-
|
|
59288
|
-
|
|
59289
|
-
|
|
59290
|
-
this.
|
|
59291
|
-
|
|
59458
|
+
var _a, _b;
|
|
59459
|
+
var top = (_b = (_a = this._options) === null || _a === void 0 ? void 0 : _a.button) === null || _b === void 0 ? void 0 : _b.top;
|
|
59460
|
+
if (top !== null && top !== false && top !== undefined) {
|
|
59461
|
+
var result = new DPaginationButtonTop(top !== true ? top : undefined);
|
|
59462
|
+
result.on("active", function () {
|
|
59463
|
+
_this.onButtonTopActive();
|
|
59464
|
+
});
|
|
59465
|
+
return result;
|
|
59466
|
+
}
|
|
59467
|
+
return null;
|
|
59468
|
+
};
|
|
59469
|
+
DPagination.prototype.onButtonTopActive = function () {
|
|
59470
|
+
this.moveTo(0);
|
|
59471
|
+
};
|
|
59472
|
+
DPagination.prototype.newButtonPage = function () {
|
|
59473
|
+
var _this = this;
|
|
59474
|
+
var _a, _b;
|
|
59475
|
+
var result = new DPaginationButtonPage((_b = (_a = this._options) === null || _a === void 0 ? void 0 : _a.button) === null || _b === void 0 ? void 0 : _b.page);
|
|
59476
|
+
result.on("active", function () {
|
|
59477
|
+
_this.onButtonPageActive(result);
|
|
59292
59478
|
});
|
|
59293
|
-
|
|
59294
|
-
|
|
59295
|
-
|
|
59479
|
+
return result;
|
|
59480
|
+
};
|
|
59481
|
+
Object.defineProperty(DPagination.prototype, "buttonPages0", {
|
|
59482
|
+
get: function () {
|
|
59483
|
+
var result = this._buttonPages0;
|
|
59484
|
+
if (result == null) {
|
|
59485
|
+
result = this.newButtonPages0();
|
|
59486
|
+
this._buttonPages0 = result;
|
|
59296
59487
|
}
|
|
59297
|
-
|
|
59298
|
-
|
|
59299
|
-
|
|
59300
|
-
|
|
59488
|
+
return result;
|
|
59489
|
+
},
|
|
59490
|
+
enumerable: false,
|
|
59491
|
+
configurable: true
|
|
59492
|
+
});
|
|
59493
|
+
DPagination.prototype.newButtonPages0 = function () {
|
|
59494
|
+
return [
|
|
59495
|
+
this.newButtonPage(),
|
|
59496
|
+
this.newButtonPage(),
|
|
59497
|
+
this.newButtonPage(),
|
|
59498
|
+
this.newButtonPage()
|
|
59499
|
+
];
|
|
59500
|
+
};
|
|
59501
|
+
Object.defineProperty(DPagination.prototype, "buttonPages1", {
|
|
59502
|
+
get: function () {
|
|
59503
|
+
var result = this._buttonPages1;
|
|
59504
|
+
if (result == null) {
|
|
59505
|
+
result = this.newButtonPages1();
|
|
59506
|
+
this._buttonPages1 = result;
|
|
59301
59507
|
}
|
|
59302
|
-
|
|
59508
|
+
return result;
|
|
59509
|
+
},
|
|
59510
|
+
enumerable: false,
|
|
59511
|
+
configurable: true
|
|
59512
|
+
});
|
|
59513
|
+
DPagination.prototype.newButtonPages1 = function () {
|
|
59514
|
+
return [
|
|
59515
|
+
this.newButtonPage(),
|
|
59516
|
+
this.newButtonPage(),
|
|
59517
|
+
this.newButtonPage(),
|
|
59518
|
+
this.newButtonPage()
|
|
59519
|
+
];
|
|
59303
59520
|
};
|
|
59304
|
-
DPagination.prototype
|
|
59305
|
-
|
|
59306
|
-
|
|
59307
|
-
|
|
59308
|
-
|
|
59309
|
-
|
|
59310
|
-
var numberButtonsInRight = 0;
|
|
59311
|
-
this.updateStaticButtons();
|
|
59312
|
-
// Number displayed buttons from first button to selected button when select center button of all buttons.
|
|
59313
|
-
// Not including selected button.
|
|
59314
|
-
var numberButtonsFirstToCenter = Math.ceil((this._numberPageButtonVisible - 1) * 0.5);
|
|
59315
|
-
var numberButtonsCenterToEnd = Math.floor((this._numberPageButtonVisible - 1) * 0.5);
|
|
59316
|
-
if (this._selected < numberButtonsFirstToCenter) {
|
|
59317
|
-
numberButtonsInLeft = this._selected;
|
|
59318
|
-
numberButtonsInRight = this._numberPageButtonVisible - numberButtonsInLeft - 1;
|
|
59319
|
-
}
|
|
59320
|
-
else if (this._selected + numberButtonsCenterToEnd > this._total - 1) {
|
|
59321
|
-
numberButtonsInRight = this._total - 1 - this.selected;
|
|
59322
|
-
numberButtonsInLeft = this._numberPageButtonVisible - numberButtonsInRight - 1;
|
|
59323
|
-
}
|
|
59324
|
-
else {
|
|
59325
|
-
numberButtonsInLeft = numberButtonsFirstToCenter;
|
|
59326
|
-
numberButtonsInRight = numberButtonsCenterToEnd;
|
|
59327
|
-
}
|
|
59328
|
-
if (this._selected <= numberButtonsInLeft) {
|
|
59329
|
-
startDynamic = 1;
|
|
59330
|
-
dotsLeft = false;
|
|
59331
|
-
}
|
|
59332
|
-
else {
|
|
59333
|
-
startDynamic = this._selected - numberButtonsInLeft + 2;
|
|
59334
|
-
dotsLeft = true;
|
|
59335
|
-
}
|
|
59336
|
-
if (this._selected + numberButtonsInRight >= this._total - 1) {
|
|
59337
|
-
endDynamic = this._total - 2;
|
|
59338
|
-
dotsRight = false;
|
|
59339
|
-
}
|
|
59340
|
-
else {
|
|
59341
|
-
endDynamic = this._selected + numberButtonsInRight - 2;
|
|
59342
|
-
dotsRight = true;
|
|
59343
|
-
}
|
|
59344
|
-
this._dynamicPageBtns.update({
|
|
59345
|
-
start: startDynamic,
|
|
59346
|
-
end: endDynamic,
|
|
59347
|
-
selected: this._selected,
|
|
59348
|
-
button: {
|
|
59349
|
-
width: this.getButtonWidth(),
|
|
59350
|
-
dotsLeft: dotsLeft,
|
|
59351
|
-
dotsRight: dotsRight
|
|
59521
|
+
Object.defineProperty(DPagination.prototype, "page", {
|
|
59522
|
+
get: function () {
|
|
59523
|
+
var result = this._page;
|
|
59524
|
+
if (result == null) {
|
|
59525
|
+
result = this.newPage();
|
|
59526
|
+
this._page = result;
|
|
59352
59527
|
}
|
|
59353
|
-
|
|
59528
|
+
return result;
|
|
59529
|
+
},
|
|
59530
|
+
enumerable: false,
|
|
59531
|
+
configurable: true
|
|
59532
|
+
});
|
|
59533
|
+
DPagination.prototype.newPage = function () {
|
|
59534
|
+
var _a;
|
|
59535
|
+
return new DPaginationPage((_a = this._options) === null || _a === void 0 ? void 0 : _a.page);
|
|
59354
59536
|
};
|
|
59355
|
-
DPagination.prototype.
|
|
59356
|
-
|
|
59357
|
-
|
|
59358
|
-
|
|
59359
|
-
|
|
59360
|
-
|
|
59537
|
+
DPagination.prototype.onButtonPageActive = function (button) {
|
|
59538
|
+
var text = button.text;
|
|
59539
|
+
if (isNumber(text)) {
|
|
59540
|
+
this.moveTo(text - 1);
|
|
59541
|
+
if (button.state.isFocused) {
|
|
59542
|
+
button.state.isHovered = false;
|
|
59543
|
+
this.page.focus();
|
|
59544
|
+
}
|
|
59361
59545
|
}
|
|
59362
|
-
|
|
59363
|
-
|
|
59546
|
+
};
|
|
59547
|
+
DPagination.prototype.update = function () {
|
|
59548
|
+
var size = this._size;
|
|
59549
|
+
var value = this._value;
|
|
59550
|
+
if (size <= 0) {
|
|
59551
|
+
var buttonTop = this.buttonTop;
|
|
59552
|
+
if (buttonTop != null) {
|
|
59553
|
+
buttonTop.state.isEnabled = false;
|
|
59554
|
+
}
|
|
59555
|
+
var buttonPrevious = this.buttonPrevious;
|
|
59556
|
+
if (buttonPrevious != null) {
|
|
59557
|
+
buttonPrevious.state.isEnabled = false;
|
|
59558
|
+
}
|
|
59559
|
+
this.dots0.hide();
|
|
59560
|
+
var buttonPages0 = this.buttonPages0;
|
|
59561
|
+
for (var i = 0, imax = buttonPages0.length; i < imax; ++i) {
|
|
59562
|
+
buttonPages0[i].hide();
|
|
59563
|
+
}
|
|
59564
|
+
this.page.hide();
|
|
59565
|
+
var buttonPages1 = this.buttonPages1;
|
|
59566
|
+
for (var i = 0, imax = buttonPages1.length; i < imax; ++i) {
|
|
59567
|
+
buttonPages1[i].hide();
|
|
59568
|
+
}
|
|
59569
|
+
this.dots1.hide();
|
|
59570
|
+
var buttonNext = this.buttonNext;
|
|
59571
|
+
if (buttonNext != null) {
|
|
59572
|
+
buttonNext.state.isEnabled = false;
|
|
59573
|
+
}
|
|
59574
|
+
var buttonLast = this.buttonLast;
|
|
59575
|
+
if (buttonLast) {
|
|
59576
|
+
buttonLast.state.isEnabled = false;
|
|
59577
|
+
}
|
|
59364
59578
|
}
|
|
59365
59579
|
else {
|
|
59366
|
-
|
|
59367
|
-
|
|
59368
|
-
|
|
59369
|
-
|
|
59370
|
-
|
|
59371
|
-
|
|
59372
|
-
|
|
59373
|
-
|
|
59374
|
-
|
|
59375
|
-
|
|
59376
|
-
|
|
59377
|
-
|
|
59378
|
-
|
|
59379
|
-
|
|
59380
|
-
|
|
59381
|
-
|
|
59382
|
-
|
|
59383
|
-
|
|
59384
|
-
|
|
59385
|
-
|
|
59386
|
-
|
|
59387
|
-
|
|
59388
|
-
|
|
59389
|
-
|
|
59390
|
-
|
|
59391
|
-
|
|
59392
|
-
|
|
59393
|
-
|
|
59394
|
-
|
|
59395
|
-
|
|
59396
|
-
|
|
59397
|
-
|
|
59398
|
-
|
|
59399
|
-
|
|
59400
|
-
|
|
59580
|
+
var from = value - 2;
|
|
59581
|
+
var to = value + 2;
|
|
59582
|
+
if (from < 0) {
|
|
59583
|
+
to = to - from;
|
|
59584
|
+
from = 0;
|
|
59585
|
+
}
|
|
59586
|
+
else if (size <= to) {
|
|
59587
|
+
var delta = to - size + 1;
|
|
59588
|
+
to -= delta;
|
|
59589
|
+
from -= delta;
|
|
59590
|
+
}
|
|
59591
|
+
var top_1 = false;
|
|
59592
|
+
if (0 < from) {
|
|
59593
|
+
top_1 = true;
|
|
59594
|
+
from = Math.min(from + 1, value);
|
|
59595
|
+
}
|
|
59596
|
+
var last = false;
|
|
59597
|
+
if (to < size - 1) {
|
|
59598
|
+
last = true;
|
|
59599
|
+
to = Math.max(to - 1, value);
|
|
59600
|
+
}
|
|
59601
|
+
var buttonTop = this.buttonTop;
|
|
59602
|
+
if (buttonTop != null) {
|
|
59603
|
+
buttonTop.state.isEnabled = 0 < value;
|
|
59604
|
+
}
|
|
59605
|
+
var buttonPrevious = this.buttonPrevious;
|
|
59606
|
+
if (buttonPrevious != null) {
|
|
59607
|
+
buttonPrevious.state.isEnabled = 0 < value;
|
|
59608
|
+
}
|
|
59609
|
+
if (top_1) {
|
|
59610
|
+
this.dots0.show();
|
|
59611
|
+
}
|
|
59612
|
+
else {
|
|
59613
|
+
this.dots0.hide();
|
|
59614
|
+
}
|
|
59615
|
+
var buttonPages0 = this.buttonPages0;
|
|
59616
|
+
for (var i = 0, imax = buttonPages0.length; i < imax; ++i) {
|
|
59617
|
+
var index = value - i - 1;
|
|
59618
|
+
var buttonPage = buttonPages0[i];
|
|
59619
|
+
if (from <= index && index <= to) {
|
|
59620
|
+
buttonPage.text = index + 1;
|
|
59621
|
+
buttonPage.show();
|
|
59622
|
+
}
|
|
59623
|
+
else {
|
|
59624
|
+
if (top_1 && i === imax - 1) {
|
|
59625
|
+
buttonPage.text = 1;
|
|
59626
|
+
buttonPage.show();
|
|
59627
|
+
}
|
|
59628
|
+
else {
|
|
59629
|
+
buttonPage.hide();
|
|
59630
|
+
}
|
|
59631
|
+
}
|
|
59632
|
+
}
|
|
59633
|
+
this.page.text = value + 1;
|
|
59634
|
+
var buttonPages1 = this.buttonPages1;
|
|
59635
|
+
for (var i = 0, imax = buttonPages1.length; i < imax; ++i) {
|
|
59636
|
+
var index = value + i + 1;
|
|
59637
|
+
var buttonPage = buttonPages1[i];
|
|
59638
|
+
if (from <= index && index <= to) {
|
|
59639
|
+
buttonPage.text = index + 1;
|
|
59640
|
+
buttonPage.show();
|
|
59641
|
+
}
|
|
59642
|
+
else {
|
|
59643
|
+
if (last && i === imax - 1) {
|
|
59644
|
+
buttonPage.text = size;
|
|
59645
|
+
buttonPage.show();
|
|
59646
|
+
}
|
|
59647
|
+
else {
|
|
59648
|
+
buttonPage.hide();
|
|
59649
|
+
}
|
|
59650
|
+
}
|
|
59651
|
+
}
|
|
59652
|
+
if (last) {
|
|
59653
|
+
this.dots1.show();
|
|
59654
|
+
}
|
|
59655
|
+
else {
|
|
59656
|
+
this.dots1.hide();
|
|
59657
|
+
}
|
|
59658
|
+
var buttonNext = this.buttonNext;
|
|
59659
|
+
if (buttonNext != null) {
|
|
59660
|
+
buttonNext.state.isEnabled = value < size - 1;
|
|
59661
|
+
}
|
|
59662
|
+
var buttonLast = this.buttonLast;
|
|
59663
|
+
if (buttonLast != null) {
|
|
59664
|
+
buttonLast.state.isEnabled = value < size - 1;
|
|
59665
|
+
}
|
|
59401
59666
|
}
|
|
59402
59667
|
};
|
|
59403
59668
|
DPagination.prototype.getType = function () {
|
|
@@ -67938,6 +68203,36 @@
|
|
|
67938
68203
|
ESnapperModifierAnchor: ESnapperModifierAnchor,
|
|
67939
68204
|
ESnapper: ESnapper,
|
|
67940
68205
|
DThemes: DThemes,
|
|
68206
|
+
FormatNodeA: FormatNodeA,
|
|
68207
|
+
FormatNodea: FormatNodea,
|
|
68208
|
+
FormatNodeD: FormatNodeD,
|
|
68209
|
+
FormatNoded: FormatNoded,
|
|
68210
|
+
FormatNodee: FormatNodee,
|
|
68211
|
+
FormatNodef: FormatNodef,
|
|
68212
|
+
FormatNodefsi: FormatNodefsi,
|
|
68213
|
+
FormatNodeg: FormatNodeg,
|
|
68214
|
+
FormatNodeH: FormatNodeH,
|
|
68215
|
+
FormatNodeh: FormatNodeh,
|
|
68216
|
+
FormatNodeM: FormatNodeM,
|
|
68217
|
+
FormatNodem: FormatNodem,
|
|
68218
|
+
FormatNodemi: FormatNodemi,
|
|
68219
|
+
FormatNodeP: FormatNodeP,
|
|
68220
|
+
FormatNodep: FormatNodep,
|
|
68221
|
+
FormatNodePadding: FormatNodePadding,
|
|
68222
|
+
FormatNodeParenthesis: FormatNodeParenthesis,
|
|
68223
|
+
FormatNodePlus: FormatNodePlus,
|
|
68224
|
+
FormatNodePrecision: FormatNodePrecision,
|
|
68225
|
+
FormatNoderd: FormatNoderd,
|
|
68226
|
+
FormatNodeRP: FormatNodeRP,
|
|
68227
|
+
FormatNoderp: FormatNoderp,
|
|
68228
|
+
FormatNodesdt: FormatNodesdt,
|
|
68229
|
+
FormatNodeSpace: FormatNodeSpace,
|
|
68230
|
+
FormatNodessi: FormatNodessi,
|
|
68231
|
+
FormatNodeString: FormatNodeString,
|
|
68232
|
+
FormatNodeY: FormatNodeY,
|
|
68233
|
+
FormatNodey: FormatNodey,
|
|
68234
|
+
FormatNodez: FormatNodez,
|
|
68235
|
+
FormatNodes: FormatNodes,
|
|
67941
68236
|
DynamicAtlasItemEmpty: DynamicAtlasItemEmpty,
|
|
67942
68237
|
DynamicAtlasItemFontAtlas: DynamicAtlasItemFontAtlas,
|
|
67943
68238
|
DynamicAtlasItemImage: DynamicAtlasItemImage,
|
|
@@ -67946,6 +68241,7 @@
|
|
|
67946
68241
|
DynamicAtlasItem: DynamicAtlasItem,
|
|
67947
68242
|
DynamicAtlas: DynamicAtlas,
|
|
67948
68243
|
DynamicFontAtlasCharacterOrigin: DynamicFontAtlasCharacterOrigin,
|
|
68244
|
+
DynamicFontAtlasCharacterType: DynamicFontAtlasCharacterType,
|
|
67949
68245
|
DynamicFontAtlasCharacter: DynamicFontAtlasCharacter,
|
|
67950
68246
|
DynamicFontAtlasFont: DynamicFontAtlasFont,
|
|
67951
68247
|
DynamicFontAtlas: DynamicFontAtlas,
|
|
@@ -67973,6 +68269,7 @@
|
|
|
67973
68269
|
UtilSvgAtlasBuilder: UtilSvgAtlasBuilder,
|
|
67974
68270
|
UtilAttachAlign: UtilAttachAlign,
|
|
67975
68271
|
UtilAttach: UtilAttach,
|
|
68272
|
+
UtilCharacterIterator: UtilCharacterIterator,
|
|
67976
68273
|
UtilClickOutside: UtilClickOutside,
|
|
67977
68274
|
UtilClipboard: UtilClipboard,
|
|
67978
68275
|
UtilGestureData: UtilGestureData,
|
|
@@ -68188,6 +68485,7 @@
|
|
|
68188
68485
|
DDialogProcessingMessage: DDialogProcessingMessage,
|
|
68189
68486
|
DDialogProcessing: DDialogProcessing,
|
|
68190
68487
|
DDialogSaveAs: DDialogSaveAs,
|
|
68488
|
+
DDialogSelectListItemUpdater: DDialogSelectListItemUpdater,
|
|
68191
68489
|
DDialogSelectListItem: DDialogSelectListItem,
|
|
68192
68490
|
DDialogSelectList: DDialogSelectList,
|
|
68193
68491
|
DDialogSelectSearh: DDialogSelectSearh,
|
|
@@ -68322,10 +68620,15 @@
|
|
|
68322
68620
|
DNoteSmall: DNoteSmall,
|
|
68323
68621
|
DNote: DNote,
|
|
68324
68622
|
DNotification: DNotification,
|
|
68325
|
-
|
|
68326
|
-
|
|
68327
|
-
|
|
68623
|
+
DPaginationButtonLast: DPaginationButtonLast,
|
|
68624
|
+
DPaginationButtonNext: DPaginationButtonNext,
|
|
68625
|
+
DPaginationButtonPage: DPaginationButtonPage,
|
|
68626
|
+
DPaginationButtonPrevious: DPaginationButtonPrevious,
|
|
68627
|
+
DPaginationButtonTop: DPaginationButtonTop,
|
|
68628
|
+
DPaginationDots: DPaginationDots,
|
|
68629
|
+
DPaginationPage: DPaginationPage,
|
|
68328
68630
|
DPagination: DPagination,
|
|
68631
|
+
DPaneScrollBar: DPaneScrollBar,
|
|
68329
68632
|
DPane: DPane,
|
|
68330
68633
|
DPickerColorAndAlpha: DPickerColorAndAlpha,
|
|
68331
68634
|
DPickerColorGradientRecent: DPickerColorGradientRecent,
|
|
@@ -68354,6 +68657,7 @@
|
|
|
68354
68657
|
DPickerTimeRange: DPickerTimeRange,
|
|
68355
68658
|
DPickerTime: DPickerTime,
|
|
68356
68659
|
DPickerTimes: DPickerTimes,
|
|
68660
|
+
DScalarExpressionNodeType: DScalarExpressionNodeType,
|
|
68357
68661
|
DScalarExpression: DScalarExpression,
|
|
68358
68662
|
DScalarFunctions: DScalarFunctions,
|
|
68359
68663
|
DScrollBarHorizontal: DScrollBarHorizontal,
|
|
@@ -68424,6 +68728,7 @@
|
|
|
68424
68728
|
DTableHeaderCell: DTableHeaderCell,
|
|
68425
68729
|
DTableHeader: DTableHeader,
|
|
68426
68730
|
DTableRow: DTableRow,
|
|
68731
|
+
DTableScrollBar: DTableScrollBar,
|
|
68427
68732
|
DTableState: DTableState,
|
|
68428
68733
|
DTable: DTable,
|
|
68429
68734
|
DTextBase: DTextBase,
|