@wcardinal/wcardinal-ui 0.407.0 → 0.407.2

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.
@@ -400,7 +400,7 @@ var DPagination = /** @class */ (function (_super) {
400
400
  return new DPaginationPage((_a = this._options) === null || _a === void 0 ? void 0 : _a.page);
401
401
  };
402
402
  DPagination.prototype.onButtonPageActive = function (button) {
403
- var text = button.text;
403
+ var text = button.text.value;
404
404
  if (isNumber(text)) {
405
405
  this.moveTo(text - 1);
406
406
  if (button.state.isFocused) {
@@ -1 +1 @@
1
- {"version":3,"file":"d-pagination.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-pagination.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAGH,OAAO,EACN,iBAAiB,EAGjB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAgC,MAAM,4BAA4B,CAAC;AACjG,OAAO,EAAE,qBAAqB,EAAgC,MAAM,4BAA4B,CAAC;AACjG,OAAO,EAAE,qBAAqB,EAAgC,MAAM,4BAA4B,CAAC;AACjG,OAAO,EACN,yBAAyB,EAEzB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,oBAAoB,EAA+B,MAAM,2BAA2B,CAAC;AAC9F,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,eAAe,EAA0B,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAuB,MAAM,kBAAkB,CAAC;AAErE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AA2EjD;IAGU,+BAAiC;IAgB1C,qBAAY,OAAiB;;QAA7B,YACC,kBAAM,OAAO,CAAC,SAiDd;QA/CA,IAAI,OAAO,IAAI,IAAI,EAAE;YACpB,KAAI,CAAC,KAAK,GAAG,MAAA,MAAA,OAAO,CAA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,MAAM,CAAC,IAAI,EAAE,CAAC;IACf,CAAC;IAES,8BAAQ,GAAlB,UAAmB,MAA0B;QAC5C,MAAM,CAAC,IAAI,EAAE,CAAC;IACf,CAAC;IAES,8BAAQ,GAAlB,UAAmB,IAAqB,EAAE,IAAY,EAAE,EAAU;QACjE,IAAI,CAAC,IAAI,EAAE,CAAC;IACb,CAAC;IAES,8BAAQ,GAAlB,UAAmB,IAAqB;QACvC,IAAI,CAAC,IAAI,EAAE,CAAC;IACb,CAAC;IAES,6BAAO,GAAjB;QACC,OAAO,aAAa,CAAC;IACtB,CAAC;IACF,kBAAC;AAAD,CAAC,AAxxBD,CAGU,iBAAiB,GAqxB1B","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DButton } from \"./d-button\";\nimport {\n\tDLayoutHorizontal,\n\tDLayoutHorizontalOptions,\n\tDThemeLayoutHorizontal\n} from \"./d-layout-horizontal\";\nimport { DPaginationDots } from \"./d-pagination-dots\";\nimport { DPaginationButtonLast, DPaginationButtonLastOptions } from \"./d-pagination-button-last\";\nimport { DPaginationButtonNext, DPaginationButtonNextOptions } from \"./d-pagination-button-next\";\nimport { DPaginationButtonPage, DPaginationButtonPageOptions } from \"./d-pagination-button-page\";\nimport {\n\tDPaginationButtonPrevious,\n\tDPaginationButtonPreviousOptions\n} from \"./d-pagination-button-previous\";\nimport { DPaginationButtonTop, DPaginationButtonTopOptions } from \"./d-pagination-button-top\";\nimport { isNumber } from \"./util/is-number\";\nimport { DPaginationPage, DPaginationPageOptions } from \"./d-pagination-page\";\nimport { DLayoutSpace, DLayoutSpaceOptions } from \"./d-layout-space\";\nimport { DImageBase } from \"./d-image-base\";\nimport { DApplications } from \"./d-applications\";\n\nexport interface DPaginationButtonOptions {\n\t/**\n\t * {@link DPagination} top button options.\n\t */\n\ttop?: DPaginationButtonTopOptions | boolean | null;\n\n\t/**\n\t * {@link DPagination} previous button options.\n\t */\n\tprevious?: DPaginationButtonPreviousOptions | boolean | null;\n\n\t/**\n\t * {@link DPagination} page button options.\n\t */\n\tpage?: DPaginationButtonPageOptions;\n\n\t/**\n\t * {@link DPagination} next button options.\n\t */\n\tnext?: DPaginationButtonNextOptions | boolean | null;\n\n\t/**\n\t * {@link DPagination} last button options.\n\t */\n\tlast?: DPaginationButtonLastOptions | boolean | null;\n\n\t/**\n\t * A space between page buttons and next / previous buttons.\n\t */\n\tspace?: DLayoutSpaceOptions | boolean | number | null;\n}\n\nexport interface DPaginationOptions<THEME extends DThemePagination>\n\textends DLayoutHorizontalOptions<THEME> {\n\t/**\n\t * An index number of a selected page.\n\t */\n\tvalue?: number;\n\n\t/**\n\t * An index number of a selected page.\n\t *\n\t * @deprecated in favor of {@link value}.\n\t */\n\tselected?: number;\n\n\t/**\n\t * A total number of pages.\n\t */\n\tsize?: number;\n\n\t/**\n\t * A total number of pages.\n\t *\n\t * @deprecated in favor of {@link size};\n\t */\n\ttotal?: number;\n\n\t/**\n\t * {@link DPagination} button options.\n\t */\n\tbutton?: DPaginationButtonOptions;\n\n\t/**\n\t * {@link DPagination} page options.\n\t */\n\tpage?: DPaginationPageOptions;\n}\n\nexport interface DThemePagination extends DThemeLayoutHorizontal {\n\tgetButtonSpace(): number;\n}\n\nexport class DPagination<\n\tTHEME extends DThemePagination = DThemePagination,\n\tOPTIONS extends DPaginationOptions<THEME> = DPaginationOptions<THEME>\n> extends DLayoutHorizontal<THEME, OPTIONS> {\n\tprotected _size: number;\n\tprotected _value: number;\n\n\tprotected _buttonTop?: DButton<string> | null;\n\tprotected _buttonPrevious?: DButton<string> | null;\n\tprotected _spaceLeft?: DLayoutSpace | null;\n\tprotected _dots0?: DPaginationDots;\n\tprotected _buttonPages0?: DButton<number>[];\n\tprotected _page?: DPaginationPage;\n\tprotected _buttonPages1?: DButton<number>[];\n\tprotected _dots1?: DPaginationDots;\n\tprotected _spaceRight?: DLayoutSpace | null;\n\tprotected _buttonNext?: DButton<string> | null;\n\tprotected _buttonLast?: DButton<string> | null;\n\n\tconstructor(options?: OPTIONS) {\n\t\tsuper(options);\n\n\t\tif (options != null) {\n\t\t\tthis._size = options.size ?? options.total ?? 10;\n\t\t\tthis._value = options.value ?? options.selected ?? 0;\n\t\t} else {\n\t\t\tthis._size = 10;\n\t\t\tthis._value = 0;\n\t\t}\n\n\t\tconst buttonTop = this.buttonTop;\n\t\tif (buttonTop != null) {\n\t\t\tthis.addChild(buttonTop);\n\t\t}\n\t\tconst buttonPrevious = this.buttonPrevious;\n\t\tif (buttonPrevious != null) {\n\t\t\tthis.addChild(buttonPrevious);\n\t\t}\n\t\tconst spaceLeft = this.spaceLeft;\n\t\tif (spaceLeft != null) {\n\t\t\tthis.addChild(spaceLeft);\n\t\t}\n\t\tconst buttonPages0 = this.buttonPages0;\n\t\tconst buttonPages0Length = buttonPages0.length;\n\t\tthis.addChild(buttonPages0[0]);\n\t\tthis.addChild(this.dots0);\n\t\tfor (let i = 1; i < buttonPages0Length; ++i) {\n\t\t\tthis.addChild(buttonPages0[i]);\n\t\t}\n\t\tthis.addChild(this.page);\n\t\tconst buttonPages1 = this.buttonPages1;\n\t\tconst buttonPages1Length = buttonPages1.length;\n\t\tfor (let i = 0, imax = buttonPages1Length - 1; i < imax; ++i) {\n\t\t\tthis.addChild(buttonPages1[i]);\n\t\t}\n\t\tthis.addChild(this.dots1);\n\t\tthis.addChild(buttonPages1[buttonPages1Length - 1]);\n\t\tconst spaceRight = this.spaceRight;\n\t\tif (spaceRight != null) {\n\t\t\tthis.addChild(spaceRight);\n\t\t}\n\t\tconst buttonNext = this.buttonNext;\n\t\tif (buttonNext != null) {\n\t\t\tthis.addChild(buttonNext);\n\t\t}\n\t\tconst buttonLast = this.buttonLast;\n\t\tif (buttonLast != null) {\n\t\t\tthis.addChild(buttonLast);\n\t\t}\n\t}\n\n\t/**\n\t * Sets a value that is an index of a current page.\n\t *\n\t * @param value a value that is an index of a page\n\t */\n\tset value(value: number) {\n\t\tif (0 <= value && value < this._size && this._value !== value) {\n\t\t\tthis._value = value;\n\t\t\tthis.toDirty();\n\t\t\tDApplications.update(this);\n\t\t}\n\t}\n\n\t/**\n\t * Returns a value that is an index of a current page.\n\t *\n\t * @returns a value that is an index of a selected page.\n\t */\n\tget value(): number {\n\t\treturn this._value;\n\t}\n\n\t/**\n\t * Selects a page.\n\t *\n\t * @param index an index of a page\n\t * @deprecated in favor of {@link value}.\n\t */\n\tset selected(index: number) {\n\t\tthis.value = index;\n\t}\n\n\t/**\n\t * Returns an index of the selected page.\n\t *\n\t * @returns an index of the selected page.\n\t * @deprecated in favor of {@link value}.\n\t */\n\tget selected(): number {\n\t\treturn this.value;\n\t}\n\n\t/**\n\t * Sets a number of total pages.\n\t *\n\t * @param size a number of pages\n\t */\n\tset size(size: number) {\n\t\tif (0 <= size && this._size !== size) {\n\t\t\tthis._size = size;\n\t\t\tif (size === 0) {\n\t\t\t\tthis._value = -1;\n\t\t\t} else {\n\t\t\t\tthis._value = Math.max(0, Math.min(this._size - 1, this._value));\n\t\t\t}\n\t\t\tthis.toDirty();\n\t\t\tDApplications.update(this);\n\t\t}\n\t}\n\n\t/**\n\t * Returns a number of total pages.\n\t *\n\t * @returns a number of total pages.\n\t */\n\tget size(): number {\n\t\treturn this._size;\n\t}\n\n\t/**\n\t * Sets a number of total pages.\n\t *\n\t * @param total a number of pages\n\t * @deprecated in favor of {@link size}\n\t */\n\tset total(total: number) {\n\t\tthis.size = total;\n\t}\n\n\t/**\n\t * Returns a number of total pages.\n\t *\n\t * @returns a number of total pages.\n\t * @deprecated in favor of {@link size}\n\t */\n\tget total(): number {\n\t\treturn this.size;\n\t}\n\n\tprotected get dots0(): DPaginationDots {\n\t\tlet result = this._dots0;\n\t\tif (result == null) {\n\t\t\tresult = this.newDots();\n\t\t\tthis._dots0 = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected get dots1(): DPaginationDots {\n\t\tlet result = this._dots1;\n\t\tif (result == null) {\n\t\t\tresult = this.newDots();\n\t\t\tthis._dots1 = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected newDots(): DPaginationDots {\n\t\treturn new DPaginationDots();\n\t}\n\n\tprotected get buttonLast(): DButton<string> | null {\n\t\tlet result = this._buttonLast;\n\t\tif (result === undefined) {\n\t\t\tresult = this.newButtonLast();\n\t\t\tthis._buttonLast = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected newButtonLast(): DButton<string> | null {\n\t\tconst last = this._options?.button?.last;\n\t\tif (last !== null && last !== false && last !== undefined) {\n\t\t\tconst result = new DPaginationButtonLast(last !== true ? last : undefined);\n\t\t\tresult.on(\"active\", () => {\n\t\t\t\tthis.onButtonLastActive();\n\t\t\t});\n\t\t\treturn result;\n\t\t}\n\t\treturn null;\n\t}\n\n\tprotected onButtonLastActive(): void {\n\t\tthis.moveTo(this._size - 1);\n\t}\n\n\tprotected moveTo(index: number): void {\n\t\tif (0 <= index && index < this._size && this._value !== index) {\n\t\t\tconst oldIndex = this._value;\n\t\t\tthis._value = index;\n\t\t\tthis.emit(\"change\", index, oldIndex, this);\n\t\t\tthis.toDirty();\n\t\t\tDApplications.update(this);\n\t\t}\n\t}\n\n\tprotected get buttonNext(): DButton<string> | null {\n\t\tlet result = this._buttonNext;\n\t\tif (result === undefined) {\n\t\t\tresult = this.newButtonNext();\n\t\t\tthis._buttonNext = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected newButtonNext(): DButton<string> | null {\n\t\tconst next = this._options?.button?.next;\n\t\tif (next !== null && next !== false) {\n\t\t\tconst result = new DPaginationButtonNext(next !== true ? next : undefined);\n\t\t\tresult.on(\"active\", (): void => {\n\t\t\t\tthis.onButtonNextActive();\n\t\t\t});\n\t\t\treturn result;\n\t\t}\n\t\treturn null;\n\t}\n\n\tprotected onButtonNextActive(): void {\n\t\tthis.moveTo(this._value + 1);\n\t}\n\n\tprotected get buttonPrevious(): DButton<string> | null {\n\t\tlet result = this._buttonPrevious;\n\t\tif (result === undefined) {\n\t\t\tresult = this.newButtonPrevious();\n\t\t\tthis._buttonPrevious = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected newButtonPrevious(): DButton<string> | null {\n\t\tconst previous = this._options?.button?.previous;\n\t\tif (previous !== null && previous !== false) {\n\t\t\tconst result = new DPaginationButtonPrevious(previous !== true ? previous : undefined);\n\t\t\tresult.on(\"active\", (): void => {\n\t\t\t\tthis.onButtonPreviousActive();\n\t\t\t});\n\t\t\treturn result;\n\t\t}\n\t\treturn null;\n\t}\n\n\tprotected onButtonPreviousActive(): void {\n\t\tthis.moveTo(this._value - 1);\n\t}\n\n\tprotected get buttonTop(): DButton<string> | null {\n\t\tlet result = this._buttonTop;\n\t\tif (result === undefined) {\n\t\t\tresult = this.newButtonTop();\n\t\t\tthis._buttonTop = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected newButtonTop(): DButton<string> | null {\n\t\tconst top = this._options?.button?.top;\n\t\tif (top !== null && top !== false && top !== undefined) {\n\t\t\tconst result = new DPaginationButtonTop(top !== true ? top : undefined);\n\t\t\tresult.on(\"active\", (): void => {\n\t\t\t\tthis.onButtonTopActive();\n\t\t\t});\n\t\t\treturn result;\n\t\t}\n\t\treturn null;\n\t}\n\n\tprotected onButtonTopActive(): void {\n\t\tthis.moveTo(0);\n\t}\n\n\tprotected newButtonPage(): DButton<number> {\n\t\tconst result = new DPaginationButtonPage(this._options?.button?.page);\n\t\tresult.on(\"active\", (): void => {\n\t\t\tthis.onButtonPageActive(result);\n\t\t});\n\t\treturn result;\n\t}\n\n\tprotected get buttonPages0(): DButton<number>[] {\n\t\tlet result = this._buttonPages0;\n\t\tif (result == null) {\n\t\t\tresult = this.newButtonPages0();\n\t\t\tthis._buttonPages0 = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected newButtonPages0(): DButton<number>[] {\n\t\treturn [\n\t\t\tthis.newButtonPage(),\n\t\t\tthis.newButtonPage(),\n\t\t\tthis.newButtonPage(),\n\t\t\tthis.newButtonPage()\n\t\t];\n\t}\n\n\tprotected allocButtonPages0(size: number): void {\n\t\tconst buttonPages0 = this.buttonPages0;\n\t\tconst buttonPages0Length = buttonPages0.length;\n\t\tconst index = this.getChildIndex(buttonPages0[buttonPages0Length - 1]) + 1;\n\t\tfor (let i = 0, imax = size - buttonPages0Length; i < imax; ++i) {\n\t\t\tconst buttonPage = this.newButtonPage();\n\t\t\tthis.addChildAt(buttonPage, index + i);\n\t\t\tbuttonPages0.push(buttonPage);\n\t\t}\n\t}\n\n\tprotected get buttonPages1(): DButton<number>[] {\n\t\tlet result = this._buttonPages1;\n\t\tif (result == null) {\n\t\t\tresult = this.newButtonPages1();\n\t\t\tthis._buttonPages1 = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected newButtonPages1(): DButton<number>[] {\n\t\treturn [\n\t\t\tthis.newButtonPage(),\n\t\t\tthis.newButtonPage(),\n\t\t\tthis.newButtonPage(),\n\t\t\tthis.newButtonPage()\n\t\t];\n\t}\n\n\tprotected allocButtonPages1(size: number): void {\n\t\tconst buttonPages1 = this.buttonPages1;\n\t\tconst buttonPages1Length = buttonPages1.length;\n\t\tconst index = this.getChildIndex(buttonPages1[0]);\n\t\tfor (let i = 0, imax = size - buttonPages1Length; i < imax; ++i) {\n\t\t\tconst buttonPage = this.newButtonPage();\n\t\t\tthis.addChildAt(buttonPage, index);\n\t\t\tbuttonPages1.unshift(buttonPage);\n\t\t}\n\t}\n\n\tprotected get page(): DPaginationPage {\n\t\tlet result = this._page;\n\t\tif (result == null) {\n\t\t\tresult = this.newPage();\n\t\t\tthis._page = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected newPage(): DPaginationPage {\n\t\treturn new DPaginationPage(this._options?.page);\n\t}\n\n\tprotected onButtonPageActive(button: DButton<number>): void {\n\t\tconst text = button.text;\n\t\tif (isNumber(text)) {\n\t\t\tthis.moveTo(text - 1);\n\t\t\tif (button.state.isFocused) {\n\t\t\t\tbutton.state.isHovered = false;\n\t\t\t\tthis.page.focus();\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected get spaceLeft(): DLayoutSpace | null {\n\t\tlet result = this._spaceLeft;\n\t\tif (result === undefined) {\n\t\t\tresult = this.newSpaceLeft();\n\t\t\tthis._spaceLeft = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected newSpaceLeft(): DLayoutSpace | null {\n\t\tif (this.buttonTop != null || this.buttonPrevious != null) {\n\t\t\treturn this.newSpace();\n\t\t}\n\t\treturn null;\n\t}\n\n\tprotected get spaceRight(): DLayoutSpace | null {\n\t\tlet result = this._spaceRight;\n\t\tif (result === undefined) {\n\t\t\tresult = this.newSpaceRight();\n\t\t\tthis._spaceRight = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected newSpaceRight(): DLayoutSpace | null {\n\t\tif (this.buttonLast != null || this.buttonNext != null) {\n\t\t\treturn this.newSpace();\n\t\t}\n\t\treturn null;\n\t}\n\n\tprotected newSpace(): DLayoutSpace | null {\n\t\tconst space = this._options?.button?.space;\n\t\tif (space !== null && space !== false) {\n\t\t\tif (space === true || space === undefined) {\n\t\t\t\treturn new DLayoutSpace({\n\t\t\t\t\tweight: 1\n\t\t\t\t});\n\t\t\t} else if (isNumber(space)) {\n\t\t\t\treturn new DLayoutSpace({\n\t\t\t\t\twidth: space\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treturn new DLayoutSpace(space);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\n\tprotected onReflow(): void {\n\t\tthis.update();\n\t\tsuper.onReflow();\n\t}\n\n\tprotected update(): void {\n\t\tconst size = this._size;\n\t\tconst value = this._value;\n\t\tif (size <= 0) {\n\t\t\tthis.doUpdate0(value, size);\n\t\t} else {\n\t\t\tif (this._auto.width.isOn) {\n\t\t\t\tthis.doUpdate2(value, size, 0, 0, 0, 0);\n\t\t\t} else {\n\t\t\t\tthis.doUpdate1(value, size);\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected doUpdate0(value: number, size: number): void {\n\t\tconst buttonTop = this.buttonTop;\n\t\tif (buttonTop != null) {\n\t\t\tbuttonTop.state.isEnabled = false;\n\t\t}\n\t\tconst buttonPrevious = this.buttonPrevious;\n\t\tif (buttonPrevious != null) {\n\t\t\tbuttonPrevious.state.isEnabled = false;\n\t\t}\n\n\t\tthis.hideDots(this.dots0);\n\n\t\tconst buttonPages0 = this.buttonPages0;\n\t\tfor (let i = 0, imax = buttonPages0.length; i < imax; ++i) {\n\t\t\tthis.hidePage(buttonPages0[i]);\n\t\t}\n\n\t\tthis.hidePage(this.page);\n\n\t\tconst buttonPages1 = this.buttonPages1;\n\t\tfor (let i = 0, imax = buttonPages1.length; i < imax; ++i) {\n\t\t\tthis.hidePage(buttonPages1[i]);\n\t\t}\n\n\t\tthis.hideDots(this.dots1);\n\n\t\tconst buttonNext = this.buttonNext;\n\t\tif (buttonNext != null) {\n\t\t\tbuttonNext.state.isEnabled = false;\n\t\t}\n\t\tconst buttonLast = this.buttonLast;\n\t\tif (buttonLast) {\n\t\t\tbuttonLast.state.isEnabled = false;\n\t\t}\n\t}\n\n\tprotected doUpdate1(value: number, size: number): void {\n\t\tlet required = 0;\n\t\tlet nrequired = 0;\n\n\t\tconst buttonTop = this.buttonTop;\n\t\tif (buttonTop != null) {\n\t\t\trequired += buttonTop.width;\n\t\t\tnrequired += 1;\n\t\t}\n\t\tconst buttonPrevious = this.buttonPrevious;\n\t\tif (buttonPrevious != null) {\n\t\t\trequired += buttonPrevious.width;\n\t\t\tnrequired += 1;\n\t\t}\n\n\t\tconst spaceLeft = this.spaceLeft;\n\t\tif (spaceLeft != null) {\n\t\t\tif (spaceLeft.weight < 0) {\n\t\t\t\trequired += spaceLeft.width;\n\t\t\t}\n\t\t\tnrequired += 1;\n\t\t}\n\n\t\tconst page = this.page;\n\t\trequired += page.width;\n\t\tnrequired += 1;\n\n\t\tconst spaceRight = this.spaceRight;\n\t\tif (spaceRight != null) {\n\t\t\tif (spaceRight.weight < 0) {\n\t\t\t\trequired += spaceRight.width;\n\t\t\t}\n\t\t\tnrequired += 1;\n\t\t}\n\n\t\tconst buttonNext = this.buttonNext;\n\t\tif (buttonNext != null) {\n\t\t\trequired += buttonNext.width;\n\t\t\tnrequired += 1;\n\t\t}\n\t\tconst buttonLast = this.buttonLast;\n\t\tif (buttonLast) {\n\t\t\trequired += buttonLast.width;\n\t\t\tnrequired += 1;\n\t\t}\n\n\t\tconst marginHorizontal = this._margin.horizontal;\n\t\tif (2 <= nrequired) {\n\t\t\trequired += (nrequired - 1) * marginHorizontal;\n\t\t}\n\n\t\tconst padding = this.padding;\n\t\tconst space = this.width - (padding.getLeft() + padding.getRight());\n\t\tif (space <= required) {\n\t\t\tthis.doUpdate2(value, size, 4, 4, 0, 0);\n\t\t} else {\n\t\t\tconst buttonPages0 = this.buttonPages0;\n\t\t\tconst buttonPage0Width = buttonPages0[0].width;\n\t\t\tconst nrequired0 = value;\n\t\t\tconst required0 = nrequired0 * (buttonPage0Width + marginHorizontal);\n\n\t\t\tconst buttonPages1 = this.buttonPages1;\n\t\t\tconst buttonPage1Width = buttonPages1[0].width;\n\t\t\tconst nrequired1 = size - (value + 1);\n\t\t\tconst required1 = nrequired1 * (buttonPage1Width + marginHorizontal);\n\n\t\t\tif (required + required0 + required1 <= space) {\n\t\t\t\tthis.doUpdate2(value, size, 0, 0, 0, 0);\n\t\t\t} else {\n\t\t\t\tconst dots1 = this.dots1;\n\t\t\t\tconst dots1Width = dots1.width;\n\t\t\t\tconst dots0 = this.dots0;\n\t\t\t\tconst dots0Width = dots0.width;\n\t\t\t\tconst m0 = marginHorizontal + buttonPage0Width;\n\t\t\t\tconst m1 = marginHorizontal + buttonPage1Width;\n\t\t\t\tconst required0n = dots0Width + m0;\n\t\t\t\tconst required1n = dots1Width + m1;\n\t\t\t\tconst required0m = required0n + m0;\n\t\t\t\tconst required1m = required1n + m1;\n\t\t\t\tif (required0 <= required1) {\n\t\t\t\t\tif (3 <= nrequired1 && required + required0 + required1m <= space) {\n\t\t\t\t\t\tconst l = space - (required + required0 + required1m);\n\t\t\t\t\t\tconst n1 = Math.floor(l / m1);\n\t\t\t\t\t\tthis.doUpdate2(value, size, 0, 1, 0, n1);\n\t\t\t\t\t} else if (\n\t\t\t\t\t\t3 <= nrequired0 &&\n\t\t\t\t\t\t3 <= nrequired1 &&\n\t\t\t\t\t\trequired + required0m + required1m <= space\n\t\t\t\t\t) {\n\t\t\t\t\t\tconst l = space - (required + required0m + required1m);\n\t\t\t\t\t\tconst n1 = Math.floor((l * 0.5) / m1);\n\t\t\t\t\t\tconst n0 = Math.floor((l - n1 * m1) / m0);\n\t\t\t\t\t\tthis.doUpdate2(value, size, 1, 1, n0, n1);\n\t\t\t\t\t} else if (2 <= nrequired1 && required + required0 + required1n <= space) {\n\t\t\t\t\t\tthis.doUpdate2(value, size, 0, 2, 0, 0);\n\t\t\t\t\t} else if (\n\t\t\t\t\t\t3 <= nrequired0 &&\n\t\t\t\t\t\t2 <= nrequired1 &&\n\t\t\t\t\t\trequired + required0m + required1n <= space\n\t\t\t\t\t) {\n\t\t\t\t\t\tconst l = space - (required + required0m + required1n);\n\t\t\t\t\t\tconst n0 = Math.floor(l / m0);\n\t\t\t\t\t\tthis.doUpdate2(value, size, 1, 2, n0, 0);\n\t\t\t\t\t} else if (\n\t\t\t\t\t\t2 <= nrequired0 &&\n\t\t\t\t\t\t2 <= nrequired1 &&\n\t\t\t\t\t\trequired + required0n + required1n <= space\n\t\t\t\t\t) {\n\t\t\t\t\t\tthis.doUpdate2(value, size, 2, 2, 0, 0);\n\t\t\t\t\t} else if (\n\t\t\t\t\t\t1 <= nrequired0 &&\n\t\t\t\t\t\t1 <= nrequired1 &&\n\t\t\t\t\t\trequired + dots0Width + dots1Width <= space\n\t\t\t\t\t) {\n\t\t\t\t\t\tthis.doUpdate2(value, size, 3, 3, 0, 0);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.doUpdate2(value, size, 4, 4, 0, 0);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (3 <= nrequired0 && required + required0m + required1 <= space) {\n\t\t\t\t\t\tconst l = space - (required + required0m + required1);\n\t\t\t\t\t\tconst n0 = Math.floor(l / m0);\n\t\t\t\t\t\tthis.doUpdate2(value, size, 1, 0, n0, 0);\n\t\t\t\t\t} else if (\n\t\t\t\t\t\t3 <= nrequired0 &&\n\t\t\t\t\t\t3 <= nrequired1 &&\n\t\t\t\t\t\trequired + required0m + required1m <= space\n\t\t\t\t\t) {\n\t\t\t\t\t\tconst l = space - (required + required0m + required1m);\n\t\t\t\t\t\tconst n0 = Math.floor((l * 0.5) / m0);\n\t\t\t\t\t\tconst n1 = Math.floor((l - n0 * m0) / m1);\n\t\t\t\t\t\tthis.doUpdate2(value, size, 1, 1, n0, n1);\n\t\t\t\t\t} else if (2 <= nrequired0 && required + required0n + required1 <= space) {\n\t\t\t\t\t\tthis.doUpdate2(value, size, 2, 0, 0, 0);\n\t\t\t\t\t} else if (\n\t\t\t\t\t\t2 <= nrequired0 &&\n\t\t\t\t\t\t3 <= nrequired1 &&\n\t\t\t\t\t\trequired + required0n + required1m <= space\n\t\t\t\t\t) {\n\t\t\t\t\t\tconst l = space - (required + required0n + required1m);\n\t\t\t\t\t\tconst n1 = Math.floor(l / m1);\n\t\t\t\t\t\tthis.doUpdate2(value, size, 2, 1, 0, n1);\n\t\t\t\t\t} else if (\n\t\t\t\t\t\t2 <= nrequired0 &&\n\t\t\t\t\t\t2 <= nrequired1 &&\n\t\t\t\t\t\trequired + required0n + required1n <= space\n\t\t\t\t\t) {\n\t\t\t\t\t\tthis.doUpdate2(value, size, 2, 2, 0, 0);\n\t\t\t\t\t} else if (\n\t\t\t\t\t\t1 <= nrequired0 &&\n\t\t\t\t\t\t1 <= nrequired1 &&\n\t\t\t\t\t\trequired + dots0Width + dots1Width <= space\n\t\t\t\t\t) {\n\t\t\t\t\t\tthis.doUpdate2(value, size, 3, 3, 0, 0);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.doUpdate2(value, size, 4, 4, 0, 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected doUpdate2(\n\t\tvalue: number,\n\t\tsize: number,\n\t\tleft: 0 | 1 | 2 | 3 | 4,\n\t\tright: 0 | 1 | 2 | 3 | 4,\n\t\tnleft1: number,\n\t\tnright1: number\n\t): void {\n\t\tconst buttonTop = this.buttonTop;\n\t\tif (buttonTop != null) {\n\t\t\tbuttonTop.state.isEnabled = 0 < value;\n\t\t}\n\t\tconst buttonPrevious = this.buttonPrevious;\n\t\tif (buttonPrevious != null) {\n\t\t\tbuttonPrevious.state.isEnabled = 0 < value;\n\t\t}\n\n\t\tconst buttonPages0 = this.buttonPages0;\n\t\tswitch (left) {\n\t\t\tcase 0:\n\t\t\t\tthis.hideDots(this.dots0);\n\t\t\t\tthis.allocButtonPages0(value);\n\t\t\t\tfor (let i = 0, imax = buttonPages0.length; i < imax; ++i) {\n\t\t\t\t\tif (i < value) {\n\t\t\t\t\t\tthis.showPage(buttonPages0[i], i);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.hidePage(buttonPages0[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tthis.showDots(this.dots0, 1, value - 2 - nleft1);\n\t\t\t\tthis.allocButtonPages0(2 + nleft1);\n\t\t\t\tthis.showPage(buttonPages0[0], 0);\n\t\t\t\tfor (let i = 1, imax = buttonPages0.length - nleft1 - 1; i < imax; ++i) {\n\t\t\t\t\tthis.hidePage(buttonPages0[i]);\n\t\t\t\t}\n\t\t\t\tfor (let i = 0, imax = 1 + nleft1; i < imax; ++i) {\n\t\t\t\t\tthis.showPage(\n\t\t\t\t\t\tbuttonPages0[buttonPages0.length - imax + i],\n\t\t\t\t\t\tvalue - 1 - (imax - 1) + i\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tthis.showDots(this.dots0, 0, value - 2);\n\t\t\t\tfor (let i = 0, imax = buttonPages0.length - 1; i < imax; ++i) {\n\t\t\t\t\tthis.hidePage(buttonPages0[i]);\n\t\t\t\t}\n\t\t\t\tthis.showPage(buttonPages0[buttonPages0.length - 1], value - 1);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tthis.showDots(this.dots0, 0, value - 1);\n\t\t\t\tfor (let i = 0, imax = buttonPages0.length; i < imax; ++i) {\n\t\t\t\t\tthis.hidePage(buttonPages0[i]);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tthis.hideDots(this.dots0);\n\t\t\t\tfor (let i = 0, imax = buttonPages0.length; i < imax; ++i) {\n\t\t\t\t\tthis.hidePage(buttonPages0[i]);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\n\t\tthis.showPage(this.page, value);\n\n\t\tconst buttonPages1 = this.buttonPages1;\n\t\tswitch (right) {\n\t\t\tcase 0:\n\t\t\t\tthis.allocButtonPages1(size - (value + 1));\n\t\t\t\tfor (let i = 0, imax = buttonPages1.length; i < imax; ++i) {\n\t\t\t\t\tconst j = value + 1 + i;\n\t\t\t\t\tif (j < size) {\n\t\t\t\t\t\tthis.showPage(buttonPages1[i], j);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.hidePage(buttonPages1[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.hideDots(this.dots1);\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tthis.allocButtonPages1(2 + nright1);\n\t\t\t\tfor (let i = 0, imax = 1 + nright1; i < imax; ++i) {\n\t\t\t\t\tthis.showPage(buttonPages1[i], value + 1 + i);\n\t\t\t\t}\n\t\t\t\tfor (let i = 1 + nright1, imax = buttonPages1.length - 1; i < imax; ++i) {\n\t\t\t\t\tthis.hidePage(buttonPages1[i]);\n\t\t\t\t}\n\t\t\t\tthis.showPage(buttonPages1[buttonPages1.length - 1], size - 1);\n\t\t\t\tthis.showDots(this.dots1, value + 2 + nright1, size - 2);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tthis.showPage(buttonPages1[0], value + 1);\n\t\t\t\tfor (let i = 1, imax = buttonPages1.length; i < imax; ++i) {\n\t\t\t\t\tthis.hidePage(buttonPages1[i]);\n\t\t\t\t}\n\t\t\t\tthis.showDots(this.dots1, value + 2, size - 1);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tfor (let i = 0, imax = buttonPages1.length; i < imax; ++i) {\n\t\t\t\t\tthis.hidePage(buttonPages1[i]);\n\t\t\t\t}\n\t\t\t\tthis.showDots(this.dots1, value + 1, size - 1);\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tfor (let i = 0, imax = buttonPages1.length; i < imax; ++i) {\n\t\t\t\t\tthis.hidePage(buttonPages1[i]);\n\t\t\t\t}\n\t\t\t\tthis.hideDots(this.dots1);\n\t\t\t\tbreak;\n\t\t}\n\n\t\tconst buttonNext = this.buttonNext;\n\t\tif (buttonNext != null) {\n\t\t\tbuttonNext.state.isEnabled = value < size - 1;\n\t\t}\n\t\tconst buttonLast = this.buttonLast;\n\t\tif (buttonLast != null) {\n\t\t\tbuttonLast.state.isEnabled = value < size - 1;\n\t\t}\n\t}\n\n\tprotected showPage(button: DImageBase<number>, index: number): void {\n\t\tbutton.text = index + 1;\n\t\tbutton.show();\n\t}\n\n\tprotected hidePage(button: DImageBase<number>): void {\n\t\tbutton.hide();\n\t}\n\n\tprotected showDots(dots: DPaginationDots, from: number, to: number): void {\n\t\tdots.show();\n\t}\n\n\tprotected hideDots(dots: DPaginationDots): void {\n\t\tdots.hide();\n\t}\n\n\tprotected getType(): string {\n\t\treturn \"DPagination\";\n\t}\n}\n"]}
1
+ {"version":3,"file":"d-pagination.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-pagination.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAGH,OAAO,EACN,iBAAiB,EAGjB,M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n\nimport { DButton } from \"./d-button\";\nimport {\n\tDLayoutHorizontal,\n\tDLayoutHorizontalOptions,\n\tDThemeLayoutHorizontal\n} from \"./d-layout-horizontal\";\nimport { DPaginationDots } from \"./d-pagination-dots\";\nimport { DPaginationButtonLast, DPaginationButtonLastOptions } from \"./d-pagination-button-last\";\nimport { DPaginationButtonNext, DPaginationButtonNextOptions } from \"./d-pagination-button-next\";\nimport { DPaginationButtonPage, DPaginationButtonPageOptions } from \"./d-pagination-button-page\";\nimport {\n\tDPaginationButtonPrevious,\n\tDPaginationButtonPreviousOptions\n} from \"./d-pagination-button-previous\";\nimport { DPaginationButtonTop, DPaginationButtonTopOptions } from \"./d-pagination-button-top\";\nimport { isNumber } from \"./util/is-number\";\nimport { DPaginationPage, DPaginationPageOptions } from \"./d-pagination-page\";\nimport { DLayoutSpace, DLayoutSpaceOptions } from \"./d-layout-space\";\nimport { DImageBase } from \"./d-image-base\";\nimport { DApplications } from \"./d-applications\";\n\nexport interface DPaginationButtonOptions {\n\t/**\n\t * {@link DPagination} top button options.\n\t */\n\ttop?: DPaginationButtonTopOptions | boolean | null;\n\n\t/**\n\t * {@link DPagination} previous button options.\n\t */\n\tprevious?: DPaginationButtonPreviousOptions | boolean | null;\n\n\t/**\n\t * {@link DPagination} page button options.\n\t */\n\tpage?: DPaginationButtonPageOptions;\n\n\t/**\n\t * {@link DPagination} next button options.\n\t */\n\tnext?: DPaginationButtonNextOptions | boolean | null;\n\n\t/**\n\t * {@link DPagination} last button options.\n\t */\n\tlast?: DPaginationButtonLastOptions | boolean | null;\n\n\t/**\n\t * A space between page buttons and next / previous buttons.\n\t */\n\tspace?: DLayoutSpaceOptions | boolean | number | null;\n}\n\nexport interface DPaginationOptions<THEME extends DThemePagination>\n\textends DLayoutHorizontalOptions<THEME> {\n\t/**\n\t * An index number of a selected page.\n\t */\n\tvalue?: number;\n\n\t/**\n\t * An index number of a selected page.\n\t *\n\t * @deprecated in favor of {@link value}.\n\t */\n\tselected?: number;\n\n\t/**\n\t * A total number of pages.\n\t */\n\tsize?: number;\n\n\t/**\n\t * A total number of pages.\n\t *\n\t * @deprecated in favor of {@link size};\n\t */\n\ttotal?: number;\n\n\t/**\n\t * {@link DPagination} button options.\n\t */\n\tbutton?: DPaginationButtonOptions;\n\n\t/**\n\t * {@link DPagination} page options.\n\t */\n\tpage?: DPaginationPageOptions;\n}\n\nexport interface DThemePagination extends DThemeLayoutHorizontal {\n\tgetButtonSpace(): number;\n}\n\nexport class DPagination<\n\tTHEME extends DThemePagination = DThemePagination,\n\tOPTIONS extends DPaginationOptions<THEME> = DPaginationOptions<THEME>\n> extends DLayoutHorizontal<THEME, OPTIONS> {\n\tprotected _size: number;\n\tprotected _value: number;\n\n\tprotected _buttonTop?: DButton<string> | null;\n\tprotected _buttonPrevious?: DButton<string> | null;\n\tprotected _spaceLeft?: DLayoutSpace | null;\n\tprotected _dots0?: DPaginationDots;\n\tprotected _buttonPages0?: DButton<number>[];\n\tprotected _page?: DPaginationPage;\n\tprotected _buttonPages1?: DButton<number>[];\n\tprotected _dots1?: DPaginationDots;\n\tprotected _spaceRight?: DLayoutSpace | null;\n\tprotected _buttonNext?: DButton<string> | null;\n\tprotected _buttonLast?: DButton<string> | null;\n\n\tconstructor(options?: OPTIONS) {\n\t\tsuper(options);\n\n\t\tif (options != null) {\n\t\t\tthis._size = options.size ?? options.total ?? 10;\n\t\t\tthis._value = options.value ?? options.selected ?? 0;\n\t\t} else {\n\t\t\tthis._size = 10;\n\t\t\tthis._value = 0;\n\t\t}\n\n\t\tconst buttonTop = this.buttonTop;\n\t\tif (buttonTop != null) {\n\t\t\tthis.addChild(buttonTop);\n\t\t}\n\t\tconst buttonPrevious = this.buttonPrevious;\n\t\tif (buttonPrevious != null) {\n\t\t\tthis.addChild(buttonPrevious);\n\t\t}\n\t\tconst spaceLeft = this.spaceLeft;\n\t\tif (spaceLeft != null) {\n\t\t\tthis.addChild(spaceLeft);\n\t\t}\n\t\tconst buttonPages0 = this.buttonPages0;\n\t\tconst buttonPages0Length = buttonPages0.length;\n\t\tthis.addChild(buttonPages0[0]);\n\t\tthis.addChild(this.dots0);\n\t\tfor (let i = 1; i < buttonPages0Length; ++i) {\n\t\t\tthis.addChild(buttonPages0[i]);\n\t\t}\n\t\tthis.addChild(this.page);\n\t\tconst buttonPages1 = this.buttonPages1;\n\t\tconst buttonPages1Length = buttonPages1.length;\n\t\tfor (let i = 0, imax = buttonPages1Length - 1; i < imax; ++i) {\n\t\t\tthis.addChild(buttonPages1[i]);\n\t\t}\n\t\tthis.addChild(this.dots1);\n\t\tthis.addChild(buttonPages1[buttonPages1Length - 1]);\n\t\tconst spaceRight = this.spaceRight;\n\t\tif (spaceRight != null) {\n\t\t\tthis.addChild(spaceRight);\n\t\t}\n\t\tconst buttonNext = this.buttonNext;\n\t\tif (buttonNext != null) {\n\t\t\tthis.addChild(buttonNext);\n\t\t}\n\t\tconst buttonLast = this.buttonLast;\n\t\tif (buttonLast != null) {\n\t\t\tthis.addChild(buttonLast);\n\t\t}\n\t}\n\n\t/**\n\t * Sets a value that is an index of a current page.\n\t *\n\t * @param value a value that is an index of a page\n\t */\n\tset value(value: number) {\n\t\tif (0 <= value && value < this._size && this._value !== value) {\n\t\t\tthis._value = value;\n\t\t\tthis.toDirty();\n\t\t\tDApplications.update(this);\n\t\t}\n\t}\n\n\t/**\n\t * Returns a value that is an index of a current page.\n\t *\n\t * @returns a value that is an index of a selected page.\n\t */\n\tget value(): number {\n\t\treturn this._value;\n\t}\n\n\t/**\n\t * Selects a page.\n\t *\n\t * @param index an index of a page\n\t * @deprecated in favor of {@link value}.\n\t */\n\tset selected(index: number) {\n\t\tthis.value = index;\n\t}\n\n\t/**\n\t * Returns an index of the selected page.\n\t *\n\t * @returns an index of the selected page.\n\t * @deprecated in favor of {@link value}.\n\t */\n\tget selected(): number {\n\t\treturn this.value;\n\t}\n\n\t/**\n\t * Sets a number of total pages.\n\t *\n\t * @param size a number of pages\n\t */\n\tset size(size: number) {\n\t\tif (0 <= size && this._size !== size) {\n\t\t\tthis._size = size;\n\t\t\tif (size === 0) {\n\t\t\t\tthis._value = -1;\n\t\t\t} else {\n\t\t\t\tthis._value = Math.max(0, Math.min(this._size - 1, this._value));\n\t\t\t}\n\t\t\tthis.toDirty();\n\t\t\tDApplications.update(this);\n\t\t}\n\t}\n\n\t/**\n\t * Returns a number of total pages.\n\t *\n\t * @returns a number of total pages.\n\t */\n\tget size(): number {\n\t\treturn this._size;\n\t}\n\n\t/**\n\t * Sets a number of total pages.\n\t *\n\t * @param total a number of pages\n\t * @deprecated in favor of {@link size}\n\t */\n\tset total(total: number) {\n\t\tthis.size = total;\n\t}\n\n\t/**\n\t * Returns a number of total pages.\n\t *\n\t * @returns a number of total pages.\n\t * @deprecated in favor of {@link size}\n\t */\n\tget total(): number {\n\t\treturn this.size;\n\t}\n\n\tprotected get dots0(): DPaginationDots {\n\t\tlet result = this._dots0;\n\t\tif (result == null) {\n\t\t\tresult = this.newDots();\n\t\t\tthis._dots0 = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected get dots1(): DPaginationDots {\n\t\tlet result = this._dots1;\n\t\tif (result == null) {\n\t\t\tresult = this.newDots();\n\t\t\tthis._dots1 = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected newDots(): DPaginationDots {\n\t\treturn new DPaginationDots();\n\t}\n\n\tprotected get buttonLast(): DButton<string> | null {\n\t\tlet result = this._buttonLast;\n\t\tif (result === undefined) {\n\t\t\tresult = this.newButtonLast();\n\t\t\tthis._buttonLast = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected newButtonLast(): DButton<string> | null {\n\t\tconst last = this._options?.button?.last;\n\t\tif (last !== null && last !== false && last !== undefined) {\n\t\t\tconst result = new DPaginationButtonLast(last !== true ? last : undefined);\n\t\t\tresult.on(\"active\", () => {\n\t\t\t\tthis.onButtonLastActive();\n\t\t\t});\n\t\t\treturn result;\n\t\t}\n\t\treturn null;\n\t}\n\n\tprotected onButtonLastActive(): void {\n\t\tthis.moveTo(this._size - 1);\n\t}\n\n\tprotected moveTo(index: number): void {\n\t\tif (0 <= index && index < this._size && this._value !== index) {\n\t\t\tconst oldIndex = this._value;\n\t\t\tthis._value = index;\n\t\t\tthis.emit(\"change\", index, oldIndex, this);\n\t\t\tthis.toDirty();\n\t\t\tDApplications.update(this);\n\t\t}\n\t}\n\n\tprotected get buttonNext(): DButton<string> | null {\n\t\tlet result = this._buttonNext;\n\t\tif (result === undefined) {\n\t\t\tresult = this.newButtonNext();\n\t\t\tthis._buttonNext = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected newButtonNext(): DButton<string> | null {\n\t\tconst next = this._options?.button?.next;\n\t\tif (next !== null && next !== false) {\n\t\t\tconst result = new DPaginationButtonNext(next !== true ? next : undefined);\n\t\t\tresult.on(\"active\", (): void => {\n\t\t\t\tthis.onButtonNextActive();\n\t\t\t});\n\t\t\treturn result;\n\t\t}\n\t\treturn null;\n\t}\n\n\tprotected onButtonNextActive(): void {\n\t\tthis.moveTo(this._value + 1);\n\t}\n\n\tprotected get buttonPrevious(): DButton<string> | null {\n\t\tlet result = this._buttonPrevious;\n\t\tif (result === undefined) {\n\t\t\tresult = this.newButtonPrevious();\n\t\t\tthis._buttonPrevious = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected newButtonPrevious(): DButton<string> | null {\n\t\tconst previous = this._options?.button?.previous;\n\t\tif (previous !== null && previous !== false) {\n\t\t\tconst result = new DPaginationButtonPrevious(previous !== true ? previous : undefined);\n\t\t\tresult.on(\"active\", (): void => {\n\t\t\t\tthis.onButtonPreviousActive();\n\t\t\t});\n\t\t\treturn result;\n\t\t}\n\t\treturn null;\n\t}\n\n\tprotected onButtonPreviousActive(): void {\n\t\tthis.moveTo(this._value - 1);\n\t}\n\n\tprotected get buttonTop(): DButton<string> | null {\n\t\tlet result = this._buttonTop;\n\t\tif (result === undefined) {\n\t\t\tresult = this.newButtonTop();\n\t\t\tthis._buttonTop = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected newButtonTop(): DButton<string> | null {\n\t\tconst top = this._options?.button?.top;\n\t\tif (top !== null && top !== false && top !== undefined) {\n\t\t\tconst result = new DPaginationButtonTop(top !== true ? top : undefined);\n\t\t\tresult.on(\"active\", (): void => {\n\t\t\t\tthis.onButtonTopActive();\n\t\t\t});\n\t\t\treturn result;\n\t\t}\n\t\treturn null;\n\t}\n\n\tprotected onButtonTopActive(): void {\n\t\tthis.moveTo(0);\n\t}\n\n\tprotected newButtonPage(): DButton<number> {\n\t\tconst result = new DPaginationButtonPage(this._options?.button?.page);\n\t\tresult.on(\"active\", (): void => {\n\t\t\tthis.onButtonPageActive(result);\n\t\t});\n\t\treturn result;\n\t}\n\n\tprotected get buttonPages0(): DButton<number>[] {\n\t\tlet result = this._buttonPages0;\n\t\tif (result == null) {\n\t\t\tresult = this.newButtonPages0();\n\t\t\tthis._buttonPages0 = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected newButtonPages0(): DButton<number>[] {\n\t\treturn [\n\t\t\tthis.newButtonPage(),\n\t\t\tthis.newButtonPage(),\n\t\t\tthis.newButtonPage(),\n\t\t\tthis.newButtonPage()\n\t\t];\n\t}\n\n\tprotected allocButtonPages0(size: number): void {\n\t\tconst buttonPages0 = this.buttonPages0;\n\t\tconst buttonPages0Length = buttonPages0.length;\n\t\tconst index = this.getChildIndex(buttonPages0[buttonPages0Length - 1]) + 1;\n\t\tfor (let i = 0, imax = size - buttonPages0Length; i < imax; ++i) {\n\t\t\tconst buttonPage = this.newButtonPage();\n\t\t\tthis.addChildAt(buttonPage, index + i);\n\t\t\tbuttonPages0.push(buttonPage);\n\t\t}\n\t}\n\n\tprotected get buttonPages1(): DButton<number>[] {\n\t\tlet result = this._buttonPages1;\n\t\tif (result == null) {\n\t\t\tresult = this.newButtonPages1();\n\t\t\tthis._buttonPages1 = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected newButtonPages1(): DButton<number>[] {\n\t\treturn [\n\t\t\tthis.newButtonPage(),\n\t\t\tthis.newButtonPage(),\n\t\t\tthis.newButtonPage(),\n\t\t\tthis.newButtonPage()\n\t\t];\n\t}\n\n\tprotected allocButtonPages1(size: number): void {\n\t\tconst buttonPages1 = this.buttonPages1;\n\t\tconst buttonPages1Length = buttonPages1.length;\n\t\tconst index = this.getChildIndex(buttonPages1[0]);\n\t\tfor (let i = 0, imax = size - buttonPages1Length; i < imax; ++i) {\n\t\t\tconst buttonPage = this.newButtonPage();\n\t\t\tthis.addChildAt(buttonPage, index);\n\t\t\tbuttonPages1.unshift(buttonPage);\n\t\t}\n\t}\n\n\tprotected get page(): DPaginationPage {\n\t\tlet result = this._page;\n\t\tif (result == null) {\n\t\t\tresult = this.newPage();\n\t\t\tthis._page = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected newPage(): DPaginationPage {\n\t\treturn new DPaginationPage(this._options?.page);\n\t}\n\n\tprotected onButtonPageActive(button: DButton<number>): void {\n\t\tconst text = button.text.value;\n\t\tif (isNumber(text)) {\n\t\t\tthis.moveTo(text - 1);\n\t\t\tif (button.state.isFocused) {\n\t\t\t\tbutton.state.isHovered = false;\n\t\t\t\tthis.page.focus();\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected get spaceLeft(): DLayoutSpace | null {\n\t\tlet result = this._spaceLeft;\n\t\tif (result === undefined) {\n\t\t\tresult = this.newSpaceLeft();\n\t\t\tthis._spaceLeft = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected newSpaceLeft(): DLayoutSpace | null {\n\t\tif (this.buttonTop != null || this.buttonPrevious != null) {\n\t\t\treturn this.newSpace();\n\t\t}\n\t\treturn null;\n\t}\n\n\tprotected get spaceRight(): DLayoutSpace | null {\n\t\tlet result = this._spaceRight;\n\t\tif (result === undefined) {\n\t\t\tresult = this.newSpaceRight();\n\t\t\tthis._spaceRight = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected newSpaceRight(): DLayoutSpace | null {\n\t\tif (this.buttonLast != null || this.buttonNext != null) {\n\t\t\treturn this.newSpace();\n\t\t}\n\t\treturn null;\n\t}\n\n\tprotected newSpace(): DLayoutSpace | null {\n\t\tconst space = this._options?.button?.space;\n\t\tif (space !== null && space !== false) {\n\t\t\tif (space === true || space === undefined) {\n\t\t\t\treturn new DLayoutSpace({\n\t\t\t\t\tweight: 1\n\t\t\t\t});\n\t\t\t} else if (isNumber(space)) {\n\t\t\t\treturn new DLayoutSpace({\n\t\t\t\t\twidth: space\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treturn new DLayoutSpace(space);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\n\tprotected onReflow(): void {\n\t\tthis.update();\n\t\tsuper.onReflow();\n\t}\n\n\tprotected update(): void {\n\t\tconst size = this._size;\n\t\tconst value = this._value;\n\t\tif (size <= 0) {\n\t\t\tthis.doUpdate0(value, size);\n\t\t} else {\n\t\t\tif (this._auto.width.isOn) {\n\t\t\t\tthis.doUpdate2(value, size, 0, 0, 0, 0);\n\t\t\t} else {\n\t\t\t\tthis.doUpdate1(value, size);\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected doUpdate0(value: number, size: number): void {\n\t\tconst buttonTop = this.buttonTop;\n\t\tif (buttonTop != null) {\n\t\t\tbuttonTop.state.isEnabled = false;\n\t\t}\n\t\tconst buttonPrevious = this.buttonPrevious;\n\t\tif (buttonPrevious != null) {\n\t\t\tbuttonPrevious.state.isEnabled = false;\n\t\t}\n\n\t\tthis.hideDots(this.dots0);\n\n\t\tconst buttonPages0 = this.buttonPages0;\n\t\tfor (let i = 0, imax = buttonPages0.length; i < imax; ++i) {\n\t\t\tthis.hidePage(buttonPages0[i]);\n\t\t}\n\n\t\tthis.hidePage(this.page);\n\n\t\tconst buttonPages1 = this.buttonPages1;\n\t\tfor (let i = 0, imax = buttonPages1.length; i < imax; ++i) {\n\t\t\tthis.hidePage(buttonPages1[i]);\n\t\t}\n\n\t\tthis.hideDots(this.dots1);\n\n\t\tconst buttonNext = this.buttonNext;\n\t\tif (buttonNext != null) {\n\t\t\tbuttonNext.state.isEnabled = false;\n\t\t}\n\t\tconst buttonLast = this.buttonLast;\n\t\tif (buttonLast) {\n\t\t\tbuttonLast.state.isEnabled = false;\n\t\t}\n\t}\n\n\tprotected doUpdate1(value: number, size: number): void {\n\t\tlet required = 0;\n\t\tlet nrequired = 0;\n\n\t\tconst buttonTop = this.buttonTop;\n\t\tif (buttonTop != null) {\n\t\t\trequired += buttonTop.width;\n\t\t\tnrequired += 1;\n\t\t}\n\t\tconst buttonPrevious = this.buttonPrevious;\n\t\tif (buttonPrevious != null) {\n\t\t\trequired += buttonPrevious.width;\n\t\t\tnrequired += 1;\n\t\t}\n\n\t\tconst spaceLeft = this.spaceLeft;\n\t\tif (spaceLeft != null) {\n\t\t\tif (spaceLeft.weight < 0) {\n\t\t\t\trequired += spaceLeft.width;\n\t\t\t}\n\t\t\tnrequired += 1;\n\t\t}\n\n\t\tconst page = this.page;\n\t\trequired += page.width;\n\t\tnrequired += 1;\n\n\t\tconst spaceRight = this.spaceRight;\n\t\tif (spaceRight != null) {\n\t\t\tif (spaceRight.weight < 0) {\n\t\t\t\trequired += spaceRight.width;\n\t\t\t}\n\t\t\tnrequired += 1;\n\t\t}\n\n\t\tconst buttonNext = this.buttonNext;\n\t\tif (buttonNext != null) {\n\t\t\trequired += buttonNext.width;\n\t\t\tnrequired += 1;\n\t\t}\n\t\tconst buttonLast = this.buttonLast;\n\t\tif (buttonLast) {\n\t\t\trequired += buttonLast.width;\n\t\t\tnrequired += 1;\n\t\t}\n\n\t\tconst marginHorizontal = this._margin.horizontal;\n\t\tif (2 <= nrequired) {\n\t\t\trequired += (nrequired - 1) * marginHorizontal;\n\t\t}\n\n\t\tconst padding = this.padding;\n\t\tconst space = this.width - (padding.getLeft() + padding.getRight());\n\t\tif (space <= required) {\n\t\t\tthis.doUpdate2(value, size, 4, 4, 0, 0);\n\t\t} else {\n\t\t\tconst buttonPages0 = this.buttonPages0;\n\t\t\tconst buttonPage0Width = buttonPages0[0].width;\n\t\t\tconst nrequired0 = value;\n\t\t\tconst required0 = nrequired0 * (buttonPage0Width + marginHorizontal);\n\n\t\t\tconst buttonPages1 = this.buttonPages1;\n\t\t\tconst buttonPage1Width = buttonPages1[0].width;\n\t\t\tconst nrequired1 = size - (value + 1);\n\t\t\tconst required1 = nrequired1 * (buttonPage1Width + marginHorizontal);\n\n\t\t\tif (required + required0 + required1 <= space) {\n\t\t\t\tthis.doUpdate2(value, size, 0, 0, 0, 0);\n\t\t\t} else {\n\t\t\t\tconst dots1 = this.dots1;\n\t\t\t\tconst dots1Width = dots1.width;\n\t\t\t\tconst dots0 = this.dots0;\n\t\t\t\tconst dots0Width = dots0.width;\n\t\t\t\tconst m0 = marginHorizontal + buttonPage0Width;\n\t\t\t\tconst m1 = marginHorizontal + buttonPage1Width;\n\t\t\t\tconst required0n = dots0Width + m0;\n\t\t\t\tconst required1n = dots1Width + m1;\n\t\t\t\tconst required0m = required0n + m0;\n\t\t\t\tconst required1m = required1n + m1;\n\t\t\t\tif (required0 <= required1) {\n\t\t\t\t\tif (3 <= nrequired1 && required + required0 + required1m <= space) {\n\t\t\t\t\t\tconst l = space - (required + required0 + required1m);\n\t\t\t\t\t\tconst n1 = Math.floor(l / m1);\n\t\t\t\t\t\tthis.doUpdate2(value, size, 0, 1, 0, n1);\n\t\t\t\t\t} else if (\n\t\t\t\t\t\t3 <= nrequired0 &&\n\t\t\t\t\t\t3 <= nrequired1 &&\n\t\t\t\t\t\trequired + required0m + required1m <= space\n\t\t\t\t\t) {\n\t\t\t\t\t\tconst l = space - (required + required0m + required1m);\n\t\t\t\t\t\tconst n1 = Math.floor((l * 0.5) / m1);\n\t\t\t\t\t\tconst n0 = Math.floor((l - n1 * m1) / m0);\n\t\t\t\t\t\tthis.doUpdate2(value, size, 1, 1, n0, n1);\n\t\t\t\t\t} else if (2 <= nrequired1 && required + required0 + required1n <= space) {\n\t\t\t\t\t\tthis.doUpdate2(value, size, 0, 2, 0, 0);\n\t\t\t\t\t} else if (\n\t\t\t\t\t\t3 <= nrequired0 &&\n\t\t\t\t\t\t2 <= nrequired1 &&\n\t\t\t\t\t\trequired + required0m + required1n <= space\n\t\t\t\t\t) {\n\t\t\t\t\t\tconst l = space - (required + required0m + required1n);\n\t\t\t\t\t\tconst n0 = Math.floor(l / m0);\n\t\t\t\t\t\tthis.doUpdate2(value, size, 1, 2, n0, 0);\n\t\t\t\t\t} else if (\n\t\t\t\t\t\t2 <= nrequired0 &&\n\t\t\t\t\t\t2 <= nrequired1 &&\n\t\t\t\t\t\trequired + required0n + required1n <= space\n\t\t\t\t\t) {\n\t\t\t\t\t\tthis.doUpdate2(value, size, 2, 2, 0, 0);\n\t\t\t\t\t} else if (\n\t\t\t\t\t\t1 <= nrequired0 &&\n\t\t\t\t\t\t1 <= nrequired1 &&\n\t\t\t\t\t\trequired + dots0Width + dots1Width <= space\n\t\t\t\t\t) {\n\t\t\t\t\t\tthis.doUpdate2(value, size, 3, 3, 0, 0);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.doUpdate2(value, size, 4, 4, 0, 0);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (3 <= nrequired0 && required + required0m + required1 <= space) {\n\t\t\t\t\t\tconst l = space - (required + required0m + required1);\n\t\t\t\t\t\tconst n0 = Math.floor(l / m0);\n\t\t\t\t\t\tthis.doUpdate2(value, size, 1, 0, n0, 0);\n\t\t\t\t\t} else if (\n\t\t\t\t\t\t3 <= nrequired0 &&\n\t\t\t\t\t\t3 <= nrequired1 &&\n\t\t\t\t\t\trequired + required0m + required1m <= space\n\t\t\t\t\t) {\n\t\t\t\t\t\tconst l = space - (required + required0m + required1m);\n\t\t\t\t\t\tconst n0 = Math.floor((l * 0.5) / m0);\n\t\t\t\t\t\tconst n1 = Math.floor((l - n0 * m0) / m1);\n\t\t\t\t\t\tthis.doUpdate2(value, size, 1, 1, n0, n1);\n\t\t\t\t\t} else if (2 <= nrequired0 && required + required0n + required1 <= space) {\n\t\t\t\t\t\tthis.doUpdate2(value, size, 2, 0, 0, 0);\n\t\t\t\t\t} else if (\n\t\t\t\t\t\t2 <= nrequired0 &&\n\t\t\t\t\t\t3 <= nrequired1 &&\n\t\t\t\t\t\trequired + required0n + required1m <= space\n\t\t\t\t\t) {\n\t\t\t\t\t\tconst l = space - (required + required0n + required1m);\n\t\t\t\t\t\tconst n1 = Math.floor(l / m1);\n\t\t\t\t\t\tthis.doUpdate2(value, size, 2, 1, 0, n1);\n\t\t\t\t\t} else if (\n\t\t\t\t\t\t2 <= nrequired0 &&\n\t\t\t\t\t\t2 <= nrequired1 &&\n\t\t\t\t\t\trequired + required0n + required1n <= space\n\t\t\t\t\t) {\n\t\t\t\t\t\tthis.doUpdate2(value, size, 2, 2, 0, 0);\n\t\t\t\t\t} else if (\n\t\t\t\t\t\t1 <= nrequired0 &&\n\t\t\t\t\t\t1 <= nrequired1 &&\n\t\t\t\t\t\trequired + dots0Width + dots1Width <= space\n\t\t\t\t\t) {\n\t\t\t\t\t\tthis.doUpdate2(value, size, 3, 3, 0, 0);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.doUpdate2(value, size, 4, 4, 0, 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected doUpdate2(\n\t\tvalue: number,\n\t\tsize: number,\n\t\tleft: 0 | 1 | 2 | 3 | 4,\n\t\tright: 0 | 1 | 2 | 3 | 4,\n\t\tnleft1: number,\n\t\tnright1: number\n\t): void {\n\t\tconst buttonTop = this.buttonTop;\n\t\tif (buttonTop != null) {\n\t\t\tbuttonTop.state.isEnabled = 0 < value;\n\t\t}\n\t\tconst buttonPrevious = this.buttonPrevious;\n\t\tif (buttonPrevious != null) {\n\t\t\tbuttonPrevious.state.isEnabled = 0 < value;\n\t\t}\n\n\t\tconst buttonPages0 = this.buttonPages0;\n\t\tswitch (left) {\n\t\t\tcase 0:\n\t\t\t\tthis.hideDots(this.dots0);\n\t\t\t\tthis.allocButtonPages0(value);\n\t\t\t\tfor (let i = 0, imax = buttonPages0.length; i < imax; ++i) {\n\t\t\t\t\tif (i < value) {\n\t\t\t\t\t\tthis.showPage(buttonPages0[i], i);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.hidePage(buttonPages0[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tthis.showDots(this.dots0, 1, value - 2 - nleft1);\n\t\t\t\tthis.allocButtonPages0(2 + nleft1);\n\t\t\t\tthis.showPage(buttonPages0[0], 0);\n\t\t\t\tfor (let i = 1, imax = buttonPages0.length - nleft1 - 1; i < imax; ++i) {\n\t\t\t\t\tthis.hidePage(buttonPages0[i]);\n\t\t\t\t}\n\t\t\t\tfor (let i = 0, imax = 1 + nleft1; i < imax; ++i) {\n\t\t\t\t\tthis.showPage(\n\t\t\t\t\t\tbuttonPages0[buttonPages0.length - imax + i],\n\t\t\t\t\t\tvalue - 1 - (imax - 1) + i\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tthis.showDots(this.dots0, 0, value - 2);\n\t\t\t\tfor (let i = 0, imax = buttonPages0.length - 1; i < imax; ++i) {\n\t\t\t\t\tthis.hidePage(buttonPages0[i]);\n\t\t\t\t}\n\t\t\t\tthis.showPage(buttonPages0[buttonPages0.length - 1], value - 1);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tthis.showDots(this.dots0, 0, value - 1);\n\t\t\t\tfor (let i = 0, imax = buttonPages0.length; i < imax; ++i) {\n\t\t\t\t\tthis.hidePage(buttonPages0[i]);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tthis.hideDots(this.dots0);\n\t\t\t\tfor (let i = 0, imax = buttonPages0.length; i < imax; ++i) {\n\t\t\t\t\tthis.hidePage(buttonPages0[i]);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\n\t\tthis.showPage(this.page, value);\n\n\t\tconst buttonPages1 = this.buttonPages1;\n\t\tswitch (right) {\n\t\t\tcase 0:\n\t\t\t\tthis.allocButtonPages1(size - (value + 1));\n\t\t\t\tfor (let i = 0, imax = buttonPages1.length; i < imax; ++i) {\n\t\t\t\t\tconst j = value + 1 + i;\n\t\t\t\t\tif (j < size) {\n\t\t\t\t\t\tthis.showPage(buttonPages1[i], j);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.hidePage(buttonPages1[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.hideDots(this.dots1);\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tthis.allocButtonPages1(2 + nright1);\n\t\t\t\tfor (let i = 0, imax = 1 + nright1; i < imax; ++i) {\n\t\t\t\t\tthis.showPage(buttonPages1[i], value + 1 + i);\n\t\t\t\t}\n\t\t\t\tfor (let i = 1 + nright1, imax = buttonPages1.length - 1; i < imax; ++i) {\n\t\t\t\t\tthis.hidePage(buttonPages1[i]);\n\t\t\t\t}\n\t\t\t\tthis.showPage(buttonPages1[buttonPages1.length - 1], size - 1);\n\t\t\t\tthis.showDots(this.dots1, value + 2 + nright1, size - 2);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tthis.showPage(buttonPages1[0], value + 1);\n\t\t\t\tfor (let i = 1, imax = buttonPages1.length; i < imax; ++i) {\n\t\t\t\t\tthis.hidePage(buttonPages1[i]);\n\t\t\t\t}\n\t\t\t\tthis.showDots(this.dots1, value + 2, size - 1);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tfor (let i = 0, imax = buttonPages1.length; i < imax; ++i) {\n\t\t\t\t\tthis.hidePage(buttonPages1[i]);\n\t\t\t\t}\n\t\t\t\tthis.showDots(this.dots1, value + 1, size - 1);\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tfor (let i = 0, imax = buttonPages1.length; i < imax; ++i) {\n\t\t\t\t\tthis.hidePage(buttonPages1[i]);\n\t\t\t\t}\n\t\t\t\tthis.hideDots(this.dots1);\n\t\t\t\tbreak;\n\t\t}\n\n\t\tconst buttonNext = this.buttonNext;\n\t\tif (buttonNext != null) {\n\t\t\tbuttonNext.state.isEnabled = value < size - 1;\n\t\t}\n\t\tconst buttonLast = this.buttonLast;\n\t\tif (buttonLast != null) {\n\t\t\tbuttonLast.state.isEnabled = value < size - 1;\n\t\t}\n\t}\n\n\tprotected showPage(button: DImageBase<number>, index: number): void {\n\t\tbutton.text = index + 1;\n\t\tbutton.show();\n\t}\n\n\tprotected hidePage(button: DImageBase<number>): void {\n\t\tbutton.hide();\n\t}\n\n\tprotected showDots(dots: DPaginationDots, from: number, to: number): void {\n\t\tdots.show();\n\t}\n\n\tprotected hideDots(dots: DPaginationDots): void {\n\t\tdots.hide();\n\t}\n\n\tprotected getType(): string {\n\t\treturn \"DPagination\";\n\t}\n}\n"]}
@@ -174,7 +174,7 @@ var DTextPieceImpl = /** @class */ (function (_super) {
174
174
  DTextPieceImpl.prototype.updateObject = function () {
175
175
  var computed = this._computed;
176
176
  if (computed !== undefined) {
177
- var formatted = this._formatter(computed, this);
177
+ var formatted = this._formatter(computed, this._parent);
178
178
  var object = this._object;
179
179
  if (object == null) {
180
180
  if (0 < formatted.length) {
@@ -1 +1 @@
1
- {"version":3,"file":"d-text-piece-impl.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-text-piece-impl.ts"],"names":[],"mappings":";AAAA,OAAO,EAA2B,KAAK,EAAE,MAAM,SAAS,CAAC;AAEzD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAUjD,OAAO,EAAE,mBAAmB,EAAE,M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AO,CAAC;YAC5B,IAAI,MAAM,IAAI,IAAI,EAAE;gBACnB,OAAO,MAAM,CAAC,OAAO,CAAC;aACtB;YACD,OAAO,IAAI,CAAC,UAAU,CAAC;QACxB,CAAC;aAED,UAAY,OAAgB;YAC3B,IAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC;YAC5B,IAAI,MAAM,IAAI,IAAI,EAAE;gBACnB,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC;aACzB;YACD,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC;QAC3B,CAAC;;;OARA;IAUD,6BAAI,GAAJ;QACC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,OAAO,IAAI,CAAC;IACb,CAAC;IAED,6BAAI,GAAJ;QACC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACrB,OAAO,IAAI,CAAC;IACb,CAAC;IAED,gCAAO,GAAP;QACC,OAAO,IAAI,CAAC,OAAO,CAAC;IACrB,CAAC;IAES,yCAAgB,GAA1B;QACC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IAC3B,CAAC;IAED,gCAAO,GAAP;QACC,IAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC;QAC5B,IAAI,MAAM,EAAE;YACX,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC;YACzB,MAAM,CAAC,OAAO,EAAE,CAAC;SACjB;QAED,OAAO,IAAI,CAAC;IACb,CAAC;IACF,qBAAC;AAAD,CAAC,AApSD,CAA2C,KAAK,CAAC,YAAY,GAoS5D","sourcesContent":["import { DisplayObject, Graphics, utils } from \"pixi.js\";\nimport { DBaseStateSet } from \"./d-base-state-set\";\nimport { DDynamicText } from \"./d-dynamic-text\";\nimport { DDynamicTextStyle } from \"./d-dynamic-text-style\";\nimport { DStateAwareOrValueMightBe } from \"./d-state-aware\";\nimport { isFunction } from \"./util/is-function\";\nimport { DApplications } from \"./d-applications\";\nimport { DImagePieceLayouter } from \"./d-image-piece-layouter\";\nimport {\n\tDTextPiece,\n\tDTextPieceFormatter,\n\tDTextPieceOptions,\n\tDThemeTextPiece\n} from \"./d-text-piece\";\nimport { DApplicationTarget } from \"./d-application-like\";\nimport { DTextPieceAlign } from \"./d-text-piece-align\";\nimport { DTextPieceAlignImpl } from \"./d-text-piece-align-impl\";\nimport { DTextPieceStyle } from \"./d-text-piece-style\";\nimport { DTextPieceStyleImpl } from \"./d-text-piece-style-impl\";\n\nexport interface DTextPieceImplParent extends DApplicationTarget {\n\treadonly state: DBaseStateSet;\n\taddChild(displayObject: DisplayObject): void;\n\tremoveChild(displayObject: DisplayObject): void;\n\ttoDirty(): void;\n\tgetOverflowMask(): Graphics | null;\n}\n\nexport class DTextPieceImpl<VALUE> extends utils.EventEmitter implements DTextPiece<VALUE> {\n\tprotected _parent: DTextPieceImplParent;\n\tprotected _theme: DThemeTextPiece<VALUE>;\n\tprotected _object?: DDynamicText | null;\n\tprotected _value?: DStateAwareOrValueMightBe<VALUE>;\n\tprotected _computed?: VALUE;\n\tprotected _color: DStateAwareOrValueMightBe<number>;\n\tprotected _alpha: DStateAwareOrValueMightBe<number>;\n\tprotected _style: DTextPieceStyleImpl;\n\tprotected _dstyle: DDynamicTextStyle;\n\tprotected _align: DTextPieceAlign;\n\tprotected _formatter: DTextPieceFormatter<VALUE>;\n\tprotected _isVisible: boolean;\n\n\tconstructor(\n\t\tparent: DTextPieceImplParent,\n\t\ttheme: DThemeTextPiece<VALUE>,\n\t\toptions?: DTextPieceOptions<VALUE> | undefined\n\t) {\n\t\tsuper();\n\t\tthis._parent = parent;\n\t\tthis._theme = theme;\n\t\tthis._value = options?.value ?? theme.newTextValue();\n\t\tthis._computed = this.newComputed();\n\t\tthis._color = options?.color;\n\t\tthis._alpha = options?.alpha;\n\t\tconst dstyle = new DDynamicTextStyle(parent, theme, options?.style);\n\t\tthis._dstyle = dstyle;\n\t\tthis._style = new DTextPieceStyleImpl(parent, dstyle);\n\t\tthis._align = new DTextPieceAlignImpl(parent, theme, options?.align);\n\t\tthis._formatter = options?.formatter ?? theme.getTextFormatter();\n\t\tthis._isVisible = true;\n\t\tthis.onComputedChange();\n\t\tif (this.updateObject()) {\n\t\t\tparent.toDirty();\n\t\t\tDApplications.update(parent);\n\t\t}\n\t}\n\n\tget value(): DStateAwareOrValueMightBe<VALUE> {\n\t\treturn this._value;\n\t}\n\n\tset value(value: DStateAwareOrValueMightBe<VALUE>) {\n\t\tif (this._value !== value) {\n\t\t\tthis._value = value;\n\t\t\tthis.onValueChange();\n\t\t}\n\t}\n\n\tgetValue(): DStateAwareOrValueMightBe<VALUE> {\n\t\treturn this._value;\n\t}\n\n\tsetValue(value: DStateAwareOrValueMightBe<VALUE>, forcibly?: boolean): void {\n\t\tif (forcibly || this._value !== value) {\n\t\t\tthis._value = value;\n\t\t\tthis.onValueChange(forcibly);\n\t\t}\n\t}\n\n\tprotected onValueChange(forcibly?: boolean): void {\n\t\tconst newComputed = this.newComputed();\n\t\tif (forcibly || this._computed !== newComputed) {\n\t\t\tthis._computed = newComputed;\n\t\t\tthis.onComputedChange();\n\t\t\tif (this.updateObject()) {\n\t\t\t\tconst parent = this._parent;\n\t\t\t\tparent.toDirty();\n\t\t\t\tDApplications.update(parent);\n\t\t\t}\n\t\t}\n\t}\n\n\tcompute(forcibly?: boolean): void {\n\t\tthis.onValueChange(forcibly);\n\t}\n\n\tget computed(): VALUE | undefined {\n\t\treturn this._computed;\n\t}\n\n\tget formatter(): DTextPieceFormatter<VALUE> {\n\t\treturn this._formatter;\n\t}\n\n\tset formatter(formatter: DTextPieceFormatter<VALUE>) {\n\t\tif (this._formatter !== formatter) {\n\t\t\tthis._formatter = formatter;\n\t\t\tthis.onValueChange(true);\n\t\t}\n\t}\n\n\tget color(): DStateAwareOrValueMightBe<number> {\n\t\treturn this._color;\n\t}\n\n\tset color(color: DStateAwareOrValueMightBe<number>) {\n\t\tif (this._color !== color) {\n\t\t\tthis._color = color;\n\t\t\tthis.onColorChange();\n\t\t}\n\t}\n\n\tget alpha(): DStateAwareOrValueMightBe<number> {\n\t\treturn this._alpha;\n\t}\n\n\tset alpha(alpha: DStateAwareOrValueMightBe<number>) {\n\t\tif (this._alpha !== alpha) {\n\t\t\tthis._alpha = alpha;\n\t\t\tthis.onColorChange();\n\t\t}\n\t}\n\n\tprotected onColorChange(): void {\n\t\tconst object = this._object;\n\t\tif (object != null) {\n\t\t\tconst parent = this._parent;\n\t\t\tconst state = parent.state;\n\t\t\tconst color = this.newColor(state);\n\t\t\tconst alpha = this.newAlpha(state);\n\t\t\tconst style = object.style;\n\t\t\tif (style.fill !== color || object.alpha !== alpha) {\n\t\t\t\tstyle.fill = color;\n\t\t\t\tobject.alpha = alpha;\n\t\t\t\tDApplications.update(parent);\n\t\t\t}\n\t\t}\n\t}\n\n\tget align(): DTextPieceAlign {\n\t\treturn this._align;\n\t}\n\n\tget style(): DTextPieceStyle {\n\t\treturn this._style;\n\t}\n\n\tget object(): DDynamicText | null | undefined {\n\t\treturn this._object;\n\t}\n\n\tupdate(layouter: DImagePieceLayouter): void {\n\t\t// Compute a value\n\t\tconst newComputed = this.newComputed();\n\t\tif (this._computed !== newComputed) {\n\t\t\tthis._computed = newComputed;\n\t\t\tthis.onComputedChange();\n\t\t\tthis.updateObject();\n\t\t}\n\n\t\tconst object = this._object;\n\t\tif (object != null) {\n\t\t\t// Update the color\n\t\t\tconst state = this._parent.state;\n\t\t\tobject.style.fill = this.newColor(state);\n\t\t\tobject.alpha = this.newAlpha(state);\n\n\t\t\t// Layout\n\t\t\tlayouter.set(object);\n\t\t} else {\n\t\t\t// Layout\n\t\t\tlayouter.set(null);\n\t\t}\n\t}\n\n\tprotected updateObject(): boolean {\n\t\tconst computed = this._computed;\n\t\tif (computed !== undefined) {\n\t\t\tconst formatted = this._formatter(computed, this);\n\t\t\tconst object = this._object;\n\t\t\tif (object == null) {\n\t\t\t\tif (0 < formatted.length) {\n\t\t\t\t\tconst newObject = this.newObject();\n\t\t\t\t\tnewObject.visible = this._isVisible;\n\t\t\t\t\tthis._object = newObject;\n\t\t\t\t\tconst parent = this._parent;\n\t\t\t\t\tparent.addChild(newObject);\n\t\t\t\t\tconst overflowMask = parent.getOverflowMask();\n\t\t\t\t\tif (overflowMask) {\n\t\t\t\t\t\tnewObject.mask = overflowMask;\n\t\t\t\t\t}\n\t\t\t\t\tnewObject.text = formatted;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t} else if (object.text !== formatted) {\n\t\t\t\tobject.text = formatted;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} else {\n\t\t\tconst object = this._object;\n\t\t\tif (object != null && object.text !== \"\") {\n\t\t\t\tobject.text = \"\";\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tprotected newComputed(): VALUE | undefined {\n\t\tconst value = this._value;\n\t\tif (value !== undefined) {\n\t\t\tif (isFunction(value)) {\n\t\t\t\tconst result = value(this._parent.state);\n\t\t\t\tif (result !== undefined) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn value;\n\t\t\t}\n\t\t}\n\t\treturn this._theme.getTextValue(this._parent.state);\n\t}\n\n\tprotected newColor(state: DBaseStateSet): number {\n\t\tconst color = this._color;\n\t\tif (color !== undefined) {\n\t\t\tif (isFunction(color)) {\n\t\t\t\tconst result = color(state);\n\t\t\t\tif (result !== undefined) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn color;\n\t\t\t}\n\t\t}\n\t\treturn this._theme.getColor(state);\n\t}\n\n\tprotected newAlpha(state: DBaseStateSet): number {\n\t\tconst alpha = this._alpha;\n\t\tif (alpha !== undefined) {\n\t\t\tif (isFunction(alpha)) {\n\t\t\t\tconst result = alpha(state);\n\t\t\t\tif (result !== undefined) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn alpha;\n\t\t\t}\n\t\t}\n\t\treturn this._theme.getAlpha(state);\n\t}\n\n\tprotected newObject(): DDynamicText {\n\t\treturn new DDynamicText(this._dstyle);\n\t}\n\n\tget visible(): boolean {\n\t\tconst object = this._object;\n\t\tif (object != null) {\n\t\t\treturn object.visible;\n\t\t}\n\t\treturn this._isVisible;\n\t}\n\n\tset visible(visible: boolean) {\n\t\tconst object = this._object;\n\t\tif (object != null) {\n\t\t\tobject.visible = visible;\n\t\t}\n\t\tthis._isVisible = visible;\n\t}\n\n\tshow(): this {\n\t\tthis.visible = true;\n\t\treturn this;\n\t}\n\n\thide(): this {\n\t\tthis.visible = false;\n\t\treturn this;\n\t}\n\n\tisShown(): boolean {\n\t\treturn this.visible;\n\t}\n\n\tprotected onComputedChange(): void {\n\t\tthis.emit(\"change\", this);\n\t}\n\n\tdestroy(): this {\n\t\tconst object = this._object;\n\t\tif (object) {\n\t\t\tthis._object = undefined;\n\t\t\tobject.destroy();\n\t\t}\n\n\t\treturn this;\n\t}\n}\n"]}
1
+ {"version":3,"file":"d-text-piece-impl.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-text-piece-impl.ts"],"names":[],"mappings":";AAAA,OAAO,EAA2B,KAAK,EAAE,MAAM,SAAS,CAAC;AAEzD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAUjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAUhE;IAA2C,kCAAkB;IAc5D,wBACC,MAA4B,EAC5B,KAA6B,EAC7B,OAA8C;;QAH/C,YAKC,iBAAO,SAkBP;QAjBA,KAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,KAAI,CAAC,MAAM,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,IAAI,EAAE;gBACnB,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC;aACzB;YACD,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC;QAC3B,CAAC;;;OARA;IAUD,6BAAI,GAAJ;QACC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,OAAO,IAAI,CAAC;IACb,CAAC;IAED,6BAAI,GAAJ;QACC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACrB,OAAO,IAAI,CAAC;IACb,CAAC;IAED,gCAAO,GAAP;QACC,OAAO,IAAI,CAAC,OAAO,CAAC;IACrB,CAAC;IAES,yCAAgB,GAA1B;QACC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IAC3B,CAAC;IAED,gCAAO,GAAP;QACC,IAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC;QAC5B,IAAI,MAAM,EAAE;YACX,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC;YACzB,MAAM,CAAC,OAAO,EAAE,CAAC;SACjB;QAED,OAAO,IAAI,CAAC;IACb,CAAC;IACF,qBAAC;AAAD,CAAC,AApSD,CAA2C,KAAK,CAAC,YAAY,GAoS5D","sourcesContent":["import { DisplayObject, Graphics, utils } from \"pixi.js\";\nimport { DBaseStateSet } from \"./d-base-state-set\";\nimport { DDynamicText } from \"./d-dynamic-text\";\nimport { DDynamicTextStyle } from \"./d-dynamic-text-style\";\nimport { DStateAwareOrValueMightBe } from \"./d-state-aware\";\nimport { isFunction } from \"./util/is-function\";\nimport { DApplications } from \"./d-applications\";\nimport { DImagePieceLayouter } from \"./d-image-piece-layouter\";\nimport {\n\tDTextPiece,\n\tDTextPieceFormatter,\n\tDTextPieceOptions,\n\tDThemeTextPiece\n} from \"./d-text-piece\";\nimport { DApplicationTarget } from \"./d-application-like\";\nimport { DTextPieceAlign } from \"./d-text-piece-align\";\nimport { DTextPieceAlignImpl } from \"./d-text-piece-align-impl\";\nimport { DTextPieceStyle } from \"./d-text-piece-style\";\nimport { DTextPieceStyleImpl } from \"./d-text-piece-style-impl\";\n\nexport interface DTextPieceImplParent extends DApplicationTarget {\n\treadonly state: DBaseStateSet;\n\taddChild(displayObject: DisplayObject): void;\n\tremoveChild(displayObject: DisplayObject): void;\n\ttoDirty(): void;\n\tgetOverflowMask(): Graphics | null;\n}\n\nexport class DTextPieceImpl<VALUE> extends utils.EventEmitter implements DTextPiece<VALUE> {\n\tprotected _parent: DTextPieceImplParent;\n\tprotected _theme: DThemeTextPiece<VALUE>;\n\tprotected _object?: DDynamicText | null;\n\tprotected _value?: DStateAwareOrValueMightBe<VALUE>;\n\tprotected _computed?: VALUE;\n\tprotected _color: DStateAwareOrValueMightBe<number>;\n\tprotected _alpha: DStateAwareOrValueMightBe<number>;\n\tprotected _style: DTextPieceStyleImpl;\n\tprotected _dstyle: DDynamicTextStyle;\n\tprotected _align: DTextPieceAlign;\n\tprotected _formatter: DTextPieceFormatter<VALUE>;\n\tprotected _isVisible: boolean;\n\n\tconstructor(\n\t\tparent: DTextPieceImplParent,\n\t\ttheme: DThemeTextPiece<VALUE>,\n\t\toptions?: DTextPieceOptions<VALUE> | undefined\n\t) {\n\t\tsuper();\n\t\tthis._parent = parent;\n\t\tthis._theme = theme;\n\t\tthis._value = options?.value ?? theme.newTextValue();\n\t\tthis._computed = this.newComputed();\n\t\tthis._color = options?.color;\n\t\tthis._alpha = options?.alpha;\n\t\tconst dstyle = new DDynamicTextStyle(parent, theme, options?.style);\n\t\tthis._dstyle = dstyle;\n\t\tthis._style = new DTextPieceStyleImpl(parent, dstyle);\n\t\tthis._align = new DTextPieceAlignImpl(parent, theme, options?.align);\n\t\tthis._formatter = options?.formatter ?? theme.getTextFormatter();\n\t\tthis._isVisible = true;\n\t\tthis.onComputedChange();\n\t\tif (this.updateObject()) {\n\t\t\tparent.toDirty();\n\t\t\tDApplications.update(parent);\n\t\t}\n\t}\n\n\tget value(): DStateAwareOrValueMightBe<VALUE> {\n\t\treturn this._value;\n\t}\n\n\tset value(value: DStateAwareOrValueMightBe<VALUE>) {\n\t\tif (this._value !== value) {\n\t\t\tthis._value = value;\n\t\t\tthis.onValueChange();\n\t\t}\n\t}\n\n\tgetValue(): DStateAwareOrValueMightBe<VALUE> {\n\t\treturn this._value;\n\t}\n\n\tsetValue(value: DStateAwareOrValueMightBe<VALUE>, forcibly?: boolean): void {\n\t\tif (forcibly || this._value !== value) {\n\t\t\tthis._value = value;\n\t\t\tthis.onValueChange(forcibly);\n\t\t}\n\t}\n\n\tprotected onValueChange(forcibly?: boolean): void {\n\t\tconst newComputed = this.newComputed();\n\t\tif (forcibly || this._computed !== newComputed) {\n\t\t\tthis._computed = newComputed;\n\t\t\tthis.onComputedChange();\n\t\t\tif (this.updateObject()) {\n\t\t\t\tconst parent = this._parent;\n\t\t\t\tparent.toDirty();\n\t\t\t\tDApplications.update(parent);\n\t\t\t}\n\t\t}\n\t}\n\n\tcompute(forcibly?: boolean): void {\n\t\tthis.onValueChange(forcibly);\n\t}\n\n\tget computed(): VALUE | undefined {\n\t\treturn this._computed;\n\t}\n\n\tget formatter(): DTextPieceFormatter<VALUE> {\n\t\treturn this._formatter;\n\t}\n\n\tset formatter(formatter: DTextPieceFormatter<VALUE>) {\n\t\tif (this._formatter !== formatter) {\n\t\t\tthis._formatter = formatter;\n\t\t\tthis.onValueChange(true);\n\t\t}\n\t}\n\n\tget color(): DStateAwareOrValueMightBe<number> {\n\t\treturn this._color;\n\t}\n\n\tset color(color: DStateAwareOrValueMightBe<number>) {\n\t\tif (this._color !== color) {\n\t\t\tthis._color = color;\n\t\t\tthis.onColorChange();\n\t\t}\n\t}\n\n\tget alpha(): DStateAwareOrValueMightBe<number> {\n\t\treturn this._alpha;\n\t}\n\n\tset alpha(alpha: DStateAwareOrValueMightBe<number>) {\n\t\tif (this._alpha !== alpha) {\n\t\t\tthis._alpha = alpha;\n\t\t\tthis.onColorChange();\n\t\t}\n\t}\n\n\tprotected onColorChange(): void {\n\t\tconst object = this._object;\n\t\tif (object != null) {\n\t\t\tconst parent = this._parent;\n\t\t\tconst state = parent.state;\n\t\t\tconst color = this.newColor(state);\n\t\t\tconst alpha = this.newAlpha(state);\n\t\t\tconst style = object.style;\n\t\t\tif (style.fill !== color || object.alpha !== alpha) {\n\t\t\t\tstyle.fill = color;\n\t\t\t\tobject.alpha = alpha;\n\t\t\t\tDApplications.update(parent);\n\t\t\t}\n\t\t}\n\t}\n\n\tget align(): DTextPieceAlign {\n\t\treturn this._align;\n\t}\n\n\tget style(): DTextPieceStyle {\n\t\treturn this._style;\n\t}\n\n\tget object(): DDynamicText | null | undefined {\n\t\treturn this._object;\n\t}\n\n\tupdate(layouter: DImagePieceLayouter): void {\n\t\t// Compute a value\n\t\tconst newComputed = this.newComputed();\n\t\tif (this._computed !== newComputed) {\n\t\t\tthis._computed = newComputed;\n\t\t\tthis.onComputedChange();\n\t\t\tthis.updateObject();\n\t\t}\n\n\t\tconst object = this._object;\n\t\tif (object != null) {\n\t\t\t// Update the color\n\t\t\tconst state = this._parent.state;\n\t\t\tobject.style.fill = this.newColor(state);\n\t\t\tobject.alpha = this.newAlpha(state);\n\n\t\t\t// Layout\n\t\t\tlayouter.set(object);\n\t\t} else {\n\t\t\t// Layout\n\t\t\tlayouter.set(null);\n\t\t}\n\t}\n\n\tprotected updateObject(): boolean {\n\t\tconst computed = this._computed;\n\t\tif (computed !== undefined) {\n\t\t\tconst formatted = this._formatter(computed, this._parent);\n\t\t\tconst object = this._object;\n\t\t\tif (object == null) {\n\t\t\t\tif (0 < formatted.length) {\n\t\t\t\t\tconst newObject = this.newObject();\n\t\t\t\t\tnewObject.visible = this._isVisible;\n\t\t\t\t\tthis._object = newObject;\n\t\t\t\t\tconst parent = this._parent;\n\t\t\t\t\tparent.addChild(newObject);\n\t\t\t\t\tconst overflowMask = parent.getOverflowMask();\n\t\t\t\t\tif (overflowMask) {\n\t\t\t\t\t\tnewObject.mask = overflowMask;\n\t\t\t\t\t}\n\t\t\t\t\tnewObject.text = formatted;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t} else if (object.text !== formatted) {\n\t\t\t\tobject.text = formatted;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} else {\n\t\t\tconst object = this._object;\n\t\t\tif (object != null && object.text !== \"\") {\n\t\t\t\tobject.text = \"\";\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tprotected newComputed(): VALUE | undefined {\n\t\tconst value = this._value;\n\t\tif (value !== undefined) {\n\t\t\tif (isFunction(value)) {\n\t\t\t\tconst result = value(this._parent.state);\n\t\t\t\tif (result !== undefined) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn value;\n\t\t\t}\n\t\t}\n\t\treturn this._theme.getTextValue(this._parent.state);\n\t}\n\n\tprotected newColor(state: DBaseStateSet): number {\n\t\tconst color = this._color;\n\t\tif (color !== undefined) {\n\t\t\tif (isFunction(color)) {\n\t\t\t\tconst result = color(state);\n\t\t\t\tif (result !== undefined) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn color;\n\t\t\t}\n\t\t}\n\t\treturn this._theme.getColor(state);\n\t}\n\n\tprotected newAlpha(state: DBaseStateSet): number {\n\t\tconst alpha = this._alpha;\n\t\tif (alpha !== undefined) {\n\t\t\tif (isFunction(alpha)) {\n\t\t\t\tconst result = alpha(state);\n\t\t\t\tif (result !== undefined) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn alpha;\n\t\t\t}\n\t\t}\n\t\treturn this._theme.getAlpha(state);\n\t}\n\n\tprotected newObject(): DDynamicText {\n\t\treturn new DDynamicText(this._dstyle);\n\t}\n\n\tget visible(): boolean {\n\t\tconst object = this._object;\n\t\tif (object != null) {\n\t\t\treturn object.visible;\n\t\t}\n\t\treturn this._isVisible;\n\t}\n\n\tset visible(visible: boolean) {\n\t\tconst object = this._object;\n\t\tif (object != null) {\n\t\t\tobject.visible = visible;\n\t\t}\n\t\tthis._isVisible = visible;\n\t}\n\n\tshow(): this {\n\t\tthis.visible = true;\n\t\treturn this;\n\t}\n\n\thide(): this {\n\t\tthis.visible = false;\n\t\treturn this;\n\t}\n\n\tisShown(): boolean {\n\t\treturn this.visible;\n\t}\n\n\tprotected onComputedChange(): void {\n\t\tthis.emit(\"change\", this);\n\t}\n\n\tdestroy(): this {\n\t\tconst object = this._object;\n\t\tif (object) {\n\t\t\tthis._object = undefined;\n\t\t\tobject.destroy();\n\t\t}\n\n\t\treturn this;\n\t}\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.407.0
2
+ Winter Cardinal UI v0.407.2
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.407.0
2
+ Winter Cardinal UI v0.407.2
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.407.0
2
+ Winter Cardinal UI v0.407.2
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.407.0
2
+ Winter Cardinal UI v0.407.2
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.407.0
2
+ Winter Cardinal UI v0.407.2
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.407.0
2
+ Winter Cardinal UI v0.407.2
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.407.0
2
+ Winter Cardinal UI v0.407.2
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.407.0
2
+ Winter Cardinal UI v0.407.2
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.407.0
2
+ Winter Cardinal UI v0.407.2
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.407.0
2
+ Winter Cardinal UI v0.407.2
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.407.0
2
+ Winter Cardinal UI v0.407.2
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.407.0
2
+ Winter Cardinal UI v0.407.2
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.407.0
2
+ Winter Cardinal UI v0.407.2
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -29956,7 +29956,7 @@ var DTextPieceImpl = /** @class */ (function (_super) {
29956
29956
  DTextPieceImpl.prototype.updateObject = function () {
29957
29957
  var computed = this._computed;
29958
29958
  if (computed !== undefined) {
29959
- var formatted = this._formatter(computed, this);
29959
+ var formatted = this._formatter(computed, this._parent);
29960
29960
  var object = this._object;
29961
29961
  if (object == null) {
29962
29962
  if (0 < formatted.length) {
@@ -89624,7 +89624,7 @@ var DPagination = /** @class */ (function (_super) {
89624
89624
  return new DPaginationPage((_a = this._options) === null || _a === void 0 ? void 0 : _a.page);
89625
89625
  };
89626
89626
  DPagination.prototype.onButtonPageActive = function (button) {
89627
- var text = button.text;
89627
+ var text = button.text.value;
89628
89628
  if (isNumber(text)) {
89629
89629
  this.moveTo(text - 1);
89630
89630
  if (button.state.isFocused) {
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.407.0
2
+ Winter Cardinal UI v0.407.2
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -29953,7 +29953,7 @@
29953
29953
  DTextPieceImpl.prototype.updateObject = function () {
29954
29954
  var computed = this._computed;
29955
29955
  if (computed !== undefined) {
29956
- var formatted = this._formatter(computed, this);
29956
+ var formatted = this._formatter(computed, this._parent);
29957
29957
  var object = this._object;
29958
29958
  if (object == null) {
29959
29959
  if (0 < formatted.length) {
@@ -68513,7 +68513,7 @@
68513
68513
  return new DPaginationPage((_a = this._options) === null || _a === void 0 ? void 0 : _a.page);
68514
68514
  };
68515
68515
  DPagination.prototype.onButtonPageActive = function (button) {
68516
- var text = button.text;
68516
+ var text = button.text.value;
68517
68517
  if (isNumber(text)) {
68518
68518
  this.moveTo(text - 1);
68519
68519
  if (button.state.isFocused) {