@skyux/modals 8.6.0 → 9.0.0-alpha.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 (75) hide show
  1. package/documentation.json +4 -4
  2. package/esm2022/lib/modules/confirm/confirm.component.mjs +112 -0
  3. package/{esm2020 → esm2022}/lib/modules/confirm/confirm.module.mjs +13 -13
  4. package/esm2022/lib/modules/confirm/confirm.service.mjs +54 -0
  5. package/esm2022/lib/modules/modal/modal-adapter.service.mjs +99 -0
  6. package/esm2022/lib/modules/modal/modal-component-adapter.service.mjs +101 -0
  7. package/{esm2020 → esm2022}/lib/modules/modal/modal-configuration.mjs +4 -4
  8. package/{esm2020 → esm2022}/lib/modules/modal/modal-content.component.mjs +4 -4
  9. package/esm2022/lib/modules/modal/modal-errors.service.mjs +21 -0
  10. package/{esm2020 → esm2022}/lib/modules/modal/modal-footer.component.mjs +4 -4
  11. package/{esm2020 → esm2022}/lib/modules/modal/modal-header.component.mjs +4 -4
  12. package/{esm2020 → esm2022}/lib/modules/modal/modal-host-context.mjs +4 -4
  13. package/esm2022/lib/modules/modal/modal-host.component.mjs +163 -0
  14. package/esm2022/lib/modules/modal/modal-host.service.mjs +62 -0
  15. package/esm2022/lib/modules/modal/modal-instance.mjs +123 -0
  16. package/esm2022/lib/modules/modal/modal-is-dirty.directive.mjs +94 -0
  17. package/esm2022/lib/modules/modal/modal-scroll-shadow.directive.mjs +129 -0
  18. package/esm2022/lib/modules/modal/modal.component.mjs +229 -0
  19. package/{esm2020 → esm2022}/lib/modules/modal/modal.module.mjs +29 -29
  20. package/esm2022/lib/modules/modal/modal.service.mjs +97 -0
  21. package/esm2022/lib/modules/shared/sky-modals-resources.module.mjs +61 -0
  22. package/esm2022/testing/confirm/confirm-button-harness.mjs +46 -0
  23. package/esm2022/testing/confirm/confirm-harness.mjs +90 -0
  24. package/esm2022/testing/modal/modal-harness.mjs +75 -0
  25. package/esm2022/testing/modal-fixture.mjs +143 -0
  26. package/{fesm2020 → fesm2022}/skyux-modals-testing.mjs +60 -73
  27. package/{fesm2020 → fesm2022}/skyux-modals-testing.mjs.map +1 -1
  28. package/fesm2022/skyux-modals.mjs +1502 -0
  29. package/{fesm2015 → fesm2022}/skyux-modals.mjs.map +1 -1
  30. package/lib/modules/modal/modal-is-dirty.directive.d.ts +1 -1
  31. package/lib/modules/modal/modal.component.d.ts +1 -1
  32. package/package.json +16 -24
  33. package/esm2020/lib/modules/confirm/confirm.component.mjs +0 -114
  34. package/esm2020/lib/modules/confirm/confirm.service.mjs +0 -57
  35. package/esm2020/lib/modules/modal/modal-adapter.service.mjs +0 -101
  36. package/esm2020/lib/modules/modal/modal-component-adapter.service.mjs +0 -104
  37. package/esm2020/lib/modules/modal/modal-errors.service.mjs +0 -24
  38. package/esm2020/lib/modules/modal/modal-host.component.mjs +0 -164
  39. package/esm2020/lib/modules/modal/modal-host.service.mjs +0 -65
  40. package/esm2020/lib/modules/modal/modal-instance.mjs +0 -127
  41. package/esm2020/lib/modules/modal/modal-is-dirty.directive.mjs +0 -93
  42. package/esm2020/lib/modules/modal/modal-scroll-shadow.directive.mjs +0 -127
  43. package/esm2020/lib/modules/modal/modal.component.mjs +0 -228
  44. package/esm2020/lib/modules/modal/modal.service.mjs +0 -99
  45. package/esm2020/lib/modules/shared/sky-modals-resources.module.mjs +0 -61
  46. package/esm2020/testing/confirm/confirm-button-harness.mjs +0 -46
  47. package/esm2020/testing/confirm/confirm-harness.mjs +0 -97
  48. package/esm2020/testing/modal/modal-harness.mjs +0 -81
  49. package/esm2020/testing/modal-fixture.mjs +0 -145
  50. package/fesm2015/skyux-modals-testing.mjs +0 -409
  51. package/fesm2015/skyux-modals-testing.mjs.map +0 -1
  52. package/fesm2015/skyux-modals.mjs +0 -1522
  53. package/fesm2020/skyux-modals.mjs +0 -1510
  54. package/fesm2020/skyux-modals.mjs.map +0 -1
  55. /package/{esm2020 → esm2022}/index.mjs +0 -0
  56. /package/{esm2020 → esm2022}/lib/modules/confirm/confirm-button-action.mjs +0 -0
  57. /package/{esm2020 → esm2022}/lib/modules/confirm/confirm-button-config.mjs +0 -0
  58. /package/{esm2020 → esm2022}/lib/modules/confirm/confirm-button-style-type.mjs +0 -0
  59. /package/{esm2020 → esm2022}/lib/modules/confirm/confirm-button.mjs +0 -0
  60. /package/{esm2020 → esm2022}/lib/modules/confirm/confirm-closed-event-args.mjs +0 -0
  61. /package/{esm2020 → esm2022}/lib/modules/confirm/confirm-config-token.mjs +0 -0
  62. /package/{esm2020 → esm2022}/lib/modules/confirm/confirm-config.mjs +0 -0
  63. /package/{esm2020 → esm2022}/lib/modules/confirm/confirm-instance.mjs +0 -0
  64. /package/{esm2020 → esm2022}/lib/modules/confirm/confirm-type.mjs +0 -0
  65. /package/{esm2020 → esm2022}/lib/modules/modal/modal-before-close-handler.mjs +0 -0
  66. /package/{esm2020 → esm2022}/lib/modules/modal/modal-close-args.mjs +0 -0
  67. /package/{esm2020 → esm2022}/lib/modules/modal/modal-error.mjs +0 -0
  68. /package/{esm2020 → esm2022}/lib/modules/modal/modal-host-context-args.mjs +0 -0
  69. /package/{esm2020 → esm2022}/lib/modules/modal/modal-scroll-shadow-event-args.mjs +0 -0
  70. /package/{esm2020 → esm2022}/lib/modules/modal/modal.interface.mjs +0 -0
  71. /package/{esm2020 → esm2022}/skyux-modals.mjs +0 -0
  72. /package/{esm2020 → esm2022}/testing/confirm/confirm-button-harness-filters.mjs +0 -0
  73. /package/{esm2020 → esm2022}/testing/modal/modal-harness-filters.mjs +0 -0
  74. /package/{esm2020 → esm2022}/testing/public-api.mjs +0 -0
  75. /package/{esm2020 → esm2022}/testing/skyux-modals-testing.mjs +0 -0
@@ -1,409 +0,0 @@
1
- import { __classPrivateFieldSet, __classPrivateFieldGet, __awaiter } from 'tslib';
2
- import { SkyComponentHarness } from '@skyux/core/testing';
3
- import { SkyConfirmType } from '@skyux/modals';
4
- import { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
5
-
6
- var _SkyModalFixture_instances, _SkyModalFixture_modalElement, _SkyModalFixture_fixture, _SkyModalFixture_checkModalElement, _SkyModalFixture_getModalDialogElement;
7
- /**
8
- * Allows interaction with a SKY UX modal component.
9
- * @internal
10
- */
11
- class SkyModalFixture {
12
- constructor(fixture, skyTestId) {
13
- _SkyModalFixture_instances.add(this);
14
- _SkyModalFixture_modalElement.set(this, void 0);
15
- _SkyModalFixture_fixture.set(this, void 0);
16
- __classPrivateFieldSet(this, _SkyModalFixture_fixture, fixture, "f");
17
- const modalElement = document.querySelector('sky-modal[data-sky-id="' + skyTestId + '"]');
18
- if (!modalElement) {
19
- throw new Error(`No element was found with a \`data-sky-id\` value of "${skyTestId}".`);
20
- }
21
- __classPrivateFieldSet(this, _SkyModalFixture_modalElement, modalElement, "f");
22
- }
23
- /**
24
- * The modal component's ARIA describedby attribute.
25
- */
26
- get ariaDescribedBy() {
27
- const modalDialogElement = __classPrivateFieldGet(this, _SkyModalFixture_instances, "m", _SkyModalFixture_getModalDialogElement).call(this);
28
- /* Non-null assertion as our component has a default for if the user does not provide this attribute or if they provide "undefined" */
29
- const describedByAttribute =
30
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
31
- modalDialogElement.getAttribute('aria-describedby');
32
- return describedByAttribute;
33
- }
34
- /**
35
- * The modal component's ARIA labelledby attribute.
36
- */
37
- get ariaLabelledBy() {
38
- const modalDialogElement = __classPrivateFieldGet(this, _SkyModalFixture_instances, "m", _SkyModalFixture_getModalDialogElement).call(this);
39
- /* Non-null assertion as our component has a default for if the user does not provide this attribute or if they provide "undefined" */
40
- const labelledByAttribute =
41
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
42
- modalDialogElement.getAttribute('aria-labelledby');
43
- return labelledByAttribute;
44
- }
45
- /**
46
- * The modal component's role attribute.
47
- */
48
- get ariaRole() {
49
- const modalDialogElement = __classPrivateFieldGet(this, _SkyModalFixture_instances, "m", _SkyModalFixture_getModalDialogElement).call(this);
50
- /* Non-null assertion as our component has a default for if the user does not provide this attribute or if they provide "undefined" */
51
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
52
- const roleAttribute = modalDialogElement.getAttribute('role');
53
- return roleAttribute;
54
- }
55
- /**
56
- * Whether or not the modal is a full page modal.
57
- */
58
- get fullPage() {
59
- const modalDivElement = this.getModalDiv();
60
- return modalDivElement.classList.contains('sky-modal-full-page');
61
- }
62
- /**
63
- * The size of the modal.
64
- */
65
- get size() {
66
- const modalDivElement = this.getModalDiv();
67
- const possibleSizes = ['small', 'medium', 'large'];
68
- for (const size of possibleSizes) {
69
- if (modalDivElement.classList.contains('sky-modal-' + size)) {
70
- return size;
71
- }
72
- }
73
- return;
74
- }
75
- /**
76
- * Whether or not the modal is set up for tiled content.
77
- */
78
- get tiledBody() {
79
- const modalDivElement = this.getModalDiv();
80
- return modalDivElement.classList.contains('sky-modal-tiled');
81
- }
82
- /**
83
- * Clicks the modal header's "close" button.
84
- */
85
- clickHeaderCloseButton() {
86
- __classPrivateFieldGet(this, _SkyModalFixture_instances, "m", _SkyModalFixture_checkModalElement).call(this);
87
- const closeButton = __classPrivateFieldGet(this, _SkyModalFixture_modalElement, "f").querySelector('.sky-modal .sky-modal-btn-close');
88
- if (closeButton &&
89
- window.getComputedStyle(closeButton).display !== 'none') {
90
- closeButton.click();
91
- __classPrivateFieldGet(this, _SkyModalFixture_fixture, "f").detectChanges();
92
- }
93
- else {
94
- throw new Error(`No header close button exists.`);
95
- }
96
- }
97
- /**
98
- * Clicks the modal header's "help" button.
99
- */
100
- clickHelpButton() {
101
- __classPrivateFieldGet(this, _SkyModalFixture_instances, "m", _SkyModalFixture_checkModalElement).call(this);
102
- const helpButton = __classPrivateFieldGet(this, _SkyModalFixture_modalElement, "f").querySelector('.sky-modal .sky-modal-header-buttons button[name="help-button"]');
103
- if (helpButton && window.getComputedStyle(helpButton).display !== 'none') {
104
- helpButton.click();
105
- __classPrivateFieldGet(this, _SkyModalFixture_fixture, "f").detectChanges();
106
- }
107
- else {
108
- throw new Error(`No help button exists.`);
109
- }
110
- }
111
- /**
112
- * Returns the main modal element.
113
- */
114
- getModalDiv() {
115
- __classPrivateFieldGet(this, _SkyModalFixture_instances, "m", _SkyModalFixture_checkModalElement).call(this);
116
- return __classPrivateFieldGet(this, _SkyModalFixture_modalElement, "f").querySelector('.sky-modal');
117
- }
118
- /**
119
- * Returns the modal's content element.
120
- */
121
- getModalContentEl() {
122
- __classPrivateFieldGet(this, _SkyModalFixture_instances, "m", _SkyModalFixture_checkModalElement).call(this);
123
- return __classPrivateFieldGet(this, _SkyModalFixture_modalElement, "f").querySelector('.sky-modal-content');
124
- }
125
- /**
126
- * Returns the modal's footer element.
127
- */
128
- getModalFooterEl() {
129
- __classPrivateFieldGet(this, _SkyModalFixture_instances, "m", _SkyModalFixture_checkModalElement).call(this);
130
- return __classPrivateFieldGet(this, _SkyModalFixture_modalElement, "f").querySelector('.sky-modal-footer');
131
- }
132
- /**
133
- * Returns the modal's header element.
134
- */
135
- getModalHeaderEl() {
136
- __classPrivateFieldGet(this, _SkyModalFixture_instances, "m", _SkyModalFixture_checkModalElement).call(this);
137
- return __classPrivateFieldGet(this, _SkyModalFixture_modalElement, "f").querySelector('.sky-modal-header');
138
- }
139
- }
140
- _SkyModalFixture_modalElement = new WeakMap(), _SkyModalFixture_fixture = new WeakMap(), _SkyModalFixture_instances = new WeakSet(), _SkyModalFixture_checkModalElement = function _SkyModalFixture_checkModalElement() {
141
- if (!document.contains(__classPrivateFieldGet(this, _SkyModalFixture_modalElement, "f"))) {
142
- throw new Error('Modal element no longer exists. Was the modal closed?');
143
- }
144
- }, _SkyModalFixture_getModalDialogElement = function _SkyModalFixture_getModalDialogElement() {
145
- __classPrivateFieldGet(this, _SkyModalFixture_instances, "m", _SkyModalFixture_checkModalElement).call(this);
146
- // We can always know that the dialog element will exist if the modal is open and exists.
147
- return __classPrivateFieldGet(this, _SkyModalFixture_modalElement, "f").querySelector('.sky-modal-dialog');
148
- };
149
-
150
- /**
151
- * Harness for interacting with a confirm component in tests.
152
- * @internal
153
- */
154
- class SkyConfirmButtonHarness extends ComponentHarness {
155
- /**
156
- * Gets a `HarnessPredicate` that can be used to search for a
157
- * `SkyConfirmButtonHarness` that meets certain criteria.
158
- */
159
- static with(filters) {
160
- return new HarnessPredicate(SkyConfirmButtonHarness, filters)
161
- .addOption('text', filters.text, (harness, text) => __awaiter(this, void 0, void 0, function* () { return HarnessPredicate.stringMatches(yield harness.getText(), text); }))
162
- .addOption('styleType', filters.styleType, (harness, styleType) => __awaiter(this, void 0, void 0, function* () { return HarnessPredicate.stringMatches(yield harness.getStyleType(), styleType); }));
163
- }
164
- /**
165
- * Clicks the confirm button.
166
- */
167
- click() {
168
- return __awaiter(this, void 0, void 0, function* () {
169
- return (yield this.host()).click();
170
- });
171
- }
172
- /**
173
- * Gets the button style of the confirm button.
174
- */
175
- getStyleType() {
176
- return __awaiter(this, void 0, void 0, function* () {
177
- const hostEl = yield this.host();
178
- if (yield hostEl.hasClass('sky-btn-primary')) {
179
- return 'primary';
180
- }
181
- else if (yield hostEl.hasClass('sky-btn-link')) {
182
- return 'link';
183
- }
184
- else if (yield hostEl.hasClass('sky-btn-danger')) {
185
- return 'danger';
186
- }
187
- return 'default';
188
- });
189
- }
190
- /**
191
- * Gets the text content of the confirm button.
192
- */
193
- getText() {
194
- return __awaiter(this, void 0, void 0, function* () {
195
- return (yield this.host()).text();
196
- });
197
- }
198
- }
199
- SkyConfirmButtonHarness.hostSelector = '.sky-confirm-buttons .sky-btn';
200
-
201
- var _SkyConfirmHarness_instances, _SkyConfirmHarness_getBodyEl, _SkyConfirmHarness_getButtons, _SkyConfirmHarness_getConfirmEl, _SkyConfirmHarness_getMessageEl, _SkyConfirmHarness_queryHarnesses;
202
- /**
203
- * Harness for interacting with a confirm component in tests.
204
- */
205
- class SkyConfirmHarness extends SkyComponentHarness {
206
- constructor() {
207
- super(...arguments);
208
- _SkyConfirmHarness_instances.add(this);
209
- _SkyConfirmHarness_getBodyEl.set(this, this.locatorForOptional('.sky-confirm-body'));
210
- _SkyConfirmHarness_getButtons.set(this, this.locatorForAll(SkyConfirmButtonHarness));
211
- _SkyConfirmHarness_getConfirmEl.set(this, this.locatorFor('.sky-confirm'));
212
- _SkyConfirmHarness_getMessageEl.set(this, this.locatorFor('.sky-confirm-message'));
213
- }
214
- /**
215
- * Clicks a confirm button.
216
- */
217
- clickCustomButton(filters) {
218
- return __awaiter(this, void 0, void 0, function* () {
219
- const buttons = yield this.getCustomButtons(filters);
220
- if (buttons.length > 1) {
221
- if (filters.text instanceof RegExp) {
222
- filters.text = filters.text.toString();
223
- }
224
- throw new Error(`More than one button matches the filter(s): ${JSON.stringify(filters)}.`);
225
- }
226
- yield buttons[0].click();
227
- });
228
- }
229
- /**
230
- * Clicks a confirm button.
231
- */
232
- clickOkButton() {
233
- return __awaiter(this, void 0, void 0, function* () {
234
- const type = yield this.getType();
235
- if (type === SkyConfirmType.Custom) {
236
- throw new Error('Cannot click OK button on a confirm of type custom.');
237
- }
238
- const buttons = yield __classPrivateFieldGet(this, _SkyConfirmHarness_getButtons, "f").call(this);
239
- yield buttons[0].click();
240
- });
241
- }
242
- /**
243
- * Gets the body of the confirm component.
244
- */
245
- getBodyText() {
246
- var _a;
247
- return __awaiter(this, void 0, void 0, function* () {
248
- return (_a = (yield __classPrivateFieldGet(this, _SkyConfirmHarness_getBodyEl, "f").call(this))) === null || _a === void 0 ? void 0 : _a.text();
249
- });
250
- }
251
- /**
252
- * Gets the confirm component's custom buttons.
253
- */
254
- getCustomButtons(filters) {
255
- return __awaiter(this, void 0, void 0, function* () {
256
- const confirmType = yield this.getType();
257
- if (confirmType === SkyConfirmType.OK) {
258
- throw new Error('Cannot get custom buttons for confirm of type OK.');
259
- }
260
- const harnesses = yield __classPrivateFieldGet(this, _SkyConfirmHarness_instances, "m", _SkyConfirmHarness_queryHarnesses).call(this, SkyConfirmButtonHarness.with(filters || {}));
261
- if (filters && harnesses.length === 0) {
262
- // Stringify the regular expression so that it's readable in the console log.
263
- if (filters.text instanceof RegExp) {
264
- filters.text = filters.text.toString();
265
- }
266
- throw new Error(`Could not find buttons matching filter(s): ${JSON.stringify(filters)}.`);
267
- }
268
- return harnesses;
269
- });
270
- }
271
- /**
272
- * Gets the message of the confirm component.
273
- */
274
- getMessageText() {
275
- return __awaiter(this, void 0, void 0, function* () {
276
- return (yield __classPrivateFieldGet(this, _SkyConfirmHarness_getMessageEl, "f").call(this)).text();
277
- });
278
- }
279
- /**
280
- * Gets the type of the confirm component.
281
- */
282
- getType() {
283
- return __awaiter(this, void 0, void 0, function* () {
284
- const confirmEl = yield __classPrivateFieldGet(this, _SkyConfirmHarness_getConfirmEl, "f").call(this);
285
- if (yield confirmEl.hasClass('sky-confirm-type-ok')) {
286
- return SkyConfirmType.OK;
287
- }
288
- return SkyConfirmType.Custom;
289
- });
290
- }
291
- /**
292
- * Whether the whitespace is preserved on the confirm component.
293
- */
294
- isWhiteSpacePreserved() {
295
- return __awaiter(this, void 0, void 0, function* () {
296
- return (yield __classPrivateFieldGet(this, _SkyConfirmHarness_getMessageEl, "f").call(this)).hasClass('sky-confirm-preserve-white-space');
297
- });
298
- }
299
- }
300
- _SkyConfirmHarness_getBodyEl = new WeakMap(), _SkyConfirmHarness_getButtons = new WeakMap(), _SkyConfirmHarness_getConfirmEl = new WeakMap(), _SkyConfirmHarness_getMessageEl = new WeakMap(), _SkyConfirmHarness_instances = new WeakSet(), _SkyConfirmHarness_queryHarnesses =
301
- /**
302
- * Returns child harnesses.
303
- */
304
- function _SkyConfirmHarness_queryHarnesses(harness) {
305
- return __awaiter(this, void 0, void 0, function* () {
306
- return this.locatorForAll(harness)();
307
- });
308
- };
309
- SkyConfirmHarness.hostSelector = 'sky-confirm';
310
-
311
- var _SkyModalHarness_getModal, _SkyModalHarness_getModalDialog;
312
- /**
313
- * Harness for interacting with a modal component in tests.
314
- */
315
- class SkyModalHarness extends SkyComponentHarness {
316
- constructor() {
317
- super(...arguments);
318
- _SkyModalHarness_getModal.set(this, this.locatorFor('.sky-modal'));
319
- _SkyModalHarness_getModalDialog.set(this, this.locatorFor('.sky-modal-dialog'));
320
- }
321
- /**
322
- * Gets a `HarnessPredicate` that can be used to search for a
323
- * `SkyModalHarness` that meets certain criteria
324
- */
325
- static with(filters) {
326
- return SkyModalHarness.getDataSkyIdPredicate(filters);
327
- }
328
- /**
329
- * Gets the aria-describedBy property of the modal
330
- */
331
- getAriaDescribedBy() {
332
- return __awaiter(this, void 0, void 0, function* () {
333
- return (yield __classPrivateFieldGet(this, _SkyModalHarness_getModalDialog, "f").call(this)).getAttribute('aria-describedby');
334
- });
335
- }
336
- /**
337
- * Gets the aria-labelledBy property of the modal
338
- */
339
- getAriaLabelledBy() {
340
- return __awaiter(this, void 0, void 0, function* () {
341
- return (yield __classPrivateFieldGet(this, _SkyModalHarness_getModalDialog, "f").call(this)).getAttribute('aria-labelledby');
342
- });
343
- }
344
- /**
345
- * Gets the role of the modal.
346
- */
347
- getAriaRole() {
348
- return __awaiter(this, void 0, void 0, function* () {
349
- return (yield __classPrivateFieldGet(this, _SkyModalHarness_getModalDialog, "f").call(this)).getAttribute('role');
350
- });
351
- }
352
- /**
353
- * Gets the modal size.
354
- */
355
- getSize() {
356
- return __awaiter(this, void 0, void 0, function* () {
357
- if (yield this.isFullPage()) {
358
- throw new Error('Size cannot be determined because size property is overridden when modal is full page');
359
- }
360
- const modal = yield __classPrivateFieldGet(this, _SkyModalHarness_getModal, "f").call(this);
361
- if (yield modal.hasClass('sky-modal-small')) {
362
- return 'small';
363
- }
364
- if (yield modal.hasClass('sky-modal-large')) {
365
- return 'large';
366
- }
367
- return 'medium';
368
- });
369
- }
370
- /**
371
- * Gets the wrapper class of the modal.
372
- */
373
- getWrapperClass() {
374
- return __awaiter(this, void 0, void 0, function* () {
375
- return yield (yield this.host()).getProperty('className');
376
- });
377
- }
378
- /**
379
- * Whether the modal is full page.
380
- */
381
- isFullPage() {
382
- return __awaiter(this, void 0, void 0, function* () {
383
- const modal = __classPrivateFieldGet(this, _SkyModalHarness_getModal, "f").call(this);
384
- return (yield modal).hasClass('sky-modal-full-page');
385
- });
386
- }
387
- /**
388
- * Whether the modal has {@link SkyModalIsDirtyDirective.isDirty} set to dirty.
389
- */
390
- isDirty() {
391
- return __awaiter(this, void 0, void 0, function* () {
392
- const modalHost = yield this.host();
393
- const isDirtyAttribute = yield modalHost.getAttribute('data-sky-modal-is-dirty');
394
- return isDirtyAttribute === 'true';
395
- });
396
- }
397
- }
398
- _SkyModalHarness_getModal = new WeakMap(), _SkyModalHarness_getModalDialog = new WeakMap();
399
- /**
400
- * @internal
401
- */
402
- SkyModalHarness.hostSelector = 'sky-modal';
403
-
404
- /**
405
- * Generated bundle index. Do not edit.
406
- */
407
-
408
- export { SkyConfirmButtonHarness, SkyConfirmHarness, SkyModalFixture, SkyModalHarness };
409
- //# sourceMappingURL=skyux-modals-testing.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"skyux-modals-testing.mjs","sources":["../../../../../libs/components/modals/testing/src/modal-fixture.ts","../../../../../libs/components/modals/testing/src/confirm/confirm-button-harness.ts","../../../../../libs/components/modals/testing/src/confirm/confirm-harness.ts","../../../../../libs/components/modals/testing/src/modal/modal-harness.ts","../../../../../libs/components/modals/testing/src/skyux-modals-testing.ts"],"sourcesContent":["import { ComponentFixture } from '@angular/core/testing';\n\n/**\n * Allows interaction with a SKY UX modal component.\n * @internal\n */\nexport class SkyModalFixture {\n #modalElement: HTMLElement;\n\n #fixture: ComponentFixture<unknown>;\n\n constructor(fixture: ComponentFixture<unknown>, skyTestId: string) {\n this.#fixture = fixture;\n const modalElement = document.querySelector(\n 'sky-modal[data-sky-id=\"' + skyTestId + '\"]'\n ) as HTMLElement;\n\n if (!modalElement) {\n throw new Error(\n `No element was found with a \\`data-sky-id\\` value of \"${skyTestId}\".`\n );\n }\n\n this.#modalElement = modalElement;\n }\n\n /**\n * The modal component's ARIA describedby attribute.\n */\n public get ariaDescribedBy(): string | undefined {\n const modalDialogElement = this.#getModalDialogElement();\n /* Non-null assertion as our component has a default for if the user does not provide this attribute or if they provide \"undefined\" */\n const describedByAttribute =\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n modalDialogElement.getAttribute('aria-describedby')!;\n return describedByAttribute;\n }\n\n /**\n * The modal component's ARIA labelledby attribute.\n */\n public get ariaLabelledBy(): string | undefined {\n const modalDialogElement = this.#getModalDialogElement();\n /* Non-null assertion as our component has a default for if the user does not provide this attribute or if they provide \"undefined\" */\n const labelledByAttribute =\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n modalDialogElement.getAttribute('aria-labelledby')!;\n\n return labelledByAttribute;\n }\n\n /**\n * The modal component's role attribute.\n */\n public get ariaRole(): string | undefined {\n const modalDialogElement = this.#getModalDialogElement();\n /* Non-null assertion as our component has a default for if the user does not provide this attribute or if they provide \"undefined\" */\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const roleAttribute = modalDialogElement.getAttribute('role')!;\n return roleAttribute;\n }\n\n /**\n * Whether or not the modal is a full page modal.\n */\n public get fullPage(): boolean {\n const modalDivElement = this.getModalDiv();\n return modalDivElement.classList.contains('sky-modal-full-page');\n }\n\n /**\n * The size of the modal.\n */\n public get size(): string | undefined {\n const modalDivElement = this.getModalDiv();\n const possibleSizes = ['small', 'medium', 'large'];\n\n for (const size of possibleSizes) {\n if (modalDivElement.classList.contains('sky-modal-' + size)) {\n return size;\n }\n }\n\n return;\n }\n\n /**\n * Whether or not the modal is set up for tiled content.\n */\n public get tiledBody(): boolean {\n const modalDivElement = this.getModalDiv();\n return modalDivElement.classList.contains('sky-modal-tiled');\n }\n\n /**\n * Clicks the modal header's \"close\" button.\n */\n public clickHeaderCloseButton(): void {\n this.#checkModalElement();\n const closeButton: HTMLElement | null = this.#modalElement.querySelector(\n '.sky-modal .sky-modal-btn-close'\n );\n\n if (\n closeButton &&\n window.getComputedStyle(closeButton).display !== 'none'\n ) {\n closeButton.click();\n this.#fixture.detectChanges();\n } else {\n throw new Error(`No header close button exists.`);\n }\n }\n\n /**\n * Clicks the modal header's \"help\" button.\n */\n public clickHelpButton(): void {\n this.#checkModalElement();\n const helpButton: HTMLElement | null = this.#modalElement.querySelector(\n '.sky-modal .sky-modal-header-buttons button[name=\"help-button\"]'\n );\n\n if (helpButton && window.getComputedStyle(helpButton).display !== 'none') {\n helpButton.click();\n this.#fixture.detectChanges();\n } else {\n throw new Error(`No help button exists.`);\n }\n }\n\n /**\n * Returns the main modal element.\n */\n public getModalDiv(): any {\n this.#checkModalElement();\n return this.#modalElement.querySelector('.sky-modal');\n }\n\n /**\n * Returns the modal's content element.\n */\n public getModalContentEl(): any {\n this.#checkModalElement();\n return this.#modalElement.querySelector('.sky-modal-content');\n }\n\n /**\n * Returns the modal's footer element.\n */\n public getModalFooterEl(): any {\n this.#checkModalElement();\n return this.#modalElement.querySelector('.sky-modal-footer');\n }\n\n /**\n * Returns the modal's header element.\n */\n public getModalHeaderEl(): any {\n this.#checkModalElement();\n return this.#modalElement.querySelector('.sky-modal-header');\n }\n\n #checkModalElement(): void {\n if (!document.contains(this.#modalElement)) {\n throw new Error('Modal element no longer exists. Was the modal closed?');\n }\n }\n\n #getModalDialogElement(): HTMLElement {\n this.#checkModalElement();\n // We can always know that the dialog element will exist if the modal is open and exists.\n return this.#modalElement.querySelector('.sky-modal-dialog')!;\n }\n}\n","import { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';\nimport { SkyConfirmButtonStyleType } from '@skyux/modals';\n\nimport { SkyConfirmButtonHarnessFilters } from './confirm-button-harness-filters';\n\n/**\n * Harness for interacting with a confirm component in tests.\n * @internal\n */\nexport class SkyConfirmButtonHarness extends ComponentHarness {\n public static hostSelector = '.sky-confirm-buttons .sky-btn';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a\n * `SkyConfirmButtonHarness` that meets certain criteria.\n */\n public static with(\n filters: SkyConfirmButtonHarnessFilters\n ): HarnessPredicate<SkyConfirmButtonHarness> {\n return new HarnessPredicate(SkyConfirmButtonHarness, filters)\n .addOption('text', filters.text, async (harness, text) =>\n HarnessPredicate.stringMatches(await harness.getText(), text)\n )\n .addOption('styleType', filters.styleType, async (harness, styleType) =>\n HarnessPredicate.stringMatches(await harness.getStyleType(), styleType)\n );\n }\n\n /**\n * Clicks the confirm button.\n */\n public async click(): Promise<void> {\n return (await this.host()).click();\n }\n\n /**\n * Gets the button style of the confirm button.\n */\n public async getStyleType(): Promise<SkyConfirmButtonStyleType> {\n const hostEl = await this.host();\n\n if (await hostEl.hasClass('sky-btn-primary')) {\n return 'primary';\n } else if (await hostEl.hasClass('sky-btn-link')) {\n return 'link';\n } else if (await hostEl.hasClass('sky-btn-danger')) {\n return 'danger';\n }\n return 'default';\n }\n\n /**\n * Gets the text content of the confirm button.\n */\n public async getText(): Promise<string> {\n return (await this.host()).text();\n }\n}\n","import { ComponentHarness, HarnessQuery } from '@angular/cdk/testing';\nimport { SkyComponentHarness } from '@skyux/core/testing';\nimport { SkyConfirmType } from '@skyux/modals';\n\nimport { SkyConfirmButtonHarness } from './confirm-button-harness';\nimport { SkyConfirmButtonHarnessFilters } from './confirm-button-harness-filters';\n\n/**\n * Harness for interacting with a confirm component in tests.\n */\nexport class SkyConfirmHarness extends SkyComponentHarness {\n public static hostSelector = 'sky-confirm';\n\n #getBodyEl = this.locatorForOptional('.sky-confirm-body');\n #getButtons = this.locatorForAll(SkyConfirmButtonHarness);\n #getConfirmEl = this.locatorFor('.sky-confirm');\n #getMessageEl = this.locatorFor('.sky-confirm-message');\n\n /**\n * Clicks a confirm button.\n */\n public async clickCustomButton(\n filters: SkyConfirmButtonHarnessFilters\n ): Promise<void> {\n const buttons = await this.getCustomButtons(filters);\n\n if (buttons.length > 1) {\n if (filters.text instanceof RegExp) {\n filters.text = filters.text.toString();\n }\n throw new Error(\n `More than one button matches the filter(s): ${JSON.stringify(\n filters\n )}.`\n );\n }\n await buttons[0].click();\n }\n\n /**\n * Clicks a confirm button.\n */\n public async clickOkButton(): Promise<void> {\n const type = await this.getType();\n\n if (type === SkyConfirmType.Custom) {\n throw new Error('Cannot click OK button on a confirm of type custom.');\n }\n const buttons = await this.#getButtons();\n await buttons[0].click();\n }\n\n /**\n * Gets the body of the confirm component.\n */\n public async getBodyText(): Promise<string | undefined> {\n return (await this.#getBodyEl())?.text();\n }\n\n /**\n * Gets the confirm component's custom buttons.\n */\n public async getCustomButtons(\n filters?: SkyConfirmButtonHarnessFilters\n ): Promise<SkyConfirmButtonHarness[]> {\n const confirmType = await this.getType();\n\n if (confirmType === SkyConfirmType.OK) {\n throw new Error('Cannot get custom buttons for confirm of type OK.');\n }\n\n const harnesses = await this.#queryHarnesses(\n SkyConfirmButtonHarness.with(filters || {})\n );\n\n if (filters && harnesses.length === 0) {\n // Stringify the regular expression so that it's readable in the console log.\n if (filters.text instanceof RegExp) {\n filters.text = filters.text.toString();\n }\n\n throw new Error(\n `Could not find buttons matching filter(s): ${JSON.stringify(filters)}.`\n );\n }\n\n return harnesses;\n }\n\n /**\n * Gets the message of the confirm component.\n */\n public async getMessageText(): Promise<string> {\n return (await this.#getMessageEl()).text();\n }\n\n /**\n * Gets the type of the confirm component.\n */\n public async getType(): Promise<SkyConfirmType> {\n const confirmEl = await this.#getConfirmEl();\n if (await confirmEl.hasClass('sky-confirm-type-ok')) {\n return SkyConfirmType.OK;\n }\n\n return SkyConfirmType.Custom;\n }\n\n /**\n * Whether the whitespace is preserved on the confirm component.\n */\n public async isWhiteSpacePreserved(): Promise<boolean> {\n return (await this.#getMessageEl()).hasClass(\n 'sky-confirm-preserve-white-space'\n );\n }\n\n /**\n * Returns child harnesses.\n */\n async #queryHarnesses<T extends ComponentHarness>(\n harness: HarnessQuery<T>\n ): Promise<T[]> {\n return this.locatorForAll(harness)();\n }\n}\n","import { HarnessPredicate } from '@angular/cdk/testing';\nimport { SkyComponentHarness } from '@skyux/core/testing';\n\nimport { SkyModalHarnessFilters } from './modal-harness-filters';\n\n/**\n * Harness for interacting with a modal component in tests.\n */\nexport class SkyModalHarness extends SkyComponentHarness {\n /**\n * @internal\n */\n public static hostSelector = 'sky-modal';\n\n #getModal = this.locatorFor('.sky-modal');\n #getModalDialog = this.locatorFor('.sky-modal-dialog');\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a\n * `SkyModalHarness` that meets certain criteria\n */\n public static with(\n filters: SkyModalHarnessFilters\n ): HarnessPredicate<SkyModalHarness> {\n return SkyModalHarness.getDataSkyIdPredicate(filters);\n }\n\n /**\n * Gets the aria-describedBy property of the modal\n */\n public async getAriaDescribedBy(): Promise<string | null> {\n return (await this.#getModalDialog()).getAttribute('aria-describedby');\n }\n\n /**\n * Gets the aria-labelledBy property of the modal\n */\n public async getAriaLabelledBy(): Promise<string | null> {\n return (await this.#getModalDialog()).getAttribute('aria-labelledby');\n }\n\n /**\n * Gets the role of the modal.\n */\n public async getAriaRole(): Promise<string | null> {\n return (await this.#getModalDialog()).getAttribute('role');\n }\n\n /**\n * Gets the modal size.\n */\n public async getSize(): Promise<string> {\n if (await this.isFullPage()) {\n throw new Error(\n 'Size cannot be determined because size property is overridden when modal is full page'\n );\n }\n\n const modal = await this.#getModal();\n\n if (await modal.hasClass('sky-modal-small')) {\n return 'small';\n }\n\n if (await modal.hasClass('sky-modal-large')) {\n return 'large';\n }\n\n return 'medium';\n }\n\n /**\n * Gets the wrapper class of the modal.\n */\n public async getWrapperClass(): Promise<string | undefined> {\n return await (await this.host()).getProperty('className');\n }\n\n /**\n * Whether the modal is full page.\n */\n public async isFullPage(): Promise<boolean> {\n const modal = this.#getModal();\n return (await modal).hasClass('sky-modal-full-page');\n }\n\n /**\n * Whether the modal has {@link SkyModalIsDirtyDirective.isDirty} set to dirty.\n */\n public async isDirty(): Promise<boolean> {\n const modalHost = await this.host();\n const isDirtyAttribute = await modalHost.getAttribute(\n 'data-sky-modal-is-dirty'\n );\n return isDirtyAttribute === 'true';\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;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