@wavemaker/app-ng-runtime 11.4.0-next.24593 → 11.4.0-next.24653

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.
Files changed (35) hide show
  1. app-ng-runtime/build-task/bundles/index.umd.js +2 -2
  2. app-ng-runtime/build-task/bundles/index.umd.js.map +1 -1
  3. app-ng-runtime/build-task/esm2015/navigation/popover/popover.build.js +3 -3
  4. app-ng-runtime/build-task/fesm2015/index.js +2 -2
  5. app-ng-runtime/build-task/fesm2015/index.js.map +1 -1
  6. app-ng-runtime/components/base/bundles/index.umd.js +6 -3
  7. app-ng-runtime/components/base/bundles/index.umd.js.map +1 -1
  8. app-ng-runtime/components/base/esm2015/utils/widget-utils.js +7 -4
  9. app-ng-runtime/components/base/fesm2015/index.js +6 -3
  10. app-ng-runtime/components/base/fesm2015/index.js.map +1 -1
  11. app-ng-runtime/components/base/utils/widget-utils.d.ts +1 -1
  12. app-ng-runtime/components/data/list/bundles/index.umd.js +28 -4
  13. app-ng-runtime/components/data/list/bundles/index.umd.js.map +1 -1
  14. app-ng-runtime/components/data/list/esm2015/list.component.js +29 -5
  15. app-ng-runtime/components/data/list/fesm2015/index.js +28 -4
  16. app-ng-runtime/components/data/list/fesm2015/index.js.map +1 -1
  17. app-ng-runtime/components/data/list/index.metadata.json +1 -1
  18. app-ng-runtime/components/dialogs/default/bundles/index.umd.js.map +1 -1
  19. app-ng-runtime/components/dialogs/default/esm2015/base-dialog.js +1 -1
  20. app-ng-runtime/components/dialogs/default/fesm2015/index.js.map +1 -1
  21. app-ng-runtime/components/dialogs/default/index.metadata.json +1 -1
  22. app-ng-runtime/components/input/epoch/bundles/index.umd.js +39 -21
  23. app-ng-runtime/components/input/epoch/bundles/index.umd.js.map +1 -1
  24. app-ng-runtime/components/input/epoch/esm2015/base-date-time.component.js +43 -25
  25. app-ng-runtime/components/input/epoch/esm2015/date/date.component.js +3 -3
  26. app-ng-runtime/components/input/epoch/esm2015/date-time/date-time.component.js +2 -2
  27. app-ng-runtime/components/input/epoch/fesm2015/index.js +45 -27
  28. app-ng-runtime/components/input/epoch/fesm2015/index.js.map +1 -1
  29. app-ng-runtime/components/input/epoch/index.metadata.json +1 -1
  30. app-ng-runtime/components/navigation/popover/bundles/index.umd.js +3 -4
  31. app-ng-runtime/components/navigation/popover/bundles/index.umd.js.map +1 -1
  32. app-ng-runtime/components/navigation/popover/esm2015/popover.component.js +5 -6
  33. app-ng-runtime/components/navigation/popover/fesm2015/index.js +4 -5
  34. app-ng-runtime/components/navigation/popover/fesm2015/index.js.map +1 -1
  35. app-ng-runtime/package.json +1 -1
@@ -116,4 +116,4 @@ export declare const setFocusTrap: (container: any, allowOutsideClick: any, setR
116
116
  * @param element {HTMLElement}
117
117
  * @returns {Array}
118
118
  */
119
- export declare const getKeyboardFocusableElements: (element: HTMLElement) => NodeListOf<Element>;
119
+ export declare const getKeyboardFocusableElements: (element: HTMLElement) => Element[];
@@ -1356,9 +1356,10 @@
1356
1356
  }
1357
1357
  };
1358
1358
  // Triggers after the sorting.
1359
- ListComponent.prototype.onUpdate = function (evt, ui) {
1359
+ ListComponent.prototype.onUpdate = function (evt, ui, presentIndex) {
1360
1360
  var data = this.fieldDefs;
1361
- var newIndex = ui.item.index();
1361
+ // If ui is not present then it is called from drag and drop using keyboard
1362
+ var newIndex = ui === undefined ? presentIndex : ui.item.index();
1362
1363
  var oldIndex = this.$ulEle.data('oldIndex');
1363
1364
  var minIndex = _.min([newIndex, oldIndex]);
1364
1365
  var maxIndex = _.max([newIndex, oldIndex]);
@@ -1571,9 +1572,11 @@
1571
1572
  this.currentIndex = presentIndex + 1;
1572
1573
  if (this.isListElementMovable) {
1573
1574
  this.ariaText = "Item " + this.currentIndex + " grabbed, current position ";
1575
+ this.$ulEle.data('oldIndex', presentIndex);
1574
1576
  }
1575
1577
  else {
1576
1578
  this.ariaText = "Item " + this.currentIndex + " dropped, final position ";
1579
+ this.onUpdate($event, undefined, presentIndex);
1577
1580
  }
1578
1581
  }
1579
1582
  };
@@ -1626,11 +1629,13 @@
1626
1629
  this.dataNavigator.maxResults = nv;
1627
1630
  }
1628
1631
  else if (key === 'enablereorder') {
1629
- if (nv) {
1632
+ if (nv && this.$ulEle) {
1633
+ this.$ulEle.attr('aria-describedby', this.titleId);
1630
1634
  this.configureDnD();
1631
1635
  this.$ulEle.sortable('enable');
1632
1636
  }
1633
1637
  else if (this.$ulEle && !nv) {
1638
+ this.$ulEle.removeAttr('aria-describedby');
1634
1639
  this.$ulEle.sortable('disable');
1635
1640
  }
1636
1641
  }
@@ -1800,9 +1805,18 @@
1800
1805
  _super.prototype.ngAfterViewInit.call(_this);
1801
1806
  _this.setUpCUDHandlers();
1802
1807
  _this.selectedItemWidgets = _this.multiselect ? [] : {};
1808
+ var ele = $(_this.nativeElement).find('.app-livelist-container');
1803
1809
  if (_this.enablereorder && !_this.groupby) {
1810
+ if (ele) {
1811
+ ele.attr('aria-describedby', _this.titleId);
1812
+ }
1804
1813
  _this.configureDnD();
1805
1814
  }
1815
+ if (!_this.enablereorder) {
1816
+ if (ele) {
1817
+ ele.removeAttr('aria-describedby');
1818
+ }
1819
+ }
1806
1820
  if (_this.groupby && _this.collapsible) {
1807
1821
  _this.handleHeaderClick = base.handleHeaderClick;
1808
1822
  _this.toggleAllHeaders = base.toggleAllHeaders.bind(undefined, _this);
@@ -1812,6 +1826,16 @@
1812
1826
  this.setupHandlers();
1813
1827
  var $ul = this.nativeElement.querySelector('ul.app-livelist-container');
1814
1828
  base.styler($ul, this, base.APPLY_STYLES_TYPE.SCROLLABLE_CONTAINER);
1829
+ if (this.enablereorder) {
1830
+ if ($ul) {
1831
+ $ul.setAttribute('aria-describedby', this.titleId);
1832
+ }
1833
+ }
1834
+ if (!this.enablereorder) {
1835
+ if ($ul) {
1836
+ $ul.removeAttribute('aria-describedby');
1837
+ }
1838
+ }
1815
1839
  if (core.isMobileApp() && $ul.querySelector('.app-list-item-action-panel')) {
1816
1840
  this._listAnimator = new ListAnimator(this);
1817
1841
  }
@@ -1833,7 +1857,7 @@
1833
1857
  ListComponent.decorators = [
1834
1858
  { type: core$1.Component, args: [{
1835
1859
  selector: 'div[wmList]',
1836
- template: "<div class=\"panel-heading\" *ngIf=\"title || subheading || iconclass\">\n <h3 class=\"panel-title\">\n <div class=\"pull-left\">\n <i class=\"app-icon panel-icon {{iconclass}}\" aria-hidden=\"true\" [hidden]=\"!iconclass\"></i>\n </div>\n <div class=\"pull-left\">\n <div class=\"heading\" [innerHTML]=\"title\"></div>\n <div class=\"description\" [innerHTML]=\"subheading\"></div>\n </div>\n </h3>\n</div>\n\n<div class=\"app-datanavigator\" [attr.aria-disabled]=\"dataNavigator.isDisablePrevious\" aria-label=\"Page navigation\" *ngIf=\"navigation === 'Inline' && !noDataFound\">\n <ul class=\"pager\">\n <li class=\"previous\" [ngClass]=\"{'disabled': (dataNavigator ? dataNavigator.isDisablePrevious : true)}\">\n <a href=\"javascript:void(0);\" (click)=\"dataNavigator.navigatePage('prev', $event)\"\n [attr.aria-disabled]=\"dataNavigator.isDisablePrevious\">\n <i class=\"wi wi-chevron-left\" aria-hidden=\"true\"></i>\n <span class=\"sr-only\">Go to Previous page {{dataNavigator.isDisablePrevious ? ', Disabled' : ''}}</span>\n </a>\n </li>\n </ul>\n</div>\n<div *ngIf=\"navigation === 'Inline' && !noDataFound\" aria-live=\"polite\" aria-atomic=\"true\" class=\"sr-only\"> {{'Page ' + dataNavigator.dn.currentPage + ' of ' + dataNavigator.pageCount }}</div>\n\n<div>\n <div id={{titleId}} class=\"sr-only\" *ngIf=\"enablereorder\">\n Press space bar to toggle drag drop mode, use arrow keys to move selected elements.\n </div>\n\n <div aria-live=\"assertive\" *ngIf=\"listItems && enablereorder && currentIndex\" class=\"sr-only\" >\n {{ariaText + currentIndex + ' of ' + listItems.length}}\n </div>\n</div>\n\n<ul [attr.tabindex]=\"tabindex\" [attr.aria-describedby] = \"titleId\" class=\"app-livelist-container clearfix {{direction === 'horizontal' ? 'app-horizontal-list': ''}} {{listclass}}\" role=\"list\"\n (keydown.enter)=\"handleKeyDown($event, 'select')\"\n\n (keydown.space)=\"handleKeyDown($event, 'space')\"\n\n (keydown.arrowup)=\"handleKeyDown($event, 'focusPrev')\"\n (keydown.arrowdown)=\"handleKeyDown($event, 'focusNext')\"\n (keydown.arrowleft)=\"handleKeyDown($event, 'focusPrev')\"\n (keydown.arrowright)=\"handleKeyDown($event, 'focusNext')\"\n\n (keydown.shift.arrowup)=\"handleKeyDown($event, 'selectPrev')\"\n (keydown.shift.arrowdown)=\"handleKeyDown($event, 'selectNext')\"\n (keydown.shift.arrowleft)=\"handleKeyDown($event, 'selectPrev')\"\n (keydown.shift.arrowright)=\"handleKeyDown($event, 'selectNext')\"\n [hidden]=\"noDataFound && !variableInflight\"\n>\n <ng-template [ngIf]=\"!groupby\" [ngIfElse]=\"groupedListTemplate\">\n <li *ngFor=\"let item of fieldDefs; index as $index; first as $first; last as $last;\" class=\"app-list-item {{direction === 'horizontal' ? '' : itemsPerRowClass}}\" [ngClass]=\"listItemRef.itemClass\"\n [wmListItem]=\"item\"\n #listItemRef=\"listItemRef\"\n [attr.tabindex]=\"tabindex\"\n role=\"listitem\">\n <ng-container [ngTemplateOutlet]=\"listTemplate\" [ngTemplateOutletContext]=\"{item: item, $index: $index, itemRef: listItemRef, $first: $first, $last: $last, currentItemWidgets: listItemRef.currentItemWidgets}\"></ng-container>\n </li>\n </ng-template>\n <ng-container [ngTemplateOutlet]=\"listLeftActionTemplate\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"listRightActionTemplate\"></ng-container>\n</ul>\n\n<div class=\"no-data-msg\" *ngIf=\"noDataFound && !variableInflight\" [textContent]=\"nodatamessage\"></div>\n\n<div class=\"loading-data-msg\" *ngIf=\"variableInflight && !pulltorefresh\">\n <span>\n <i class=\"app-icon panel-icon fa-spin\" aria-hidden=\"true\" [ngClass]=\"loadingicon\"></i>\n <span class=\"sr-only\">Loading</span>\n <span class=\"loading-text\" [textContent]=\"loadingdatamsg\"></span>\n </span>\n</div>\n\n<div class=\"app-datanavigator\" [attr.aria-disabled]=\"dataNavigator.isDisableNext\" *ngIf=\"navigation === 'Inline' && !noDataFound\">\n <ul class=\"pager\">\n <li class=\"next\" [ngClass]=\"{'disabled': (dataNavigator ? dataNavigator.isDisableNext : true)}\">\n <a href=\"javascript:void(0);\" (click)=\"dataNavigator.navigatePage('next', $event)\"\n [attr.aria-disabled]=\"dataNavigator.isDisableNext\">\n <i class=\"wi wi-chevron-right\" aria-hidden=\"true\"></i>\n <span class=\"sr-only\">Go to Next page {{dataNavigator.isDisableNext ? ', Disabled' : ''}}</span>\n </a>\n </li>\n </ul>\n</div>\n\n<div class=\"panel-footer\" *ngIf=\"navigation !== 'None'\" [hidden]=\"!showNavigation || (onDemandLoad && dataNavigator.isDisableNext) || (dataNavigator.dataSize <= pagesize) || (!dataNavigator.dataSize && !dataNavigator.datasource?.pagination?.next)\">\n <nav wmPagination\n navigationalign.bind=\"navigationalign\"\n navigation.bind=\"navControls\"\n showrecordcount.bind=\"showrecordcount\"\n maxsize.bind=\"maxsize\"\n boundarylinks.bind=\"boundarylinks\"\n forceellipses.bind=\"forceellipses\"\n directionlinks.bind=\"directionlinks\"\n show.bind=\"!onDemandLoad\"\n paginationchange.event=\"beforePaginationChange($event, $index)\"\n ></nav>\n <a *ngIf=\"onDemandLoad\" href=\"javascript:void(0);\"\n (click)=\"dataNavigator.navigatePage('next', $event)\"\n class=\"app-button btn btn-block\"\n [ngClass]=\"paginationclass\"\n [textContent]=\"ondemandmessage\"\n ></a>\n</div>\n\n<!--This template will be displayed when groupby is specified-->\n<ng-template #groupedListTemplate>\n <li *ngFor=\"let groupObj of groupedData\" class=\"app-list-item-group clearfix\">\n <ul [attr.tabindex]=\"tabindex\" class=\"list-group item-group\" [ngClass]=\"listclass\">\n <li class=\"app-list-item-header list-item list-group-header\" (click)=\"handleHeaderClick($event)\" [ngClass]=\"{'collapsible-content': collapsible}\">\n <h4>{{groupObj.key}}\n <div class=\"header-action\">\n <i class=\"app-icon wi action wi-chevron-up\" *ngIf=\"collapsible\"></i>\n <span *ngIf=\"showcount\" class=\"label label-default\">{{groupObj.data.length}}</span>\n </div>\n </h4>\n </li>\n <ul class=\"list-group clearfix {{direction === 'horizontal' ? 'app-horizontal-list': ''}}\">\n <li *ngFor=\"let item of groupObj.data; index as $index; first as $first; last as $last;\" [attr.tabindex]=\"tabindex\"\n class=\"app-list-item group-list-item {{itemsPerRowClass}}\"\n [ngClass]=\"listItemRef.itemClass\"\n [wmListItem]=\"item\" #listItemRef=\"listItemRef\">\n <ng-container [ngTemplateOutlet]=\"listTemplate\" [ngTemplateOutletContext]=\"{item: item, $index: $index, itemRef: listItemRef, $first: $first, $last: $last, currentItemWidgets: listItemRef.currentItemWidgets}\"></ng-container>\n </li>\n </ul>\n </ul>\n </li>\n</ng-template>\n",
1860
+ template: "<div class=\"panel-heading\" *ngIf=\"title || subheading || iconclass\">\n <h3 class=\"panel-title\">\n <div class=\"pull-left\">\n <i class=\"app-icon panel-icon {{iconclass}}\" aria-hidden=\"true\" [hidden]=\"!iconclass\"></i>\n </div>\n <div class=\"pull-left\">\n <div class=\"heading\" [innerHTML]=\"title\"></div>\n <div class=\"description\" [innerHTML]=\"subheading\"></div>\n </div>\n </h3>\n</div>\n\n<div class=\"app-datanavigator\" [attr.aria-disabled]=\"dataNavigator.isDisablePrevious\" aria-label=\"Page navigation\" *ngIf=\"navigation === 'Inline' && !noDataFound\">\n <ul class=\"pager\">\n <li class=\"previous\" [ngClass]=\"{'disabled': (dataNavigator ? dataNavigator.isDisablePrevious : true)}\">\n <a href=\"javascript:void(0);\" (click)=\"dataNavigator.navigatePage('prev', $event)\"\n [attr.aria-disabled]=\"dataNavigator.isDisablePrevious\">\n <i class=\"wi wi-chevron-left\" aria-hidden=\"true\"></i>\n <span class=\"sr-only\">Go to Previous page {{dataNavigator.isDisablePrevious ? ', Disabled' : ''}}</span>\n </a>\n </li>\n </ul>\n</div>\n<div *ngIf=\"navigation === 'Inline' && !noDataFound\" aria-live=\"polite\" aria-atomic=\"true\" class=\"sr-only\"> {{'Page ' + dataNavigator.dn.currentPage + ' of ' + dataNavigator.pageCount }}</div>\n\n<div>\n <div id={{titleId}} class=\"sr-only\" *ngIf=\"enablereorder\">\n Press space bar to toggle drag drop mode, use arrow keys to move selected elements.\n </div>\n\n <div aria-live=\"assertive\" *ngIf=\"listItems && enablereorder && currentIndex\" class=\"sr-only\" >\n {{ariaText + currentIndex + ' of ' + listItems.length}}\n </div>\n</div>\n\n<ul [attr.tabindex]=\"tabindex\" class=\"app-livelist-container clearfix {{direction === 'horizontal' ? 'app-horizontal-list': ''}} {{listclass}}\" role=\"list\"\n (keydown.enter)=\"handleKeyDown($event, 'select')\"\n\n (keydown.space)=\"handleKeyDown($event, 'space')\"\n\n (keydown.arrowup)=\"handleKeyDown($event, 'focusPrev')\"\n (keydown.arrowdown)=\"handleKeyDown($event, 'focusNext')\"\n (keydown.arrowleft)=\"handleKeyDown($event, 'focusPrev')\"\n (keydown.arrowright)=\"handleKeyDown($event, 'focusNext')\"\n\n (keydown.shift.arrowup)=\"handleKeyDown($event, 'selectPrev')\"\n (keydown.shift.arrowdown)=\"handleKeyDown($event, 'selectNext')\"\n (keydown.shift.arrowleft)=\"handleKeyDown($event, 'selectPrev')\"\n (keydown.shift.arrowright)=\"handleKeyDown($event, 'selectNext')\"\n [hidden]=\"noDataFound && !variableInflight\"\n>\n <ng-template [ngIf]=\"!groupby\" [ngIfElse]=\"groupedListTemplate\">\n <li *ngFor=\"let item of fieldDefs; index as $index; first as $first; last as $last;\" class=\"app-list-item {{direction === 'horizontal' ? '' : itemsPerRowClass}}\" [ngClass]=\"listItemRef.itemClass\"\n [wmListItem]=\"item\"\n #listItemRef=\"listItemRef\"\n [attr.tabindex]=\"tabindex\"\n role=\"listitem\">\n <ng-container [ngTemplateOutlet]=\"listTemplate\" [ngTemplateOutletContext]=\"{item: item, $index: $index, itemRef: listItemRef, $first: $first, $last: $last, currentItemWidgets: listItemRef.currentItemWidgets}\"></ng-container>\n </li>\n </ng-template>\n <ng-container [ngTemplateOutlet]=\"listLeftActionTemplate\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"listRightActionTemplate\"></ng-container>\n</ul>\n\n<div class=\"no-data-msg\" *ngIf=\"noDataFound && !variableInflight\" [textContent]=\"nodatamessage\"></div>\n\n<div class=\"loading-data-msg\" *ngIf=\"variableInflight && !pulltorefresh\">\n <span>\n <i class=\"app-icon panel-icon fa-spin\" aria-hidden=\"true\" [ngClass]=\"loadingicon\"></i>\n <span class=\"sr-only\">Loading</span>\n <span class=\"loading-text\" [textContent]=\"loadingdatamsg\"></span>\n </span>\n</div>\n\n<div class=\"app-datanavigator\" [attr.aria-disabled]=\"dataNavigator.isDisableNext\" *ngIf=\"navigation === 'Inline' && !noDataFound\">\n <ul class=\"pager\">\n <li class=\"next\" [ngClass]=\"{'disabled': (dataNavigator ? dataNavigator.isDisableNext : true)}\">\n <a href=\"javascript:void(0);\" (click)=\"dataNavigator.navigatePage('next', $event)\"\n [attr.aria-disabled]=\"dataNavigator.isDisableNext\">\n <i class=\"wi wi-chevron-right\" aria-hidden=\"true\"></i>\n <span class=\"sr-only\">Go to Next page {{dataNavigator.isDisableNext ? ', Disabled' : ''}}</span>\n </a>\n </li>\n </ul>\n</div>\n\n<div class=\"panel-footer\" *ngIf=\"navigation !== 'None'\" [hidden]=\"!showNavigation || (onDemandLoad && dataNavigator.isDisableNext) || (dataNavigator.dataSize <= pagesize) || (!dataNavigator.dataSize && !dataNavigator.datasource?.pagination?.next)\">\n <nav wmPagination\n navigationalign.bind=\"navigationalign\"\n navigation.bind=\"navControls\"\n showrecordcount.bind=\"showrecordcount\"\n maxsize.bind=\"maxsize\"\n boundarylinks.bind=\"boundarylinks\"\n forceellipses.bind=\"forceellipses\"\n directionlinks.bind=\"directionlinks\"\n show.bind=\"!onDemandLoad\"\n paginationchange.event=\"beforePaginationChange($event, $index)\"\n ></nav>\n <a *ngIf=\"onDemandLoad\" href=\"javascript:void(0);\"\n (click)=\"dataNavigator.navigatePage('next', $event)\"\n class=\"app-button btn btn-block\"\n [ngClass]=\"paginationclass\"\n [textContent]=\"ondemandmessage\"\n ></a>\n</div>\n\n<!--This template will be displayed when groupby is specified-->\n<ng-template #groupedListTemplate>\n <li *ngFor=\"let groupObj of groupedData\" class=\"app-list-item-group clearfix\">\n <ul [attr.tabindex]=\"tabindex\" class=\"list-group item-group\" [ngClass]=\"listclass\">\n <li class=\"app-list-item-header list-item list-group-header\" (click)=\"handleHeaderClick($event)\" [ngClass]=\"{'collapsible-content': collapsible}\">\n <h4>{{groupObj.key}}\n <div class=\"header-action\">\n <i class=\"app-icon wi action wi-chevron-up\" *ngIf=\"collapsible\"></i>\n <span *ngIf=\"showcount\" class=\"label label-default\">{{groupObj.data.length}}</span>\n </div>\n </h4>\n </li>\n <ul class=\"list-group clearfix {{direction === 'horizontal' ? 'app-horizontal-list': ''}}\">\n <li *ngFor=\"let item of groupObj.data; index as $index; first as $first; last as $last;\" [attr.tabindex]=\"tabindex\"\n class=\"app-list-item group-list-item {{itemsPerRowClass}}\"\n [ngClass]=\"listItemRef.itemClass\"\n [wmListItem]=\"item\" #listItemRef=\"listItemRef\">\n <ng-container [ngTemplateOutlet]=\"listTemplate\" [ngTemplateOutletContext]=\"{item: item, $index: $index, itemRef: listItemRef, $first: $first, $last: $last, currentItemWidgets: listItemRef.currentItemWidgets}\"></ng-container>\n </li>\n </ul>\n </ul>\n </li>\n</ng-template>\n",
1837
1861
  providers: [
1838
1862
  base.provideAsWidgetRef(ListComponent)
1839
1863
  ]