@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,640 +0,0 @@
|
|
|
1
|
-
import { _IdGenerator, FocusMonitor, FocusOrigin } from '@angular/cdk/a11y';
|
|
2
|
-
import { UniqueSelectionDispatcher } from '@angular/cdk/collections';
|
|
3
|
-
import {
|
|
4
|
-
AfterContentInit,
|
|
5
|
-
AfterViewInit,
|
|
6
|
-
ChangeDetectionStrategy,
|
|
7
|
-
ChangeDetectorRef,
|
|
8
|
-
Component,
|
|
9
|
-
ContentChildren,
|
|
10
|
-
Directive,
|
|
11
|
-
DoCheck,
|
|
12
|
-
ElementRef,
|
|
13
|
-
EventEmitter,
|
|
14
|
-
InjectionToken,
|
|
15
|
-
Injector,
|
|
16
|
-
Input,
|
|
17
|
-
NgZone,
|
|
18
|
-
OnDestroy,
|
|
19
|
-
OnInit,
|
|
20
|
-
Output,
|
|
21
|
-
QueryList,
|
|
22
|
-
ViewChild,
|
|
23
|
-
ViewEncapsulation,
|
|
24
|
-
afterNextRender,
|
|
25
|
-
booleanAttribute,
|
|
26
|
-
forwardRef,
|
|
27
|
-
inject,
|
|
28
|
-
numberAttribute,
|
|
29
|
-
HostAttributeToken,
|
|
30
|
-
Renderer2,
|
|
31
|
-
} from '@angular/core';
|
|
32
|
-
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
33
|
-
import { Subscription } from 'rxjs';
|
|
34
|
-
import { _CdkPrivateStyleLoader } from '@angular/cdk/private';
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Change payload emitted by both group and individual radio buttons.
|
|
38
|
-
* `source` is the button that triggered the change; `value` is its current value.
|
|
39
|
-
*/
|
|
40
|
-
export class RadioChange<T = any> {
|
|
41
|
-
constructor(public source: MDRadioButton, public value: T) {}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/** ControlValueAccessor provider for the radio group. */
|
|
45
|
-
export const RADIO_GROUP_CONTROL_VALUE_ACCESSOR: any = {
|
|
46
|
-
provide: NG_VALUE_ACCESSOR,
|
|
47
|
-
useExisting: forwardRef(() => MDRadioGroup),
|
|
48
|
-
multi: true,
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
/** Token to inject the parent group into child radio buttons. */
|
|
52
|
-
export const MD_RADIO_GROUP = new InjectionToken<MDRadioGroup>('MDRadioGroup');
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Radio group directive: manages a set of `md-radio-button` children.
|
|
56
|
-
*
|
|
57
|
-
* Responsibilities:
|
|
58
|
-
* - Keeps a single selection (mutual exclusivity).
|
|
59
|
-
* - Syncs `name` across all child radios.
|
|
60
|
-
* - Integrates with Angular forms via ControlValueAccessor.
|
|
61
|
-
* - Forwards `disabled`, `required`, and `disabledInteractive` to children.
|
|
62
|
-
*/
|
|
63
|
-
@Directive({
|
|
64
|
-
selector: 'md-radio-group',
|
|
65
|
-
exportAs: 'mdRadioGroup',
|
|
66
|
-
providers: [RADIO_GROUP_CONTROL_VALUE_ACCESSOR, { provide: MD_RADIO_GROUP, useExisting: MDRadioGroup }],
|
|
67
|
-
host: {
|
|
68
|
-
role: 'radiogroup',
|
|
69
|
-
class: 'mdc-radio-group',
|
|
70
|
-
},
|
|
71
|
-
})
|
|
72
|
-
export class MDRadioGroup implements AfterContentInit, OnDestroy, ControlValueAccessor {
|
|
73
|
-
/** Triggers CD when value/flags change via setters. */
|
|
74
|
-
private _changeDetector = inject(ChangeDetectorRef);
|
|
75
|
-
|
|
76
|
-
/** Currently selected value (model). */
|
|
77
|
-
private _value: any = null;
|
|
78
|
-
|
|
79
|
-
/** Shared `name` for all child radios (defaults to unique id). */
|
|
80
|
-
private _name: string = inject(_IdGenerator).getId('radio-group-');
|
|
81
|
-
|
|
82
|
-
/** Reference to the selected radio (if any). */
|
|
83
|
-
private _selected: MDRadioButton | null = null;
|
|
84
|
-
|
|
85
|
-
/** True after first content init; used to gate change emissions. */
|
|
86
|
-
private _isInitialized: boolean = false;
|
|
87
|
-
|
|
88
|
-
/** Group-level disabled flag; propagated to children. */
|
|
89
|
-
private _disabled: boolean = false;
|
|
90
|
-
|
|
91
|
-
/** Group-level required flag; propagated to children. */
|
|
92
|
-
private _required: boolean = false;
|
|
93
|
-
|
|
94
|
-
/** Subscription to children changes (add/remove). */
|
|
95
|
-
private _buttonChanges: Subscription;
|
|
96
|
-
|
|
97
|
-
/** ngModel/FormControl onChange callback. */
|
|
98
|
-
_controlValueAccessorChangeFn: (value: any) => void = () => {};
|
|
99
|
-
|
|
100
|
-
/** ngModel/FormControl onTouched callback. */
|
|
101
|
-
onTouched: () => any = () => {};
|
|
102
|
-
|
|
103
|
-
/** Emits when selection changes after init. */
|
|
104
|
-
@Output() readonly change: EventEmitter<RadioChange> = new EventEmitter<RadioChange>();
|
|
105
|
-
|
|
106
|
-
/** Child radios discovered in content. */
|
|
107
|
-
@ContentChildren(forwardRef(() => MDRadioButton), { descendants: true }) _radios: QueryList<MDRadioButton>;
|
|
108
|
-
|
|
109
|
-
/** Group name getter/setter (propagates to children). */
|
|
110
|
-
@Input()
|
|
111
|
-
get name(): string {
|
|
112
|
-
return this._name;
|
|
113
|
-
}
|
|
114
|
-
set name(value: string) {
|
|
115
|
-
this._name = value;
|
|
116
|
-
this._updateRadioButtonNames();
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
/** Model value getter/setter; updates selected radio accordingly. */
|
|
120
|
-
@Input()
|
|
121
|
-
get value(): any {
|
|
122
|
-
return this._value;
|
|
123
|
-
}
|
|
124
|
-
set value(newValue: any) {
|
|
125
|
-
if (this._value !== newValue) {
|
|
126
|
-
this._value = newValue;
|
|
127
|
-
this._updateSelectedRadioFromValue();
|
|
128
|
-
this._checkSelectedRadioButton();
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
/** Ensures the selected radio is actually checked. */
|
|
133
|
-
_checkSelectedRadioButton() {
|
|
134
|
-
if (this._selected && !this._selected.checked) {
|
|
135
|
-
this._selected.checked = true;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
/** Selected radio getter/setter; also sets group value. */
|
|
140
|
-
@Input()
|
|
141
|
-
get selected() {
|
|
142
|
-
return this._selected;
|
|
143
|
-
}
|
|
144
|
-
set selected(selected: MDRadioButton | null) {
|
|
145
|
-
this._selected = selected;
|
|
146
|
-
this.value = selected ? selected.value : null;
|
|
147
|
-
this._checkSelectedRadioButton();
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
/** Group disabled getter/setter; marks children for check. */
|
|
151
|
-
@Input({ transform: booleanAttribute })
|
|
152
|
-
get disabled(): boolean {
|
|
153
|
-
return this._disabled;
|
|
154
|
-
}
|
|
155
|
-
set disabled(value: boolean) {
|
|
156
|
-
this._disabled = value;
|
|
157
|
-
this._markRadiosForCheck();
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
/** Group required getter/setter; marks children for check. */
|
|
161
|
-
@Input({ transform: booleanAttribute })
|
|
162
|
-
get required(): boolean {
|
|
163
|
-
return this._required;
|
|
164
|
-
}
|
|
165
|
-
set required(value: boolean) {
|
|
166
|
-
this._required = value;
|
|
167
|
-
this._markRadiosForCheck();
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
/**
|
|
171
|
-
* If true, disabled items may still be focusable/interactive
|
|
172
|
-
* (special a11y scenarios). Propagated to children.
|
|
173
|
-
*/
|
|
174
|
-
@Input({ transform: booleanAttribute })
|
|
175
|
-
get disabledInteractive(): boolean {
|
|
176
|
-
return this._disabledInteractive;
|
|
177
|
-
}
|
|
178
|
-
set disabledInteractive(value: boolean) {
|
|
179
|
-
this._disabledInteractive = value;
|
|
180
|
-
this._markRadiosForCheck();
|
|
181
|
-
}
|
|
182
|
-
private _disabledInteractive = false;
|
|
183
|
-
|
|
184
|
-
/** Overloads kept for compatibility; actual ctor is empty. */
|
|
185
|
-
constructor(...args: unknown[]);
|
|
186
|
-
constructor() {}
|
|
187
|
-
|
|
188
|
-
/** After content init, watch for dynamic child list changes. */
|
|
189
|
-
ngAfterContentInit() {
|
|
190
|
-
this._isInitialized = true;
|
|
191
|
-
this._buttonChanges = this._radios.changes.subscribe(() => {
|
|
192
|
-
if (this.selected && !this._radios.find((radio) => radio === this.selected)) {
|
|
193
|
-
this._selected = null;
|
|
194
|
-
}
|
|
195
|
-
});
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
/** Clean up subscriptions. */
|
|
199
|
-
ngOnDestroy() {
|
|
200
|
-
this._buttonChanges?.unsubscribe();
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
/** Mark group as touched (used by children on blur). */
|
|
204
|
-
_touch() {
|
|
205
|
-
if (this.onTouched) {
|
|
206
|
-
this.onTouched();
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
/** Propagate `name` to child radios and mark them for check. */
|
|
211
|
-
private _updateRadioButtonNames(): void {
|
|
212
|
-
if (this._radios) {
|
|
213
|
-
this._radios.forEach((radio) => {
|
|
214
|
-
radio.name = this.name;
|
|
215
|
-
radio._markForCheck();
|
|
216
|
-
});
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
/** Update `checked` on children based on current group value. */
|
|
221
|
-
private _updateSelectedRadioFromValue(): void {
|
|
222
|
-
const isAlreadySelected = this._selected !== null && this._selected.value === this._value;
|
|
223
|
-
if (this._radios && !isAlreadySelected) {
|
|
224
|
-
this._selected = null;
|
|
225
|
-
this._radios.forEach((radio) => {
|
|
226
|
-
radio.checked = this.value === radio.value;
|
|
227
|
-
if (radio.checked) {
|
|
228
|
-
this._selected = radio;
|
|
229
|
-
}
|
|
230
|
-
});
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
/** Emit `change` when selection altered by user after init. */
|
|
235
|
-
_emitChangeEvent(): void {
|
|
236
|
-
if (this._isInitialized) {
|
|
237
|
-
this.change.emit(new RadioChange(this._selected!, this._value));
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
/** Ask all children to run CD (OnPush-safe updates). */
|
|
242
|
-
_markRadiosForCheck() {
|
|
243
|
-
if (this._radios) {
|
|
244
|
-
this._radios.forEach((radio) => radio._markForCheck());
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
/** Write model value from forms API. */
|
|
249
|
-
writeValue(value: any) {
|
|
250
|
-
this.value = value;
|
|
251
|
-
this._changeDetector.markForCheck();
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
/** Register forms onChange callback. */
|
|
255
|
-
registerOnChange(fn: (value: any) => void) {
|
|
256
|
-
this._controlValueAccessorChangeFn = fn;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
/** Register forms onTouched callback. */
|
|
260
|
-
registerOnTouched(fn: any) {
|
|
261
|
-
this.onTouched = fn;
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
/** Set disabled via forms API. */
|
|
265
|
-
setDisabledState(isDisabled: boolean) {
|
|
266
|
-
this.disabled = isDisabled;
|
|
267
|
-
this._changeDetector.markForCheck();
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
/**
|
|
272
|
-
* Single radio button component.
|
|
273
|
-
*
|
|
274
|
-
* Responsibilities:
|
|
275
|
-
* - Manages its own checked/disabled state.
|
|
276
|
-
* - Coordinates with its parent `MDRadioGroup`.
|
|
277
|
-
* - Emits `change` when user selects it.
|
|
278
|
-
* - Handles focus/keyboard via CDK FocusMonitor.
|
|
279
|
-
*/
|
|
280
|
-
@Component({
|
|
281
|
-
selector: 'md-radio-button',
|
|
282
|
-
templateUrl: 'radio.html',
|
|
283
|
-
styleUrl: 'radio.scss',
|
|
284
|
-
host: {
|
|
285
|
-
class: 'mdc-radio-button',
|
|
286
|
-
'[attr.id]': 'id',
|
|
287
|
-
'[class.mdc-radio-checked]': 'checked',
|
|
288
|
-
'[class.mdc-radio-disabled]': 'disabled',
|
|
289
|
-
'[class.mdc-radio-disabled-interactive]': 'disabledInteractive',
|
|
290
|
-
'[class.animation-noopable]': '_noopAnimations',
|
|
291
|
-
'[attr.tabindex]': 'null',
|
|
292
|
-
'[attr.aria-label]': 'null',
|
|
293
|
-
'[attr.aria-labelledby]': 'null',
|
|
294
|
-
'[attr.aria-describedby]': 'null',
|
|
295
|
-
'(focus)': '_inputElement.nativeElement.focus()',
|
|
296
|
-
},
|
|
297
|
-
exportAs: 'mdRadioButton',
|
|
298
|
-
encapsulation: ViewEncapsulation.None,
|
|
299
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
300
|
-
})
|
|
301
|
-
export class MDRadioButton implements OnInit, AfterViewInit, DoCheck, OnDestroy {
|
|
302
|
-
/** Host element reference (used by FocusMonitor and listeners). */
|
|
303
|
-
protected _elementRef = inject(ElementRef);
|
|
304
|
-
|
|
305
|
-
/** Change detector to request view updates under OnPush. */
|
|
306
|
-
private _changeDetector = inject(ChangeDetectorRef);
|
|
307
|
-
|
|
308
|
-
/** CDK FocusMonitor to handle programmatic focus origins. */
|
|
309
|
-
private _focusMonitor = inject(FocusMonitor);
|
|
310
|
-
|
|
311
|
-
/** Ensures unique selection across same-name radios. */
|
|
312
|
-
private _radioDispatcher = inject(UniqueSelectionDispatcher);
|
|
313
|
-
|
|
314
|
-
/** Zone for running event listeners outside Angular (perf). */
|
|
315
|
-
private _ngZone = inject(NgZone);
|
|
316
|
-
|
|
317
|
-
/** Renderer for low-level DOM events binding. */
|
|
318
|
-
private _renderer = inject(Renderer2);
|
|
319
|
-
|
|
320
|
-
/** Unique id seed for host/input ids. */
|
|
321
|
-
private _uniqueId = inject(_IdGenerator).getId('radio-');
|
|
322
|
-
|
|
323
|
-
/** Cleanup function for native click listener. */
|
|
324
|
-
private _cleanupClick: (() => void) | undefined;
|
|
325
|
-
|
|
326
|
-
/** Element id (defaults to unique id). */
|
|
327
|
-
@Input() id: string = this._uniqueId;
|
|
328
|
-
|
|
329
|
-
/** Shared group name; set by group or consumer. */
|
|
330
|
-
@Input() name: string;
|
|
331
|
-
|
|
332
|
-
/** ARIA label text for input (if no external label). */
|
|
333
|
-
@Input('aria-label') ariaLabel: string;
|
|
334
|
-
|
|
335
|
-
/** Id of element that labels this input. */
|
|
336
|
-
@Input('aria-labelledby') ariaLabelledby: string;
|
|
337
|
-
|
|
338
|
-
/** Id of element that describes this input. */
|
|
339
|
-
@Input('aria-describedby') ariaDescribedby: string;
|
|
340
|
-
|
|
341
|
-
/**
|
|
342
|
-
* Tabindex for internal input; normalized via numberAttribute.
|
|
343
|
-
* Default is 0 so item can be focused when selected.
|
|
344
|
-
*/
|
|
345
|
-
@Input({
|
|
346
|
-
transform: (value: unknown) => (value == null ? 0 : numberAttribute(value)),
|
|
347
|
-
})
|
|
348
|
-
tabIndex: number = 0;
|
|
349
|
-
|
|
350
|
-
/** Checked state with group coordination and dispatcher notify. */
|
|
351
|
-
@Input({ transform: booleanAttribute })
|
|
352
|
-
get checked(): boolean {
|
|
353
|
-
return this._checked;
|
|
354
|
-
}
|
|
355
|
-
set checked(value: boolean) {
|
|
356
|
-
if (this._checked !== value) {
|
|
357
|
-
this._checked = value;
|
|
358
|
-
|
|
359
|
-
// Sync with parent group value and selected reference.
|
|
360
|
-
if (value && this.radioGroup && this.radioGroup.value !== this.value) {
|
|
361
|
-
this.radioGroup.selected = this;
|
|
362
|
-
} else if (!value && this.radioGroup && this.radioGroup.value === this.value) {
|
|
363
|
-
this.radioGroup.selected = null;
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
// Notify other radios with the same name.
|
|
367
|
-
if (value) {
|
|
368
|
-
this._radioDispatcher.notify(this.id, this.name);
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
this._changeDetector.markForCheck();
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
/** Arbitrary value associated with this radio. */
|
|
376
|
-
@Input()
|
|
377
|
-
get value(): any {
|
|
378
|
-
return this._value;
|
|
379
|
-
}
|
|
380
|
-
set value(value: any) {
|
|
381
|
-
if (this._value !== value) {
|
|
382
|
-
this._value = value;
|
|
383
|
-
|
|
384
|
-
// If part of a group, keep checked state in sync with group's value.
|
|
385
|
-
if (this.radioGroup !== null) {
|
|
386
|
-
if (!this.checked) {
|
|
387
|
-
this.checked = this.radioGroup.value === value;
|
|
388
|
-
}
|
|
389
|
-
if (this.checked) {
|
|
390
|
-
this.radioGroup.selected = this;
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
/** Disabled state; considers group-level disabled as well. */
|
|
397
|
-
@Input({ transform: booleanAttribute })
|
|
398
|
-
get disabled(): boolean {
|
|
399
|
-
return this._disabled || (this.radioGroup !== null && this.radioGroup.disabled);
|
|
400
|
-
}
|
|
401
|
-
set disabled(value: boolean) {
|
|
402
|
-
this._setDisabled(value);
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
/** Required state; considers group-level required as well. */
|
|
406
|
-
@Input({ transform: booleanAttribute })
|
|
407
|
-
get required(): boolean {
|
|
408
|
-
return this._required || (this.radioGroup && this.radioGroup.required);
|
|
409
|
-
}
|
|
410
|
-
set required(value: boolean) {
|
|
411
|
-
if (value !== this._required) {
|
|
412
|
-
this._changeDetector.markForCheck();
|
|
413
|
-
}
|
|
414
|
-
this._required = value;
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
/**
|
|
418
|
-
* If true, item remains interactive/focusable even when disabled.
|
|
419
|
-
* Also considers group-level disabledInteractive.
|
|
420
|
-
*/
|
|
421
|
-
@Input({ transform: booleanAttribute })
|
|
422
|
-
get disabledInteractive(): boolean {
|
|
423
|
-
return this._disabledInteractive || (this.radioGroup !== null && this.radioGroup.disabledInteractive);
|
|
424
|
-
}
|
|
425
|
-
set disabledInteractive(value: boolean) {
|
|
426
|
-
this._disabledInteractive = value;
|
|
427
|
-
}
|
|
428
|
-
private _disabledInteractive: boolean;
|
|
429
|
-
|
|
430
|
-
/** Emits when this particular radio is selected by the user. */
|
|
431
|
-
@Output() readonly change: EventEmitter<RadioChange> = new EventEmitter<RadioChange>();
|
|
432
|
-
|
|
433
|
-
/** Optional reference to parent group (injected). */
|
|
434
|
-
radioGroup: MDRadioGroup;
|
|
435
|
-
|
|
436
|
-
/** Id for internal input element. */
|
|
437
|
-
get inputId(): string {
|
|
438
|
-
return `${this.id || this._uniqueId}-input`;
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
/** Backing fields for state. */
|
|
442
|
-
private _checked: boolean = false;
|
|
443
|
-
private _disabled: boolean;
|
|
444
|
-
private _required: boolean;
|
|
445
|
-
private _value: any = null;
|
|
446
|
-
|
|
447
|
-
/** Callback to unlisten from unique selection dispatcher. */
|
|
448
|
-
private _removeUniqueSelectionListener: () => void = () => {};
|
|
449
|
-
|
|
450
|
-
/** Tracks last applied tabindex for optimization. */
|
|
451
|
-
private _previousTabIndex: number | undefined;
|
|
452
|
-
|
|
453
|
-
/** Template refs. */
|
|
454
|
-
@ViewChild('input') _inputElement: ElementRef<HTMLInputElement>;
|
|
455
|
-
|
|
456
|
-
/** Placeholder for potential animations flag (wired via template). */
|
|
457
|
-
@ViewChild('formField', { read: ElementRef, static: true })
|
|
458
|
-
_noopAnimations = false;
|
|
459
|
-
|
|
460
|
-
/** Injector used for afterNextRender microtask scheduling. */
|
|
461
|
-
private _injector = inject(Injector);
|
|
462
|
-
|
|
463
|
-
/**
|
|
464
|
-
* Inject parent group (optional) and host tabindex.
|
|
465
|
-
* Also initializes disabledInteractive default.
|
|
466
|
-
*/
|
|
467
|
-
constructor() {
|
|
468
|
-
const radioGroup = inject<MDRadioGroup>(MD_RADIO_GROUP, { optional: true })!;
|
|
469
|
-
const tabIndex = inject(new HostAttributeToken('tabindex'), { optional: true });
|
|
470
|
-
this.radioGroup = radioGroup;
|
|
471
|
-
this._disabledInteractive = false;
|
|
472
|
-
if (tabIndex) {
|
|
473
|
-
this.tabIndex = numberAttribute(tabIndex, 0);
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
/**
|
|
478
|
-
* Programmatic focus API.
|
|
479
|
-
* If `origin` provided, uses FocusMonitor to set proper focus classes.
|
|
480
|
-
*/
|
|
481
|
-
focus(options?: FocusOptions, origin?: FocusOrigin): void {
|
|
482
|
-
if (origin) {
|
|
483
|
-
this._focusMonitor.focusVia(this._inputElement, origin, options);
|
|
484
|
-
} else {
|
|
485
|
-
this._inputElement.nativeElement.focus(options);
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
/** Ask view to update (used by group). */
|
|
490
|
-
_markForCheck() {
|
|
491
|
-
this._changeDetector.markForCheck();
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
/** Initialize from group (name/value) and subscribe to unique selection dispatcher. */
|
|
495
|
-
ngOnInit() {
|
|
496
|
-
if (this.radioGroup) {
|
|
497
|
-
this.checked = this.radioGroup.value === this._value;
|
|
498
|
-
if (this.checked) {
|
|
499
|
-
this.radioGroup.selected = this;
|
|
500
|
-
}
|
|
501
|
-
this.name = this.radioGroup.name;
|
|
502
|
-
}
|
|
503
|
-
this._removeUniqueSelectionListener = this._radioDispatcher.listen((id, name) => {
|
|
504
|
-
if (id !== this.id && name === this.name) {
|
|
505
|
-
this.checked = false;
|
|
506
|
-
}
|
|
507
|
-
});
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
/** Keep tabindexes updated so only selected item is in tab order. */
|
|
511
|
-
ngDoCheck(): void {
|
|
512
|
-
this._updateTabIndex();
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
/** Attach focus monitor and click handler outside Angular for perf. */
|
|
516
|
-
ngAfterViewInit() {
|
|
517
|
-
this._updateTabIndex();
|
|
518
|
-
|
|
519
|
-
this._focusMonitor.monitor(this._elementRef, true).subscribe((focusOrigin) => {
|
|
520
|
-
// When focus leaves the host entirely, mark the group as touched.
|
|
521
|
-
if (!focusOrigin && this.radioGroup) {
|
|
522
|
-
this.radioGroup._touch();
|
|
523
|
-
}
|
|
524
|
-
});
|
|
525
|
-
|
|
526
|
-
// Prevent change detection storms: add listener outside Angular.
|
|
527
|
-
this._ngZone.runOutsideAngular(() => {
|
|
528
|
-
this._cleanupClick = this._renderer.listen(this._inputElement.nativeElement, 'click', this._onInputClick);
|
|
529
|
-
});
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
/** Cleanup listeners and monitors. */
|
|
533
|
-
ngOnDestroy() {
|
|
534
|
-
this._cleanupClick?.();
|
|
535
|
-
this._focusMonitor.stopMonitoring(this._elementRef);
|
|
536
|
-
this._removeUniqueSelectionListener();
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
/** Emit own change and, if part of a group, notify the group. */
|
|
540
|
-
private _emitChangeEvent(): void {
|
|
541
|
-
this.change.emit(new RadioChange(this, this._value));
|
|
542
|
-
}
|
|
543
|
-
|
|
544
|
-
/**
|
|
545
|
-
* Handles interaction on the real input.
|
|
546
|
-
* Ensures single selection, emits change, updates group model.
|
|
547
|
-
*/
|
|
548
|
-
_onInputInteraction(event: Event) {
|
|
549
|
-
event.stopPropagation();
|
|
550
|
-
|
|
551
|
-
if (!this.checked && !this.disabled) {
|
|
552
|
-
const groupValueChanged = this.radioGroup && this.value !== this.radioGroup.value;
|
|
553
|
-
|
|
554
|
-
this.checked = true;
|
|
555
|
-
this._emitChangeEvent();
|
|
556
|
-
|
|
557
|
-
if (this.radioGroup) {
|
|
558
|
-
this.radioGroup._controlValueAccessorChangeFn(this.value);
|
|
559
|
-
if (groupValueChanged) {
|
|
560
|
-
this.radioGroup._emitChangeEvent();
|
|
561
|
-
}
|
|
562
|
-
}
|
|
563
|
-
}
|
|
564
|
-
}
|
|
565
|
-
|
|
566
|
-
/**
|
|
567
|
-
* Click on the visual/touch target should behave like clicking the input.
|
|
568
|
-
* Also refocus the input if allowed.
|
|
569
|
-
*/
|
|
570
|
-
_onTouchTargetClick(event: Event) {
|
|
571
|
-
this._onInputInteraction(event);
|
|
572
|
-
if (!this.disabled || this.disabledInteractive) {
|
|
573
|
-
this._inputElement?.nativeElement.focus();
|
|
574
|
-
}
|
|
575
|
-
}
|
|
576
|
-
|
|
577
|
-
/** Setter for disabled that triggers CD when value changes. */
|
|
578
|
-
protected _setDisabled(value: boolean) {
|
|
579
|
-
if (this._disabled !== value) {
|
|
580
|
-
this._disabled = value;
|
|
581
|
-
this._changeDetector.markForCheck();
|
|
582
|
-
}
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
/**
|
|
586
|
-
* Prevent native input click from toggling when disabled but `disabledInteractive` is true.
|
|
587
|
-
* Keeps UI consistent with intended behavior.
|
|
588
|
-
*/
|
|
589
|
-
private _onInputClick = (event: Event) => {
|
|
590
|
-
if (this.disabled && this.disabledInteractive) {
|
|
591
|
-
event.preventDefault();
|
|
592
|
-
}
|
|
593
|
-
};
|
|
594
|
-
|
|
595
|
-
/**
|
|
596
|
-
* Maintain roving tabindex:
|
|
597
|
-
* - Selected radio keeps its configured tabIndex (defaults to 0).
|
|
598
|
-
* - Non-selected radios get tabindex="-1".
|
|
599
|
-
* Also re-routes focus to the selected item if needed after render.
|
|
600
|
-
*/
|
|
601
|
-
private _updateTabIndex() {
|
|
602
|
-
const group = this.radioGroup;
|
|
603
|
-
let value: number;
|
|
604
|
-
|
|
605
|
-
if (!group || !group.selected || this.disabled) {
|
|
606
|
-
value = this.tabIndex;
|
|
607
|
-
} else {
|
|
608
|
-
value = group.selected === this ? this.tabIndex : -1;
|
|
609
|
-
}
|
|
610
|
-
|
|
611
|
-
if (value !== this._previousTabIndex) {
|
|
612
|
-
const input: HTMLInputElement | undefined = this._inputElement?.nativeElement;
|
|
613
|
-
|
|
614
|
-
if (input) {
|
|
615
|
-
input.setAttribute('tabindex', value + '');
|
|
616
|
-
this._previousTabIndex = value;
|
|
617
|
-
|
|
618
|
-
// After the DOM updates, if focus landed on a non-selected radio, redirect it.
|
|
619
|
-
afterNextRender(
|
|
620
|
-
() => {
|
|
621
|
-
queueMicrotask(() => {
|
|
622
|
-
if (
|
|
623
|
-
group &&
|
|
624
|
-
group.selected &&
|
|
625
|
-
group.selected !== this &&
|
|
626
|
-
document.activeElement === input
|
|
627
|
-
) {
|
|
628
|
-
group.selected?._inputElement.nativeElement.focus();
|
|
629
|
-
if (document.activeElement === input) {
|
|
630
|
-
this._inputElement.nativeElement.blur();
|
|
631
|
-
}
|
|
632
|
-
}
|
|
633
|
-
});
|
|
634
|
-
},
|
|
635
|
-
{ injector: this._injector }
|
|
636
|
-
);
|
|
637
|
-
}
|
|
638
|
-
}
|
|
639
|
-
}
|
|
640
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
<span
|
|
2
|
-
class="mdc-optgroup-label"
|
|
3
|
-
role="presentation"
|
|
4
|
-
[class.mdc-list-item--disabled]="disabled"
|
|
5
|
-
[id]="_labelId">
|
|
6
|
-
<span class="mdc-list-item__primary-text">{{ label }} <ng-content></ng-content></span>
|
|
7
|
-
</span>
|
|
8
|
-
|
|
9
|
-
<ng-content select="md-option, ng-container"></ng-content>
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
@use './../../styles/vars.scss' as color-vars;
|
|
2
|
-
|
|
3
|
-
.mdc-optgroup-label {
|
|
4
|
-
display: flex;
|
|
5
|
-
position: relative;
|
|
6
|
-
align-items: center;
|
|
7
|
-
justify-content: flex-start;
|
|
8
|
-
overflow: hidden;
|
|
9
|
-
min-height: 36px;
|
|
10
|
-
padding: 0 8px;
|
|
11
|
-
outline: none;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.mdc-optgroup {
|
|
15
|
-
color: color-vars.$Dark-Gray-1;
|
|
16
|
-
font-family: 'Open Sans';
|
|
17
|
-
line-height: 1.25rem;
|
|
18
|
-
font-size: .875rem;
|
|
19
|
-
letter-spacing: .006rem;
|
|
20
|
-
font-weight: 500;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.mdc-optgroup-label .mdc-list-item__primary-text {
|
|
24
|
-
font-size: inherit;
|
|
25
|
-
font-weight: inherit;
|
|
26
|
-
letter-spacing: inherit;
|
|
27
|
-
line-height: inherit;
|
|
28
|
-
font-family: inherit;
|
|
29
|
-
text-decoration: inherit;
|
|
30
|
-
text-transform: inherit;
|
|
31
|
-
white-space: normal;
|
|
32
|
-
color: inherit;
|
|
33
|
-
}
|