@skyux/modals 12.23.0 → 13.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.
- package/fesm2022/skyux-modals-testing.mjs +11 -11
- package/fesm2022/skyux-modals-testing.mjs.map +1 -1
- package/fesm2022/skyux-modals.mjs +60 -60
- package/fesm2022/skyux-modals.mjs.map +1 -1
- package/index.d.ts +647 -27
- package/package.json +11 -11
- package/testing/index.d.ts +283 -3
- package/lib/modules/confirm/confirm-button-action.d.ts +0 -4
- package/lib/modules/confirm/confirm-button-config.d.ts +0 -24
- package/lib/modules/confirm/confirm-button-style-type.d.ts +0 -1
- package/lib/modules/confirm/confirm-button.d.ts +0 -12
- package/lib/modules/confirm/confirm-closed-event-args.d.ts +0 -6
- package/lib/modules/confirm/confirm-config-token.d.ts +0 -6
- package/lib/modules/confirm/confirm-config.d.ts +0 -26
- package/lib/modules/confirm/confirm-instance.d.ts +0 -17
- package/lib/modules/confirm/confirm-service-interface.d.ts +0 -8
- package/lib/modules/confirm/confirm-type.d.ts +0 -22
- package/lib/modules/confirm/confirm.component.d.ts +0 -20
- package/lib/modules/confirm/confirm.module.d.ts +0 -10
- package/lib/modules/confirm/confirm.service.d.ts +0 -19
- package/lib/modules/modal/modal-adapter.service.d.ts +0 -30
- package/lib/modules/modal/modal-before-close-handler.d.ts +0 -18
- package/lib/modules/modal/modal-close-args.d.ts +0 -15
- package/lib/modules/modal/modal-component-adapter.service.d.ts +0 -17
- package/lib/modules/modal/modal-configuration.d.ts +0 -29
- package/lib/modules/modal/modal-content.component.d.ts +0 -9
- package/lib/modules/modal/modal-error.d.ts +0 -9
- package/lib/modules/modal/modal-errors.service.d.ts +0 -14
- package/lib/modules/modal/modal-footer.component.d.ts +0 -11
- package/lib/modules/modal/modal-header.component.d.ts +0 -8
- package/lib/modules/modal/modal-host-context-args.d.ts +0 -7
- package/lib/modules/modal/modal-host-context.d.ts +0 -13
- package/lib/modules/modal/modal-host.component.d.ts +0 -17
- package/lib/modules/modal/modal-host.service.d.ts +0 -37
- package/lib/modules/modal/modal-instance.d.ts +0 -81
- package/lib/modules/modal/modal-is-dirty.directive.d.ts +0 -18
- package/lib/modules/modal/modal-service-interface.d.ts +0 -8
- package/lib/modules/modal/modal.component.d.ts +0 -90
- package/lib/modules/modal/modal.interface.d.ts +0 -75
- package/lib/modules/modal/modal.module.d.ts +0 -11
- package/lib/modules/modal/modal.service.d.ts +0 -36
- package/lib/modules/shared/sky-modals-resources.module.d.ts +0 -10
- package/testing/legacy/modal-fixture.d.ts +0 -57
- package/testing/modules/confirm/confirm-button-harness-filters.d.ts +0 -14
- package/testing/modules/confirm/confirm-button-harness.d.ts +0 -29
- package/testing/modules/confirm/confirm-harness.d.ts +0 -42
- package/testing/modules/confirm/confirm-testing.controller.d.ts +0 -28
- package/testing/modules/confirm/confirm-testing.module.d.ts +0 -9
- package/testing/modules/confirm/confirm-testing.service.d.ts +0 -14
- package/testing/modules/confirm/provide-confirm-testing.d.ts +0 -5
- package/testing/modules/modal/controller/modal-testing.controller.d.ts +0 -26
- package/testing/modules/modal/controller/modal-testing.module.d.ts +0 -9
- package/testing/modules/modal/controller/modal-testing.service.d.ts +0 -18
- package/testing/modules/modal/controller/provide-modal-testing.d.ts +0 -5
- package/testing/modules/modal/modal-harness-filters.d.ts +0 -6
- package/testing/modules/modal/modal-harness.d.ts +0 -64
- package/testing/public-api.d.ts +0 -10
package/index.d.ts
CHANGED
|
@@ -1,27 +1,647 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
1
|
+
import { Observable, Subject } from 'rxjs';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { ElementRef, ComponentRef, StaticProvider, AfterViewInit, OnDestroy, OnInit, TemplateRef } from '@angular/core';
|
|
4
|
+
import * as i1 from '@skyux/core';
|
|
5
|
+
import { SkyAppWindowRef, SkyDynamicComponentService, SkyDynamicComponentLegacyService, SkyScrollShadowEventArgs } from '@skyux/core';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
type SkyConfirmButtonAction = 'ok' | 'yes' | 'no' | 'cancel';
|
|
11
|
+
|
|
12
|
+
interface SkyConfirmButtonConfig {
|
|
13
|
+
/**
|
|
14
|
+
* The identifier to return when users select the button to close the
|
|
15
|
+
* dialog. This is useful to determine which button users select.
|
|
16
|
+
*/
|
|
17
|
+
action: string;
|
|
18
|
+
/**
|
|
19
|
+
* The label for the button.
|
|
20
|
+
*/
|
|
21
|
+
text: string;
|
|
22
|
+
/**
|
|
23
|
+
* The style to apply to the button. The valid options are `primary` for
|
|
24
|
+
* the button that triggers the recommended or most-common action, `default` for
|
|
25
|
+
* buttons that trigger less-common actions, `link` for a button that closes
|
|
26
|
+
* the dialog, and `danger` for a primary action that deletes existing data.
|
|
27
|
+
*/
|
|
28
|
+
styleType?: 'primary' | 'default' | 'link' | string;
|
|
29
|
+
/**
|
|
30
|
+
* Whether to place focus on this button by default.
|
|
31
|
+
* @deprecated The confirm component automatically focuses the first interactive
|
|
32
|
+
* element of the dialog.
|
|
33
|
+
*/
|
|
34
|
+
autofocus?: boolean;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
type SkyConfirmButtonStyleType = 'primary' | 'default' | 'link' | 'danger';
|
|
38
|
+
|
|
39
|
+
interface SkyConfirmCloseEventArgs {
|
|
40
|
+
/**
|
|
41
|
+
* The identifier for the button that users selected to close the dialog.
|
|
42
|
+
*/
|
|
43
|
+
action: string;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
declare enum SkyConfirmType {
|
|
47
|
+
/**
|
|
48
|
+
* Allows you to define your own buttons using the `buttons` property of `SkyConfirmConfig`.
|
|
49
|
+
*/
|
|
50
|
+
Custom = 0,
|
|
51
|
+
/**
|
|
52
|
+
* Displays one button with an **OK** label and an `'ok'` action.
|
|
53
|
+
*/
|
|
54
|
+
OK = 1,
|
|
55
|
+
/**
|
|
56
|
+
* Displays two buttons with **Yes** and **Cancel** labels.
|
|
57
|
+
* @deprecated Use the `Custom` type to follow the guidance that labels
|
|
58
|
+
* should clearly indicate the actions that occur when users select buttons.
|
|
59
|
+
*/
|
|
60
|
+
YesCancel = 2,
|
|
61
|
+
/**
|
|
62
|
+
* Displays three buttons with **Yes**, **No**, and **Cancel** labels.
|
|
63
|
+
* @deprecated Use the `Custom` type to follow the guidance that labels
|
|
64
|
+
* should clearly indicate the actions that occur when users select buttons.
|
|
65
|
+
*/
|
|
66
|
+
YesNoCancel = 3
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
interface SkyConfirmConfig {
|
|
70
|
+
/**
|
|
71
|
+
* The message to display in bold at the top of the dialog.
|
|
72
|
+
* @required
|
|
73
|
+
*/
|
|
74
|
+
message: string;
|
|
75
|
+
/**
|
|
76
|
+
* Secondary text to display under the primary message.
|
|
77
|
+
*/
|
|
78
|
+
body?: string;
|
|
79
|
+
/**
|
|
80
|
+
* The list of buttons to display when the `type` property is set to `SkyConfirmType.Custom`.
|
|
81
|
+
*/
|
|
82
|
+
buttons?: SkyConfirmButtonConfig[];
|
|
83
|
+
/**
|
|
84
|
+
* Whether to preserve whitespace and new lines inside the dialog.
|
|
85
|
+
* @default false
|
|
86
|
+
*/
|
|
87
|
+
preserveWhiteSpace?: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* The preset button configuration for the dialog.
|
|
90
|
+
*/
|
|
91
|
+
type?: SkyConfirmType;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
declare class SkyConfirmInstance {
|
|
95
|
+
#private;
|
|
96
|
+
/**
|
|
97
|
+
* Fires when users select an action to close the dialog. This event
|
|
98
|
+
* returns a `SkyConfirmCloseEventArgs` object with information about the button that
|
|
99
|
+
* users select. It returns the `'cancel'` action when users press the <kbd>Escape</kbd> key.
|
|
100
|
+
*/
|
|
101
|
+
get closed(): Observable<SkyConfirmCloseEventArgs>;
|
|
102
|
+
/**
|
|
103
|
+
* Closes the confirm instance.
|
|
104
|
+
* @param args Specifies an object to emit to subscribers of the `closed` event
|
|
105
|
+
* of the confirm instance.
|
|
106
|
+
*/
|
|
107
|
+
close(args: SkyConfirmCloseEventArgs): void;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* @internal
|
|
112
|
+
*/
|
|
113
|
+
interface SkyConfirmServiceInterface {
|
|
114
|
+
open(config: SkyConfirmConfig): SkyConfirmInstance;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* @deprecated The `SkyConfirmModule` is no longer needed and can be removed from your application.
|
|
119
|
+
* @internal
|
|
120
|
+
*/
|
|
121
|
+
declare class SkyConfirmModule {
|
|
122
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkyConfirmModule, never>;
|
|
123
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SkyConfirmModule, never, never, never>;
|
|
124
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<SkyConfirmModule>;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* @internal
|
|
129
|
+
*/
|
|
130
|
+
declare class SkyModalAdapterService {
|
|
131
|
+
#private;
|
|
132
|
+
private static readonly MODAL_BODY_FULL_CLASS;
|
|
133
|
+
private static readonly MODAL_BODY_CLASS;
|
|
134
|
+
constructor(windowRef: SkyAppWindowRef);
|
|
135
|
+
toggleFullPageModalClass(isAddFull: boolean): void;
|
|
136
|
+
setPageScroll(isAdd: boolean): void;
|
|
137
|
+
getModalOpener(): HTMLElement;
|
|
138
|
+
scrollContentToTop(element: ElementRef): void;
|
|
139
|
+
/**
|
|
140
|
+
* Hides siblings of modal-host from screen readers
|
|
141
|
+
* @param hostElRef reference to modal-host element
|
|
142
|
+
*/
|
|
143
|
+
hideHostSiblingsFromScreenReaders(hostElRef: ElementRef): void;
|
|
144
|
+
focusFirstElement(modalEl: ElementRef): void;
|
|
145
|
+
/**
|
|
146
|
+
* Restores modal-host siblings to screen reader status prior to modals being opened
|
|
147
|
+
*/
|
|
148
|
+
unhideOrRestoreHostSiblingsFromScreenReaders(): void;
|
|
149
|
+
hidePreviousModalFromScreenReaders(topModal: ElementRef): void;
|
|
150
|
+
unhidePreviousModalFromScreenReaders(topModal: ElementRef): void;
|
|
151
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkyModalAdapterService, never>;
|
|
152
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SkyModalAdapterService>;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Contains an object with the data passed from users when
|
|
157
|
+
* a modal is closed and the reason that the modal was closed.
|
|
158
|
+
*/
|
|
159
|
+
declare class SkyModalCloseArgs {
|
|
160
|
+
/**
|
|
161
|
+
* The reason the modal was closed.
|
|
162
|
+
* Options include `"close"`, `"save"`, and `"cancel"`.
|
|
163
|
+
*/
|
|
164
|
+
reason: string | undefined;
|
|
165
|
+
/**
|
|
166
|
+
* The data passed from users when the modal is closed.
|
|
167
|
+
*/
|
|
168
|
+
data: any;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Properties about the modal close action and a method to close the modal.
|
|
173
|
+
*/
|
|
174
|
+
declare class SkyModalBeforeCloseHandler {
|
|
175
|
+
/**
|
|
176
|
+
* The object that would be emitted by a modal's `closed` event. This object
|
|
177
|
+
* can be used to determine whether to prompt the user for confirmation, such
|
|
178
|
+
* as when the user closes a modal form after entering data.
|
|
179
|
+
*/
|
|
180
|
+
readonly closeArgs: SkyModalCloseArgs;
|
|
181
|
+
/**
|
|
182
|
+
* Function to call to close the modal. Neglecting to call this function
|
|
183
|
+
* effectively cancels the close modal action.
|
|
184
|
+
*/
|
|
185
|
+
readonly closeModal: () => void;
|
|
186
|
+
constructor(closeModal: () => void, closeArgs: SkyModalCloseArgs);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
declare class SkyModalInstance {
|
|
190
|
+
#private;
|
|
191
|
+
/**
|
|
192
|
+
* An event that the modal instance emits when it is about to close.
|
|
193
|
+
* It emits a `SkyModalBeforeCloseHandler` object with a `closeModal` method
|
|
194
|
+
* that closes the modal. If a subscription exists for this event,
|
|
195
|
+
* the modal does not close until the subscriber calls the `closeModal` method.
|
|
196
|
+
*/
|
|
197
|
+
get beforeClose(): Observable<SkyModalBeforeCloseHandler>;
|
|
198
|
+
/**
|
|
199
|
+
* An event that the modal instance emits when it closes.
|
|
200
|
+
* It emits a `SkyModalCloseArgs` object with a `data` property that includes
|
|
201
|
+
* data passed from users on close or save and a `reason` property that indicates
|
|
202
|
+
* whether the modal was saved or closed without saving.
|
|
203
|
+
* The `reason` property accepts any string value.
|
|
204
|
+
* Common examples include `"cancel"`, `"close"`, and `"save"`.
|
|
205
|
+
*/
|
|
206
|
+
get closed(): Observable<SkyModalCloseArgs>;
|
|
207
|
+
/**
|
|
208
|
+
* An event that the modal instance emits when users click
|
|
209
|
+
* the <i class="fa fa-question-circle" aria-hidden="true"></i> button.
|
|
210
|
+
* If a `helpKey` parameter was specified, the `helpOpened` event broadcasts the `helpKey`.
|
|
211
|
+
* @deprecated
|
|
212
|
+
*/
|
|
213
|
+
get helpOpened(): Observable<string>;
|
|
214
|
+
/**
|
|
215
|
+
* A direct reference to the provided component's class.
|
|
216
|
+
*/
|
|
217
|
+
componentInstance: any;
|
|
218
|
+
/**
|
|
219
|
+
* Sets the component adapter for the instance. This is used internally for actions such as scrolling the content.
|
|
220
|
+
* @internal
|
|
221
|
+
*/
|
|
222
|
+
set adapter(value: SkyModalAdapterService);
|
|
223
|
+
/**
|
|
224
|
+
* Sets the component ref for the instance. This is used to extract the component instance for the public API and the element ref for internal use.
|
|
225
|
+
* @internal
|
|
226
|
+
*/
|
|
227
|
+
set componentRef(value: ComponentRef<any>);
|
|
228
|
+
/**
|
|
229
|
+
* Closes the modal instance.
|
|
230
|
+
* @param result Specifies an object to emit to subscribers of the `closed` event of the
|
|
231
|
+
* modal instance. The `SkyModalInstance` provider can be injected into a component's constructor
|
|
232
|
+
* so that this `close` function can be called from a button in the `sky-modal-footer`.
|
|
233
|
+
* @param reason Specifies the reason for the modal closing, with the default reason of `"close"`.
|
|
234
|
+
* @param ignoreBeforeClose Indicates whether to ignore the modal instance's `beforeClose` event.
|
|
235
|
+
*/
|
|
236
|
+
close(result?: any, reason?: string, ignoreBeforeClose?: boolean): void;
|
|
237
|
+
/**
|
|
238
|
+
* Closes the modal instance with `reason="cancel"`.
|
|
239
|
+
* @param result Specifies an object to emit to subscribers of the `closed` event of the modal
|
|
240
|
+
* instance. The `SkyModalInstance` provider can be injected into a component's constructor so
|
|
241
|
+
* that this cancel function can be called from a button in the `sky-modal-footer`.
|
|
242
|
+
*/
|
|
243
|
+
cancel(result?: any): void;
|
|
244
|
+
/**
|
|
245
|
+
* Closes the modal instance with `reason="save"`.
|
|
246
|
+
* @param result Specifies an object to emit to subscribers of the `closed` event of the modal
|
|
247
|
+
* instance. The `SkyModalInstance` provider can be injected into a component's constructor so
|
|
248
|
+
* that this `save` function can be called from a button in `the sky-modal-footer`.
|
|
249
|
+
*/
|
|
250
|
+
save(result?: any): void;
|
|
251
|
+
/**
|
|
252
|
+
* Scrolls the modal content area to the top of its scrollable area.
|
|
253
|
+
*/
|
|
254
|
+
scrollContentToTop(): void;
|
|
255
|
+
/**
|
|
256
|
+
* Triggers the `helpOpened` event that broadcasts a `helpKey` parameter to open
|
|
257
|
+
* when users click the <i class="fa fa-question-circle" aria-hidden="true"></i> button.
|
|
258
|
+
* @param helpKey Specifies a string to emit to subscribers of
|
|
259
|
+
* the modal instance's `helpOpened` event. Consumers can inject the `SkyModalInstance` provider
|
|
260
|
+
* into a component's constructor to call the `openHelp` function in the modal template.
|
|
261
|
+
* @deprecated
|
|
262
|
+
*/
|
|
263
|
+
openHelp(helpKey: string): void;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* Specifies configuration options for creating a modal.
|
|
268
|
+
*/
|
|
269
|
+
interface SkyModalConfigurationInterface {
|
|
270
|
+
/**
|
|
271
|
+
* Whether to display the modal full screen.
|
|
272
|
+
* This property defaults to `false`.
|
|
273
|
+
*/
|
|
274
|
+
fullPage?: boolean;
|
|
275
|
+
/**
|
|
276
|
+
* The size for the modal. The valid options are `small`, `medium`, and `large`.
|
|
277
|
+
* This property defaults to `medium`.
|
|
278
|
+
*/
|
|
279
|
+
size?: string;
|
|
280
|
+
/**
|
|
281
|
+
* An array property of `providers`.
|
|
282
|
+
* In Angular, a provider is something that can create or deliver a service.
|
|
283
|
+
* This property can be used to pass context values from the component that launches the modal to the modal component.
|
|
284
|
+
*/
|
|
285
|
+
providers?: StaticProvider[];
|
|
286
|
+
/**
|
|
287
|
+
* The HTML element ID of the element that describes
|
|
288
|
+
* the modal. This sets the modal's `aria-describedby` attribute to provide a text equivalent for
|
|
289
|
+
* [to support accessibility](https://developer.blackbaud.com/skyux/learn/accessibility).
|
|
290
|
+
* The description typically includes text on the modal but not on items that users interact
|
|
291
|
+
* with, such as buttons and forms. If you do not specify an ID, the default description is
|
|
292
|
+
* the content of the `sky-modal-content` component.
|
|
293
|
+
* For more information about the `aria-describedby` attribute, see the [WAI-ARIA definition](https://www.w3.org/TR/wai-aria/#aria-describedby).
|
|
294
|
+
* @deprecated Set `headingText` on the modal component instead.
|
|
295
|
+
*/
|
|
296
|
+
ariaDescribedBy?: string;
|
|
297
|
+
/**
|
|
298
|
+
* The HTML element ID of the element that labels
|
|
299
|
+
* the modal. This sets the `aria-labelledby` attribute for the modal to provide a text equivalent for
|
|
300
|
+
* [to support accessibility](https://developer.blackbaud.com/skyux/learn/accessibility).
|
|
301
|
+
* This is typically a header element, and if you do not specify an ID, the default value
|
|
302
|
+
* is the content of the `sky-modal-header` component.
|
|
303
|
+
* For more information about the `aria-labelledby` attribute, see the [WAI-ARIA definition](https://www.w3.org/TR/wai-aria/#aria-labelledby).
|
|
304
|
+
* @deprecated Set `headingText` on the modal component instead.
|
|
305
|
+
*/
|
|
306
|
+
ariaLabelledBy?: string;
|
|
307
|
+
/**
|
|
308
|
+
* The ARIA role for the modal
|
|
309
|
+
* [to support accessibility](https://developer.blackbaud.com/skyux/learn/accessibility)
|
|
310
|
+
* by indicating how the modal functions and what it controls. For information about
|
|
311
|
+
* how an ARIA role indicates what an item represents on a web page, see the
|
|
312
|
+
* [WAI-ARIA roles model](http://www.w3.org/WAI/PF/aria/#roles). By default, modals set
|
|
313
|
+
* the ARIA role to `dialog`.
|
|
314
|
+
* @default "dialog"
|
|
315
|
+
*/
|
|
316
|
+
ariaRole?: string;
|
|
317
|
+
/**
|
|
318
|
+
* Whether the modal uses tiles. When set to `true`, the modal's background switches
|
|
319
|
+
* to `$sky-background-color-neutral-light` and tile headings are styled as subsection headings.
|
|
320
|
+
* This property defaults to `false`.
|
|
321
|
+
* @deprecated Tiles inside modals are no longer a recommended design pattern. For complex forms, use [sectioned forms](https://developer.blackbaud.com/skyux/components/sectioned-form) or [other form containers](https://developer.blackbaud.com/skyux/design/guidelines/form-design) instead.
|
|
322
|
+
*/
|
|
323
|
+
tiledBody?: boolean;
|
|
324
|
+
/**
|
|
325
|
+
* The `helpKey` string. This property displays
|
|
326
|
+
* the <i class="fa fa-question-circle" aria-hidden="true"></i> button in the modal header.
|
|
327
|
+
* When users click this button, the `helpOpened` event broadcasts the `helpKey` parameter.
|
|
328
|
+
* Blackbaud developers can use the Help Widget, which is for internal Blackbaud use only, to
|
|
329
|
+
* [display help content in a flyout panel](https://docs.blackbaud.com/bb-help-docs/components/modal-header).
|
|
330
|
+
* @deprecated To display a help button in the modal header, set either the
|
|
331
|
+
* `helpKey` or `helpPopoverContent` inputs on the modal component.
|
|
332
|
+
*/
|
|
333
|
+
helpKey?: string;
|
|
334
|
+
/**
|
|
335
|
+
* The CSS class to add to the modal, such as `ag-custom-component-popup` for
|
|
336
|
+
* using a modal as part of a cell editor in Data Entry Grid.
|
|
337
|
+
*/
|
|
338
|
+
wrapperClass?: string;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* @internal
|
|
343
|
+
*/
|
|
344
|
+
interface SkyModalServiceInterface {
|
|
345
|
+
open(component: any, config?: SkyModalConfigurationInterface | any[]): SkyModalInstance;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* A service that launches modals.
|
|
350
|
+
*/
|
|
351
|
+
declare class SkyModalService implements SkyModalServiceInterface {
|
|
352
|
+
#private;
|
|
353
|
+
private static host;
|
|
354
|
+
constructor(dynamicComponentService: SkyDynamicComponentService);
|
|
355
|
+
/**
|
|
356
|
+
* @internal
|
|
357
|
+
* Removes the modal host from the DOM.
|
|
358
|
+
*/
|
|
359
|
+
dispose(): void;
|
|
360
|
+
/**
|
|
361
|
+
* Opens a modal using the specified component.
|
|
362
|
+
* @param component Determines the component to render.
|
|
363
|
+
* @param {SkyModalConfigurationInterface} config Specifies configuration options for the modal.
|
|
364
|
+
*/
|
|
365
|
+
open(component: any, config?: SkyModalConfigurationInterface | any[]): SkyModalInstance;
|
|
366
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkyModalService, never>;
|
|
367
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SkyModalService>;
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* A service that launches modals.
|
|
371
|
+
* @internal
|
|
372
|
+
* @deprecated Use `SkyModalService` to open a standalone component instead.
|
|
373
|
+
*/
|
|
374
|
+
declare class SkyModalLegacyService extends SkyModalService {
|
|
375
|
+
constructor(dynamicComponentSvc: SkyDynamicComponentLegacyService);
|
|
376
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkyModalLegacyService, never>;
|
|
377
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SkyModalLegacyService>;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* Launches a dialog.
|
|
382
|
+
*/
|
|
383
|
+
declare class SkyConfirmService implements SkyConfirmServiceInterface {
|
|
384
|
+
#private;
|
|
385
|
+
constructor(modalService: SkyModalService);
|
|
386
|
+
/**
|
|
387
|
+
* Opens a dialog using the specified options.
|
|
388
|
+
* @param config Specifies configuration options for the dialog.
|
|
389
|
+
*/
|
|
390
|
+
open(config: SkyConfirmConfig): SkyConfirmInstance;
|
|
391
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkyConfirmService, never>;
|
|
392
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SkyConfirmService>;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* @internal
|
|
397
|
+
*/
|
|
398
|
+
declare class SkyModalConfiguration {
|
|
399
|
+
fullPage?: boolean;
|
|
400
|
+
size?: string;
|
|
401
|
+
/**
|
|
402
|
+
* @deprecated
|
|
403
|
+
*/
|
|
404
|
+
ariaDescribedBy?: string;
|
|
405
|
+
/**
|
|
406
|
+
* @deprecated
|
|
407
|
+
*/
|
|
408
|
+
ariaLabelledBy?: string;
|
|
409
|
+
ariaRole?: string;
|
|
410
|
+
/**
|
|
411
|
+
* @deprecated
|
|
412
|
+
*/
|
|
413
|
+
tiledBody?: boolean;
|
|
414
|
+
/**
|
|
415
|
+
* @deprecated
|
|
416
|
+
*/
|
|
417
|
+
helpKey?: string;
|
|
418
|
+
wrapperClass?: string;
|
|
419
|
+
constructor();
|
|
420
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkyModalConfiguration, never>;
|
|
421
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SkyModalConfiguration>;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* Contains an object with properties for displaying form-level errors in the modal.
|
|
426
|
+
*/
|
|
427
|
+
interface SkyModalError {
|
|
428
|
+
/**
|
|
429
|
+
* The error message to display.
|
|
430
|
+
*/
|
|
431
|
+
message: string;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* @internal
|
|
436
|
+
*/
|
|
437
|
+
declare class SkyModalErrorsService {
|
|
438
|
+
#private;
|
|
439
|
+
formErrors: Observable<SkyModalError[] | undefined>;
|
|
440
|
+
constructor();
|
|
441
|
+
updateErrors(value: SkyModalError[] | undefined): void;
|
|
442
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkyModalErrorsService, never>;
|
|
443
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SkyModalErrorsService>;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
/**
|
|
447
|
+
* @internal
|
|
448
|
+
*/
|
|
449
|
+
declare class SkyModalHostService {
|
|
450
|
+
#private;
|
|
451
|
+
static get openModalCountChange(): Observable<number>;
|
|
452
|
+
static get backdropZIndexChange(): Observable<number>;
|
|
453
|
+
/**
|
|
454
|
+
* @deprecated Subscribe to `openModalCountChange` instead.
|
|
455
|
+
*/
|
|
456
|
+
static get openModalCount(): number;
|
|
457
|
+
static get fullPageModalCount(): number;
|
|
458
|
+
/**
|
|
459
|
+
* @deprecated Subscribe to `backdropZIndexChange` instead.
|
|
460
|
+
*/
|
|
461
|
+
static get backdropZIndex(): number;
|
|
462
|
+
static get topModal(): SkyModalHostService;
|
|
463
|
+
close: Subject<void>;
|
|
464
|
+
fullPage: boolean;
|
|
465
|
+
/**
|
|
466
|
+
* @deprecated
|
|
467
|
+
*/
|
|
468
|
+
openHelp: Subject<string>;
|
|
469
|
+
zIndex: number;
|
|
470
|
+
constructor();
|
|
471
|
+
getModalZIndex(): number;
|
|
472
|
+
onClose(): void;
|
|
473
|
+
/**
|
|
474
|
+
* @deprecated
|
|
475
|
+
*/
|
|
476
|
+
onOpenHelp(helpKey: string): void;
|
|
477
|
+
destroy(): void;
|
|
478
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkyModalHostService, never>;
|
|
479
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SkyModalHostService>;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* Provides a common look-and-feel for modal content with options to display
|
|
484
|
+
* a common modal header, specify body content, and display a common modal footer
|
|
485
|
+
* and buttons.
|
|
486
|
+
*/
|
|
487
|
+
declare class SkyModalComponent implements AfterViewInit, OnDestroy, OnInit {
|
|
488
|
+
#private;
|
|
489
|
+
wrapperClass: string | undefined;
|
|
490
|
+
/**
|
|
491
|
+
* A list of form-level errors to display to the user.
|
|
492
|
+
*/
|
|
493
|
+
set formErrors(value: SkyModalError[] | undefined);
|
|
494
|
+
/**
|
|
495
|
+
* The text to display as the modal's heading.
|
|
496
|
+
*/
|
|
497
|
+
headingText: string | undefined;
|
|
498
|
+
/**
|
|
499
|
+
* A help key that identifies the global help content to display. When specified along with `headingText`, a [help inline](https://developer.blackbaud.com/skyux/components/help-inline) button is
|
|
500
|
+
* added to the modal header. Clicking the button invokes global help as configured by the application. This property only applies when `headingText` is also specified.
|
|
501
|
+
*/
|
|
502
|
+
helpKey: string | undefined;
|
|
503
|
+
/**
|
|
504
|
+
* The content of the help popover. When specified along with `headingText`, a [help inline](https://developer.blackbaud.com/skyux/components/help-inline)
|
|
505
|
+
* button is added to the modal header. The help inline button displays a [popover](https://developer.blackbaud.com/skyux/components/popover)
|
|
506
|
+
* when clicked using the specified content and optional title. This property only applies when `headingText` is also specified.
|
|
507
|
+
*/
|
|
508
|
+
helpPopoverContent: string | TemplateRef<unknown> | undefined;
|
|
509
|
+
/**
|
|
510
|
+
* The title of the help popover. This property only applies when `helpPopoverContent` is
|
|
511
|
+
* also specified.
|
|
512
|
+
*/
|
|
513
|
+
helpPopoverTitle: string | undefined;
|
|
514
|
+
/**
|
|
515
|
+
* Used by the confirm component to set a different role for the modal.
|
|
516
|
+
* @internal
|
|
517
|
+
*/
|
|
518
|
+
set ariaRole(value: string | undefined);
|
|
519
|
+
ariaRoleOrDefault: string;
|
|
520
|
+
/**
|
|
521
|
+
* @internal
|
|
522
|
+
* @deprecated
|
|
523
|
+
*/
|
|
524
|
+
tiledBody: boolean | undefined;
|
|
525
|
+
/**
|
|
526
|
+
* Used by the confirm component to set descriptive text without using a
|
|
527
|
+
* modal header.
|
|
528
|
+
* @internal
|
|
529
|
+
*/
|
|
530
|
+
set ariaDescribedBy(id: string | undefined);
|
|
531
|
+
get ariaDescribedBy(): string | undefined;
|
|
532
|
+
/**
|
|
533
|
+
* Used by the confirm component to set descriptive text without using a
|
|
534
|
+
* modal header.
|
|
535
|
+
* @internal
|
|
536
|
+
*/
|
|
537
|
+
set ariaLabelledBy(id: string | undefined);
|
|
538
|
+
get ariaLabelledBy(): string | undefined;
|
|
539
|
+
readonly layout: i0.InputSignal<"none" | "fit">;
|
|
540
|
+
ariaOwns: string | null;
|
|
541
|
+
/**
|
|
542
|
+
* @deprecated
|
|
543
|
+
*/
|
|
544
|
+
legacyHelpKey: string | undefined;
|
|
545
|
+
modalState: string;
|
|
546
|
+
modalZIndex: number | undefined;
|
|
547
|
+
scrollShadow: SkyScrollShadowEventArgs;
|
|
548
|
+
size: string;
|
|
549
|
+
modalContentWrapperElement: ElementRef | undefined;
|
|
550
|
+
protected scrollShadowEnabled: boolean;
|
|
551
|
+
constructor();
|
|
552
|
+
onDocumentKeyUp(event: KeyboardEvent): void;
|
|
553
|
+
onDocumentKeyDown(event: KeyboardEvent): void;
|
|
554
|
+
ngOnInit(): void;
|
|
555
|
+
ngAfterViewInit(): void;
|
|
556
|
+
ngOnDestroy(): void;
|
|
557
|
+
/**
|
|
558
|
+
* @deprecated
|
|
559
|
+
*/
|
|
560
|
+
helpButtonClick(): void;
|
|
561
|
+
closeButtonClick(): void;
|
|
562
|
+
windowResize(): void;
|
|
563
|
+
scrollShadowChange(args: SkyScrollShadowEventArgs): void;
|
|
564
|
+
viewkeeperEnabled(): boolean;
|
|
565
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkyModalComponent, never>;
|
|
566
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SkyModalComponent, "sky-modal", never, { "formErrors": { "alias": "formErrors"; "required": false; }; "headingText": { "alias": "headingText"; "required": false; }; "helpKey": { "alias": "helpKey"; "required": false; }; "helpPopoverContent": { "alias": "helpPopoverContent"; "required": false; }; "helpPopoverTitle": { "alias": "helpPopoverTitle"; "required": false; }; "ariaRole": { "alias": "ariaRole"; "required": false; }; "tiledBody": { "alias": "tiledBody"; "required": false; }; "ariaDescribedBy": { "alias": "ariaDescribedBy"; "required": false; }; "ariaLabelledBy": { "alias": "ariaLabelledBy"; "required": false; }; "layout": { "alias": "layout"; "required": false; "isSignal": true; }; }, {}, never, ["sky-modal-header", "sky-modal-content", "sky-modal-footer"], true, never>;
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
/**
|
|
570
|
+
* Specifies content to display in the modal's body.
|
|
571
|
+
*/
|
|
572
|
+
declare class SkyModalContentComponent {
|
|
573
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkyModalContentComponent, never>;
|
|
574
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SkyModalContentComponent, "sky-modal-content", never, {}, {}, never, ["*"], true, [{ directive: typeof i1.SkyResponsiveHostDirective; inputs: {}; outputs: {}; }]>;
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
/**
|
|
578
|
+
* Specifies content to display in the modal's footer.
|
|
579
|
+
*/
|
|
580
|
+
declare class SkyModalFooterComponent {
|
|
581
|
+
protected readonly errorsSvc: SkyModalErrorsService;
|
|
582
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkyModalFooterComponent, never>;
|
|
583
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SkyModalFooterComponent, "sky-modal-footer", never, {}, {}, never, ["*"], true, [{ directive: typeof i1.SkyResponsiveHostDirective; inputs: {}; outputs: {}; }]>;
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
/**
|
|
587
|
+
* Specifies a header for the modal.
|
|
588
|
+
*/
|
|
589
|
+
declare class SkyModalHeaderComponent {
|
|
590
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkyModalHeaderComponent, never>;
|
|
591
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SkyModalHeaderComponent, "sky-modal-header", never, {}, {}, never, ["*", ".sky-control-help"], true, never>;
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
/**
|
|
595
|
+
* Provides a way to mark a modal as "dirty" and displays a confirmation
|
|
596
|
+
* message when a user closes the modal without saving.
|
|
597
|
+
*/
|
|
598
|
+
declare class SkyModalIsDirtyDirective implements OnInit, OnDestroy {
|
|
599
|
+
#private;
|
|
600
|
+
/**
|
|
601
|
+
* Whether the user edited an input on the modal.
|
|
602
|
+
* @required
|
|
603
|
+
*/
|
|
604
|
+
isDirty: boolean;
|
|
605
|
+
ngOnInit(): void;
|
|
606
|
+
ngOnDestroy(): void;
|
|
607
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkyModalIsDirtyDirective, never>;
|
|
608
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<SkyModalIsDirtyDirective, "sky-modal[isDirty]", never, { "isDirty": { "alias": "isDirty"; "required": false; }; }, {}, never, never, true, never>;
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
declare class SkyModalModule {
|
|
612
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkyModalModule, never>;
|
|
613
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SkyModalModule, never, [typeof SkyModalComponent, typeof SkyModalContentComponent, typeof SkyModalFooterComponent, typeof SkyModalHeaderComponent, typeof SkyModalIsDirtyDirective], [typeof SkyModalComponent, typeof SkyModalContentComponent, typeof SkyModalFooterComponent, typeof SkyModalHeaderComponent, typeof SkyModalIsDirtyDirective]>;
|
|
614
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<SkyModalModule>;
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
/**
|
|
618
|
+
* The view model for button configuration that the confirm component uses.
|
|
619
|
+
* @internal
|
|
620
|
+
*/
|
|
621
|
+
interface SkyConfirmButton {
|
|
622
|
+
action: SkyConfirmButtonAction;
|
|
623
|
+
styleType: SkyConfirmButtonStyleType;
|
|
624
|
+
text: string;
|
|
625
|
+
autofocus?: boolean;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
/**
|
|
629
|
+
* @internal
|
|
630
|
+
*/
|
|
631
|
+
declare class SkyConfirmComponent implements OnDestroy {
|
|
632
|
+
#private;
|
|
633
|
+
protected body: string | undefined;
|
|
634
|
+
protected bodyId: string;
|
|
635
|
+
protected buttons: SkyConfirmButton[] | undefined;
|
|
636
|
+
protected isOkType: boolean;
|
|
637
|
+
protected message: string;
|
|
638
|
+
protected preserveWhiteSpace: boolean;
|
|
639
|
+
constructor();
|
|
640
|
+
ngOnDestroy(): void;
|
|
641
|
+
protected close(button: SkyConfirmButton): void;
|
|
642
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkyConfirmComponent, never>;
|
|
643
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SkyConfirmComponent, "sky-confirm", never, {}, {}, never, never, true, never>;
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
export { SkyConfirmInstance, SkyConfirmModule, SkyConfirmService, SkyConfirmType, SkyModalBeforeCloseHandler, SkyModalCloseArgs, SkyModalConfiguration, SkyModalErrorsService, SkyModalHostService, SkyModalInstance, SkyModalLegacyService, SkyModalModule, SkyModalService, SkyConfirmComponent as λ1, SkyModalContentComponent as λ2, SkyModalFooterComponent as λ3, SkyModalHeaderComponent as λ4, SkyModalComponent as λ5, SkyModalIsDirtyDirective as λ6 };
|
|
647
|
+
export type { SkyConfirmButtonAction, SkyConfirmButtonConfig, SkyConfirmButtonStyleType, SkyConfirmCloseEventArgs, SkyConfirmConfig, SkyConfirmServiceInterface, SkyModalConfigurationInterface, SkyModalError, SkyModalServiceInterface };
|