@coolon/angular-ui-powerups 3.4.7 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/bundles/coolon-angular-ui-powerups-cypress.umd.js +669 -0
  3. package/bundles/coolon-angular-ui-powerups-cypress.umd.js.map +1 -0
  4. package/bundles/coolon-angular-ui-powerups-cypress.umd.min.js +16 -0
  5. package/bundles/coolon-angular-ui-powerups-cypress.umd.min.js.map +1 -0
  6. package/bundles/coolon-angular-ui-powerups.umd.js +38 -122
  7. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
  8. package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
  9. package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
  10. package/coolon-angular-ui-powerups.d.ts +0 -81
  11. package/coolon-angular-ui-powerups.metadata.json +1 -1
  12. package/cypress/components/aup-command-face.d.ts +9 -0
  13. package/cypress/components/aup-command-group.d.ts +3 -0
  14. package/cypress/components/aup-command.d.ts +8 -0
  15. package/cypress/components/aup-input.d.ts +29 -0
  16. package/cypress/components/aup-more-menu.d.ts +4 -0
  17. package/cypress/components/aup-popup-menu.d.ts +5 -0
  18. package/cypress/components/aup-tool-bar.d.ts +5 -0
  19. package/cypress/components/button.d.ts +6 -0
  20. package/cypress/components/types.d.ts +6 -0
  21. package/cypress/coolon-angular-ui-powerups-cypress.d.ts +4 -0
  22. package/cypress/coolon-angular-ui-powerups-cypress.metadata.json +1 -0
  23. package/cypress/exports.d.ts +15 -0
  24. package/cypress/package.json +15 -0
  25. package/cypress/page-element.d.ts +11 -0
  26. package/cypress/page.d.ts +41 -0
  27. package/cypress/section.d.ts +37 -0
  28. package/esm2015/coolon-angular-ui-powerups.js +0 -79
  29. package/esm2015/coolon-angular-ui-powerups.js.map +1 -1
  30. package/esm2015/coolon-angular-ui-powerups.metadata.json +1 -1
  31. package/esm2015/cypress/components/aup-command-face.js +18 -0
  32. package/esm2015/cypress/components/aup-command-face.js.map +1 -0
  33. package/esm2015/cypress/components/aup-command-face.metadata.json +1 -0
  34. package/esm2015/cypress/components/aup-command-group.js +4 -0
  35. package/esm2015/cypress/components/aup-command-group.js.map +1 -0
  36. package/esm2015/cypress/components/aup-command-group.metadata.json +1 -0
  37. package/esm2015/cypress/components/aup-command.js +14 -0
  38. package/esm2015/cypress/components/aup-command.js.map +1 -0
  39. package/esm2015/cypress/components/aup-command.metadata.json +1 -0
  40. package/esm2015/cypress/components/aup-input.js +69 -0
  41. package/esm2015/cypress/components/aup-input.js.map +1 -0
  42. package/esm2015/cypress/components/aup-input.metadata.json +1 -0
  43. package/esm2015/cypress/components/aup-more-menu.js +8 -0
  44. package/esm2015/cypress/components/aup-more-menu.js.map +1 -0
  45. package/esm2015/cypress/components/aup-more-menu.metadata.json +1 -0
  46. package/esm2015/cypress/components/aup-popup-menu.js +10 -0
  47. package/esm2015/cypress/components/aup-popup-menu.js.map +1 -0
  48. package/esm2015/cypress/components/aup-popup-menu.metadata.json +1 -0
  49. package/esm2015/cypress/components/aup-tool-bar.js +8 -0
  50. package/esm2015/cypress/components/aup-tool-bar.js.map +1 -0
  51. package/esm2015/cypress/components/aup-tool-bar.metadata.json +1 -0
  52. package/esm2015/cypress/components/button.js +11 -0
  53. package/esm2015/cypress/components/button.js.map +1 -0
  54. package/esm2015/cypress/components/button.metadata.json +1 -0
  55. package/esm2015/cypress/components/types.js +2 -0
  56. package/esm2015/cypress/components/types.js.map +1 -0
  57. package/esm2015/cypress/coolon-angular-ui-powerups-cypress.js +5 -0
  58. package/esm2015/cypress/coolon-angular-ui-powerups-cypress.js.map +1 -0
  59. package/esm2015/cypress/coolon-angular-ui-powerups-cypress.metadata.json +1 -0
  60. package/esm2015/cypress/exports.js +16 -0
  61. package/esm2015/cypress/exports.js.map +1 -0
  62. package/esm2015/cypress/exports.metadata.json +1 -0
  63. package/esm2015/cypress/page-element.js +21 -0
  64. package/esm2015/cypress/page-element.js.map +1 -0
  65. package/esm2015/cypress/page-element.metadata.json +1 -0
  66. package/esm2015/cypress/page.js +48 -0
  67. package/esm2015/cypress/page.js.map +1 -0
  68. package/esm2015/cypress/page.metadata.json +1 -0
  69. package/esm2015/cypress/section.js +41 -0
  70. package/esm2015/cypress/section.js.map +1 -0
  71. package/esm2015/cypress/section.metadata.json +1 -0
  72. package/esm2015/lib/animations/{index.js → exports.js} +1 -1
  73. package/esm2015/lib/animations/exports.js.map +1 -0
  74. package/esm2015/lib/components/{index.js → exports.js} +1 -1
  75. package/esm2015/lib/components/exports.js.map +1 -0
  76. package/esm2015/lib/directives/{index.js → exports.js} +1 -1
  77. package/esm2015/lib/directives/exports.js.map +1 -0
  78. package/esm2015/lib/interaction/{index.js → exports.js} +1 -1
  79. package/esm2015/lib/interaction/exports.js.map +1 -0
  80. package/esm2015/lib/interaction/interaction.module.js +1 -1
  81. package/esm2015/lib/interaction/interaction.module.js.map +1 -1
  82. package/esm2015/lib/interaction/interaction.module.metadata.json +1 -1
  83. package/esm2015/lib/place/{index.js → exports.js} +1 -1
  84. package/esm2015/lib/place/exports.js.map +1 -0
  85. package/esm2015/lib/place/place.module.js +1 -1
  86. package/esm2015/lib/place/place.module.js.map +1 -1
  87. package/esm2015/lib/place/place.module.metadata.json +1 -1
  88. package/esm2015/public_api.js +5 -5
  89. package/esm2015/public_api.js.map +1 -1
  90. package/esm2015/public_api.metadata.json +1 -1
  91. package/fesm2015/coolon-angular-ui-powerups-cypress.js +246 -0
  92. package/fesm2015/coolon-angular-ui-powerups-cypress.js.map +1 -0
  93. package/fesm2015/coolon-angular-ui-powerups.js +1 -1
  94. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  95. package/lib/place/navigation/place-component-deactivation-handler.d.ts +2 -2
  96. package/package.json +3 -2
  97. package/public_api.d.ts +5 -5
  98. package/schematics/bootstrap-app/index.js +6 -6
  99. package/schematics/bootstrap-app/index.js.map +1 -1
  100. package/schematics/place-add/index.js +2 -2
  101. package/schematics/place-add/index.js.map +1 -1
  102. package/schematics/utils/build-context.d.ts +2 -2
  103. package/schematics/utils/build-context.js +7 -4
  104. package/schematics/utils/build-context.js.map +1 -1
  105. package/schematics/utils/workspace.js +2 -5
  106. package/schematics/utils/workspace.js.map +1 -1
  107. package/esm2015/lib/animations/index.js.map +0 -1
  108. package/esm2015/lib/components/index.js.map +0 -1
  109. package/esm2015/lib/directives/index.js.map +0 -1
  110. package/esm2015/lib/interaction/index.js.map +0 -1
  111. package/esm2015/lib/place/index.js.map +0 -1
  112. /package/esm2015/lib/animations/{index.metadata.json → exports.metadata.json} +0 -0
  113. /package/esm2015/lib/components/{index.metadata.json → exports.metadata.json} +0 -0
  114. /package/esm2015/lib/directives/{index.metadata.json → exports.metadata.json} +0 -0
  115. /package/esm2015/lib/interaction/{index.metadata.json → exports.metadata.json} +0 -0
  116. /package/esm2015/lib/place/{index.metadata.json → exports.metadata.json} +0 -0
  117. /package/lib/animations/{index.d.ts → exports.d.ts} +0 -0
  118. /package/lib/components/{index.d.ts → exports.d.ts} +0 -0
  119. /package/lib/directives/{index.d.ts → exports.d.ts} +0 -0
  120. /package/lib/interaction/{index.d.ts → exports.d.ts} +0 -0
  121. /package/lib/place/{index.d.ts → exports.d.ts} +0 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ## [3.5.0](https://bitbucket.org/coolon/angular-ui-powerups/compare/v3.4.7...v3.5.0) (2020-11-19)
6
+
7
+
8
+ ### Features
9
+
10
+ * added cypress test submodule for use in other projects ([3c2a5ac](https://bitbucket.org/coolon/angular-ui-powerups/commit/3c2a5aca1bb536d08af5e2c6d2f1495bdfacfd91))
11
+
5
12
  ### [3.4.7](https://bitbucket.org/coolon/angular-ui-powerups/compare/v3.4.6...v3.4.7) (2020-11-18)
6
13
 
7
14
 
@@ -0,0 +1,669 @@
1
+ (function (global, factory) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@coolon/typescript-utilities')) :
3
+ typeof define === 'function' && define.amd ? define('@coolon/angular-ui-powerups/cypress', ['exports', '@coolon/typescript-utilities'], 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));
5
+ }(this, (function (exports, typescriptUtilities) { 'use strict';
6
+
7
+ var PageElement = /** @class */ (function () {
8
+ function PageElement(rootElementAccessor) {
9
+ this.rootElementAccessor = rootElementAccessor;
10
+ }
11
+ PageElement.prototype.element = function () {
12
+ return this.rootElementAccessor ? this.rootElementAccessor() : undefined;
13
+ };
14
+ PageElement.prototype.click = function (text) {
15
+ text ? this.element().contains(text).click() : this.element().click();
16
+ };
17
+ Object.defineProperty(PageElement.prototype, "should", {
18
+ get: function () {
19
+ return this.element().should;
20
+ },
21
+ enumerable: false,
22
+ configurable: true
23
+ });
24
+ PageElement.prototype.shouldBeVisible = function () {
25
+ this.should("be.visible");
26
+ };
27
+ PageElement.prototype.shouldNotBeVisible = function () {
28
+ this.should("not.be.visible");
29
+ };
30
+ return PageElement;
31
+ }());
32
+
33
+ /*! *****************************************************************************
34
+ Copyright (c) Microsoft Corporation.
35
+
36
+ Permission to use, copy, modify, and/or distribute this software for any
37
+ purpose with or without fee is hereby granted.
38
+
39
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
40
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
41
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
42
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
43
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
44
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
45
+ PERFORMANCE OF THIS SOFTWARE.
46
+ ***************************************************************************** */
47
+ /* global Reflect, Promise */
48
+ var extendStatics = function (d, b) {
49
+ extendStatics = Object.setPrototypeOf ||
50
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
51
+ function (d, b) { for (var p in b)
52
+ if (Object.prototype.hasOwnProperty.call(b, p))
53
+ d[p] = b[p]; };
54
+ return extendStatics(d, b);
55
+ };
56
+ function __extends(d, b) {
57
+ extendStatics(d, b);
58
+ function __() { this.constructor = d; }
59
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
60
+ }
61
+ var __assign = function () {
62
+ __assign = Object.assign || function __assign(t) {
63
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
64
+ s = arguments[i];
65
+ for (var p in s)
66
+ if (Object.prototype.hasOwnProperty.call(s, p))
67
+ t[p] = s[p];
68
+ }
69
+ return t;
70
+ };
71
+ return __assign.apply(this, arguments);
72
+ };
73
+ function __rest(s, e) {
74
+ var t = {};
75
+ for (var p in s)
76
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
77
+ t[p] = s[p];
78
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
79
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
80
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
81
+ t[p[i]] = s[p[i]];
82
+ }
83
+ return t;
84
+ }
85
+ function __decorate(decorators, target, key, desc) {
86
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
87
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
88
+ r = Reflect.decorate(decorators, target, key, desc);
89
+ else
90
+ for (var i = decorators.length - 1; i >= 0; i--)
91
+ if (d = decorators[i])
92
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
93
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
94
+ }
95
+ function __param(paramIndex, decorator) {
96
+ return function (target, key) { decorator(target, key, paramIndex); };
97
+ }
98
+ function __metadata(metadataKey, metadataValue) {
99
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
100
+ return Reflect.metadata(metadataKey, metadataValue);
101
+ }
102
+ function __awaiter(thisArg, _arguments, P, generator) {
103
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
104
+ return new (P || (P = Promise))(function (resolve, reject) {
105
+ function fulfilled(value) { try {
106
+ step(generator.next(value));
107
+ }
108
+ catch (e) {
109
+ reject(e);
110
+ } }
111
+ function rejected(value) { try {
112
+ step(generator["throw"](value));
113
+ }
114
+ catch (e) {
115
+ reject(e);
116
+ } }
117
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
118
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
119
+ });
120
+ }
121
+ function __generator(thisArg, body) {
122
+ var _ = { label: 0, sent: function () { if (t[0] & 1)
123
+ throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
124
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
125
+ function verb(n) { return function (v) { return step([n, v]); }; }
126
+ function step(op) {
127
+ if (f)
128
+ throw new TypeError("Generator is already executing.");
129
+ while (_)
130
+ try {
131
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
132
+ return t;
133
+ if (y = 0, t)
134
+ op = [op[0] & 2, t.value];
135
+ switch (op[0]) {
136
+ case 0:
137
+ case 1:
138
+ t = op;
139
+ break;
140
+ case 4:
141
+ _.label++;
142
+ return { value: op[1], done: false };
143
+ case 5:
144
+ _.label++;
145
+ y = op[1];
146
+ op = [0];
147
+ continue;
148
+ case 7:
149
+ op = _.ops.pop();
150
+ _.trys.pop();
151
+ continue;
152
+ default:
153
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
154
+ _ = 0;
155
+ continue;
156
+ }
157
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
158
+ _.label = op[1];
159
+ break;
160
+ }
161
+ if (op[0] === 6 && _.label < t[1]) {
162
+ _.label = t[1];
163
+ t = op;
164
+ break;
165
+ }
166
+ if (t && _.label < t[2]) {
167
+ _.label = t[2];
168
+ _.ops.push(op);
169
+ break;
170
+ }
171
+ if (t[2])
172
+ _.ops.pop();
173
+ _.trys.pop();
174
+ continue;
175
+ }
176
+ op = body.call(thisArg, _);
177
+ }
178
+ catch (e) {
179
+ op = [6, e];
180
+ y = 0;
181
+ }
182
+ finally {
183
+ f = t = 0;
184
+ }
185
+ if (op[0] & 5)
186
+ throw op[1];
187
+ return { value: op[0] ? op[1] : void 0, done: true };
188
+ }
189
+ }
190
+ var __createBinding = Object.create ? (function (o, m, k, k2) {
191
+ if (k2 === undefined)
192
+ k2 = k;
193
+ Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
194
+ }) : (function (o, m, k, k2) {
195
+ if (k2 === undefined)
196
+ k2 = k;
197
+ o[k2] = m[k];
198
+ });
199
+ function __exportStar(m, o) {
200
+ for (var p in m)
201
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
202
+ __createBinding(o, m, p);
203
+ }
204
+ function __values(o) {
205
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
206
+ if (m)
207
+ return m.call(o);
208
+ if (o && typeof o.length === "number")
209
+ return {
210
+ next: function () {
211
+ if (o && i >= o.length)
212
+ o = void 0;
213
+ return { value: o && o[i++], done: !o };
214
+ }
215
+ };
216
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
217
+ }
218
+ function __read(o, n) {
219
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
220
+ if (!m)
221
+ return o;
222
+ var i = m.call(o), r, ar = [], e;
223
+ try {
224
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
225
+ ar.push(r.value);
226
+ }
227
+ catch (error) {
228
+ e = { error: error };
229
+ }
230
+ finally {
231
+ try {
232
+ if (r && !r.done && (m = i["return"]))
233
+ m.call(i);
234
+ }
235
+ finally {
236
+ if (e)
237
+ throw e.error;
238
+ }
239
+ }
240
+ return ar;
241
+ }
242
+ function __spread() {
243
+ for (var ar = [], i = 0; i < arguments.length; i++)
244
+ ar = ar.concat(__read(arguments[i]));
245
+ return ar;
246
+ }
247
+ function __spreadArrays() {
248
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++)
249
+ s += arguments[i].length;
250
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
251
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
252
+ r[k] = a[j];
253
+ return r;
254
+ }
255
+ ;
256
+ function __await(v) {
257
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
258
+ }
259
+ function __asyncGenerator(thisArg, _arguments, generator) {
260
+ if (!Symbol.asyncIterator)
261
+ throw new TypeError("Symbol.asyncIterator is not defined.");
262
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
263
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
264
+ function verb(n) { if (g[n])
265
+ i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
266
+ function resume(n, v) { try {
267
+ step(g[n](v));
268
+ }
269
+ catch (e) {
270
+ settle(q[0][3], e);
271
+ } }
272
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
273
+ function fulfill(value) { resume("next", value); }
274
+ function reject(value) { resume("throw", value); }
275
+ function settle(f, v) { if (f(v), q.shift(), q.length)
276
+ resume(q[0][0], q[0][1]); }
277
+ }
278
+ function __asyncDelegator(o) {
279
+ var i, p;
280
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
281
+ function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
282
+ }
283
+ function __asyncValues(o) {
284
+ if (!Symbol.asyncIterator)
285
+ throw new TypeError("Symbol.asyncIterator is not defined.");
286
+ var m = o[Symbol.asyncIterator], i;
287
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
288
+ function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
289
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
290
+ }
291
+ function __makeTemplateObject(cooked, raw) {
292
+ if (Object.defineProperty) {
293
+ Object.defineProperty(cooked, "raw", { value: raw });
294
+ }
295
+ else {
296
+ cooked.raw = raw;
297
+ }
298
+ return cooked;
299
+ }
300
+ ;
301
+ var __setModuleDefault = Object.create ? (function (o, v) {
302
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
303
+ }) : function (o, v) {
304
+ o["default"] = v;
305
+ };
306
+ function __importStar(mod) {
307
+ if (mod && mod.__esModule)
308
+ return mod;
309
+ var result = {};
310
+ if (mod != null)
311
+ for (var k in mod)
312
+ if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
313
+ __createBinding(result, mod, k);
314
+ __setModuleDefault(result, mod);
315
+ return result;
316
+ }
317
+ function __importDefault(mod) {
318
+ return (mod && mod.__esModule) ? mod : { default: mod };
319
+ }
320
+ function __classPrivateFieldGet(receiver, privateMap) {
321
+ if (!privateMap.has(receiver)) {
322
+ throw new TypeError("attempted to get private field on non-instance");
323
+ }
324
+ return privateMap.get(receiver);
325
+ }
326
+ function __classPrivateFieldSet(receiver, privateMap, value) {
327
+ if (!privateMap.has(receiver)) {
328
+ throw new TypeError("attempted to set private field on non-instance");
329
+ }
330
+ privateMap.set(receiver, value);
331
+ return value;
332
+ }
333
+
334
+ var AupCommandFace = /** @class */ (function (_super) {
335
+ __extends(AupCommandFace, _super);
336
+ function AupCommandFace() {
337
+ return _super !== null && _super.apply(this, arguments) || this;
338
+ }
339
+ AupCommandFace.create = function (parent, face) {
340
+ var parentFinder = function () { return parent.element(); };
341
+ var rootElementAccessor = this.createFinder(parentFinder, face);
342
+ return new AupCommandFace(rootElementAccessor);
343
+ };
344
+ AupCommandFace.createFinder = function (parent, face) {
345
+ // AOT barfs if we return a lambda
346
+ var finder = function () { return face.text ?
347
+ parent().contains("aup-command-face", face.text()) :
348
+ face.icon ?
349
+ parent().find("aup-icon[ng-reflect-icon=" + face.icon() + "]").closest('aup-command-face') :
350
+ undefined; };
351
+ return finder;
352
+ };
353
+ return AupCommandFace;
354
+ }(PageElement));
355
+
356
+ var Button = /** @class */ (function (_super) {
357
+ __extends(Button, _super);
358
+ function Button() {
359
+ return _super !== null && _super.apply(this, arguments) || this;
360
+ }
361
+ Button.prototype.click = function () {
362
+ return this.element().click();
363
+ };
364
+ Button.prototype.shouldBeDisabled = function () {
365
+ this.should("be.disabled");
366
+ // this.should("have.css", "color", "rgba(0,0,0,0.26)")
367
+ };
368
+ return Button;
369
+ }(PageElement));
370
+
371
+ var AupCommand = /** @class */ (function (_super) {
372
+ __extends(AupCommand, _super);
373
+ function AupCommand() {
374
+ return _super !== null && _super.apply(this, arguments) || this;
375
+ }
376
+ AupCommand.create = function (parent, face) {
377
+ var parentFinder = function () { return parent.element().find('aup-command'); };
378
+ var findFace = AupCommandFace.createFinder(parentFinder, face);
379
+ var commandFinder = function () { return findFace().closest("aup-command"); };
380
+ return new AupCommand(commandFinder);
381
+ };
382
+ Object.defineProperty(AupCommand.prototype, "should", {
383
+ get: function () {
384
+ return this.element().find('button').should;
385
+ },
386
+ enumerable: false,
387
+ configurable: true
388
+ });
389
+ return AupCommand;
390
+ }(Button));
391
+
392
+ exports.AupInput = /** @class */ (function (_super) {
393
+ __extends(AupInput, _super);
394
+ function AupInput() {
395
+ return _super !== null && _super.apply(this, arguments) || this;
396
+ }
397
+ AupInput.prototype.label = function () {
398
+ return this.element().find('label');
399
+ };
400
+ AupInput.prototype.hint = function () {
401
+ return this.element().find('mat-hint');
402
+ };
403
+ AupInput.prototype.error = function () {
404
+ return this.element().find('mat-error');
405
+ };
406
+ Object.defineProperty(AupInput.prototype, "labelShould", {
407
+ get: function () {
408
+ return this.label().should;
409
+ },
410
+ enumerable: false,
411
+ configurable: true
412
+ });
413
+ Object.defineProperty(AupInput.prototype, "hintShould", {
414
+ get: function () {
415
+ return this.hint().should;
416
+ },
417
+ enumerable: false,
418
+ configurable: true
419
+ });
420
+ Object.defineProperty(AupInput.prototype, "errorShould", {
421
+ get: function () {
422
+ return this.error().should;
423
+ },
424
+ enumerable: false,
425
+ configurable: true
426
+ });
427
+ AupInput.prototype.labelShouldBe = function (text) {
428
+ return this.labelShould("have.text", text);
429
+ };
430
+ AupInput.prototype.hintShouldBe = function (text) {
431
+ return this.hintShould("have.text", text);
432
+ };
433
+ AupInput.prototype.errorShouldBe = function (text) {
434
+ return this.errorShould("have.text", text);
435
+ };
436
+ return AupInput;
437
+ }(PageElement));
438
+ (function (AupInput) {
439
+ var HtmlInput = /** @class */ (function (_super) {
440
+ __extends(HtmlInput, _super);
441
+ function HtmlInput() {
442
+ return _super !== null && _super.apply(this, arguments) || this;
443
+ }
444
+ HtmlInput.prototype.input = function () {
445
+ return this.element().find('input');
446
+ };
447
+ HtmlInput.prototype.clear = function () {
448
+ this.input().clear();
449
+ };
450
+ HtmlInput.prototype.setValue = function (value) {
451
+ var input = this.input();
452
+ input.clear();
453
+ input.type("" + value);
454
+ this.input().should('have.value', "" + value);
455
+ };
456
+ Object.defineProperty(HtmlInput.prototype, "should", {
457
+ get: function () {
458
+ return this.input().should;
459
+ },
460
+ enumerable: false,
461
+ configurable: true
462
+ });
463
+ return HtmlInput;
464
+ }(AupInput));
465
+ AupInput.HtmlInput = HtmlInput;
466
+ var TextAreaInput = /** @class */ (function (_super) {
467
+ __extends(TextAreaInput, _super);
468
+ function TextAreaInput() {
469
+ return _super !== null && _super.apply(this, arguments) || this;
470
+ }
471
+ Object.defineProperty(TextAreaInput.prototype, "should", {
472
+ get: function () {
473
+ return this.input().should;
474
+ },
475
+ enumerable: false,
476
+ configurable: true
477
+ });
478
+ TextAreaInput.prototype.input = function () {
479
+ return this.element().find('textarea');
480
+ };
481
+ TextAreaInput.prototype.clear = function () {
482
+ this.input().clear();
483
+ };
484
+ TextAreaInput.prototype.setValue = function (value) {
485
+ var input = this.input();
486
+ input.clear();
487
+ input.type("" + value);
488
+ this.input().should('have.value', value);
489
+ };
490
+ return TextAreaInput;
491
+ }(AupInput));
492
+ AupInput.TextAreaInput = TextAreaInput;
493
+ })(exports.AupInput || (exports.AupInput = {}));
494
+
495
+ (function (Section) {
496
+ function Mixin(Base) {
497
+ return /** @class */ (function (_super) {
498
+ __extends(class_1, _super);
499
+ function class_1() {
500
+ return _super !== null && _super.apply(this, arguments) || this;
501
+ }
502
+ class_1.prototype.section = function (selector, section) {
503
+ var _this = this;
504
+ var impl = new Impl(function () { return _this.element().find(selector); });
505
+ return typescriptUtilities.Mixin.createProxy(section(impl), impl);
506
+ };
507
+ class_1.prototype.contains = function (text) {
508
+ var _this = this;
509
+ return new PageElement(function () { return _this.element().contains(text); });
510
+ };
511
+ class_1.prototype.button = function (text) {
512
+ var _this = this;
513
+ return new Button(function () { return _this.element().contains("button", text); });
514
+ };
515
+ class_1.prototype.aupStringInput = function (selector) {
516
+ var _this = this;
517
+ return new exports.AupInput.HtmlInput(function () { return _this.element().find(selector !== null && selector !== void 0 ? selector : 'aup-string-input'); });
518
+ };
519
+ class_1.prototype.aupTextInput = function (selector) {
520
+ var _this = this;
521
+ return new exports.AupInput.TextAreaInput(function () { return _this.element().find(selector !== null && selector !== void 0 ? selector : 'aup-text-input'); });
522
+ };
523
+ class_1.prototype.aupPasswordInput = function (selector) {
524
+ var _this = this;
525
+ return new exports.AupInput.HtmlInput(function () { return _this.element().find(selector !== null && selector !== void 0 ? selector : 'aup-password-input'); });
526
+ };
527
+ class_1.prototype.aupNumberInput = function (selector) {
528
+ var _this = this;
529
+ return new exports.AupInput.HtmlInput(function () { return _this.element().find(selector !== null && selector !== void 0 ? selector : 'aup-number-input'); });
530
+ };
531
+ class_1.prototype.aupCommand = function (face) {
532
+ return AupCommand.create(this, face);
533
+ };
534
+ return class_1;
535
+ }(Base));
536
+ }
537
+ Section.Mixin = Mixin;
538
+ var Impl = /** @class */ (function (_super) {
539
+ __extends(Impl, _super);
540
+ function Impl() {
541
+ return _super !== null && _super.apply(this, arguments) || this;
542
+ }
543
+ return Impl;
544
+ }(Mixin(PageElement)));
545
+ })(exports.Section || (exports.Section = {}));
546
+
547
+ exports.Page = /** @class */ (function (_super) {
548
+ __extends(Page, _super);
549
+ function Page(path) {
550
+ var _this = _super.call(this) || this;
551
+ _this.path = path;
552
+ _this.rootElementSelector = 'body';
553
+ return _this;
554
+ }
555
+ Page.prototype.element = function () {
556
+ return cy.get(this.rootElementSelector);
557
+ };
558
+ Page.prototype.visit = function () {
559
+ cy.visit(this.path);
560
+ this.shouldBeActive();
561
+ };
562
+ Page.prototype.shouldHaveActivityIds = function () {
563
+ var ids = [];
564
+ for (var _i = 0; _i < arguments.length; _i++) {
565
+ ids[_i] = arguments[_i];
566
+ }
567
+ cy.location('search').should('contain', "?aup-interactions=" + ids.join('--'));
568
+ };
569
+ Page.prototype.shouldNotHaveActivityIds = function () {
570
+ cy.location('search').should('not.contain', "?aup-interactions");
571
+ };
572
+ Page.prototype.shouldBeActive = function (options) {
573
+ var bits = [this.path];
574
+ // TODO: add support for parameter names...
575
+ if (options && options.withParameters) {
576
+ bits.push(";([^?]+)");
577
+ }
578
+ if (options && options.withActivities) {
579
+ bits.push("?aup-interactions=" + options.withActivities.join('--') + ")");
580
+ }
581
+ cy.location('pathname').should('match', new RegExp("^" + bits.join('') + "$"));
582
+ if (options && options.withTitle) {
583
+ cy.title().should('eq', options.withTitle);
584
+ }
585
+ };
586
+ return Page;
587
+ }(PageElement));
588
+ (function (Page) {
589
+ function create(path, page) {
590
+ var builder = new Builder(path);
591
+ return typescriptUtilities.Mixin.createProxy(page(builder), builder);
592
+ }
593
+ Page.create = create;
594
+ var Builder = /** @class */ (function (_super) {
595
+ __extends(Builder, _super);
596
+ function Builder() {
597
+ return _super !== null && _super.apply(this, arguments) || this;
598
+ }
599
+ return Builder;
600
+ }(exports.Section.Mixin(Page)));
601
+ Page.Builder = Builder;
602
+ })(exports.Page || (exports.Page = {}));
603
+
604
+ var AupCommandGroup = /** @class */ (function (_super) {
605
+ __extends(AupCommandGroup, _super);
606
+ function AupCommandGroup() {
607
+ return _super !== null && _super.apply(this, arguments) || this;
608
+ }
609
+ return AupCommandGroup;
610
+ }(PageElement));
611
+
612
+ var AupMoreMenu = /** @class */ (function (_super) {
613
+ __extends(AupMoreMenu, _super);
614
+ function AupMoreMenu() {
615
+ return _super !== null && _super.apply(this, arguments) || this;
616
+ }
617
+ AupMoreMenu.create = function (parent) {
618
+ var finder = function () { return parent.element().contains('aup-more-menu'); };
619
+ return new AupMoreMenu(finder);
620
+ };
621
+ return AupMoreMenu;
622
+ }(PageElement));
623
+
624
+ var AupPopupMenu = /** @class */ (function (_super) {
625
+ __extends(AupPopupMenu, _super);
626
+ function AupPopupMenu() {
627
+ return _super !== null && _super.apply(this, arguments) || this;
628
+ }
629
+ AupPopupMenu.create = function (parent, face) {
630
+ var faceFinder = AupCommandFace.createFinder(function () { return parent.element(); }, face);
631
+ var buttonFinder = function () { return faceFinder().closest('button'); };
632
+ return new AupPopupMenu(buttonFinder);
633
+ };
634
+ return AupPopupMenu;
635
+ }(PageElement));
636
+
637
+ var AupToolBar = /** @class */ (function (_super) {
638
+ __extends(AupToolBar, _super);
639
+ function AupToolBar() {
640
+ return _super !== null && _super.apply(this, arguments) || this;
641
+ }
642
+ AupToolBar.create = function (parent, face) {
643
+ // const findFace = AupCommandFace.createFinder(() => parent.element(), face)
644
+ // return new AupCommandGroup(() => findFace().closest('button'));
645
+ };
646
+ return AupToolBar;
647
+ }(PageElement));
648
+
649
+ /**
650
+ * @file Automatically generated by barrelsby.
651
+ */
652
+
653
+ /**
654
+ * Generated bundle index. Do not edit.
655
+ */
656
+
657
+ exports.AupCommand = AupCommand;
658
+ exports.AupCommandFace = AupCommandFace;
659
+ exports.AupCommandGroup = AupCommandGroup;
660
+ exports.AupMoreMenu = AupMoreMenu;
661
+ exports.AupPopupMenu = AupPopupMenu;
662
+ exports.AupToolBar = AupToolBar;
663
+ exports.Button = Button;
664
+ exports.PageElement = PageElement;
665
+
666
+ Object.defineProperty(exports, '__esModule', { value: true });
667
+
668
+ })));
669
+ //# sourceMappingURL=coolon-angular-ui-powerups-cypress.umd.js.map