@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,759 +0,0 @@
|
|
|
1
|
-
import { addAriaReferencedId, removeAriaReferencedId } from '@angular/cdk/a11y';
|
|
2
|
-
import { Directionality } from '@angular/cdk/bidi';
|
|
3
|
-
import { DOWN_ARROW, ENTER, ESCAPE, TAB, UP_ARROW, hasModifierKey } from '@angular/cdk/keycodes';
|
|
4
|
-
import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';
|
|
5
|
-
import {
|
|
6
|
-
ConnectedPosition,
|
|
7
|
-
createFlexibleConnectedPositionStrategy,
|
|
8
|
-
createOverlayRef,
|
|
9
|
-
createRepositionScrollStrategy,
|
|
10
|
-
FlexibleConnectedPositionStrategy,
|
|
11
|
-
OverlayConfig,
|
|
12
|
-
OverlayRef,
|
|
13
|
-
PositionStrategy,
|
|
14
|
-
ScrollStrategy,
|
|
15
|
-
} from '@angular/cdk/overlay';
|
|
16
|
-
import { _getEventTarget, _getFocusedElementPierceShadowDom } from '@angular/cdk/platform';
|
|
17
|
-
import { TemplatePortal } from '@angular/cdk/portal';
|
|
18
|
-
import { ViewportRuler } from '@angular/cdk/scrolling';
|
|
19
|
-
import {
|
|
20
|
-
AfterViewInit,
|
|
21
|
-
ChangeDetectorRef,
|
|
22
|
-
Directive,
|
|
23
|
-
ElementRef,
|
|
24
|
-
EnvironmentInjector,
|
|
25
|
-
InjectionToken,
|
|
26
|
-
Injector,
|
|
27
|
-
Input,
|
|
28
|
-
NgZone,
|
|
29
|
-
OnChanges,
|
|
30
|
-
OnDestroy,
|
|
31
|
-
Renderer2,
|
|
32
|
-
SimpleChanges,
|
|
33
|
-
ViewContainerRef,
|
|
34
|
-
afterNextRender,
|
|
35
|
-
booleanAttribute,
|
|
36
|
-
forwardRef,
|
|
37
|
-
inject,
|
|
38
|
-
} from '@angular/core';
|
|
39
|
-
import { coerceArray } from '@angular/cdk/coercion';
|
|
40
|
-
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
41
|
-
import { Observable, Subject, Subscription, defer, merge, of as observableOf } from 'rxjs';
|
|
42
|
-
import { delay, filter, map, startWith, switchMap, take, tap } from 'rxjs/operators';
|
|
43
|
-
import { MD_AUTOCOMPLETE_DEFAULT_OPTIONS, MDAutocomplete, MdAutocompleteDefaultOptions } from './autocomplete';
|
|
44
|
-
import { _countGroupLabelsBeforeOption, _getOptionScrollPosition, MDOption, MDOptionSelectionChange } from 'ui-kit-lib';
|
|
45
|
-
import { MDAutocompleteOrigin } from './autocomplete-origin';
|
|
46
|
-
|
|
47
|
-
export const MD_AUTOCOMPLETE_VALUE_ACCESSOR: any = {
|
|
48
|
-
provide: NG_VALUE_ACCESSOR,
|
|
49
|
-
useExisting: forwardRef(() => MDAutocompleteTrigger),
|
|
50
|
-
multi: true,
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
export function getMDAutocompleteMissingPanelError(): Error {
|
|
54
|
-
return Error(
|
|
55
|
-
'Attempting to open an undefined instance of `md-autocomplete`. ' +
|
|
56
|
-
'Make sure that the id passed to the `mdAutocomplete` is correct and that ' +
|
|
57
|
-
"you're attempting to open it after the ngAfterContentInit hook."
|
|
58
|
-
);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export const MD_AUTOCOMPLETE_SCROLL_STRATEGY = new InjectionToken<() => ScrollStrategy>(
|
|
62
|
-
'md-autocomplete-scroll-strategy',
|
|
63
|
-
{
|
|
64
|
-
providedIn: 'root',
|
|
65
|
-
factory: () => {
|
|
66
|
-
const injector = inject(Injector);
|
|
67
|
-
return () => createRepositionScrollStrategy(injector);
|
|
68
|
-
},
|
|
69
|
-
}
|
|
70
|
-
);
|
|
71
|
-
|
|
72
|
-
@Directive({
|
|
73
|
-
selector: `input[mdAutocomplete], textarea[mdAutocomplete]`,
|
|
74
|
-
host: {
|
|
75
|
-
class: 'md-mdc-autocomplete-trigger',
|
|
76
|
-
'[attr.autocomplete]': 'autocompleteAttribute',
|
|
77
|
-
'[attr.role]': 'autocompleteDisabled ? null : "combobox"',
|
|
78
|
-
'[attr.aria-autocomplete]': 'autocompleteDisabled ? null : "list"',
|
|
79
|
-
'[attr.aria-activedescendant]': '(panelOpen && activeOption) ? activeOption.id : null',
|
|
80
|
-
'[attr.aria-expanded]': 'autocompleteDisabled ? null : panelOpen.toString()',
|
|
81
|
-
'[attr.aria-controls]': '(autocompleteDisabled || !panelOpen) ? null : autocomplete?.id',
|
|
82
|
-
'[attr.aria-haspopup]': 'autocompleteDisabled ? null : "listbox"',
|
|
83
|
-
'(focusin)': '_handleFocus()',
|
|
84
|
-
'(blur)': '_onTouched()',
|
|
85
|
-
'(input)': '_handleInput($event)',
|
|
86
|
-
'(keydown)': '_handleKeydown($event)',
|
|
87
|
-
'(click)': '_handleClick()',
|
|
88
|
-
},
|
|
89
|
-
exportAs: 'mdAutocompleteTrigger',
|
|
90
|
-
providers: [MD_AUTOCOMPLETE_VALUE_ACCESSOR],
|
|
91
|
-
})
|
|
92
|
-
export class MDAutocompleteTrigger implements ControlValueAccessor, AfterViewInit, OnChanges, OnDestroy {
|
|
93
|
-
private _environmentInjector = inject(EnvironmentInjector);
|
|
94
|
-
private _element = inject<ElementRef<HTMLInputElement>>(ElementRef);
|
|
95
|
-
private _injector = inject(Injector);
|
|
96
|
-
private _viewContainerRef = inject(ViewContainerRef);
|
|
97
|
-
private _zone = inject(NgZone);
|
|
98
|
-
private _changeDetectorRef = inject(ChangeDetectorRef);
|
|
99
|
-
private _dir = inject(Directionality, { optional: true });
|
|
100
|
-
private _viewportRuler = inject(ViewportRuler);
|
|
101
|
-
private _scrollStrategy = inject(MD_AUTOCOMPLETE_SCROLL_STRATEGY);
|
|
102
|
-
private _renderer = inject(Renderer2);
|
|
103
|
-
private _animationsDisabled = false;
|
|
104
|
-
private _defaults = inject<MdAutocompleteDefaultOptions | null>(MD_AUTOCOMPLETE_DEFAULT_OPTIONS, {
|
|
105
|
-
optional: true,
|
|
106
|
-
});
|
|
107
|
-
|
|
108
|
-
private _overlayRef: OverlayRef | null;
|
|
109
|
-
private _portal: TemplatePortal;
|
|
110
|
-
private _componentDestroyed = false;
|
|
111
|
-
private _initialized = new Subject<void>();
|
|
112
|
-
private _keydownSubscription: Subscription | null;
|
|
113
|
-
private _outsideClickSubscription: Subscription | null;
|
|
114
|
-
private _cleanupWindowBlur: (() => void) | undefined;
|
|
115
|
-
|
|
116
|
-
private _previousValue: string | number | null;
|
|
117
|
-
|
|
118
|
-
private _valueOnAttach: string | number | null;
|
|
119
|
-
|
|
120
|
-
private _valueOnLastKeydown: string | null;
|
|
121
|
-
|
|
122
|
-
private _positionStrategy: FlexibleConnectedPositionStrategy;
|
|
123
|
-
|
|
124
|
-
private _manuallyFloatingLabel = false;
|
|
125
|
-
|
|
126
|
-
private _closingActionsSubscription: Subscription;
|
|
127
|
-
|
|
128
|
-
private _viewportSubscription = Subscription.EMPTY;
|
|
129
|
-
|
|
130
|
-
private _breakpointObserver = inject(BreakpointObserver);
|
|
131
|
-
private _handsetLandscapeSubscription = Subscription.EMPTY;
|
|
132
|
-
|
|
133
|
-
private _canOpenOnNextFocus = true;
|
|
134
|
-
|
|
135
|
-
private _valueBeforeAutoSelection: string | undefined;
|
|
136
|
-
|
|
137
|
-
private _pendingAutoselectedOption: MDOption | null;
|
|
138
|
-
|
|
139
|
-
private readonly _closeKeyEventStream = new Subject<void>();
|
|
140
|
-
|
|
141
|
-
readonly _overlayPanelClass = coerceArray(this._defaults?.overlayPanelClass || []);
|
|
142
|
-
|
|
143
|
-
private _windowBlurHandler = () => {
|
|
144
|
-
this._canOpenOnNextFocus = this.panelOpen || !this._hasFocus();
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
_onChange: (value: any) => void = () => {};
|
|
148
|
-
|
|
149
|
-
_onTouched = () => {};
|
|
150
|
-
|
|
151
|
-
@Input('mdAutocomplete') autocomplete: MDAutocomplete;
|
|
152
|
-
|
|
153
|
-
@Input('mdAutocompletePosition') position: 'auto' | 'above' | 'below' = 'auto';
|
|
154
|
-
|
|
155
|
-
@Input('mdAutocompleteConnectedTo') connectedTo: MDAutocompleteOrigin;
|
|
156
|
-
|
|
157
|
-
@Input('autocomplete') autocompleteAttribute: string = 'off';
|
|
158
|
-
|
|
159
|
-
@Input({ alias: 'mdAutocompleteDisabled', transform: booleanAttribute })
|
|
160
|
-
autocompleteDisabled: boolean;
|
|
161
|
-
|
|
162
|
-
constructor(...args: unknown[]);
|
|
163
|
-
constructor() {}
|
|
164
|
-
|
|
165
|
-
private _aboveClass = 'md-mdc-autocomplete-panel-above';
|
|
166
|
-
|
|
167
|
-
ngAfterViewInit() {
|
|
168
|
-
this._initialized.next();
|
|
169
|
-
this._initialized.complete();
|
|
170
|
-
this._cleanupWindowBlur = this._renderer.listen('window', 'blur', this._windowBlurHandler);
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
ngOnChanges(changes: SimpleChanges) {
|
|
174
|
-
if (changes['position'] && this._positionStrategy) {
|
|
175
|
-
this._setStrategyPositions(this._positionStrategy);
|
|
176
|
-
|
|
177
|
-
if (this.panelOpen) {
|
|
178
|
-
this._overlayRef!.updatePosition();
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
ngOnDestroy() {
|
|
184
|
-
this._cleanupWindowBlur?.();
|
|
185
|
-
this._handsetLandscapeSubscription.unsubscribe();
|
|
186
|
-
this._viewportSubscription.unsubscribe();
|
|
187
|
-
this._componentDestroyed = true;
|
|
188
|
-
this._destroyPanel();
|
|
189
|
-
this._closeKeyEventStream.complete();
|
|
190
|
-
this._clearFromModal();
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
get panelOpen(): boolean {
|
|
194
|
-
return this._overlayAttached && this.autocomplete.showPanel;
|
|
195
|
-
}
|
|
196
|
-
private _overlayAttached: boolean = false;
|
|
197
|
-
|
|
198
|
-
openPanel(): void {
|
|
199
|
-
this._openPanelInternal();
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
closePanel(): void {
|
|
203
|
-
if (!this._overlayAttached) {
|
|
204
|
-
return;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
if (this.panelOpen) {
|
|
208
|
-
this._zone.run(() => {
|
|
209
|
-
this.autocomplete.closed.emit();
|
|
210
|
-
});
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
if (this.autocomplete._latestOpeningTrigger === this) {
|
|
214
|
-
this.autocomplete._isOpen = false;
|
|
215
|
-
this.autocomplete._latestOpeningTrigger = null;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
this._overlayAttached = false;
|
|
219
|
-
this._pendingAutoselectedOption = null;
|
|
220
|
-
|
|
221
|
-
if (this._overlayRef && this._overlayRef.hasAttached()) {
|
|
222
|
-
this._overlayRef.detach();
|
|
223
|
-
this._closingActionsSubscription.unsubscribe();
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
this._updatePanelState();
|
|
227
|
-
|
|
228
|
-
if (!this._componentDestroyed) {
|
|
229
|
-
this._changeDetectorRef.detectChanges();
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
if (this._trackedModal) {
|
|
233
|
-
removeAriaReferencedId(this._trackedModal, 'aria-owns', this.autocomplete.id);
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
updatePosition(): void {
|
|
238
|
-
if (this._overlayAttached) {
|
|
239
|
-
this._overlayRef!.updatePosition();
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
get panelClosingActions(): Observable<MDOptionSelectionChange | null> {
|
|
244
|
-
return merge(
|
|
245
|
-
this.optionSelections,
|
|
246
|
-
this.autocomplete._keyManager.tabOut.pipe(filter(() => this._overlayAttached)),
|
|
247
|
-
this._closeKeyEventStream,
|
|
248
|
-
this._getOutsideClickStream(),
|
|
249
|
-
this._overlayRef ? this._overlayRef.detachments().pipe(filter(() => this._overlayAttached)) : observableOf()
|
|
250
|
-
).pipe(map((event) => (event instanceof MDOptionSelectionChange ? event : null)));
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
readonly optionSelections: Observable<MDOptionSelectionChange> = defer(() => {
|
|
254
|
-
const options = this.autocomplete ? this.autocomplete.options : null;
|
|
255
|
-
|
|
256
|
-
if (options) {
|
|
257
|
-
return options.changes.pipe(
|
|
258
|
-
startWith(options),
|
|
259
|
-
switchMap(() => merge(...options.map((option) => option.onSelectionChange)))
|
|
260
|
-
);
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
return this._initialized.pipe(switchMap(() => this.optionSelections));
|
|
264
|
-
}) as Observable<MDOptionSelectionChange>;
|
|
265
|
-
|
|
266
|
-
get activeOption(): MDOption | null {
|
|
267
|
-
if (this.autocomplete && this.autocomplete._keyManager) {
|
|
268
|
-
return this.autocomplete._keyManager.activeItem;
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
return null;
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
private _getOutsideClickStream(): Observable<any> {
|
|
275
|
-
return new Observable((observer) => {
|
|
276
|
-
const listener = (event: MouseEvent | TouchEvent) => {
|
|
277
|
-
const clickTarget = _getEventTarget<HTMLElement>(event)!;
|
|
278
|
-
const customOrigin = this.connectedTo ? this.connectedTo.elementRef.nativeElement : null;
|
|
279
|
-
|
|
280
|
-
if (
|
|
281
|
-
this._overlayAttached &&
|
|
282
|
-
clickTarget !== this._element.nativeElement &&
|
|
283
|
-
!this._hasFocus() &&
|
|
284
|
-
(!customOrigin || !customOrigin.contains(clickTarget)) &&
|
|
285
|
-
!!this._overlayRef &&
|
|
286
|
-
!this._overlayRef.overlayElement.contains(clickTarget)
|
|
287
|
-
) {
|
|
288
|
-
observer.next(event);
|
|
289
|
-
}
|
|
290
|
-
};
|
|
291
|
-
|
|
292
|
-
const cleanups = [
|
|
293
|
-
this._renderer.listen('document', 'click', listener),
|
|
294
|
-
this._renderer.listen('document', 'auxclick', listener),
|
|
295
|
-
this._renderer.listen('document', 'touchend', listener),
|
|
296
|
-
];
|
|
297
|
-
|
|
298
|
-
return () => {
|
|
299
|
-
cleanups.forEach((current) => current());
|
|
300
|
-
};
|
|
301
|
-
});
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
writeValue(value: any): void {
|
|
305
|
-
Promise.resolve(null).then(() => this._assignOptionValue(value));
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
registerOnChange(fn: (value: any) => {}): void {
|
|
309
|
-
this._onChange = fn;
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
registerOnTouched(fn: () => {}) {
|
|
313
|
-
this._onTouched = fn;
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
setDisabledState(isDisabled: boolean) {
|
|
317
|
-
this._element.nativeElement.disabled = isDisabled;
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
_handleKeydown(e: Event): void {
|
|
321
|
-
const event = e as KeyboardEvent;
|
|
322
|
-
const keyCode = event.keyCode;
|
|
323
|
-
const hasModifier = hasModifierKey(event);
|
|
324
|
-
|
|
325
|
-
if (keyCode === ESCAPE && !hasModifier) {
|
|
326
|
-
event.preventDefault();
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
this._valueOnLastKeydown = this._element.nativeElement.value;
|
|
330
|
-
|
|
331
|
-
if (this.activeOption && keyCode === ENTER && this.panelOpen && !hasModifier) {
|
|
332
|
-
this.activeOption._selectViaInteraction();
|
|
333
|
-
this._resetActiveItem();
|
|
334
|
-
event.preventDefault();
|
|
335
|
-
} else if (this.autocomplete) {
|
|
336
|
-
const prevActiveItem = this.autocomplete._keyManager.activeItem;
|
|
337
|
-
const isArrowKey = keyCode === UP_ARROW || keyCode === DOWN_ARROW;
|
|
338
|
-
|
|
339
|
-
if (keyCode === TAB || (isArrowKey && !hasModifier && this.panelOpen)) {
|
|
340
|
-
this.autocomplete._keyManager.onKeydown(event);
|
|
341
|
-
} else if (isArrowKey && this._canOpen()) {
|
|
342
|
-
this._openPanelInternal(this._valueOnLastKeydown);
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
if (isArrowKey || this.autocomplete._keyManager.activeItem !== prevActiveItem) {
|
|
346
|
-
this._scrollToOption(this.autocomplete._keyManager.activeItemIndex || 0);
|
|
347
|
-
|
|
348
|
-
if (this.autocomplete.autoSelectActiveOption && this.activeOption) {
|
|
349
|
-
if (!this._pendingAutoselectedOption) {
|
|
350
|
-
this._valueBeforeAutoSelection = this._valueOnLastKeydown;
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
this._pendingAutoselectedOption = this.activeOption;
|
|
354
|
-
this._assignOptionValue(this.activeOption.value);
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
_handleInput(event: Event): void {
|
|
361
|
-
let target = event.target as HTMLInputElement;
|
|
362
|
-
let value: number | string | null = target.value;
|
|
363
|
-
|
|
364
|
-
if (target.type === 'number') {
|
|
365
|
-
value = value == '' ? null : parseFloat(value);
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
if (this._previousValue !== value) {
|
|
369
|
-
this._previousValue = value;
|
|
370
|
-
this._pendingAutoselectedOption = null;
|
|
371
|
-
|
|
372
|
-
if (!this.autocomplete || !this.autocomplete.requireSelection) {
|
|
373
|
-
this._onChange(value);
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
if (!value) {
|
|
377
|
-
this._clearPreviousSelectedOption(null, false);
|
|
378
|
-
} else if (this.panelOpen && !this.autocomplete.requireSelection) {
|
|
379
|
-
const selectedOption = this.autocomplete.options?.find((option) => option.selected);
|
|
380
|
-
|
|
381
|
-
if (selectedOption) {
|
|
382
|
-
const display = this._getDisplayValue(selectedOption.value);
|
|
383
|
-
|
|
384
|
-
if (value !== display) {
|
|
385
|
-
selectedOption.deselect(false);
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
if (this._canOpen() && this._hasFocus()) {
|
|
391
|
-
const valueOnAttach = this._valueOnLastKeydown ?? this._element.nativeElement.value;
|
|
392
|
-
this._valueOnLastKeydown = null;
|
|
393
|
-
this._openPanelInternal(valueOnAttach);
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
_handleFocus(): void {
|
|
399
|
-
if (!this._canOpenOnNextFocus) {
|
|
400
|
-
this._canOpenOnNextFocus = true;
|
|
401
|
-
} else if (this._canOpen()) {
|
|
402
|
-
this._previousValue = this._element.nativeElement.value;
|
|
403
|
-
this._attachOverlay(this._previousValue);
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
_handleClick(): void {
|
|
408
|
-
if (this._canOpen() && !this.panelOpen) {
|
|
409
|
-
this._openPanelInternal();
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
private _hasFocus(): boolean {
|
|
414
|
-
return _getFocusedElementPierceShadowDom() === this._element.nativeElement;
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
private _subscribeToClosingActions(): Subscription {
|
|
418
|
-
const initialRender = new Observable<void>((subscriber) => {
|
|
419
|
-
afterNextRender(
|
|
420
|
-
() => {
|
|
421
|
-
subscriber.next();
|
|
422
|
-
},
|
|
423
|
-
{ injector: this._environmentInjector }
|
|
424
|
-
);
|
|
425
|
-
});
|
|
426
|
-
const optionChanges =
|
|
427
|
-
this.autocomplete.options?.changes.pipe(
|
|
428
|
-
tap(() => this._positionStrategy.reapplyLastPosition()),
|
|
429
|
-
delay(0)
|
|
430
|
-
) ?? observableOf();
|
|
431
|
-
|
|
432
|
-
return merge(initialRender, optionChanges)
|
|
433
|
-
.pipe(
|
|
434
|
-
switchMap(() =>
|
|
435
|
-
this._zone.run(() => {
|
|
436
|
-
const wasOpen = this.panelOpen;
|
|
437
|
-
this._resetActiveItem();
|
|
438
|
-
this._updatePanelState();
|
|
439
|
-
this._changeDetectorRef.detectChanges();
|
|
440
|
-
|
|
441
|
-
if (this.panelOpen) {
|
|
442
|
-
this._overlayRef!.updatePosition();
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
if (wasOpen !== this.panelOpen) {
|
|
446
|
-
if (this.panelOpen) {
|
|
447
|
-
this._emitOpened();
|
|
448
|
-
} else {
|
|
449
|
-
this.autocomplete.closed.emit();
|
|
450
|
-
}
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
return this.panelClosingActions;
|
|
454
|
-
})
|
|
455
|
-
),
|
|
456
|
-
take(1)
|
|
457
|
-
)
|
|
458
|
-
.subscribe((event) => this._setValueAndClose(event));
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
private _emitOpened() {
|
|
462
|
-
this.autocomplete.opened.emit();
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
private _destroyPanel(): void {
|
|
466
|
-
if (this._overlayRef) {
|
|
467
|
-
this.closePanel();
|
|
468
|
-
this._overlayRef.dispose();
|
|
469
|
-
this._overlayRef = null;
|
|
470
|
-
}
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
private _getDisplayValue<T>(value: T): T | string {
|
|
474
|
-
const autocomplete = this.autocomplete;
|
|
475
|
-
return autocomplete && autocomplete.displayWith ? autocomplete.displayWith(value) : value;
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
private _assignOptionValue(value: any): void {
|
|
479
|
-
const toDisplay = this._getDisplayValue(value);
|
|
480
|
-
|
|
481
|
-
if (value == null) {
|
|
482
|
-
this._clearPreviousSelectedOption(null, false);
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
this._updateNativeInputValue(toDisplay != null ? toDisplay : '');
|
|
486
|
-
}
|
|
487
|
-
|
|
488
|
-
private _updateNativeInputValue(value: string): void {
|
|
489
|
-
this._element.nativeElement.value = value;
|
|
490
|
-
|
|
491
|
-
this._previousValue = value;
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
private _setValueAndClose(event: MDOptionSelectionChange | null): void {
|
|
495
|
-
const panel = this.autocomplete;
|
|
496
|
-
const toSelect = event ? event.source : this._pendingAutoselectedOption;
|
|
497
|
-
|
|
498
|
-
if (toSelect) {
|
|
499
|
-
this._clearPreviousSelectedOption(toSelect);
|
|
500
|
-
this._assignOptionValue(toSelect.value);
|
|
501
|
-
this._onChange(toSelect.value);
|
|
502
|
-
panel._emitSelectEvent(toSelect);
|
|
503
|
-
this._element.nativeElement.focus();
|
|
504
|
-
} else if (panel.requireSelection && this._element.nativeElement.value !== this._valueOnAttach) {
|
|
505
|
-
this._clearPreviousSelectedOption(null);
|
|
506
|
-
this._assignOptionValue(null);
|
|
507
|
-
this._onChange(null);
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
this.closePanel();
|
|
511
|
-
}
|
|
512
|
-
|
|
513
|
-
private _clearPreviousSelectedOption(skip: MDOption | null, emitEvent?: boolean) {
|
|
514
|
-
this.autocomplete?.options?.forEach((option) => {
|
|
515
|
-
if (option !== skip && option.selected) {
|
|
516
|
-
option.deselect(emitEvent);
|
|
517
|
-
}
|
|
518
|
-
});
|
|
519
|
-
}
|
|
520
|
-
|
|
521
|
-
private _openPanelInternal(valueOnAttach = this._element.nativeElement.value) {
|
|
522
|
-
this._attachOverlay(valueOnAttach);
|
|
523
|
-
if (this._trackedModal) {
|
|
524
|
-
const panelId = this.autocomplete.id;
|
|
525
|
-
addAriaReferencedId(this._trackedModal, 'aria-owns', panelId);
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
|
-
|
|
529
|
-
private _attachOverlay(valueOnAttach: string): void {
|
|
530
|
-
if (!this.autocomplete && (typeof ngDevMode === 'undefined' || ngDevMode)) {
|
|
531
|
-
throw getMDAutocompleteMissingPanelError();
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
let overlayRef = this._overlayRef;
|
|
535
|
-
|
|
536
|
-
if (!overlayRef) {
|
|
537
|
-
this._portal = new TemplatePortal(this.autocomplete.template, this._viewContainerRef);
|
|
538
|
-
overlayRef = createOverlayRef(this._injector, this._getOverlayConfig());
|
|
539
|
-
this._overlayRef = overlayRef;
|
|
540
|
-
this._viewportSubscription = this._viewportRuler.change().subscribe(() => {
|
|
541
|
-
if (this.panelOpen && overlayRef) {
|
|
542
|
-
overlayRef.updateSize({ width: this._getPanelWidth() });
|
|
543
|
-
}
|
|
544
|
-
});
|
|
545
|
-
this._handsetLandscapeSubscription = this._breakpointObserver
|
|
546
|
-
.observe(Breakpoints.HandsetLandscape)
|
|
547
|
-
.subscribe((result) => {
|
|
548
|
-
const isHandsetLandscape = result.matches;
|
|
549
|
-
if (isHandsetLandscape) {
|
|
550
|
-
this._positionStrategy
|
|
551
|
-
.withFlexibleDimensions(true)
|
|
552
|
-
.withGrowAfterOpen(true)
|
|
553
|
-
.withViewportMargin(8);
|
|
554
|
-
} else {
|
|
555
|
-
this._positionStrategy
|
|
556
|
-
.withFlexibleDimensions(false)
|
|
557
|
-
.withGrowAfterOpen(false)
|
|
558
|
-
.withViewportMargin(0);
|
|
559
|
-
}
|
|
560
|
-
});
|
|
561
|
-
} else {
|
|
562
|
-
this._positionStrategy.setOrigin(this._getConnectedElement());
|
|
563
|
-
overlayRef.updateSize({ width: this._getPanelWidth() });
|
|
564
|
-
}
|
|
565
|
-
|
|
566
|
-
if (overlayRef && !overlayRef.hasAttached()) {
|
|
567
|
-
overlayRef.attach(this._portal);
|
|
568
|
-
this._valueOnAttach = valueOnAttach;
|
|
569
|
-
this._valueOnLastKeydown = null;
|
|
570
|
-
this._closingActionsSubscription = this._subscribeToClosingActions();
|
|
571
|
-
}
|
|
572
|
-
|
|
573
|
-
const wasOpen = this.panelOpen;
|
|
574
|
-
|
|
575
|
-
this.autocomplete._isOpen = this._overlayAttached = true;
|
|
576
|
-
this.autocomplete._latestOpeningTrigger = this;
|
|
577
|
-
this._updatePanelState();
|
|
578
|
-
this._applyModalPanelOwnership();
|
|
579
|
-
|
|
580
|
-
if (this.panelOpen && wasOpen !== this.panelOpen) {
|
|
581
|
-
this._emitOpened();
|
|
582
|
-
}
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
private _handlePanelKeydown = (event: KeyboardEvent) => {
|
|
586
|
-
if (
|
|
587
|
-
(event.keyCode === ESCAPE && !hasModifierKey(event)) ||
|
|
588
|
-
(event.keyCode === UP_ARROW && hasModifierKey(event, 'altKey'))
|
|
589
|
-
) {
|
|
590
|
-
if (this._pendingAutoselectedOption) {
|
|
591
|
-
this._updateNativeInputValue(this._valueBeforeAutoSelection ?? '');
|
|
592
|
-
this._pendingAutoselectedOption = null;
|
|
593
|
-
}
|
|
594
|
-
this._closeKeyEventStream.next();
|
|
595
|
-
this._resetActiveItem();
|
|
596
|
-
event.stopPropagation();
|
|
597
|
-
event.preventDefault();
|
|
598
|
-
}
|
|
599
|
-
};
|
|
600
|
-
|
|
601
|
-
private _updatePanelState() {
|
|
602
|
-
this.autocomplete._setVisibility();
|
|
603
|
-
|
|
604
|
-
if (this.panelOpen) {
|
|
605
|
-
const overlayRef = this._overlayRef!;
|
|
606
|
-
|
|
607
|
-
if (!this._keydownSubscription) {
|
|
608
|
-
this._keydownSubscription = overlayRef.keydownEvents().subscribe(this._handlePanelKeydown);
|
|
609
|
-
}
|
|
610
|
-
|
|
611
|
-
if (!this._outsideClickSubscription) {
|
|
612
|
-
this._outsideClickSubscription = overlayRef.outsidePointerEvents().subscribe();
|
|
613
|
-
}
|
|
614
|
-
} else {
|
|
615
|
-
this._keydownSubscription?.unsubscribe();
|
|
616
|
-
this._outsideClickSubscription?.unsubscribe();
|
|
617
|
-
this._keydownSubscription = this._outsideClickSubscription = null;
|
|
618
|
-
}
|
|
619
|
-
}
|
|
620
|
-
|
|
621
|
-
private _getOverlayConfig(): OverlayConfig {
|
|
622
|
-
return new OverlayConfig({
|
|
623
|
-
positionStrategy: this._getOverlayPosition(),
|
|
624
|
-
scrollStrategy: this._scrollStrategy(),
|
|
625
|
-
width: this._getPanelWidth(),
|
|
626
|
-
direction: this._dir ?? undefined,
|
|
627
|
-
hasBackdrop: this._defaults?.hasBackdrop,
|
|
628
|
-
backdropClass: this._defaults?.backdropClass || 'cdk-overlay-transparent-backdrop',
|
|
629
|
-
panelClass: this._overlayPanelClass,
|
|
630
|
-
disableAnimations: this._animationsDisabled,
|
|
631
|
-
});
|
|
632
|
-
}
|
|
633
|
-
|
|
634
|
-
private _getOverlayPosition(): PositionStrategy {
|
|
635
|
-
const strategy = createFlexibleConnectedPositionStrategy(this._injector, this._getConnectedElement())
|
|
636
|
-
.withFlexibleDimensions(false)
|
|
637
|
-
.withPush(false);
|
|
638
|
-
|
|
639
|
-
this._setStrategyPositions(strategy);
|
|
640
|
-
this._positionStrategy = strategy;
|
|
641
|
-
return strategy;
|
|
642
|
-
}
|
|
643
|
-
|
|
644
|
-
private _setStrategyPositions(positionStrategy: FlexibleConnectedPositionStrategy) {
|
|
645
|
-
const belowPositions: ConnectedPosition[] = [
|
|
646
|
-
{ originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },
|
|
647
|
-
{ originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top' },
|
|
648
|
-
];
|
|
649
|
-
|
|
650
|
-
const panelClass = this._aboveClass;
|
|
651
|
-
const abovePositions: ConnectedPosition[] = [
|
|
652
|
-
{ originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom', panelClass },
|
|
653
|
-
{ originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom', panelClass },
|
|
654
|
-
];
|
|
655
|
-
|
|
656
|
-
let positions: ConnectedPosition[];
|
|
657
|
-
|
|
658
|
-
if (this.position === 'above') {
|
|
659
|
-
positions = abovePositions;
|
|
660
|
-
} else if (this.position === 'below') {
|
|
661
|
-
positions = belowPositions;
|
|
662
|
-
} else {
|
|
663
|
-
positions = [...belowPositions, ...abovePositions];
|
|
664
|
-
}
|
|
665
|
-
|
|
666
|
-
positionStrategy.withPositions(positions);
|
|
667
|
-
}
|
|
668
|
-
|
|
669
|
-
private _getConnectedElement(): ElementRef<HTMLElement> {
|
|
670
|
-
if (this.connectedTo) {
|
|
671
|
-
return this.connectedTo.elementRef;
|
|
672
|
-
}
|
|
673
|
-
|
|
674
|
-
return this._element;
|
|
675
|
-
}
|
|
676
|
-
|
|
677
|
-
private _getPanelWidth(): number | string {
|
|
678
|
-
return this.autocomplete.panelWidth || this._getHostWidth();
|
|
679
|
-
}
|
|
680
|
-
|
|
681
|
-
private _getHostWidth(): number {
|
|
682
|
-
return this._getConnectedElement().nativeElement.getBoundingClientRect().width;
|
|
683
|
-
}
|
|
684
|
-
|
|
685
|
-
private _resetActiveItem(): void {
|
|
686
|
-
const autocomplete = this.autocomplete;
|
|
687
|
-
|
|
688
|
-
if (autocomplete.autoActiveFirstOption) {
|
|
689
|
-
let firstEnabledOptionIndex = -1;
|
|
690
|
-
|
|
691
|
-
for (let index = 0; index < autocomplete.options.length; index++) {
|
|
692
|
-
const option = autocomplete.options.get(index)!;
|
|
693
|
-
if (!option.disabled) {
|
|
694
|
-
firstEnabledOptionIndex = index;
|
|
695
|
-
break;
|
|
696
|
-
}
|
|
697
|
-
}
|
|
698
|
-
autocomplete._keyManager.setActiveItem(firstEnabledOptionIndex);
|
|
699
|
-
} else {
|
|
700
|
-
autocomplete._keyManager.setActiveItem(-1);
|
|
701
|
-
}
|
|
702
|
-
}
|
|
703
|
-
|
|
704
|
-
private _canOpen(): boolean {
|
|
705
|
-
const element = this._element.nativeElement;
|
|
706
|
-
return !element.readOnly && !element.disabled && !this.autocompleteDisabled;
|
|
707
|
-
}
|
|
708
|
-
|
|
709
|
-
private _scrollToOption(index: number): void {
|
|
710
|
-
const autocomplete = this.autocomplete;
|
|
711
|
-
const labelCount = _countGroupLabelsBeforeOption(index, autocomplete.options, autocomplete.optionGroups);
|
|
712
|
-
|
|
713
|
-
if (index === 0 && labelCount === 1) {
|
|
714
|
-
autocomplete._setScrollTop(0);
|
|
715
|
-
} else if (autocomplete.panel) {
|
|
716
|
-
const option = autocomplete.options.toArray()[index];
|
|
717
|
-
|
|
718
|
-
if (option) {
|
|
719
|
-
const element = option._getHostElement();
|
|
720
|
-
const newScrollPosition = _getOptionScrollPosition(
|
|
721
|
-
element.offsetTop,
|
|
722
|
-
element.offsetHeight,
|
|
723
|
-
autocomplete._getScrollTop(),
|
|
724
|
-
autocomplete.panel.nativeElement.offsetHeight
|
|
725
|
-
);
|
|
726
|
-
|
|
727
|
-
autocomplete._setScrollTop(newScrollPosition);
|
|
728
|
-
}
|
|
729
|
-
}
|
|
730
|
-
}
|
|
731
|
-
|
|
732
|
-
private _trackedModal: Element | null = null;
|
|
733
|
-
|
|
734
|
-
private _applyModalPanelOwnership() {
|
|
735
|
-
const modal = this._element.nativeElement.closest('body > .cdk-overlay-container [aria-modal="true"]');
|
|
736
|
-
|
|
737
|
-
if (!modal) {
|
|
738
|
-
return;
|
|
739
|
-
}
|
|
740
|
-
|
|
741
|
-
const panelId = this.autocomplete.id;
|
|
742
|
-
|
|
743
|
-
if (this._trackedModal) {
|
|
744
|
-
removeAriaReferencedId(this._trackedModal, 'aria-owns', panelId);
|
|
745
|
-
}
|
|
746
|
-
|
|
747
|
-
addAriaReferencedId(modal, 'aria-owns', panelId);
|
|
748
|
-
this._trackedModal = modal;
|
|
749
|
-
}
|
|
750
|
-
|
|
751
|
-
private _clearFromModal() {
|
|
752
|
-
if (this._trackedModal) {
|
|
753
|
-
const panelId = this.autocomplete.id;
|
|
754
|
-
|
|
755
|
-
removeAriaReferencedId(this._trackedModal, 'aria-owns', panelId);
|
|
756
|
-
this._trackedModal = null;
|
|
757
|
-
}
|
|
758
|
-
}
|
|
759
|
-
}
|