@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,814 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* complex but work well
|
|
3
|
-
* TODO: rebuild latter
|
|
4
|
-
*/
|
|
5
|
-
import { DOWN_ARROW, ENTER, TAB } from "@angular/cdk/keycodes";
|
|
6
|
-
import {
|
|
7
|
-
CdkConnectedOverlay,
|
|
8
|
-
ConnectedOverlayPositionChange
|
|
9
|
-
} from "@angular/cdk/overlay";
|
|
10
|
-
import {
|
|
11
|
-
forwardRef,
|
|
12
|
-
AfterContentChecked,
|
|
13
|
-
AfterContentInit,
|
|
14
|
-
Component,
|
|
15
|
-
ElementRef,
|
|
16
|
-
EventEmitter,
|
|
17
|
-
HostListener,
|
|
18
|
-
Input,
|
|
19
|
-
OnInit,
|
|
20
|
-
Output,
|
|
21
|
-
Renderer2,
|
|
22
|
-
ViewChild,
|
|
23
|
-
ViewEncapsulation,
|
|
24
|
-
ChangeDetectorRef
|
|
25
|
-
} from "@angular/core";
|
|
26
|
-
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from "@angular/forms";
|
|
27
|
-
import { MefDevOptionComponent } from "./option.component";
|
|
28
|
-
import { OptionPipe } from "./option.pipe";
|
|
29
|
-
import { toBoolean } from '../util/convert';
|
|
30
|
-
import { animate, state, style, transition, trigger } from "@angular/animations";
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Example of usage:
|
|
35
|
-
* <example-url>https://platform.mef.dev/ui_kit_demo/view/controls/select</example-url>
|
|
36
|
-
*/
|
|
37
|
-
@Component({
|
|
38
|
-
selector: "mefdev-select",
|
|
39
|
-
encapsulation: ViewEncapsulation.None,
|
|
40
|
-
templateUrl: "./select.component.html",
|
|
41
|
-
providers: [
|
|
42
|
-
{
|
|
43
|
-
provide: NG_VALUE_ACCESSOR,
|
|
44
|
-
useExisting: forwardRef(() => MefDevSelectComponent),
|
|
45
|
-
multi: true
|
|
46
|
-
}
|
|
47
|
-
],
|
|
48
|
-
animations: [trigger('dropDownAnimation', [
|
|
49
|
-
state('bottom', style({
|
|
50
|
-
opacity: 1,
|
|
51
|
-
transform: 'scaleY(1)',
|
|
52
|
-
transformOrigin: '0% 0%'
|
|
53
|
-
})),
|
|
54
|
-
transition('void => bottom', [
|
|
55
|
-
style({
|
|
56
|
-
opacity: 0,
|
|
57
|
-
transform: 'scaleY(0)',
|
|
58
|
-
transformOrigin: '0% 0%'
|
|
59
|
-
}),
|
|
60
|
-
animate('150ms cubic-bezier(0.25, 0.8, 0.25, 1)')
|
|
61
|
-
]),
|
|
62
|
-
state('top', style({
|
|
63
|
-
opacity: 1,
|
|
64
|
-
transform: 'scaleY(1)',
|
|
65
|
-
transformOrigin: '0% 100%'
|
|
66
|
-
})),
|
|
67
|
-
transition('void => top', [
|
|
68
|
-
style({
|
|
69
|
-
opacity: 0,
|
|
70
|
-
transform: 'scaleY(0)',
|
|
71
|
-
transformOrigin: '0% 100%'
|
|
72
|
-
}),
|
|
73
|
-
animate('150ms cubic-bezier(0.25, 0.8, 0.25, 1)')
|
|
74
|
-
]),
|
|
75
|
-
transition('* => void', [
|
|
76
|
-
animate('250ms 100ms linear', style({ opacity: 0 }))
|
|
77
|
-
])
|
|
78
|
-
]),
|
|
79
|
-
trigger('tagAnimation', [
|
|
80
|
-
state('*', style({ opacity: 1, transform: 'scale(1)' })),
|
|
81
|
-
transition('void => *', [
|
|
82
|
-
style({ opacity: 0, transform: 'scale(0)' }),
|
|
83
|
-
animate('150ms linear')
|
|
84
|
-
]),
|
|
85
|
-
state('void', style({ opacity: 0, transform: 'scale(0)' })),
|
|
86
|
-
transition('* => void', [
|
|
87
|
-
style({ opacity: 1, transform: 'scale(1)' }),
|
|
88
|
-
animate('150ms linear')
|
|
89
|
-
])
|
|
90
|
-
])],
|
|
91
|
-
standalone: false
|
|
92
|
-
})
|
|
93
|
-
export class MefDevSelectComponent
|
|
94
|
-
implements
|
|
95
|
-
OnInit,
|
|
96
|
-
AfterContentInit,
|
|
97
|
-
AfterContentChecked,
|
|
98
|
-
ControlValueAccessor {
|
|
99
|
-
private _allowClear = false;
|
|
100
|
-
private _disabled = false;
|
|
101
|
-
private _isTags = false;
|
|
102
|
-
private _isMultiple = false;
|
|
103
|
-
private _keepUnListOptions = false;
|
|
104
|
-
private _showSearch = false;
|
|
105
|
-
_el: HTMLElement;
|
|
106
|
-
_isOpen = false;
|
|
107
|
-
_prefixCls = "pg-select";
|
|
108
|
-
_classList: string[] = [];
|
|
109
|
-
_dropDownClassMap: any;
|
|
110
|
-
_dropDownPrefixCls = `${this._prefixCls}-dropdown`;
|
|
111
|
-
_selectionClassMap: any;
|
|
112
|
-
_selectionPrefixCls = `${this._prefixCls}-selection`;
|
|
113
|
-
_size: string;
|
|
114
|
-
_value: string[] | string;
|
|
115
|
-
_placeholder = "placeholder";
|
|
116
|
-
_notFoundContent = "No Content";
|
|
117
|
-
_searchText = "";
|
|
118
|
-
_triggerWidth = 0;
|
|
119
|
-
_selectedOption: MefDevOptionComponent;
|
|
120
|
-
_operatingMultipleOption: MefDevOptionComponent;
|
|
121
|
-
_selectedOptions: Set<MefDevOptionComponent> = new Set();
|
|
122
|
-
_options: MefDevOptionComponent[] = [];
|
|
123
|
-
_cacheOptions: MefDevOptionComponent[] = [];
|
|
124
|
-
_filterOptions: MefDevOptionComponent[] = [];
|
|
125
|
-
_tagsOptions: MefDevOptionComponent[] = [];
|
|
126
|
-
_activeFilterOption: MefDevOptionComponent;
|
|
127
|
-
_isMultiInit = false;
|
|
128
|
-
_dropDownPosition: "top" | "center" | "bottom" = "bottom";
|
|
129
|
-
_composing = false;
|
|
130
|
-
_mode: any;
|
|
131
|
-
// ngModel Access
|
|
132
|
-
onChange: (value: string | string[]) => void = () => null;
|
|
133
|
-
onTouched: () => void = () => null;
|
|
134
|
-
@ViewChild("searchInput") searchInputElementRef: any;
|
|
135
|
-
@ViewChild("trigger") trigger: ElementRef;
|
|
136
|
-
@ViewChild("dropdownUl") dropdownUl: ElementRef;
|
|
137
|
-
@Output() SearchChange: EventEmitter<string> = new EventEmitter();
|
|
138
|
-
@Output() change: EventEmitter<string> = new EventEmitter();
|
|
139
|
-
@Output() OpenChange: EventEmitter<boolean> = new EventEmitter();
|
|
140
|
-
@Output() ScrollToBottom: EventEmitter<boolean> = new EventEmitter();
|
|
141
|
-
@Input() Filter = true;
|
|
142
|
-
@Input() MaxMultiple = Infinity;
|
|
143
|
-
@Input() FirstDefault: boolean = false;
|
|
144
|
-
@ViewChild(CdkConnectedOverlay) _cdkOverlay: CdkConnectedOverlay;
|
|
145
|
-
|
|
146
|
-
@Input()
|
|
147
|
-
set AllowClear(value: boolean) {
|
|
148
|
-
this._allowClear = toBoolean(value);
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
get AllowClear(): boolean {
|
|
152
|
-
return this._allowClear;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
@Input()
|
|
156
|
-
set KeepUnListOptions(value: boolean) {
|
|
157
|
-
this._keepUnListOptions = toBoolean(value);
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
get KeepUnListOptions(): boolean {
|
|
161
|
-
return this._keepUnListOptions;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
@Input()
|
|
165
|
-
set Mode(value: string) {
|
|
166
|
-
this._mode = value;
|
|
167
|
-
if (this._mode === "multiple") {
|
|
168
|
-
this.Multiple = true;
|
|
169
|
-
} else if (this._mode === "tags") {
|
|
170
|
-
this.Tags = true;
|
|
171
|
-
} else if (this._mode === "combobox") {
|
|
172
|
-
this.ShowSearch = true;
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
@Input()
|
|
177
|
-
set Multiple(value: boolean) {
|
|
178
|
-
this._isMultiple = toBoolean(value);
|
|
179
|
-
if (this._isMultiple) {
|
|
180
|
-
this.ShowSearch = true;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
get Multiple(): boolean {
|
|
185
|
-
return this._isMultiple;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
@Input()
|
|
189
|
-
set PlaceHolder(value: string) {
|
|
190
|
-
this._placeholder = value;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
get PlaceHolder(): string {
|
|
194
|
-
return this._placeholder;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
@Input()
|
|
198
|
-
set NotFoundContent(value: string) {
|
|
199
|
-
this._notFoundContent = value;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
get NotFoundContent(): string {
|
|
203
|
-
return this._notFoundContent;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
@Input()
|
|
207
|
-
set Size(value: string) {
|
|
208
|
-
// @ts-ignore
|
|
209
|
-
this._size = { large: "lg", small: "sm" }[value];
|
|
210
|
-
this.setClassMap();
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
get Size(): string {
|
|
214
|
-
return this._size;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
@Input()
|
|
218
|
-
set ShowSearch(value: boolean) {
|
|
219
|
-
this._showSearch = toBoolean(value);
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
get ShowSearch(): boolean {
|
|
223
|
-
return this._showSearch;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
@Input()
|
|
227
|
-
set Tags(value: boolean) {
|
|
228
|
-
const isTags = toBoolean(value);
|
|
229
|
-
this._isTags = isTags;
|
|
230
|
-
this.Multiple = isTags;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
get Tags(): boolean {
|
|
234
|
-
return this._isTags;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
@Input()
|
|
238
|
-
set Disabled(value: boolean) {
|
|
239
|
-
this._disabled = toBoolean(value);
|
|
240
|
-
this.closeDropDown();
|
|
241
|
-
this.setClassMap();
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
get Disabled(): boolean {
|
|
245
|
-
return this._disabled;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
@Input()
|
|
249
|
-
set Open(value: boolean) {
|
|
250
|
-
const isOpen = toBoolean(value);
|
|
251
|
-
if (this._isOpen === isOpen) {
|
|
252
|
-
return;
|
|
253
|
-
}
|
|
254
|
-
if (isOpen) {
|
|
255
|
-
this.scrollToActive();
|
|
256
|
-
this._setTriggerWidth();
|
|
257
|
-
}
|
|
258
|
-
this._isOpen = isOpen;
|
|
259
|
-
this.OpenChange.emit(this._isOpen);
|
|
260
|
-
this.setClassMap();
|
|
261
|
-
if (this._isOpen) {
|
|
262
|
-
setTimeout(() => {
|
|
263
|
-
this.checkDropDownScroll();
|
|
264
|
-
});
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
get Open(): boolean {
|
|
269
|
-
return this._isOpen;
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
/** new -option insert or new tags insert */
|
|
273
|
-
// @ts-ignore
|
|
274
|
-
addOption = option => {
|
|
275
|
-
this._options.push(option);
|
|
276
|
-
if (!this._isTags) {
|
|
277
|
-
if (option.Value) {
|
|
278
|
-
this.updateSelectedOption(this._value);
|
|
279
|
-
} else {
|
|
280
|
-
this.forceUpdateSelectedOption(this._value);
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
};
|
|
284
|
-
|
|
285
|
-
/** -option remove or tags remove */
|
|
286
|
-
removeOption(option: MefDevOptionComponent): void {
|
|
287
|
-
this._options.splice(this._options.indexOf(option), 1);
|
|
288
|
-
if (!this._isTags) {
|
|
289
|
-
this.forceUpdateSelectedOption(this._value);
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
/** dropdown position changed */
|
|
294
|
-
onPositionChange(position: ConnectedOverlayPositionChange): void {
|
|
295
|
-
this._dropDownPosition = position.connectionPair.originY;
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
compositionStart(): void {
|
|
299
|
-
this._composing = true;
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
compositionEnd(): void {
|
|
303
|
-
this._composing = false;
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
/** clear single selected option */
|
|
307
|
-
clearSelect($event?: MouseEvent): void {
|
|
308
|
-
if ($event) {
|
|
309
|
-
$event.preventDefault();
|
|
310
|
-
$event.stopPropagation();
|
|
311
|
-
} // @ts-ignore
|
|
312
|
-
this._selectedOption = null; // @ts-ignore
|
|
313
|
-
this.Value = null; // @ts-ignore
|
|
314
|
-
this.onChange(null);
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
/** click dropdown option by user */
|
|
318
|
-
clickOption(option: MefDevOptionComponent, $event?: MouseEvent): void {
|
|
319
|
-
if (!option) {
|
|
320
|
-
return;
|
|
321
|
-
}
|
|
322
|
-
this.chooseOption(option, true, $event);
|
|
323
|
-
this.clearSearchText();
|
|
324
|
-
if (!this._isMultiple) {
|
|
325
|
-
this.Open = false;
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
/** choose option */
|
|
330
|
-
chooseOption(
|
|
331
|
-
option: MefDevOptionComponent,
|
|
332
|
-
isUserClick: boolean = false,
|
|
333
|
-
$event?: MouseEvent
|
|
334
|
-
): void {
|
|
335
|
-
if ($event) {
|
|
336
|
-
$event.preventDefault();
|
|
337
|
-
$event.stopPropagation();
|
|
338
|
-
}
|
|
339
|
-
this._activeFilterOption = option;
|
|
340
|
-
if (option && !option.Disabled) {
|
|
341
|
-
if (!this.Multiple) {
|
|
342
|
-
this._selectedOption = option;
|
|
343
|
-
this._value = option.Value;
|
|
344
|
-
if (isUserClick) {
|
|
345
|
-
this.change.next(this._value);
|
|
346
|
-
this.onChange(option.Value);
|
|
347
|
-
}
|
|
348
|
-
} else {
|
|
349
|
-
if (isUserClick) {
|
|
350
|
-
this.isInSet(this._selectedOptions, option)
|
|
351
|
-
? this.unSelectMultipleOption(option)
|
|
352
|
-
: this.selectMultipleOption(option);
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
updateWidth(element: HTMLInputElement, text: string): void {
|
|
359
|
-
if (text) {
|
|
360
|
-
/** wait for scroll width change */ // @ts-ignore
|
|
361
|
-
setTimeout(_ => {
|
|
362
|
-
this._renderer.setStyle(element, "width", `${element.scrollWidth}px`);
|
|
363
|
-
});
|
|
364
|
-
} else {
|
|
365
|
-
this._renderer.removeStyle(element, "width");
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
/** determine if option in set */
|
|
370
|
-
isInSet(
|
|
371
|
-
set: Set<MefDevOptionComponent>,
|
|
372
|
-
option: MefDevOptionComponent
|
|
373
|
-
): MefDevOptionComponent { // @ts-ignore
|
|
374
|
-
return (Array.from(set) as MefDevOptionComponent[]).find(
|
|
375
|
-
(data: MefDevOptionComponent) => data.Value === option.Value
|
|
376
|
-
);
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
/** cancel select multiple option */ // @ts-ignore
|
|
380
|
-
unSelectMultipleOption = (option, $event?, emitChange = true) => {
|
|
381
|
-
this._operatingMultipleOption = option;
|
|
382
|
-
this._selectedOptions.delete(option);
|
|
383
|
-
if (emitChange) {
|
|
384
|
-
this.emitMultipleOptions();
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
// 对Tag进行特殊处理
|
|
388
|
-
if (
|
|
389
|
-
this._isTags &&
|
|
390
|
-
this._options.indexOf(option) !== -1 &&
|
|
391
|
-
this._tagsOptions.indexOf(option) !== -1
|
|
392
|
-
) {
|
|
393
|
-
this.removeOption(option);
|
|
394
|
-
this._tagsOptions.splice(this._tagsOptions.indexOf(option), 1);
|
|
395
|
-
}
|
|
396
|
-
if ($event) {
|
|
397
|
-
$event.preventDefault();
|
|
398
|
-
$event.stopPropagation();
|
|
399
|
-
}
|
|
400
|
-
};
|
|
401
|
-
|
|
402
|
-
/** select multiple option */
|
|
403
|
-
selectMultipleOption(option: MefDevOptionComponent, $event?: MouseEvent): void {
|
|
404
|
-
/** if tags do push to tag option */
|
|
405
|
-
if (
|
|
406
|
-
this._isTags &&
|
|
407
|
-
this._options.indexOf(option) === -1 &&
|
|
408
|
-
this._tagsOptions.indexOf(option) === -1
|
|
409
|
-
) {
|
|
410
|
-
this.addOption(option);
|
|
411
|
-
this._tagsOptions.push(option);
|
|
412
|
-
}
|
|
413
|
-
this._operatingMultipleOption = option;
|
|
414
|
-
if (this._selectedOptions.size < this.MaxMultiple) {
|
|
415
|
-
this._selectedOptions.add(option);
|
|
416
|
-
}
|
|
417
|
-
this.emitMultipleOptions();
|
|
418
|
-
|
|
419
|
-
if ($event) {
|
|
420
|
-
$event.preventDefault();
|
|
421
|
-
$event.stopPropagation();
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
/** emit multiple options */
|
|
426
|
-
emitMultipleOptions(): void {
|
|
427
|
-
if (this._isMultiInit) {
|
|
428
|
-
return;
|
|
429
|
-
}
|
|
430
|
-
const arrayOptions = Array.from(this._selectedOptions);
|
|
431
|
-
this._value = arrayOptions.map(item => item.Value);
|
|
432
|
-
this.onChange(this._value);
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
/** update selected option when add remove option etc */
|
|
436
|
-
updateSelectedOption(
|
|
437
|
-
currentModelValue: string | string[],
|
|
438
|
-
triggerByNgModel: boolean = false
|
|
439
|
-
): void {
|
|
440
|
-
if (currentModelValue == null) {
|
|
441
|
-
return;
|
|
442
|
-
}
|
|
443
|
-
if (this.Multiple) {
|
|
444
|
-
const selectedOptions = this._options.filter(item => {
|
|
445
|
-
return item != null && currentModelValue.indexOf(item.Value) !== -1;
|
|
446
|
-
});
|
|
447
|
-
if ((this.KeepUnListOptions || this.Tags) && !triggerByNgModel) {
|
|
448
|
-
const _selectedOptions = Array.from(this._selectedOptions);
|
|
449
|
-
selectedOptions.forEach(option => {
|
|
450
|
-
const _exist = _selectedOptions.some(
|
|
451
|
-
item => item._value == option._value
|
|
452
|
-
);
|
|
453
|
-
if (!_exist) {
|
|
454
|
-
this._selectedOptions.add(option);
|
|
455
|
-
}
|
|
456
|
-
});
|
|
457
|
-
} else {
|
|
458
|
-
this._selectedOptions = new Set();
|
|
459
|
-
selectedOptions.forEach(option => {
|
|
460
|
-
this._selectedOptions.add(option);
|
|
461
|
-
});
|
|
462
|
-
}
|
|
463
|
-
} else {
|
|
464
|
-
const selectedOption = this._options.filter(item => {
|
|
465
|
-
return item != null && item.Value == currentModelValue;
|
|
466
|
-
});
|
|
467
|
-
this.chooseOption(selectedOption[0]);
|
|
468
|
-
}
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
forceUpdateSelectedOption(value: string | string[]): void {
|
|
472
|
-
/** trigger dirty check */ // @ts-ignore
|
|
473
|
-
setTimeout(_ => {
|
|
474
|
-
this.updateSelectedOption(value);
|
|
475
|
-
});
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
get Value(): string | string[] {
|
|
479
|
-
return this._value;
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
set Value(value: string | string[]) {
|
|
483
|
-
this._updateValue(value);
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
clearAllSelectedOption(emitChange: boolean = true): void {
|
|
487
|
-
this._selectedOptions.forEach(item => {
|
|
488
|
-
this.unSelectMultipleOption(item, null, emitChange);
|
|
489
|
-
});
|
|
490
|
-
}
|
|
491
|
-
|
|
492
|
-
handleKeyEnterEvent(event: KeyboardEvent): void {
|
|
493
|
-
/** when composing end */
|
|
494
|
-
if (!this._composing && this._isOpen) {
|
|
495
|
-
event.preventDefault();
|
|
496
|
-
event.stopPropagation();
|
|
497
|
-
this.updateFilterOption(false);
|
|
498
|
-
this.clickOption(this._activeFilterOption);
|
|
499
|
-
}
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
handleKeyBackspaceEvent(event: KeyboardEvent): void {
|
|
503
|
-
if (!this._searchText && !this._composing && this._isMultiple) {
|
|
504
|
-
event.preventDefault();
|
|
505
|
-
const lastOption = Array.from(this._selectedOptions).pop();
|
|
506
|
-
this.unSelectMultipleOption(lastOption);
|
|
507
|
-
}
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
handleKeyDownEvent($event: MouseEvent): void {
|
|
511
|
-
if (this._isOpen) {
|
|
512
|
-
$event.preventDefault();
|
|
513
|
-
$event.stopPropagation();
|
|
514
|
-
this._activeFilterOption = this.nextOption(
|
|
515
|
-
this._activeFilterOption,
|
|
516
|
-
this._filterOptions.filter(w => !w.Disabled)
|
|
517
|
-
);
|
|
518
|
-
this.scrollToActive();
|
|
519
|
-
}
|
|
520
|
-
}
|
|
521
|
-
|
|
522
|
-
handleKeyUpEvent($event: MouseEvent): void {
|
|
523
|
-
if (this._isOpen) {
|
|
524
|
-
$event.preventDefault();
|
|
525
|
-
$event.stopPropagation();
|
|
526
|
-
this._activeFilterOption = this.preOption(
|
|
527
|
-
this._activeFilterOption,
|
|
528
|
-
this._filterOptions.filter(w => !w.Disabled)
|
|
529
|
-
);
|
|
530
|
-
this.scrollToActive();
|
|
531
|
-
}
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
preOption(
|
|
535
|
-
option: MefDevOptionComponent,
|
|
536
|
-
options: MefDevOptionComponent[]
|
|
537
|
-
): MefDevOptionComponent {
|
|
538
|
-
return options[options.indexOf(option) - 1] || options[options.length - 1];
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
nextOption(
|
|
542
|
-
option: MefDevOptionComponent,
|
|
543
|
-
options: MefDevOptionComponent[]
|
|
544
|
-
): MefDevOptionComponent {
|
|
545
|
-
return options[options.indexOf(option) + 1] || options[0];
|
|
546
|
-
}
|
|
547
|
-
|
|
548
|
-
clearSearchText(): void {
|
|
549
|
-
this._searchText = "";
|
|
550
|
-
this.updateFilterOption();
|
|
551
|
-
}
|
|
552
|
-
|
|
553
|
-
updateFilterOption(updateActiveFilter: boolean = true): void {
|
|
554
|
-
if (this.Filter) {
|
|
555
|
-
this._filterOptions = new OptionPipe().transform(this._options, {
|
|
556
|
-
searchText: this._searchText,
|
|
557
|
-
tags: this._isTags,
|
|
558
|
-
notFoundContent: this._isTags
|
|
559
|
-
? this._searchText
|
|
560
|
-
: this._notFoundContent,
|
|
561
|
-
disabled: !this._isTags,
|
|
562
|
-
value: this._isTags ? this._searchText : "disabled"
|
|
563
|
-
});
|
|
564
|
-
} else {
|
|
565
|
-
this._filterOptions = this._options;
|
|
566
|
-
}
|
|
567
|
-
|
|
568
|
-
/** TODO: cause pre & next key selection not work */
|
|
569
|
-
if (updateActiveFilter && !this._selectedOption) {
|
|
570
|
-
this._activeFilterOption = this._filterOptions[0];
|
|
571
|
-
}
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
onSearchChange(searchValue: string): void {
|
|
575
|
-
this.SearchChange.emit(searchValue);
|
|
576
|
-
}
|
|
577
|
-
|
|
578
|
-
@HostListener("click", ["$event"])
|
|
579
|
-
onClick(e: MouseEvent): void {
|
|
580
|
-
e.preventDefault();
|
|
581
|
-
if (!this._disabled) {
|
|
582
|
-
this.Open = !this.Open;
|
|
583
|
-
if (this.ShowSearch) {
|
|
584
|
-
/** wait for search display */ // @ts-ignore
|
|
585
|
-
setTimeout(_ => {
|
|
586
|
-
this.searchInputElementRef.nativeElement.focus();
|
|
587
|
-
});
|
|
588
|
-
}
|
|
589
|
-
}
|
|
590
|
-
}
|
|
591
|
-
|
|
592
|
-
@HostListener("keydown", ["$event"])
|
|
593
|
-
onKeyDown(e: KeyboardEvent): void {
|
|
594
|
-
const keyCode = e.keyCode;
|
|
595
|
-
if (keyCode === TAB && this.Open) {
|
|
596
|
-
this.Open = false;
|
|
597
|
-
return;
|
|
598
|
-
}
|
|
599
|
-
if ((keyCode !== DOWN_ARROW && keyCode !== ENTER) || this.Open) {
|
|
600
|
-
return;
|
|
601
|
-
}
|
|
602
|
-
e.preventDefault();
|
|
603
|
-
if (!this._disabled) {
|
|
604
|
-
this.Open = true;
|
|
605
|
-
if (this.ShowSearch) {
|
|
606
|
-
/** wait for search display */ // @ts-ignore
|
|
607
|
-
setTimeout(_ => {
|
|
608
|
-
this.searchInputElementRef.nativeElement.focus();
|
|
609
|
-
});
|
|
610
|
-
}
|
|
611
|
-
}
|
|
612
|
-
}
|
|
613
|
-
|
|
614
|
-
closeDropDown(): void {
|
|
615
|
-
if (!this.Open) {
|
|
616
|
-
return;
|
|
617
|
-
}
|
|
618
|
-
this.onTouched();
|
|
619
|
-
if (this.Multiple) {
|
|
620
|
-
this._renderer.removeStyle(
|
|
621
|
-
this.searchInputElementRef.nativeElement,
|
|
622
|
-
"width"
|
|
623
|
-
);
|
|
624
|
-
}
|
|
625
|
-
this.clearSearchText();
|
|
626
|
-
this.Open = false;
|
|
627
|
-
}
|
|
628
|
-
|
|
629
|
-
setClassMap(): void {
|
|
630
|
-
this._classList.forEach(_className => {
|
|
631
|
-
this._renderer.removeClass(this._el, _className);
|
|
632
|
-
}); // @ts-ignore
|
|
633
|
-
this._classList = [
|
|
634
|
-
this._prefixCls,
|
|
635
|
-
this._mode === "combobox" && `${this._prefixCls}-combobox`,
|
|
636
|
-
!this._disabled && `${this._prefixCls}-enabled`,
|
|
637
|
-
this._disabled && `${this._prefixCls}-disabled`,
|
|
638
|
-
this._isOpen && `${this._prefixCls}-open`,
|
|
639
|
-
this._showSearch && `${this._prefixCls}-show-search`,
|
|
640
|
-
this._size && `${this._prefixCls}-${this._size}`
|
|
641
|
-
].filter(item => {
|
|
642
|
-
return !!item;
|
|
643
|
-
});
|
|
644
|
-
this._classList.forEach(_className => {
|
|
645
|
-
this._renderer.addClass(this._el, _className);
|
|
646
|
-
});
|
|
647
|
-
this._selectionClassMap = {
|
|
648
|
-
[this._selectionPrefixCls]: true,
|
|
649
|
-
[`${this._selectionPrefixCls}--single`]: !this.Multiple,
|
|
650
|
-
[`${this._selectionPrefixCls}--multiple`]: this.Multiple
|
|
651
|
-
};
|
|
652
|
-
}
|
|
653
|
-
|
|
654
|
-
setDropDownClassMap(): void {
|
|
655
|
-
this._dropDownClassMap = {
|
|
656
|
-
[this._dropDownPrefixCls]: true,
|
|
657
|
-
["component-select"]: this._mode === "combobox",
|
|
658
|
-
[`${this._dropDownPrefixCls}--single`]: !this.Multiple,
|
|
659
|
-
[`${this._dropDownPrefixCls}--multiple`]: this.Multiple,
|
|
660
|
-
[`${this._dropDownPrefixCls}-placement-bottomLeft`]:
|
|
661
|
-
this._dropDownPosition === "bottom",
|
|
662
|
-
[`${this._dropDownPrefixCls}-placement-topLeft`]:
|
|
663
|
-
this._dropDownPosition === "top"
|
|
664
|
-
};
|
|
665
|
-
}
|
|
666
|
-
|
|
667
|
-
scrollToActive(): void {
|
|
668
|
-
/** wait for dropdown display */ // @ts-ignore
|
|
669
|
-
setTimeout(_ => {
|
|
670
|
-
if (this._activeFilterOption && this._activeFilterOption.Value) {
|
|
671
|
-
const index = this._filterOptions.findIndex(
|
|
672
|
-
option => option.Value === this._activeFilterOption.Value
|
|
673
|
-
);
|
|
674
|
-
try {
|
|
675
|
-
const scrollPane = this.dropdownUl.nativeElement.children[
|
|
676
|
-
index
|
|
677
|
-
] as HTMLLIElement;
|
|
678
|
-
// TODO: scrollIntoViewIfNeeded is not a standard API, why doing so?
|
|
679
|
-
/* tslint:disable-next-line:no-any */
|
|
680
|
-
(scrollPane as any).scrollIntoViewIfNeeded(false);
|
|
681
|
-
} catch (e) {}
|
|
682
|
-
}
|
|
683
|
-
});
|
|
684
|
-
}
|
|
685
|
-
|
|
686
|
-
flushComponentState(): void {
|
|
687
|
-
this.updateFilterOption();
|
|
688
|
-
if (!this.Multiple) {
|
|
689
|
-
this.updateSelectedOption(this._value);
|
|
690
|
-
} else {
|
|
691
|
-
if (this._value) {
|
|
692
|
-
this.updateSelectedOption(this._value);
|
|
693
|
-
}
|
|
694
|
-
}
|
|
695
|
-
}
|
|
696
|
-
|
|
697
|
-
_setTriggerWidth(): void {
|
|
698
|
-
this._triggerWidth = this._getTriggerRect().width;
|
|
699
|
-
/** should remove after after https://github.com/angular/material2/pull/8765 merged **/
|
|
700
|
-
if (this._cdkOverlay && this._cdkOverlay.overlayRef) {
|
|
701
|
-
this._cdkOverlay.overlayRef.updateSize({
|
|
702
|
-
width: this._triggerWidth
|
|
703
|
-
});
|
|
704
|
-
}
|
|
705
|
-
}
|
|
706
|
-
|
|
707
|
-
_getTriggerRect(): ClientRect {
|
|
708
|
-
return this.trigger.nativeElement.getBoundingClientRect();
|
|
709
|
-
}
|
|
710
|
-
|
|
711
|
-
writeValue(value: string | string[]): void {
|
|
712
|
-
this._updateValue(value, false);
|
|
713
|
-
}
|
|
714
|
-
|
|
715
|
-
registerOnChange(fn: (value: string | string[]) => void): void {
|
|
716
|
-
this.onChange = fn;
|
|
717
|
-
}
|
|
718
|
-
|
|
719
|
-
registerOnTouched(fn: () => void): void {
|
|
720
|
-
this.onTouched = fn;
|
|
721
|
-
}
|
|
722
|
-
|
|
723
|
-
setDisabledState(isDisabled: boolean): void {
|
|
724
|
-
this.Disabled = isDisabled;
|
|
725
|
-
}
|
|
726
|
-
|
|
727
|
-
dropDownScroll(ul: HTMLUListElement): void {
|
|
728
|
-
if (ul && ul.scrollHeight - ul.scrollTop === ul.clientHeight) {
|
|
729
|
-
this.ScrollToBottom.emit(true);
|
|
730
|
-
}
|
|
731
|
-
}
|
|
732
|
-
|
|
733
|
-
checkDropDownScroll(): void {
|
|
734
|
-
if (
|
|
735
|
-
this.dropdownUl &&
|
|
736
|
-
this.dropdownUl.nativeElement.scrollHeight ===
|
|
737
|
-
this.dropdownUl.nativeElement.clientHeight
|
|
738
|
-
) {
|
|
739
|
-
this.ScrollToBottom.emit(true);
|
|
740
|
-
}
|
|
741
|
-
}
|
|
742
|
-
|
|
743
|
-
constructor(
|
|
744
|
-
private _elementRef: ElementRef,
|
|
745
|
-
private _renderer: Renderer2,
|
|
746
|
-
private cDRef: ChangeDetectorRef
|
|
747
|
-
) {
|
|
748
|
-
this._el = this._elementRef.nativeElement;
|
|
749
|
-
}
|
|
750
|
-
|
|
751
|
-
ngAfterContentInit(): void {
|
|
752
|
-
if (this._value != null) {
|
|
753
|
-
this.flushComponentState();
|
|
754
|
-
}
|
|
755
|
-
}
|
|
756
|
-
|
|
757
|
-
ngOnInit(): void {
|
|
758
|
-
this.updateFilterOption();
|
|
759
|
-
this.setClassMap();
|
|
760
|
-
this.setDropDownClassMap();
|
|
761
|
-
}
|
|
762
|
-
|
|
763
|
-
ngAfterContentChecked(): void {
|
|
764
|
-
if (this._cacheOptions !== this._options) {
|
|
765
|
-
/** update filter option after every content check cycle */
|
|
766
|
-
this.updateFilterOption();
|
|
767
|
-
this._cacheOptions = this._options;
|
|
768
|
-
} else {
|
|
769
|
-
this.updateFilterOption(false);
|
|
770
|
-
}
|
|
771
|
-
|
|
772
|
-
if (this.FirstDefault) {
|
|
773
|
-
if (!this._value && this._options) {
|
|
774
|
-
if (this._options[0] !== undefined && this._options[0].Value) {
|
|
775
|
-
this.chooseOption(this._options[0], false);
|
|
776
|
-
setTimeout(() => {
|
|
777
|
-
this.onChange(this._options[0].Value);
|
|
778
|
-
});
|
|
779
|
-
}
|
|
780
|
-
}
|
|
781
|
-
}
|
|
782
|
-
}
|
|
783
|
-
|
|
784
|
-
private _updateValue(
|
|
785
|
-
value: string[] | string,
|
|
786
|
-
emitChange: boolean = true
|
|
787
|
-
): void {
|
|
788
|
-
if (this._value === value) {
|
|
789
|
-
return;
|
|
790
|
-
}
|
|
791
|
-
if (value == null && this.Multiple) {
|
|
792
|
-
this._value = [];
|
|
793
|
-
} else {
|
|
794
|
-
this._value = value;
|
|
795
|
-
}
|
|
796
|
-
if (!this.Multiple) {
|
|
797
|
-
if (value == null) { // @ts-ignore
|
|
798
|
-
this._selectedOption = null;
|
|
799
|
-
} else {
|
|
800
|
-
this.updateSelectedOption(value);
|
|
801
|
-
}
|
|
802
|
-
} else {
|
|
803
|
-
if (value) {
|
|
804
|
-
if (value.length === 0) {
|
|
805
|
-
this.clearAllSelectedOption(emitChange);
|
|
806
|
-
} else {
|
|
807
|
-
this.updateSelectedOption(value, true);
|
|
808
|
-
}
|
|
809
|
-
} else if (value == null) {
|
|
810
|
-
this.clearAllSelectedOption(emitChange);
|
|
811
|
-
}
|
|
812
|
-
}
|
|
813
|
-
}
|
|
814
|
-
}
|