@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,536 +0,0 @@
|
|
|
1
|
-
import { FocusKeyManager, FocusableOption } from '@angular/cdk/a11y';
|
|
2
|
-
import { Direction, Directionality } from '@angular/cdk/bidi';
|
|
3
|
-
import { ENTER, SPACE, hasModifierKey } from '@angular/cdk/keycodes';
|
|
4
|
-
import { SharedResizeObserver } from '@angular/cdk/observers/private';
|
|
5
|
-
import { Platform } from '@angular/cdk/platform';
|
|
6
|
-
import { ViewportRuler } from '@angular/cdk/scrolling';
|
|
7
|
-
import {
|
|
8
|
-
AfterContentChecked,
|
|
9
|
-
AfterContentInit,
|
|
10
|
-
AfterViewInit,
|
|
11
|
-
ChangeDetectorRef,
|
|
12
|
-
Directive,
|
|
13
|
-
ElementRef,
|
|
14
|
-
EventEmitter,
|
|
15
|
-
Injector,
|
|
16
|
-
Input,
|
|
17
|
-
NgZone,
|
|
18
|
-
OnDestroy,
|
|
19
|
-
Output,
|
|
20
|
-
QueryList,
|
|
21
|
-
Renderer2,
|
|
22
|
-
afterNextRender,
|
|
23
|
-
booleanAttribute,
|
|
24
|
-
inject,
|
|
25
|
-
numberAttribute,
|
|
26
|
-
} from '@angular/core';
|
|
27
|
-
import { EMPTY, Observable, Observer, Subject, merge, of as observableOf, timer } from 'rxjs';
|
|
28
|
-
import { debounceTime, filter, skip, startWith, switchMap, takeUntil } from 'rxjs/operators';
|
|
29
|
-
|
|
30
|
-
const passiveEventListenerOptions = { passive: true };
|
|
31
|
-
|
|
32
|
-
/** Direction to scroll the header when paginating. */
|
|
33
|
-
export type ScrollDirection = 'after' | 'before';
|
|
34
|
-
|
|
35
|
-
/** Delay (ms) before auto-scrolling kicks in on press-and-hold. */
|
|
36
|
-
const HEADER_SCROLL_DELAY = 650;
|
|
37
|
-
/** Interval (ms) for repeated scrolling while holding the paginator. */
|
|
38
|
-
const HEADER_SCROLL_INTERVAL = 100;
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Contract for focusable tab header items used by the header.
|
|
42
|
-
* Must expose an `elementRef` for measurement/positioning.
|
|
43
|
-
*/
|
|
44
|
-
export type PaginatedTabHeaderItem = FocusableOption & { elementRef: ElementRef };
|
|
45
|
-
|
|
46
|
-
@Directive()
|
|
47
|
-
/**
|
|
48
|
-
* Base class for a horizontally scrollable (paginated) tab header.
|
|
49
|
-
*
|
|
50
|
-
* @remarks
|
|
51
|
-
* - Manages keyboard navigation via `FocusKeyManager` (arrows/home/end).
|
|
52
|
-
* - Handles ink bar alignment and scroll-to-visible for the selected tab.
|
|
53
|
-
* - Supports RTL/LTR layouts and responsive resizing.
|
|
54
|
-
*
|
|
55
|
-
* Subclasses provide concrete template references (tab list elements, paginators, items)
|
|
56
|
-
* and implement `_itemSelected` to act on keyboard selection (Enter/Space).
|
|
57
|
-
*
|
|
58
|
-
* @example Handling keyboard selection in a subclass
|
|
59
|
-
* ```ts
|
|
60
|
-
* protected _itemSelected(event: KeyboardEvent) {
|
|
61
|
-
* this.selectFocusedIndex.emit(this.focusIndex);
|
|
62
|
-
* }
|
|
63
|
-
* ```
|
|
64
|
-
*/
|
|
65
|
-
export abstract class PaginatedTabHeader
|
|
66
|
-
implements AfterContentChecked, AfterContentInit, AfterViewInit, OnDestroy
|
|
67
|
-
{
|
|
68
|
-
/** Root host element (the header wrapper). */
|
|
69
|
-
protected _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);
|
|
70
|
-
/** For OnPush marking when values change. */
|
|
71
|
-
protected _changeDetectorRef = inject(ChangeDetectorRef);
|
|
72
|
-
/** Viewport ruler for resize/scrollbar metrics. */
|
|
73
|
-
private _viewportRuler = inject(ViewportRuler);
|
|
74
|
-
/** Optional RTL service to flip layout. */
|
|
75
|
-
private _dir = inject(Directionality, { optional: true });
|
|
76
|
-
/** For running timers/listeners outside Angular. */
|
|
77
|
-
private _ngZone = inject(NgZone);
|
|
78
|
-
/** Platform detection (legacy engines). */
|
|
79
|
-
private _platform = inject(Platform);
|
|
80
|
-
/** Efficient ResizeObserver sharing. */
|
|
81
|
-
private _sharedResizeObserver = inject(SharedResizeObserver);
|
|
82
|
-
/** Injector for `afterNextRender` scheduling. */
|
|
83
|
-
private _injector = inject(Injector);
|
|
84
|
-
/** Renderer for native event listeners & styles. */
|
|
85
|
-
private _renderer = inject(Renderer2);
|
|
86
|
-
|
|
87
|
-
/** Cleanup callbacks for host-level listeners. */
|
|
88
|
-
private _eventCleanups: (() => void)[];
|
|
89
|
-
|
|
90
|
-
// ---- Abstract element/item references provided by subclasses ----
|
|
91
|
-
|
|
92
|
-
/** List of focusable items (tab labels). */
|
|
93
|
-
abstract _items: QueryList<PaginatedTabHeaderItem>;
|
|
94
|
-
/** Ink bar API for alignment/hide. */
|
|
95
|
-
abstract _inkBar: { hide: () => void; alignToElement: (element: HTMLElement) => void };
|
|
96
|
-
/** Container that clips the scrollable tab list. */
|
|
97
|
-
abstract _tabListContainer: ElementRef<HTMLElement>;
|
|
98
|
-
/** The horizontally translated list element. */
|
|
99
|
-
abstract _tabList: ElementRef<HTMLElement>;
|
|
100
|
-
/** Inner list wrapper used for measurements. */
|
|
101
|
-
abstract _tabListInner: ElementRef<HTMLElement>;
|
|
102
|
-
/** Next paginator button element. */
|
|
103
|
-
abstract _nextPaginator: ElementRef<HTMLElement>;
|
|
104
|
-
/** Previous paginator button element. */
|
|
105
|
-
abstract _previousPaginator: ElementRef<HTMLElement>;
|
|
106
|
-
|
|
107
|
-
// ---- State ----
|
|
108
|
-
|
|
109
|
-
/** Current horizontal scroll translation in px (LTR positive moves content left). */
|
|
110
|
-
private _scrollDistance = 0;
|
|
111
|
-
/** Flag to know when selectedIndex changed between content checks. */
|
|
112
|
-
private _selectedIndexChanged = false;
|
|
113
|
-
/** Teardown notifier for streams. */
|
|
114
|
-
protected readonly _destroyed = new Subject<void>();
|
|
115
|
-
/** Whether to render/show pagination controls. */
|
|
116
|
-
_showPaginationControls = false;
|
|
117
|
-
/** Disable "scroll after" paginator. */
|
|
118
|
-
_disableScrollAfter = true;
|
|
119
|
-
/** Disable "scroll before" paginator. */
|
|
120
|
-
_disableScrollBefore = true;
|
|
121
|
-
/** Cached count of tab labels to detect additions/removals. */
|
|
122
|
-
private _tabLabelCount: number;
|
|
123
|
-
/** Marker to apply pending scroll distance change to DOM. */
|
|
124
|
-
private _scrollDistanceChanged: boolean;
|
|
125
|
-
/** Keyboard manager for roving focus. */
|
|
126
|
-
protected _keyManager: FocusKeyManager<PaginatedTabHeaderItem> | undefined;
|
|
127
|
-
/** Used to detect text-content changes affecting layout. */
|
|
128
|
-
private _currentTextContent: string;
|
|
129
|
-
/** Emits when auto-scrolling should stop (mouseleave or end). */
|
|
130
|
-
private _stopScrolling = new Subject<void>();
|
|
131
|
-
|
|
132
|
-
// ---- Inputs/Outputs ----
|
|
133
|
-
|
|
134
|
-
@Input() hideInkBar: boolean;
|
|
135
|
-
/**
|
|
136
|
-
* Disable pagination and force-fit all tabs (no scroll).
|
|
137
|
-
* @default false
|
|
138
|
-
*/
|
|
139
|
-
@Input({ transform: booleanAttribute })
|
|
140
|
-
disablePagination: boolean = false;
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* Currently selected tab index (drives ink bar & scroll-to-visible).
|
|
144
|
-
*/
|
|
145
|
-
@Input({ transform: numberAttribute })
|
|
146
|
-
get selectedIndex(): number {
|
|
147
|
-
return this._selectedIndex;
|
|
148
|
-
}
|
|
149
|
-
set selectedIndex(v: number) {
|
|
150
|
-
const value = isNaN(v) ? 0 : v;
|
|
151
|
-
if (this._selectedIndex != value) {
|
|
152
|
-
this._selectedIndexChanged = true;
|
|
153
|
-
this._selectedIndex = value;
|
|
154
|
-
if (this._keyManager) {
|
|
155
|
-
this._keyManager.updateActiveItem(value);
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
private _selectedIndex: number = 0;
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* Emits requested selection when user presses Enter/Space on a focused tab.
|
|
163
|
-
* Consumers typically update `selectedIndex` in response.
|
|
164
|
-
*/
|
|
165
|
-
@Output() readonly selectFocusedIndex: EventEmitter<number> = new EventEmitter<number>();
|
|
166
|
-
/** Emits when focus moves to a different tab header item. */
|
|
167
|
-
@Output() readonly indexFocused: EventEmitter<number> = new EventEmitter<number>();
|
|
168
|
-
|
|
169
|
-
constructor() {
|
|
170
|
-
// Host-level listeners registered outside Angular for performance.
|
|
171
|
-
this._eventCleanups = this._ngZone.runOutsideAngular(() => [
|
|
172
|
-
this._renderer.listen(this._elementRef.nativeElement, 'mouseleave', () => this._stopInterval()),
|
|
173
|
-
]);
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
/**
|
|
177
|
-
* Subclass must implement: what happens when user "selects"
|
|
178
|
-
* the focused item via keyboard (Enter/Space).
|
|
179
|
-
*/
|
|
180
|
-
protected abstract _itemSelected(event: KeyboardEvent): void;
|
|
181
|
-
|
|
182
|
-
/** Lifecycle: attach touch handlers for press-and-hold scrolling. */
|
|
183
|
-
ngAfterViewInit() {
|
|
184
|
-
this._eventCleanups.push(
|
|
185
|
-
this._renderer.listen(
|
|
186
|
-
this._previousPaginator.nativeElement,
|
|
187
|
-
'touchstart',
|
|
188
|
-
() => this._handlePaginatorPress('before'),
|
|
189
|
-
passiveEventListenerOptions
|
|
190
|
-
),
|
|
191
|
-
this._renderer.listen(
|
|
192
|
-
this._nextPaginator.nativeElement,
|
|
193
|
-
'touchstart',
|
|
194
|
-
() => this._handlePaginatorPress('after'),
|
|
195
|
-
passiveEventListenerOptions
|
|
196
|
-
)
|
|
197
|
-
);
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
/** Lifecycle: set up keyboard manager, observers and initial alignment. */
|
|
201
|
-
ngAfterContentInit() {
|
|
202
|
-
const dirChange = this._dir ? this._dir.change : observableOf('ltr');
|
|
203
|
-
const resize = this._sharedResizeObserver
|
|
204
|
-
.observe(this._elementRef.nativeElement)
|
|
205
|
-
.pipe(debounceTime(32), takeUntil(this._destroyed));
|
|
206
|
-
const viewportResize = this._viewportRuler.change(150).pipe(takeUntil(this._destroyed));
|
|
207
|
-
const realign = () => {
|
|
208
|
-
this.updatePagination();
|
|
209
|
-
this._alignInkBarToSelectedTab();
|
|
210
|
-
};
|
|
211
|
-
|
|
212
|
-
this._keyManager = new FocusKeyManager<PaginatedTabHeaderItem>(this._items)
|
|
213
|
-
.withHorizontalOrientation(this._getLayoutDirection())
|
|
214
|
-
.withHomeAndEnd()
|
|
215
|
-
.withWrap()
|
|
216
|
-
.skipPredicate(() => false);
|
|
217
|
-
|
|
218
|
-
this._keyManager.updateActiveItem(Math.max(this._selectedIndex, 0));
|
|
219
|
-
afterNextRender(realign, { injector: this._injector });
|
|
220
|
-
|
|
221
|
-
merge(dirChange, viewportResize, resize, this._items.changes, this._itemsResized())
|
|
222
|
-
.pipe(takeUntil(this._destroyed))
|
|
223
|
-
.subscribe(() => {
|
|
224
|
-
this._ngZone.run(() => {
|
|
225
|
-
// Defer to allow DOM to settle (e.g., fonts, labels).
|
|
226
|
-
Promise.resolve().then(() => {
|
|
227
|
-
this._scrollDistance = Math.max(0, Math.min(this._getMaxScrollDistance(), this._scrollDistance));
|
|
228
|
-
realign();
|
|
229
|
-
});
|
|
230
|
-
});
|
|
231
|
-
this._keyManager?.withHorizontalOrientation(this._getLayoutDirection());
|
|
232
|
-
});
|
|
233
|
-
|
|
234
|
-
this._keyManager.change.subscribe((newFocusIndex) => {
|
|
235
|
-
this.indexFocused.emit(newFocusIndex);
|
|
236
|
-
this._setTabFocus(newFocusIndex);
|
|
237
|
-
});
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
/**
|
|
241
|
-
* Observe when any header item has (re)measured to a non-zero size.
|
|
242
|
-
* Helps re-evaluate pagination after lazy content/label changes.
|
|
243
|
-
*/
|
|
244
|
-
private _itemsResized(): Observable<ResizeObserverEntry[]> {
|
|
245
|
-
if (typeof ResizeObserver !== 'function') {
|
|
246
|
-
return EMPTY;
|
|
247
|
-
}
|
|
248
|
-
return this._items.changes.pipe(
|
|
249
|
-
startWith(this._items),
|
|
250
|
-
switchMap(
|
|
251
|
-
(tabItems: QueryList<PaginatedTabHeaderItem>) =>
|
|
252
|
-
new Observable((observer: Observer<ResizeObserverEntry[]>) =>
|
|
253
|
-
this._ngZone.runOutsideAngular(() => {
|
|
254
|
-
const resizeObserver = new ResizeObserver((entries) => observer.next(entries));
|
|
255
|
-
tabItems.forEach((item) => resizeObserver.observe(item.elementRef.nativeElement));
|
|
256
|
-
return () => resizeObserver.disconnect();
|
|
257
|
-
})
|
|
258
|
-
)
|
|
259
|
-
),
|
|
260
|
-
// Ignore the initial synchronous fire to avoid redundant realign.
|
|
261
|
-
skip(1),
|
|
262
|
-
filter((entries) => entries.some((e) => e.contentRect.width > 0 && e.contentRect.height > 0))
|
|
263
|
-
);
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
/** Lifecycle: react to item count/selection/scroll changes and flush DOM updates. */
|
|
267
|
-
ngAfterContentChecked(): void {
|
|
268
|
-
if (this._tabLabelCount != this._items.length) {
|
|
269
|
-
this.updatePagination();
|
|
270
|
-
this._tabLabelCount = this._items.length;
|
|
271
|
-
this._changeDetectorRef.markForCheck();
|
|
272
|
-
}
|
|
273
|
-
if (this._selectedIndexChanged) {
|
|
274
|
-
this._scrollToLabel(this._selectedIndex);
|
|
275
|
-
this._checkScrollingControls();
|
|
276
|
-
this._alignInkBarToSelectedTab();
|
|
277
|
-
this._selectedIndexChanged = false;
|
|
278
|
-
this._changeDetectorRef.markForCheck();
|
|
279
|
-
}
|
|
280
|
-
if (this._scrollDistanceChanged) {
|
|
281
|
-
this._updateTabScrollPosition();
|
|
282
|
-
this._scrollDistanceChanged = false;
|
|
283
|
-
this._changeDetectorRef.markForCheck();
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
/** Lifecycle: teardown listeners/streams. */
|
|
288
|
-
ngOnDestroy() {
|
|
289
|
-
this._eventCleanups.forEach((cleanup) => cleanup());
|
|
290
|
-
this._keyManager?.destroy();
|
|
291
|
-
this._destroyed.next();
|
|
292
|
-
this._destroyed.complete();
|
|
293
|
-
this._stopScrolling.complete();
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
/**
|
|
297
|
-
* Handle keydown on the header container.
|
|
298
|
-
* Space/Enter select the focused tab; arrows/home/end are delegated to the key manager.
|
|
299
|
-
*/
|
|
300
|
-
_handleKeydown(event: KeyboardEvent) {
|
|
301
|
-
if (hasModifierKey(event)) {
|
|
302
|
-
return;
|
|
303
|
-
}
|
|
304
|
-
switch (event.keyCode) {
|
|
305
|
-
case ENTER:
|
|
306
|
-
case SPACE:
|
|
307
|
-
if (this.focusIndex !== this.selectedIndex) {
|
|
308
|
-
const item = this._items.get(this.focusIndex);
|
|
309
|
-
if (item && !item.disabled) {
|
|
310
|
-
this.selectFocusedIndex.emit(this.focusIndex);
|
|
311
|
-
this._itemSelected(event);
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
break;
|
|
315
|
-
default:
|
|
316
|
-
this._keyManager?.onKeydown(event);
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
/** Called when projected content text changes may affect layout/widths. */
|
|
321
|
-
_onContentChanges() {
|
|
322
|
-
const textContent = this._elementRef.nativeElement.textContent;
|
|
323
|
-
if (textContent !== this._currentTextContent) {
|
|
324
|
-
this._currentTextContent = textContent || '';
|
|
325
|
-
this._ngZone.run(() => {
|
|
326
|
-
this.updatePagination();
|
|
327
|
-
this._alignInkBarToSelectedTab();
|
|
328
|
-
this._changeDetectorRef.markForCheck();
|
|
329
|
-
});
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
/** Recompute pagination state and apply current scroll position. */
|
|
334
|
-
updatePagination() {
|
|
335
|
-
this._checkPaginationEnabled();
|
|
336
|
-
this._checkScrollingControls();
|
|
337
|
-
this._updateTabScrollPosition();
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
/** Index of the currently focused item in the key manager. */
|
|
341
|
-
get focusIndex(): number {
|
|
342
|
-
return this._keyManager ? this._keyManager.activeItemIndex! : 0;
|
|
343
|
-
}
|
|
344
|
-
set focusIndex(value: number) {
|
|
345
|
-
if (!this._isValidIndex(value) || this.focusIndex === value || !this._keyManager) {
|
|
346
|
-
return;
|
|
347
|
-
}
|
|
348
|
-
this._keyManager.setActiveItem(value);
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
/** Returns whether the given index is valid for the items list. */
|
|
352
|
-
_isValidIndex(index: number): boolean {
|
|
353
|
-
return this._items ? !!this._items.toArray()[index] : true;
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
/**
|
|
357
|
-
* Moves focus to a given tab and ensures it is visible within the scroll container.
|
|
358
|
-
* Also snaps container scroll to an edge (LTR/RTL) to avoid native scroll drift.
|
|
359
|
-
*/
|
|
360
|
-
_setTabFocus(tabIndex: number) {
|
|
361
|
-
if (this._showPaginationControls) {
|
|
362
|
-
this._scrollToLabel(tabIndex);
|
|
363
|
-
}
|
|
364
|
-
if (this._items && this._items.length) {
|
|
365
|
-
this._items.toArray()[tabIndex].focus();
|
|
366
|
-
const containerEl = this._tabListContainer.nativeElement;
|
|
367
|
-
const dir = this._getLayoutDirection();
|
|
368
|
-
if (dir == 'ltr') {
|
|
369
|
-
containerEl.scrollLeft = 0;
|
|
370
|
-
} else {
|
|
371
|
-
containerEl.scrollLeft = containerEl.scrollWidth - containerEl.offsetWidth;
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
/** Current layout direction derived from `Directionality`. */
|
|
377
|
-
_getLayoutDirection(): Direction {
|
|
378
|
-
return this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
/** Applies the current scroll transform to the tab list element. */
|
|
382
|
-
_updateTabScrollPosition() {
|
|
383
|
-
if (this.disablePagination) {
|
|
384
|
-
return;
|
|
385
|
-
}
|
|
386
|
-
const scrollDistance = this.scrollDistance;
|
|
387
|
-
const translateX = this._getLayoutDirection() === 'ltr' ? -scrollDistance : scrollDistance;
|
|
388
|
-
this._tabList.nativeElement.style.transform = `translateX(${Math.round(translateX)}px)`;
|
|
389
|
-
// Legacy engines required to reset container scroll to avoid jitter.
|
|
390
|
-
if (this._platform.TRIDENT || this._platform.EDGE) {
|
|
391
|
-
this._tabListContainer.nativeElement.scrollLeft = 0;
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
/** Current scroll distance (px). Setting it clamps to valid range and flags for DOM update. */
|
|
396
|
-
get scrollDistance(): number {
|
|
397
|
-
return this._scrollDistance;
|
|
398
|
-
}
|
|
399
|
-
set scrollDistance(value: number) {
|
|
400
|
-
this._scrollTo(value);
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
/** Scrolls the header by one third of the visible width in the given direction. */
|
|
404
|
-
_scrollHeader(direction: ScrollDirection) {
|
|
405
|
-
const viewLength = this._tabListContainer.nativeElement.offsetWidth;
|
|
406
|
-
const scrollAmount = ((direction == 'before' ? -1 : 1) * viewLength) / 3;
|
|
407
|
-
return this._scrollTo(this._scrollDistance + scrollAmount);
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
/** Single-click paginator handler. */
|
|
411
|
-
_handlePaginatorClick(direction: ScrollDirection) {
|
|
412
|
-
this._stopInterval();
|
|
413
|
-
this._scrollHeader(direction);
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
/**
|
|
417
|
-
* Ensures the tab at `labelIndex` is fully visible within the scroll range.
|
|
418
|
-
* Adjusts `scrollDistance` as needed based on LTR/RTL calculations.
|
|
419
|
-
*/
|
|
420
|
-
_scrollToLabel(labelIndex: number) {
|
|
421
|
-
if (this.disablePagination) {
|
|
422
|
-
return;
|
|
423
|
-
}
|
|
424
|
-
const selectedLabel = this._items ? this._items.toArray()[labelIndex] : null;
|
|
425
|
-
if (!selectedLabel) {
|
|
426
|
-
return;
|
|
427
|
-
}
|
|
428
|
-
const viewLength = this._tabListContainer.nativeElement.offsetWidth;
|
|
429
|
-
const { offsetLeft, offsetWidth } = selectedLabel.elementRef.nativeElement;
|
|
430
|
-
|
|
431
|
-
let labelBeforePos: number, labelAfterPos: number;
|
|
432
|
-
if (this._getLayoutDirection() == 'ltr') {
|
|
433
|
-
labelBeforePos = offsetLeft;
|
|
434
|
-
labelAfterPos = labelBeforePos + offsetWidth;
|
|
435
|
-
} else {
|
|
436
|
-
labelAfterPos = this._tabListInner.nativeElement.offsetWidth - offsetLeft;
|
|
437
|
-
labelBeforePos = labelAfterPos - offsetWidth;
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
const beforeVisiblePos = this.scrollDistance;
|
|
441
|
-
const afterVisiblePos = this.scrollDistance + viewLength;
|
|
442
|
-
|
|
443
|
-
if (labelBeforePos < beforeVisiblePos) {
|
|
444
|
-
this.scrollDistance -= beforeVisiblePos - labelBeforePos;
|
|
445
|
-
} else if (labelAfterPos > afterVisiblePos) {
|
|
446
|
-
this.scrollDistance += Math.min(labelAfterPos - afterVisiblePos, labelBeforePos - beforeVisiblePos);
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
/** Evaluates whether pagination controls should be shown based on content width. */
|
|
451
|
-
_checkPaginationEnabled() {
|
|
452
|
-
if (this.disablePagination) {
|
|
453
|
-
this._showPaginationControls = false;
|
|
454
|
-
} else {
|
|
455
|
-
const scrollWidth = this._tabListInner.nativeElement.scrollWidth;
|
|
456
|
-
const containerWidth = this._elementRef.nativeElement.offsetWidth;
|
|
457
|
-
const isEnabled = scrollWidth - containerWidth >= 5;
|
|
458
|
-
if (!isEnabled) {
|
|
459
|
-
this.scrollDistance = 0;
|
|
460
|
-
}
|
|
461
|
-
if (isEnabled !== this._showPaginationControls) {
|
|
462
|
-
this._showPaginationControls = isEnabled;
|
|
463
|
-
this._changeDetectorRef.markForCheck();
|
|
464
|
-
}
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
/** Enables/disables paginator buttons based on current scroll position. */
|
|
469
|
-
_checkScrollingControls() {
|
|
470
|
-
if (this.disablePagination) {
|
|
471
|
-
this._disableScrollAfter = this._disableScrollBefore = true;
|
|
472
|
-
} else {
|
|
473
|
-
this._disableScrollBefore = this.scrollDistance == 0;
|
|
474
|
-
this._disableScrollAfter = this.scrollDistance == this._getMaxScrollDistance();
|
|
475
|
-
this._changeDetectorRef.markForCheck();
|
|
476
|
-
}
|
|
477
|
-
}
|
|
478
|
-
|
|
479
|
-
/** Maximum scrollable distance of the tab list (px). */
|
|
480
|
-
_getMaxScrollDistance(): number {
|
|
481
|
-
const lengthOfTabList = this._tabListInner.nativeElement.scrollWidth;
|
|
482
|
-
const viewLength = this._tabListContainer.nativeElement.offsetWidth;
|
|
483
|
-
return lengthOfTabList - viewLength || 0;
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
/** Aligns the ink bar to the selected tab or hides it if no selection. */
|
|
487
|
-
_alignInkBarToSelectedTab(): void {
|
|
488
|
-
if(this.hideInkBar) return;
|
|
489
|
-
const selectedItem = this._items && this._items.length ? this._items.toArray()[this.selectedIndex] : null;
|
|
490
|
-
const selectedLabelWrapper = selectedItem ? selectedItem.elementRef.nativeElement : null;
|
|
491
|
-
if (selectedLabelWrapper) {
|
|
492
|
-
this._inkBar.alignToElement(selectedLabelWrapper);
|
|
493
|
-
} else {
|
|
494
|
-
this._inkBar.hide();
|
|
495
|
-
}
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
/** Stops any ongoing auto-scroll interval. */
|
|
499
|
-
_stopInterval() {
|
|
500
|
-
this._stopScrolling.next();
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
/**
|
|
504
|
-
* Handles press-and-hold on a paginator button for continuous scrolling.
|
|
505
|
-
* Uses a delay before repeating to avoid accidental long-press.
|
|
506
|
-
*/
|
|
507
|
-
_handlePaginatorPress(direction: ScrollDirection, mouseEvent?: MouseEvent) {
|
|
508
|
-
if (mouseEvent && mouseEvent.button != null && mouseEvent.button !== 0) {
|
|
509
|
-
return;
|
|
510
|
-
}
|
|
511
|
-
this._stopInterval();
|
|
512
|
-
timer(HEADER_SCROLL_DELAY, HEADER_SCROLL_INTERVAL)
|
|
513
|
-
.pipe(takeUntil(merge(this._stopScrolling, this._destroyed)))
|
|
514
|
-
.subscribe(() => {
|
|
515
|
-
const { maxScrollDistance, distance } = this._scrollHeader(direction);
|
|
516
|
-
if (distance === 0 || distance >= maxScrollDistance) {
|
|
517
|
-
this._stopInterval();
|
|
518
|
-
}
|
|
519
|
-
});
|
|
520
|
-
}
|
|
521
|
-
|
|
522
|
-
/**
|
|
523
|
-
* Clamps and applies a new scroll position.
|
|
524
|
-
* @returns The max scroll distance and the clamped distance for convenience.
|
|
525
|
-
*/
|
|
526
|
-
private _scrollTo(position: number) {
|
|
527
|
-
if (this.disablePagination) {
|
|
528
|
-
return { maxScrollDistance: 0, distance: 0 };
|
|
529
|
-
}
|
|
530
|
-
const maxScrollDistance = this._getMaxScrollDistance();
|
|
531
|
-
this._scrollDistance = Math.max(0, Math.min(maxScrollDistance, position));
|
|
532
|
-
this._scrollDistanceChanged = true;
|
|
533
|
-
this._checkScrollingControls();
|
|
534
|
-
return { maxScrollDistance, distance: this._scrollDistance };
|
|
535
|
-
}
|
|
536
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
<div
|
|
2
|
-
class="mdc-tab-body-content"
|
|
3
|
-
#content
|
|
4
|
-
cdkScrollable
|
|
5
|
-
[class.tab-body-content-left]="_position === 'left'"
|
|
6
|
-
[class.tab-body-content-right]="_position === 'right'"
|
|
7
|
-
[class.tab-body-content-can-animate]="_position === 'center' || _previousPosition === 'center'">
|
|
8
|
-
<ng-template mdTabBodyHost></ng-template>
|
|
9
|
-
</div>
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
.mdc-tab-body {
|
|
2
|
-
top: 0;
|
|
3
|
-
left: 0;
|
|
4
|
-
right: 0;
|
|
5
|
-
bottom: 0;
|
|
6
|
-
position: absolute;
|
|
7
|
-
display: block;
|
|
8
|
-
overflow: hidden;
|
|
9
|
-
outline: 0;
|
|
10
|
-
|
|
11
|
-
flex-basis: 100%;
|
|
12
|
-
|
|
13
|
-
&.mdc-tab-body-active {
|
|
14
|
-
position: relative;
|
|
15
|
-
overflow-x: hidden;
|
|
16
|
-
overflow-y: auto;
|
|
17
|
-
z-index: 1;
|
|
18
|
-
flex-grow: 1;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.mdc-tab-group.mdc-tab-group-dynamic-height &.mdc-tab-body-active {
|
|
22
|
-
overflow-y: hidden;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.mdc-tab-body-content {
|
|
27
|
-
height: 100%;
|
|
28
|
-
overflow: auto;
|
|
29
|
-
transform: none;
|
|
30
|
-
visibility: hidden;
|
|
31
|
-
|
|
32
|
-
.tab-body-animating > &,
|
|
33
|
-
.mdc-tab-body-active > & {
|
|
34
|
-
visibility: visible;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.tab-body-animating > & {
|
|
38
|
-
min-height: 1px;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.mdc-tab-group-dynamic-height & {
|
|
42
|
-
overflow: hidden;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.tab-body-content-can-animate {
|
|
47
|
-
transition: transform 200ms 1ms cubic-bezier(0.35, 0, 0.25, 1);
|
|
48
|
-
|
|
49
|
-
.mdc-tab-body-wrapper._animation-noopable & {
|
|
50
|
-
transition: none;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.tab-body-content-left {
|
|
55
|
-
transform: translate3d(-100%, 0, 0);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.tab-body-content-right {
|
|
59
|
-
transform: translate3d(100%, 0, 0);
|
|
60
|
-
}
|