@skyux/modals 10.0.0-alpha.2 → 10.0.0-alpha.4

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 (43) hide show
  1. package/documentation.json +1432 -1062
  2. package/esm2022/index.mjs +1 -1
  3. package/esm2022/lib/modules/confirm/confirm-instance.mjs +8 -6
  4. package/esm2022/lib/modules/confirm/confirm-service-interface.mjs +2 -0
  5. package/esm2022/lib/modules/confirm/confirm.component.mjs +61 -37
  6. package/esm2022/lib/modules/confirm/confirm.module.mjs +4 -4
  7. package/esm2022/lib/modules/confirm/confirm.service.mjs +10 -16
  8. package/esm2022/lib/modules/modal/modal-adapter.service.mjs +3 -3
  9. package/esm2022/lib/modules/modal/modal-component-adapter.service.mjs +3 -3
  10. package/esm2022/lib/modules/modal/modal-configuration.mjs +3 -3
  11. package/esm2022/lib/modules/modal/modal-content.component.mjs +3 -3
  12. package/esm2022/lib/modules/modal/modal-errors.service.mjs +3 -3
  13. package/esm2022/lib/modules/modal/modal-footer.component.mjs +3 -3
  14. package/esm2022/lib/modules/modal/modal-header.component.mjs +3 -3
  15. package/esm2022/lib/modules/modal/modal-host-context.mjs +3 -3
  16. package/esm2022/lib/modules/modal/modal-host.component.mjs +3 -3
  17. package/esm2022/lib/modules/modal/modal-host.service.mjs +3 -3
  18. package/esm2022/lib/modules/modal/modal-is-dirty.directive.mjs +3 -3
  19. package/esm2022/lib/modules/modal/modal-scroll-shadow.directive.mjs +3 -3
  20. package/esm2022/lib/modules/modal/modal.component.mjs +6 -6
  21. package/esm2022/lib/modules/modal/modal.module.mjs +4 -4
  22. package/esm2022/lib/modules/modal/modal.service.mjs +6 -6
  23. package/esm2022/lib/modules/shared/sky-modals-resources.module.mjs +4 -4
  24. package/esm2022/testing/confirm/confirm-testing.controller.mjs +7 -0
  25. package/esm2022/testing/confirm/confirm-testing.module.mjs +18 -0
  26. package/esm2022/testing/confirm/confirm-testing.service.mjs +57 -0
  27. package/esm2022/testing/confirm/provide-confirm-testing.mjs +20 -0
  28. package/esm2022/testing/public-api.mjs +3 -1
  29. package/fesm2022/skyux-modals-testing.mjs +98 -2
  30. package/fesm2022/skyux-modals-testing.mjs.map +1 -1
  31. package/fesm2022/skyux-modals.mjs +268 -249
  32. package/fesm2022/skyux-modals.mjs.map +1 -1
  33. package/index.d.ts +1 -0
  34. package/lib/modules/confirm/confirm-instance.d.ts +4 -3
  35. package/lib/modules/confirm/confirm-service-interface.d.ts +8 -0
  36. package/lib/modules/confirm/confirm.component.d.ts +11 -13
  37. package/lib/modules/confirm/confirm.service.d.ts +2 -1
  38. package/package.json +9 -9
  39. package/testing/confirm/confirm-testing.controller.d.ts +28 -0
  40. package/testing/confirm/confirm-testing.module.d.ts +9 -0
  41. package/testing/confirm/confirm-testing.service.d.ts +14 -0
  42. package/testing/confirm/provide-confirm-testing.d.ts +5 -0
  43. package/testing/public-api.d.ts +2 -0
@@ -1,19 +1,17 @@
1
- import { SkyIdService } from '@skyux/core';
2
- import { SkyLibResourcesService } from '@skyux/i18n';
3
- import { SkyModalInstance } from '../modal/modal-instance';
1
+ import { OnDestroy } from '@angular/core';
4
2
  import { SkyConfirmButton } from './confirm-button';
5
- import { SkyConfirmConfig } from './confirm-config';
6
3
  import * as i0 from "@angular/core";
7
- export declare class SkyConfirmComponent {
4
+ export declare class SkyConfirmComponent implements OnDestroy {
8
5
  #private;
9
- buttons: SkyConfirmButton[] | undefined;
10
- message: string;
11
- body: string | undefined;
12
- bodyId: string;
13
- preserveWhiteSpace: boolean;
14
- isOkType: boolean;
15
- constructor(config: SkyConfirmConfig, modal: SkyModalInstance, resourcesService: SkyLibResourcesService, idService: SkyIdService);
16
- close(button: SkyConfirmButton): void;
6
+ protected body: string | undefined;
7
+ protected bodyId: string;
8
+ protected buttons: SkyConfirmButton[] | undefined;
9
+ protected isOkType: boolean;
10
+ protected message: string;
11
+ protected preserveWhiteSpace: boolean;
12
+ constructor();
13
+ ngOnDestroy(): void;
14
+ protected close(button: SkyConfirmButton): void;
17
15
  static ɵfac: i0.ɵɵFactoryDeclaration<SkyConfirmComponent, never>;
18
16
  static ɵcmp: i0.ɵɵComponentDeclaration<SkyConfirmComponent, "sky-confirm", never, {}, {}, never, never, true, never>;
19
17
  }
@@ -1,11 +1,12 @@
1
1
  import { SkyModalService } from '../modal/modal.service';
2
2
  import { SkyConfirmConfig } from './confirm-config';
3
3
  import { SkyConfirmInstance } from './confirm-instance';
4
+ import { SkyConfirmServiceInterface } from './confirm-service-interface';
4
5
  import * as i0 from "@angular/core";
5
6
  /**
6
7
  * Launches a dialog.
7
8
  */
8
- export declare class SkyConfirmService {
9
+ export declare class SkyConfirmService implements SkyConfirmServiceInterface {
9
10
  #private;
10
11
  constructor(modalService: SkyModalService);
11
12
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyux/modals",
3
- "version": "10.0.0-alpha.2",
3
+ "version": "10.0.0-alpha.4",
4
4
  "author": "Blackbaud, Inc.",
5
5
  "keywords": [
6
6
  "blackbaud",
@@ -36,14 +36,14 @@
36
36
  }
37
37
  },
38
38
  "peerDependencies": {
39
- "@angular/cdk": "^17.1.1",
40
- "@angular/common": "^17.1.1",
41
- "@angular/core": "^17.1.1",
42
- "@angular/router": "^17.1.1",
43
- "@skyux/core": "10.0.0-alpha.2",
44
- "@skyux/i18n": "10.0.0-alpha.2",
45
- "@skyux/indicators": "10.0.0-alpha.2",
46
- "@skyux/theme": "10.0.0-alpha.2"
39
+ "@angular/cdk": "^17.2.2",
40
+ "@angular/common": "^17.2.4",
41
+ "@angular/core": "^17.2.4",
42
+ "@angular/router": "^17.2.4",
43
+ "@skyux/core": "10.0.0-alpha.4",
44
+ "@skyux/i18n": "10.0.0-alpha.4",
45
+ "@skyux/indicators": "10.0.0-alpha.4",
46
+ "@skyux/theme": "10.0.0-alpha.4"
47
47
  },
48
48
  "dependencies": {
49
49
  "tslib": "^2.6.2"
@@ -0,0 +1,28 @@
1
+ import { SkyConfirmCloseEventArgs, SkyConfirmConfig } from '@skyux/modals';
2
+ /**
3
+ * A controller to be injected into tests, which mocks the confirm service
4
+ * and handles interactions with confirm dialogs.
5
+ */
6
+ export declare abstract class SkyConfirmTestingController {
7
+ /**
8
+ * Closes the confirm dialog with the "cancel" action.
9
+ */
10
+ abstract cancel(): void;
11
+ /**
12
+ * Throws if a confirm dialog is open.
13
+ */
14
+ abstract expectNone(): void;
15
+ /**
16
+ * Throws if the open confirm dialog does not match the provided configuration.
17
+ * @param config
18
+ */
19
+ abstract expectOpen(config: SkyConfirmConfig): void;
20
+ /**
21
+ * Closes the confirm dialog with the provided action.
22
+ */
23
+ abstract close(args: SkyConfirmCloseEventArgs): void;
24
+ /**
25
+ * Closes the confirm dialog with the "ok" action.
26
+ */
27
+ abstract ok(): void;
28
+ }
@@ -0,0 +1,9 @@
1
+ import * as i0 from "@angular/core";
2
+ /**
3
+ * Configures the `SkyConfirmTestingController` as the backend for the `SkyConfirmService`.
4
+ */
5
+ export declare class SkyConfirmTestingModule {
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<SkyConfirmTestingModule, never>;
7
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SkyConfirmTestingModule, never, never, never>;
8
+ static ɵinj: i0.ɵɵInjectorDeclaration<SkyConfirmTestingModule>;
9
+ }
@@ -0,0 +1,14 @@
1
+ import { SkyConfirmCloseEventArgs, SkyConfirmConfig, SkyConfirmInstance, SkyConfirmServiceInterface } from '@skyux/modals';
2
+ import { SkyConfirmTestingController } from './confirm-testing.controller';
3
+ /**
4
+ * @internal
5
+ */
6
+ export declare class SkyConfirmTestingService extends SkyConfirmTestingController implements SkyConfirmServiceInterface {
7
+ #private;
8
+ cancel(): void;
9
+ ok(): void;
10
+ close(args: SkyConfirmCloseEventArgs): void;
11
+ expectNone(): void;
12
+ expectOpen(expectedConfig: SkyConfirmConfig): void;
13
+ open(config: SkyConfirmConfig): SkyConfirmInstance;
14
+ }
@@ -0,0 +1,5 @@
1
+ import { Provider } from '@angular/core';
2
+ /**
3
+ * @internal
4
+ */
5
+ export declare function provideConfirmTesting(): Provider[];
@@ -2,5 +2,7 @@ export { SkyModalFixture } from './modal-fixture';
2
2
  export { SkyConfirmButtonHarness } from './confirm/confirm-button-harness';
3
3
  export { SkyConfirmButtonHarnessFilters } from './confirm/confirm-button-harness-filters';
4
4
  export { SkyConfirmHarness } from './confirm/confirm-harness';
5
+ export { SkyConfirmTestingController } from './confirm/confirm-testing.controller';
6
+ export { SkyConfirmTestingModule } from './confirm/confirm-testing.module';
5
7
  export { SkyModalHarness } from './modal/modal-harness';
6
8
  export { SkyModalHarnessFilters } from './modal/modal-harness-filters';