@angular/cdk 19.2.13 → 19.2.15
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/_adev_assets/cdk_testing.json +7032 -1
- package/_adev_assets/cdk_testing_protractor.json +1747 -1
- package/_adev_assets/cdk_testing_selenium_webdriver.json +1801 -1
- package/_adev_assets/cdk_testing_testbed.json +1903 -1
- package/dialog/index.d.ts +17 -12
- package/fesm2022/cdk.mjs +1 -1
- package/fesm2022/cdk.mjs.map +1 -1
- package/fesm2022/dialog.mjs +21 -9
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/testing.mjs +255 -52
- package/fesm2022/testing.mjs.map +1 -1
- package/{harness-environment.d-BatBdODN.d.ts → harness-environment.d-BbFzIFDE.d.ts} +362 -89
- package/package.json +1 -1
- package/schematics/ng-add/index.js +1 -1
- package/testing/index.d.ts +6 -2
- package/testing/selenium-webdriver/index.d.ts +1 -1
- package/testing/testbed/index.d.ts +1 -1
- package/npm_package/LICENSE +0 -21
- package/npm_package/README.md +0 -6
- package/npm_package/_adev_assets/cdk_testing.json +0 -1
- package/npm_package/_adev_assets/cdk_testing_protractor.json +0 -1
- package/npm_package/_adev_assets/cdk_testing_selenium_webdriver.json +0 -1
- package/npm_package/_adev_assets/cdk_testing_testbed.json +0 -1
- package/npm_package/_index.scss +0 -8
- package/npm_package/a11y/_index.scss +0 -60
- package/npm_package/a11y/index.d.ts +0 -550
- package/npm_package/a11y-module.d-DBHGyKoh.d.ts +0 -314
- package/npm_package/a11y-prebuilt.css +0 -1
- package/npm_package/accordion/index.d.ts +0 -90
- package/npm_package/activedescendant-key-manager.d-Bjic5obv.d.ts +0 -32
- package/npm_package/bidi/index.d.ts +0 -21
- package/npm_package/bidi-module.d-D-fEBKdS.d.ts +0 -54
- package/npm_package/clipboard/index.d.ts +0 -101
- package/npm_package/coercion/index.d.ts +0 -45
- package/npm_package/coercion/private/index.d.ts +0 -9
- package/npm_package/collections/index.d.ts +0 -99
- package/npm_package/data-source.d-Bblv7Zvh.d.ts +0 -43
- package/npm_package/dialog/index.d.ts +0 -426
- package/npm_package/drag-drop/index.d.ts +0 -1383
- package/npm_package/fesm2022/a11y-module-BYox5gpI.mjs +0 -952
- package/npm_package/fesm2022/a11y-module-BYox5gpI.mjs.map +0 -1
- package/npm_package/fesm2022/a11y.mjs +0 -539
- package/npm_package/fesm2022/a11y.mjs.map +0 -1
- package/npm_package/fesm2022/accordion.mjs +0 -210
- package/npm_package/fesm2022/accordion.mjs.map +0 -1
- package/npm_package/fesm2022/activedescendant-key-manager-DC3-fwQI.mjs +0 -16
- package/npm_package/fesm2022/activedescendant-key-manager-DC3-fwQI.mjs.map +0 -1
- package/npm_package/fesm2022/array-I1yfCXUO.mjs +0 -6
- package/npm_package/fesm2022/array-I1yfCXUO.mjs.map +0 -1
- package/npm_package/fesm2022/backwards-compatibility-DHR38MsD.mjs +0 -25
- package/npm_package/fesm2022/backwards-compatibility-DHR38MsD.mjs.map +0 -1
- package/npm_package/fesm2022/bidi.mjs +0 -80
- package/npm_package/fesm2022/bidi.mjs.map +0 -1
- package/npm_package/fesm2022/boolean-property-DaaVhX5A.mjs +0 -7
- package/npm_package/fesm2022/boolean-property-DaaVhX5A.mjs.map +0 -1
- package/npm_package/fesm2022/breakpoints-observer-CljOfYGy.mjs +0 -179
- package/npm_package/fesm2022/breakpoints-observer-CljOfYGy.mjs.map +0 -1
- package/npm_package/fesm2022/cdk.mjs +0 -7
- package/npm_package/fesm2022/cdk.mjs.map +0 -1
- package/npm_package/fesm2022/clipboard.mjs +0 -211
- package/npm_package/fesm2022/clipboard.mjs.map +0 -1
- package/npm_package/fesm2022/coercion/private.mjs +0 -15
- package/npm_package/fesm2022/coercion/private.mjs.map +0 -1
- package/npm_package/fesm2022/coercion.mjs +0 -39
- package/npm_package/fesm2022/coercion.mjs.map +0 -1
- package/npm_package/fesm2022/collections.mjs +0 -8
- package/npm_package/fesm2022/collections.mjs.map +0 -1
- package/npm_package/fesm2022/css-pixel-value-C_HEqLhI.mjs +0 -10
- package/npm_package/fesm2022/css-pixel-value-C_HEqLhI.mjs.map +0 -1
- package/npm_package/fesm2022/data-source-D34wiQZj.mjs +0 -15
- package/npm_package/fesm2022/data-source-D34wiQZj.mjs.map +0 -1
- package/npm_package/fesm2022/dialog.mjs +0 -870
- package/npm_package/fesm2022/dialog.mjs.map +0 -1
- package/npm_package/fesm2022/directionality-CBXD4hga.mjs +0 -72
- package/npm_package/fesm2022/directionality-CBXD4hga.mjs.map +0 -1
- package/npm_package/fesm2022/dispose-view-repeater-strategy-D_JReLI1.mjs +0 -44
- package/npm_package/fesm2022/dispose-view-repeater-strategy-D_JReLI1.mjs.map +0 -1
- package/npm_package/fesm2022/drag-drop.mjs +0 -4359
- package/npm_package/fesm2022/drag-drop.mjs.map +0 -1
- package/npm_package/fesm2022/element-x4z00URv.mjs +0 -29
- package/npm_package/fesm2022/element-x4z00URv.mjs.map +0 -1
- package/npm_package/fesm2022/fake-event-detection-DWOdFTFz.mjs +0 -24
- package/npm_package/fesm2022/fake-event-detection-DWOdFTFz.mjs.map +0 -1
- package/npm_package/fesm2022/focus-key-manager-C1rAQJ5z.mjs +0 -22
- package/npm_package/fesm2022/focus-key-manager-C1rAQJ5z.mjs.map +0 -1
- package/npm_package/fesm2022/focus-monitor-e2l_RpN3.mjs +0 -629
- package/npm_package/fesm2022/focus-monitor-e2l_RpN3.mjs.map +0 -1
- package/npm_package/fesm2022/id-generator-Dw_9dSDu.mjs +0 -37
- package/npm_package/fesm2022/id-generator-Dw_9dSDu.mjs.map +0 -1
- package/npm_package/fesm2022/keycodes-CpHkExLC.mjs +0 -122
- package/npm_package/fesm2022/keycodes-CpHkExLC.mjs.map +0 -1
- package/npm_package/fesm2022/keycodes.mjs +0 -15
- package/npm_package/fesm2022/keycodes.mjs.map +0 -1
- package/npm_package/fesm2022/layout.mjs +0 -43
- package/npm_package/fesm2022/layout.mjs.map +0 -1
- package/npm_package/fesm2022/list-key-manager-CyOIXo8P.mjs +0 -360
- package/npm_package/fesm2022/list-key-manager-CyOIXo8P.mjs.map +0 -1
- package/npm_package/fesm2022/listbox.mjs +0 -925
- package/npm_package/fesm2022/listbox.mjs.map +0 -1
- package/npm_package/fesm2022/menu.mjs +0 -1966
- package/npm_package/fesm2022/menu.mjs.map +0 -1
- package/npm_package/fesm2022/observers/private.mjs +0 -124
- package/npm_package/fesm2022/observers/private.mjs.map +0 -1
- package/npm_package/fesm2022/observers.mjs +0 -210
- package/npm_package/fesm2022/observers.mjs.map +0 -1
- package/npm_package/fesm2022/overlay-module-BUj0D19H.mjs +0 -3029
- package/npm_package/fesm2022/overlay-module-BUj0D19H.mjs.map +0 -1
- package/npm_package/fesm2022/overlay.mjs +0 -102
- package/npm_package/fesm2022/overlay.mjs.map +0 -1
- package/npm_package/fesm2022/passive-listeners-esHZRgIN.mjs +0 -31
- package/npm_package/fesm2022/passive-listeners-esHZRgIN.mjs.map +0 -1
- package/npm_package/fesm2022/platform-DmdVEw_C.mjs +0 -77
- package/npm_package/fesm2022/platform-DmdVEw_C.mjs.map +0 -1
- package/npm_package/fesm2022/platform.mjs +0 -74
- package/npm_package/fesm2022/platform.mjs.map +0 -1
- package/npm_package/fesm2022/portal-directives-Bw5woq8I.mjs +0 -653
- package/npm_package/fesm2022/portal-directives-Bw5woq8I.mjs.map +0 -1
- package/npm_package/fesm2022/portal.mjs +0 -29
- package/npm_package/fesm2022/portal.mjs.map +0 -1
- package/npm_package/fesm2022/private.mjs +0 -19
- package/npm_package/fesm2022/private.mjs.map +0 -1
- package/npm_package/fesm2022/recycle-view-repeater-strategy-DoWdPqVw.mjs +0 -156
- package/npm_package/fesm2022/recycle-view-repeater-strategy-DoWdPqVw.mjs.map +0 -1
- package/npm_package/fesm2022/scrolling-BkvA05C8.mjs +0 -99
- package/npm_package/fesm2022/scrolling-BkvA05C8.mjs.map +0 -1
- package/npm_package/fesm2022/scrolling.mjs +0 -1464
- package/npm_package/fesm2022/scrolling.mjs.map +0 -1
- package/npm_package/fesm2022/selection-model-CeeHVIcP.mjs +0 -226
- package/npm_package/fesm2022/selection-model-CeeHVIcP.mjs.map +0 -1
- package/npm_package/fesm2022/shadow-dom-B0oHn41l.mjs +0 -49
- package/npm_package/fesm2022/shadow-dom-B0oHn41l.mjs.map +0 -1
- package/npm_package/fesm2022/stepper.mjs +0 -614
- package/npm_package/fesm2022/stepper.mjs.map +0 -1
- package/npm_package/fesm2022/style-loader-Cu9AvjH9.mjs +0 -47
- package/npm_package/fesm2022/style-loader-Cu9AvjH9.mjs.map +0 -1
- package/npm_package/fesm2022/table.mjs +0 -2602
- package/npm_package/fesm2022/table.mjs.map +0 -1
- package/npm_package/fesm2022/test-environment-CT0XxPyp.mjs +0 -19
- package/npm_package/fesm2022/test-environment-CT0XxPyp.mjs.map +0 -1
- package/npm_package/fesm2022/testing/selenium-webdriver.mjs +0 -353
- package/npm_package/fesm2022/testing/selenium-webdriver.mjs.map +0 -1
- package/npm_package/fesm2022/testing/testbed.mjs +0 -782
- package/npm_package/fesm2022/testing/testbed.mjs.map +0 -1
- package/npm_package/fesm2022/testing.mjs +0 -698
- package/npm_package/fesm2022/testing.mjs.map +0 -1
- package/npm_package/fesm2022/text-field.mjs +0 -437
- package/npm_package/fesm2022/text-field.mjs.map +0 -1
- package/npm_package/fesm2022/tree-key-manager-KnCoIkIC.mjs +0 -360
- package/npm_package/fesm2022/tree-key-manager-KnCoIkIC.mjs.map +0 -1
- package/npm_package/fesm2022/tree.mjs +0 -1795
- package/npm_package/fesm2022/tree.mjs.map +0 -1
- package/npm_package/fesm2022/typeahead-9ZW4Dtsf.mjs +0 -88
- package/npm_package/fesm2022/typeahead-9ZW4Dtsf.mjs.map +0 -1
- package/npm_package/fesm2022/unique-selection-dispatcher-DtHZDqyJ.mjs +0 -49
- package/npm_package/fesm2022/unique-selection-dispatcher-DtHZDqyJ.mjs.map +0 -1
- package/npm_package/focus-key-manager.d-BIKDy8oD.d.ts +0 -34
- package/npm_package/focus-monitor.d-CvvJeQRc.d.ts +0 -210
- package/npm_package/harness-environment.d-BatBdODN.d.ts +0 -620
- package/npm_package/index.d.ts +0 -6
- package/npm_package/keycodes/index.d.ts +0 -129
- package/npm_package/layout/index.d.ts +0 -89
- package/npm_package/list-key-manager.d-BlK3jyRn.d.ts +0 -165
- package/npm_package/listbox/index.d.ts +0 -353
- package/npm_package/menu/index.d.ts +0 -821
- package/npm_package/number-property.d-CJVxXUcb.d.ts +0 -16
- package/npm_package/observers/index.d.ts +0 -84
- package/npm_package/observers/private/index.d.ts +0 -34
- package/npm_package/overlay/_index-deprecated.scss +0 -13
- package/npm_package/overlay/_index.scss +0 -193
- package/npm_package/overlay/index.d.ts +0 -42
- package/npm_package/overlay-module.d-B3qEQtts.d.ts +0 -791
- package/npm_package/overlay-prebuilt.css +0 -1
- package/npm_package/overlay.d-BdoMy0hX.d.ts +0 -296
- package/npm_package/package.json +0 -186
- package/npm_package/platform/index.d.ts +0 -83
- package/npm_package/platform.d-B3vREl3q.d.ts +0 -33
- package/npm_package/portal/index.d.ts +0 -86
- package/npm_package/portal-directives.d-BoG39gYN.d.ts +0 -232
- package/npm_package/private/index.d.ts +0 -13
- package/npm_package/schematics/collection.json +0 -18
- package/npm_package/schematics/index.d.ts +0 -14
- package/npm_package/schematics/index.js +0 -37
- package/npm_package/schematics/index.js.map +0 -1
- package/npm_package/schematics/migration.json +0 -15
- package/npm_package/schematics/ng-add/index.d.ts +0 -17
- package/npm_package/schematics/ng-add/index.js +0 -39
- package/npm_package/schematics/ng-add/index.js.map +0 -1
- package/npm_package/schematics/ng-add/package-config.d.ts +0 -12
- package/npm_package/schematics/ng-add/package-config.js +0 -51
- package/npm_package/schematics/ng-add/package-config.js.map +0 -1
- package/npm_package/schematics/ng-add/schema.d.ts +0 -11
- package/npm_package/schematics/ng-add/schema.js +0 -10
- package/npm_package/schematics/ng-add/schema.js.map +0 -1
- package/npm_package/schematics/ng-add/schema.json +0 -16
- package/npm_package/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.__style__.template +0 -53
- package/npm_package/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +0 -21
- package/npm_package/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.spec.ts.template +0 -25
- package/npm_package/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts.template +0 -45
- package/npm_package/schematics/ng-generate/drag-drop/index.d.ts +0 -11
- package/npm_package/schematics/ng-generate/drag-drop/index.js +0 -42
- package/npm_package/schematics/ng-generate/drag-drop/index.js.map +0 -1
- package/npm_package/schematics/ng-generate/drag-drop/schema.d.ts +0 -10
- package/npm_package/schematics/ng-generate/drag-drop/schema.js +0 -10
- package/npm_package/schematics/ng-generate/drag-drop/schema.js.map +0 -1
- package/npm_package/schematics/ng-generate/drag-drop/schema.json +0 -100
- package/npm_package/schematics/ng-update/data/attribute-selectors.d.ts +0 -15
- package/npm_package/schematics/ng-update/data/attribute-selectors.js +0 -12
- package/npm_package/schematics/ng-update/data/attribute-selectors.js.map +0 -1
- package/npm_package/schematics/ng-update/data/class-names.d.ts +0 -15
- package/npm_package/schematics/ng-update/data/class-names.js +0 -12
- package/npm_package/schematics/ng-update/data/class-names.js.map +0 -1
- package/npm_package/schematics/ng-update/data/constructor-checks.d.ts +0 -15
- package/npm_package/schematics/ng-update/data/constructor-checks.js +0 -17
- package/npm_package/schematics/ng-update/data/constructor-checks.js.map +0 -1
- package/npm_package/schematics/ng-update/data/css-selectors.d.ts +0 -27
- package/npm_package/schematics/ng-update/data/css-selectors.js +0 -12
- package/npm_package/schematics/ng-update/data/css-selectors.js.map +0 -1
- package/npm_package/schematics/ng-update/data/css-tokens.d.ts +0 -27
- package/npm_package/schematics/ng-update/data/css-tokens.js +0 -12
- package/npm_package/schematics/ng-update/data/css-tokens.js.map +0 -1
- package/npm_package/schematics/ng-update/data/element-selectors.d.ts +0 -15
- package/npm_package/schematics/ng-update/data/element-selectors.js +0 -12
- package/npm_package/schematics/ng-update/data/element-selectors.js.map +0 -1
- package/npm_package/schematics/ng-update/data/index.d.ts +0 -18
- package/npm_package/schematics/ng-update/data/index.js +0 -35
- package/npm_package/schematics/ng-update/data/index.js.map +0 -1
- package/npm_package/schematics/ng-update/data/input-names.d.ts +0 -22
- package/npm_package/schematics/ng-update/data/input-names.js +0 -12
- package/npm_package/schematics/ng-update/data/input-names.js.map +0 -1
- package/npm_package/schematics/ng-update/data/method-call-checks.d.ts +0 -17
- package/npm_package/schematics/ng-update/data/method-call-checks.js +0 -12
- package/npm_package/schematics/ng-update/data/method-call-checks.js.map +0 -1
- package/npm_package/schematics/ng-update/data/output-names.d.ts +0 -22
- package/npm_package/schematics/ng-update/data/output-names.js +0 -12
- package/npm_package/schematics/ng-update/data/output-names.js.map +0 -1
- package/npm_package/schematics/ng-update/data/property-names.d.ts +0 -20
- package/npm_package/schematics/ng-update/data/property-names.js +0 -12
- package/npm_package/schematics/ng-update/data/property-names.js.map +0 -1
- package/npm_package/schematics/ng-update/data/symbol-removal.d.ts +0 -17
- package/npm_package/schematics/ng-update/data/symbol-removal.js +0 -12
- package/npm_package/schematics/ng-update/data/symbol-removal.js.map +0 -1
- package/npm_package/schematics/ng-update/devkit-file-system.d.ts +0 -30
- package/npm_package/schematics/ng-update/devkit-file-system.js +0 -83
- package/npm_package/schematics/ng-update/devkit-file-system.js.map +0 -1
- package/npm_package/schematics/ng-update/devkit-migration-rule.d.ts +0 -24
- package/npm_package/schematics/ng-update/devkit-migration-rule.js +0 -142
- package/npm_package/schematics/ng-update/devkit-migration-rule.js.map +0 -1
- package/npm_package/schematics/ng-update/devkit-migration.d.ts +0 -35
- package/npm_package/schematics/ng-update/devkit-migration.js +0 -20
- package/npm_package/schematics/ng-update/devkit-migration.js.map +0 -1
- package/npm_package/schematics/ng-update/find-stylesheets.d.ts +0 -16
- package/npm_package/schematics/ng-update/find-stylesheets.js +0 -41
- package/npm_package/schematics/ng-update/find-stylesheets.js.map +0 -1
- package/npm_package/schematics/ng-update/html-parsing/angular.d.ts +0 -15
- package/npm_package/schematics/ng-update/html-parsing/angular.js +0 -51
- package/npm_package/schematics/ng-update/html-parsing/angular.js.map +0 -1
- package/npm_package/schematics/ng-update/html-parsing/elements.d.ts +0 -24
- package/npm_package/schematics/ng-update/html-parsing/elements.js +0 -63
- package/npm_package/schematics/ng-update/html-parsing/elements.js.map +0 -1
- package/npm_package/schematics/ng-update/index.d.ts +0 -10
- package/npm_package/schematics/ng-update/index.js +0 -29
- package/npm_package/schematics/ng-update/index.js.map +0 -1
- package/npm_package/schematics/ng-update/migrations/attribute-selectors.d.ts +0 -26
- package/npm_package/schematics/ng-update/migrations/attribute-selectors.js +0 -71
- package/npm_package/schematics/ng-update/migrations/attribute-selectors.js.map +0 -1
- package/npm_package/schematics/ng-update/migrations/class-inheritance.d.ts +0 -26
- package/npm_package/schematics/ng-update/migrations/class-inheritance.js +0 -58
- package/npm_package/schematics/ng-update/migrations/class-inheritance.js.map +0 -1
- package/npm_package/schematics/ng-update/migrations/class-names.d.ts +0 -32
- package/npm_package/schematics/ng-update/migrations/class-names.js +0 -91
- package/npm_package/schematics/ng-update/migrations/class-names.js.map +0 -1
- package/npm_package/schematics/ng-update/migrations/constructor-signature.d.ts +0 -29
- package/npm_package/schematics/ng-update/migrations/constructor-signature.js +0 -139
- package/npm_package/schematics/ng-update/migrations/constructor-signature.js.map +0 -1
- package/npm_package/schematics/ng-update/migrations/css-selectors.d.ts +0 -26
- package/npm_package/schematics/ng-update/migrations/css-selectors.js +0 -75
- package/npm_package/schematics/ng-update/migrations/css-selectors.js.map +0 -1
- package/npm_package/schematics/ng-update/migrations/css-tokens.d.ts +0 -26
- package/npm_package/schematics/ng-update/migrations/css-tokens.js +0 -83
- package/npm_package/schematics/ng-update/migrations/css-tokens.js.map +0 -1
- package/npm_package/schematics/ng-update/migrations/element-selectors.d.ts +0 -26
- package/npm_package/schematics/ng-update/migrations/element-selectors.js +0 -66
- package/npm_package/schematics/ng-update/migrations/element-selectors.js.map +0 -1
- package/npm_package/schematics/ng-update/migrations/input-names.d.ts +0 -26
- package/npm_package/schematics/ng-update/migrations/input-names.js +0 -59
- package/npm_package/schematics/ng-update/migrations/input-names.js.map +0 -1
- package/npm_package/schematics/ng-update/migrations/method-call-arguments.d.ts +0 -22
- package/npm_package/schematics/ng-update/migrations/method-call-arguments.js +0 -62
- package/npm_package/schematics/ng-update/migrations/method-call-arguments.js.map +0 -1
- package/npm_package/schematics/ng-update/migrations/misc-template.d.ts +0 -18
- package/npm_package/schematics/ng-update/migrations/misc-template.js +0 -25
- package/npm_package/schematics/ng-update/migrations/misc-template.js.map +0 -1
- package/npm_package/schematics/ng-update/migrations/output-names.d.ts +0 -22
- package/npm_package/schematics/ng-update/migrations/output-names.js +0 -46
- package/npm_package/schematics/ng-update/migrations/output-names.js.map +0 -1
- package/npm_package/schematics/ng-update/migrations/property-names.d.ts +0 -22
- package/npm_package/schematics/ng-update/migrations/property-names.js +0 -60
- package/npm_package/schematics/ng-update/migrations/property-names.js.map +0 -1
- package/npm_package/schematics/ng-update/migrations/symbol-removal.d.ts +0 -18
- package/npm_package/schematics/ng-update/migrations/symbol-removal.js +0 -47
- package/npm_package/schematics/ng-update/migrations/symbol-removal.js.map +0 -1
- package/npm_package/schematics/ng-update/public-api.d.ts +0 -19
- package/npm_package/schematics/ng-update/public-api.js +0 -36
- package/npm_package/schematics/ng-update/public-api.js.map +0 -1
- package/npm_package/schematics/ng-update/typescript/base-types.d.ts +0 -10
- package/npm_package/schematics/ng-update/typescript/base-types.js +0 -23
- package/npm_package/schematics/ng-update/typescript/base-types.js.map +0 -1
- package/npm_package/schematics/ng-update/typescript/imports.d.ts +0 -18
- package/npm_package/schematics/ng-update/typescript/imports.js +0 -53
- package/npm_package/schematics/ng-update/typescript/imports.js.map +0 -1
- package/npm_package/schematics/ng-update/typescript/literal.d.ts +0 -18
- package/npm_package/schematics/ng-update/typescript/literal.js +0 -32
- package/npm_package/schematics/ng-update/typescript/literal.js.map +0 -1
- package/npm_package/schematics/ng-update/typescript/module-specifiers.d.ts +0 -16
- package/npm_package/schematics/ng-update/typescript/module-specifiers.js +0 -35
- package/npm_package/schematics/ng-update/typescript/module-specifiers.js.map +0 -1
- package/npm_package/schematics/ng-update/upgrade-data.d.ts +0 -35
- package/npm_package/schematics/ng-update/upgrade-data.js +0 -40
- package/npm_package/schematics/ng-update/upgrade-data.js.map +0 -1
- package/npm_package/schematics/package.json +0 -3
- package/npm_package/schematics/paths.d.ts +0 -11
- package/npm_package/schematics/paths.js +0 -16
- package/npm_package/schematics/paths.js.map +0 -1
- package/npm_package/schematics/update-tool/component-resource-collector.d.ts +0 -44
- package/npm_package/schematics/update-tool/component-resource-collector.js +0 -164
- package/npm_package/schematics/update-tool/component-resource-collector.js.map +0 -1
- package/npm_package/schematics/update-tool/file-system.d.ts +0 -72
- package/npm_package/schematics/update-tool/file-system.js +0 -18
- package/npm_package/schematics/update-tool/file-system.js.map +0 -1
- package/npm_package/schematics/update-tool/index.d.ts +0 -74
- package/npm_package/schematics/update-tool/index.js +0 -172
- package/npm_package/schematics/update-tool/index.js.map +0 -1
- package/npm_package/schematics/update-tool/logger.d.ts +0 -15
- package/npm_package/schematics/update-tool/logger.js +0 -18
- package/npm_package/schematics/update-tool/logger.js.map +0 -1
- package/npm_package/schematics/update-tool/migration.d.ts +0 -87
- package/npm_package/schematics/update-tool/migration.js +0 -70
- package/npm_package/schematics/update-tool/migration.js.map +0 -1
- package/npm_package/schematics/update-tool/public-api.d.ts +0 -16
- package/npm_package/schematics/update-tool/public-api.js +0 -33
- package/npm_package/schematics/update-tool/public-api.js.map +0 -1
- package/npm_package/schematics/update-tool/target-version.d.ts +0 -16
- package/npm_package/schematics/update-tool/target-version.js +0 -27
- package/npm_package/schematics/update-tool/target-version.js.map +0 -1
- package/npm_package/schematics/update-tool/update-recorder.d.ts +0 -13
- package/npm_package/schematics/update-tool/update-recorder.js +0 -10
- package/npm_package/schematics/update-tool/update-recorder.js.map +0 -1
- package/npm_package/schematics/update-tool/utils/decorators.d.ts +0 -22
- package/npm_package/schematics/update-tool/utils/decorators.js +0 -41
- package/npm_package/schematics/update-tool/utils/decorators.js.map +0 -1
- package/npm_package/schematics/update-tool/utils/diagnostics.d.ts +0 -11
- package/npm_package/schematics/update-tool/utils/diagnostics.js +0 -18
- package/npm_package/schematics/update-tool/utils/diagnostics.js.map +0 -1
- package/npm_package/schematics/update-tool/utils/functions.d.ts +0 -14
- package/npm_package/schematics/update-tool/utils/functions.js +0 -20
- package/npm_package/schematics/update-tool/utils/functions.js.map +0 -1
- package/npm_package/schematics/update-tool/utils/imports.d.ts +0 -17
- package/npm_package/schematics/update-tool/utils/imports.js +0 -110
- package/npm_package/schematics/update-tool/utils/imports.js.map +0 -1
- package/npm_package/schematics/update-tool/utils/line-mappings.d.ts +0 -21
- package/npm_package/schematics/update-tool/utils/line-mappings.js +0 -75
- package/npm_package/schematics/update-tool/utils/line-mappings.js.map +0 -1
- package/npm_package/schematics/update-tool/utils/parse-tsconfig.d.ts +0 -18
- package/npm_package/schematics/update-tool/utils/parse-tsconfig.js +0 -45
- package/npm_package/schematics/update-tool/utils/parse-tsconfig.js.map +0 -1
- package/npm_package/schematics/update-tool/utils/property-name.d.ts +0 -18
- package/npm_package/schematics/update-tool/utils/property-name.js +0 -27
- package/npm_package/schematics/update-tool/utils/property-name.js.map +0 -1
- package/npm_package/schematics/update-tool/utils/virtual-host.d.ts +0 -36
- package/npm_package/schematics/update-tool/utils/virtual-host.js +0 -71
- package/npm_package/schematics/update-tool/utils/virtual-host.js.map +0 -1
- package/npm_package/schematics/update-tool/version-changes.d.ts +0 -32
- package/npm_package/schematics/update-tool/version-changes.js +0 -38
- package/npm_package/schematics/update-tool/version-changes.js.map +0 -1
- package/npm_package/schematics/utils/ast/ng-module-imports.d.ts +0 -12
- package/npm_package/schematics/utils/ast/ng-module-imports.js +0 -82
- package/npm_package/schematics/utils/ast/ng-module-imports.js.map +0 -1
- package/npm_package/schematics/utils/ast.d.ts +0 -25
- package/npm_package/schematics/utils/ast.js +0 -79
- package/npm_package/schematics/utils/ast.js.map +0 -1
- package/npm_package/schematics/utils/build-component.d.ts +0 -20
- package/npm_package/schematics/utils/build-component.js +0 -188
- package/npm_package/schematics/utils/build-component.js.map +0 -1
- package/npm_package/schematics/utils/get-project.d.ts +0 -13
- package/npm_package/schematics/utils/get-project.js +0 -28
- package/npm_package/schematics/utils/get-project.js.map +0 -1
- package/npm_package/schematics/utils/html-manipulation.d.ts +0 -15
- package/npm_package/schematics/utils/html-manipulation.js +0 -91
- package/npm_package/schematics/utils/html-manipulation.js.map +0 -1
- package/npm_package/schematics/utils/index.d.ts +0 -19
- package/npm_package/schematics/utils/index.js +0 -36
- package/npm_package/schematics/utils/index.js.map +0 -1
- package/npm_package/schematics/utils/parse5-element.d.ts +0 -12
- package/npm_package/schematics/utils/parse5-element.js +0 -30
- package/npm_package/schematics/utils/parse5-element.js.map +0 -1
- package/npm_package/schematics/utils/project-index-file.d.ts +0 -10
- package/npm_package/schematics/utils/project-index-file.js +0 -20
- package/npm_package/schematics/utils/project-index-file.js.map +0 -1
- package/npm_package/schematics/utils/project-main-file.d.ts +0 -10
- package/npm_package/schematics/utils/project-main-file.js +0 -25
- package/npm_package/schematics/utils/project-main-file.js.map +0 -1
- package/npm_package/schematics/utils/project-style-file.d.ts +0 -13
- package/npm_package/schematics/utils/project-style-file.js +0 -42
- package/npm_package/schematics/utils/project-style-file.js.map +0 -1
- package/npm_package/schematics/utils/project-targets.d.ts +0 -14
- package/npm_package/schematics/utils/project-targets.js +0 -46
- package/npm_package/schematics/utils/project-targets.js.map +0 -1
- package/npm_package/schematics/utils/project-tsconfig-paths.d.ts +0 -14
- package/npm_package/schematics/utils/project-tsconfig-paths.js +0 -46
- package/npm_package/schematics/utils/project-tsconfig-paths.js.map +0 -1
- package/npm_package/schematics/utils/schematic-options.d.ts +0 -20
- package/npm_package/schematics/utils/schematic-options.js +0 -89
- package/npm_package/schematics/utils/schematic-options.js.map +0 -1
- package/npm_package/scrolling/index.d.ts +0 -62
- package/npm_package/scrolling-module.d-ud2XrbF8.d.ts +0 -552
- package/npm_package/selection-model.d-C_vvNGP-.d.ts +0 -117
- package/npm_package/stepper/index.d.ts +0 -228
- package/npm_package/style-loader.d-BXZfQZTF.d.ts +0 -21
- package/npm_package/table/index.d.ts +0 -1100
- package/npm_package/testing/index.d.ts +0 -94
- package/npm_package/testing/selenium-webdriver/index.d.ts +0 -150
- package/npm_package/testing/testbed/index.d.ts +0 -157
- package/npm_package/text-field/_index.scss +0 -89
- package/npm_package/text-field/index.d.ts +0 -156
- package/npm_package/text-field-prebuilt.css +0 -1
- package/npm_package/tree/index.d.ts +0 -720
- package/npm_package/tree-key-manager-strategy.d-XB6M79l-.d.ts +0 -116
- package/npm_package/unique-selection-dispatcher.d-DSFqf1MM.d.ts +0 -33
- package/npm_package/view-repeater.d-BKljR8u8.d.ts +0 -89
|
@@ -1,870 +0,0 @@
|
|
|
1
|
-
import { DOCUMENT } from '@angular/common';
|
|
2
|
-
import * as i0 from '@angular/core';
|
|
3
|
-
import { inject, ElementRef, NgZone, Renderer2, ChangeDetectorRef, Injector, afterNextRender, Component, ViewEncapsulation, ChangeDetectionStrategy, ViewChild, InjectionToken, TemplateRef, Injectable, NgModule } from '@angular/core';
|
|
4
|
-
import { B as BasePortalOutlet, f as CdkPortalOutlet, C as ComponentPortal, T as TemplatePortal, h as PortalModule } from './portal-directives-Bw5woq8I.mjs';
|
|
5
|
-
export { d as ɵɵCdkPortal, g as ɵɵPortalHostDirective, e as ɵɵTemplatePortalDirective } from './portal-directives-Bw5woq8I.mjs';
|
|
6
|
-
import { F as FocusTrapFactory, I as InteractivityChecker, A as A11yModule } from './a11y-module-BYox5gpI.mjs';
|
|
7
|
-
import { c as OverlayRef, a as Overlay, O as OverlayContainer, f as OverlayConfig, m as OverlayModule } from './overlay-module-BUj0D19H.mjs';
|
|
8
|
-
import { F as FocusMonitor } from './focus-monitor-e2l_RpN3.mjs';
|
|
9
|
-
import { P as Platform } from './platform-DmdVEw_C.mjs';
|
|
10
|
-
import { c as _getFocusedElementPierceShadowDom } from './shadow-dom-B0oHn41l.mjs';
|
|
11
|
-
import { Subject, defer, of } from 'rxjs';
|
|
12
|
-
import { g as ESCAPE } from './keycodes-CpHkExLC.mjs';
|
|
13
|
-
import { hasModifierKey } from './keycodes.mjs';
|
|
14
|
-
import { startWith } from 'rxjs/operators';
|
|
15
|
-
import { _ as _IdGenerator } from './id-generator-Dw_9dSDu.mjs';
|
|
16
|
-
import { D as Directionality } from './directionality-CBXD4hga.mjs';
|
|
17
|
-
import './style-loader-Cu9AvjH9.mjs';
|
|
18
|
-
import './private.mjs';
|
|
19
|
-
import './breakpoints-observer-CljOfYGy.mjs';
|
|
20
|
-
import './array-I1yfCXUO.mjs';
|
|
21
|
-
import './observers.mjs';
|
|
22
|
-
import './element-x4z00URv.mjs';
|
|
23
|
-
import './backwards-compatibility-DHR38MsD.mjs';
|
|
24
|
-
import './test-environment-CT0XxPyp.mjs';
|
|
25
|
-
import './css-pixel-value-C_HEqLhI.mjs';
|
|
26
|
-
import './scrolling.mjs';
|
|
27
|
-
import './scrolling-BkvA05C8.mjs';
|
|
28
|
-
import './bidi.mjs';
|
|
29
|
-
import './recycle-view-repeater-strategy-DoWdPqVw.mjs';
|
|
30
|
-
import './data-source-D34wiQZj.mjs';
|
|
31
|
-
import './fake-event-detection-DWOdFTFz.mjs';
|
|
32
|
-
import './passive-listeners-esHZRgIN.mjs';
|
|
33
|
-
|
|
34
|
-
/** Configuration for opening a modal dialog. */
|
|
35
|
-
class DialogConfig {
|
|
36
|
-
/**
|
|
37
|
-
* Where the attached component should live in Angular's *logical* component tree.
|
|
38
|
-
* This affects what is available for injection and the change detection order for the
|
|
39
|
-
* component instantiated inside of the dialog. This does not affect where the dialog
|
|
40
|
-
* content will be rendered.
|
|
41
|
-
*/
|
|
42
|
-
viewContainerRef;
|
|
43
|
-
/**
|
|
44
|
-
* Injector used for the instantiation of the component to be attached. If provided,
|
|
45
|
-
* takes precedence over the injector indirectly provided by `ViewContainerRef`.
|
|
46
|
-
*/
|
|
47
|
-
injector;
|
|
48
|
-
/** ID for the dialog. If omitted, a unique one will be generated. */
|
|
49
|
-
id;
|
|
50
|
-
/** The ARIA role of the dialog element. */
|
|
51
|
-
role = 'dialog';
|
|
52
|
-
/** Optional CSS class or classes applied to the overlay panel. */
|
|
53
|
-
panelClass = '';
|
|
54
|
-
/** Whether the dialog has a backdrop. */
|
|
55
|
-
hasBackdrop = true;
|
|
56
|
-
/** Optional CSS class or classes applied to the overlay backdrop. */
|
|
57
|
-
backdropClass = '';
|
|
58
|
-
/** Whether the dialog closes with the escape key or pointer events outside the panel element. */
|
|
59
|
-
disableClose = false;
|
|
60
|
-
/** Width of the dialog. */
|
|
61
|
-
width = '';
|
|
62
|
-
/** Height of the dialog. */
|
|
63
|
-
height = '';
|
|
64
|
-
/** Min-width of the dialog. If a number is provided, assumes pixel units. */
|
|
65
|
-
minWidth;
|
|
66
|
-
/** Min-height of the dialog. If a number is provided, assumes pixel units. */
|
|
67
|
-
minHeight;
|
|
68
|
-
/** Max-width of the dialog. If a number is provided, assumes pixel units. Defaults to 80vw. */
|
|
69
|
-
maxWidth;
|
|
70
|
-
/** Max-height of the dialog. If a number is provided, assumes pixel units. */
|
|
71
|
-
maxHeight;
|
|
72
|
-
/** Strategy to use when positioning the dialog. Defaults to centering it on the page. */
|
|
73
|
-
positionStrategy;
|
|
74
|
-
/** Data being injected into the child component. */
|
|
75
|
-
data = null;
|
|
76
|
-
/** Layout direction for the dialog's content. */
|
|
77
|
-
direction;
|
|
78
|
-
/** ID of the element that describes the dialog. */
|
|
79
|
-
ariaDescribedBy = null;
|
|
80
|
-
/** ID of the element that labels the dialog. */
|
|
81
|
-
ariaLabelledBy = null;
|
|
82
|
-
/** Dialog label applied via `aria-label` */
|
|
83
|
-
ariaLabel = null;
|
|
84
|
-
/**
|
|
85
|
-
* Whether this is a modal dialog. Used to set the `aria-modal` attribute. Off by default,
|
|
86
|
-
* because it can interfere with other overlay-based components (e.g. `mat-select`) and because
|
|
87
|
-
* it is redundant since the dialog marks all outside content as `aria-hidden` anyway.
|
|
88
|
-
*/
|
|
89
|
-
ariaModal = false;
|
|
90
|
-
/**
|
|
91
|
-
* Where the dialog should focus on open.
|
|
92
|
-
* @breaking-change 14.0.0 Remove boolean option from autoFocus. Use string or
|
|
93
|
-
* AutoFocusTarget instead.
|
|
94
|
-
*/
|
|
95
|
-
autoFocus = 'first-tabbable';
|
|
96
|
-
/**
|
|
97
|
-
* Whether the dialog should restore focus to the previously-focused element upon closing.
|
|
98
|
-
* Has the following behavior based on the type that is passed in:
|
|
99
|
-
* - `boolean` - when true, will return focus to the element that was focused before the dialog
|
|
100
|
-
* was opened, otherwise won't restore focus at all.
|
|
101
|
-
* - `string` - focus will be restored to the first element that matches the CSS selector.
|
|
102
|
-
* - `HTMLElement` - focus will be restored to the specific element.
|
|
103
|
-
*/
|
|
104
|
-
restoreFocus = true;
|
|
105
|
-
/**
|
|
106
|
-
* Scroll strategy to be used for the dialog. This determines how
|
|
107
|
-
* the dialog responds to scrolling underneath the panel element.
|
|
108
|
-
*/
|
|
109
|
-
scrollStrategy;
|
|
110
|
-
/**
|
|
111
|
-
* Whether the dialog should close when the user navigates backwards or forwards through browser
|
|
112
|
-
* history. This does not apply to navigation via anchor element unless using URL-hash based
|
|
113
|
-
* routing (`HashLocationStrategy` in the Angular router).
|
|
114
|
-
*/
|
|
115
|
-
closeOnNavigation = true;
|
|
116
|
-
/**
|
|
117
|
-
* Whether the dialog should close when the dialog service is destroyed. This is useful if
|
|
118
|
-
* another service is wrapping the dialog and is managing the destruction instead.
|
|
119
|
-
*/
|
|
120
|
-
closeOnDestroy = true;
|
|
121
|
-
/**
|
|
122
|
-
* Whether the dialog should close when the underlying overlay is detached. This is useful if
|
|
123
|
-
* another service is wrapping the dialog and is managing the destruction instead. E.g. an
|
|
124
|
-
* external detachment can happen as a result of a scroll strategy triggering it or when the
|
|
125
|
-
* browser location changes.
|
|
126
|
-
*/
|
|
127
|
-
closeOnOverlayDetachments = true;
|
|
128
|
-
/**
|
|
129
|
-
* Alternate `ComponentFactoryResolver` to use when resolving the associated component.
|
|
130
|
-
* @deprecated No longer used. Will be removed.
|
|
131
|
-
* @breaking-change 20.0.0
|
|
132
|
-
*/
|
|
133
|
-
componentFactoryResolver;
|
|
134
|
-
/**
|
|
135
|
-
* Providers that will be exposed to the contents of the dialog. Can also
|
|
136
|
-
* be provided as a function in order to generate the providers lazily.
|
|
137
|
-
*/
|
|
138
|
-
providers;
|
|
139
|
-
/**
|
|
140
|
-
* Component into which the dialog content will be rendered. Defaults to `CdkDialogContainer`.
|
|
141
|
-
* A configuration object can be passed in to customize the providers that will be exposed
|
|
142
|
-
* to the dialog container.
|
|
143
|
-
*/
|
|
144
|
-
container;
|
|
145
|
-
/**
|
|
146
|
-
* Context that will be passed to template-based dialogs.
|
|
147
|
-
* A function can be passed in to resolve the context lazily.
|
|
148
|
-
*/
|
|
149
|
-
templateContext;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
function throwDialogContentAlreadyAttachedError() {
|
|
153
|
-
throw Error('Attempting to attach dialog content after content is already attached');
|
|
154
|
-
}
|
|
155
|
-
/**
|
|
156
|
-
* Internal component that wraps user-provided dialog content.
|
|
157
|
-
* @docs-private
|
|
158
|
-
*/
|
|
159
|
-
class CdkDialogContainer extends BasePortalOutlet {
|
|
160
|
-
_elementRef = inject(ElementRef);
|
|
161
|
-
_focusTrapFactory = inject(FocusTrapFactory);
|
|
162
|
-
_config;
|
|
163
|
-
_interactivityChecker = inject(InteractivityChecker);
|
|
164
|
-
_ngZone = inject(NgZone);
|
|
165
|
-
_overlayRef = inject(OverlayRef);
|
|
166
|
-
_focusMonitor = inject(FocusMonitor);
|
|
167
|
-
_renderer = inject(Renderer2);
|
|
168
|
-
_platform = inject(Platform);
|
|
169
|
-
_document = inject(DOCUMENT, { optional: true });
|
|
170
|
-
/** The portal outlet inside of this container into which the dialog content will be loaded. */
|
|
171
|
-
_portalOutlet;
|
|
172
|
-
/** The class that traps and manages focus within the dialog. */
|
|
173
|
-
_focusTrap = null;
|
|
174
|
-
/** Element that was focused before the dialog was opened. Save this to restore upon close. */
|
|
175
|
-
_elementFocusedBeforeDialogWasOpened = null;
|
|
176
|
-
/**
|
|
177
|
-
* Type of interaction that led to the dialog being closed. This is used to determine
|
|
178
|
-
* whether the focus style will be applied when returning focus to its original location
|
|
179
|
-
* after the dialog is closed.
|
|
180
|
-
*/
|
|
181
|
-
_closeInteractionType = null;
|
|
182
|
-
/**
|
|
183
|
-
* Queue of the IDs of the dialog's label element, based on their definition order. The first
|
|
184
|
-
* ID will be used as the `aria-labelledby` value. We use a queue here to handle the case
|
|
185
|
-
* where there are two or more titles in the DOM at a time and the first one is destroyed while
|
|
186
|
-
* the rest are present.
|
|
187
|
-
*/
|
|
188
|
-
_ariaLabelledByQueue = [];
|
|
189
|
-
_changeDetectorRef = inject(ChangeDetectorRef);
|
|
190
|
-
_injector = inject(Injector);
|
|
191
|
-
_isDestroyed = false;
|
|
192
|
-
constructor() {
|
|
193
|
-
super();
|
|
194
|
-
// Callback is primarily for some internal tests
|
|
195
|
-
// that were instantiating the dialog container manually.
|
|
196
|
-
this._config = (inject(DialogConfig, { optional: true }) || new DialogConfig());
|
|
197
|
-
if (this._config.ariaLabelledBy) {
|
|
198
|
-
this._ariaLabelledByQueue.push(this._config.ariaLabelledBy);
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
_addAriaLabelledBy(id) {
|
|
202
|
-
this._ariaLabelledByQueue.push(id);
|
|
203
|
-
this._changeDetectorRef.markForCheck();
|
|
204
|
-
}
|
|
205
|
-
_removeAriaLabelledBy(id) {
|
|
206
|
-
const index = this._ariaLabelledByQueue.indexOf(id);
|
|
207
|
-
if (index > -1) {
|
|
208
|
-
this._ariaLabelledByQueue.splice(index, 1);
|
|
209
|
-
this._changeDetectorRef.markForCheck();
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
_contentAttached() {
|
|
213
|
-
this._initializeFocusTrap();
|
|
214
|
-
this._handleBackdropClicks();
|
|
215
|
-
this._captureInitialFocus();
|
|
216
|
-
}
|
|
217
|
-
/**
|
|
218
|
-
* Can be used by child classes to customize the initial focus
|
|
219
|
-
* capturing behavior (e.g. if it's tied to an animation).
|
|
220
|
-
*/
|
|
221
|
-
_captureInitialFocus() {
|
|
222
|
-
this._trapFocus();
|
|
223
|
-
}
|
|
224
|
-
ngOnDestroy() {
|
|
225
|
-
this._isDestroyed = true;
|
|
226
|
-
this._restoreFocus();
|
|
227
|
-
}
|
|
228
|
-
/**
|
|
229
|
-
* Attach a ComponentPortal as content to this dialog container.
|
|
230
|
-
* @param portal Portal to be attached as the dialog content.
|
|
231
|
-
*/
|
|
232
|
-
attachComponentPortal(portal) {
|
|
233
|
-
if (this._portalOutlet.hasAttached() && (typeof ngDevMode === 'undefined' || ngDevMode)) {
|
|
234
|
-
throwDialogContentAlreadyAttachedError();
|
|
235
|
-
}
|
|
236
|
-
const result = this._portalOutlet.attachComponentPortal(portal);
|
|
237
|
-
this._contentAttached();
|
|
238
|
-
return result;
|
|
239
|
-
}
|
|
240
|
-
/**
|
|
241
|
-
* Attach a TemplatePortal as content to this dialog container.
|
|
242
|
-
* @param portal Portal to be attached as the dialog content.
|
|
243
|
-
*/
|
|
244
|
-
attachTemplatePortal(portal) {
|
|
245
|
-
if (this._portalOutlet.hasAttached() && (typeof ngDevMode === 'undefined' || ngDevMode)) {
|
|
246
|
-
throwDialogContentAlreadyAttachedError();
|
|
247
|
-
}
|
|
248
|
-
const result = this._portalOutlet.attachTemplatePortal(portal);
|
|
249
|
-
this._contentAttached();
|
|
250
|
-
return result;
|
|
251
|
-
}
|
|
252
|
-
/**
|
|
253
|
-
* Attaches a DOM portal to the dialog container.
|
|
254
|
-
* @param portal Portal to be attached.
|
|
255
|
-
* @deprecated To be turned into a method.
|
|
256
|
-
* @breaking-change 10.0.0
|
|
257
|
-
*/
|
|
258
|
-
attachDomPortal = (portal) => {
|
|
259
|
-
if (this._portalOutlet.hasAttached() && (typeof ngDevMode === 'undefined' || ngDevMode)) {
|
|
260
|
-
throwDialogContentAlreadyAttachedError();
|
|
261
|
-
}
|
|
262
|
-
const result = this._portalOutlet.attachDomPortal(portal);
|
|
263
|
-
this._contentAttached();
|
|
264
|
-
return result;
|
|
265
|
-
};
|
|
266
|
-
// TODO(crisbeto): this shouldn't be exposed, but there are internal references to it.
|
|
267
|
-
/** Captures focus if it isn't already inside the dialog. */
|
|
268
|
-
_recaptureFocus() {
|
|
269
|
-
if (!this._containsFocus()) {
|
|
270
|
-
this._trapFocus();
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
/**
|
|
274
|
-
* Focuses the provided element. If the element is not focusable, it will add a tabIndex
|
|
275
|
-
* attribute to forcefully focus it. The attribute is removed after focus is moved.
|
|
276
|
-
* @param element The element to focus.
|
|
277
|
-
*/
|
|
278
|
-
_forceFocus(element, options) {
|
|
279
|
-
if (!this._interactivityChecker.isFocusable(element)) {
|
|
280
|
-
element.tabIndex = -1;
|
|
281
|
-
// The tabindex attribute should be removed to avoid navigating to that element again
|
|
282
|
-
this._ngZone.runOutsideAngular(() => {
|
|
283
|
-
const callback = () => {
|
|
284
|
-
deregisterBlur();
|
|
285
|
-
deregisterMousedown();
|
|
286
|
-
element.removeAttribute('tabindex');
|
|
287
|
-
};
|
|
288
|
-
const deregisterBlur = this._renderer.listen(element, 'blur', callback);
|
|
289
|
-
const deregisterMousedown = this._renderer.listen(element, 'mousedown', callback);
|
|
290
|
-
});
|
|
291
|
-
}
|
|
292
|
-
element.focus(options);
|
|
293
|
-
}
|
|
294
|
-
/**
|
|
295
|
-
* Focuses the first element that matches the given selector within the focus trap.
|
|
296
|
-
* @param selector The CSS selector for the element to set focus to.
|
|
297
|
-
*/
|
|
298
|
-
_focusByCssSelector(selector, options) {
|
|
299
|
-
let elementToFocus = this._elementRef.nativeElement.querySelector(selector);
|
|
300
|
-
if (elementToFocus) {
|
|
301
|
-
this._forceFocus(elementToFocus, options);
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
/**
|
|
305
|
-
* Moves the focus inside the focus trap. When autoFocus is not set to 'dialog', if focus
|
|
306
|
-
* cannot be moved then focus will go to the dialog container.
|
|
307
|
-
*/
|
|
308
|
-
_trapFocus(options) {
|
|
309
|
-
if (this._isDestroyed) {
|
|
310
|
-
return;
|
|
311
|
-
}
|
|
312
|
-
// If were to attempt to focus immediately, then the content of the dialog would not yet be
|
|
313
|
-
// ready in instances where change detection has to run first. To deal with this, we simply
|
|
314
|
-
// wait until after the next render.
|
|
315
|
-
afterNextRender(() => {
|
|
316
|
-
const element = this._elementRef.nativeElement;
|
|
317
|
-
switch (this._config.autoFocus) {
|
|
318
|
-
case false:
|
|
319
|
-
case 'dialog':
|
|
320
|
-
// Ensure that focus is on the dialog container. It's possible that a different
|
|
321
|
-
// component tried to move focus while the open animation was running. See:
|
|
322
|
-
// https://github.com/angular/components/issues/16215. Note that we only want to do this
|
|
323
|
-
// if the focus isn't inside the dialog already, because it's possible that the consumer
|
|
324
|
-
// turned off `autoFocus` in order to move focus themselves.
|
|
325
|
-
if (!this._containsFocus()) {
|
|
326
|
-
element.focus(options);
|
|
327
|
-
}
|
|
328
|
-
break;
|
|
329
|
-
case true:
|
|
330
|
-
case 'first-tabbable':
|
|
331
|
-
const focusedSuccessfully = this._focusTrap?.focusInitialElement(options);
|
|
332
|
-
// If we weren't able to find a focusable element in the dialog, then focus the dialog
|
|
333
|
-
// container instead.
|
|
334
|
-
if (!focusedSuccessfully) {
|
|
335
|
-
this._focusDialogContainer(options);
|
|
336
|
-
}
|
|
337
|
-
break;
|
|
338
|
-
case 'first-heading':
|
|
339
|
-
this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]', options);
|
|
340
|
-
break;
|
|
341
|
-
default:
|
|
342
|
-
this._focusByCssSelector(this._config.autoFocus, options);
|
|
343
|
-
break;
|
|
344
|
-
}
|
|
345
|
-
}, { injector: this._injector });
|
|
346
|
-
}
|
|
347
|
-
/** Restores focus to the element that was focused before the dialog opened. */
|
|
348
|
-
_restoreFocus() {
|
|
349
|
-
const focusConfig = this._config.restoreFocus;
|
|
350
|
-
let focusTargetElement = null;
|
|
351
|
-
if (typeof focusConfig === 'string') {
|
|
352
|
-
focusTargetElement = this._document.querySelector(focusConfig);
|
|
353
|
-
}
|
|
354
|
-
else if (typeof focusConfig === 'boolean') {
|
|
355
|
-
focusTargetElement = focusConfig ? this._elementFocusedBeforeDialogWasOpened : null;
|
|
356
|
-
}
|
|
357
|
-
else if (focusConfig) {
|
|
358
|
-
focusTargetElement = focusConfig;
|
|
359
|
-
}
|
|
360
|
-
// We need the extra check, because IE can set the `activeElement` to null in some cases.
|
|
361
|
-
if (this._config.restoreFocus &&
|
|
362
|
-
focusTargetElement &&
|
|
363
|
-
typeof focusTargetElement.focus === 'function') {
|
|
364
|
-
const activeElement = _getFocusedElementPierceShadowDom();
|
|
365
|
-
const element = this._elementRef.nativeElement;
|
|
366
|
-
// Make sure that focus is still inside the dialog or is on the body (usually because a
|
|
367
|
-
// non-focusable element like the backdrop was clicked) before moving it. It's possible that
|
|
368
|
-
// the consumer moved it themselves before the animation was done, in which case we shouldn't
|
|
369
|
-
// do anything.
|
|
370
|
-
if (!activeElement ||
|
|
371
|
-
activeElement === this._document.body ||
|
|
372
|
-
activeElement === element ||
|
|
373
|
-
element.contains(activeElement)) {
|
|
374
|
-
if (this._focusMonitor) {
|
|
375
|
-
this._focusMonitor.focusVia(focusTargetElement, this._closeInteractionType);
|
|
376
|
-
this._closeInteractionType = null;
|
|
377
|
-
}
|
|
378
|
-
else {
|
|
379
|
-
focusTargetElement.focus();
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
if (this._focusTrap) {
|
|
384
|
-
this._focusTrap.destroy();
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
/** Focuses the dialog container. */
|
|
388
|
-
_focusDialogContainer(options) {
|
|
389
|
-
// Note that there is no focus method when rendering on the server.
|
|
390
|
-
if (this._elementRef.nativeElement.focus) {
|
|
391
|
-
this._elementRef.nativeElement.focus(options);
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
/** Returns whether focus is inside the dialog. */
|
|
395
|
-
_containsFocus() {
|
|
396
|
-
const element = this._elementRef.nativeElement;
|
|
397
|
-
const activeElement = _getFocusedElementPierceShadowDom();
|
|
398
|
-
return element === activeElement || element.contains(activeElement);
|
|
399
|
-
}
|
|
400
|
-
/** Sets up the focus trap. */
|
|
401
|
-
_initializeFocusTrap() {
|
|
402
|
-
if (this._platform.isBrowser) {
|
|
403
|
-
this._focusTrap = this._focusTrapFactory.create(this._elementRef.nativeElement);
|
|
404
|
-
// Save the previously focused element. This element will be re-focused
|
|
405
|
-
// when the dialog closes.
|
|
406
|
-
if (this._document) {
|
|
407
|
-
this._elementFocusedBeforeDialogWasOpened = _getFocusedElementPierceShadowDom();
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
/** Sets up the listener that handles clicks on the dialog backdrop. */
|
|
412
|
-
_handleBackdropClicks() {
|
|
413
|
-
// Clicking on the backdrop will move focus out of dialog.
|
|
414
|
-
// Recapture it if closing via the backdrop is disabled.
|
|
415
|
-
this._overlayRef.backdropClick().subscribe(() => {
|
|
416
|
-
if (this._config.disableClose) {
|
|
417
|
-
this._recaptureFocus();
|
|
418
|
-
}
|
|
419
|
-
});
|
|
420
|
-
}
|
|
421
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: CdkDialogContainer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
422
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: CdkDialogContainer, isStandalone: true, selector: "cdk-dialog-container", host: { attributes: { "tabindex": "-1" }, properties: { "attr.id": "_config.id || null", "attr.role": "_config.role", "attr.aria-modal": "_config.ariaModal", "attr.aria-labelledby": "_config.ariaLabel ? null : _ariaLabelledByQueue[0]", "attr.aria-label": "_config.ariaLabel", "attr.aria-describedby": "_config.ariaDescribedBy || null" }, classAttribute: "cdk-dialog-container" }, viewQueries: [{ propertyName: "_portalOutlet", first: true, predicate: CdkPortalOutlet, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<ng-template cdkPortalOutlet />\n", styles: [".cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}\n"], dependencies: [{ kind: "directive", type: CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });
|
|
423
|
-
}
|
|
424
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: CdkDialogContainer, decorators: [{
|
|
425
|
-
type: Component,
|
|
426
|
-
args: [{ selector: 'cdk-dialog-container', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, imports: [CdkPortalOutlet], host: {
|
|
427
|
-
'class': 'cdk-dialog-container',
|
|
428
|
-
'tabindex': '-1',
|
|
429
|
-
'[attr.id]': '_config.id || null',
|
|
430
|
-
'[attr.role]': '_config.role',
|
|
431
|
-
'[attr.aria-modal]': '_config.ariaModal',
|
|
432
|
-
'[attr.aria-labelledby]': '_config.ariaLabel ? null : _ariaLabelledByQueue[0]',
|
|
433
|
-
'[attr.aria-label]': '_config.ariaLabel',
|
|
434
|
-
'[attr.aria-describedby]': '_config.ariaDescribedBy || null',
|
|
435
|
-
}, template: "<ng-template cdkPortalOutlet />\n", styles: [".cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}\n"] }]
|
|
436
|
-
}], ctorParameters: () => [], propDecorators: { _portalOutlet: [{
|
|
437
|
-
type: ViewChild,
|
|
438
|
-
args: [CdkPortalOutlet, { static: true }]
|
|
439
|
-
}] } });
|
|
440
|
-
|
|
441
|
-
/**
|
|
442
|
-
* Reference to a dialog opened via the Dialog service.
|
|
443
|
-
*/
|
|
444
|
-
class DialogRef {
|
|
445
|
-
overlayRef;
|
|
446
|
-
config;
|
|
447
|
-
/**
|
|
448
|
-
* Instance of component opened into the dialog. Will be
|
|
449
|
-
* null when the dialog is opened using a `TemplateRef`.
|
|
450
|
-
*/
|
|
451
|
-
componentInstance;
|
|
452
|
-
/**
|
|
453
|
-
* `ComponentRef` of the component opened into the dialog. Will be
|
|
454
|
-
* null when the dialog is opened using a `TemplateRef`.
|
|
455
|
-
*/
|
|
456
|
-
componentRef;
|
|
457
|
-
/** Instance of the container that is rendering out the dialog content. */
|
|
458
|
-
containerInstance;
|
|
459
|
-
/** Whether the user is allowed to close the dialog. */
|
|
460
|
-
disableClose;
|
|
461
|
-
/** Emits when the dialog has been closed. */
|
|
462
|
-
closed = new Subject();
|
|
463
|
-
/** Emits when the backdrop of the dialog is clicked. */
|
|
464
|
-
backdropClick;
|
|
465
|
-
/** Emits when on keyboard events within the dialog. */
|
|
466
|
-
keydownEvents;
|
|
467
|
-
/** Emits on pointer events that happen outside of the dialog. */
|
|
468
|
-
outsidePointerEvents;
|
|
469
|
-
/** Unique ID for the dialog. */
|
|
470
|
-
id;
|
|
471
|
-
/** Subscription to external detachments of the dialog. */
|
|
472
|
-
_detachSubscription;
|
|
473
|
-
constructor(overlayRef, config) {
|
|
474
|
-
this.overlayRef = overlayRef;
|
|
475
|
-
this.config = config;
|
|
476
|
-
this.disableClose = config.disableClose;
|
|
477
|
-
this.backdropClick = overlayRef.backdropClick();
|
|
478
|
-
this.keydownEvents = overlayRef.keydownEvents();
|
|
479
|
-
this.outsidePointerEvents = overlayRef.outsidePointerEvents();
|
|
480
|
-
this.id = config.id; // By the time the dialog is created we are guaranteed to have an ID.
|
|
481
|
-
this.keydownEvents.subscribe(event => {
|
|
482
|
-
if (event.keyCode === ESCAPE && !this.disableClose && !hasModifierKey(event)) {
|
|
483
|
-
event.preventDefault();
|
|
484
|
-
this.close(undefined, { focusOrigin: 'keyboard' });
|
|
485
|
-
}
|
|
486
|
-
});
|
|
487
|
-
this.backdropClick.subscribe(() => {
|
|
488
|
-
if (!this.disableClose) {
|
|
489
|
-
this.close(undefined, { focusOrigin: 'mouse' });
|
|
490
|
-
}
|
|
491
|
-
});
|
|
492
|
-
this._detachSubscription = overlayRef.detachments().subscribe(() => {
|
|
493
|
-
// Check specifically for `false`, because we want `undefined` to be treated like `true`.
|
|
494
|
-
if (config.closeOnOverlayDetachments !== false) {
|
|
495
|
-
this.close();
|
|
496
|
-
}
|
|
497
|
-
});
|
|
498
|
-
}
|
|
499
|
-
/**
|
|
500
|
-
* Close the dialog.
|
|
501
|
-
* @param result Optional result to return to the dialog opener.
|
|
502
|
-
* @param options Additional options to customize the closing behavior.
|
|
503
|
-
*/
|
|
504
|
-
close(result, options) {
|
|
505
|
-
if (this.containerInstance) {
|
|
506
|
-
const closedSubject = this.closed;
|
|
507
|
-
this.containerInstance._closeInteractionType = options?.focusOrigin || 'program';
|
|
508
|
-
// Drop the detach subscription first since it can be triggered by the
|
|
509
|
-
// `dispose` call and override the result of this closing sequence.
|
|
510
|
-
this._detachSubscription.unsubscribe();
|
|
511
|
-
this.overlayRef.dispose();
|
|
512
|
-
closedSubject.next(result);
|
|
513
|
-
closedSubject.complete();
|
|
514
|
-
this.componentInstance = this.containerInstance = null;
|
|
515
|
-
}
|
|
516
|
-
}
|
|
517
|
-
/** Updates the position of the dialog based on the current position strategy. */
|
|
518
|
-
updatePosition() {
|
|
519
|
-
this.overlayRef.updatePosition();
|
|
520
|
-
return this;
|
|
521
|
-
}
|
|
522
|
-
/**
|
|
523
|
-
* Updates the dialog's width and height.
|
|
524
|
-
* @param width New width of the dialog.
|
|
525
|
-
* @param height New height of the dialog.
|
|
526
|
-
*/
|
|
527
|
-
updateSize(width = '', height = '') {
|
|
528
|
-
this.overlayRef.updateSize({ width, height });
|
|
529
|
-
return this;
|
|
530
|
-
}
|
|
531
|
-
/** Add a CSS class or an array of classes to the overlay pane. */
|
|
532
|
-
addPanelClass(classes) {
|
|
533
|
-
this.overlayRef.addPanelClass(classes);
|
|
534
|
-
return this;
|
|
535
|
-
}
|
|
536
|
-
/** Remove a CSS class or an array of classes from the overlay pane. */
|
|
537
|
-
removePanelClass(classes) {
|
|
538
|
-
this.overlayRef.removePanelClass(classes);
|
|
539
|
-
return this;
|
|
540
|
-
}
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
/** Injection token for the Dialog's ScrollStrategy. */
|
|
544
|
-
const DIALOG_SCROLL_STRATEGY = new InjectionToken('DialogScrollStrategy', {
|
|
545
|
-
providedIn: 'root',
|
|
546
|
-
factory: () => {
|
|
547
|
-
const overlay = inject(Overlay);
|
|
548
|
-
return () => overlay.scrollStrategies.block();
|
|
549
|
-
},
|
|
550
|
-
});
|
|
551
|
-
/** Injection token for the Dialog's Data. */
|
|
552
|
-
const DIALOG_DATA = new InjectionToken('DialogData');
|
|
553
|
-
/** Injection token that can be used to provide default options for the dialog module. */
|
|
554
|
-
const DEFAULT_DIALOG_CONFIG = new InjectionToken('DefaultDialogConfig');
|
|
555
|
-
/**
|
|
556
|
-
* @docs-private
|
|
557
|
-
* @deprecated No longer used. To be removed.
|
|
558
|
-
* @breaking-change 19.0.0
|
|
559
|
-
*/
|
|
560
|
-
function DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay) {
|
|
561
|
-
return () => overlay.scrollStrategies.block();
|
|
562
|
-
}
|
|
563
|
-
/**
|
|
564
|
-
* @docs-private
|
|
565
|
-
* @deprecated No longer used. To be removed.
|
|
566
|
-
* @breaking-change 19.0.0
|
|
567
|
-
*/
|
|
568
|
-
const DIALOG_SCROLL_STRATEGY_PROVIDER = {
|
|
569
|
-
provide: DIALOG_SCROLL_STRATEGY,
|
|
570
|
-
deps: [Overlay],
|
|
571
|
-
useFactory: DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY,
|
|
572
|
-
};
|
|
573
|
-
|
|
574
|
-
class Dialog {
|
|
575
|
-
_overlay = inject(Overlay);
|
|
576
|
-
_injector = inject(Injector);
|
|
577
|
-
_defaultOptions = inject(DEFAULT_DIALOG_CONFIG, { optional: true });
|
|
578
|
-
_parentDialog = inject(Dialog, { optional: true, skipSelf: true });
|
|
579
|
-
_overlayContainer = inject(OverlayContainer);
|
|
580
|
-
_idGenerator = inject(_IdGenerator);
|
|
581
|
-
_openDialogsAtThisLevel = [];
|
|
582
|
-
_afterAllClosedAtThisLevel = new Subject();
|
|
583
|
-
_afterOpenedAtThisLevel = new Subject();
|
|
584
|
-
_ariaHiddenElements = new Map();
|
|
585
|
-
_scrollStrategy = inject(DIALOG_SCROLL_STRATEGY);
|
|
586
|
-
/** Keeps track of the currently-open dialogs. */
|
|
587
|
-
get openDialogs() {
|
|
588
|
-
return this._parentDialog ? this._parentDialog.openDialogs : this._openDialogsAtThisLevel;
|
|
589
|
-
}
|
|
590
|
-
/** Stream that emits when a dialog has been opened. */
|
|
591
|
-
get afterOpened() {
|
|
592
|
-
return this._parentDialog ? this._parentDialog.afterOpened : this._afterOpenedAtThisLevel;
|
|
593
|
-
}
|
|
594
|
-
/**
|
|
595
|
-
* Stream that emits when all open dialog have finished closing.
|
|
596
|
-
* Will emit on subscribe if there are no open dialogs to begin with.
|
|
597
|
-
*/
|
|
598
|
-
afterAllClosed = defer(() => this.openDialogs.length
|
|
599
|
-
? this._getAfterAllClosed()
|
|
600
|
-
: this._getAfterAllClosed().pipe(startWith(undefined)));
|
|
601
|
-
constructor() { }
|
|
602
|
-
open(componentOrTemplateRef, config) {
|
|
603
|
-
const defaults = (this._defaultOptions || new DialogConfig());
|
|
604
|
-
config = { ...defaults, ...config };
|
|
605
|
-
config.id = config.id || this._idGenerator.getId('cdk-dialog-');
|
|
606
|
-
if (config.id &&
|
|
607
|
-
this.getDialogById(config.id) &&
|
|
608
|
-
(typeof ngDevMode === 'undefined' || ngDevMode)) {
|
|
609
|
-
throw Error(`Dialog with id "${config.id}" exists already. The dialog id must be unique.`);
|
|
610
|
-
}
|
|
611
|
-
const overlayConfig = this._getOverlayConfig(config);
|
|
612
|
-
const overlayRef = this._overlay.create(overlayConfig);
|
|
613
|
-
const dialogRef = new DialogRef(overlayRef, config);
|
|
614
|
-
const dialogContainer = this._attachContainer(overlayRef, dialogRef, config);
|
|
615
|
-
dialogRef.containerInstance = dialogContainer;
|
|
616
|
-
this._attachDialogContent(componentOrTemplateRef, dialogRef, dialogContainer, config);
|
|
617
|
-
// If this is the first dialog that we're opening, hide all the non-overlay content.
|
|
618
|
-
if (!this.openDialogs.length) {
|
|
619
|
-
this._hideNonDialogContentFromAssistiveTechnology();
|
|
620
|
-
}
|
|
621
|
-
this.openDialogs.push(dialogRef);
|
|
622
|
-
dialogRef.closed.subscribe(() => this._removeOpenDialog(dialogRef, true));
|
|
623
|
-
this.afterOpened.next(dialogRef);
|
|
624
|
-
return dialogRef;
|
|
625
|
-
}
|
|
626
|
-
/**
|
|
627
|
-
* Closes all of the currently-open dialogs.
|
|
628
|
-
*/
|
|
629
|
-
closeAll() {
|
|
630
|
-
reverseForEach(this.openDialogs, dialog => dialog.close());
|
|
631
|
-
}
|
|
632
|
-
/**
|
|
633
|
-
* Finds an open dialog by its id.
|
|
634
|
-
* @param id ID to use when looking up the dialog.
|
|
635
|
-
*/
|
|
636
|
-
getDialogById(id) {
|
|
637
|
-
return this.openDialogs.find(dialog => dialog.id === id);
|
|
638
|
-
}
|
|
639
|
-
ngOnDestroy() {
|
|
640
|
-
// Make one pass over all the dialogs that need to be untracked, but should not be closed. We
|
|
641
|
-
// want to stop tracking the open dialog even if it hasn't been closed, because the tracking
|
|
642
|
-
// determines when `aria-hidden` is removed from elements outside the dialog.
|
|
643
|
-
reverseForEach(this._openDialogsAtThisLevel, dialog => {
|
|
644
|
-
// Check for `false` specifically since we want `undefined` to be interpreted as `true`.
|
|
645
|
-
if (dialog.config.closeOnDestroy === false) {
|
|
646
|
-
this._removeOpenDialog(dialog, false);
|
|
647
|
-
}
|
|
648
|
-
});
|
|
649
|
-
// Make a second pass and close the remaining dialogs. We do this second pass in order to
|
|
650
|
-
// correctly dispatch the `afterAllClosed` event in case we have a mixed array of dialogs
|
|
651
|
-
// that should be closed and dialogs that should not.
|
|
652
|
-
reverseForEach(this._openDialogsAtThisLevel, dialog => dialog.close());
|
|
653
|
-
this._afterAllClosedAtThisLevel.complete();
|
|
654
|
-
this._afterOpenedAtThisLevel.complete();
|
|
655
|
-
this._openDialogsAtThisLevel = [];
|
|
656
|
-
}
|
|
657
|
-
/**
|
|
658
|
-
* Creates an overlay config from a dialog config.
|
|
659
|
-
* @param config The dialog configuration.
|
|
660
|
-
* @returns The overlay configuration.
|
|
661
|
-
*/
|
|
662
|
-
_getOverlayConfig(config) {
|
|
663
|
-
const state = new OverlayConfig({
|
|
664
|
-
positionStrategy: config.positionStrategy ||
|
|
665
|
-
this._overlay.position().global().centerHorizontally().centerVertically(),
|
|
666
|
-
scrollStrategy: config.scrollStrategy || this._scrollStrategy(),
|
|
667
|
-
panelClass: config.panelClass,
|
|
668
|
-
hasBackdrop: config.hasBackdrop,
|
|
669
|
-
direction: config.direction,
|
|
670
|
-
minWidth: config.minWidth,
|
|
671
|
-
minHeight: config.minHeight,
|
|
672
|
-
maxWidth: config.maxWidth,
|
|
673
|
-
maxHeight: config.maxHeight,
|
|
674
|
-
width: config.width,
|
|
675
|
-
height: config.height,
|
|
676
|
-
disposeOnNavigation: config.closeOnNavigation,
|
|
677
|
-
});
|
|
678
|
-
if (config.backdropClass) {
|
|
679
|
-
state.backdropClass = config.backdropClass;
|
|
680
|
-
}
|
|
681
|
-
return state;
|
|
682
|
-
}
|
|
683
|
-
/**
|
|
684
|
-
* Attaches a dialog container to a dialog's already-created overlay.
|
|
685
|
-
* @param overlay Reference to the dialog's underlying overlay.
|
|
686
|
-
* @param config The dialog configuration.
|
|
687
|
-
* @returns A promise resolving to a ComponentRef for the attached container.
|
|
688
|
-
*/
|
|
689
|
-
_attachContainer(overlay, dialogRef, config) {
|
|
690
|
-
const userInjector = config.injector || config.viewContainerRef?.injector;
|
|
691
|
-
const providers = [
|
|
692
|
-
{ provide: DialogConfig, useValue: config },
|
|
693
|
-
{ provide: DialogRef, useValue: dialogRef },
|
|
694
|
-
{ provide: OverlayRef, useValue: overlay },
|
|
695
|
-
];
|
|
696
|
-
let containerType;
|
|
697
|
-
if (config.container) {
|
|
698
|
-
if (typeof config.container === 'function') {
|
|
699
|
-
containerType = config.container;
|
|
700
|
-
}
|
|
701
|
-
else {
|
|
702
|
-
containerType = config.container.type;
|
|
703
|
-
providers.push(...config.container.providers(config));
|
|
704
|
-
}
|
|
705
|
-
}
|
|
706
|
-
else {
|
|
707
|
-
containerType = CdkDialogContainer;
|
|
708
|
-
}
|
|
709
|
-
const containerPortal = new ComponentPortal(containerType, config.viewContainerRef, Injector.create({ parent: userInjector || this._injector, providers }));
|
|
710
|
-
const containerRef = overlay.attach(containerPortal);
|
|
711
|
-
return containerRef.instance;
|
|
712
|
-
}
|
|
713
|
-
/**
|
|
714
|
-
* Attaches the user-provided component to the already-created dialog container.
|
|
715
|
-
* @param componentOrTemplateRef The type of component being loaded into the dialog,
|
|
716
|
-
* or a TemplateRef to instantiate as the content.
|
|
717
|
-
* @param dialogRef Reference to the dialog being opened.
|
|
718
|
-
* @param dialogContainer Component that is going to wrap the dialog content.
|
|
719
|
-
* @param config Configuration used to open the dialog.
|
|
720
|
-
*/
|
|
721
|
-
_attachDialogContent(componentOrTemplateRef, dialogRef, dialogContainer, config) {
|
|
722
|
-
if (componentOrTemplateRef instanceof TemplateRef) {
|
|
723
|
-
const injector = this._createInjector(config, dialogRef, dialogContainer, undefined);
|
|
724
|
-
let context = { $implicit: config.data, dialogRef };
|
|
725
|
-
if (config.templateContext) {
|
|
726
|
-
context = {
|
|
727
|
-
...context,
|
|
728
|
-
...(typeof config.templateContext === 'function'
|
|
729
|
-
? config.templateContext()
|
|
730
|
-
: config.templateContext),
|
|
731
|
-
};
|
|
732
|
-
}
|
|
733
|
-
dialogContainer.attachTemplatePortal(new TemplatePortal(componentOrTemplateRef, null, context, injector));
|
|
734
|
-
}
|
|
735
|
-
else {
|
|
736
|
-
const injector = this._createInjector(config, dialogRef, dialogContainer, this._injector);
|
|
737
|
-
const contentRef = dialogContainer.attachComponentPortal(new ComponentPortal(componentOrTemplateRef, config.viewContainerRef, injector));
|
|
738
|
-
dialogRef.componentRef = contentRef;
|
|
739
|
-
dialogRef.componentInstance = contentRef.instance;
|
|
740
|
-
}
|
|
741
|
-
}
|
|
742
|
-
/**
|
|
743
|
-
* Creates a custom injector to be used inside the dialog. This allows a component loaded inside
|
|
744
|
-
* of a dialog to close itself and, optionally, to return a value.
|
|
745
|
-
* @param config Config object that is used to construct the dialog.
|
|
746
|
-
* @param dialogRef Reference to the dialog being opened.
|
|
747
|
-
* @param dialogContainer Component that is going to wrap the dialog content.
|
|
748
|
-
* @param fallbackInjector Injector to use as a fallback when a lookup fails in the custom
|
|
749
|
-
* dialog injector, if the user didn't provide a custom one.
|
|
750
|
-
* @returns The custom injector that can be used inside the dialog.
|
|
751
|
-
*/
|
|
752
|
-
_createInjector(config, dialogRef, dialogContainer, fallbackInjector) {
|
|
753
|
-
const userInjector = config.injector || config.viewContainerRef?.injector;
|
|
754
|
-
const providers = [
|
|
755
|
-
{ provide: DIALOG_DATA, useValue: config.data },
|
|
756
|
-
{ provide: DialogRef, useValue: dialogRef },
|
|
757
|
-
];
|
|
758
|
-
if (config.providers) {
|
|
759
|
-
if (typeof config.providers === 'function') {
|
|
760
|
-
providers.push(...config.providers(dialogRef, config, dialogContainer));
|
|
761
|
-
}
|
|
762
|
-
else {
|
|
763
|
-
providers.push(...config.providers);
|
|
764
|
-
}
|
|
765
|
-
}
|
|
766
|
-
if (config.direction &&
|
|
767
|
-
(!userInjector ||
|
|
768
|
-
!userInjector.get(Directionality, null, { optional: true }))) {
|
|
769
|
-
providers.push({
|
|
770
|
-
provide: Directionality,
|
|
771
|
-
useValue: { value: config.direction, change: of() },
|
|
772
|
-
});
|
|
773
|
-
}
|
|
774
|
-
return Injector.create({ parent: userInjector || fallbackInjector, providers });
|
|
775
|
-
}
|
|
776
|
-
/**
|
|
777
|
-
* Removes a dialog from the array of open dialogs.
|
|
778
|
-
* @param dialogRef Dialog to be removed.
|
|
779
|
-
* @param emitEvent Whether to emit an event if this is the last dialog.
|
|
780
|
-
*/
|
|
781
|
-
_removeOpenDialog(dialogRef, emitEvent) {
|
|
782
|
-
const index = this.openDialogs.indexOf(dialogRef);
|
|
783
|
-
if (index > -1) {
|
|
784
|
-
this.openDialogs.splice(index, 1);
|
|
785
|
-
// If all the dialogs were closed, remove/restore the `aria-hidden`
|
|
786
|
-
// to a the siblings and emit to the `afterAllClosed` stream.
|
|
787
|
-
if (!this.openDialogs.length) {
|
|
788
|
-
this._ariaHiddenElements.forEach((previousValue, element) => {
|
|
789
|
-
if (previousValue) {
|
|
790
|
-
element.setAttribute('aria-hidden', previousValue);
|
|
791
|
-
}
|
|
792
|
-
else {
|
|
793
|
-
element.removeAttribute('aria-hidden');
|
|
794
|
-
}
|
|
795
|
-
});
|
|
796
|
-
this._ariaHiddenElements.clear();
|
|
797
|
-
if (emitEvent) {
|
|
798
|
-
this._getAfterAllClosed().next();
|
|
799
|
-
}
|
|
800
|
-
}
|
|
801
|
-
}
|
|
802
|
-
}
|
|
803
|
-
/** Hides all of the content that isn't an overlay from assistive technology. */
|
|
804
|
-
_hideNonDialogContentFromAssistiveTechnology() {
|
|
805
|
-
const overlayContainer = this._overlayContainer.getContainerElement();
|
|
806
|
-
// Ensure that the overlay container is attached to the DOM.
|
|
807
|
-
if (overlayContainer.parentElement) {
|
|
808
|
-
const siblings = overlayContainer.parentElement.children;
|
|
809
|
-
for (let i = siblings.length - 1; i > -1; i--) {
|
|
810
|
-
const sibling = siblings[i];
|
|
811
|
-
if (sibling !== overlayContainer &&
|
|
812
|
-
sibling.nodeName !== 'SCRIPT' &&
|
|
813
|
-
sibling.nodeName !== 'STYLE' &&
|
|
814
|
-
!sibling.hasAttribute('aria-live')) {
|
|
815
|
-
this._ariaHiddenElements.set(sibling, sibling.getAttribute('aria-hidden'));
|
|
816
|
-
sibling.setAttribute('aria-hidden', 'true');
|
|
817
|
-
}
|
|
818
|
-
}
|
|
819
|
-
}
|
|
820
|
-
}
|
|
821
|
-
_getAfterAllClosed() {
|
|
822
|
-
const parent = this._parentDialog;
|
|
823
|
-
return parent ? parent._getAfterAllClosed() : this._afterAllClosedAtThisLevel;
|
|
824
|
-
}
|
|
825
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: Dialog, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
826
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: Dialog, providedIn: 'root' });
|
|
827
|
-
}
|
|
828
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: Dialog, decorators: [{
|
|
829
|
-
type: Injectable,
|
|
830
|
-
args: [{ providedIn: 'root' }]
|
|
831
|
-
}], ctorParameters: () => [] });
|
|
832
|
-
/**
|
|
833
|
-
* Executes a callback against all elements in an array while iterating in reverse.
|
|
834
|
-
* Useful if the array is being modified as it is being iterated.
|
|
835
|
-
*/
|
|
836
|
-
function reverseForEach(items, callback) {
|
|
837
|
-
let i = items.length;
|
|
838
|
-
while (i--) {
|
|
839
|
-
callback(items[i]);
|
|
840
|
-
}
|
|
841
|
-
}
|
|
842
|
-
|
|
843
|
-
class DialogModule {
|
|
844
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: DialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
845
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.6", ngImport: i0, type: DialogModule, imports: [OverlayModule, PortalModule, A11yModule, CdkDialogContainer], exports: [
|
|
846
|
-
// Re-export the PortalModule so that people extending the `CdkDialogContainer`
|
|
847
|
-
// don't have to remember to import it or be faced with an unhelpful error.
|
|
848
|
-
PortalModule,
|
|
849
|
-
CdkDialogContainer] });
|
|
850
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: DialogModule, providers: [Dialog], imports: [OverlayModule, PortalModule, A11yModule,
|
|
851
|
-
// Re-export the PortalModule so that people extending the `CdkDialogContainer`
|
|
852
|
-
// don't have to remember to import it or be faced with an unhelpful error.
|
|
853
|
-
PortalModule] });
|
|
854
|
-
}
|
|
855
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: DialogModule, decorators: [{
|
|
856
|
-
type: NgModule,
|
|
857
|
-
args: [{
|
|
858
|
-
imports: [OverlayModule, PortalModule, A11yModule, CdkDialogContainer],
|
|
859
|
-
exports: [
|
|
860
|
-
// Re-export the PortalModule so that people extending the `CdkDialogContainer`
|
|
861
|
-
// don't have to remember to import it or be faced with an unhelpful error.
|
|
862
|
-
PortalModule,
|
|
863
|
-
CdkDialogContainer,
|
|
864
|
-
],
|
|
865
|
-
providers: [Dialog],
|
|
866
|
-
}]
|
|
867
|
-
}] });
|
|
868
|
-
|
|
869
|
-
export { CdkDialogContainer, DEFAULT_DIALOG_CONFIG, DIALOG_DATA, DIALOG_SCROLL_STRATEGY, DIALOG_SCROLL_STRATEGY_PROVIDER, DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY, Dialog, DialogConfig, DialogModule, DialogRef, throwDialogContentAlreadyAttachedError, CdkPortalOutlet as ɵɵCdkPortalOutlet };
|
|
870
|
-
//# sourceMappingURL=dialog.mjs.map
|