@wcardinal/wcardinal-ui 0.407.2 → 0.408.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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.407.2
2
+ Winter Cardinal UI v0.408.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -68332,16 +68332,38 @@
68332
68332
  return null;
68333
68333
  };
68334
68334
  DPagination.prototype.onButtonLastActive = function () {
68335
- this.moveTo(this._size - 1);
68335
+ this.goToLast();
68336
68336
  };
68337
- DPagination.prototype.moveTo = function (index) {
68337
+ /**
68338
+ * Goes to the last page.
68339
+ * Unlike {@link #value}, this method emits the change event if silently is not true.
68340
+ *
68341
+ * @param silently true to suppress the change event
68342
+ * @returns true if succeeded.
68343
+ */
68344
+ DPagination.prototype.goToLast = function (silently) {
68345
+ return this.goTo(this._size - 1, silently);
68346
+ };
68347
+ /**
68348
+ * Goes to the given page.
68349
+ * Unlike {@link #value}, this method emits the change event if silently is not true.
68350
+ *
68351
+ * @param index a page index
68352
+ * @param silently true to suppress the change event
68353
+ * @returns this
68354
+ */
68355
+ DPagination.prototype.goTo = function (index, silently) {
68338
68356
  if (0 <= index && index < this._size && this._value !== index) {
68339
68357
  var oldIndex = this._value;
68340
68358
  this._value = index;
68341
- this.emit("change", index, oldIndex, this);
68359
+ if (silently !== true) {
68360
+ this.emit("change", index, oldIndex, this);
68361
+ }
68342
68362
  this.toDirty();
68343
68363
  DApplications.update(this);
68364
+ return true;
68344
68365
  }
68366
+ return false;
68345
68367
  };
68346
68368
  Object.defineProperty(DPagination.prototype, "buttonNext", {
68347
68369
  get: function () {
@@ -68369,7 +68391,17 @@
68369
68391
  return null;
68370
68392
  };
68371
68393
  DPagination.prototype.onButtonNextActive = function () {
68372
- this.moveTo(this._value + 1);
68394
+ this.goToNext();
68395
+ };
68396
+ /**
68397
+ * Goes to the next page.
68398
+ * Unlike {@link #value}, this method emits the change event if silently is not true.
68399
+ *
68400
+ * @param silently true to suppress the change event
68401
+ * @returns true if succeeded.
68402
+ */
68403
+ DPagination.prototype.goToNext = function (silently) {
68404
+ return this.goTo(this._value + 1, silently);
68373
68405
  };
68374
68406
  Object.defineProperty(DPagination.prototype, "buttonPrevious", {
68375
68407
  get: function () {
@@ -68397,7 +68429,17 @@
68397
68429
  return null;
68398
68430
  };
68399
68431
  DPagination.prototype.onButtonPreviousActive = function () {
68400
- this.moveTo(this._value - 1);
68432
+ this.goToPrevious();
68433
+ };
68434
+ /**
68435
+ * Goes to the previous page.
68436
+ * Unlike {@link #value}, this method emits the change event if silently is not true.
68437
+ *
68438
+ * @param silently true to suppress the change event
68439
+ * @returns true if succeeded.
68440
+ */
68441
+ DPagination.prototype.goToPrevious = function (silently) {
68442
+ return this.goTo(this._value - 1, silently);
68401
68443
  };
68402
68444
  Object.defineProperty(DPagination.prototype, "buttonTop", {
68403
68445
  get: function () {
@@ -68425,7 +68467,17 @@
68425
68467
  return null;
68426
68468
  };
68427
68469
  DPagination.prototype.onButtonTopActive = function () {
68428
- this.moveTo(0);
68470
+ this.goToTop();
68471
+ };
68472
+ /**
68473
+ * Goes to the top page.
68474
+ * Unlike {@link #value}, this method emits the change event if silently is not true.
68475
+ *
68476
+ * @param silently true to suppress the change event
68477
+ * @returns true if succeeded.
68478
+ */
68479
+ DPagination.prototype.goToTop = function (silently) {
68480
+ return this.goTo(0, silently);
68429
68481
  };
68430
68482
  DPagination.prototype.newButtonPage = function () {
68431
68483
  var _this = this;
@@ -68515,7 +68567,7 @@
68515
68567
  DPagination.prototype.onButtonPageActive = function (button) {
68516
68568
  var text = button.text.value;
68517
68569
  if (isNumber(text)) {
68518
- this.moveTo(text - 1);
68570
+ this.goTo(text - 1);
68519
68571
  if (button.state.isFocused) {
68520
68572
  button.state.isHovered = false;
68521
68573
  this.page.focus();