@natec/mef-dev-ui-kit 20.0.0-beta.1 → 20.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/natec-mef-dev-ui-kit.mjs +9541 -0
- package/fesm2022/natec-mef-dev-ui-kit.mjs.map +1 -0
- package/index.d.ts +4418 -0
- package/index.d.ts.map +1 -0
- package/package.json +44 -48
- package/src/lib/styles/core.scss +51 -195
- package/src/lib/styles/pg/modules/_typography.scss +1 -8
- package/src/lib/styles/pg/vendor/ng-datatable.scss +7 -0
- package/src/lib/styles/vars.scss +8 -8
- package/documentation/classes/FiltredItemModel.html +0 -358
- package/documentation/classes/TabChangeEvent.html +0 -231
- package/documentation/components/CardComponent.html +0 -576
- package/documentation/components/CardLongComponent.html +0 -712
- package/documentation/components/CardSimpleComponent.html +0 -372
- package/documentation/components/CentralPageComponent.html +0 -312
- package/documentation/components/CentralPageRowComponent.html +0 -244
- package/documentation/components/CollapseComponent.html +0 -755
- package/documentation/components/CollapseSetComponent.html +0 -767
- package/documentation/components/DatepickerComponent.html +0 -1397
- package/documentation/components/FillComponent.html +0 -736
- package/documentation/components/FilteredFieldContainerComponent.html +0 -513
- package/documentation/components/FilteredFieldItemComponent.html +0 -451
- package/documentation/components/HelpBlockComponent.html +0 -398
- package/documentation/components/ManagePageComponent.html +0 -423
- package/documentation/components/MefDevOptionComponent.html +0 -689
- package/documentation/components/MefDevProgressComponent.html +0 -562
- package/documentation/components/MefDevSelectComponent.html +0 -4797
- package/documentation/components/MefDevSliderComponent.html +0 -686
- package/documentation/components/MefDevSpecFlowTestComponent.html +0 -474
- package/documentation/components/MefDevSwitchComponent.html +0 -1480
- package/documentation/components/MefDevTabBodyComponent.html +0 -271
- package/documentation/components/MefDevTabComponent.html +0 -681
- package/documentation/components/MefDevTabSetComponent.html +0 -1889
- package/documentation/components/MefDevTabsNavComponent.html +0 -2013
- package/documentation/components/MefdevExecutorPageComponent.html +0 -497
- package/documentation/components/ProfileComponent.html +0 -608
- package/documentation/components/RightFilterComponent.html +0 -423
- package/documentation/components/SlideRightComponent.html +0 -762
- package/documentation/components/SlideUpComponent.html +0 -692
- package/documentation/components/StepExecutorComponent.html +0 -1437
- package/documentation/components/TablePageComponent.html +0 -327
- package/documentation/dependencies.html +0 -135
- package/documentation/directives/MefDevTabLabelDirective.html +0 -532
- package/documentation/directives/MefDevTabsInkBarDirective.html +0 -865
- package/documentation/fonts/ionicons.eot +0 -0
- package/documentation/fonts/ionicons.svg +0 -2090
- package/documentation/fonts/ionicons.ttf +0 -0
- package/documentation/fonts/ionicons.woff +0 -0
- package/documentation/fonts/ionicons.woff2 +0 -0
- package/documentation/fonts/roboto-v15-latin-300.eot +0 -0
- package/documentation/fonts/roboto-v15-latin-300.svg +0 -314
- package/documentation/fonts/roboto-v15-latin-300.ttf +0 -0
- package/documentation/fonts/roboto-v15-latin-300.woff +0 -0
- package/documentation/fonts/roboto-v15-latin-300.woff2 +0 -0
- package/documentation/fonts/roboto-v15-latin-700.eot +0 -0
- package/documentation/fonts/roboto-v15-latin-700.svg +0 -310
- package/documentation/fonts/roboto-v15-latin-700.ttf +0 -0
- package/documentation/fonts/roboto-v15-latin-700.woff +0 -0
- package/documentation/fonts/roboto-v15-latin-700.woff2 +0 -0
- package/documentation/fonts/roboto-v15-latin-italic.eot +0 -0
- package/documentation/fonts/roboto-v15-latin-italic.svg +0 -323
- package/documentation/fonts/roboto-v15-latin-italic.ttf +0 -0
- package/documentation/fonts/roboto-v15-latin-italic.woff +0 -0
- package/documentation/fonts/roboto-v15-latin-italic.woff2 +0 -0
- package/documentation/fonts/roboto-v15-latin-regular.eot +0 -0
- package/documentation/fonts/roboto-v15-latin-regular.svg +0 -308
- package/documentation/fonts/roboto-v15-latin-regular.ttf +0 -0
- package/documentation/fonts/roboto-v15-latin-regular.woff +0 -0
- package/documentation/fonts/roboto-v15-latin-regular.woff2 +0 -0
- package/documentation/graph/dependencies.svg +0 -1160
- package/documentation/images/compodoc-vectorise-inverted.png +0 -0
- package/documentation/images/compodoc-vectorise-inverted.svg +0 -201
- package/documentation/images/compodoc-vectorise.png +0 -0
- package/documentation/images/compodoc-vectorise.svg +0 -201
- package/documentation/images/favicon.ico +0 -0
- package/documentation/index.html +0 -246
- package/documentation/injectables/FilteredFieldService.html +0 -420
- package/documentation/injectables/ProgressConfig.html +0 -236
- package/documentation/interfaces/AnimatedInterface.html +0 -246
- package/documentation/js/compodoc.js +0 -14
- package/documentation/js/lazy-load-graphs.js +0 -44
- package/documentation/js/libs/EventDispatcher.js +0 -5
- package/documentation/js/libs/bootstrap-native.js +0 -1
- package/documentation/js/libs/clipboard.min.js +0 -7
- package/documentation/js/libs/custom-elements-es5-adapter.js +0 -15
- package/documentation/js/libs/custom-elements.min.js +0 -38
- package/documentation/js/libs/d3.v3.min.js +0 -2
- package/documentation/js/libs/deep-iterator.js +0 -2
- package/documentation/js/libs/es6-shim.min.js +0 -11
- package/documentation/js/libs/htmlparser.js +0 -23
- package/documentation/js/libs/innersvg.js +0 -9
- package/documentation/js/libs/lit-html.js +0 -1
- package/documentation/js/libs/prism.js +0 -46
- package/documentation/js/libs/promise.min.js +0 -6
- package/documentation/js/libs/svg-pan-zoom.min.js +0 -3
- package/documentation/js/libs/tablesort.min.js +0 -6
- package/documentation/js/libs/tablesort.number.min.js +0 -6
- package/documentation/js/libs/vis.min.js +0 -47
- package/documentation/js/libs/zepto.min.js +0 -2
- package/documentation/js/menu-wc.js +0 -455
- package/documentation/js/menu-wc_es5.js +0 -42
- package/documentation/js/menu.js +0 -325
- package/documentation/js/routes.js +0 -301
- package/documentation/js/search/lunr.min.js +0 -6
- package/documentation/js/search/search-lunr.js +0 -67
- package/documentation/js/search/search.js +0 -268
- package/documentation/js/search/search_index.js +0 -4
- package/documentation/js/sourceCode.js +0 -58
- package/documentation/js/svg-pan-zoom.controls.js +0 -53
- package/documentation/js/tabs.js +0 -21
- package/documentation/js/tree.js +0 -147
- package/documentation/miscellaneous/enumerations.html +0 -223
- package/documentation/miscellaneous/functions.html +0 -251
- package/documentation/miscellaneous/typealiases.html +0 -257
- package/documentation/miscellaneous/variables.html +0 -357
- package/documentation/modules/MefDevCardModule/dependencies.svg +0 -142
- package/documentation/modules/MefDevCardModule.html +0 -349
- package/documentation/modules/MefDevCollapseModule/dependencies.svg +0 -90
- package/documentation/modules/MefDevCollapseModule.html +0 -316
- package/documentation/modules/MefDevDatepickerModule/dependencies.svg +0 -82
- package/documentation/modules/MefDevDatepickerModule.html +0 -274
- package/documentation/modules/MefDevFilteredFieldModule/dependencies.svg +0 -90
- package/documentation/modules/MefDevFilteredFieldModule.html +0 -278
- package/documentation/modules/MefDevHelpBlockModule/dependencies.svg +0 -82
- package/documentation/modules/MefDevHelpBlockModule.html +0 -274
- package/documentation/modules/MefDevModalModule/dependencies.svg +0 -154
- package/documentation/modules/MefDevModalModule.html +0 -364
- package/documentation/modules/MefDevPageLayoutsModule/dependencies.svg +0 -162
- package/documentation/modules/MefDevPageLayoutsModule.html +0 -368
- package/documentation/modules/MefDevProgressModule/dependencies.svg +0 -66
- package/documentation/modules/MefDevProgressModule.html +0 -286
- package/documentation/modules/MefDevSelectModule/dependencies.svg +0 -140
- package/documentation/modules/MefDevSelectModule.html +0 -334
- package/documentation/modules/MefDevSliderModule/dependencies.svg +0 -66
- package/documentation/modules/MefDevSliderModule.html +0 -248
- package/documentation/modules/MefDevSpecFlowTestModule/dependencies.svg +0 -66
- package/documentation/modules/MefDevSpecFlowTestModule.html +0 -286
- package/documentation/modules/MefDevStepExecutorModule/dependencies.svg +0 -106
- package/documentation/modules/MefDevStepExecutorModule.html +0 -304
- package/documentation/modules/MefDevSwitchModule/dependencies.svg +0 -88
- package/documentation/modules/MefDevSwitchModule.html +0 -270
- package/documentation/modules/MefDevTabsModule/dependencies.svg +0 -186
- package/documentation/modules/MefDevTabsModule.html +0 -398
- package/documentation/modules.html +0 -357
- package/documentation/overview.html +0 -1351
- package/documentation/pipes/OptionPipe.html +0 -238
- package/documentation/properties.html +0 -125
- package/documentation/styles/bootstrap-card.css +0 -219
- package/documentation/styles/bootstrap.min.css +0 -6
- package/documentation/styles/compodoc.css +0 -1121
- package/documentation/styles/dark.css +0 -121
- package/documentation/styles/ionicons.min.css +0 -11
- package/documentation/styles/laravel.css +0 -113
- package/documentation/styles/material.css +0 -131
- package/documentation/styles/original.css +0 -51
- package/documentation/styles/postmark.css +0 -238
- package/documentation/styles/prism.css +0 -301
- package/documentation/styles/readthedocs.css +0 -117
- package/documentation/styles/reset.css +0 -129
- package/documentation/styles/stripe.css +0 -106
- package/documentation/styles/style.css +0 -7
- package/documentation/styles/tablesort.css +0 -33
- package/documentation/styles/vagrant.css +0 -130
- package/karma.conf.js +0 -44
- package/ng-package.json +0 -18
- package/src/lib/markup-kit/card/card/card.component.html +0 -44
- package/src/lib/markup-kit/card/card/card.component.scss +0 -65
- package/src/lib/markup-kit/card/card/card.component.ts +0 -109
- package/src/lib/markup-kit/card/card-long/card-long.component.html +0 -53
- package/src/lib/markup-kit/card/card-long/card-long.component.scss +0 -72
- package/src/lib/markup-kit/card/card-long/card-long.component.ts +0 -158
- package/src/lib/markup-kit/card/card-long/cart-type-colors.enum.ts +0 -5
- package/src/lib/markup-kit/card/card-simple/card-simple.component.html +0 -12
- package/src/lib/markup-kit/card/card-simple/card-simple.component.scss +0 -12
- package/src/lib/markup-kit/card/card-simple/card-simple.component.ts +0 -48
- package/src/lib/markup-kit/card/card.module.ts +0 -21
- package/src/lib/markup-kit/card/index.ts +0 -6
- package/src/lib/markup-kit/collapse/collapse/collapse.component.html +0 -17
- package/src/lib/markup-kit/collapse/collapse/collapse.component.scss +0 -17
- package/src/lib/markup-kit/collapse/collapse/collapse.component.ts +0 -131
- package/src/lib/markup-kit/collapse/collapse-set/collapse-set.component.html +0 -3
- package/src/lib/markup-kit/collapse/collapse-set/collapse-set.component.scss +0 -0
- package/src/lib/markup-kit/collapse/collapse-set/collapse-set.component.ts +0 -110
- package/src/lib/markup-kit/collapse/collapse.module.ts +0 -20
- package/src/lib/markup-kit/collapse/index.ts +0 -3
- package/src/lib/markup-kit/executors/index.ts +0 -4
- package/src/lib/markup-kit/executors/mefdev-executor-page/mefdev-executor-page.component.ts +0 -111
- package/src/lib/markup-kit/executors/stage/stage.component.html +0 -23
- package/src/lib/markup-kit/executors/stage/stage.component.scss +0 -9
- package/src/lib/markup-kit/executors/stage/stage.component.ts +0 -21
- package/src/lib/markup-kit/executors/step-executor/step-executor.component.html +0 -127
- package/src/lib/markup-kit/executors/step-executor/step-executor.component.scss +0 -225
- package/src/lib/markup-kit/executors/step-executor/step-executor.component.ts +0 -295
- package/src/lib/markup-kit/executors/step-executor.module.ts +0 -27
- package/src/lib/markup-kit/modals/fill/fill.component.html +0 -15
- package/src/lib/markup-kit/modals/fill/fill.component.scss +0 -42
- package/src/lib/markup-kit/modals/fill/fill.component.ts +0 -126
- package/src/lib/markup-kit/modals/index.ts +0 -6
- package/src/lib/markup-kit/modals/markup-kit.module.ts +0 -25
- package/src/lib/markup-kit/modals/modal-size.enum.ts +0 -5
- package/src/lib/markup-kit/modals/right-filter/right-filter.component.html +0 -11
- package/src/lib/markup-kit/modals/right-filter/right-filter.component.scss +0 -15
- package/src/lib/markup-kit/modals/right-filter/right-filter.component.ts +0 -49
- package/src/lib/markup-kit/modals/slide-right/slide-right.component.html +0 -14
- package/src/lib/markup-kit/modals/slide-right/slide-right.component.scss +0 -42
- package/src/lib/markup-kit/modals/slide-right/slide-right.component.ts +0 -121
- package/src/lib/markup-kit/modals/slide-up/slide-up.component.html +0 -15
- package/src/lib/markup-kit/modals/slide-up/slide-up.component.scss +0 -47
- package/src/lib/markup-kit/modals/slide-up/slide-up.component.ts +0 -105
- package/src/lib/markup-kit/page-layouts/central-page/central-page.component.html +0 -6
- package/src/lib/markup-kit/page-layouts/central-page/central-page.component.scss +0 -10
- package/src/lib/markup-kit/page-layouts/central-page/central-page.component.ts +0 -58
- package/src/lib/markup-kit/page-layouts/central-page-row/central-page-row.component.html +0 -3
- package/src/lib/markup-kit/page-layouts/central-page-row/central-page-row.component.scss +0 -5
- package/src/lib/markup-kit/page-layouts/central-page-row/central-page-row.component.ts +0 -30
- package/src/lib/markup-kit/page-layouts/index.ts +0 -6
- package/src/lib/markup-kit/page-layouts/manage-page/manage-page.component.html +0 -10
- package/src/lib/markup-kit/page-layouts/manage-page/manage-page.component.scss +0 -33
- package/src/lib/markup-kit/page-layouts/manage-page/manage-page.component.ts +0 -70
- package/src/lib/markup-kit/page-layouts/page-layouts.module.ts +0 -26
- package/src/lib/markup-kit/page-layouts/profile/profile.component.html +0 -31
- package/src/lib/markup-kit/page-layouts/profile/profile.component.scss +0 -99
- package/src/lib/markup-kit/page-layouts/profile/profile.component.ts +0 -129
- package/src/lib/markup-kit/page-layouts/table-page/table-page.component.html +0 -9
- package/src/lib/markup-kit/page-layouts/table-page/table-page.component.scss +0 -0
- package/src/lib/markup-kit/page-layouts/table-page/table-page.component.ts +0 -42
- package/src/lib/markup-kit/slider/index.ts +0 -2
- package/src/lib/markup-kit/slider/slider/slider.component.html +0 -11
- package/src/lib/markup-kit/slider/slider/slider.component.scss +0 -106
- package/src/lib/markup-kit/slider/slider/slider.component.ts +0 -124
- package/src/lib/markup-kit/slider/slider.module.ts +0 -20
- package/src/lib/markup-kit/utils/datepicker/datepicker/datepicker.component.html +0 -87
- package/src/lib/markup-kit/utils/datepicker/datepicker/datepicker.component.scss +0 -132
- package/src/lib/markup-kit/utils/datepicker/datepicker/datepicker.component.ts +0 -643
- package/src/lib/markup-kit/utils/datepicker/datepicker.module.ts +0 -15
- package/src/lib/markup-kit/utils/datepicker/index.ts +0 -2
- package/src/lib/markup-kit/utils/filtered-field/filtered-field-container/filtered-field-container.component.html +0 -3
- package/src/lib/markup-kit/utils/filtered-field/filtered-field-container/filtered-field-container.component.scss +0 -4
- package/src/lib/markup-kit/utils/filtered-field/filtered-field-container/filtered-field-container.component.ts +0 -79
- package/src/lib/markup-kit/utils/filtered-field/filtered-field-item/filtered-field-item.component.html +0 -4
- package/src/lib/markup-kit/utils/filtered-field/filtered-field-item/filtered-field-item.component.scss +0 -12
- package/src/lib/markup-kit/utils/filtered-field/filtered-field-item/filtered-field-item.component.ts +0 -75
- package/src/lib/markup-kit/utils/filtered-field/filtered-field.module.ts +0 -19
- package/src/lib/markup-kit/utils/filtered-field/filtered-field.service.ts +0 -44
- package/src/lib/markup-kit/utils/filtered-field/filtred-item.model.ts +0 -15
- package/src/lib/markup-kit/utils/filtered-field/index.ts +0 -5
- package/src/lib/markup-kit/utils/help-block/help-block.component.html +0 -19
- package/src/lib/markup-kit/utils/help-block/help-block.component.scss +0 -22
- package/src/lib/markup-kit/utils/help-block/help-block.component.ts +0 -70
- package/src/lib/markup-kit/utils/help-block/hepl-block.module.ts +0 -14
- package/src/lib/markup-kit/utils/help-block/index.ts +0 -2
- package/src/lib/pg-components/card/card.components.html +0 -66
- package/src/lib/pg-components/card/card.components.ts +0 -451
- package/src/lib/pg-components/card/card.module.ts +0 -17
- package/src/lib/pg-components/card/index.ts +0 -2
- package/src/lib/pg-components/progress/index.ts +0 -3
- package/src/lib/pg-components/progress/progress.component.html +0 -28
- package/src/lib/pg-components/progress/progress.component.ts +0 -73
- package/src/lib/pg-components/progress/progress.config.ts +0 -7
- package/src/lib/pg-components/progress/progress.module.ts +0 -16
- package/src/lib/pg-components/select/index.ts +0 -4
- package/src/lib/pg-components/select/option.component.html +0 -1
- package/src/lib/pg-components/select/option.component.ts +0 -105
- package/src/lib/pg-components/select/option.pipe.ts +0 -44
- package/src/lib/pg-components/select/select.component.html +0 -83
- package/src/lib/pg-components/select/select.component.ts +0 -814
- package/src/lib/pg-components/select/select.module.ts +0 -14
- package/src/lib/pg-components/spec-flow-test/index.ts +0 -2
- package/src/lib/pg-components/spec-flow-test/spec-flow-test/spec-flow-test.component.html +0 -6
- package/src/lib/pg-components/spec-flow-test/spec-flow-test/spec-flow-test.component.scss +0 -0
- package/src/lib/pg-components/spec-flow-test/spec-flow-test/spec-flow-test.component.ts +0 -37
- package/src/lib/pg-components/spec-flow-test/spec-flow-test.module.ts +0 -18
- package/src/lib/pg-components/switch/index.ts +0 -2
- package/src/lib/pg-components/switch/switch.component.html +0 -10
- package/src/lib/pg-components/switch/switch.component.ts +0 -286
- package/src/lib/pg-components/switch/switch.module.ts +0 -11
- package/src/lib/pg-components/tabs/index.ts +0 -7
- package/src/lib/pg-components/tabs/tab-body.component.html +0 -1
- package/src/lib/pg-components/tabs/tab-body.component.ts +0 -17
- package/src/lib/pg-components/tabs/tab-label.directive.ts +0 -41
- package/src/lib/pg-components/tabs/tab.component.html +0 -3
- package/src/lib/pg-components/tabs/tab.component.ts +0 -109
- package/src/lib/pg-components/tabs/tabs-ink-bar.directive.ts +0 -78
- package/src/lib/pg-components/tabs/tabs-nav.component.html +0 -20
- package/src/lib/pg-components/tabs/tabs-nav.component.ts +0 -324
- package/src/lib/pg-components/tabs/tabs.module.ts +0 -15
- package/src/lib/pg-components/tabs/tabset.component.html +0 -39
- package/src/lib/pg-components/tabs/tabset.component.ts +0 -270
- package/src/lib/pg-components/util/convert.ts +0 -3
- package/src/lib/pg-components/util/request-animation.ts +0 -31
- package/src/lib/v2/autocomplete/autocomplete-origin.ts +0 -12
- package/src/lib/v2/autocomplete/autocomplete.html +0 -17
- package/src/lib/v2/autocomplete/autocomplete.module.ts +0 -28
- package/src/lib/v2/autocomplete/autocomplete.scss +0 -62
- package/src/lib/v2/autocomplete/autocomplete.trigger.ts +0 -759
- package/src/lib/v2/autocomplete/autocomplete.ts +0 -201
- package/src/lib/v2/autocomplete/index.ts +0 -1
- package/src/lib/v2/card/card-header.html +0 -9
- package/src/lib/v2/card/card-title-group.html +0 -15
- package/src/lib/v2/card/card.html +0 -1
- package/src/lib/v2/card/card.module.ts +0 -40
- package/src/lib/v2/card/card.scss +0 -185
- package/src/lib/v2/card/card.ts +0 -274
- package/src/lib/v2/card/index.ts +0 -2
- package/src/lib/v2/checkbox/checkbox.html +0 -38
- package/src/lib/v2/checkbox/checkbox.module.ts +0 -8
- package/src/lib/v2/checkbox/checkbox.scss +0 -318
- package/src/lib/v2/checkbox/checkbox.ts +0 -507
- package/src/lib/v2/checkbox/index.ts +0 -1
- package/src/lib/v2/chips/chip-action.ts +0 -102
- package/src/lib/v2/chips/chip-edit-input.ts +0 -44
- package/src/lib/v2/chips/chip-grid.ts +0 -412
- package/src/lib/v2/chips/chip-icons.ts +0 -91
- package/src/lib/v2/chips/chip-input.ts +0 -208
- package/src/lib/v2/chips/chip-listbox.ts +0 -291
- package/src/lib/v2/chips/chip-option.html +0 -37
- package/src/lib/v2/chips/chip-option.ts +0 -163
- package/src/lib/v2/chips/chip-row.html +0 -42
- package/src/lib/v2/chips/chip-row.ts +0 -191
- package/src/lib/v2/chips/chip-set.scss +0 -86
- package/src/lib/v2/chips/chip-set.ts +0 -261
- package/src/lib/v2/chips/chip-text-control.ts +0 -15
- package/src/lib/v2/chips/chip.html +0 -21
- package/src/lib/v2/chips/chip.scss +0 -646
- package/src/lib/v2/chips/chip.ts +0 -281
- package/src/lib/v2/chips/chips-module.ts +0 -44
- package/src/lib/v2/chips/index.ts +0 -12
- package/src/lib/v2/chips/tokens.ts +0 -29
- package/src/lib/v2/collapse/accordion-base.ts +0 -20
- package/src/lib/v2/collapse/accordion.ts +0 -92
- package/src/lib/v2/collapse/collapse.module.ts +0 -22
- package/src/lib/v2/collapse/expansion-panel-base.ts +0 -10
- package/src/lib/v2/collapse/expansion-panel-content.ts +0 -12
- package/src/lib/v2/collapse/expansion-panel-header.html +0 -17
- package/src/lib/v2/collapse/expansion-panel-header.scss +0 -165
- package/src/lib/v2/collapse/expansion-panel-header.ts +0 -237
- package/src/lib/v2/collapse/expansion-panel.html +0 -14
- package/src/lib/v2/collapse/expansion-panel.scss +0 -113
- package/src/lib/v2/collapse/expansion-panel.ts +0 -279
- package/src/lib/v2/collapse/index.ts +0 -7
- package/src/lib/v2/executors/index.ts +0 -10
- package/src/lib/v2/executors/step-content.ts +0 -19
- package/src/lib/v2/executors/step-footer.ts +0 -7
- package/src/lib/v2/executors/step-header.html +0 -59
- package/src/lib/v2/executors/step-header.scss +0 -205
- package/src/lib/v2/executors/step-header.ts +0 -151
- package/src/lib/v2/executors/step-label.ts +0 -16
- package/src/lib/v2/executors/step.html +0 -4
- package/src/lib/v2/executors/stepper-button.ts +0 -40
- package/src/lib/v2/executors/stepper-icon.ts +0 -42
- package/src/lib/v2/executors/stepper-intl.ts +0 -46
- package/src/lib/v2/executors/stepper-module.ts +0 -42
- package/src/lib/v2/executors/stepper.html +0 -90
- package/src/lib/v2/executors/stepper.scss +0 -299
- package/src/lib/v2/executors/stepper.ts +0 -360
- package/src/lib/v2/modals/dialog-config.ts +0 -56
- package/src/lib/v2/modals/dialog-container.html +0 -5
- package/src/lib/v2/modals/dialog-container.ts +0 -243
- package/src/lib/v2/modals/dialog-content-directives.ts +0 -217
- package/src/lib/v2/modals/dialog-ref.ts +0 -242
- package/src/lib/v2/modals/dialog.scss +0 -307
- package/src/lib/v2/modals/dialog.ts +0 -239
- package/src/lib/v2/modals/index.ts +0 -11
- package/src/lib/v2/modals/modal-module.ts +0 -23
- package/src/lib/v2/radio-button/public-api.ts +0 -2
- package/src/lib/v2/radio-button/radio.html +0 -25
- package/src/lib/v2/radio-button/radio.module.ts +0 -8
- package/src/lib/v2/radio-button/radio.scss +0 -298
- package/src/lib/v2/radio-button/radio.ts +0 -640
- package/src/lib/v2/select/index.ts +0 -5
- package/src/lib/v2/select/option-group.html +0 -9
- package/src/lib/v2/select/option-group.scss +0 -33
- package/src/lib/v2/select/option-group.ts +0 -66
- package/src/lib/v2/select/option-module.ts +0 -11
- package/src/lib/v2/select/option.html +0 -22
- package/src/lib/v2/select/option.scss +0 -59
- package/src/lib/v2/select/option.ts +0 -288
- package/src/lib/v2/select/pseudo-checkbox-module.ts +0 -9
- package/src/lib/v2/select/pseudo-checkbox.scss +0 -121
- package/src/lib/v2/select/pseudo-checkbox.ts +0 -60
- package/src/lib/v2/select/select.html +0 -56
- package/src/lib/v2/select/select.module.ts +0 -14
- package/src/lib/v2/select/select.scss +0 -118
- package/src/lib/v2/select/select.ts +0 -824
- package/src/lib/v2/switch/base-editor-helper.ts +0 -148
- package/src/lib/v2/switch/index.ts +0 -2
- package/src/lib/v2/switch/switch.component.html +0 -15
- package/src/lib/v2/switch/switch.component.scss +0 -93
- package/src/lib/v2/switch/switch.component.ts +0 -203
- package/src/lib/v2/switch/switch.module.ts +0 -10
- package/src/lib/v2/tabs/config.ts +0 -94
- package/src/lib/v2/tabs/index.ts +0 -28
- package/src/lib/v2/tabs/ink-bar.ts +0 -226
- package/src/lib/v2/tabs/paginated-tab-header.ts +0 -536
- package/src/lib/v2/tabs/tab-body.html +0 -9
- package/src/lib/v2/tabs/tab-body.scss +0 -60
- package/src/lib/v2/tabs/tab-body.ts +0 -310
- package/src/lib/v2/tabs/tab-content.ts +0 -12
- package/src/lib/v2/tabs/tab-group.html +0 -74
- package/src/lib/v2/tabs/tab-group.scss +0 -362
- package/src/lib/v2/tabs/tab-group.ts +0 -491
- package/src/lib/v2/tabs/tab-header.html +0 -35
- package/src/lib/v2/tabs/tab-header.scss +0 -127
- package/src/lib/v2/tabs/tab-header.ts +0 -91
- package/src/lib/v2/tabs/tab-label-wrapper.ts +0 -49
- package/src/lib/v2/tabs/tab-label.ts +0 -34
- package/src/lib/v2/tabs/tab.html +0 -1
- package/src/lib/v2/tabs/tab.ts +0 -155
- package/src/lib/v2/tabs/tabs.module.ts +0 -12
- package/src/public-api.ts +0 -33
- package/tsconfig.doc.json +0 -4
- package/tsconfig.lib.json +0 -19
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -17
|
@@ -1,243 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ChangeDetectionStrategy,
|
|
3
|
-
Component,
|
|
4
|
-
ComponentRef,
|
|
5
|
-
EventEmitter,
|
|
6
|
-
OnDestroy,
|
|
7
|
-
ViewEncapsulation,
|
|
8
|
-
} from '@angular/core';
|
|
9
|
-
import { MefDevDialogConfig } from './dialog-config';
|
|
10
|
-
import { CdkDialogContainer } from '@angular/cdk/dialog';
|
|
11
|
-
import { coerceNumberProperty } from '@angular/cdk/coercion';
|
|
12
|
-
import { CdkPortalOutlet, ComponentPortal } from '@angular/cdk/portal';
|
|
13
|
-
|
|
14
|
-
/** Legacy-style animation event payload used by the dialog service/ref. */
|
|
15
|
-
interface LegacyDialogAnimationEvent {
|
|
16
|
-
state: 'opened' | 'opening' | 'closing' | 'closed';
|
|
17
|
-
totalTime: number;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/** BEM-style classes toggled during open/close sequences. */
|
|
21
|
-
const OPEN_CLASS = 'mdc-dialog--open';
|
|
22
|
-
const OPENING_CLASS = 'mdc-dialog--opening';
|
|
23
|
-
const CLOSING_CLASS = 'mdc-dialog--closing';
|
|
24
|
-
|
|
25
|
-
/** Default animation durations (ms) if not overridden by config. */
|
|
26
|
-
export const OPEN_ANIMATION_DURATION = 150;
|
|
27
|
-
export const CLOSE_ANIMATION_DURATION = 75;
|
|
28
|
-
|
|
29
|
-
@Component({
|
|
30
|
-
selector: 'md-dialog-container',
|
|
31
|
-
templateUrl: 'dialog-container.html',
|
|
32
|
-
styleUrl: 'dialog.scss',
|
|
33
|
-
encapsulation: ViewEncapsulation.None,
|
|
34
|
-
changeDetection: ChangeDetectionStrategy.Default,
|
|
35
|
-
imports: [CdkPortalOutlet],
|
|
36
|
-
host: {
|
|
37
|
-
class: 'mdc-dialog-container mdc-dialog',
|
|
38
|
-
tabindex: '-1',
|
|
39
|
-
'[attr.aria-modal]': '_config.ariaModal',
|
|
40
|
-
'[id]': '_config.id',
|
|
41
|
-
'[attr.role]': '_config.role',
|
|
42
|
-
// If an explicit ariaLabel is provided, don't set aria-labelledby.
|
|
43
|
-
'[attr.aria-labelledby]': '_config.ariaLabel ? null : _ariaLabelledByQueue[0]',
|
|
44
|
-
'[attr.aria-label]': '_config.ariaLabel',
|
|
45
|
-
'[attr.aria-describedby]': '_config.ariaDescribedBy || null',
|
|
46
|
-
'[class.animation-noopable]': '!_animationsEnabled',
|
|
47
|
-
'[class.mdc-dialog-container-with-actions]': '_actionSectionCount > 0',
|
|
48
|
-
},
|
|
49
|
-
})
|
|
50
|
-
export class MDDialogContainer extends CdkDialogContainer<MefDevDialogConfig> implements OnDestroy {
|
|
51
|
-
/** Emits animation lifecycle states understood by the dialog ref. */
|
|
52
|
-
_animationStateChanged = new EventEmitter<LegacyDialogAnimationEvent>();
|
|
53
|
-
|
|
54
|
-
/** Master flag to enable/disable animations for this container instance. */
|
|
55
|
-
_animationsEnabled = true;
|
|
56
|
-
|
|
57
|
-
/** Count of projected action sections (affects layout class). */
|
|
58
|
-
protected _actionSectionCount = 0;
|
|
59
|
-
|
|
60
|
-
/** Cached host element for class and style mutations. */
|
|
61
|
-
private _hostElement: HTMLElement = this._elementRef.nativeElement;
|
|
62
|
-
|
|
63
|
-
/** Effective enter animation duration derived from config (or defaults). */
|
|
64
|
-
private _enterAnimationDuration = this._animationsEnabled
|
|
65
|
-
? parseCssTime(this._config.enterAnimationDuration) ?? OPEN_ANIMATION_DURATION
|
|
66
|
-
: 0;
|
|
67
|
-
|
|
68
|
-
/** Effective exit animation duration derived from config (or defaults). */
|
|
69
|
-
private _exitAnimationDuration = this._animationsEnabled
|
|
70
|
-
? parseCssTime(this._config.exitAnimationDuration) ?? CLOSE_ANIMATION_DURATION
|
|
71
|
-
: 0;
|
|
72
|
-
|
|
73
|
-
/** Timer id for open/close fallback completion. */
|
|
74
|
-
private _animationTimer: ReturnType<typeof setTimeout> | null = null;
|
|
75
|
-
|
|
76
|
-
/** After content is attached, kick off the open animation. */
|
|
77
|
-
protected override _contentAttached(): void {
|
|
78
|
-
super._contentAttached();
|
|
79
|
-
this._startOpenAnimation();
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/** Optional position modifier class for origin-based animations. */
|
|
83
|
-
private ANIMATION_POSITION_CLASS = this._config.animationPosition
|
|
84
|
-
? `mdc-animation-position-${this._config.animationPosition}`
|
|
85
|
-
: null;
|
|
86
|
-
|
|
87
|
-
/** Starts the open animation sequence and emits "opening". */
|
|
88
|
-
private _startOpenAnimation() {
|
|
89
|
-
this._animationStateChanged.emit({ state: 'opening', totalTime: this._enterAnimationDuration });
|
|
90
|
-
|
|
91
|
-
if (this._animationsEnabled) {
|
|
92
|
-
// Expose duration to CSS via a custom property if styles rely on it.
|
|
93
|
-
this._hostElement.style.setProperty(TRANSITION_DURATION_PROPERTY, `${this._enterAnimationDuration}ms`);
|
|
94
|
-
|
|
95
|
-
// Defer class application to the next frame to ensure transitions kick in.
|
|
96
|
-
this._requestAnimationFrame(() => {
|
|
97
|
-
this._hostElement.classList.add(OPENING_CLASS, OPEN_CLASS);
|
|
98
|
-
if (this.ANIMATION_POSITION_CLASS) {
|
|
99
|
-
this._hostElement.classList.add(this.ANIMATION_POSITION_CLASS);
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
|
|
103
|
-
// Provide a JS fallback in case transition events aren't delivered.
|
|
104
|
-
this._waitForAnimationToComplete(this._enterAnimationDuration, this._finishDialogOpen);
|
|
105
|
-
} else {
|
|
106
|
-
// No animations: immediately mark as open and finish sequence in a microtask.
|
|
107
|
-
this._hostElement.classList.add(OPEN_CLASS);
|
|
108
|
-
Promise.resolve().then(() => this._finishDialogOpen());
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
/** Public entrypoint called by the ref to start the close sequence. */
|
|
113
|
-
_startExitAnimation(): void {
|
|
114
|
-
this._animationStateChanged.emit({ state: 'closing', totalTime: this._exitAnimationDuration });
|
|
115
|
-
this._hostElement.classList.remove(OPEN_CLASS);
|
|
116
|
-
|
|
117
|
-
if (this._animationsEnabled) {
|
|
118
|
-
this._hostElement.style.setProperty(TRANSITION_DURATION_PROPERTY, `${this._exitAnimationDuration}ms`);
|
|
119
|
-
|
|
120
|
-
this._requestAnimationFrame(() => {
|
|
121
|
-
this._hostElement.classList.add(CLOSING_CLASS);
|
|
122
|
-
if (this.ANIMATION_POSITION_CLASS) {
|
|
123
|
-
this._hostElement.classList.add(this.ANIMATION_POSITION_CLASS);
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
|
|
127
|
-
// JS fallback for the exit sequence as well.
|
|
128
|
-
this._waitForAnimationToComplete(this._exitAnimationDuration, this._finishDialogClose);
|
|
129
|
-
} else {
|
|
130
|
-
Promise.resolve().then(() => this._finishDialogClose());
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
/** Tracks action sections; used to toggle a host layout class. */
|
|
135
|
-
_updateActionSectionCount(delta: number) {
|
|
136
|
-
this._actionSectionCount += delta;
|
|
137
|
-
this._changeDetectorRef.markForCheck();
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
/** Finishes open sequence: clear classes and emit "opened". */
|
|
141
|
-
private _finishDialogOpen = () => {
|
|
142
|
-
this._clearAnimationClasses();
|
|
143
|
-
this._openAnimationDone(this._enterAnimationDuration);
|
|
144
|
-
};
|
|
145
|
-
|
|
146
|
-
/** Finishes close sequence: clear classes and emit "closed". */
|
|
147
|
-
private _finishDialogClose = () => {
|
|
148
|
-
this._clearAnimationClasses();
|
|
149
|
-
this._animationStateChanged.emit({ state: 'closed', totalTime: this._exitAnimationDuration });
|
|
150
|
-
};
|
|
151
|
-
|
|
152
|
-
/** Removes transient animation classes (and optional position class). */
|
|
153
|
-
private _clearAnimationClasses() {
|
|
154
|
-
this._hostElement.classList.remove(OPENING_CLASS, CLOSING_CLASS);
|
|
155
|
-
if (this.ANIMATION_POSITION_CLASS) {
|
|
156
|
-
this._hostElement.classList.remove(this.ANIMATION_POSITION_CLASS);
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
* Sets/refreshes a timeout to complete the animation sequence. This acts as a
|
|
162
|
-
* fallback when relying on CSS transitions without guaranteed end events.
|
|
163
|
-
*/
|
|
164
|
-
private _waitForAnimationToComplete(duration: number, callback: () => void) {
|
|
165
|
-
if (this._animationTimer !== null) {
|
|
166
|
-
clearTimeout(this._animationTimer);
|
|
167
|
-
}
|
|
168
|
-
this._animationTimer = setTimeout(callback, duration);
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
/**
|
|
172
|
-
* Schedules a callback on the next animation frame, outside Angular,
|
|
173
|
-
* to ensure CSS transitions are applied predictably.
|
|
174
|
-
*/
|
|
175
|
-
private _requestAnimationFrame(callback: () => void) {
|
|
176
|
-
this._ngZone.runOutsideAngular(() => {
|
|
177
|
-
if (typeof requestAnimationFrame === 'function') {
|
|
178
|
-
requestAnimationFrame(callback);
|
|
179
|
-
} else {
|
|
180
|
-
callback();
|
|
181
|
-
}
|
|
182
|
-
});
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
/** Focus handling after content attachment depending on `delayFocusTrap` config. */
|
|
186
|
-
protected override _captureInitialFocus(): void {
|
|
187
|
-
if (!this._config.delayFocusTrap) {
|
|
188
|
-
this._trapFocus();
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
/** Called when open animation completes to emit "opened" and (optionally) trap focus. */
|
|
193
|
-
protected _openAnimationDone(totalTime: number) {
|
|
194
|
-
if (this._config.delayFocusTrap) {
|
|
195
|
-
this._trapFocus();
|
|
196
|
-
}
|
|
197
|
-
this._animationStateChanged.next({ state: 'opened', totalTime });
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
/** Cleanup any pending timers on destroy. */
|
|
201
|
-
override ngOnDestroy() {
|
|
202
|
-
super.ngOnDestroy();
|
|
203
|
-
if (this._animationTimer !== null) {
|
|
204
|
-
clearTimeout(this._animationTimer);
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
/**
|
|
209
|
-
* Decorates the root component host element with a class so that card/panel
|
|
210
|
-
* styles can target it specifically when used inside a dialog.
|
|
211
|
-
*/
|
|
212
|
-
override attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T> {
|
|
213
|
-
const ref = super.attachComponentPortal(portal);
|
|
214
|
-
ref.location.nativeElement.classList.add('mdc-dialog-component-host');
|
|
215
|
-
return ref;
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
/** CSS custom property used by styles to read the transition duration. */
|
|
220
|
-
const TRANSITION_DURATION_PROPERTY = '--dialog-transition-duration';
|
|
221
|
-
|
|
222
|
-
/**
|
|
223
|
-
* Parses a CSS time value (e.g., '150ms', '0.15s', '0') into milliseconds.
|
|
224
|
-
* Returns null when the input is undefined or cannot be parsed.
|
|
225
|
-
*/
|
|
226
|
-
function parseCssTime(time: string | number | undefined): number | null {
|
|
227
|
-
if (time == null) {
|
|
228
|
-
return null;
|
|
229
|
-
}
|
|
230
|
-
if (typeof time === 'number') {
|
|
231
|
-
return time;
|
|
232
|
-
}
|
|
233
|
-
if (time.endsWith('ms')) {
|
|
234
|
-
return coerceNumberProperty(time.substring(0, time.length - 2));
|
|
235
|
-
}
|
|
236
|
-
if (time.endsWith('s')) {
|
|
237
|
-
return coerceNumberProperty(time.substring(0, time.length - 1)) * 1000;
|
|
238
|
-
}
|
|
239
|
-
if (time === '0') {
|
|
240
|
-
return 0;
|
|
241
|
-
}
|
|
242
|
-
return null;
|
|
243
|
-
}
|
|
@@ -1,217 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Directive,
|
|
3
|
-
ElementRef,
|
|
4
|
-
Input,
|
|
5
|
-
OnChanges,
|
|
6
|
-
OnDestroy,
|
|
7
|
-
OnInit,
|
|
8
|
-
SimpleChanges,
|
|
9
|
-
inject,
|
|
10
|
-
} from '@angular/core';
|
|
11
|
-
import {_IdGenerator} from '@angular/cdk/a11y';
|
|
12
|
-
import {CdkScrollable} from '@angular/cdk/scrolling';
|
|
13
|
-
|
|
14
|
-
import {MDDialog} from './dialog';
|
|
15
|
-
import {_closeDialogVia, MefDevDialogRef} from './dialog-ref';
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Button-like directive that closes the nearest dialog when clicked.
|
|
19
|
-
*
|
|
20
|
-
* Usage:
|
|
21
|
-
* <button md-dialog-close>Close</button>
|
|
22
|
-
* <button mdDialogClose="resultValue">Save</button>
|
|
23
|
-
*
|
|
24
|
-
* - It tries to inject the current MefDevDialogRef; if not available,
|
|
25
|
-
* it finds the nearest dialog container in the DOM and resolves the ref from MDDialog.openDialogs.
|
|
26
|
-
* - On click, it calls `_closeDialogVia` with an interaction origin ('mouse' or 'keyboard')
|
|
27
|
-
* so the focus can be restored appropriately.
|
|
28
|
-
*/
|
|
29
|
-
@Directive({
|
|
30
|
-
selector: '[md-dialog-close], [mdDialogClose]',
|
|
31
|
-
exportAs: 'mdDialogClose',
|
|
32
|
-
host: {
|
|
33
|
-
'(click)': '_onButtonClick($event)',
|
|
34
|
-
'[attr.aria-label]': 'ariaLabel || null',
|
|
35
|
-
'[attr.type]': 'type',
|
|
36
|
-
},
|
|
37
|
-
})
|
|
38
|
-
export class MDDialogClose implements OnInit, OnChanges {
|
|
39
|
-
/** Injected dialog ref when available (undefined if used outside projected dialog content). */
|
|
40
|
-
dialogRef = inject<MefDevDialogRef<any>>(MefDevDialogRef, {optional: true})!;
|
|
41
|
-
/** Host element reference (used for DOM traversal when ref is not injected). */
|
|
42
|
-
private _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);
|
|
43
|
-
/** Dialog service used to access `openDialogs` for fallback lookup. */
|
|
44
|
-
private _dialog = inject(MDDialog);
|
|
45
|
-
|
|
46
|
-
/** Optional aria-label for the closing button. */
|
|
47
|
-
@Input('aria-label') ariaLabel: string;
|
|
48
|
-
/** Native button type; defaults to "button" to avoid accidental form submit. */
|
|
49
|
-
@Input() type: 'submit' | 'button' | 'reset' = 'button';
|
|
50
|
-
/** Preferred input for a close result (dash-cased attribute). */
|
|
51
|
-
@Input('dialog-close') dialogResult: any;
|
|
52
|
-
/** CamelCased alias of the same input (kept for API parity & template style). */
|
|
53
|
-
@Input('dialogClose') dialogClose: any;
|
|
54
|
-
|
|
55
|
-
constructor() {}
|
|
56
|
-
|
|
57
|
-
/** Resolve dialogRef if it wasn't injected (e.g., directive used in a nested view). */
|
|
58
|
-
ngOnInit() {
|
|
59
|
-
if (!this.dialogRef) {
|
|
60
|
-
this.dialogRef = getClosestDialog(this._elementRef, this._dialog.openDialogs)!;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/** Mirror `dialogClose` into `dialogResult` when either input changes. */
|
|
65
|
-
ngOnChanges(changes: SimpleChanges) {
|
|
66
|
-
const proxiedChange = changes['dialogClose'] || changes['dialogCloseResult'];
|
|
67
|
-
if (proxiedChange) {
|
|
68
|
-
this.dialogResult = proxiedChange.currentValue;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/** Click handler: close the dialog and tag the interaction origin for focus restoration. */
|
|
73
|
-
_onButtonClick(event: MouseEvent) {
|
|
74
|
-
_closeDialogVia(
|
|
75
|
-
this.dialogRef,
|
|
76
|
-
// Heuristic: 0/0 screen coords generally indicate keyboard activation (e.g., Space/Enter).
|
|
77
|
-
event.screenX === 0 && event.screenY === 0 ? 'keyboard' : 'mouse',
|
|
78
|
-
this.dialogResult,
|
|
79
|
-
);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Base class for directives that represent structural sections within a dialog
|
|
85
|
-
* (e.g., title area, actions area). It:
|
|
86
|
-
* - Resolves the dialog ref by injection or DOM traversal.
|
|
87
|
-
* - Calls `_onAdd()` when attached to the DOM (after microtask) so the container
|
|
88
|
-
* can update ARIA attributes or layout counts.
|
|
89
|
-
* - Calls `_onRemove()` when destroyed so the container can revert those changes.
|
|
90
|
-
*/
|
|
91
|
-
@Directive()
|
|
92
|
-
export abstract class DialogLayoutSection implements OnInit, OnDestroy {
|
|
93
|
-
/** Reference to the owning dialog (if any). */
|
|
94
|
-
protected _dialogRef = inject<MefDevDialogRef<any>>(MefDevDialogRef, {optional: true})!;
|
|
95
|
-
/** Host element reference for DOM traversal fallback. */
|
|
96
|
-
private _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);
|
|
97
|
-
/** Dialog service used for fallback dialog lookup. */
|
|
98
|
-
private _dialog = inject(MDDialog);
|
|
99
|
-
|
|
100
|
-
// Overload kept for symmetry with other directives.
|
|
101
|
-
constructor(...args: unknown[]);
|
|
102
|
-
constructor() {}
|
|
103
|
-
|
|
104
|
-
/** Hook for subclasses to add themselves to the container (e.g., ARIA wiring, layout counters). */
|
|
105
|
-
protected abstract _onAdd(): void;
|
|
106
|
-
/** Hook for subclasses to remove themselves from the container. */
|
|
107
|
-
protected abstract _onRemove(): void;
|
|
108
|
-
|
|
109
|
-
ngOnInit() {
|
|
110
|
-
if (!this._dialogRef) {
|
|
111
|
-
this._dialogRef = getClosestDialog(this._elementRef, this._dialog.openDialogs)!;
|
|
112
|
-
}
|
|
113
|
-
if (this._dialogRef) {
|
|
114
|
-
// Defer to next microtask so container/DOM are fully ready.
|
|
115
|
-
Promise.resolve().then(() => {
|
|
116
|
-
this._onAdd();
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
ngOnDestroy() {
|
|
122
|
-
const instance = this._dialogRef?._containerInstance;
|
|
123
|
-
if (instance) {
|
|
124
|
-
// Defer to keep symmetry with _onAdd timing and avoid mid-change CD issues.
|
|
125
|
-
Promise.resolve().then(() => {
|
|
126
|
-
this._onRemove();
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* Dialog title directive.
|
|
134
|
-
*
|
|
135
|
-
* - Adds semantic/title classes to the host.
|
|
136
|
-
* - Generates a unique id that is used to label the dialog via `aria-labelledby`.
|
|
137
|
-
* - Notifies the container to add/remove this id from its aria-labelledby list.
|
|
138
|
-
*/
|
|
139
|
-
@Directive({
|
|
140
|
-
selector: '[md-dialog-title], [mdDialogTitle]',
|
|
141
|
-
exportAs: 'mdDialogTitle',
|
|
142
|
-
host: {
|
|
143
|
-
'class': 'mdc-dialog-title mdc-dialog__title',
|
|
144
|
-
'[id]': 'id',
|
|
145
|
-
},
|
|
146
|
-
})
|
|
147
|
-
export class MDDialogTitle extends DialogLayoutSection {
|
|
148
|
-
/** Unique id used by the container for aria-labelledby. */
|
|
149
|
-
@Input() id: string = inject(_IdGenerator).getId('mdc-dialog-title-');
|
|
150
|
-
|
|
151
|
-
/** Register this title id with the container for a11y. */
|
|
152
|
-
protected _onAdd() {
|
|
153
|
-
this._dialogRef._containerInstance?._addAriaLabelledBy?.(this.id);
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
/** Unregister this title id on destroy. */
|
|
157
|
-
protected override _onRemove(): void {
|
|
158
|
-
this._dialogRef?._containerInstance?._removeAriaLabelledBy?.(this.id);
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* Scrollable content section of the dialog.
|
|
164
|
-
* - Applies MDC content classes.
|
|
165
|
-
* - Attaches `CdkScrollable` so consumers/tools can query/observe scroll.
|
|
166
|
-
*/
|
|
167
|
-
@Directive({
|
|
168
|
-
selector: `[md-dialog-content], md-dialog-content, [mdDialogContent]`,
|
|
169
|
-
host: {'class': 'mdc-dialog-content mdc-dialog__content'},
|
|
170
|
-
hostDirectives: [CdkScrollable],
|
|
171
|
-
})
|
|
172
|
-
export class MDDialogContent {}
|
|
173
|
-
|
|
174
|
-
/**
|
|
175
|
-
* Action row of the dialog (typically hosts buttons).
|
|
176
|
-
* - Applies alignment classes based on `align` input.
|
|
177
|
-
* - Notifies the container about the presence of an actions section so it can
|
|
178
|
-
* adjust layout (e.g., paddings, separators).
|
|
179
|
-
*/
|
|
180
|
-
@Directive({
|
|
181
|
-
selector: `[md-dialog-actions], md-dialog-actions, [mdDialogActions]`,
|
|
182
|
-
host: {
|
|
183
|
-
'class': 'mdc-dialog-actions mdc-dialog__actions',
|
|
184
|
-
'[class.mdc-dialog-actions-align-start]': 'align === "start"',
|
|
185
|
-
'[class.mdc-dialog-actions-align-center]': 'align === "center"',
|
|
186
|
-
'[class.mdc-dialog-actions-align-end]': 'align === "end"',
|
|
187
|
-
},
|
|
188
|
-
})
|
|
189
|
-
export class MDDialogActions extends DialogLayoutSection {
|
|
190
|
-
/** Horizontal alignment for the action buttons. */
|
|
191
|
-
@Input() align?: 'start' | 'center' | 'end';
|
|
192
|
-
|
|
193
|
-
/** Tell the container an actions section was added. */
|
|
194
|
-
protected _onAdd() {
|
|
195
|
-
this._dialogRef._containerInstance?._updateActionSectionCount?.(1);
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
/** Tell the container an actions section was removed. */
|
|
199
|
-
protected override _onRemove(): void {
|
|
200
|
-
this._dialogRef._containerInstance?._updateActionSectionCount?.(-1);
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
/**
|
|
205
|
-
* Finds the closest MD dialog container element in the ancestors of `element`
|
|
206
|
-
* and returns its corresponding MefDevDialogRef from the `openDialogs` stack.
|
|
207
|
-
*
|
|
208
|
-
* This is a fallback for cases where directives are used outside of the primary
|
|
209
|
-
* injection context but still live inside the dialog DOM subtree.
|
|
210
|
-
*/
|
|
211
|
-
function getClosestDialog(element: ElementRef<HTMLElement>, openDialogs: MefDevDialogRef<any>[]) {
|
|
212
|
-
let parent: HTMLElement | null = element.nativeElement.parentElement;
|
|
213
|
-
while (parent && !parent.classList.contains('mdc-dialog-container')) {
|
|
214
|
-
parent = parent.parentElement;
|
|
215
|
-
}
|
|
216
|
-
return parent ? openDialogs.find(dialog => dialog.id === parent!.id) : null;
|
|
217
|
-
}
|