@skyux/modals 7.4.2 → 7.6.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/documentation.json +273 -296
- package/esm2020/lib/modules/confirm/confirm-button-config.mjs +1 -1
- package/esm2020/lib/modules/confirm/confirm-config.mjs +1 -1
- package/esm2020/lib/modules/modal/modal-adapter.service.mjs +2 -2
- package/esm2020/lib/modules/modal/modal-close-args.mjs +1 -1
- package/esm2020/lib/modules/modal/modal-host.component.mjs +2 -2
- package/esm2020/lib/modules/modal/modal-scroll-shadow.directive.mjs +2 -2
- package/esm2020/lib/modules/modal/modal.component.mjs +7 -11
- package/esm2020/lib/modules/modal/modal.interface.mjs +1 -1
- package/esm2020/lib/modules/modal/modal.module.mjs +5 -2
- package/esm2020/lib/modules/modal/modal.service.mjs +2 -2
- package/esm2020/testing/confirm/confirm-harness.mjs +2 -2
- package/esm2020/testing/modal-fixture.mjs +6 -6
- package/fesm2015/skyux-modals-testing.mjs +6 -6
- package/fesm2015/skyux-modals-testing.mjs.map +1 -1
- package/fesm2015/skyux-modals.mjs +14 -15
- package/fesm2015/skyux-modals.mjs.map +1 -1
- package/fesm2020/skyux-modals-testing.mjs +6 -6
- package/fesm2020/skyux-modals-testing.mjs.map +1 -1
- package/fesm2020/skyux-modals.mjs +14 -15
- package/fesm2020/skyux-modals.mjs.map +1 -1
- package/lib/modules/confirm/confirm-button-config.d.ts +4 -4
- package/lib/modules/confirm/confirm-config.d.ts +5 -5
- package/lib/modules/modal/modal-adapter.service.d.ts +1 -1
- package/lib/modules/modal/modal-close-args.d.ts +1 -1
- package/lib/modules/modal/modal.component.d.ts +2 -4
- package/lib/modules/modal/modal.interface.d.ts +9 -8
- package/lib/modules/modal/modal.module.d.ts +4 -4
- package/package.json +5 -5
- package/testing/confirm/confirm-harness.d.ts +1 -1
|
@@ -1 +1 @@
|
|
|
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/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.#getModalDiaglogElement();\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.#getModalDiaglogElement();\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.#getModalDiaglogElement();\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 #getModalDiaglogElement(): 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 * Indicates if the whitespace is preserved on the confirom 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","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAEA;;;AAGG;MACU,eAAe,CAAA;IAK1B,WAAY,CAAA,OAAkC,EAAE,SAAiB,EAAA;;QAJjE,6BAA2B,CAAA,GAAA,CAAA,IAAA,EAAA,KAAA,CAAA,CAAA,CAAA;QAE3B,wBAAoC,CAAA,GAAA,CAAA,IAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAGlC,QAAA,sBAAA,CAAA,IAAI,EAAA,wBAAA,EAAY,OAAO,EAAA,GAAA,CAAA,CAAC;AACxB,QAAA,MAAM,YAAY,GAAG,QAAQ,CAAC,aAAa,CACzC,yBAAyB,GAAG,SAAS,GAAG,IAAI,CAC9B,CAAC;QAEjB,IAAI,CAAC,YAAY,EAAE;AACjB,YAAA,MAAM,IAAI,KAAK,CACb,yDAAyD,SAAS,CAAA,EAAA,CAAI,CACvE,CAAC;AACH,SAAA;AAED,QAAA,sBAAA,CAAA,IAAI,EAAA,6BAAA,EAAiB,YAAY,EAAA,GAAA,CAAA,CAAC;KACnC;AAED;;AAEG;AACH,IAAA,IAAW,eAAe,GAAA;QACxB,MAAM,kBAAkB,GAAG,sBAAA,CAAA,IAAI,2EAAwB,CAA5B,IAAA,CAAA,I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G;;;;"}
|
|
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/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","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAEA;;;AAGG;MACU,eAAe,CAAA;IAK1B,WAAY,CAAA,OAAkC,EAAE,SAAiB,EAAA;;QAJjE,6BAA2B,CAAA,GAAA,CAAA,IAAA,EAAA,KAAA,CAAA,CAAA,CAAA;QAE3B,wBAAoC,CAAA,GAAA,CAAA,IAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAGlC,QAAA,sBAAA,CAAA,IAAI,EAAA,wBAAA,EAAY,OAAO,EAAA,GAAA,CAAA,CAAC;AACxB,QAAA,MAAM,YAAY,GAAG,QAAQ,CAAC,aAAa,CACzC,yBAAyB,GAAG,SAAS,GAAG,IAAI,CAC9B,CAAC;QAEjB,IAAI,CAAC,YAAY,EAAE;AACjB,YAAA,MAAM,IAAI,KAAK,CACb,yDAAyD,SAAS,CAAA,EAAA,CAAI,CACvE,CAAC;AACH,SAAA;AAED,QAAA,sBAAA,CAAA,IAAI,EAAA,6BAAA,EAAiB,YAAY,EAAA,GAAA,CAAA,CAAC;KACnC;AAED;;AAEG;AACH,IAAA,IAAW,eAAe,GAAA;QACxB,MAAM,kBAA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CAAA;AAjHa,iBAAY,CAAA,YAAA,GAAG,aAAa;;ACX5C;;AAEG;;;;"}
|
|
@@ -3,7 +3,7 @@ import { EventEmitter, NgModule, Component, ViewEncapsulation, Injectable, Injec
|
|
|
3
3
|
import * as i4 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import * as i3 from '@skyux/core';
|
|
6
|
-
import { SkyMediaQueryService, SkyResizeObserverMediaQueryService, SkyDockLocation, SkyDockService,
|
|
6
|
+
import { SkyMediaQueryService, SkyResizeObserverMediaQueryService, SkyDockLocation, SkyDockService, SkyIdModule, SkyTrimModule } from '@skyux/core';
|
|
7
7
|
import * as i2 from '@skyux/theme';
|
|
8
8
|
import { SkyTheme, SkyThemeModule } from '@skyux/theme';
|
|
9
9
|
import * as i3$1 from '@angular/router';
|
|
@@ -192,7 +192,7 @@ class SkyModalAdapterService {
|
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
194
|
/**
|
|
195
|
-
* Restores modal-host siblings to
|
|
195
|
+
* Restores modal-host siblings to screen reader status prior to modals being opened
|
|
196
196
|
*/
|
|
197
197
|
unhideOrRestoreHostSiblingsFromScreenReaders() {
|
|
198
198
|
__classPrivateFieldGet(this, _SkyModalAdapterService_hostSiblingAriaHiddenCache, "f").forEach((previousValue, element) => {
|
|
@@ -403,7 +403,7 @@ class SkyModalHostComponent {
|
|
|
403
403
|
const modalElement = modalComponentRef.location;
|
|
404
404
|
modalInstance.componentInstance = modalComponentRef.instance;
|
|
405
405
|
__classPrivateFieldGet(this, _SkyModalHostComponent_instances, "m", _SkyModalHostComponent_registerModalInstance).call(this, modalInstance);
|
|
406
|
-
//
|
|
406
|
+
// hiding all elements at the modal-host level from screen readers when the a modal is opened
|
|
407
407
|
__classPrivateFieldGet(this, _SkyModalHostComponent_adapter, "f").hideHostSiblingsFromScreenReaders(__classPrivateFieldGet(this, _SkyModalHostComponent_elRef, "f"));
|
|
408
408
|
if (SkyModalHostService.openModalCount > 1 &&
|
|
409
409
|
SkyModalHostService.topModal === hostService) {
|
|
@@ -533,7 +533,7 @@ _SkyModalScrollShadowDirective_currentShadow = new WeakMap(), _SkyModalScrollSha
|
|
|
533
533
|
const el = __classPrivateFieldGet(this, _SkyModalScrollShadowDirective_elRef, "f").nativeElement;
|
|
534
534
|
// MutationObserver is patched by Zone.js and therefore becomes part of the
|
|
535
535
|
// Angular change detection cycle, but this can lead to infinite loops in some
|
|
536
|
-
//
|
|
536
|
+
// scenarios. This will keep MutationObserver from triggering change detection.
|
|
537
537
|
__classPrivateFieldGet(this, _SkyModalScrollShadowDirective_ngZone, "f").runOutsideAngular(() => {
|
|
538
538
|
__classPrivateFieldSet(this, _SkyModalScrollShadowDirective_mutationObserver, __classPrivateFieldGet(this, _SkyModalScrollShadowDirective_mutationObserverSvc, "f").create(() => {
|
|
539
539
|
__classPrivateFieldGet(this, _SkyModalScrollShadowDirective_instances, "m", _SkyModalScrollShadowDirective_checkForShadow).call(this);
|
|
@@ -694,7 +694,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImpo
|
|
|
694
694
|
}], ctorParameters: function () { return [{ type: i3.SkyCoreAdapterService }]; } });
|
|
695
695
|
|
|
696
696
|
var _SkyModalComponent_hostService, _SkyModalComponent_elRef, _SkyModalComponent_windowRef, _SkyModalComponent_componentAdapter, _SkyModalComponent_coreAdapter, _SkyModalComponent_dockService, _SkyModalComponent_mediaQueryService, _SkyModalComponent__ariaDescribedBy, _SkyModalComponent__ariaLabelledBy;
|
|
697
|
-
let skyModalUniqueIdentifier = 0;
|
|
698
697
|
const ARIA_ROLE_DEFAULT = 'dialog';
|
|
699
698
|
/**
|
|
700
699
|
* Provides a common look-and-feel for modal content with options to display
|
|
@@ -705,8 +704,6 @@ class SkyModalComponent {
|
|
|
705
704
|
constructor(hostService, config, elRef, windowRef, componentAdapter, coreAdapter, dockService, mediaQueryService) {
|
|
706
705
|
this.ariaRoleOrDefault = ARIA_ROLE_DEFAULT;
|
|
707
706
|
this.modalState = 'in';
|
|
708
|
-
this.modalContentId = 'sky-modal-content-id-' + skyModalUniqueIdentifier.toString();
|
|
709
|
-
this.modalHeaderId = 'sky-modal-header-id-' + skyModalUniqueIdentifier.toString();
|
|
710
707
|
_SkyModalComponent_hostService.set(this, void 0);
|
|
711
708
|
_SkyModalComponent_elRef.set(this, void 0);
|
|
712
709
|
_SkyModalComponent_windowRef.set(this, void 0);
|
|
@@ -714,8 +711,8 @@ class SkyModalComponent {
|
|
|
714
711
|
_SkyModalComponent_coreAdapter.set(this, void 0);
|
|
715
712
|
_SkyModalComponent_dockService.set(this, void 0);
|
|
716
713
|
_SkyModalComponent_mediaQueryService.set(this, void 0);
|
|
717
|
-
_SkyModalComponent__ariaDescribedBy.set(this,
|
|
718
|
-
_SkyModalComponent__ariaLabelledBy.set(this,
|
|
714
|
+
_SkyModalComponent__ariaDescribedBy.set(this, void 0);
|
|
715
|
+
_SkyModalComponent__ariaLabelledBy.set(this, void 0);
|
|
719
716
|
__classPrivateFieldSet(this, _SkyModalComponent_hostService, hostService, "f");
|
|
720
717
|
__classPrivateFieldSet(this, _SkyModalComponent_elRef, elRef, "f");
|
|
721
718
|
__classPrivateFieldSet(this, _SkyModalComponent_windowRef, windowRef, "f");
|
|
@@ -744,7 +741,7 @@ class SkyModalComponent {
|
|
|
744
741
|
* @internal
|
|
745
742
|
*/
|
|
746
743
|
set ariaDescribedBy(id) {
|
|
747
|
-
__classPrivateFieldSet(this, _SkyModalComponent__ariaDescribedBy, id
|
|
744
|
+
__classPrivateFieldSet(this, _SkyModalComponent__ariaDescribedBy, id, "f");
|
|
748
745
|
}
|
|
749
746
|
get ariaDescribedBy() {
|
|
750
747
|
return __classPrivateFieldGet(this, _SkyModalComponent__ariaDescribedBy, "f");
|
|
@@ -753,7 +750,7 @@ class SkyModalComponent {
|
|
|
753
750
|
* @internal
|
|
754
751
|
*/
|
|
755
752
|
set ariaLabelledBy(id) {
|
|
756
|
-
__classPrivateFieldSet(this, _SkyModalComponent__ariaLabelledBy, id
|
|
753
|
+
__classPrivateFieldSet(this, _SkyModalComponent__ariaLabelledBy, id, "f");
|
|
757
754
|
}
|
|
758
755
|
get ariaLabelledBy() {
|
|
759
756
|
return __classPrivateFieldGet(this, _SkyModalComponent__ariaLabelledBy, "f");
|
|
@@ -802,7 +799,6 @@ class SkyModalComponent {
|
|
|
802
799
|
}
|
|
803
800
|
}
|
|
804
801
|
ngAfterViewInit() {
|
|
805
|
-
skyModalUniqueIdentifier++;
|
|
806
802
|
__classPrivateFieldGet(this, _SkyModalComponent_componentAdapter, "f").handleWindowChange(__classPrivateFieldGet(this, _SkyModalComponent_elRef, "f"));
|
|
807
803
|
// Adding a timeout to avoid ExpressionChangedAfterItHasBeenCheckedError.
|
|
808
804
|
// https://stackoverflow.com/questions/40562845
|
|
@@ -845,10 +841,10 @@ class SkyModalComponent {
|
|
|
845
841
|
}
|
|
846
842
|
_SkyModalComponent_hostService = new WeakMap(), _SkyModalComponent_elRef = new WeakMap(), _SkyModalComponent_windowRef = new WeakMap(), _SkyModalComponent_componentAdapter = new WeakMap(), _SkyModalComponent_coreAdapter = new WeakMap(), _SkyModalComponent_dockService = new WeakMap(), _SkyModalComponent_mediaQueryService = new WeakMap(), _SkyModalComponent__ariaDescribedBy = new WeakMap(), _SkyModalComponent__ariaLabelledBy = new WeakMap();
|
|
847
843
|
SkyModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SkyModalComponent, deps: [{ token: SkyModalHostService }, { token: SkyModalConfiguration }, { token: i0.ElementRef }, { token: i3.SkyAppWindowRef }, { token: SkyModalComponentAdapterService }, { token: i3.SkyCoreAdapterService }, { token: i3.SkyDockService, host: true }, { token: i3.SkyResizeObserverMediaQueryService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
848
|
-
SkyModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.11", type: SkyModalComponent, selector: "sky-modal", inputs: { ariaRole: "ariaRole", tiledBody: "tiledBody", ariaDescribedBy: "ariaDescribedBy", ariaLabelledBy: "ariaLabelledBy" }, host: { listeners: { "document:keyup": "onDocumentKeyUp($event)", "document:keydown": "onDocumentKeyDown($event)" }, properties: { "class": "this.wrapperClass" } }, providers: [SkyModalComponentAdapterService, SkyDockService], viewQueries: [{ propertyName: "modalContentWrapperElement", first: true, predicate: ["modalContentWrapper"], descendants: true, read: ElementRef }], ngImport: i0, template: "<div\n class=\"sky-modal-dialog\"\n aria-modal=\"true\"\n [attr.aria-describedby]=\"ariaDescribedBy\"\n [attr.aria-labelledby]=\"ariaLabelledBy\"\n [attr.role]=\"ariaRoleOrDefault\"\n (window:resize)=\"windowResize()\"\n>\n <div\n class=\"sky-modal sky-shadow sky-box sky-elevation-16 sky-modal-{{ size }}\"\n tabindex=\"-1\"\n [ngClass]=\"{\n 'sky-modal-tiled': tiledBody,\n 'sky-modal-viewkeeper': viewkeeperEnabled()\n }\"\n [ngStyle]=\"{\n zIndex: modalZIndex\n }\"\n >\n <div\n class=\"sky-modal-header\"\n [hidden]=\"!headerContent || !headerContent.children || headerContent.children.length < 1\"\n [ngStyle]=\"{\n 'box-shadow': scrollShadow?.topShadow\n }\"\n >\n <div\n class=\"sky-modal-header-content\"\n
|
|
844
|
+
SkyModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.11", type: SkyModalComponent, selector: "sky-modal", inputs: { ariaRole: "ariaRole", tiledBody: "tiledBody", ariaDescribedBy: "ariaDescribedBy", ariaLabelledBy: "ariaLabelledBy" }, host: { listeners: { "document:keyup": "onDocumentKeyUp($event)", "document:keydown": "onDocumentKeyDown($event)" }, properties: { "class": "this.wrapperClass" } }, providers: [SkyModalComponentAdapterService, SkyDockService], viewQueries: [{ propertyName: "modalContentWrapperElement", first: true, predicate: ["modalContentWrapper"], descendants: true, read: ElementRef }], ngImport: i0, template: "<div\n class=\"sky-modal-dialog\"\n aria-modal=\"true\"\n [attr.aria-describedby]=\"ariaDescribedBy || modalContentId.id\"\n [attr.aria-labelledby]=\"ariaLabelledBy || headerId.id\"\n [attr.role]=\"ariaRoleOrDefault\"\n (window:resize)=\"windowResize()\"\n>\n <div\n class=\"sky-modal sky-shadow sky-box sky-elevation-16 sky-modal-{{ size }}\"\n tabindex=\"-1\"\n [ngClass]=\"{\n 'sky-modal-tiled': tiledBody,\n 'sky-modal-viewkeeper': viewkeeperEnabled()\n }\"\n [ngStyle]=\"{\n zIndex: modalZIndex\n }\"\n >\n <div\n class=\"sky-modal-header\"\n [hidden]=\"!headerContent || !headerContent.children || headerContent.children.length < 1\"\n [ngStyle]=\"{\n 'box-shadow': scrollShadow?.topShadow\n }\"\n >\n <div\n class=\"sky-modal-header-content\"\n skyId\n [ngClass]=\"{\n 'sky-section-heading': size === 'full-page'\n }\"\n #headerContent\n #headerId=\"skyId\"\n >\n <ng-content select=\"sky-modal-header\"></ng-content>\n </div>\n <div class=\"sky-modal-header-buttons\">\n <button\n *ngIf=\"helpKey\"\n class=\"sky-btn sky-modal-btn-help\"\n name=\"help-button\"\n type=\"button\"\n [attr.aria-label]=\"'skyux_modal_open_help' | skyLibResources\"\n (click)=\"helpButtonClick()\"\n >\n <sky-icon icon=\"question-circle\"></sky-icon>\n </button>\n\n <button\n type=\"button\"\n class=\"sky-btn sky-modal-btn-close\"\n [attr.aria-label]=\"'skyux_modal_close' | skyLibResources\"\n (click)=\"closeButtonClick()\"\n >\n <sky-icon icon=\"close\"></sky-icon>\n </button>\n </div>\n </div>\n <div\n class=\"sky-modal-content sky-padding-even-large\"\n role=\"region\"\n tabindex=\"0\"\n skyId\n [attr.aria-labelledby]=\"headerId.id\"\n (skyModalScrollShadow)=\"scrollShadowChange($event)\"\n #modalContentId=\"skyId\"\n #modalContentWrapper\n >\n <ng-content select=\"sky-modal-content\"></ng-content>\n </div>\n <div\n class=\"sky-modal-footer\"\n [ngStyle]=\"{\n 'box-shadow': scrollShadow?.bottomShadow\n }\"\n >\n <ng-content select=\"sky-modal-footer\"></ng-content>\n </div>\n </div>\n</div>\n", styles: [".sky-modal{border-top:1px solid #cdcfd2;border-bottom:1px solid #cdcfd2;border-left:1px solid #cdcfd2;border-right:1px solid #cdcfd2;position:fixed;width:auto;left:0;right:0;top:20px;margin:10px;display:flex;flex-direction:column;overflow:hidden}.sky-modal:focus{outline:none}@media (min-width: 768px){.sky-modal:not(.sky-modal-large){margin:0 auto}.sky-modal-small{width:300px}.sky-modal-small .sky-modal-content,.sky-modal-small .sky-modal-header,.sky-modal-small .sky-modal-footer{max-width:300px}.sky-modal-medium{width:600px}.sky-modal-medium .sky-modal-content,.sky-modal-medium .sky-modal-header,.sky-modal-medium .sky-modal-footer{max-width:600px}}@media (min-width: 920px){.sky-modal-large{margin:0 auto;width:900px}.sky-modal-large .sky-modal-content,.sky-modal-large .sky-modal-header,.sky-modal-large .sky-modal-footer{max-width:900px}}.sky-modal-content{background-color:#fff}.sky-modal-content:focus{outline-style:dotted;outline-width:thin;outline-offset:-1px}.sky-modal-tiled .sky-modal-content{background-color:#eeeeef}.sky-modal-tiled .sky-modal-content ::ng-deep .sky-tile-title{font-family:BLKB Sans,Helvetica Neue,Arial,sans-serif;color:var(--sky-text-color-deemphasized);font-weight:300;font-size:19px}.sky-modal-header{padding:9px 3px 9px 15px;background-color:#fff;display:flex;align-items:baseline;border-bottom:1px solid #e2e3e4}.sky-modal-header-buttons{flex-shrink:.0001}.sky-modal-header-buttons .sky-btn{border:none;color:#cdcfd2;cursor:pointer}.sky-modal-header-buttons .sky-btn:hover{color:#979ba2;transition:color .15s}.sky-modal-header-content{flex-grow:1}.sky-modal-header{flex-shrink:0;position:relative;z-index:2}.sky-modal-content{overflow-y:auto;position:relative;z-index:1}.sky-modal-footer{flex-shrink:0;position:relative;z-index:2}.sky-modal-footer ::ng-deep .sky-btn+.sky-btn{margin-left:10px}.sky-modal-footer ::ng-deep .sky-btn+.sky-btn-link{margin-left:-2px}.sky-modal-full-page{width:100%;top:0;margin:0}.sky-modal-full-page .sky-modal-header-buttons sky-icon[icon=close]{font-size:20px}.sky-modal-full-page .sky-modal-content{flex-grow:1}:host ::ng-deep .sky-sectioned-form{min-height:460px;margin:-15px}.sky-modal-content>::ng-deep sky-dock{bottom:-15px;margin-left:-15px;margin-bottom:-15px;padding-top:15px;width:calc(100% + 30px)}:host-context(.sky-theme-modern) .sky-modal-header{border:none;padding:20px 30px}:host-context(.sky-theme-modern) .sky-modal-btn-help,:host-context(.sky-theme-modern) .sky-modal-btn-close{display:none}:host-context(.sky-theme-modern) .sky-modal-content{padding:0}:host-context(.sky-theme-modern) .sky-modal-full-page{width:calc(100% - 60px);margin:30px}:host-context(.sky-theme-modern) .sky-modal-content>::ng-deep sky-dock{bottom:0;margin-left:initial;margin-bottom:initial;padding-top:initial;width:100%}:host-context(.sky-theme-modern) .sky-modal-viewkeeper .sky-modal-header{box-shadow:none!important}:host-context(.sky-theme-modern) .sky-modal-viewkeeper .sky-modal-content ::ng-deep sky-modal-content>.sky-viewkeeper-fixed{box-shadow:0 4px 8px -4px #0000004d}:host-context(.sky-theme-modern) .sky-modal-viewkeeper .sky-modal-content ::ng-deep sky-modal-content>.sky-viewkeeper-fixed>sky-toolbar .sky-toolbar-container{background-color:#fff;padding-left:30px;padding-right:30px}.sky-theme-modern .sky-modal-header{border:none;padding:20px 30px}.sky-theme-modern .sky-modal-btn-help,.sky-theme-modern .sky-modal-btn-close{display:none}.sky-theme-modern .sky-modal-content{padding:0}.sky-theme-modern .sky-modal-full-page{width:calc(100% - 60px);margin:30px}.sky-theme-modern .sky-modal-content>::ng-deep sky-dock{bottom:0;margin-left:initial;margin-bottom:initial;padding-top:initial;width:100%}.sky-theme-modern .sky-modal-viewkeeper .sky-modal-header{box-shadow:none!important}.sky-theme-modern .sky-modal-viewkeeper .sky-modal-content ::ng-deep sky-modal-content>.sky-viewkeeper-fixed{box-shadow:0 4px 8px -4px #0000004d}.sky-theme-modern .sky-modal-viewkeeper .sky-modal-content ::ng-deep sky-modal-content>.sky-viewkeeper-fixed>sky-toolbar .sky-toolbar-container{background-color:#fff;padding-left:30px;padding-right:30px}:host-context(.sky-theme-modern.sky-theme-mode-dark) .sky-modal{border-color:#121212}:host-context(.sky-theme-modern.sky-theme-mode-dark) .sky-modal-header{color:#fbfcfe}:host-context(.sky-theme-modern.sky-theme-mode-dark) .sky-modal-header,:host-context(.sky-theme-modern.sky-theme-mode-dark) .sky-modal-content{background-color:transparent}.sky-theme-modern.sky-theme-mode-dark .sky-modal{border-color:#121212}.sky-theme-modern.sky-theme-mode-dark .sky-modal-header{color:#fbfcfe}.sky-theme-modern.sky-theme-mode-dark .sky-modal-header,.sky-theme-modern.sky-theme-mode-dark .sky-modal-content{background-color:transparent}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i6.λ4, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }, { kind: "directive", type: i3.λ2, selector: "[skyId]", exportAs: ["skyId"] }, { kind: "directive", type: SkyModalScrollShadowDirective, selector: "[skyModalScrollShadow]", outputs: ["skyModalScrollShadow"] }, { kind: "pipe", type: i2$1.SkyLibResourcesPipe, name: "skyLibResources" }] });
|
|
849
845
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SkyModalComponent, decorators: [{
|
|
850
846
|
type: Component,
|
|
851
|
-
args: [{ selector: 'sky-modal', providers: [SkyModalComponentAdapterService, SkyDockService], template: "<div\n class=\"sky-modal-dialog\"\n aria-modal=\"true\"\n [attr.aria-describedby]=\"ariaDescribedBy\"\n [attr.aria-labelledby]=\"ariaLabelledBy\"\n [attr.role]=\"ariaRoleOrDefault\"\n (window:resize)=\"windowResize()\"\n>\n <div\n class=\"sky-modal sky-shadow sky-box sky-elevation-16 sky-modal-{{ size }}\"\n tabindex=\"-1\"\n [ngClass]=\"{\n 'sky-modal-tiled': tiledBody,\n 'sky-modal-viewkeeper': viewkeeperEnabled()\n }\"\n [ngStyle]=\"{\n zIndex: modalZIndex\n }\"\n >\n <div\n class=\"sky-modal-header\"\n [hidden]=\"!headerContent || !headerContent.children || headerContent.children.length < 1\"\n [ngStyle]=\"{\n 'box-shadow': scrollShadow?.topShadow\n }\"\n >\n <div\n class=\"sky-modal-header-content\"\n
|
|
847
|
+
args: [{ selector: 'sky-modal', providers: [SkyModalComponentAdapterService, SkyDockService], template: "<div\n class=\"sky-modal-dialog\"\n aria-modal=\"true\"\n [attr.aria-describedby]=\"ariaDescribedBy || modalContentId.id\"\n [attr.aria-labelledby]=\"ariaLabelledBy || headerId.id\"\n [attr.role]=\"ariaRoleOrDefault\"\n (window:resize)=\"windowResize()\"\n>\n <div\n class=\"sky-modal sky-shadow sky-box sky-elevation-16 sky-modal-{{ size }}\"\n tabindex=\"-1\"\n [ngClass]=\"{\n 'sky-modal-tiled': tiledBody,\n 'sky-modal-viewkeeper': viewkeeperEnabled()\n }\"\n [ngStyle]=\"{\n zIndex: modalZIndex\n }\"\n >\n <div\n class=\"sky-modal-header\"\n [hidden]=\"!headerContent || !headerContent.children || headerContent.children.length < 1\"\n [ngStyle]=\"{\n 'box-shadow': scrollShadow?.topShadow\n }\"\n >\n <div\n class=\"sky-modal-header-content\"\n skyId\n [ngClass]=\"{\n 'sky-section-heading': size === 'full-page'\n }\"\n #headerContent\n #headerId=\"skyId\"\n >\n <ng-content select=\"sky-modal-header\"></ng-content>\n </div>\n <div class=\"sky-modal-header-buttons\">\n <button\n *ngIf=\"helpKey\"\n class=\"sky-btn sky-modal-btn-help\"\n name=\"help-button\"\n type=\"button\"\n [attr.aria-label]=\"'skyux_modal_open_help' | skyLibResources\"\n (click)=\"helpButtonClick()\"\n >\n <sky-icon icon=\"question-circle\"></sky-icon>\n </button>\n\n <button\n type=\"button\"\n class=\"sky-btn sky-modal-btn-close\"\n [attr.aria-label]=\"'skyux_modal_close' | skyLibResources\"\n (click)=\"closeButtonClick()\"\n >\n <sky-icon icon=\"close\"></sky-icon>\n </button>\n </div>\n </div>\n <div\n class=\"sky-modal-content sky-padding-even-large\"\n role=\"region\"\n tabindex=\"0\"\n skyId\n [attr.aria-labelledby]=\"headerId.id\"\n (skyModalScrollShadow)=\"scrollShadowChange($event)\"\n #modalContentId=\"skyId\"\n #modalContentWrapper\n >\n <ng-content select=\"sky-modal-content\"></ng-content>\n </div>\n <div\n class=\"sky-modal-footer\"\n [ngStyle]=\"{\n 'box-shadow': scrollShadow?.bottomShadow\n }\"\n >\n <ng-content select=\"sky-modal-footer\"></ng-content>\n </div>\n </div>\n</div>\n", styles: [".sky-modal{border-top:1px solid #cdcfd2;border-bottom:1px solid #cdcfd2;border-left:1px solid #cdcfd2;border-right:1px solid #cdcfd2;position:fixed;width:auto;left:0;right:0;top:20px;margin:10px;display:flex;flex-direction:column;overflow:hidden}.sky-modal:focus{outline:none}@media (min-width: 768px){.sky-modal:not(.sky-modal-large){margin:0 auto}.sky-modal-small{width:300px}.sky-modal-small .sky-modal-content,.sky-modal-small .sky-modal-header,.sky-modal-small .sky-modal-footer{max-width:300px}.sky-modal-medium{width:600px}.sky-modal-medium .sky-modal-content,.sky-modal-medium .sky-modal-header,.sky-modal-medium .sky-modal-footer{max-width:600px}}@media (min-width: 920px){.sky-modal-large{margin:0 auto;width:900px}.sky-modal-large .sky-modal-content,.sky-modal-large .sky-modal-header,.sky-modal-large .sky-modal-footer{max-width:900px}}.sky-modal-content{background-color:#fff}.sky-modal-content:focus{outline-style:dotted;outline-width:thin;outline-offset:-1px}.sky-modal-tiled .sky-modal-content{background-color:#eeeeef}.sky-modal-tiled .sky-modal-content ::ng-deep .sky-tile-title{font-family:BLKB Sans,Helvetica Neue,Arial,sans-serif;color:var(--sky-text-color-deemphasized);font-weight:300;font-size:19px}.sky-modal-header{padding:9px 3px 9px 15px;background-color:#fff;display:flex;align-items:baseline;border-bottom:1px solid #e2e3e4}.sky-modal-header-buttons{flex-shrink:.0001}.sky-modal-header-buttons .sky-btn{border:none;color:#cdcfd2;cursor:pointer}.sky-modal-header-buttons .sky-btn:hover{color:#979ba2;transition:color .15s}.sky-modal-header-content{flex-grow:1}.sky-modal-header{flex-shrink:0;position:relative;z-index:2}.sky-modal-content{overflow-y:auto;position:relative;z-index:1}.sky-modal-footer{flex-shrink:0;position:relative;z-index:2}.sky-modal-footer ::ng-deep .sky-btn+.sky-btn{margin-left:10px}.sky-modal-footer ::ng-deep .sky-btn+.sky-btn-link{margin-left:-2px}.sky-modal-full-page{width:100%;top:0;margin:0}.sky-modal-full-page .sky-modal-header-buttons sky-icon[icon=close]{font-size:20px}.sky-modal-full-page .sky-modal-content{flex-grow:1}:host ::ng-deep .sky-sectioned-form{min-height:460px;margin:-15px}.sky-modal-content>::ng-deep sky-dock{bottom:-15px;margin-left:-15px;margin-bottom:-15px;padding-top:15px;width:calc(100% + 30px)}:host-context(.sky-theme-modern) .sky-modal-header{border:none;padding:20px 30px}:host-context(.sky-theme-modern) .sky-modal-btn-help,:host-context(.sky-theme-modern) .sky-modal-btn-close{display:none}:host-context(.sky-theme-modern) .sky-modal-content{padding:0}:host-context(.sky-theme-modern) .sky-modal-full-page{width:calc(100% - 60px);margin:30px}:host-context(.sky-theme-modern) .sky-modal-content>::ng-deep sky-dock{bottom:0;margin-left:initial;margin-bottom:initial;padding-top:initial;width:100%}:host-context(.sky-theme-modern) .sky-modal-viewkeeper .sky-modal-header{box-shadow:none!important}:host-context(.sky-theme-modern) .sky-modal-viewkeeper .sky-modal-content ::ng-deep sky-modal-content>.sky-viewkeeper-fixed{box-shadow:0 4px 8px -4px #0000004d}:host-context(.sky-theme-modern) .sky-modal-viewkeeper .sky-modal-content ::ng-deep sky-modal-content>.sky-viewkeeper-fixed>sky-toolbar .sky-toolbar-container{background-color:#fff;padding-left:30px;padding-right:30px}.sky-theme-modern .sky-modal-header{border:none;padding:20px 30px}.sky-theme-modern .sky-modal-btn-help,.sky-theme-modern .sky-modal-btn-close{display:none}.sky-theme-modern .sky-modal-content{padding:0}.sky-theme-modern .sky-modal-full-page{width:calc(100% - 60px);margin:30px}.sky-theme-modern .sky-modal-content>::ng-deep sky-dock{bottom:0;margin-left:initial;margin-bottom:initial;padding-top:initial;width:100%}.sky-theme-modern .sky-modal-viewkeeper .sky-modal-header{box-shadow:none!important}.sky-theme-modern .sky-modal-viewkeeper .sky-modal-content ::ng-deep sky-modal-content>.sky-viewkeeper-fixed{box-shadow:0 4px 8px -4px #0000004d}.sky-theme-modern .sky-modal-viewkeeper .sky-modal-content ::ng-deep sky-modal-content>.sky-viewkeeper-fixed>sky-toolbar .sky-toolbar-container{background-color:#fff;padding-left:30px;padding-right:30px}:host-context(.sky-theme-modern.sky-theme-mode-dark) .sky-modal{border-color:#121212}:host-context(.sky-theme-modern.sky-theme-mode-dark) .sky-modal-header{color:#fbfcfe}:host-context(.sky-theme-modern.sky-theme-mode-dark) .sky-modal-header,:host-context(.sky-theme-modern.sky-theme-mode-dark) .sky-modal-content{background-color:transparent}.sky-theme-modern.sky-theme-mode-dark .sky-modal{border-color:#121212}.sky-theme-modern.sky-theme-mode-dark .sky-modal-header{color:#fbfcfe}.sky-theme-modern.sky-theme-mode-dark .sky-modal-header,.sky-theme-modern.sky-theme-mode-dark .sky-modal-content{background-color:transparent}\n"] }]
|
|
852
848
|
}], ctorParameters: function () { return [{ type: SkyModalHostService }, { type: SkyModalConfiguration }, { type: i0.ElementRef }, { type: i3.SkyAppWindowRef }, { type: SkyModalComponentAdapterService }, { type: i3.SkyCoreAdapterService }, { type: i3.SkyDockService, decorators: [{
|
|
853
849
|
type: Host
|
|
854
850
|
}] }, { type: i3.SkyResizeObserverMediaQueryService, decorators: [{
|
|
@@ -886,6 +882,7 @@ SkyModalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version:
|
|
|
886
882
|
SkyModalScrollShadowDirective], imports: [CommonModule,
|
|
887
883
|
RouterModule,
|
|
888
884
|
SkyIconModule,
|
|
885
|
+
SkyIdModule,
|
|
889
886
|
SkyModalsResourcesModule,
|
|
890
887
|
SkyThemeModule,
|
|
891
888
|
SkyTrimModule], exports: [SkyModalComponent,
|
|
@@ -895,6 +892,7 @@ SkyModalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version:
|
|
|
895
892
|
SkyModalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SkyModalModule, imports: [CommonModule,
|
|
896
893
|
RouterModule,
|
|
897
894
|
SkyIconModule,
|
|
895
|
+
SkyIdModule,
|
|
898
896
|
SkyModalsResourcesModule,
|
|
899
897
|
SkyThemeModule,
|
|
900
898
|
SkyTrimModule] });
|
|
@@ -913,6 +911,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImpo
|
|
|
913
911
|
CommonModule,
|
|
914
912
|
RouterModule,
|
|
915
913
|
SkyIconModule,
|
|
914
|
+
SkyIdModule,
|
|
916
915
|
SkyModalsResourcesModule,
|
|
917
916
|
SkyThemeModule,
|
|
918
917
|
SkyTrimModule,
|
|
@@ -1223,7 +1222,7 @@ _SkyModalService_dynamicComponentService = new WeakMap(), _SkyModalService_insta
|
|
|
1223
1222
|
};
|
|
1224
1223
|
let params = {};
|
|
1225
1224
|
let method = undefined;
|
|
1226
|
-
// Object Literal Lookup for backwards
|
|
1225
|
+
// Object Literal Lookup for backwards compatibility.
|
|
1227
1226
|
method = {
|
|
1228
1227
|
'providers?': Object.assign({}, defaultParams, {
|
|
1229
1228
|
providers: providersOrConfig,
|