@coolon/angular-ui-powerups 12.4.0-alpha.2 → 12.4.0-alpha.21

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 (166) hide show
  1. package/assets/empty-state.scss +11 -0
  2. package/assets/styles.scss +1 -0
  3. package/bundles/coolon-angular-ui-powerups-cypress.umd.js +643 -306
  4. package/bundles/coolon-angular-ui-powerups-cypress.umd.js.map +1 -1
  5. package/bundles/coolon-angular-ui-powerups.umd.js +7 -11
  6. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
  7. package/coolon-angular-ui-powerups.metadata.json +1 -1
  8. package/cypress/builder.d.ts +44 -0
  9. package/cypress/components/aup-abstract-activity.d.ts +9 -0
  10. package/cypress/components/aup-abstract-table.d.ts +18 -0
  11. package/cypress/components/aup-activity.d.ts +9 -0
  12. package/cypress/components/aup-alert-dialog.d.ts +7 -0
  13. package/cypress/components/aup-alert.d.ts +9 -0
  14. package/cypress/components/aup-command-face.d.ts +2 -8
  15. package/cypress/components/aup-command.d.ts +1 -1
  16. package/cypress/components/aup-empty-state.d.ts +4 -0
  17. package/cypress/components/aup-input.d.ts +11 -5
  18. package/cypress/components/aup-modal-activity.d.ts +4 -0
  19. package/cypress/components/aup-table.d.ts +5 -18
  20. package/cypress/components/aup-tree-table.d.ts +16 -0
  21. package/cypress/components/button.d.ts +10 -7
  22. package/cypress/components/form-element-mixin.d.ts +21 -0
  23. package/cypress/components/mat-checkbox.d.ts +30 -0
  24. package/cypress/components/popup/aup-abstract-popup-menu.d.ts +15 -0
  25. package/cypress/components/popup/aup-more-menu.d.ts +5 -0
  26. package/cypress/components/popup/aup-popup-menu-panel.d.ts +3 -0
  27. package/cypress/components/popup/aup-popup-menu.d.ts +7 -0
  28. package/cypress/components/table/aup-table-cell.d.ts +9 -0
  29. package/cypress/components/table/aup-table-column.d.ts +10 -0
  30. package/cypress/components/table/aup-table-row.d.ts +17 -0
  31. package/cypress/components/table/aup-table-selection-cell.d.ts +5 -0
  32. package/cypress/components/table/aup-table-selection-column.d.ts +5 -0
  33. package/cypress/coolon-angular-ui-powerups-cypress.metadata.json +1 -1
  34. package/cypress/element-locator.d.ts +8 -0
  35. package/cypress/exports.d.ts +22 -4
  36. package/cypress/page-builder.d.ts +8 -0
  37. package/cypress/page-element.d.ts +10 -12
  38. package/cypress/page.d.ts +5 -33
  39. package/esm2015/cypress/builder.js +81 -0
  40. package/esm2015/cypress/builder.js.map +1 -0
  41. package/esm2015/cypress/builder.metadata.json +1 -0
  42. package/esm2015/cypress/components/aup-abstract-activity.js +12 -0
  43. package/esm2015/cypress/components/aup-abstract-activity.js.map +1 -0
  44. package/esm2015/cypress/components/aup-abstract-activity.metadata.json +1 -0
  45. package/esm2015/cypress/components/aup-abstract-table.js +50 -0
  46. package/esm2015/cypress/components/aup-abstract-table.js.map +1 -0
  47. package/esm2015/cypress/components/aup-abstract-table.metadata.json +1 -0
  48. package/esm2015/cypress/components/aup-activity.js +13 -0
  49. package/esm2015/cypress/components/aup-activity.js.map +1 -0
  50. package/esm2015/cypress/components/aup-activity.metadata.json +1 -0
  51. package/esm2015/cypress/components/aup-alert-dialog.js +12 -0
  52. package/esm2015/cypress/components/aup-alert-dialog.js.map +1 -0
  53. package/esm2015/cypress/components/aup-alert-dialog.metadata.json +1 -0
  54. package/esm2015/cypress/components/aup-alert.js +13 -0
  55. package/esm2015/cypress/components/aup-alert.js.map +1 -0
  56. package/esm2015/cypress/components/aup-alert.metadata.json +1 -0
  57. package/esm2015/cypress/components/aup-command-face.js +11 -22
  58. package/esm2015/cypress/components/aup-command-face.js.map +1 -1
  59. package/esm2015/cypress/components/aup-command-face.metadata.json +1 -1
  60. package/esm2015/cypress/components/aup-command.js +9 -6
  61. package/esm2015/cypress/components/aup-command.js.map +1 -1
  62. package/esm2015/cypress/components/aup-command.metadata.json +1 -1
  63. package/esm2015/cypress/components/aup-empty-state.js +7 -0
  64. package/esm2015/cypress/components/aup-empty-state.js.map +1 -0
  65. package/esm2015/cypress/components/aup-empty-state.metadata.json +1 -0
  66. package/esm2015/cypress/components/aup-input.js +17 -5
  67. package/esm2015/cypress/components/aup-input.js.map +1 -1
  68. package/esm2015/cypress/components/aup-input.metadata.json +1 -1
  69. package/esm2015/cypress/components/aup-modal-activity.js +7 -0
  70. package/esm2015/cypress/components/aup-modal-activity.js.map +1 -0
  71. package/esm2015/cypress/components/aup-modal-activity.metadata.json +1 -0
  72. package/esm2015/cypress/components/aup-navigation.js +1 -1
  73. package/esm2015/cypress/components/aup-navigation.js.map +1 -1
  74. package/esm2015/cypress/components/aup-table.js +5 -33
  75. package/esm2015/cypress/components/aup-table.js.map +1 -1
  76. package/esm2015/cypress/components/aup-table.metadata.json +1 -1
  77. package/esm2015/cypress/components/aup-tree-table.js +34 -0
  78. package/esm2015/cypress/components/aup-tree-table.js.map +1 -0
  79. package/esm2015/cypress/components/aup-tree-table.metadata.json +1 -0
  80. package/esm2015/cypress/components/button.js +4 -10
  81. package/esm2015/cypress/components/button.js.map +1 -1
  82. package/esm2015/cypress/components/button.metadata.json +1 -1
  83. package/esm2015/cypress/components/form-element-mixin.js +11 -0
  84. package/esm2015/cypress/components/form-element-mixin.js.map +1 -0
  85. package/esm2015/cypress/components/form-element-mixin.metadata.json +1 -0
  86. package/esm2015/cypress/components/mat-checkbox.js +34 -0
  87. package/esm2015/cypress/components/mat-checkbox.js.map +1 -0
  88. package/esm2015/cypress/components/mat-checkbox.metadata.json +1 -0
  89. package/esm2015/cypress/components/popup/aup-abstract-popup-menu.js +33 -0
  90. package/esm2015/cypress/components/popup/aup-abstract-popup-menu.js.map +1 -0
  91. package/esm2015/cypress/components/popup/aup-abstract-popup-menu.metadata.json +1 -0
  92. package/esm2015/cypress/components/popup/aup-more-menu.js +8 -0
  93. package/esm2015/cypress/components/popup/aup-more-menu.js.map +1 -0
  94. package/esm2015/cypress/components/popup/aup-more-menu.metadata.json +1 -0
  95. package/esm2015/cypress/components/popup/aup-popup-menu-panel.js +4 -0
  96. package/esm2015/cypress/components/popup/aup-popup-menu-panel.js.map +1 -0
  97. package/esm2015/cypress/components/popup/aup-popup-menu-panel.metadata.json +1 -0
  98. package/esm2015/cypress/components/popup/aup-popup-menu.js +12 -0
  99. package/esm2015/cypress/components/popup/aup-popup-menu.js.map +1 -0
  100. package/esm2015/cypress/components/popup/aup-popup-menu.metadata.json +1 -0
  101. package/esm2015/cypress/components/table/aup-table-cell.js +14 -0
  102. package/esm2015/cypress/components/table/aup-table-cell.js.map +1 -0
  103. package/esm2015/cypress/components/table/aup-table-cell.metadata.json +1 -0
  104. package/esm2015/cypress/components/table/aup-table-column.js +19 -0
  105. package/esm2015/cypress/components/table/aup-table-column.js.map +1 -0
  106. package/esm2015/cypress/components/table/aup-table-column.metadata.json +1 -0
  107. package/esm2015/cypress/components/table/aup-table-row.js +28 -0
  108. package/esm2015/cypress/components/table/aup-table-row.js.map +1 -0
  109. package/esm2015/cypress/components/table/aup-table-row.metadata.json +1 -0
  110. package/esm2015/cypress/components/table/aup-table-selection-cell.js +6 -0
  111. package/esm2015/cypress/components/table/aup-table-selection-cell.js.map +1 -0
  112. package/esm2015/cypress/components/table/aup-table-selection-cell.metadata.json +1 -0
  113. package/esm2015/cypress/components/table/aup-table-selection-column.js +6 -0
  114. package/esm2015/cypress/components/table/aup-table-selection-column.js.map +1 -0
  115. package/esm2015/cypress/components/table/aup-table-selection-column.metadata.json +1 -0
  116. package/esm2015/cypress/element-locator.js +16 -0
  117. package/esm2015/cypress/element-locator.js.map +1 -0
  118. package/esm2015/cypress/element-locator.metadata.json +1 -0
  119. package/esm2015/cypress/exports.js +22 -4
  120. package/esm2015/cypress/exports.js.map +1 -1
  121. package/esm2015/cypress/exports.metadata.json +1 -1
  122. package/esm2015/cypress/page-builder.js +15 -0
  123. package/esm2015/cypress/page-builder.js.map +1 -0
  124. package/esm2015/cypress/page-builder.metadata.json +1 -0
  125. package/esm2015/cypress/page-element.js +22 -19
  126. package/esm2015/cypress/page-element.js.map +1 -1
  127. package/esm2015/cypress/page-element.metadata.json +1 -1
  128. package/esm2015/cypress/page.js +8 -10
  129. package/esm2015/cypress/page.js.map +1 -1
  130. package/esm2015/cypress/page.metadata.json +1 -1
  131. package/esm2015/cypress/path.js +3 -1
  132. package/esm2015/cypress/path.js.map +1 -1
  133. package/esm2015/lib/components/empty-state/empty-state.component.js +1 -1
  134. package/esm2015/lib/components/empty-state/empty-state.component.metadata.json +1 -1
  135. package/esm2015/lib/components/tables/tree-table/flattened-tree-list-model.js +4 -4
  136. package/esm2015/lib/components/tables/tree-table/flattened-tree-list-model.js.map +1 -1
  137. package/esm2015/lib/components/tables/tree-table/flattened-tree-list-model.metadata.json +1 -1
  138. package/esm2015/lib/components/tables/tree-table/tree-table-model.js +1 -0
  139. package/esm2015/lib/components/tables/tree-table/tree-table-model.js.map +1 -1
  140. package/esm2015/lib/components/tables/tree-table/tree-table-model.metadata.json +1 -1
  141. package/esm2015/lib/place/url-snapshot.js +1 -7
  142. package/esm2015/lib/place/url-snapshot.js.map +1 -1
  143. package/esm2015/lib/place/url-snapshot.metadata.json +1 -1
  144. package/fesm2015/coolon-angular-ui-powerups-cypress.js +482 -221
  145. package/fesm2015/coolon-angular-ui-powerups-cypress.js.map +1 -1
  146. package/fesm2015/coolon-angular-ui-powerups.js +7 -11
  147. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  148. package/lib/components/tables/tree-table/flattened-tree-list-model.d.ts +0 -1
  149. package/lib/components/tables/tree-table/tree-table-model.d.ts +4 -5
  150. package/package.json +1 -1
  151. package/cypress/components/aup-more-menu.d.ts +0 -4
  152. package/cypress/components/aup-popup-menu.d.ts +0 -7
  153. package/cypress/components/button-mixin.d.ts +0 -19
  154. package/cypress/section.d.ts +0 -51
  155. package/esm2015/cypress/components/aup-more-menu.js +0 -7
  156. package/esm2015/cypress/components/aup-more-menu.js.map +0 -1
  157. package/esm2015/cypress/components/aup-more-menu.metadata.json +0 -1
  158. package/esm2015/cypress/components/aup-popup-menu.js +0 -19
  159. package/esm2015/cypress/components/aup-popup-menu.js.map +0 -1
  160. package/esm2015/cypress/components/aup-popup-menu.metadata.json +0 -1
  161. package/esm2015/cypress/components/button-mixin.js +0 -15
  162. package/esm2015/cypress/components/button-mixin.js.map +0 -1
  163. package/esm2015/cypress/components/button-mixin.metadata.json +0 -1
  164. package/esm2015/cypress/section.js +0 -58
  165. package/esm2015/cypress/section.js.map +0 -1
  166. package/esm2015/cypress/section.metadata.json +0 -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;
@@ -26,53 +26,6 @@
26
26
 
27
27
  var ___namespace = /*#__PURE__*/_interopNamespace(_);
28
28
 
29
- var PageElement = /** @class */ (function () {
30
- function PageElement(parent, selector) {
31
- this.parentElementAccessor = parent instanceof PageElement ? function () { return parent.element(); } : parent;
32
- this.elementAccessStrategy = ___namespace.isString(selector) ? {
33
- findIn: function (p) { return p.find(selector); },
34
- shouldNotExist: function (p) { return p.should('not.have', selector); }
35
- } : selector;
36
- }
37
- PageElement.prototype.element = function () {
38
- var parent = this.getParentElement();
39
- return parent ? this.elementAccessStrategy.findIn(parent) : undefined;
40
- };
41
- PageElement.prototype.getParentElement = function () {
42
- return this.parentElementAccessor ? this.parentElementAccessor() : undefined;
43
- };
44
- PageElement.prototype.find = function (selector) {
45
- var _this = this;
46
- return new PageElement(function () { return _this.element(); }, selector);
47
- };
48
- PageElement.prototype.click = function (text) {
49
- text ? this.element().contains(text).click() : this.element().click();
50
- };
51
- Object.defineProperty(PageElement.prototype, "should", {
52
- get: function () {
53
- return this.getShoulder(this.getShouldElement());
54
- },
55
- enumerable: false,
56
- configurable: true
57
- });
58
- PageElement.prototype.getShoulder = function (element) {
59
- return element.should.bind(element);
60
- };
61
- PageElement.prototype.getShouldElement = function () {
62
- return this.element();
63
- };
64
- PageElement.prototype.shouldBeVisible = function () {
65
- this.should('be.visible');
66
- };
67
- PageElement.prototype.shouldNotBeVisible = function () {
68
- if (!this.elementAccessStrategy.shouldNotExist) {
69
- typescriptUtilities.lang.abstractMethod(this.constructor);
70
- }
71
- this.elementAccessStrategy.shouldNotExist(this.getParentElement());
72
- };
73
- return PageElement;
74
- }());
75
-
76
29
  /*! *****************************************************************************
77
30
  Copyright (c) Microsoft Corporation.
78
31
 
@@ -385,112 +338,100 @@
385
338
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
386
339
  }
387
340
 
388
- var urlSerialiser = new router.DefaultUrlSerializer();
389
- exports.Path = /** @class */ (function () {
390
- function Path(segments) {
391
- this.segments = segments;
341
+ exports.ElementLocator = void 0;
342
+ (function (ElementLocator) {
343
+ function findByCssSelector(selector) {
344
+ return function (parent) { return parent.dom().find(selector); };
392
345
  }
393
- Path.extractVisitParameters = function (url) {
394
- var result = {};
395
- var urlTree = urlSerialiser.parse(url);
396
- urlTree.root.children.primary.segments.forEach(function (s) {
397
- result = Object.assign(Object.assign({}, result), s.parameters);
398
- });
399
- return result;
346
+ ElementLocator.findByCssSelector = findByCssSelector;
347
+ function findByTextContent(text) {
348
+ return function (parent) { return parent.dom().contains(text); };
349
+ }
350
+ ElementLocator.findByTextContent = findByTextContent;
351
+ function findBySelectorAndTextContent(selector, text) {
352
+ return function (parent) { return parent.dom().contains(selector, text); };
353
+ }
354
+ ElementLocator.findBySelectorAndTextContent = findBySelectorAndTextContent;
355
+ })(exports.ElementLocator || (exports.ElementLocator = {}));
356
+
357
+ var PageElement = /** @class */ (function () {
358
+ function PageElement(parent, selectorOrLocator) {
359
+ this.parent = parent;
360
+ var selector = selectorOrLocator !== null && selectorOrLocator !== void 0 ? selectorOrLocator : this.getDefaultSelector();
361
+ this.domElementLocator = ___namespace.isString(selector) ?
362
+ exports.ElementLocator.findByCssSelector(selector) :
363
+ selector;
364
+ }
365
+ PageElement.prototype.getDefaultSelector = function () {
366
+ return typescriptUtilities.Stringy.from(this.constructor.name).dasherize().toString();
400
367
  };
401
- Path.prototype.toUrl = function (matrixParams) {
402
- return this.segments.map(function (s) { return s.toUrlPart(matrixParams); }).join('/');
368
+ PageElement.prototype.dom = function () {
369
+ return this.domElementLocator(this.parent);
403
370
  };
404
- return Path;
371
+ PageElement.prototype.find = function (selector) {
372
+ return new PageElement(this, selector);
373
+ };
374
+ PageElement.prototype.click = function (text) {
375
+ text ? this.dom().contains(text).click() : this.dom().click();
376
+ };
377
+ Object.defineProperty(PageElement.prototype, "should", {
378
+ get: function () {
379
+ return this.getShoulder(this.getShouldElement());
380
+ },
381
+ enumerable: false,
382
+ configurable: true
383
+ });
384
+ PageElement.prototype.getShoulder = function (element) {
385
+ return element.should.bind(element);
386
+ };
387
+ PageElement.prototype.getShouldElement = function () {
388
+ return this.dom();
389
+ };
390
+ PageElement.prototype.shouldBeVisible = function () {
391
+ this.should('be.visible');
392
+ };
393
+ PageElement.prototype.shouldNotBeVisible = function () {
394
+ this.should('not.be.visible');
395
+ };
396
+ PageElement.prototype.shouldExist = function () {
397
+ this.dom().should('exist');
398
+ };
399
+ PageElement.prototype.shouldNotExist = function () {
400
+ this.dom().should('not.exist');
401
+ };
402
+ return PageElement;
405
403
  }());
406
- (function (Path) {
407
- function setUrlSerialiser(serialiser) {
408
- urlSerialiser = serialiser;
409
- }
410
- Path.setUrlSerialiser = setUrlSerialiser;
411
- var Segment = /** @class */ (function () {
412
- function Segment(path, params) {
413
- if (params === void 0) { params = {}; }
414
- var _a;
415
- this.path = path;
416
- this.routeId = params === null || params === void 0 ? void 0 : params.routeId;
417
- this.visitParams = (_a = params === null || params === void 0 ? void 0 : params.visitParams) !== null && _a !== void 0 ? _a : [];
418
- }
419
- Segment.prototype.toUrlPart = function (params) {
420
- var path = this.path;
421
- this.visitParams.forEach(function (p) {
422
- var value = params[p];
423
- if (value) {
424
- path = path + ";" + p + "=" + value;
425
- }
426
- });
427
- if (this.routeId && params[this.routeId]) {
428
- path = path + '/' + params[this.routeId];
429
- }
430
- return path;
431
- };
432
- return Segment;
433
- }());
434
- Path.Segment = Segment;
435
- var Builder = /** @class */ (function () {
436
- function Builder() {
437
- this.segments = [];
438
- }
439
- Builder.prototype.segment = function (name, params) {
440
- var builder = new Segment(name, params);
441
- this.segments.push(builder);
442
- return this;
443
- };
444
- Builder.prototype.getPath = function () {
445
- return new Path(this.segments);
446
- };
447
- return Builder;
448
- }());
449
- Path.Builder = Builder;
450
- })(exports.Path || (exports.Path = {}));
451
404
 
452
- var FaceAccessor = /** @class */ (function () {
453
- function FaceAccessor(face) {
454
- this.face = face;
455
- }
456
- FaceAccessor.prototype.findIn = function (parent) {
457
- return this.face.text ?
458
- parent.contains("aup-command-face", this.face.text()) :
459
- this.face.icon ?
460
- parent.find("aup-icon[ng-reflect-icon=" + this.face.icon() + "]").closest('aup-command-face') :
461
- undefined;
462
- };
463
- FaceAccessor.prototype.shouldNotExist = function (parent) {
464
- return this.face.text ?
465
- parent.should('not.contain', "aup-command-face", this.face.text()) :
466
- this.face.icon ?
467
- parent.should('not.contain', "aup-icon[ng-reflect-icon=" + this.face.icon() + "]") :
468
- undefined;
469
- };
470
- return FaceAccessor;
471
- }());
472
405
  var AupCommandFace = /** @class */ (function (_super) {
473
406
  __extends(AupCommandFace, _super);
474
407
  function AupCommandFace(parentElement, face) {
475
- return _super.call(this, function () { return parentElement.element(); }, AupCommandFace.createAccessor(face)) || this;
408
+ return _super.call(this, parentElement, AupCommandFace.createElementLocator(face)) || this;
476
409
  }
477
- AupCommandFace.createAccessor = function (face) {
478
- return new FaceAccessor(face);
410
+ AupCommandFace.createElementLocator = function (face) {
411
+ var locator = function (parent) {
412
+ return face.text ?
413
+ parent.dom().contains("aup-command-face", face.text()) :
414
+ face.icon ?
415
+ parent.dom().find("aup-icon[ng-reflect-icon=" + face.icon() + "]").closest('aup-command-face') :
416
+ undefined;
417
+ };
418
+ // aot compiler doesn't like lambas
419
+ return locator;
479
420
  };
480
421
  return AupCommandFace;
481
422
  }(PageElement));
482
423
 
483
424
  var AupCommand = /** @class */ (function (_super) {
484
425
  __extends(AupCommand, _super);
485
- function AupCommand(parent, face) {
486
- var _this = this;
487
- var faceAccessor = AupCommandFace.createAccessor(face);
488
- _this = _super.call(this, parent, {
489
- findIn: function (parentElement) {
490
- return faceAccessor.findIn(parentElement).closest('aup-command');
426
+ function AupCommand(parent, faceOrSelector) {
427
+ return _super.call(this, parent, function (parentElement) {
428
+ if (___namespace.isString(faceOrSelector)) {
429
+ return parentElement.dom().find(faceOrSelector);
430
+ }
431
+ else {
432
+ return AupCommandFace.createElementLocator(faceOrSelector)(parentElement).closest('aup-command');
491
433
  }
492
434
  }) || this;
493
- return _this;
494
435
  }
495
436
  AupCommand.prototype.click = function () {
496
437
  this.getButton().click();
@@ -502,24 +443,35 @@
502
443
  this.getButton().should('be.disabled');
503
444
  };
504
445
  AupCommand.prototype.getButton = function () {
505
- return this.element().find('button');
446
+ return this.dom().find('button');
506
447
  };
507
448
  return AupCommand;
508
449
  }(PageElement));
509
450
 
451
+ var AupEmptyState = /** @class */ (function (_super) {
452
+ __extends(AupEmptyState, _super);
453
+ function AupEmptyState() {
454
+ return _super !== null && _super.apply(this, arguments) || this;
455
+ }
456
+ AupEmptyState.prototype.shouldContainText = function (text) {
457
+ this.dom().should("contain.text", text);
458
+ };
459
+ return AupEmptyState;
460
+ }(PageElement));
461
+
510
462
  exports.AupInput = /** @class */ (function (_super) {
511
463
  __extends(AupInput, _super);
512
464
  function AupInput() {
513
465
  return _super !== null && _super.apply(this, arguments) || this;
514
466
  }
515
467
  AupInput.prototype.label = function () {
516
- return this.element().find('label');
468
+ return this.dom().find('label');
517
469
  };
518
470
  AupInput.prototype.hint = function () {
519
- return this.element().find('mat-hint');
471
+ return this.dom().find('mat-hint');
520
472
  };
521
473
  AupInput.prototype.error = function () {
522
- return this.element().find('mat-error');
474
+ return this.dom().find('mat-error');
523
475
  };
524
476
  Object.defineProperty(AupInput.prototype, "labelShould", {
525
477
  get: function () {
@@ -551,6 +503,18 @@
551
503
  AupInput.prototype.errorShouldBe = function (text) {
552
504
  return this.errorShould("have.text", text);
553
505
  };
506
+ AupInput.prototype.shouldBeFocused = function () {
507
+ this.input().should("have.focus");
508
+ };
509
+ AupInput.prototype.shouldNotBeFocused = function () {
510
+ this.input().should("not.have.focus");
511
+ };
512
+ AupInput.prototype.type = function (characters) {
513
+ this.input().type(characters);
514
+ };
515
+ AupInput.prototype.hitEnter = function () {
516
+ this.type("{enter}");
517
+ };
554
518
  return AupInput;
555
519
  }(PageElement));
556
520
  (function (AupInput) {
@@ -560,7 +524,7 @@
560
524
  return _super !== null && _super.apply(this, arguments) || this;
561
525
  }
562
526
  HtmlInput.prototype.input = function () {
563
- return this.element().find('input');
527
+ return this.dom().find('input');
564
528
  };
565
529
  HtmlInput.prototype.clear = function () {
566
530
  this.input().clear();
@@ -586,7 +550,7 @@
586
550
  return this.input();
587
551
  };
588
552
  TextAreaInput.prototype.input = function () {
589
- return this.element().find('textarea');
553
+ return this.dom().find('textarea');
590
554
  };
591
555
  TextAreaInput.prototype.clear = function () {
592
556
  this.input().clear();
@@ -602,6 +566,59 @@
602
566
  AupInput.TextAreaInput = TextAreaInput;
603
567
  })(exports.AupInput || (exports.AupInput = {}));
604
568
 
569
+ var AupPopupMenuPanel = /** @class */ (function (_super) {
570
+ __extends(AupPopupMenuPanel, _super);
571
+ function AupPopupMenuPanel() {
572
+ return _super !== null && _super.apply(this, arguments) || this;
573
+ }
574
+ return AupPopupMenuPanel;
575
+ }(PageElement));
576
+
577
+ var AupAbstractPopupMenu = /** @class */ (function (_super) {
578
+ __extends(AupAbstractPopupMenu, _super);
579
+ function AupAbstractPopupMenu(parent, locator) {
580
+ var _this = _super.call(this, parent, locator) || this;
581
+ _this.popup = new AupPopupMenuPanel(_this, function (p) { return _this.findPopupIn(p); });
582
+ return _this;
583
+ }
584
+ AupAbstractPopupMenu.prototype.findPopupIn = function (p) {
585
+ return this.getOverlay().find('.mat-menu-panel');
586
+ };
587
+ AupAbstractPopupMenu.prototype.getOverlay = function () {
588
+ return this.dom().closest('body').find('.cdk-overlay-container');
589
+ };
590
+ AupAbstractPopupMenu.prototype.getBackdrop = function () {
591
+ return this.getOverlay().find('.cdk-overlay-backdrop');
592
+ };
593
+ AupAbstractPopupMenu.prototype.openPopup = function () {
594
+ this.shouldNotBeOpen();
595
+ this.click();
596
+ return this.popup;
597
+ };
598
+ AupAbstractPopupMenu.prototype.closePopup = function () {
599
+ this.shouldBeOpen();
600
+ this.getBackdrop().click();
601
+ };
602
+ AupAbstractPopupMenu.prototype.shouldBeOpen = function () {
603
+ this.popup.shouldBeVisible();
604
+ };
605
+ AupAbstractPopupMenu.prototype.shouldNotBeOpen = function () {
606
+ this.dom().closest('body').find('.mat-menu-panel').should("not.exist");
607
+ };
608
+ return AupAbstractPopupMenu;
609
+ }(PageElement));
610
+
611
+ var AupMoreMenu = /** @class */ (function (_super) {
612
+ __extends(AupMoreMenu, _super);
613
+ function AupMoreMenu() {
614
+ return _super !== null && _super.apply(this, arguments) || this;
615
+ }
616
+ AupMoreMenu.create = function (parent, selector) {
617
+ return new AupMoreMenu(parent, exports.ElementLocator.findByCssSelector(selector !== null && selector !== void 0 ? selector : 'aup-more-menu'));
618
+ };
619
+ return AupMoreMenu;
620
+ }(AupAbstractPopupMenu));
621
+
605
622
  var AupNavigation = /** @class */ (function (_super) {
606
623
  __extends(AupNavigation, _super);
607
624
  function AupNavigation() {
@@ -617,61 +634,197 @@
617
634
  this.face(label).shouldBeVisible();
618
635
  };
619
636
  AupNavigation.prototype.shouldNotHaveLink = function (label) {
620
- this.face(label).shouldNotBeVisible();
637
+ this.face(label).shouldNotExist();
621
638
  };
622
639
  return AupNavigation;
623
640
  }(PageElement));
624
641
 
625
- exports.AupTable = /** @class */ (function (_super) {
626
- __extends(AupTable, _super);
627
- function AupTable(parentElementAccessor, selector) {
628
- return _super.call(this, parentElementAccessor, selector) || this;
642
+ var AupTableCell = /** @class */ (function (_super) {
643
+ __extends(AupTableCell, _super);
644
+ function AupTableCell() {
645
+ return _super !== null && _super.apply(this, arguments) || this;
629
646
  }
630
- AupTable.prototype.row = function (rowId) {
631
- var _this = this;
632
- return new AupTable.Row(function () { return _this.element(); }, "tr[aup-table-id=" + rowId + "]");
647
+ AupTableCell.prototype.rowId = function () {
648
+ return this.dom().closest('tr').invoke('attr', 'aup-row-id');
633
649
  };
634
- AupTable.prototype.column = function (columnId) {
635
- return new AupTable.Column(this, columnId);
650
+ AupTableCell.prototype.row = function () {
651
+ var self = this;
652
+ return this.parent.createRow(function (parent) {
653
+ return self.rowId().then(function (rowId) { return parent.dom().find(exports.AupAbstractTable.cssSelectorForTableRowById(rowId)); });
654
+ });
636
655
  };
637
- return AupTable;
656
+ return AupTableCell;
657
+ }(PageElement));
658
+
659
+ var AupTableColumn = /** @class */ (function (_super) {
660
+ __extends(AupTableColumn, _super);
661
+ function AupTableColumn(table, columnId) {
662
+ var _this = _super.call(this, table, exports.AupAbstractTable.cssSelectorForColumnCellRendererById(columnId)) || this;
663
+ _this.columnId = columnId;
664
+ return _this;
665
+ }
666
+ AupTableColumn.prototype.cellContaining = function (content) {
667
+ var self = this;
668
+ return new AupTableCell(this.parent, function (parent) {
669
+ return parent.dom().contains(exports.AupAbstractTable.cssSelectorForColumnCellRendererById(self.columnId), content);
670
+ });
671
+ };
672
+ AupTableColumn.prototype.rowContaining = function (content) {
673
+ return this.cellContaining(content).row();
674
+ };
675
+ return AupTableColumn;
676
+ }(PageElement));
677
+
678
+ var AupTableSelectionColumn = /** @class */ (function (_super) {
679
+ __extends(AupTableSelectionColumn, _super);
680
+ function AupTableSelectionColumn() {
681
+ return _super !== null && _super.apply(this, arguments) || this;
682
+ }
683
+ AupTableSelectionColumn.prototype.selectAll = function () {
684
+ };
685
+ return AupTableSelectionColumn;
686
+ }(AupTableColumn));
687
+
688
+ exports.AupAbstractTable = /** @class */ (function (_super) {
689
+ __extends(AupAbstractTable, _super);
690
+ function AupAbstractTable() {
691
+ return _super !== null && _super.apply(this, arguments) || this;
692
+ }
693
+ AupAbstractTable.prototype.row = function (rowId) {
694
+ return this.createRow(function (parent) {
695
+ return parent.dom().find(AupAbstractTable.cssSelectorForTableRowById(rowId));
696
+ });
697
+ };
698
+ AupAbstractTable.prototype.rowNumber = function (rowNumber) {
699
+ return this.createRow(function (parent) {
700
+ return parent.dom().find(AupAbstractTable.cssSelectorForNthTableRow(rowNumber));
701
+ });
702
+ };
703
+ AupAbstractTable.prototype.column = function (columnId) {
704
+ return new AupTableColumn(this, columnId);
705
+ };
706
+ Object.defineProperty(AupAbstractTable.prototype, "selectionColumn", {
707
+ get: function () {
708
+ return new AupTableSelectionColumn(this, 'selection-column');
709
+ },
710
+ enumerable: false,
711
+ configurable: true
712
+ });
713
+ return AupAbstractTable;
638
714
  }(PageElement));
639
- (function (AupTable) {
715
+ __decorate([
716
+ src.Memoize(),
717
+ __metadata("design:type", AupTableSelectionColumn),
718
+ __metadata("design:paramtypes", [])
719
+ ], exports.AupAbstractTable.prototype, "selectionColumn", null);
720
+ (function (AupAbstractTable) {
721
+ function cssSelectorForTableRowById(rowId) {
722
+ return "tbody tr[aup-row-id=" + rowId + "]";
723
+ }
724
+ AupAbstractTable.cssSelectorForTableRowById = cssSelectorForTableRowById;
725
+ function cssSelectorForNthTableRow(rowNumber) {
726
+ return "tbody tr:nth-child(" + rowNumber + ")";
727
+ }
728
+ AupAbstractTable.cssSelectorForNthTableRow = cssSelectorForNthTableRow;
729
+ function cssSelectorForColumnCellRendererById(columnOrId) {
730
+ var columnId = ___namespace.isString(columnOrId) ? columnOrId : columnOrId.columnId;
731
+ return "aup-table-cell-renderer[column-id=" + columnId + "]";
732
+ }
733
+ AupAbstractTable.cssSelectorForColumnCellRendererById = cssSelectorForColumnCellRendererById;
734
+ function cssSelectorForCell(rowId, columnOrId) {
735
+ return cssSelectorForTableRowById(rowId) + " " + cssSelectorForColumnCellRendererById(columnOrId);
736
+ }
737
+ AupAbstractTable.cssSelectorForCell = cssSelectorForCell;
738
+ })(exports.AupAbstractTable || (exports.AupAbstractTable = {}));
739
+
740
+ var AupTableRow = /** @class */ (function (_super) {
741
+ __extends(AupTableRow, _super);
742
+ function AupTableRow() {
743
+ return _super !== null && _super.apply(this, arguments) || this;
744
+ }
745
+ AupTableRow.prototype.rowId = function () {
746
+ return this.dom()
747
+ .invoke('attr', 'aup-row-id');
748
+ };
749
+ AupTableRow.prototype.shouldHaveRowId = function (rowId) {
750
+ this.rowId().should('eq', rowId);
751
+ };
752
+ AupTableRow.prototype.cell = function (columnOrId) {
753
+ var self = this;
754
+ return new AupTableCell(this.parent, function (parent) {
755
+ return self.rowId()
756
+ .then(function (rowId) { return exports.AupAbstractTable.cssSelectorForCell(rowId, columnOrId); })
757
+ .then(function (selector) { return parent.dom().find(selector); });
758
+ });
759
+ };
760
+ AupTableRow.prototype.shouldBeSelected = function () {
761
+ this.dom().should('have.class', 'aup-row-selected');
762
+ };
763
+ AupTableRow.prototype.shouldNotBeSelected = function () {
764
+ this.dom().should('not.have.class', 'aup-row-selected');
765
+ };
766
+ return AupTableRow;
767
+ }(PageElement));
768
+
769
+ var AupTable = /** @class */ (function (_super) {
770
+ __extends(AupTable, _super);
771
+ function AupTable() {
772
+ return _super !== null && _super.apply(this, arguments) || this;
773
+ }
774
+ AupTable.prototype.createRow = function (locator) {
775
+ return new AupTableRow(this, locator);
776
+ };
777
+ return AupTable;
778
+ }(exports.AupAbstractTable));
779
+
780
+ exports.AupTreeTable = /** @class */ (function (_super) {
781
+ __extends(AupTreeTable, _super);
782
+ function AupTreeTable() {
783
+ return _super !== null && _super.apply(this, arguments) || this;
784
+ }
785
+ Object.defineProperty(AupTreeTable.prototype, "treeControlColumn", {
786
+ get: function () {
787
+ return new AupTreeTable.TreeControlColumn(this, 'tree-label');
788
+ },
789
+ enumerable: false,
790
+ configurable: true
791
+ });
792
+ AupTreeTable.prototype.createRow = function (locator) {
793
+ return new AupTreeTable.Row(this, locator);
794
+ };
795
+ return AupTreeTable;
796
+ }(exports.AupAbstractTable));
797
+ __decorate([
798
+ src.Memoize(),
799
+ __metadata("design:type", exports.AupTreeTable.TreeControlColumn),
800
+ __metadata("design:paramtypes", [])
801
+ ], exports.AupTreeTable.prototype, "treeControlColumn", null);
802
+ (function (AupTreeTable) {
640
803
  var Row = /** @class */ (function (_super) {
641
804
  __extends(Row, _super);
642
805
  function Row() {
643
806
  return _super !== null && _super.apply(this, arguments) || this;
644
807
  }
645
- return Row;
646
- }(PageElement));
647
- AupTable.Row = Row;
648
- var Column = /** @class */ (function () {
649
- function Column(table, columnId) {
650
- this.table = table;
651
- this.columnId = columnId;
652
- }
653
- Column.prototype.cell = function (content) {
654
- var self = this;
655
- return new Cell(this.table, {
656
- findIn: function (parent) {
657
- return parent.contains("aup-table-cell-renderer[column-id=" + self.columnId + "]", content);
658
- }
659
- });
808
+ Row.prototype.shouldBeExpanded = function () {
809
+ this.dom().should("not.have.class", "aup-node-collapsed");
660
810
  };
661
- return Column;
662
- }());
663
- AupTable.Column = Column;
664
- var Cell = /** @class */ (function (_super) {
665
- __extends(Cell, _super);
666
- function Cell() {
811
+ Row.prototype.shouldBeCollapsed = function () {
812
+ this.dom().should("have.class", "aup-node-collapsed");
813
+ };
814
+ return Row;
815
+ }(AupTableRow));
816
+ AupTreeTable.Row = Row;
817
+ var TreeControlColumn = /** @class */ (function (_super) {
818
+ __extends(TreeControlColumn, _super);
819
+ function TreeControlColumn() {
667
820
  return _super !== null && _super.apply(this, arguments) || this;
668
821
  }
669
- return Cell;
670
- }(PageElement));
671
- AupTable.Cell = Cell;
672
- })(exports.AupTable || (exports.AupTable = {}));
822
+ return TreeControlColumn;
823
+ }(AupTableColumn));
824
+ AupTreeTable.TreeControlColumn = TreeControlColumn;
825
+ })(exports.AupTreeTable || (exports.AupTreeTable = {}));
673
826
 
674
- function ButtonMixin(Base) {
827
+ function FormElementMixin(Base) {
675
828
  return /** @class */ (function (_super) {
676
829
  __extends(class_1, _super);
677
830
  function class_1() {
@@ -681,12 +834,8 @@
681
834
  }
682
835
  return _super.apply(this, __spreadArray([], __read(args))) || this;
683
836
  }
684
- class_1.prototype.click = function () {
685
- return this.element().click();
686
- };
687
837
  class_1.prototype.shouldBeDisabled = function () {
688
838
  this.should("be.disabled");
689
- // this.should("have.css", "color", "rgba(0,0,0,0.26)")
690
839
  };
691
840
  return class_1;
692
841
  }(Base));
@@ -695,88 +844,275 @@
695
844
  var Button = /** @class */ (function (_super) {
696
845
  __extends(Button, _super);
697
846
  function Button(parentElementAccessor, buttonText) {
698
- return _super.call(this, parentElementAccessor, {
699
- findIn: function (parent) {
700
- return parent.contains('button', buttonText);
701
- },
702
- shouldNotExist: function (parent) {
703
- return parent.should('not.contain', buttonText);
704
- }
705
- }) || this;
847
+ return _super.call(this, parentElementAccessor, exports.ElementLocator.findBySelectorAndTextContent('button', buttonText)) || this;
706
848
  }
707
849
  return Button;
708
- }(ButtonMixin(PageElement)));
709
-
710
- exports.Section = void 0;
711
- (function (Section) {
712
- function Mixin(Base) {
713
- return /** @class */ (function (_super) {
714
- __extends(class_1, _super);
715
- function class_1() {
716
- return _super !== null && _super.apply(this, arguments) || this;
850
+ }(FormElementMixin(PageElement)));
851
+
852
+ var MatCheckbox = /** @class */ (function (_super) {
853
+ __extends(MatCheckbox, _super);
854
+ function MatCheckbox(parentElementAccessor, text) {
855
+ return _super.call(this, parentElementAccessor, exports.ElementLocator.findBySelectorAndTextContent('mat-checkbox', text)) || this;
856
+ }
857
+ MatCheckbox.prototype.shouldBeChecked = function () {
858
+ this.hiddenCheckBoxElement().should('be.checked');
859
+ };
860
+ MatCheckbox.prototype.shouldNotBeChecked = function () {
861
+ this.hiddenCheckBoxElement().should('not.be.checked');
862
+ };
863
+ MatCheckbox.prototype.hiddenCheckBoxElement = function () {
864
+ return this.dom().find('input[type=checkbox]');
865
+ };
866
+ MatCheckbox.prototype.check = function () {
867
+ var _this = this;
868
+ this.hiddenCheckBoxElement().then(function (el) {
869
+ if (!el.prop('checked')) {
870
+ _this.click();
871
+ _this.shouldBeChecked();
717
872
  }
718
- class_1.prototype.section = function (selector, section) {
719
- var _this = this;
720
- var impl = new Impl(function () { return _this.element(); }, selector);
721
- return typescriptUtilities.Mixin.createProxy(section(impl), impl);
722
- };
723
- class_1.prototype.find = function (selector) {
724
- var _this = this;
725
- return new PageElement(function () { return _this.element(); }, selector);
726
- };
727
- class_1.prototype.contains = function (text) {
728
- var _this = this;
729
- return new PageElement(function () { return _this.element(); }, {
730
- findIn: function (parent) { return parent.contains(text); },
731
- shouldNotExist: function (parent) { return parent.should('not.contain', text); }
732
- });
733
- };
734
- class_1.prototype.button = function (text) {
735
- var _this = this;
736
- return new Button(function () { return _this.element(); }, text);
737
- };
738
- class_1.prototype.aupStringInput = function (selector) {
739
- var _this = this;
740
- return new exports.AupInput.HtmlInput(function () { return _this.element(); }, selector !== null && selector !== void 0 ? selector : 'aup-string-input');
741
- };
742
- class_1.prototype.aupTextInput = function (selector) {
743
- var _this = this;
744
- return new exports.AupInput.TextAreaInput(function () { return _this.element(); }, selector !== null && selector !== void 0 ? selector : 'aup-text-input');
745
- };
746
- class_1.prototype.aupPasswordInput = function (selector) {
747
- var _this = this;
748
- return new exports.AupInput.HtmlInput(function () { return _this.element(); }, selector !== null && selector !== void 0 ? selector : 'aup-password-input');
749
- };
750
- class_1.prototype.aupNumberInput = function (selector) {
751
- var _this = this;
752
- return new exports.AupInput.HtmlInput(function () { return _this.element(); }, selector !== null && selector !== void 0 ? selector : 'aup-number-input');
753
- };
754
- class_1.prototype.aupCommand = function (face) {
755
- return new AupCommand(this, face);
756
- };
757
- class_1.prototype.aupTabbedNavigation = function () {
758
- return new AupNavigation(this, 'aup-tabbed-place-navigation');
759
- };
760
- class_1.prototype.aupSideNavigation = function () {
761
- var _this = this;
762
- return new AupNavigation(function () { return _this.element(); }, 'aup-list-place-nav');
763
- };
764
- class_1.prototype.aupTable = function (selector) {
765
- var _this = this;
766
- return new exports.AupTable(function () { return _this.element(); }, selector !== null && selector !== void 0 ? selector : 'aup-table');
767
- };
768
- return class_1;
769
- }(Base));
770
- }
771
- Section.Mixin = Mixin;
772
- var Impl = /** @class */ (function (_super) {
773
- __extends(Impl, _super);
774
- function Impl() {
775
- return _super !== null && _super.apply(this, arguments) || this;
873
+ });
874
+ };
875
+ MatCheckbox.prototype.uncheck = function () {
876
+ var _this = this;
877
+ this.hiddenCheckBoxElement().then(function (el) {
878
+ if (el.prop('checked')) {
879
+ _this.click();
880
+ _this.shouldNotBeChecked();
881
+ }
882
+ });
883
+ };
884
+ return MatCheckbox;
885
+ }(FormElementMixin(PageElement)));
886
+
887
+ var Builder = /** @class */ (function () {
888
+ function Builder(parentPageElement) {
889
+ this.parentPageElement = parentPageElement;
890
+ }
891
+ Builder.prototype.find = function (selector) {
892
+ return new PageElement(this.parentPageElement, selector);
893
+ };
894
+ Builder.prototype.section = function (selector, builder) {
895
+ return this.component(PageElement, selector, builder);
896
+ };
897
+ Builder.prototype.contains = function (text) {
898
+ return new PageElement(this.parentPageElement, exports.ElementLocator.findByTextContent(text));
899
+ };
900
+ Builder.prototype.button = function (text) {
901
+ return new Button(this.parentPageElement, text);
902
+ };
903
+ Builder.prototype.matCheckbox = function (text) {
904
+ return new MatCheckbox(this.parentPageElement, text);
905
+ };
906
+ Builder.prototype.aupStringInput = function (selector) {
907
+ return new exports.AupInput.HtmlInput(this.parentPageElement, selector !== null && selector !== void 0 ? selector : 'aup-string-input');
908
+ };
909
+ Builder.prototype.aupTextInput = function (selector) {
910
+ return new exports.AupInput.TextAreaInput(this.parentPageElement, selector !== null && selector !== void 0 ? selector : 'aup-text-input');
911
+ };
912
+ Builder.prototype.aupPasswordInput = function (selector) {
913
+ return new exports.AupInput.HtmlInput(this.parentPageElement, selector !== null && selector !== void 0 ? selector : 'aup-password-input');
914
+ };
915
+ Builder.prototype.aupNumberInput = function (selector) {
916
+ return new exports.AupInput.HtmlInput(this.parentPageElement, selector !== null && selector !== void 0 ? selector : 'aup-number-input');
917
+ };
918
+ Builder.prototype.aupCommand = function (faceOrSelector) {
919
+ return new AupCommand(this.parentPageElement, faceOrSelector);
920
+ };
921
+ Builder.prototype.aupTabbedNavigation = function () {
922
+ return new AupNavigation(this.parentPageElement, 'aup-tabbed-place-navigation');
923
+ };
924
+ Builder.prototype.aupSideNavigation = function () {
925
+ return new AupNavigation(this.parentPageElement, 'aup-list-place-nav');
926
+ };
927
+ Builder.prototype.aupMoreMenu = function (selector) {
928
+ return AupMoreMenu.create(this.parentPageElement, selector);
929
+ };
930
+ Builder.prototype.aupTable = function (selectorOrBuilder, optionalBuilder) {
931
+ return this.component(AupTable, selectorOrBuilder, optionalBuilder);
932
+ };
933
+ Builder.prototype.aupTreeTable = function (selectorOrBuilder, optionalBuilder) {
934
+ return this.component(exports.AupTreeTable, selectorOrBuilder, optionalBuilder);
935
+ };
936
+ Builder.prototype.aupEmptyState = function (selectorOrBuilder, optionalBuilder) {
937
+ return this.component(AupEmptyState, selectorOrBuilder, optionalBuilder);
938
+ };
939
+ Builder.prototype.component = function (klass, selectorOrBuilder, optionalBuilder) {
940
+ var selector = ___namespace.isString(selectorOrBuilder) ? selectorOrBuilder : undefined;
941
+ var builder = ___namespace.isFunction(selectorOrBuilder) ? selectorOrBuilder : optionalBuilder;
942
+ var element = new klass(this.parentPageElement, selector);
943
+ if (builder) {
944
+ // create the B&E type that the builder has access to
945
+ var decoratedElement = typescriptUtilities.Mixin.createProxy(element, new Builder(element));
946
+ // create final type that has the E & T type
947
+ return typescriptUtilities.Mixin.createProxy(decoratedElement, builder(decoratedElement));
776
948
  }
777
- return Impl;
778
- }(Mixin(PageElement)));
779
- })(exports.Section || (exports.Section = {}));
949
+ else {
950
+ return element;
951
+ }
952
+ };
953
+ return Builder;
954
+ }());
955
+
956
+ var AupAbstractActivity = /** @class */ (function (_super) {
957
+ __extends(AupAbstractActivity, _super);
958
+ function AupAbstractActivity(parent, selector) {
959
+ var _this =
960
+ // @ts-ignore
961
+ _super.call(this, parent, selector) || this;
962
+ _this.title = _this.find('aup-activity-title');
963
+ _this._confirmCommand = new Builder(_this).aupCommand('[data-cy=confirm-command]');
964
+ _this._cancelCommand = new Builder(_this).aupCommand('[data-cy=cancel-command]');
965
+ return _this;
966
+ }
967
+ return AupAbstractActivity;
968
+ }(PageElement));
969
+
970
+ var AupAlert = /** @class */ (function (_super) {
971
+ __extends(AupAlert, _super);
972
+ function AupAlert(parent, selector) {
973
+ return _super.call(this, parent, selector) || this;
974
+ }
975
+ Object.defineProperty(AupAlert.prototype, "closeCommand", {
976
+ get: function () {
977
+ return this._confirmCommand;
978
+ },
979
+ enumerable: false,
980
+ configurable: true
981
+ });
982
+ AupAlert.prototype.clickClose = function () {
983
+ this.closeCommand.click();
984
+ };
985
+ return AupAlert;
986
+ }(AupAbstractActivity));
987
+
988
+ var AupAlertDialog = /** @class */ (function (_super) {
989
+ __extends(AupAlertDialog, _super);
990
+ function AupAlertDialog(parent, selector) {
991
+ return _super.call(this, parent, selector) || this;
992
+ }
993
+ AupAlertDialog.prototype.clickBackdrop = function () {
994
+ this.dom()
995
+ .closest(".cdk-overlay-container")
996
+ .find(".cdk-overlay-backdrop").click(-50, -50, { force: true });
997
+ };
998
+ return AupAlertDialog;
999
+ }(AupAlert));
1000
+
1001
+ var AupActivity = /** @class */ (function (_super) {
1002
+ __extends(AupActivity, _super);
1003
+ function AupActivity(parent, selector) {
1004
+ return _super.call(this, parent, selector) || this;
1005
+ }
1006
+ Object.defineProperty(AupActivity.prototype, "confirmCommand", {
1007
+ get: function () {
1008
+ return this._confirmCommand;
1009
+ },
1010
+ enumerable: false,
1011
+ configurable: true
1012
+ });
1013
+ Object.defineProperty(AupActivity.prototype, "cancelCommand", {
1014
+ get: function () {
1015
+ return this._cancelCommand;
1016
+ },
1017
+ enumerable: false,
1018
+ configurable: true
1019
+ });
1020
+ return AupActivity;
1021
+ }(AupAbstractActivity));
1022
+
1023
+ var AupModalActivity = /** @class */ (function (_super) {
1024
+ __extends(AupModalActivity, _super);
1025
+ function AupModalActivity() {
1026
+ return _super !== null && _super.apply(this, arguments) || this;
1027
+ }
1028
+ AupModalActivity.prototype.clickBackdrop = function () {
1029
+ this.dom().closest(".cdk-overlay-backdrop").click(-50, -50, { force: true });
1030
+ };
1031
+ return AupModalActivity;
1032
+ }(AupActivity));
1033
+
1034
+ var PageBuilder = /** @class */ (function (_super) {
1035
+ __extends(PageBuilder, _super);
1036
+ function PageBuilder() {
1037
+ return _super !== null && _super.apply(this, arguments) || this;
1038
+ }
1039
+ PageBuilder.prototype.aupModalActivity = function (selector, builder) {
1040
+ return this.component(AupModalActivity, ".dialog-interaction-context " + selector, builder);
1041
+ };
1042
+ PageBuilder.prototype.aupModalAlert = function (builder) {
1043
+ return this.component(AupAlertDialog, ".dialog-interaction-context aup-alert-dialog", builder);
1044
+ };
1045
+ PageBuilder.prototype.aupModelConfirm = function (builder) {
1046
+ return this.aupModalActivity("aup-confirm-dialog", builder);
1047
+ };
1048
+ return PageBuilder;
1049
+ }(Builder));
1050
+
1051
+ var urlSerialiser = new router.DefaultUrlSerializer();
1052
+ exports.Path = /** @class */ (function () {
1053
+ function Path(segments) {
1054
+ this.segments = segments;
1055
+ }
1056
+ Path.extractVisitParameters = function (url) {
1057
+ var _a, _b;
1058
+ var result = {};
1059
+ var urlTree = urlSerialiser.parse(url);
1060
+ var urlSegments = (_b = (_a = urlTree.root.children.primary) === null || _a === void 0 ? void 0 : _a.segments) !== null && _b !== void 0 ? _b : [];
1061
+ urlSegments === null || urlSegments === void 0 ? void 0 : urlSegments.forEach(function (s) {
1062
+ result = Object.assign(Object.assign({}, result), s.parameters);
1063
+ });
1064
+ return result;
1065
+ };
1066
+ Path.prototype.toUrl = function (matrixParams) {
1067
+ return this.segments.map(function (s) { return s.toUrlPart(matrixParams); }).join('/');
1068
+ };
1069
+ return Path;
1070
+ }());
1071
+ (function (Path) {
1072
+ function setUrlSerialiser(serialiser) {
1073
+ urlSerialiser = serialiser;
1074
+ }
1075
+ Path.setUrlSerialiser = setUrlSerialiser;
1076
+ var Segment = /** @class */ (function () {
1077
+ function Segment(path, params) {
1078
+ if (params === void 0) { params = {}; }
1079
+ var _a;
1080
+ this.path = path;
1081
+ this.routeId = params === null || params === void 0 ? void 0 : params.routeId;
1082
+ this.visitParams = (_a = params === null || params === void 0 ? void 0 : params.visitParams) !== null && _a !== void 0 ? _a : [];
1083
+ }
1084
+ Segment.prototype.toUrlPart = function (params) {
1085
+ var path = this.path;
1086
+ this.visitParams.forEach(function (p) {
1087
+ var value = params[p];
1088
+ if (value) {
1089
+ path = path + ";" + p + "=" + value;
1090
+ }
1091
+ });
1092
+ if (this.routeId && params[this.routeId]) {
1093
+ path = path + '/' + params[this.routeId];
1094
+ }
1095
+ return path;
1096
+ };
1097
+ return Segment;
1098
+ }());
1099
+ Path.Segment = Segment;
1100
+ var Builder = /** @class */ (function () {
1101
+ function Builder() {
1102
+ this.segments = [];
1103
+ }
1104
+ Builder.prototype.segment = function (name, params) {
1105
+ var builder = new Segment(name, params);
1106
+ this.segments.push(builder);
1107
+ return this;
1108
+ };
1109
+ Builder.prototype.getPath = function () {
1110
+ return new Path(this.segments);
1111
+ };
1112
+ return Builder;
1113
+ }());
1114
+ Path.Builder = Builder;
1115
+ })(exports.Path || (exports.Path = {}));
780
1116
 
781
1117
  exports.Page = /** @class */ (function (_super) {
782
1118
  __extends(Page, _super);
@@ -786,7 +1122,7 @@
786
1122
  _this.rootElementSelector = 'body';
787
1123
  return _this;
788
1124
  }
789
- Page.prototype.element = function () {
1125
+ Page.prototype.dom = function () {
790
1126
  return cy.get(this.rootElementSelector);
791
1127
  };
792
1128
  Page.prototype.visit = function (visitParams, queryParams) {
@@ -813,7 +1149,7 @@
813
1149
  };
814
1150
  Page.prototype.shouldBeActive = function (withParameters) {
815
1151
  // Note: cy.window() doesn't return a promise... it's a chainable.
816
- cy["waitUntil"](function () {
1152
+ cy['waitUntil'](function () {
817
1153
  return cy.window().then(function (window) {
818
1154
  return window['aup.PlaceRouter'] && !window['aup.PlaceRouter'].isNavigating();
819
1155
  });
@@ -832,26 +1168,19 @@
832
1168
  return Page;
833
1169
  }(PageElement));
834
1170
  (function (Page) {
835
- function create(pathOrPathBuilder, page) {
1171
+ function create(pathOrPathBuilder, builder) {
836
1172
  var pathBuilder = new exports.Path.Builder();
837
1173
  if (___namespace.isString(pathOrPathBuilder)) {
838
- pathOrPathBuilder.split("/").filter(function (p) { return !___namespace.isEmpty(p); }).forEach(function (p) { return pathBuilder.segment(p); });
1174
+ pathOrPathBuilder.split('/').filter(function (p) { return !___namespace.isEmpty(p); }).forEach(function (p) { return pathBuilder.segment(p); });
839
1175
  }
840
1176
  else {
841
1177
  pathOrPathBuilder(pathBuilder);
842
1178
  }
843
- var builder = new PageBuilder(pathBuilder.getPath());
844
- return typescriptUtilities.Mixin.createProxy(page(builder), builder);
1179
+ var instance = new Page(pathBuilder.getPath());
1180
+ var content = builder.call(instance, new PageBuilder(instance));
1181
+ return typescriptUtilities.Mixin.createProxy(content, instance);
845
1182
  }
846
1183
  Page.create = create;
847
- var PageBuilder = /** @class */ (function (_super) {
848
- __extends(PageBuilder, _super);
849
- function PageBuilder() {
850
- return _super !== null && _super.apply(this, arguments) || this;
851
- }
852
- return PageBuilder;
853
- }(exports.Section.Mixin(Page)));
854
- Page.PageBuilder = PageBuilder;
855
1184
  })(exports.Page || (exports.Page = {}));
856
1185
 
857
1186
  var AupCommandGroup = /** @class */ (function (_super) {
@@ -862,49 +1191,41 @@
862
1191
  return AupCommandGroup;
863
1192
  }(PageElement));
864
1193
 
865
- var AupMoreMenu = /** @class */ (function (_super) {
866
- __extends(AupMoreMenu, _super);
867
- function AupMoreMenu() {
1194
+ var AupToolBar = /** @class */ (function (_super) {
1195
+ __extends(AupToolBar, _super);
1196
+ function AupToolBar() {
868
1197
  return _super !== null && _super.apply(this, arguments) || this;
869
1198
  }
870
- AupMoreMenu.create = function (parent) {
871
- return new AupMoreMenu(parent, 'aup-more-menu');
1199
+ AupToolBar.create = function (parent, face) {
1200
+ // const findFace = AupCommandFace.createFinder(() => parent.element(), face)
1201
+ // return new AupCommandGroup(() => findFace().closest('button'));
872
1202
  };
873
- return AupMoreMenu;
1203
+ return AupToolBar;
874
1204
  }(PageElement));
875
1205
 
876
1206
  var AupPopupMenu = /** @class */ (function (_super) {
877
1207
  __extends(AupPopupMenu, _super);
878
1208
  function AupPopupMenu(parentElementAccessor, face) {
879
1209
  var _this = this;
880
- var accessor = AupCommandFace.createAccessor(face);
881
- _this = _super.call(this, parentElementAccessor, {
882
- findIn: function (parent) {
883
- return accessor.findIn(parent).closest('button');
884
- },
885
- shouldNotExist: function (parent) {
886
- accessor.shouldNotExist(parent);
887
- }
888
- }) || this;
1210
+ var locator = AupCommandFace.createElementLocator(face);
1211
+ _this = _super.call(this, parentElementAccessor, function (parent) { return locator(parent).closest('button'); }) || this;
889
1212
  return _this;
890
1213
  }
891
1214
  AupPopupMenu.create = function (parent, face) {
892
1215
  return new AupPopupMenu(parent, face);
893
1216
  };
894
1217
  return AupPopupMenu;
895
- }(PageElement));
1218
+ }(AupAbstractPopupMenu));
896
1219
 
897
- var AupToolBar = /** @class */ (function (_super) {
898
- __extends(AupToolBar, _super);
899
- function AupToolBar() {
1220
+ var AupTableSelectionCell = /** @class */ (function (_super) {
1221
+ __extends(AupTableSelectionCell, _super);
1222
+ function AupTableSelectionCell() {
900
1223
  return _super !== null && _super.apply(this, arguments) || this;
901
1224
  }
902
- AupToolBar.create = function (parent, face) {
903
- // const findFace = AupCommandFace.createFinder(() => parent.element(), face)
904
- // return new AupCommandGroup(() => findFace().closest('button'));
1225
+ AupTableSelectionCell.prototype.selectAll = function () {
905
1226
  };
906
- return AupToolBar;
907
- }(PageElement));
1227
+ return AupTableSelectionCell;
1228
+ }(AupTableCell));
908
1229
 
909
1230
  /**
910
1231
  * @file Automatically generated by barrelsby.
@@ -914,16 +1235,32 @@
914
1235
  * Generated bundle index. Do not edit.
915
1236
  */
916
1237
 
1238
+ exports.AupAbstractActivity = AupAbstractActivity;
1239
+ exports.AupAbstractPopupMenu = AupAbstractPopupMenu;
1240
+ exports.AupActivity = AupActivity;
1241
+ exports.AupAlert = AupAlert;
1242
+ exports.AupAlertDialog = AupAlertDialog;
917
1243
  exports.AupCommand = AupCommand;
918
1244
  exports.AupCommandFace = AupCommandFace;
919
1245
  exports.AupCommandGroup = AupCommandGroup;
1246
+ exports.AupEmptyState = AupEmptyState;
1247
+ exports.AupModalActivity = AupModalActivity;
920
1248
  exports.AupMoreMenu = AupMoreMenu;
921
1249
  exports.AupNavigation = AupNavigation;
922
1250
  exports.AupPopupMenu = AupPopupMenu;
1251
+ exports.AupPopupMenuPanel = AupPopupMenuPanel;
1252
+ exports.AupTable = AupTable;
1253
+ exports.AupTableCell = AupTableCell;
1254
+ exports.AupTableColumn = AupTableColumn;
1255
+ exports.AupTableRow = AupTableRow;
1256
+ exports.AupTableSelectionCell = AupTableSelectionCell;
1257
+ exports.AupTableSelectionColumn = AupTableSelectionColumn;
923
1258
  exports.AupToolBar = AupToolBar;
1259
+ exports.Builder = Builder;
924
1260
  exports.Button = Button;
925
- exports.ButtonMixin = ButtonMixin;
926
- exports.FaceAccessor = FaceAccessor;
1261
+ exports.FormElementMixin = FormElementMixin;
1262
+ exports.MatCheckbox = MatCheckbox;
1263
+ exports.PageBuilder = PageBuilder;
927
1264
  exports.PageElement = PageElement;
928
1265
 
929
1266
  Object.defineProperty(exports, '__esModule', { value: true });