@coolon/angular-ui-powerups 12.4.0-alpha.18 → 12.4.0-alpha.19

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 (66) hide show
  1. package/bundles/coolon-angular-ui-powerups-cypress.umd.js +197 -117
  2. package/bundles/coolon-angular-ui-powerups-cypress.umd.js.map +1 -1
  3. package/bundles/coolon-angular-ui-powerups.umd.js +5 -4
  4. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
  5. package/coolon-angular-ui-powerups.metadata.json +1 -1
  6. package/cypress/builder.d.ts +4 -0
  7. package/cypress/components/aup-abstract-table.d.ts +18 -0
  8. package/cypress/components/aup-table.d.ts +4 -41
  9. package/cypress/components/aup-tree-table.d.ts +16 -0
  10. package/cypress/components/button.d.ts +2 -2
  11. package/cypress/components/form-element-mixin.d.ts +2 -2
  12. package/cypress/components/mat-checkbox.d.ts +2 -2
  13. package/cypress/components/table/aup-table-cell.d.ts +9 -0
  14. package/cypress/components/table/aup-table-column.d.ts +10 -0
  15. package/cypress/components/table/aup-table-row.d.ts +17 -0
  16. package/cypress/components/table/aup-table-selection-cell.d.ts +5 -0
  17. package/cypress/components/table/aup-table-selection-column.d.ts +5 -0
  18. package/cypress/coolon-angular-ui-powerups-cypress.metadata.json +1 -1
  19. package/cypress/exports.d.ts +7 -0
  20. package/cypress/page-element.d.ts +4 -4
  21. package/esm2015/cypress/builder.js +4 -0
  22. package/esm2015/cypress/builder.js.map +1 -1
  23. package/esm2015/cypress/builder.metadata.json +1 -1
  24. package/esm2015/cypress/components/aup-abstract-table.js +54 -0
  25. package/esm2015/cypress/components/aup-abstract-table.js.map +1 -0
  26. package/esm2015/cypress/components/aup-abstract-table.metadata.json +1 -0
  27. package/esm2015/cypress/components/aup-table.js +5 -111
  28. package/esm2015/cypress/components/aup-table.js.map +1 -1
  29. package/esm2015/cypress/components/aup-table.metadata.json +1 -1
  30. package/esm2015/cypress/components/aup-tree-table.js +34 -0
  31. package/esm2015/cypress/components/aup-tree-table.js.map +1 -0
  32. package/esm2015/cypress/components/aup-tree-table.metadata.json +1 -0
  33. package/esm2015/cypress/components/table/aup-table-cell.js +18 -0
  34. package/esm2015/cypress/components/table/aup-table-cell.js.map +1 -0
  35. package/esm2015/cypress/components/table/aup-table-cell.metadata.json +1 -0
  36. package/esm2015/cypress/components/table/aup-table-column.js +21 -0
  37. package/esm2015/cypress/components/table/aup-table-column.js.map +1 -0
  38. package/esm2015/cypress/components/table/aup-table-column.metadata.json +1 -0
  39. package/esm2015/cypress/components/table/aup-table-row.js +30 -0
  40. package/esm2015/cypress/components/table/aup-table-row.js.map +1 -0
  41. package/esm2015/cypress/components/table/aup-table-row.metadata.json +1 -0
  42. package/esm2015/cypress/components/table/aup-table-selection-cell.js +6 -0
  43. package/esm2015/cypress/components/table/aup-table-selection-cell.js.map +1 -0
  44. package/esm2015/cypress/components/table/aup-table-selection-cell.metadata.json +1 -0
  45. package/esm2015/cypress/components/table/aup-table-selection-column.js +6 -0
  46. package/esm2015/cypress/components/table/aup-table-selection-column.js.map +1 -0
  47. package/esm2015/cypress/components/table/aup-table-selection-column.metadata.json +1 -0
  48. package/esm2015/cypress/exports.js +7 -0
  49. package/esm2015/cypress/exports.js.map +1 -1
  50. package/esm2015/cypress/exports.metadata.json +1 -1
  51. package/esm2015/cypress/page-element.js +1 -1
  52. package/esm2015/cypress/page-element.js.map +1 -1
  53. package/esm2015/cypress/page-element.metadata.json +1 -1
  54. package/esm2015/lib/components/tables/tree-table/flattened-tree-list-model.js +4 -4
  55. package/esm2015/lib/components/tables/tree-table/flattened-tree-list-model.js.map +1 -1
  56. package/esm2015/lib/components/tables/tree-table/flattened-tree-list-model.metadata.json +1 -1
  57. package/esm2015/lib/components/tables/tree-table/tree-table-model.js +1 -0
  58. package/esm2015/lib/components/tables/tree-table/tree-table-model.js.map +1 -1
  59. package/esm2015/lib/components/tables/tree-table/tree-table-model.metadata.json +1 -1
  60. package/fesm2015/coolon-angular-ui-powerups-cypress.js +134 -89
  61. package/fesm2015/coolon-angular-ui-powerups-cypress.js.map +1 -1
  62. package/fesm2015/coolon-angular-ui-powerups.js +5 -4
  63. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  64. package/lib/components/tables/tree-table/flattened-tree-list-model.d.ts +0 -1
  65. package/lib/components/tables/tree-table/tree-table-model.d.ts +4 -5
  66. package/package.json +1 -1
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@coolon/typescript-utilities'), require('lodash'), require('@angular/router')) :
3
- typeof define === 'function' && define.amd ? define('@coolon/angular-ui-powerups/cypress', ['exports', '@coolon/typescript-utilities', 'lodash', '@angular/router'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.coolon = global.coolon || {}, global.coolon['angular-ui-powerups'] = global.coolon['angular-ui-powerups'] || {}, global.coolon['angular-ui-powerups'].cypress = {}), global.typescriptUtilities, global._, global.ng.router));
5
- }(this, (function (exports, typescriptUtilities, _, router) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@coolon/typescript-utilities'), require('lodash'), require('@typescript-plus/fast-memoize-decorator/dist/src'), require('@angular/router')) :
3
+ typeof define === 'function' && define.amd ? define('@coolon/angular-ui-powerups/cypress', ['exports', '@coolon/typescript-utilities', 'lodash', '@typescript-plus/fast-memoize-decorator/dist/src', '@angular/router'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.coolon = global.coolon || {}, global.coolon['angular-ui-powerups'] = global.coolon['angular-ui-powerups'] || {}, global.coolon['angular-ui-powerups'].cypress = {}), global.typescriptUtilities, global._, global.src, global.ng.router));
5
+ }(this, (function (exports, typescriptUtilities, _, src, router) { 'use strict';
6
6
 
7
7
  function _interopNamespace(e) {
8
8
  if (e && e.__esModule) return e;
@@ -400,7 +400,7 @@
400
400
  };
401
401
  PageElement.prototype.shouldNotExist = function () {
402
402
  if (!this.elementAccessStrategy.shouldNotExist) {
403
- this.dom().should("not.exist");
403
+ this.dom().should('not.exist');
404
404
  }
405
405
  else {
406
406
  this.elementAccessStrategy.shouldNotExist(this.parent);
@@ -610,141 +610,202 @@
610
610
  return AupNavigation;
611
611
  }(PageElement));
612
612
 
613
- exports.AupTable = /** @class */ (function (_super) {
614
- __extends(AupTable, _super);
615
- function AupTable() {
613
+ var AupTableCell = /** @class */ (function (_super) {
614
+ __extends(AupTableCell, _super);
615
+ function AupTableCell() {
616
616
  return _super !== null && _super.apply(this, arguments) || this;
617
617
  }
618
- AupTable.prototype.row = function (rowId) {
619
- return new AupTable.Row(this, AupTable.cssSelectorForTableRowById(rowId));
618
+ AupTableCell.prototype.rowId = function () {
619
+ return this.dom().closest('tr').invoke('attr', 'aup-row-id');
620
620
  };
621
- AupTable.prototype.rowNumber = function (rowNumber) {
622
- return new AupTable.Row(this, AupTable.cssSelectorForNthTableRow(rowNumber));
621
+ AupTableCell.prototype.row = function () {
622
+ var self = this;
623
+ return this.parent.createRow({
624
+ findIn: function (parent) {
625
+ return self.rowId().then(function (rowId) {
626
+ return parent.dom().find(exports.AupAbstractTable.cssSelectorForTableRowById(rowId));
627
+ });
628
+ }
629
+ });
630
+ };
631
+ return AupTableCell;
632
+ }(PageElement));
633
+
634
+ var AupTableColumn = /** @class */ (function (_super) {
635
+ __extends(AupTableColumn, _super);
636
+ function AupTableColumn(table, columnId) {
637
+ var _this = _super.call(this, table, exports.AupAbstractTable.cssSelectorForColumnCellRendererById(columnId)) || this;
638
+ _this.columnId = columnId;
639
+ return _this;
640
+ }
641
+ AupTableColumn.prototype.cellContaining = function (content) {
642
+ var self = this;
643
+ return new AupTableCell(this.parent, {
644
+ findIn: function (parent) {
645
+ return parent.dom().contains(exports.AupAbstractTable.cssSelectorForColumnCellRendererById(self.columnId), content);
646
+ }
647
+ });
623
648
  };
624
- AupTable.prototype.column = function (columnId) {
625
- return new AupTable.Column(this, columnId);
649
+ AupTableColumn.prototype.rowContaining = function (content) {
650
+ return this.cellContaining(content).row();
626
651
  };
627
- AupTable.prototype.selectionColumn = function () {
628
- return new AupTable.SelectionColumn(this, 'selection-column');
652
+ return AupTableColumn;
653
+ }(PageElement));
654
+
655
+ var AupTableSelectionColumn = /** @class */ (function (_super) {
656
+ __extends(AupTableSelectionColumn, _super);
657
+ function AupTableSelectionColumn() {
658
+ return _super !== null && _super.apply(this, arguments) || this;
659
+ }
660
+ AupTableSelectionColumn.prototype.selectAll = function () {
629
661
  };
630
- return AupTable;
662
+ return AupTableSelectionColumn;
663
+ }(AupTableColumn));
664
+
665
+ exports.AupAbstractTable = /** @class */ (function (_super) {
666
+ __extends(AupAbstractTable, _super);
667
+ function AupAbstractTable() {
668
+ return _super !== null && _super.apply(this, arguments) || this;
669
+ }
670
+ AupAbstractTable.prototype.row = function (rowId) {
671
+ return this.createRow({
672
+ findIn: function (parent) {
673
+ return parent.dom().find(AupAbstractTable.cssSelectorForTableRowById(rowId));
674
+ }
675
+ });
676
+ };
677
+ AupAbstractTable.prototype.rowNumber = function (rowNumber) {
678
+ return this.createRow({
679
+ findIn: function (parent) {
680
+ return parent.dom().find(AupAbstractTable.cssSelectorForNthTableRow(rowNumber));
681
+ }
682
+ });
683
+ };
684
+ AupAbstractTable.prototype.column = function (columnId) {
685
+ return new AupTableColumn(this, columnId);
686
+ };
687
+ Object.defineProperty(AupAbstractTable.prototype, "selectionColumn", {
688
+ get: function () {
689
+ return new AupTableSelectionColumn(this, 'selection-column');
690
+ },
691
+ enumerable: false,
692
+ configurable: true
693
+ });
694
+ return AupAbstractTable;
631
695
  }(PageElement));
632
- (function (AupTable) {
696
+ __decorate([
697
+ src.Memoize(),
698
+ __metadata("design:type", AupTableSelectionColumn),
699
+ __metadata("design:paramtypes", [])
700
+ ], exports.AupAbstractTable.prototype, "selectionColumn", null);
701
+ (function (AupAbstractTable) {
633
702
  function cssSelectorForTableRowById(rowId) {
634
703
  return "tbody tr[aup-row-id=" + rowId + "]";
635
704
  }
636
- AupTable.cssSelectorForTableRowById = cssSelectorForTableRowById;
705
+ AupAbstractTable.cssSelectorForTableRowById = cssSelectorForTableRowById;
637
706
  function cssSelectorForNthTableRow(rowNumber) {
638
707
  return "tbody tr:nth-child(" + rowNumber + ")";
639
708
  }
640
- AupTable.cssSelectorForNthTableRow = cssSelectorForNthTableRow;
641
- function cssSelectorForColumnCellRendererById(columnId) {
709
+ AupAbstractTable.cssSelectorForNthTableRow = cssSelectorForNthTableRow;
710
+ function cssSelectorForColumnCellRendererById(columnOrId) {
711
+ var columnId = ___namespace.isString(columnOrId) ? columnOrId : columnOrId.columnId;
642
712
  return "aup-table-cell-renderer[column-id=" + columnId + "]";
643
713
  }
644
- AupTable.cssSelectorForColumnCellRendererById = cssSelectorForColumnCellRendererById;
645
- function cssSelectorForCell(rowId, columnId) {
646
- return cssSelectorForTableRowById(rowId) + " " + cssSelectorForColumnCellRendererById(columnId);
714
+ AupAbstractTable.cssSelectorForColumnCellRendererById = cssSelectorForColumnCellRendererById;
715
+ function cssSelectorForCell(rowId, columnOrId) {
716
+ return cssSelectorForTableRowById(rowId) + " " + cssSelectorForColumnCellRendererById(columnOrId);
717
+ }
718
+ AupAbstractTable.cssSelectorForCell = cssSelectorForCell;
719
+ })(exports.AupAbstractTable || (exports.AupAbstractTable = {}));
720
+
721
+ var AupTableRow = /** @class */ (function (_super) {
722
+ __extends(AupTableRow, _super);
723
+ function AupTableRow() {
724
+ return _super !== null && _super.apply(this, arguments) || this;
647
725
  }
648
- AupTable.cssSelectorForCell = cssSelectorForCell;
726
+ AupTableRow.prototype.rowId = function () {
727
+ return this.dom()
728
+ .invoke('attr', 'aup-row-id');
729
+ };
730
+ AupTableRow.prototype.shouldHaveRowId = function (rowId) {
731
+ this.rowId().should('eq', rowId);
732
+ };
733
+ AupTableRow.prototype.cell = function (columnOrId) {
734
+ var self = this;
735
+ return new AupTableCell(this.parent, {
736
+ findIn: function (parent) {
737
+ return self.rowId()
738
+ .then(function (rowId) { return exports.AupAbstractTable.cssSelectorForCell(rowId, columnOrId); })
739
+ .then(function (selector) { return parent.dom().find(selector); });
740
+ }
741
+ });
742
+ };
743
+ AupTableRow.prototype.shouldBeSelected = function () {
744
+ this.dom().should('have.class', 'aup-row-selected');
745
+ };
746
+ AupTableRow.prototype.shouldNotBeSelected = function () {
747
+ this.dom().should('not.have.class', 'aup-row-selected');
748
+ };
749
+ return AupTableRow;
750
+ }(PageElement));
751
+
752
+ var AupTable = /** @class */ (function (_super) {
753
+ __extends(AupTable, _super);
754
+ function AupTable() {
755
+ return _super !== null && _super.apply(this, arguments) || this;
756
+ }
757
+ AupTable.prototype.createRow = function (locator) {
758
+ return new AupTableRow(this, locator);
759
+ };
760
+ return AupTable;
761
+ }(exports.AupAbstractTable));
762
+
763
+ exports.AupTreeTable = /** @class */ (function (_super) {
764
+ __extends(AupTreeTable, _super);
765
+ function AupTreeTable() {
766
+ return _super !== null && _super.apply(this, arguments) || this;
767
+ }
768
+ Object.defineProperty(AupTreeTable.prototype, "treeControlColumn", {
769
+ get: function () {
770
+ return new AupTreeTable.TreeControlColumn(this, 'tree-label');
771
+ },
772
+ enumerable: false,
773
+ configurable: true
774
+ });
775
+ AupTreeTable.prototype.createRow = function (locator) {
776
+ return new AupTreeTable.Row(this, locator);
777
+ };
778
+ return AupTreeTable;
779
+ }(exports.AupAbstractTable));
780
+ __decorate([
781
+ src.Memoize(),
782
+ __metadata("design:type", exports.AupTreeTable.TreeControlColumn),
783
+ __metadata("design:paramtypes", [])
784
+ ], exports.AupTreeTable.prototype, "treeControlColumn", null);
785
+ (function (AupTreeTable) {
649
786
  var Row = /** @class */ (function (_super) {
650
787
  __extends(Row, _super);
651
- function Row(table, selectorOrLocator) {
652
- var _this =
653
- // @ts-ignore
654
- _super.call(this, table, selectorOrLocator) || this;
655
- _this.table = table;
656
- return _this;
657
- }
658
- Row.prototype.rowId = function () {
659
- return this.dom()
660
- .invoke('attr', 'aup-row-id');
661
- };
662
- Row.prototype.shouldHaveRowId = function (rowId) {
663
- this.rowId().should("eq", rowId);
664
- };
665
- Row.prototype.cell = function (columnOrId) {
666
- var self = this;
667
- var columnId = ___namespace.isString(columnOrId) ? columnOrId : columnOrId.columnId;
668
- return new Cell(this.table, {
669
- findIn: function (parent) {
670
- return self.rowId()
671
- .then(function (rowId) { return AupTable.cssSelectorForCell(rowId, columnId); })
672
- .then(function (selector) { return parent.dom().find(selector); });
673
- }
674
- });
675
- };
676
- Row.prototype.shouldBeSelected = function () {
677
- this.dom().should('have.class', 'aup-row-selected');
678
- };
679
- Row.prototype.shouldNotBeSelected = function () {
680
- this.dom().should('not.have.class', 'aup-row-selected');
681
- };
682
- return Row;
683
- }(PageElement));
684
- AupTable.Row = Row;
685
- var Column = /** @class */ (function (_super) {
686
- __extends(Column, _super);
687
- function Column(table, columnId) {
688
- var _this = _super.call(this, table, "aup-table-header-cell-renderer[column-id=\"" + columnId + "\"]") || this;
689
- _this.table = table;
690
- _this.columnId = columnId;
691
- return _this;
692
- }
693
- Column.prototype.cellContaining = function (content) {
694
- var self = this;
695
- return new Cell(this.table, {
696
- findIn: function (parent) {
697
- return parent.dom().contains(cssSelectorForColumnCellRendererById(self.columnId), content);
698
- }
699
- });
700
- };
701
- Column.prototype.rowContaining = function (content) {
702
- return this.cellContaining(content).row();
703
- };
704
- return Column;
705
- }(PageElement));
706
- AupTable.Column = Column;
707
- var SelectionColumn = /** @class */ (function (_super) {
708
- __extends(SelectionColumn, _super);
709
- function SelectionColumn() {
788
+ function Row() {
710
789
  return _super !== null && _super.apply(this, arguments) || this;
711
790
  }
712
- SelectionColumn.prototype.selectAll = function () {
791
+ Row.prototype.shouldBeExpanded = function () {
792
+ this.dom().should("not.have.class", "aup-node-collapsed");
713
793
  };
714
- return SelectionColumn;
715
- }(Column));
716
- AupTable.SelectionColumn = SelectionColumn;
717
- var Cell = /** @class */ (function (_super) {
718
- __extends(Cell, _super);
719
- function Cell(table, elementLocator) {
720
- var _this = _super.call(this, table, elementLocator) || this;
721
- _this.table = table;
722
- return _this;
723
- }
724
- Cell.prototype.rowId = function () {
725
- return this.dom().closest('tr').invoke('attr', 'aup-row-id');
794
+ Row.prototype.shouldBeCollapsed = function () {
795
+ this.dom().should("have.class", "aup-node-collapsed");
726
796
  };
727
- Cell.prototype.row = function () {
728
- var self = this;
729
- return new Row(this.table, {
730
- findIn: function (parent) {
731
- return self.rowId()
732
- .then(function (rowId) { return parent.dom().find(AupTable.cssSelectorForTableRowById(rowId)); });
733
- }
734
- });
735
- };
736
- return Cell;
737
- }(PageElement));
738
- AupTable.Cell = Cell;
739
- var SelectionColumnCell = /** @class */ (function (_super) {
740
- __extends(SelectionColumnCell, _super);
741
- function SelectionColumnCell() {
797
+ return Row;
798
+ }(AupTableRow));
799
+ AupTreeTable.Row = Row;
800
+ var TreeControlColumn = /** @class */ (function (_super) {
801
+ __extends(TreeControlColumn, _super);
802
+ function TreeControlColumn() {
742
803
  return _super !== null && _super.apply(this, arguments) || this;
743
804
  }
744
- return SelectionColumnCell;
745
- }(Cell));
746
- AupTable.SelectionColumnCell = SelectionColumnCell;
747
- })(exports.AupTable || (exports.AupTable = {}));
805
+ return TreeControlColumn;
806
+ }(AupTableColumn));
807
+ AupTreeTable.TreeControlColumn = TreeControlColumn;
808
+ })(exports.AupTreeTable || (exports.AupTreeTable = {}));
748
809
 
749
810
  function FormElementMixin(Base) {
750
811
  return /** @class */ (function (_super) {
@@ -854,7 +915,10 @@
854
915
  return new AupNavigation(this.parentPageElement, 'aup-list-place-nav');
855
916
  };
856
917
  Builder.prototype.aupTable = function (selectorOrBuilder, optionalBuilder) {
857
- return this.createContainerElement(exports.AupTable, selectorOrBuilder, optionalBuilder, 'aup-table');
918
+ return this.createContainerElement(AupTable, selectorOrBuilder, optionalBuilder, 'aup-table');
919
+ };
920
+ Builder.prototype.aupTreeTable = function (selectorOrBuilder, optionalBuilder) {
921
+ return this.createContainerElement(exports.AupTreeTable, selectorOrBuilder, optionalBuilder, 'aup-tree-table');
858
922
  };
859
923
  Builder.prototype.aupEmptyState = function (selectorOrBuilder, optionalBuilder) {
860
924
  return this.createContainerElement(AupEmptyState, selectorOrBuilder, optionalBuilder, 'aup-empty-state');
@@ -1176,6 +1240,16 @@
1176
1240
  return AupToolBar;
1177
1241
  }(PageElement));
1178
1242
 
1243
+ var AupTableSelectionCell = /** @class */ (function (_super) {
1244
+ __extends(AupTableSelectionCell, _super);
1245
+ function AupTableSelectionCell() {
1246
+ return _super !== null && _super.apply(this, arguments) || this;
1247
+ }
1248
+ AupTableSelectionCell.prototype.selectAll = function () {
1249
+ };
1250
+ return AupTableSelectionCell;
1251
+ }(AupTableCell));
1252
+
1179
1253
  /**
1180
1254
  * @file Automatically generated by barrelsby.
1181
1255
  */
@@ -1196,6 +1270,12 @@
1196
1270
  exports.AupMoreMenu = AupMoreMenu;
1197
1271
  exports.AupNavigation = AupNavigation;
1198
1272
  exports.AupPopupMenu = AupPopupMenu;
1273
+ exports.AupTable = AupTable;
1274
+ exports.AupTableCell = AupTableCell;
1275
+ exports.AupTableColumn = AupTableColumn;
1276
+ exports.AupTableRow = AupTableRow;
1277
+ exports.AupTableSelectionCell = AupTableSelectionCell;
1278
+ exports.AupTableSelectionColumn = AupTableSelectionColumn;
1199
1279
  exports.AupToolBar = AupToolBar;
1200
1280
  exports.Builder = Builder;
1201
1281
  exports.Button = Button;