mis-crystal-design-system 2.4.9 → 2.5.2
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/action-list/action-list.component.d.ts +0 -1
- package/action-list/index.d.ts +1 -1
- package/action-list/mis-crystal-design-system-action-list.metadata.json +1 -1
- package/action-list/public_api.d.ts +2 -2
- package/async-search-dropdown/async-dropdown.component.d.ts +4 -4
- package/async-search-dropdown/index.d.ts +1 -1
- package/async-search-dropdown/mis-crystal-design-system-async-search-dropdown.metadata.json +1 -1
- package/async-search-dropdown/public_api.d.ts +2 -2
- package/bundles/mis-crystal-design-system-action-list.umd.js +3 -11
- package/bundles/mis-crystal-design-system-action-list.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-action-list.umd.min.js +1 -1
- package/bundles/mis-crystal-design-system-action-list.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-async-search-dropdown.umd.js +15 -15
- package/bundles/mis-crystal-design-system-async-search-dropdown.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-async-search-dropdown.umd.min.js +1 -1
- package/bundles/mis-crystal-design-system-async-search-dropdown.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-button.umd.js +25 -25
- package/bundles/mis-crystal-design-system-button.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-button.umd.min.js +1 -1
- package/bundles/mis-crystal-design-system-button.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-checkbox.umd.js +5 -6
- package/bundles/mis-crystal-design-system-checkbox.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-checkbox.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-chip.umd.js +6 -7
- package/bundles/mis-crystal-design-system-chip.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-chip.umd.min.js +1 -1
- package/bundles/mis-crystal-design-system-chip.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-datepicker_v2.umd.js +28 -45
- package/bundles/mis-crystal-design-system-datepicker_v2.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-datepicker_v2.umd.min.js +2 -2
- package/bundles/mis-crystal-design-system-datepicker_v2.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-daterangepicker_v2.umd.js +28 -60
- package/bundles/mis-crystal-design-system-daterangepicker_v2.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-daterangepicker_v2.umd.min.js +1 -1
- package/bundles/mis-crystal-design-system-daterangepicker_v2.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-drawer.umd.js +9 -12
- package/bundles/mis-crystal-design-system-drawer.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-drawer.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-dropdown.umd.js +384 -29
- package/bundles/mis-crystal-design-system-dropdown.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-dropdown.umd.min.js +15 -1
- package/bundles/mis-crystal-design-system-dropdown.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-fab.umd.js +11 -14
- package/bundles/mis-crystal-design-system-fab.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-fab.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-input.umd.js +7 -7
- package/bundles/mis-crystal-design-system-input.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-input.umd.min.js +1 -1
- package/bundles/mis-crystal-design-system-input.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-loader.umd.js +3 -4
- package/bundles/mis-crystal-design-system-loader.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-loader.umd.min.js +1 -1
- package/bundles/mis-crystal-design-system-loader.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-modal.umd.js +8 -12
- package/bundles/mis-crystal-design-system-modal.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-modal.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-multi-select-dropdown.umd.js +61 -29
- package/bundles/mis-crystal-design-system-multi-select-dropdown.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-multi-select-dropdown.umd.min.js +2 -2
- package/bundles/mis-crystal-design-system-multi-select-dropdown.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-nested-multi-select-dropdown.umd.js +71 -32
- package/bundles/mis-crystal-design-system-nested-multi-select-dropdown.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-nested-multi-select-dropdown.umd.min.js +2 -2
- package/bundles/mis-crystal-design-system-nested-multi-select-dropdown.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-radio-button.umd.js +6 -7
- package/bundles/mis-crystal-design-system-radio-button.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-radio-button.umd.min.js +1 -1
- package/bundles/mis-crystal-design-system-radio-button.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-switch.umd.js +3 -4
- package/bundles/mis-crystal-design-system-switch.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-switch.umd.min.js +1 -1
- package/bundles/mis-crystal-design-system-switch.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-table.umd.js +40 -58
- package/bundles/mis-crystal-design-system-table.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-table.umd.min.js +1 -1
- package/bundles/mis-crystal-design-system-table.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-toast.umd.js +28 -33
- package/bundles/mis-crystal-design-system-toast.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-toast.umd.min.js +1 -1
- package/bundles/mis-crystal-design-system-toast.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-tooltip.umd.js +1 -1
- package/bundles/mis-crystal-design-system-tooltip.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-tooltip.umd.min.js +1 -1
- package/bundles/mis-crystal-design-system-tooltip.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system.umd.js.map +1 -1
- package/button/button.component.d.ts +4 -4
- package/button/button.directive.d.ts +3 -3
- package/button/button.directive.scss +1 -1
- package/button/button.module.d.ts +1 -1
- package/button/index.d.ts +1 -1
- package/button/mis-crystal-design-system-button.metadata.json +1 -1
- package/button/public_api.d.ts +2 -2
- package/checkbox/checkbox.component.d.ts +3 -3
- package/checkbox/checkbox.module.d.ts +1 -1
- package/checkbox/index.d.ts +1 -1
- package/checkbox/mis-crystal-design-system-checkbox.metadata.json +1 -1
- package/checkbox/public_api.d.ts +2 -2
- package/chip/chip.component.d.ts +2 -2
- package/chip/chip.module.d.ts +1 -1
- package/chip/index.d.ts +1 -1
- package/chip/mis-crystal-design-system-chip.metadata.json +1 -1
- package/chip/public_api.d.ts +2 -2
- package/datepicker_v2/index.d.ts +1 -1
- package/datepicker_v2/mis-crystal-design-system-datepicker_v2.metadata.json +1 -1
- package/datepicker_v2/public_api.d.ts +3 -3
- package/datepicker_v2/tz-datepicker.directive.d.ts +0 -2
- package/daterangepicker_v2/index.d.ts +1 -1
- package/daterangepicker_v2/mis-crystal-design-system-daterangepicker_v2.metadata.json +1 -1
- package/daterangepicker_v2/public_api.d.ts +3 -3
- package/daterangepicker_v2/tz-daterangepicker.directive.d.ts +0 -1
- package/drawer/index.d.ts +1 -1
- package/drawer/mis-crystal-design-system-drawer.metadata.json +1 -1
- package/drawer/public_api.d.ts +4 -4
- package/dropdown/dropdown.component.d.ts +10 -4
- package/dropdown/dropdown.module.d.ts +1 -1
- package/dropdown/index.d.ts +1 -1
- package/dropdown/mis-crystal-design-system-dropdown.metadata.json +1 -1
- package/dropdown/public_api.d.ts +2 -2
- package/esm2015/action-list/action-list.component.js +4 -12
- package/esm2015/action-list/action-list.module.js +3 -2
- package/esm2015/action-list/index.js +2 -2
- package/esm2015/action-list/public_api.js +3 -3
- package/esm2015/async-search-dropdown/async-dropdown.component.js +25 -25
- package/esm2015/async-search-dropdown/async-dropdown.module.js +7 -7
- package/esm2015/async-search-dropdown/index.js +2 -2
- package/esm2015/async-search-dropdown/public_api.js +3 -3
- package/esm2015/button/button.component.js +10 -10
- package/esm2015/button/button.directive.js +19 -19
- package/esm2015/button/button.module.js +5 -5
- package/esm2015/button/index.js +2 -2
- package/esm2015/button/public_api.js +3 -3
- package/esm2015/checkbox/checkbox.component.js +8 -9
- package/esm2015/checkbox/checkbox.module.js +5 -5
- package/esm2015/checkbox/index.js +2 -2
- package/esm2015/checkbox/public_api.js +3 -3
- package/esm2015/chip/chip.component.js +8 -9
- package/esm2015/chip/chip.module.js +4 -4
- package/esm2015/chip/index.js +2 -2
- package/esm2015/chip/public_api.js +3 -3
- package/esm2015/datepicker_v2/datepicker-constants.js +2 -2
- package/esm2015/datepicker_v2/datepicker.module.js +5 -4
- package/esm2015/datepicker_v2/index.js +2 -2
- package/esm2015/datepicker_v2/models/dp-config.model.js +1 -1
- package/esm2015/datepicker_v2/public_api.js +3 -3
- package/esm2015/datepicker_v2/tz-datepicker.directive.js +4 -24
- package/esm2015/datepicker_v2/tz-dp-container/tz-dp-container.component.js +12 -9
- package/esm2015/datepicker_v2/utils/index.js +13 -13
- package/esm2015/daterangepicker_v2/daterangepicker-constants.js +2 -2
- package/esm2015/daterangepicker_v2/daterangepicker.module.js +4 -3
- package/esm2015/daterangepicker_v2/index.js +2 -2
- package/esm2015/daterangepicker_v2/public_api.js +3 -3
- package/esm2015/daterangepicker_v2/tz-daterangepicker.directive.js +3 -12
- package/esm2015/daterangepicker_v2/tz-drp-container/tz-drp-container.component.js +15 -38
- package/esm2015/daterangepicker_v2/utils/index.js +13 -13
- package/esm2015/drawer/drawer-body/drawer-body.component.js +4 -7
- package/esm2015/drawer/drawer.module.js +4 -4
- package/esm2015/drawer/drawer.service.js +4 -4
- package/esm2015/drawer/index.js +2 -2
- package/esm2015/drawer/public_api.js +5 -5
- package/esm2015/dropdown/dropdown.component.js +67 -26
- package/esm2015/dropdown/dropdown.module.js +7 -6
- package/esm2015/dropdown/index.js +2 -2
- package/esm2015/dropdown/public_api.js +3 -3
- package/esm2015/fab/fab.component.js +11 -14
- package/esm2015/fab/fab.module.js +3 -3
- package/esm2015/fab/index.js +2 -2
- package/esm2015/fab/public_api.js +3 -3
- package/esm2015/index.js +2 -2
- package/esm2015/input/directives/input/input.directive.js +7 -7
- package/esm2015/input/index.js +2 -2
- package/esm2015/input/mis-input.component.js +8 -8
- package/esm2015/input/mis-input.module.js +7 -7
- package/esm2015/input/public_api.js +4 -4
- package/esm2015/loader/index.js +2 -2
- package/esm2015/loader/loader.component.js +5 -6
- package/esm2015/loader/loader.module.js +4 -4
- package/esm2015/loader/public_api.js +3 -3
- package/esm2015/menu/index.js +2 -2
- package/esm2015/modal/index.js +2 -2
- package/esm2015/modal/modal.module.js +10 -14
- package/esm2015/modal/modal.service.js +3 -3
- package/esm2015/modal/module-wrapper/module-wrapper.component.js +4 -4
- package/esm2015/modal/public_api.js +5 -5
- package/esm2015/multi-select-dropdown/index.js +2 -2
- package/esm2015/multi-select-dropdown/multi-select-dropdown.component.js +80 -44
- package/esm2015/multi-select-dropdown/multi-select-dropdown.module.js +9 -8
- package/esm2015/multi-select-dropdown/public_api.js +3 -3
- package/esm2015/nested-multi-select-dropdown/index.js +2 -2
- package/esm2015/nested-multi-select-dropdown/nested-multi-select-dropdown.component.js +72 -29
- package/esm2015/nested-multi-select-dropdown/nested-multi-select-dropdown.module.js +9 -8
- package/esm2015/nested-multi-select-dropdown/public_api.js +3 -3
- package/esm2015/public-api.js +1 -1
- package/esm2015/radio-button/index.js +2 -2
- package/esm2015/radio-button/public_api.js +3 -3
- package/esm2015/radio-button/radio-button.component.js +9 -10
- package/esm2015/radio-button/radio-button.module.js +5 -5
- package/esm2015/switch/index.js +2 -2
- package/esm2015/switch/public_api.js +3 -3
- package/esm2015/switch/switch.component.js +6 -7
- package/esm2015/switch/switch.module.js +5 -5
- package/esm2015/table/custom-table-cell.directive.js +3 -3
- package/esm2015/table/filter/filter.component.js +11 -13
- package/esm2015/table/index.js +2 -2
- package/esm2015/table/public_api.js +5 -5
- package/esm2015/table/sub-table/sub-table.component.js +12 -13
- package/esm2015/table/table.component.js +21 -22
- package/esm2015/table/table.module.js +7 -21
- package/esm2015/toast/index.js +2 -2
- package/esm2015/toast/toast.component.js +12 -14
- package/esm2015/toast/toast.data.service.js +3 -3
- package/esm2015/toast/toast.module.js +9 -9
- package/esm2015/toast/toast.service.js +23 -26
- package/esm2015/tooltip/tooltip.directive.js +1 -1
- package/esm2015/tooltip/tooltip.module.js +3 -2
- package/fab/index.d.ts +1 -1
- package/fab/mis-crystal-design-system-fab.metadata.json +1 -1
- package/fab/public_api.d.ts +2 -2
- package/fesm2015/mis-crystal-design-system-action-list.js +5 -13
- package/fesm2015/mis-crystal-design-system-action-list.js.map +1 -1
- package/fesm2015/mis-crystal-design-system-async-search-dropdown.js +20 -20
- package/fesm2015/mis-crystal-design-system-async-search-dropdown.js.map +1 -1
- package/fesm2015/mis-crystal-design-system-button.js +25 -25
- package/fesm2015/mis-crystal-design-system-button.js.map +1 -1
- package/fesm2015/mis-crystal-design-system-checkbox.js +5 -6
- package/fesm2015/mis-crystal-design-system-checkbox.js.map +1 -1
- package/fesm2015/mis-crystal-design-system-chip.js +6 -7
- package/fesm2015/mis-crystal-design-system-chip.js.map +1 -1
- package/fesm2015/mis-crystal-design-system-datepicker_v2.js +28 -45
- package/fesm2015/mis-crystal-design-system-datepicker_v2.js.map +1 -1
- package/fesm2015/mis-crystal-design-system-daterangepicker_v2.js +32 -64
- package/fesm2015/mis-crystal-design-system-daterangepicker_v2.js.map +1 -1
- package/fesm2015/mis-crystal-design-system-drawer.js +9 -12
- package/fesm2015/mis-crystal-design-system-drawer.js.map +1 -1
- package/fesm2015/mis-crystal-design-system-dropdown.js +67 -26
- package/fesm2015/mis-crystal-design-system-dropdown.js.map +1 -1
- package/fesm2015/mis-crystal-design-system-fab.js +11 -14
- package/fesm2015/mis-crystal-design-system-fab.js.map +1 -1
- package/fesm2015/mis-crystal-design-system-input.js +8 -8
- package/fesm2015/mis-crystal-design-system-input.js.map +1 -1
- package/fesm2015/mis-crystal-design-system-loader.js +3 -4
- package/fesm2015/mis-crystal-design-system-loader.js.map +1 -1
- package/fesm2015/mis-crystal-design-system-modal.js +8 -12
- package/fesm2015/mis-crystal-design-system-modal.js.map +1 -1
- package/fesm2015/mis-crystal-design-system-multi-select-dropdown.js +80 -44
- package/fesm2015/mis-crystal-design-system-multi-select-dropdown.js.map +1 -1
- package/fesm2015/mis-crystal-design-system-nested-multi-select-dropdown.js +72 -29
- package/fesm2015/mis-crystal-design-system-nested-multi-select-dropdown.js.map +1 -1
- package/fesm2015/mis-crystal-design-system-radio-button.js +6 -7
- package/fesm2015/mis-crystal-design-system-radio-button.js.map +1 -1
- package/fesm2015/mis-crystal-design-system-switch.js +3 -4
- package/fesm2015/mis-crystal-design-system-switch.js.map +1 -1
- package/fesm2015/mis-crystal-design-system-table.js +42 -60
- package/fesm2015/mis-crystal-design-system-table.js.map +1 -1
- package/fesm2015/mis-crystal-design-system-toast.js +28 -33
- package/fesm2015/mis-crystal-design-system-toast.js.map +1 -1
- package/fesm2015/mis-crystal-design-system-tooltip.js +2 -2
- package/fesm2015/mis-crystal-design-system-tooltip.js.map +1 -1
- package/fesm2015/mis-crystal-design-system.js.map +1 -1
- package/index.d.ts +1 -1
- package/input/directives/input/input.directive.d.ts +3 -3
- package/input/index.d.ts +1 -1
- package/input/mis-crystal-design-system-input.metadata.json +1 -1
- package/input/mis-input.component.d.ts +4 -4
- package/input/public_api.d.ts +3 -3
- package/loader/index.d.ts +1 -1
- package/loader/loader.component.d.ts +1 -1
- package/loader/loader.module.d.ts +1 -1
- package/loader/mis-crystal-design-system-loader.metadata.json +1 -1
- package/loader/public_api.d.ts +2 -2
- package/menu/index.d.ts +1 -1
- package/modal/index.d.ts +1 -1
- package/modal/mis-crystal-design-system-modal.metadata.json +1 -1
- package/modal/modal.module.d.ts +1 -1
- package/modal/public_api.d.ts +4 -4
- package/multi-select-dropdown/index.d.ts +1 -1
- package/multi-select-dropdown/mis-crystal-design-system-multi-select-dropdown.metadata.json +1 -1
- package/multi-select-dropdown/multi-select-dropdown.component.d.ts +9 -3
- package/multi-select-dropdown/multi-select-dropdown.module.d.ts +1 -1
- package/multi-select-dropdown/public_api.d.ts +2 -2
- package/nested-multi-select-dropdown/index.d.ts +1 -1
- package/nested-multi-select-dropdown/mis-crystal-design-system-nested-multi-select-dropdown.metadata.json +1 -1
- package/nested-multi-select-dropdown/nested-multi-select-dropdown.component.d.ts +10 -4
- package/nested-multi-select-dropdown/nested-multi-select-dropdown.module.d.ts +1 -1
- package/nested-multi-select-dropdown/public_api.d.ts +2 -2
- package/package.json +1 -1
- package/radio-button/index.d.ts +1 -1
- package/radio-button/mis-crystal-design-system-radio-button.metadata.json +1 -1
- package/radio-button/public_api.d.ts +2 -2
- package/radio-button/radio-button.component.d.ts +2 -2
- package/radio-button/radio-button.module.d.ts +1 -1
- package/switch/index.d.ts +1 -1
- package/switch/mis-crystal-design-system-switch.metadata.json +1 -1
- package/switch/public_api.d.ts +2 -2
- package/switch/switch.component.d.ts +2 -2
- package/switch/switch.module.d.ts +1 -1
- package/table/custom-table-cell.directive.d.ts +1 -1
- package/table/filter/filter.component.d.ts +1 -1
- package/table/index.d.ts +1 -1
- package/table/mis-crystal-design-system-table.metadata.json +1 -1
- package/table/public_api.d.ts +7 -7
- package/table/sub-table/sub-table.component.d.ts +6 -6
- package/table/table.component.d.ts +6 -6
- package/toast/index.d.ts +1 -1
- package/toast/mis-crystal-design-system-toast.metadata.json +1 -1
- package/toast/toast.component.d.ts +1 -1
- package/toast/toast.module.d.ts +1 -1
- package/toast/toast.service.d.ts +3 -3
- package/tooltip/mis-crystal-design-system-tooltip.metadata.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@angular/forms"),require("mis-crystal-design-system/checkbox"),require("mis-crystal-design-system/button")):"function"==typeof define&&define.amd?define("mis-crystal-design-system/multi-select-dropdown",["exports","@angular/core","@angular/common","@angular/forms","mis-crystal-design-system/checkbox","mis-crystal-design-system/button"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self)["mis-crystal-design-system"]=e["mis-crystal-design-system"]||{},e["mis-crystal-design-system"]["multi-select-dropdown"]={}),e.ng.core,e.ng.common,e.ng.forms,e["mis-crystal-design-system"].checkbox,e["mis-crystal-design-system"].button)}(this,(function(e,t,n,i,
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/cdk/portal"),require("@angular/cdk/overlay"),require("@angular/common"),require("@angular/forms"),require("mis-crystal-design-system/checkbox"),require("mis-crystal-design-system/button")):"function"==typeof define&&define.amd?define("mis-crystal-design-system/multi-select-dropdown",["exports","@angular/core","@angular/cdk/portal","@angular/cdk/overlay","@angular/common","@angular/forms","mis-crystal-design-system/checkbox","mis-crystal-design-system/button"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self)["mis-crystal-design-system"]=e["mis-crystal-design-system"]||{},e["mis-crystal-design-system"]["multi-select-dropdown"]={}),e.ng.core,e.ng.cdk.portal,e.ng.cdk.overlay,e.ng.common,e.ng.forms,e["mis-crystal-design-system"].checkbox,e["mis-crystal-design-system"].button)}(this,(function(e,t,n,o,i,r,a,s){"use strict";
|
|
2
2
|
/*! *****************************************************************************
|
|
3
3
|
Copyright (c) Microsoft Corporation.
|
|
4
4
|
|
|
@@ -12,5 +12,5 @@
|
|
|
12
12
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
13
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
14
|
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
-
***************************************************************************** */Object.create;function r(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,a=n.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(i=a.next()).done;)r.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return r}function c(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(r(arguments[t]));return e}Object.create;var s=function(){function e(e){this.eRef=e,this.searchInput="",this.isOpen=!1,this.localSelectedItems=[],this.localData=[],this.searchData=[],this.isSearchInputFocused=!1,this.SELECT_ALL_ENUM="SELECT_ALL_ENABLED",this.label="Select",this.height="",this.width="",this.dropdownListHeight="",this.dropdownListWidth="",this.dropdownListPosition="Left",this.enableSelectAll=!1,this.searchEnabled=!0,this.showSelectedCount=!1,this.noDataMessage="No Data",this.options={sortLabels:!0},this.hideApplyButton=!1,this.onChange=new t.EventEmitter}return Object.defineProperty(e.prototype,"data",{set:function(e){this.localData=e.map((function(e){return Object.assign(Object.assign({},e),{checked:!1})}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selectedItems",{set:function(e){this.handlerSetLocalSelectedItems(e)},enumerable:!1,configurable:!0}),e.prototype.clickout=function(e){!this.eRef.nativeElement.contains(e.target)&&this.onCancel()},e.prototype.ngOnInit=function(){},e.prototype.handlerSetLocalSelectedItems=function(e){var t=this;this.localSelectedItems=e,this.localData=this.localData.map((function(n){return n.value===t.SELECT_ALL_ENUM&&t.localData.every((function(e){return e.checked}))||e.some((function(e){return e.value===n.value}))?Object.assign(Object.assign({},n),{checked:!0}):Object.assign(Object.assign({},n),{checked:!1})})),this.localData=this.formatValues(this.localData)},e.prototype.searchInputFocused=function(e){this.isSearchInputFocused=e},e.prototype.searchInputCanceled=function(e){e.stopPropagation(),this.searchInput="",this.isSearchInputFocused=!1},e.prototype.toggleDropdown=function(){this.isOpen=!this.isOpen,this.isOpen&&(this.handlerSetLocalSelectedItems(this.localSelectedItems),this.localData=this.formatValues(this.localData))},e.prototype.filterByValue=function(e,t){return e.filter((function(e){return e.label.toLowerCase().includes(t.toLowerCase())}))},e.prototype.searchInputOnChange=function(e){this.searchInput=e,e?this.searchData=this.filterByValue(this.localData,e):(this.searchData=[],this.searchInput="")},e.prototype.formatValues=function(e){var t=this,n=e;this.options.sortLabels&&(n=c(e.filter((function(e){return e.checked})).sort((function(e,t){return e.label>t.label?1:t.label>e.label?-1:0})),e.filter((function(e){return!e.checked})).sort((function(e,t){return e.label>t.label?1:t.label>e.label?-1:0}))).filter((function(e){return e.value!==t.SELECT_ALL_ENUM})));return!n.some((function(e){return e.value===t.SELECT_ALL_ENUM}))&&this.enableSelectAll&&n.length>0&&n.unshift({label:"Select all",value:this.SELECT_ALL_ENUM,checked:n.every((function(e){return e.checked}))}),n},e.prototype.toggleSelectedItems=function(e,t){var n=this;if(e.stopPropagation(),this.enableSelectAll&&t.value===this.SELECT_ALL_ENUM)return this.localData=this.localData.map((function(e){return Object.assign(Object.assign({},e),{checked:!t.checked})})),void(this.hideApplyButton&&this.applyFilters());t.checked?this.localData=c(this.localData.map((function(e){return e.value===t.value||e.value===n.SELECT_ALL_ENUM?Object.assign(Object.assign({},e),{checked:!1}):e}))):(this.localData=c(this.localData.map((function(e){return e.value===t.value?Object.assign(Object.assign({},e),{checked:!0}):e}))),this.enableSelectAll&&this.localData.filter((function(e){return e.value!==n.SELECT_ALL_ENUM})).every((function(e){return e.checked}))&&(this.localData=c(this.localData.map((function(e){return e.value===n.SELECT_ALL_ENUM?Object.assign(Object.assign({},e),{checked:!0}):e}))))),this.searchEnabled&&this.searchInputOnChange(this.searchInput),this.hideApplyButton&&this.applyFilters()},e.prototype.applyFilters=function(){var e=this;this.onChange.emit(this.localData.filter((function(t){return t.checked&&t.value!==e.SELECT_ALL_ENUM})).map((function(e){e.checked;return function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]])}return n}(e,["checked"])}))),this.hideApplyButton||this.onCancel()},e.prototype.onReset=function(){this.isSearchInputFocused=!1,this.onChange.emit([]),this.isOpen=!1,this.searchInput=""},e.prototype.onCancel=function(){var e=this;this.isSearchInputFocused=!1,this.localData=this.localData.map((function(t){return e.localSelectedItems.some((function(e){return e.value===t.value&&String(e.checked)!==String(t.checked)}))?t:Object.assign(Object.assign({},t),{checked:!1})})),this.isOpen=!1,this.searchInput=""},e}();s.decorators=[{type:t.Component,args:[{selector:"mis-multi-select-dropdown",template:'<div\n class="container"\n [ngStyle]="{\n height: height.length > 0 ? height : \'\',\n width: width.length > 0 ? width : \'\'\n }"\n>\n <div class="dropdown" (click)="toggleDropdown()" [ngStyle]="{ background: isOpen ? \'#E6EBF7\' : \'\' }">\n <div class="label">\n <p class="text">{{ label }}</p>\n <p *ngIf="showSelectedCount && localSelectedItems?.length > 0" class="count">\n {{ localSelectedItems?.length }}\n </p>\n </div>\n <svg\n class="handle"\n [ngStyle]="{ transform: isOpen ? \'rotate(180deg)\' : \'rotate(0deg)\' }"\n width="20"\n height="20"\n viewBox="0 0 20 20"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M13.825 7.15845L10 10.9751L6.175 7.15845L5 8.33345L10 13.3334L15 8.33345L13.825 7.15845Z"\n fill="#181F33"\n />\n </svg>\n </div>\n <div style="flex-basis: 0"></div>\n <div style="width: 100%; position: relative">\n <div\n *ngIf="isOpen"\n class="popup-container"\n [ngStyle]="{\n height: dropdownListHeight,\n width: dropdownListWidth\n }"\n [ngClass]="{\n \'position-left\': dropdownListPosition === \'Left\',\n \'position-right\': dropdownListPosition === \'Right\'\n }"\n >\n <div *ngIf="searchEnabled" class="search-container">\n <svg\n *ngIf="!isSearchInputFocused"\n class="search-icon"\n width="24"\n height="24"\n viewBox="0 0 24 24"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M4.21508 11.1456C4.21508 7.3179 7.33722 4.21165 11.1926 4.21165C15.048 4.21165 18.1702 7.3179 18.1702 11.1456C18.1702 12.6931 17.6599 14.1226 16.7972 15.2767L15.3685 16.7013C14.2044 17.5668 12.759 18.0796 11.1926 18.0796C7.33722 18.0796 4.21508 14.9734 4.21508 11.1456ZM15.9421 17.7835C14.6021 18.7329 12.9627 19.2913 11.1926 19.2913C6.66977 19.2913 3 15.6461 3 11.1456C3 6.64512 6.66977 3 11.1926 3C15.7155 3 19.3852 6.64512 19.3852 11.1456C19.3852 12.9371 18.8037 14.5931 17.8184 15.9375L19.8361 17.4048C20.6705 17.912 21.7554 18.6543 20.2454 20.215C18.7353 21.7756 18.0099 20.6663 17.4991 19.8364L15.9421 17.7835Z"\n fill="#6A737D"\n />\n </svg>\n <input\n [ngModel]="searchInput"\n [ngStyle]="{\n paddingLeft: isSearchInputFocused ? \'12px\' : \'45px\',\n border: isSearchInputFocused ? \'1px solid #0937B2\' : \'1px solid #e0e0e0\',\n paddingRight: isSearchInputFocused ? \'45px\' : \'10px\'\n }"\n (ngModelChange)="searchInputOnChange($event)"\n [placeholder]="isSearchInputFocused ? \'\' : \'Search Keyword\'"\n (focus)="searchInputFocused(true)"\n class="search-input"\n />\n <svg\n *ngIf="isSearchInputFocused"\n class="cancel-icon"\n (click)="searchInputCanceled($event)"\n width="24"\n height="24"\n viewBox="0 0 24 24"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M8.87446 7.32144C8.44588 6.89285 7.751 6.89285 7.32242 7.32144C6.89383 7.75002 6.89383 8.4449 7.32242 8.87349L10.4488 11.9999L7.32357 15.1252C6.89498 15.5538 6.89498 16.2486 7.32357 16.6772C7.75215 17.1058 8.44703 17.1058 8.87561 16.6772L12.0009 13.552L15.1261 16.6772C15.5547 17.1058 16.2496 17.1058 16.6781 16.6772C17.1067 16.2486 17.1067 15.5537 16.6781 15.1251L13.5529 11.9999L16.6793 8.87354C17.1079 8.44496 17.1079 7.75008 16.6793 7.3215C16.2507 6.89291 15.5558 6.89291 15.1273 7.3215L12.0009 10.4479L8.87446 7.32144Z"\n fill="#6A737D"\n />\n </svg>\n </div>\n <div class="items">\n <div class="item" (click)="toggleSelectedItems($event, item)" *ngFor="let item of searchInput ? searchData : localData">\n <div class="checkbox-container-wrapper">\n <div class="checkbox-container">\n <mis-checkbox [checked]="item.checked"></mis-checkbox>\n </div>\n <p class="label">\n {{ item.label }}\n </p>\n </div>\n <div class="icon-container" *ngIf="item.icon">\n <img class="icon" [src]="item.icon" alt="no img" />\n </div>\n </div>\n <div class="noData" *ngIf="(searchInput ? searchData : localData).length === 0">\n {{ searchInput === "" ? noDataMessage : "No results" }}\n </div>\n </div>\n <div *ngIf="localData.length !== 0 && !hideApplyButton" class="actions-container">\n <div style="width: calc(50% - 4px)">\n <mis-button [name]="\'Reset\'" [type]="\'Text\'" [width]="\'100%\'" (click)="onReset()"></mis-button>\n </div>\n <div style="width: calc(50% - 4px)">\n <mis-button [name]="\'Apply\'" [type]="\'Solid\'" [width]="\'100%\'" (click)="applyFilters()"></mis-button>\n </div>\n </div>\n </div>\n </div>\n</div>\n',styles:['.container{position:relative;display:flex;justify-content:center;align-items:center;flex-wrap:wrap;height:32px;width:256px;font-family:Lato,sans-serif!important}.container .dropdown{height:inherit;border:1px solid #e0e0e0;border-radius:6px;background-color:#fff;cursor:pointer;display:flex;justify-content:space-between;align-items:center;width:100%;padding:0 12px;overflow:hidden}.container .dropdown:hover{background-color:#f5f7fc}.container .dropdown .label{display:flex;justify-content:flex-start;align-items:center;width:calc(100% - 32px)}.container .dropdown .label,.container .dropdown .label .text{font-style:normal;font-weight:400;font-size:14px;line-height:20px;letter-spacing:.2px;color:#181f33}.container .dropdown .label .text{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.container .dropdown .label .count{background-color:#e0e0e0;border-radius:50%;padding:2px 7px;margin:0 0 0 8px;font-style:normal;font-weight:400;font-size:14px;line-height:20px;text-align:center;letter-spacing:.2px;color:#181f33}.container .dropdown .handle{width:24px;height:24px;transition:.3s;position:absolute;right:12px;border-radius:50%;overflow:hidden}.container .popup-container{position:absolute;top:4px;width:100%;max-height:340px;padding-bottom:0;border:1px solid #e0e0e0;border-radius:8px;background-color:#fff;box-shadow:0 12px 24px 0 rgba(0,0,0,.12);overflow:scroll;overflow-x:hidden;display:flex;flex-direction:column;justify-content:space-between;z-index:100}.container .popup-container::-webkit-scrollbar{width:0;height:0}.container .popup-container .search-container{position:relative;box-sizing:border-box;padding:8px}.container .popup-container .search-container .search-icon{position:absolute;width:24px;height:24px;top:50%;transform:translateY(-50%);left:18px;z-index:1}.container .popup-container .search-container .search-input{height:40px;width:100%;padding:12px;border:1px solid #e0e0e0;box-sizing:border-box;border-radius:8px;outline:none;caret-color:#0937b2;font-style:normal;font-weight:400;font-size:12px;line-height:18px;display:flex;align-items:center;letter-spacing:.2px;color:#181f33}.container .popup-container .search-container .cancel-icon{position:absolute;cursor:pointer;width:24px;height:24px;top:50%;transform:translateY(-50%);right:18px;z-index:1}.container .popup-container .items{padding:8px 0 8px 8px;overflow-y:scroll;height:100%}.container .popup-container .items::-webkit-scrollbar{width:5px;height:0}.container .popup-container .items::-webkit-scrollbar-thumb{background:#9aa7b4;border-radius:10px}.container .popup-container .items .noData{display:flex;justify-content:center;align-items:center;font-style:normal;font-weight:400;font-size:14px;line-height:20px;letter-spacing:.2px;color:#181f33}.container .popup-container .items .item{cursor:pointer;display:flex;justify-content:flex-start;align-items:center;padding:8px 12px;border-radius:6px;height:auto}.container .popup-container .items .item:hover{background-color:#f5f7fc}.container .popup-container .items .item .checkbox-container-wrapper{display:flex;justify-content:flex-start;align-items:center;width:90%}.container .popup-container .items .item .checkbox-container-wrapper .checkbox-container{display:block;position:relative;cursor:pointer;font-size:22px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.container .popup-container .items .item .checkbox-container-wrapper .checkbox-container input{position:absolute;opacity:0;cursor:pointer;height:0;width:0}.container .popup-container .items .item .checkbox-container-wrapper .checkbox-container input:checked~.checkmark:after{display:block}.container .popup-container .items .item .checkbox-container-wrapper .checkbox-container .checkmark{position:absolute;top:-8px;left:0;height:15px;width:15px;border-radius:4px;background-color:#0079f1;border:1px solid #6a737d}.container .popup-container .items .item .checkbox-container-wrapper .checkbox-container .checkmark:after{content:"";position:absolute;display:none;left:5px;top:2px;width:3px;height:6px;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg)}.container .popup-container .items .item .checkbox-container-wrapper .label{margin:0 0 0 8px;line-height:20px;font-size:14px;font-style:normal;font-weight:400;letter-spacing:.200000003px}.container .popup-container .items .item .icon-container{width:10%;display:flex;justify-content:flex-end}.container .popup-container .items .item .icon-container .icon{width:20px;height:20px}.container .popup-container .actions-container{display:flex;justify-content:space-between;bottom:0;align-items:center;position:-webkit-sticky;position:sticky;padding:16px;background-color:#fff;border-top:1px solid #e0e0e0}.container .popup-container .actions-container .cancel{cursor:pointer;padding:10px 32px;text-align:center;font-size:16px;line-height:24px;border-radius:8px}.container .popup-container .actions-container .cancel:hover{background:rgba(9,55,178,.04)}.container .popup-container .actions-container .apply{cursor:pointer;padding:10px 32px;text-align:center;color:#fff;font-size:16px;line-height:24px;background:#0937b2;border-radius:8px}.position-left{right:0}.position-right{left:0}']}]}],s.ctorParameters=function(){return[{type:t.ElementRef}]},s.propDecorators={data:[{type:t.Input}],label:[{type:t.Input}],height:[{type:t.Input}],width:[{type:t.Input}],dropdownListHeight:[{type:t.Input}],dropdownListWidth:[{type:t.Input}],dropdownListPosition:[{type:t.Input}],enableSelectAll:[{type:t.Input}],searchEnabled:[{type:t.Input}],showSelectedCount:[{type:t.Input}],noDataMessage:[{type:t.Input}],options:[{type:t.Input}],selectedItems:[{type:t.Input}],hideApplyButton:[{type:t.Input}],onChange:[{type:t.Output}],clickout:[{type:t.HostListener,args:["document:click",["$event"]]}]};var l=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[]}},e}();l.decorators=[{type:t.NgModule,args:[{declarations:[s],imports:[n.CommonModule,i.FormsModule,o.CheckboxModule,a.ButtonModule],exports:[s]}]}],e.MultiSelectDropdownComponent=s,e.MultiSelectDropdownModule=l,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
15
|
+
***************************************************************************** */Object.create;function c(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,i,r=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=r.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return a}function l(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(c(arguments[t]));return e}Object.create;var p=function(){function e(e,n,o){this.eRef=e,this.overlay=n,this.viewContainerRef=o,this.searchInput="",this.isOpen=!1,this.localSelectedItems=[],this.localData=[],this.searchData=[],this.isSearchInputFocused=!1,this.SELECT_ALL_ENUM="SELECT_ALL_ENABLED",this.label="Select",this.height="",this.width="",this.dropdownListHeight="",this.dropdownListWidth="",this.dropdownListPosition="Left",this.enableSelectAll=!1,this.searchEnabled=!0,this.showSelectedCount=!1,this.noDataMessage="No Data",this.options={sortLabels:!0},this.hideApplyButton=!1,this.onChange=new t.EventEmitter}return Object.defineProperty(e.prototype,"data",{set:function(e){this.localData=e.map((function(e){return Object.assign(Object.assign({},e),{checked:!1})}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selectedItems",{set:function(e){this.handlerSetLocalSelectedItems(e)},enumerable:!1,configurable:!0}),e.prototype.ngOnInit=function(){},e.prototype.handlerSetLocalSelectedItems=function(e){var t=this;this.localSelectedItems=e,this.localData=this.localData.map((function(n){return n.value===t.SELECT_ALL_ENUM&&t.localData.every((function(e){return e.checked}))||e.some((function(e){return e.value===n.value}))?Object.assign(Object.assign({},n),{checked:!0}):Object.assign(Object.assign({},n),{checked:!1})})),this.localData=this.formatValues(this.localData)},e.prototype.searchInputFocused=function(e){this.isSearchInputFocused=e},e.prototype.searchInputCanceled=function(e){e.stopPropagation(),this.searchInput="",this.isSearchInputFocused=!1},e.prototype.toggleDropdown=function(){this.isOpen=!this.isOpen,this.isOpen&&(this.handlerSetLocalSelectedItems(this.localSelectedItems),this.localData=this.formatValues(this.localData)),this.isOpen?this.openDropdown(this.popupContainer,this.selectElement.nativeElement):this.onCancel()},e.prototype.openDropdown=function(e,t){var i=this,r=[new o.ConnectionPositionPair({originX:"start",originY:"bottom"},{overlayX:"start",overlayY:"top"},0,4),new o.ConnectionPositionPair({originX:"end",originY:"bottom"},{overlayX:"end",overlayY:"top"},0,4)],a=[new o.ConnectionPositionPair({originX:"start",originY:"top"},{overlayX:"start",overlayY:"bottom"},0,-4),new o.ConnectionPositionPair({originX:"end",originY:"top"},{overlayX:"end",overlayY:"bottom"},0,-4)],s=this.overlay.position().flexibleConnectedTo(t).withPositions(l("Right"===this.dropdownListPosition?r.reverse():r,"Right"===this.dropdownListPosition?a.reverse():a)).withPush(!0),c=new o.OverlayConfig({hasBackdrop:!0,backdropClass:"cdk-overlay-transparent-backdrop",scrollStrategy:this.overlay.scrollStrategies.reposition(),positionStrategy:s,width:t.clientWidth});this.overlayRef=this.overlay.create(c),this.dropdownListWidth&&this.overlayRef.updateSize({width:this.dropdownListWidth}),this.dropdownListHeight&&this.overlayRef.updateSize({height:this.dropdownListHeight}),this.overlayRef.attach(new n.TemplatePortal(e,this.viewContainerRef)),this.overlayRef.backdropClick().subscribe((function(e){i.onCancel()}))},e.prototype.filterByValue=function(e,t){return e.filter((function(e){return e.label.toLowerCase().includes(t.toLowerCase())}))},e.prototype.searchInputOnChange=function(e){this.searchInput=e,e?this.searchData=this.filterByValue(this.localData,e):(this.searchData=[],this.searchInput="")},e.prototype.formatValues=function(e){var t=this,n=e;this.options.sortLabels&&(n=l(e.filter((function(e){return e.checked})).sort((function(e,t){return e.label>t.label?1:t.label>e.label?-1:0})),e.filter((function(e){return!e.checked})).sort((function(e,t){return e.label>t.label?1:t.label>e.label?-1:0}))).filter((function(e){return e.value!==t.SELECT_ALL_ENUM})));return!n.some((function(e){return e.value===t.SELECT_ALL_ENUM}))&&this.enableSelectAll&&n.length>0&&n.unshift({label:"Select all",value:this.SELECT_ALL_ENUM,checked:n.every((function(e){return e.checked}))}),n},e.prototype.toggleSelectedItems=function(e,t){var n=this;if(e.stopPropagation(),this.enableSelectAll&&t.value===this.SELECT_ALL_ENUM)return this.localData=this.localData.map((function(e){return Object.assign(Object.assign({},e),{checked:!t.checked})})),void(this.hideApplyButton&&this.applyFilters());t.checked?this.localData=l(this.localData.map((function(e){return e.value===t.value||e.value===n.SELECT_ALL_ENUM?Object.assign(Object.assign({},e),{checked:!1}):e}))):(this.localData=l(this.localData.map((function(e){return e.value===t.value?Object.assign(Object.assign({},e),{checked:!0}):e}))),this.enableSelectAll&&this.localData.filter((function(e){return e.value!==n.SELECT_ALL_ENUM})).every((function(e){return e.checked}))&&(this.localData=l(this.localData.map((function(e){return e.value===n.SELECT_ALL_ENUM?Object.assign(Object.assign({},e),{checked:!0}):e}))))),this.searchEnabled&&this.searchInputOnChange(this.searchInput),this.hideApplyButton&&this.applyFilters()},e.prototype.applyFilters=function(){var e=this;this.onChange.emit(this.localData.filter((function(t){return t.checked&&t.value!==e.SELECT_ALL_ENUM})).map((function(e){e.checked;return function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n}(e,["checked"])}))),this.hideApplyButton||this.onCancel()},e.prototype.onReset=function(){this.isSearchInputFocused=!1,this.onChange.emit([]),this.isOpen=!1,this.searchInput=""},e.prototype.onCancel=function(){var e,t=this;this.isSearchInputFocused=!1,this.localData=this.localData.map((function(e){return t.localSelectedItems.some((function(t){return t.value===e.value&&String(t.checked)!==String(e.checked)}))?e:Object.assign(Object.assign({},e),{checked:!1})})),this.isOpen=!1,this.searchInput="",null===(e=this.overlayRef)||void 0===e||e.detach(),this.searchInput=""},e}();p.decorators=[{type:t.Component,args:[{selector:"mis-multi-select-dropdown",template:'<div\n class="container"\n [ngStyle]="{\n height: height.length > 0 ? height : \'\',\n width: width.length > 0 ? width : \'\'\n }"\n>\n <div\n class="dropdown"\n #select\n tabindex="0"\n (keyup.enter)="toggleDropdown()"\n (click)="toggleDropdown()"\n [ngStyle]="{ background: isOpen ? \'#E6EBF7\' : \'\' }"\n >\n <div class="label">\n <p class="text">{{ label }}</p>\n <p *ngIf="showSelectedCount && localSelectedItems?.length > 0" class="count">\n {{ localSelectedItems?.length }}\n </p>\n </div>\n <svg\n class="handle"\n [ngStyle]="{ transform: isOpen ? \'rotate(180deg)\' : \'rotate(0deg)\' }"\n width="20"\n height="20"\n viewBox="0 0 20 20"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M13.825 7.15845L10 10.9751L6.175 7.15845L5 8.33345L10 13.3334L15 8.33345L13.825 7.15845Z"\n fill="#181F33"\n />\n </svg>\n </div>\n</div>\n<ng-template #popupContainer>\n <div\n class="popup-container"\n [ngStyle]="{\n height: dropdownListHeight,\n width: dropdownListWidth\n }"\n [ngClass]="{\n \'position-left\': dropdownListPosition === \'Left\',\n \'position-right\': dropdownListPosition === \'Right\'\n }"\n >\n <div *ngIf="searchEnabled" class="search-container">\n <svg\n *ngIf="!isSearchInputFocused"\n class="search-icon"\n width="24"\n height="24"\n viewBox="0 0 24 24"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M4.21508 11.1456C4.21508 7.3179 7.33722 4.21165 11.1926 4.21165C15.048 4.21165 18.1702 7.3179 18.1702 11.1456C18.1702 12.6931 17.6599 14.1226 16.7972 15.2767L15.3685 16.7013C14.2044 17.5668 12.759 18.0796 11.1926 18.0796C7.33722 18.0796 4.21508 14.9734 4.21508 11.1456ZM15.9421 17.7835C14.6021 18.7329 12.9627 19.2913 11.1926 19.2913C6.66977 19.2913 3 15.6461 3 11.1456C3 6.64512 6.66977 3 11.1926 3C15.7155 3 19.3852 6.64512 19.3852 11.1456C19.3852 12.9371 18.8037 14.5931 17.8184 15.9375L19.8361 17.4048C20.6705 17.912 21.7554 18.6543 20.2454 20.215C18.7353 21.7756 18.0099 20.6663 17.4991 19.8364L15.9421 17.7835Z"\n fill="#6A737D"\n />\n </svg>\n <input\n [ngModel]="searchInput"\n [ngStyle]="{\n paddingLeft: isSearchInputFocused ? \'12px\' : \'45px\',\n border: isSearchInputFocused ? \'1px solid #0937B2\' : \'1px solid #e0e0e0\',\n paddingRight: isSearchInputFocused ? \'45px\' : \'10px\'\n }"\n (ngModelChange)="searchInputOnChange($event)"\n [placeholder]="isSearchInputFocused ? \'\' : \'Search Keyword\'"\n (focus)="searchInputFocused(true)"\n class="search-input"\n />\n <svg\n *ngIf="isSearchInputFocused"\n class="cancel-icon"\n (click)="searchInputCanceled($event)"\n width="24"\n height="24"\n viewBox="0 0 24 24"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M8.87446 7.32144C8.44588 6.89285 7.751 6.89285 7.32242 7.32144C6.89383 7.75002 6.89383 8.4449 7.32242 8.87349L10.4488 11.9999L7.32357 15.1252C6.89498 15.5538 6.89498 16.2486 7.32357 16.6772C7.75215 17.1058 8.44703 17.1058 8.87561 16.6772L12.0009 13.552L15.1261 16.6772C15.5547 17.1058 16.2496 17.1058 16.6781 16.6772C17.1067 16.2486 17.1067 15.5537 16.6781 15.1251L13.5529 11.9999L16.6793 8.87354C17.1079 8.44496 17.1079 7.75008 16.6793 7.3215C16.2507 6.89291 15.5558 6.89291 15.1273 7.3215L12.0009 10.4479L8.87446 7.32144Z"\n fill="#6A737D"\n />\n </svg>\n </div>\n <div class="items">\n <div\n class="item"\n tabindex="0"\n (keyup.enter)="toggleSelectedItems($event, item)"\n (click)="toggleSelectedItems($event, item)"\n *ngFor="let item of searchInput ? searchData : localData"\n >\n <div class="checkbox-container-wrapper">\n <div class="checkbox-container">\n <mis-checkbox [checked]="item.checked" tabindex="-1"></mis-checkbox>\n </div>\n <p class="label">\n {{ item.label }}\n </p>\n </div>\n <div class="icon-container" *ngIf="item.icon">\n <img class="icon" [src]="item.icon" alt="no img" />\n </div>\n </div>\n <div class="noData" *ngIf="(searchInput ? searchData : localData).length === 0">\n {{ searchInput === "" ? noDataMessage : "No results" }}\n </div>\n </div>\n <div *ngIf="localData.length !== 0 && !hideApplyButton" class="actions-container">\n <div style="width: calc(50% - 4px)">\n <mis-button [name]="\'Reset\'" [type]="\'Text\'" [width]="\'100%\'" (click)="onReset()"></mis-button>\n </div>\n <div style="width: calc(50% - 4px)">\n <mis-button [name]="\'Apply\'" [type]="\'Solid\'" [width]="\'100%\'" (click)="applyFilters()"></mis-button>\n </div>\n </div>\n </div>\n</ng-template>\n',styles:['.container{position:relative;display:flex;justify-content:center;align-items:center;flex-wrap:wrap;height:32px;width:256px;font-family:Lato,sans-serif!important}.container .dropdown{height:inherit;border:1px solid #e0e0e0;border-radius:6px;background-color:#fff;cursor:pointer;display:flex;justify-content:space-between;align-items:center;width:100%;padding:0 12px;overflow:hidden}.container .dropdown:focus-visible,.container .dropdown:hover{background-color:#f5f7fc;outline:none}.container .dropdown .label{display:flex;justify-content:flex-start;align-items:center;width:calc(100% - 32px)}.container .dropdown .label,.container .dropdown .label .text{font-style:normal;font-weight:400;font-size:14px;line-height:20px;letter-spacing:.2px;color:#181f33}.container .dropdown .label .text{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.container .dropdown .label .count{background-color:#e0e0e0;border-radius:50%;padding:2px 7px;margin:0 0 0 8px;font-style:normal;font-weight:400;font-size:14px;line-height:20px;text-align:center;letter-spacing:.2px;color:#181f33}.container .dropdown .handle{width:24px;height:24px;transition:.3s;position:absolute;right:12px;border-radius:50%;overflow:hidden}.popup-container{width:100%;max-height:340px;padding-bottom:0;border:1px solid #e0e0e0;border-radius:8px;background-color:#fff;box-shadow:0 12px 24px 0 rgba(0,0,0,.12);display:flex;flex-direction:column;overflow:hidden;justify-content:space-between}.popup-container::-webkit-scrollbar{width:0;height:0}.popup-container .search-container{position:relative;box-sizing:border-box;padding:8px}.popup-container .search-container .search-icon{position:absolute;width:24px;height:24px;top:50%;transform:translateY(-50%);left:18px;z-index:1}.popup-container .search-container .search-input{height:40px;width:100%;padding:12px;border:1px solid #e0e0e0;box-sizing:border-box;border-radius:8px;outline:none;caret-color:#0937b2;font-style:normal;font-weight:400;font-size:12px;line-height:18px;display:flex;align-items:center;letter-spacing:.2px;color:#181f33}.popup-container .search-container .cancel-icon{position:absolute;cursor:pointer;width:24px;height:24px;top:50%;transform:translateY(-50%);right:18px;z-index:1}.popup-container .items{padding:8px 0 8px 8px;overflow-y:scroll}.popup-container .items::-webkit-scrollbar{width:5px;height:0}.popup-container .items::-webkit-scrollbar-thumb{background:#9aa7b4;border-radius:10px}.popup-container .items .noData{display:flex;justify-content:center;align-items:center;font-style:normal;font-weight:400;font-size:14px;line-height:20px;letter-spacing:.2px;color:#181f33}.popup-container .items .item{cursor:pointer;display:flex;justify-content:flex-start;align-items:center;padding:8px 12px;border-radius:6px;height:auto}.popup-container .items .item:focus-visible,.popup-container .items .item:hover{background-color:#f5f7fc;outline:none}.popup-container .items .item .checkbox-container-wrapper{display:flex;justify-content:flex-start;align-items:center;width:90%}.popup-container .items .item .checkbox-container-wrapper .checkbox-container{display:block;position:relative;cursor:pointer;font-size:22px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.popup-container .items .item .checkbox-container-wrapper .checkbox-container input{position:absolute;opacity:0;cursor:pointer;height:0;width:0}.popup-container .items .item .checkbox-container-wrapper .checkbox-container input:checked~.checkmark:after{display:block}.popup-container .items .item .checkbox-container-wrapper .checkbox-container .checkmark{position:absolute;top:-8px;left:0;height:15px;width:15px;border-radius:4px;background-color:#0079f1;border:1px solid #6a737d}.popup-container .items .item .checkbox-container-wrapper .checkbox-container .checkmark:after{content:"";position:absolute;display:none;left:5px;top:2px;width:3px;height:6px;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg)}.popup-container .items .item .checkbox-container-wrapper .label{margin:0 0 0 8px;line-height:20px;font-size:14px;font-style:normal;font-weight:400;letter-spacing:.2;text-overflow:ellipsis;overflow:hidden}.popup-container .items .item .icon-container{width:10%;display:flex;justify-content:flex-end}.popup-container .items .item .icon-container .icon{width:20px;height:20px}.popup-container .actions-container{display:flex;justify-content:space-between;bottom:0;align-items:center;position:-webkit-sticky;position:sticky;padding:16px;background-color:#fff;border-top:1px solid #e0e0e0}.popup-container .actions-container .cancel{cursor:pointer;padding:10px 32px;text-align:center;font-size:16px;line-height:24px;border-radius:8px}.popup-container .actions-container .cancel:hover{background:rgba(9,55,178,.04)}.popup-container .actions-container .apply{cursor:pointer;padding:10px 32px;text-align:center;color:#fff;font-size:16px;line-height:24px;background:#0937b2;border-radius:8px}']}]}],p.ctorParameters=function(){return[{type:t.ElementRef},{type:o.Overlay},{type:t.ViewContainerRef}]},p.propDecorators={data:[{type:t.Input}],label:[{type:t.Input}],height:[{type:t.Input}],width:[{type:t.Input}],dropdownListHeight:[{type:t.Input}],dropdownListWidth:[{type:t.Input}],dropdownListPosition:[{type:t.Input}],enableSelectAll:[{type:t.Input}],searchEnabled:[{type:t.Input}],showSelectedCount:[{type:t.Input}],noDataMessage:[{type:t.Input}],options:[{type:t.Input}],selectedItems:[{type:t.Input}],hideApplyButton:[{type:t.Input}],onChange:[{type:t.Output}],selectElement:[{type:t.ViewChild,args:["select",{static:!1}]}],popupContainer:[{type:t.ViewChild,args:["popupContainer",{static:!1}]}]};var d=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[]}},e}();d.decorators=[{type:t.NgModule,args:[{declarations:[p],imports:[i.CommonModule,r.FormsModule,o.OverlayModule,a.CheckboxModule,s.ButtonModule],exports:[p]}]}],e.MultiSelectDropdownComponent=p,e.MultiSelectDropdownModule=d,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
16
16
|
//# sourceMappingURL=mis-crystal-design-system-multi-select-dropdown.umd.min.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../node_modules/tslib/tslib.es6.js","../../../projects/mis-components/multi-select-dropdown/multi-select-dropdown.component.ts","../../../projects/mis-components/multi-select-dropdown/multi-select-dropdown.module.ts"],"names":["Object","create","__read","o","n","m","Symbol","iterator","r","e","i","call","ar","next","done","push","value","error","__spread","arguments","length","concat","MultiSelectDropdownComponent","eRef","this","searchInput","isOpen","localSelectedItems","localData","searchData","isSearchInputFocused","SELECT_ALL_ENUM","label","height","width","dropdownListHeight","dropdownListWidth","dropdownListPosition","enableSelectAll","searchEnabled","showSelectedCount","noDataMessage","options","sortLabels","hideApplyButton","onChange","EventEmitter","defineProperty","prototype","values","map","item","assign","checked","handlerSetLocalSelectedItems","clickout","event","nativeElement","contains","target","onCancel","ngOnInit","_this","every","a","some","base","formatValues","searchInputFocused","isFocused","searchInputCanceled","stopPropagation","toggleDropdown","filterByValue","array","string","filter","toLowerCase","includes","searchInputOnChange","newValue","sortedArray","sort","b","t","option","unshift","y","toggleSelectedItems","applyFilters","emit","s","p","hasOwnProperty","indexOf","getOwnPropertySymbols","propertyIsEnumerable","__rest","onReset","String","Component","args","selector","template","ElementRef","Input","Output","HostListener","MultiSelectDropdownModule","forRoot","ngModule","providers","NgModule","declarations","imports","CommonModule","FormsModule","CheckboxModule","ButtonModule","exports"],"mappings":";;;;;;;;;;;;;;oFA2G6BA,OAAOC,gBAwBpBC,EAAOC,EAAGC,GACtB,IAAIC,EAAsB,mBAAXC,QAAyBH,EAAEG,OAAOC,UACjD,IAAKF,EAAG,OAAOF,EACf,IAAmBK,EAAYC,EAA3BC,EAAIL,EAAEM,KAAKR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C,EAAElF,MACvE0E,EAAEQ,EAAElF,IAAMiF,EAAEC,EAAElF,KAE1B,OAAO0E,EC8JuBa,CAAK9C,EAAvB,CAAA,gBAIP3B,KAAKoB,iBACRpB,KAAKoC,YAITtC,EAAA0B,UAAAkD,QAAA,WACE1E,KAAKM,sBAAuB,EAC5BN,KAAKqB,SAAS6C,KAAK,IACnBlE,KAAKE,QAAS,EACdF,KAAKC,YAAc,IAGrBH,EAAA0B,UAAAY,SAAA,WAAA,IAAAE,EAAAtC,KACEA,KAAKM,sBAAuB,EAC5BN,KAAKI,UAAYJ,KAAKI,UAAUsB,KAAI,SAACc,GACnC,OACEF,EAAKnC,mBAAmBsC,MACtB,SAACkB,GAAM,OAAAA,EAAEnE,QAAUgD,EAAEhD,OAASmF,OAAOhB,EAAE9B,WAAa8C,OAAOnC,EAAEX,YAGxDW,EAEPhE,OAAAoD,OAAApD,OAAAoD,OAAA,GACKY,GAAC,CACJX,SAAS,OAIf7B,KAAKE,QAAS,EACdF,KAAKC,YAAc,6BAzOtB2E,EAAAA,UAASC,KAAA,CAAC,CACTC,SAAU,4BACVC,SAAA,gwUATAC,EAAAA,4CAoBCC,EAAAA,qBAKAA,EAAAA,sBACAA,EAAAA,qBACAA,EAAAA,kCACAA,EAAAA,iCACAA,EAAAA,oCACAA,EAAAA,+BACAA,EAAAA,6BACAA,EAAAA,iCACAA,EAAAA,6BACAA,EAAAA,uBACAA,EAAAA,6BAGAA,EAAAA,+BAGAA,EAAAA,wBACAC,EAAAA,yBACAC,EAAAA,aAAYN,KAAA,CAAC,iBAAkB,CAAC,+BCjCnC,SAAAO,YACWA,EAAAC,QAAP,WACI,MAAO,CAAEC,SAAUF,EAA2BG,UAAW,8BAPhEC,EAAAA,SAAQX,KAAA,CAAC,CACNY,aAAc,CAAC3F,GACf4F,QAAS,CAACC,EAAAA,aAAcC,EAAAA,YAAaC,EAAAA,eAAgBC,EAAAA,cACrDC,QAAS,CAACjG","sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","import {\n Component,\n ElementRef,\n EventEmitter,\n HostListener,\n Input,\n OnInit,\n Output,\n} from \"@angular/core\";\n@Component({\n selector: \"mis-multi-select-dropdown\",\n templateUrl: \"./multi-select-dropdown.component.html\",\n styleUrls: [\"./multi-select-dropdown.component.scss\"],\n})\nexport class MultiSelectDropdownComponent implements OnInit {\n searchInput: string = \"\";\n isOpen = false;\n localSelectedItems: MultiSelectDropdownItem[] = [];\n localData: MultiSelectDropdownItem[] = [];\n searchData: MultiSelectDropdownItem[] = [];\n isSearchInputFocused: boolean = false;\n SELECT_ALL_ENUM = \"SELECT_ALL_ENABLED\";\n @Input() set data(values: MultiSelectDropdownItem[]) {\n this.localData = values.map((item) => {\n return { ...item, checked: false };\n });\n }\n @Input() label: string = \"Select\";\n @Input() height: string = \"\";\n @Input() width: string = \"\";\n @Input() dropdownListHeight: string = \"\";\n @Input() dropdownListWidth: string = \"\";\n @Input() dropdownListPosition: \"Left\" | \"Right\" = \"Left\";\n @Input() enableSelectAll: boolean = false;\n @Input() searchEnabled: boolean = true;\n @Input() showSelectedCount: boolean = false;\n @Input() noDataMessage: string = \"No Data\";\n @Input() options: OPTIONS = {\n sortLabels: true,\n };\n @Input() set selectedItems(values: MultiSelectDropdownItem[]) {\n this.handlerSetLocalSelectedItems(values);\n }\n @Input() hideApplyButton: boolean = false;\n @Output() onChange: EventEmitter<any> = new EventEmitter();\n @HostListener(\"document:click\", [\"$event\"])\n clickout(event) {\n const isClickedOutside = !this.eRef.nativeElement.contains(event.target);\n if (isClickedOutside) {\n this.onCancel();\n }\n }\n constructor(private eRef: ElementRef) {}\n\n ngOnInit() {}\n\n handlerSetLocalSelectedItems(values) {\n this.localSelectedItems = values;\n this.localData = this.localData.map((item) => {\n if (\n item.value === this.SELECT_ALL_ENUM &&\n this.localData.every((a) => a.checked)\n ) {\n return { ...item, checked: true };\n }\n if (values.some((base) => base.value === item.value)) {\n return { ...item, checked: true };\n } else {\n return { ...item, checked: false };\n }\n });\n this.localData = this.formatValues(this.localData);\n }\n\n searchInputFocused(isFocused: boolean) {\n this.isSearchInputFocused = isFocused;\n }\n\n searchInputCanceled(event) {\n event.stopPropagation();\n this.searchInput = \"\";\n this.isSearchInputFocused = false;\n }\n\n toggleDropdown() {\n this.isOpen = !this.isOpen;\n if (this.isOpen) {\n this.handlerSetLocalSelectedItems(this.localSelectedItems);\n this.localData = this.formatValues(this.localData);\n }\n }\n\n filterByValue(array: MultiSelectDropdownItem[], string: string) {\n return array.filter((o) =>\n o.label.toLowerCase().includes(string.toLowerCase())\n );\n }\n\n searchInputOnChange(newValue) {\n this.searchInput = newValue;\n if (newValue) {\n this.searchData = this.filterByValue(this.localData, newValue);\n } else {\n this.searchData = [];\n this.searchInput = \"\";\n }\n }\n\n formatValues(array: MultiSelectDropdownItem[]) {\n let sortedArray = array;\n if (this.options.sortLabels) {\n const checkedValues = array\n .filter((a) => a.checked)\n .sort((a: MultiSelectDropdownItem, b: MultiSelectDropdownItem) =>\n a.label > b.label ? 1 : b.label > a.label ? -1 : 0\n );\n const unCheckedValues = array\n .filter((a) => !a.checked)\n .sort((a: MultiSelectDropdownItem, b: MultiSelectDropdownItem) =>\n a.label > b.label ? 1 : b.label > a.label ? -1 : 0\n );\n sortedArray = [...checkedValues, ...unCheckedValues].filter(\n (t) => t.value !== this.SELECT_ALL_ENUM\n );\n }\n if (\n !sortedArray.some((option) => option.value === this.SELECT_ALL_ENUM) &&\n this.enableSelectAll &&\n sortedArray.length > 0\n ) {\n sortedArray.unshift({\n label: \"Select all\",\n value: this.SELECT_ALL_ENUM,\n checked: sortedArray.every((y) => y.checked),\n });\n }\n return sortedArray;\n }\n\n toggleSelectedItems(event, item: MultiSelectDropdownItem) {\n event.stopPropagation();\n if (this.enableSelectAll && item.value === this.SELECT_ALL_ENUM) {\n this.localData = this.localData.map((t) => ({\n ...t,\n checked: !item.checked,\n }));\n if (this.hideApplyButton) {\n this.applyFilters();\n }\n return;\n }\n if (item.checked) {\n this.localData = [\n ...this.localData.map((a) => {\n if (a.value === item.value || a.value === this.SELECT_ALL_ENUM) {\n return {\n ...a,\n checked: false,\n };\n }\n return a;\n }),\n ];\n } else {\n this.localData = [\n ...this.localData.map((a) => {\n if (a.value === item.value) {\n return {\n ...a,\n checked: true,\n };\n }\n return a;\n }),\n ];\n if (\n this.enableSelectAll &&\n this.localData\n .filter((r) => r.value !== this.SELECT_ALL_ENUM)\n .every((t) => t.checked)\n ) {\n this.localData = [\n ...this.localData.map((a) => {\n if (a.value === this.SELECT_ALL_ENUM) {\n return {\n ...a,\n checked: true,\n };\n }\n return a;\n }),\n ];\n }\n }\n if (this.searchEnabled) {\n this.searchInputOnChange(this.searchInput);\n }\n if (this.hideApplyButton) {\n this.applyFilters();\n }\n }\n\n applyFilters() {\n this.onChange.emit(\n this.localData\n .filter((a) => {\n return a.checked && a.value !== this.SELECT_ALL_ENUM;\n })\n .map((item) => {\n const { checked, ...data } = item;\n return data;\n })\n );\n if (!this.hideApplyButton) {\n this.onCancel();\n }\n }\n\n onReset() {\n this.isSearchInputFocused = false;\n this.onChange.emit([]);\n this.isOpen = false;\n this.searchInput = \"\";\n }\n\n onCancel() {\n this.isSearchInputFocused = false;\n this.localData = this.localData.map((a) => {\n if (\n this.localSelectedItems.some(\n (b) => b.value === a.value && String(b.checked) !== String(a.checked)\n )\n ) {\n return a;\n } else {\n return {\n ...a,\n checked: false,\n };\n }\n });\n this.isOpen = false;\n this.searchInput = \"\";\n }\n}\nexport interface MultiSelectDropdownItem {\n label: string;\n value: string;\n checked?: boolean;\n icon?: string;\n}\nexport interface OPTIONS {\n sortLabels: boolean;\n}\n","import { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { NgModule, ModuleWithProviders } from '@angular/core';\nimport { MultiSelectDropdownComponent } from './multi-select-dropdown.component';\nimport { CheckboxModule } from 'mis-crystal-design-system/checkbox';\nimport { ButtonModule } from 'mis-crystal-design-system/button';\n\n@NgModule({\n declarations: [MultiSelectDropdownComponent],\n imports: [CommonModule, FormsModule, CheckboxModule, ButtonModule],\n exports: [MultiSelectDropdownComponent]\n})\nexport class MultiSelectDropdownModule {\n static forRoot(): ModuleWithProviders<MultiSelectDropdownModule> {\n return { ngModule: MultiSelectDropdownModule, providers: [] };\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../node_modules/tslib/tslib.es6.js","../../../projects/mis-components/multi-select-dropdown/multi-select-dropdown.component.ts","../../../projects/mis-components/multi-select-dropdown/multi-select-dropdown.module.ts"],"names":["Object","create","__read","o","n","m","Symbol","iterator","r","e","i","call","ar","next","done","push","value","error","__spread","arguments","length","concat","MultiSelectDropdownComponent","eRef","overlay","viewContainerRef","this","searchInput","isOpen","localSelectedItems","localData","searchData","isSearchInputFocused","SELECT_ALL_ENUM","label","height","width","dropdownListHeight","dropdownListWidth","dropdownListPosition","enableSelectAll","searchEnabled","showSelectedCount","noDataMessage","options","sortLabels","hideApplyButton","onChange","EventEmitter","defineProperty","prototype","values","map","item","assign","checked","handlerSetLocalSelectedItems","ngOnInit","_this","every","a","some","base","formatValues","searchInputFocused","isFocused","searchInputCanceled","event","stopPropagation","toggleDropdown","openDropdown","popupContainer","selectElement","nativeElement","onCancel","template","origin","positionsBottom","ConnectionPositionPair","originX","originY","overlayX","overlayY","positionsTop","positionStrategy","position","flexibleConnectedTo","withPositions","reverse","withPush","configs","OverlayConfig","hasBackdrop","backdropClass","scrollStrategy","scrollStrategies","reposition","clientWidth","overlayRef","updateSize","attach","TemplatePortal","backdropClick","subscribe","res","filterByValue","array","string","filter","toLowerCase","includes","searchInputOnChange","newValue","sortedArray","sort","b","t","option","unshift","y","toggleSelectedItems","applyFilters","emit","s","p","hasOwnProperty","indexOf","getOwnPropertySymbols","propertyIsEnumerable","__rest","onReset","String","_a","detach","Component","args","selector","ElementRef","Overlay","ViewContainerRef","Input","Output","ViewChild","static","MultiSelectDropdownModule","forRoot","ngModule","providers","NgModule","declarations","imports","CommonModule","FormsModule","OverlayModule","CheckboxModule","ButtonModule","exports"],"mappings":";;;;;;;;;;;;;;oFA2G6BA,OAAOC,gBAwBpBC,EAAOC,EAAGC,GACtB,IAAIC,EAAsB,mBAAXC,QAAyBH,EAAEG,OAAOC,UACjD,IAAKF,EAAG,OAAOF,EACf,IAAmBK,EAAYC,EAA3BC,EAAIL,EAAEM,KAAKR,GAAOS,EAAK,GAC3B,IACI,WAAc,IAANR,GAAgBA,KAAM,MAAQI,EAAIE,EAAEG,QAAQC,MAAMF,EAAGG,KAAKP,EAAEQ,OAExE,MAAOC,GAASR,EAAI,CAAEQ,MAAOA,WAEzB,IACQT,IAAMA,EAAEM,OAAST,EAAIK,EAAU,SAAIL,EAAEM,KAAKD,WAExC,GAAID,EAAG,MAAMA,EAAEQ,OAE7B,OAAOL,WAIKM,IACZ,IAAK,IAAIN,EAAK,GAAIF,EAAI,EAAGA,EAAIS,UAAUC,OAAQV,IAC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AuB,EAC5BN,KAAKI,UAAYJ,KAAKI,UAAUsB,KAAI,SAAAQ,GAClC,OAAIF,EAAK7B,mBAAmBgC,MAAK,SAAAsD,GAAK,OAAAA,EAAEnG,QAAU4C,EAAE5C,OAASmH,OAAOhB,EAAE5D,WAAa4E,OAAOvE,EAAEL,YACnFK,EAEP5D,OAAAsD,OAAAtD,OAAAsD,OAAA,GACKM,GAAC,CACJL,SAAS,OAIf7B,KAAKE,QAAS,EACdF,KAAKC,YAAc,GACJ,QAAfyG,EAAA1G,KAAKwE,kBAAU,IAAAkC,GAAAA,EAAEC,SACjB3G,KAAKC,YAAc,6BAnPtB2G,EAAAA,UAASC,KAAA,CAAC,CACTC,SAAU,4BACV7D,SAAA,0+TALkB8D,EAAAA,kBAECC,EAAAA,eAFwEC,EAAAA,kDAgB1FC,EAAAA,qBAKAA,EAAAA,sBACAA,EAAAA,qBACAA,EAAAA,kCACAA,EAAAA,iCACAA,EAAAA,oCACAA,EAAAA,+BACAA,EAAAA,6BACAA,EAAAA,iCACAA,EAAAA,6BACAA,EAAAA,uBACAA,EAAAA,6BAGAA,EAAAA,+BAGAA,EAAAA,wBACAC,EAAAA,8BAEAC,EAAAA,UAASP,KAAA,CAAC,SAAU,CAAEQ,QAAQ,4BAC9BD,EAAAA,UAASP,KAAA,CAAC,iBAAkB,CAAEQ,QAAQ,wBC5BzC,SAAAC,YACSA,EAAAC,QAAP,WACE,MAAO,CAAEC,SAAUF,EAA2BG,UAAW,8BAP5DC,EAAAA,SAAQb,KAAA,CAAC,CACRc,aAAc,CAAC/H,GACfgI,QAAS,CAACC,EAAAA,aAAcC,EAAAA,YAAaC,EAAAA,cAAeC,EAAAA,eAAgBC,EAAAA,cACpEC,QAAS,CAACtI","sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","import { Component, ElementRef, EventEmitter, Input, OnInit, Output, TemplateRef, ViewChild, ViewContainerRef } from \"@angular/core\";\nimport { TemplatePortal } from \"@angular/cdk/portal\";\nimport { OverlayRef, Overlay, ConnectionPositionPair, OverlayConfig } from \"@angular/cdk/overlay\";\n@Component({\n selector: \"mis-multi-select-dropdown\",\n templateUrl: \"./multi-select-dropdown.component.html\",\n styleUrls: [\"./multi-select-dropdown.component.scss\"]\n})\nexport class MultiSelectDropdownComponent implements OnInit {\n searchInput: string = \"\";\n isOpen = false;\n localSelectedItems: MultiSelectDropdownItem[] = [];\n localData: MultiSelectDropdownItem[] = [];\n searchData: MultiSelectDropdownItem[] = [];\n isSearchInputFocused: boolean = false;\n SELECT_ALL_ENUM = \"SELECT_ALL_ENABLED\";\n @Input() set data(values: MultiSelectDropdownItem[]) {\n this.localData = values.map(item => {\n return { ...item, checked: false };\n });\n }\n @Input() label: string = \"Select\";\n @Input() height: string = \"\";\n @Input() width: string = \"\";\n @Input() dropdownListHeight: string = \"\";\n @Input() dropdownListWidth: string = \"\";\n @Input() dropdownListPosition: \"Left\" | \"Right\" = \"Left\";\n @Input() enableSelectAll: boolean = false;\n @Input() searchEnabled: boolean = true;\n @Input() showSelectedCount: boolean = false;\n @Input() noDataMessage: string = \"No Data\";\n @Input() options: OPTIONS = {\n sortLabels: true\n };\n @Input() set selectedItems(values: MultiSelectDropdownItem[]) {\n this.handlerSetLocalSelectedItems(values);\n }\n @Input() hideApplyButton: boolean = false;\n @Output() onChange: EventEmitter<any> = new EventEmitter();\n\n @ViewChild(\"select\", { static: false }) selectElement: ElementRef;\n @ViewChild(\"popupContainer\", { static: false }) popupContainer: TemplateRef<Element>;\n private overlayRef: OverlayRef;\n\n constructor(private eRef: ElementRef, private overlay: Overlay, private viewContainerRef: ViewContainerRef) {}\n ngOnInit() {}\n\n handlerSetLocalSelectedItems(values) {\n this.localSelectedItems = values;\n this.localData = this.localData.map(item => {\n if (item.value === this.SELECT_ALL_ENUM && this.localData.every(a => a.checked)) {\n return { ...item, checked: true };\n }\n if (values.some(base => base.value === item.value)) {\n return { ...item, checked: true };\n } else {\n return { ...item, checked: false };\n }\n });\n this.localData = this.formatValues(this.localData);\n }\n\n searchInputFocused(isFocused: boolean) {\n this.isSearchInputFocused = isFocused;\n }\n\n searchInputCanceled(event) {\n event.stopPropagation();\n this.searchInput = \"\";\n this.isSearchInputFocused = false;\n }\n\n toggleDropdown() {\n this.isOpen = !this.isOpen;\n if (this.isOpen) {\n this.handlerSetLocalSelectedItems(this.localSelectedItems);\n this.localData = this.formatValues(this.localData);\n }\n if (this.isOpen) this.openDropdown(this.popupContainer, this.selectElement.nativeElement);\n else this.onCancel();\n }\n\n private openDropdown(template: TemplateRef<Element>, origin: HTMLElement): void {\n const positionsBottom = [\n new ConnectionPositionPair({ originX: \"start\", originY: \"bottom\" }, { overlayX: \"start\", overlayY: \"top\" }, 0, 4),\n new ConnectionPositionPair({ originX: \"end\", originY: \"bottom\" }, { overlayX: \"end\", overlayY: \"top\" }, 0, 4)\n ];\n const positionsTop = [\n new ConnectionPositionPair({ originX: \"start\", originY: \"top\" }, { overlayX: \"start\", overlayY: \"bottom\" }, 0, -4),\n new ConnectionPositionPair({ originX: \"end\", originY: \"top\" }, { overlayX: \"end\", overlayY: \"bottom\" }, 0, -4)\n ];\n const positionStrategy = this.overlay\n .position()\n .flexibleConnectedTo(origin)\n .withPositions([\n ...(this.dropdownListPosition === \"Right\" ? positionsBottom.reverse() : positionsBottom),\n ...(this.dropdownListPosition === \"Right\" ? positionsTop.reverse() : positionsTop)\n ])\n .withPush(true);\n const configs = new OverlayConfig({\n hasBackdrop: true,\n backdropClass: \"cdk-overlay-transparent-backdrop\",\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n positionStrategy,\n width: origin.clientWidth\n });\n this.overlayRef = this.overlay.create(configs);\n if (this.dropdownListWidth) this.overlayRef.updateSize({ width: this.dropdownListWidth });\n if (this.dropdownListHeight) this.overlayRef.updateSize({ height: this.dropdownListHeight });\n this.overlayRef.attach(new TemplatePortal(template, this.viewContainerRef));\n this.overlayRef.backdropClick().subscribe(res => {\n this.onCancel();\n });\n }\n\n filterByValue(array: MultiSelectDropdownItem[], string: string) {\n return array.filter(o => o.label.toLowerCase().includes(string.toLowerCase()));\n }\n\n searchInputOnChange(newValue) {\n this.searchInput = newValue;\n if (newValue) {\n this.searchData = this.filterByValue(this.localData, newValue);\n } else {\n this.searchData = [];\n this.searchInput = \"\";\n }\n }\n\n formatValues(array: MultiSelectDropdownItem[]) {\n let sortedArray = array;\n if (this.options.sortLabels) {\n const checkedValues = array\n .filter(a => a.checked)\n .sort((a: MultiSelectDropdownItem, b: MultiSelectDropdownItem) => (a.label > b.label ? 1 : b.label > a.label ? -1 : 0));\n const unCheckedValues = array\n .filter(a => !a.checked)\n .sort((a: MultiSelectDropdownItem, b: MultiSelectDropdownItem) => (a.label > b.label ? 1 : b.label > a.label ? -1 : 0));\n sortedArray = [...checkedValues, ...unCheckedValues].filter(t => t.value !== this.SELECT_ALL_ENUM);\n }\n if (!sortedArray.some(option => option.value === this.SELECT_ALL_ENUM) && this.enableSelectAll && sortedArray.length > 0) {\n sortedArray.unshift({\n label: \"Select all\",\n value: this.SELECT_ALL_ENUM,\n checked: sortedArray.every(y => y.checked)\n });\n }\n return sortedArray;\n }\n\n toggleSelectedItems(event, item: MultiSelectDropdownItem) {\n event.stopPropagation();\n if (this.enableSelectAll && item.value === this.SELECT_ALL_ENUM) {\n this.localData = this.localData.map(t => ({\n ...t,\n checked: !item.checked\n }));\n if (this.hideApplyButton) {\n this.applyFilters();\n }\n return;\n }\n if (item.checked) {\n this.localData = [\n ...this.localData.map(a => {\n if (a.value === item.value || a.value === this.SELECT_ALL_ENUM) {\n return {\n ...a,\n checked: false\n };\n }\n return a;\n })\n ];\n } else {\n this.localData = [\n ...this.localData.map(a => {\n if (a.value === item.value) {\n return {\n ...a,\n checked: true\n };\n }\n return a;\n })\n ];\n if (this.enableSelectAll && this.localData.filter(r => r.value !== this.SELECT_ALL_ENUM).every(t => t.checked)) {\n this.localData = [\n ...this.localData.map(a => {\n if (a.value === this.SELECT_ALL_ENUM) {\n return {\n ...a,\n checked: true\n };\n }\n return a;\n })\n ];\n }\n }\n if (this.searchEnabled) {\n this.searchInputOnChange(this.searchInput);\n }\n if (this.hideApplyButton) {\n this.applyFilters();\n }\n }\n\n applyFilters() {\n this.onChange.emit(\n this.localData\n .filter(a => {\n return a.checked && a.value !== this.SELECT_ALL_ENUM;\n })\n .map(item => {\n const { checked, ...data } = item;\n return data;\n })\n );\n if (!this.hideApplyButton) {\n this.onCancel();\n }\n }\n\n onReset() {\n this.isSearchInputFocused = false;\n this.onChange.emit([]);\n this.isOpen = false;\n this.searchInput = \"\";\n }\n\n onCancel() {\n this.isSearchInputFocused = false;\n this.localData = this.localData.map(a => {\n if (this.localSelectedItems.some(b => b.value === a.value && String(b.checked) !== String(a.checked))) {\n return a;\n } else {\n return {\n ...a,\n checked: false\n };\n }\n });\n this.isOpen = false;\n this.searchInput = \"\";\n this.overlayRef?.detach();\n this.searchInput = \"\";\n }\n}\nexport interface MultiSelectDropdownItem {\n label: string;\n value: string;\n checked?: boolean;\n icon?: string;\n}\nexport interface OPTIONS {\n sortLabels: boolean;\n}\n","import { CommonModule } from \"@angular/common\";\nimport { FormsModule } from \"@angular/forms\";\nimport { NgModule, ModuleWithProviders } from \"@angular/core\";\nimport { MultiSelectDropdownComponent } from \"./multi-select-dropdown.component\";\nimport { CheckboxModule } from \"mis-crystal-design-system/checkbox\";\nimport { OverlayModule } from \"@angular/cdk/overlay\";\nimport { ButtonModule } from \"mis-crystal-design-system/button\";\n\n@NgModule({\n declarations: [MultiSelectDropdownComponent],\n imports: [CommonModule, FormsModule, OverlayModule, CheckboxModule, ButtonModule],\n exports: [MultiSelectDropdownComponent]\n})\nexport class MultiSelectDropdownModule {\n static forRoot(): ModuleWithProviders<MultiSelectDropdownModule> {\n return { ngModule: MultiSelectDropdownModule, providers: [] };\n }\n}\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('mis-crystal-design-system/checkbox'), require('mis-crystal-design-system/button')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('mis-crystal-design-system/nested-multi-select-dropdown', ['exports', '@angular/core', '@angular/common', '@angular/forms', 'mis-crystal-design-system/checkbox', 'mis-crystal-design-system/button'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global['mis-crystal-design-system'] = global['mis-crystal-design-system'] || {}, global['mis-crystal-design-system']['nested-multi-select-dropdown'] = {}), global.ng.core, global.ng.common, global.ng.forms, global['mis-crystal-design-system'].checkbox, global['mis-crystal-design-system'].button));
|
|
5
|
-
}(this, (function (exports, core, common, forms, checkbox, button) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/cdk/overlay'), require('@angular/cdk/portal'), require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('mis-crystal-design-system/checkbox'), require('mis-crystal-design-system/button')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('mis-crystal-design-system/nested-multi-select-dropdown', ['exports', '@angular/cdk/overlay', '@angular/cdk/portal', '@angular/core', '@angular/common', '@angular/forms', 'mis-crystal-design-system/checkbox', 'mis-crystal-design-system/button'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global['mis-crystal-design-system'] = global['mis-crystal-design-system'] || {}, global['mis-crystal-design-system']['nested-multi-select-dropdown'] = {}), global.ng.cdk.overlay, global.ng.cdk.portal, global.ng.core, global.ng.common, global.ng.forms, global['mis-crystal-design-system'].checkbox, global['mis-crystal-design-system'].button));
|
|
5
|
+
}(this, (function (exports, overlay, portal, core, common, forms, checkbox, button) { 'use strict';
|
|
6
6
|
|
|
7
7
|
/*! *****************************************************************************
|
|
8
8
|
Copyright (c) Microsoft Corporation.
|
|
@@ -323,23 +323,25 @@
|
|
|
323
323
|
}
|
|
324
324
|
|
|
325
325
|
var NestedMultiSelectDropdownComponent = /** @class */ (function () {
|
|
326
|
-
function NestedMultiSelectDropdownComponent(eRef) {
|
|
326
|
+
function NestedMultiSelectDropdownComponent(eRef, overlay, viewContainerRef) {
|
|
327
327
|
this.eRef = eRef;
|
|
328
|
-
this.
|
|
328
|
+
this.overlay = overlay;
|
|
329
|
+
this.viewContainerRef = viewContainerRef;
|
|
330
|
+
this.searchInput = "";
|
|
329
331
|
this.isOpen = false;
|
|
330
332
|
this.localSelectedItems = [];
|
|
331
333
|
this.localData = [];
|
|
332
334
|
this.searchData = [];
|
|
333
335
|
this.selectedCount = 0;
|
|
334
|
-
this.label =
|
|
335
|
-
this.height =
|
|
336
|
-
this.width =
|
|
337
|
-
this.dropdownListHeight =
|
|
338
|
-
this.dropdownListWidth =
|
|
339
|
-
this.dropdownListPosition =
|
|
336
|
+
this.label = "Select";
|
|
337
|
+
this.height = "";
|
|
338
|
+
this.width = "";
|
|
339
|
+
this.dropdownListHeight = "";
|
|
340
|
+
this.dropdownListWidth = "";
|
|
341
|
+
this.dropdownListPosition = "Left";
|
|
340
342
|
this.searchEnabled = true;
|
|
341
343
|
this.showSelectedCount = false;
|
|
342
|
-
this.noDataMessage =
|
|
344
|
+
this.noDataMessage = "No Data";
|
|
343
345
|
this.onChange = new core.EventEmitter();
|
|
344
346
|
this.isSearchInputFocused = false;
|
|
345
347
|
}
|
|
@@ -362,12 +364,6 @@
|
|
|
362
364
|
enumerable: false,
|
|
363
365
|
configurable: true
|
|
364
366
|
});
|
|
365
|
-
NestedMultiSelectDropdownComponent.prototype.clickout = function (event) {
|
|
366
|
-
var isClickedOutside = !this.eRef.nativeElement.contains(event.target);
|
|
367
|
-
if (isClickedOutside) {
|
|
368
|
-
this.onCancel();
|
|
369
|
-
}
|
|
370
|
-
};
|
|
371
367
|
NestedMultiSelectDropdownComponent.prototype.ngOnInit = function () { };
|
|
372
368
|
NestedMultiSelectDropdownComponent.prototype.handlerSetLocalSelectedItems = function (values) {
|
|
373
369
|
this.localSelectedItems = values;
|
|
@@ -377,7 +373,7 @@
|
|
|
377
373
|
};
|
|
378
374
|
NestedMultiSelectDropdownComponent.prototype.searchInputCanceled = function (event) {
|
|
379
375
|
event.stopPropagation();
|
|
380
|
-
this.searchInput =
|
|
376
|
+
this.searchInput = "";
|
|
381
377
|
this.isSearchInputFocused = false;
|
|
382
378
|
};
|
|
383
379
|
NestedMultiSelectDropdownComponent.prototype.toggleDropdown = function () {
|
|
@@ -386,10 +382,48 @@
|
|
|
386
382
|
this.handlerSetLocalSelectedItems(this.localSelectedItems);
|
|
387
383
|
this.localData = this.formatValues(this.localData);
|
|
388
384
|
}
|
|
385
|
+
if (this.isOpen)
|
|
386
|
+
this.openDropdown(this.popupContainer, this.selectElement.nativeElement);
|
|
387
|
+
else
|
|
388
|
+
this.onCancel();
|
|
389
|
+
};
|
|
390
|
+
NestedMultiSelectDropdownComponent.prototype.openDropdown = function (template, origin) {
|
|
391
|
+
var _this = this;
|
|
392
|
+
var positionsBottom = [
|
|
393
|
+
new overlay.ConnectionPositionPair({ originX: "start", originY: "bottom" }, { overlayX: "start", overlayY: "top" }, 0, 4),
|
|
394
|
+
new overlay.ConnectionPositionPair({ originX: "end", originY: "bottom" }, { overlayX: "end", overlayY: "top" }, 0, 4)
|
|
395
|
+
];
|
|
396
|
+
var positionsTop = [
|
|
397
|
+
new overlay.ConnectionPositionPair({ originX: "start", originY: "top" }, { overlayX: "start", overlayY: "bottom" }, 0, -4),
|
|
398
|
+
new overlay.ConnectionPositionPair({ originX: "end", originY: "top" }, { overlayX: "end", overlayY: "bottom" }, 0, -4)
|
|
399
|
+
];
|
|
400
|
+
var positionStrategy = this.overlay
|
|
401
|
+
.position()
|
|
402
|
+
.flexibleConnectedTo(origin)
|
|
403
|
+
.withPositions(__spread((this.dropdownListPosition === "Right" ? positionsBottom.reverse() : positionsBottom), (this.dropdownListPosition === "Right" ? positionsTop.reverse() : positionsTop)))
|
|
404
|
+
.withPush(true);
|
|
405
|
+
var configs = new overlay.OverlayConfig({
|
|
406
|
+
hasBackdrop: true,
|
|
407
|
+
backdropClass: "cdk-overlay-transparent-backdrop",
|
|
408
|
+
scrollStrategy: this.overlay.scrollStrategies.reposition(),
|
|
409
|
+
positionStrategy: positionStrategy,
|
|
410
|
+
width: origin.clientWidth
|
|
411
|
+
});
|
|
412
|
+
this.overlayRef = this.overlay.create(configs);
|
|
413
|
+
if (this.dropdownListWidth)
|
|
414
|
+
this.overlayRef.updateSize({ width: this.dropdownListWidth });
|
|
415
|
+
if (this.dropdownListHeight)
|
|
416
|
+
this.overlayRef.updateSize({ height: this.dropdownListHeight });
|
|
417
|
+
this.overlayRef.attach(new portal.TemplatePortal(template, this.viewContainerRef));
|
|
418
|
+
this.overlayRef.backdropClick().subscribe(function (res) {
|
|
419
|
+
_this.onCancel();
|
|
420
|
+
});
|
|
389
421
|
};
|
|
390
422
|
// tslint:disable-next-line:variable-name
|
|
391
423
|
NestedMultiSelectDropdownComponent.prototype.filterByValue = function (array, string) {
|
|
392
|
-
return array
|
|
424
|
+
return array
|
|
425
|
+
.filter(function (o) { var _a; return o.label.toLowerCase().includes(string.toLowerCase()) || ((_a = o.children) === null || _a === void 0 ? void 0 : _a.some(function (g) { var _a; return (_a = g === null || g === void 0 ? void 0 : g.label) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(string.toLowerCase()); })); })
|
|
426
|
+
.map(function (v) {
|
|
393
427
|
var _a;
|
|
394
428
|
return Object.assign(Object.assign({}, v), { children: (_a = v === null || v === void 0 ? void 0 : v.children) === null || _a === void 0 ? void 0 : _a.filter(function (l) { var _a; return (_a = l === null || l === void 0 ? void 0 : l.label) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(string.toLowerCase()); }) });
|
|
395
429
|
});
|
|
@@ -401,16 +435,16 @@
|
|
|
401
435
|
}
|
|
402
436
|
else {
|
|
403
437
|
this.searchData = [];
|
|
404
|
-
this.searchInput =
|
|
438
|
+
this.searchInput = "";
|
|
405
439
|
}
|
|
406
440
|
};
|
|
407
441
|
NestedMultiSelectDropdownComponent.prototype.formatValues = function (array) {
|
|
408
442
|
var checkedValues = array
|
|
409
443
|
.filter(function (a) { return a.checked; })
|
|
410
|
-
.sort(function (a, b) { return a.label > b.label ? 1 : b.label > a.label ? -1 : 0; });
|
|
444
|
+
.sort(function (a, b) { return (a.label > b.label ? 1 : b.label > a.label ? -1 : 0); });
|
|
411
445
|
var unCheckedValues = array
|
|
412
446
|
.filter(function (a) { return !a.checked; })
|
|
413
|
-
.sort(function (a, b) { return a.label > b.label ? 1 : b.label > a.label ? -1 : 0; });
|
|
447
|
+
.sort(function (a, b) { return (a.label > b.label ? 1 : b.label > a.label ? -1 : 0); });
|
|
414
448
|
return __spread(checkedValues, unCheckedValues);
|
|
415
449
|
};
|
|
416
450
|
// tslint:disable-next-line:no-shadowed-variable
|
|
@@ -533,24 +567,28 @@
|
|
|
533
567
|
}
|
|
534
568
|
this.onChange.emit([]);
|
|
535
569
|
this.isOpen = false;
|
|
536
|
-
this.searchInput =
|
|
570
|
+
this.searchInput = "";
|
|
537
571
|
};
|
|
538
572
|
NestedMultiSelectDropdownComponent.prototype.onCancel = function () {
|
|
573
|
+
var _a;
|
|
539
574
|
this.isSearchInputFocused = false;
|
|
540
575
|
this.isOpen = false;
|
|
541
|
-
this.
|
|
576
|
+
(_a = this.overlayRef) === null || _a === void 0 ? void 0 : _a.detach();
|
|
577
|
+
this.searchInput = "";
|
|
542
578
|
};
|
|
543
579
|
return NestedMultiSelectDropdownComponent;
|
|
544
580
|
}());
|
|
545
581
|
NestedMultiSelectDropdownComponent.decorators = [
|
|
546
582
|
{ type: core.Component, args: [{
|
|
547
|
-
selector:
|
|
548
|
-
template: "<div
|
|
549
|
-
styles: ["::-webkit-scrollbar{width:5px}::-webkit-scrollbar-thumb{background:#9aa7b4}.container{position:relative;display:flex;justify-content:center;align-items:center;height:32px;width:256px;flex-wrap:wrap;font-family:Lato,sans-serif}.container .dropdown{height:inherit;border:1px solid #e0e0e0;border-radius:6px;background-color:#fff;cursor:pointer;display:flex;justify-content:space-between;align-items:center;width:100%;padding:0 12px;overflow:hidden}.container .dropdown:hover{background-color:#f5f7fc}.container .dropdown .label{display:flex;justify-content:flex-start;align-items:center;width:calc(100% - 32px)}.container .dropdown .label,.container .dropdown .label .text{font-style:normal;font-weight:400;font-size:14px;line-height:20px;letter-spacing:.2px;color:#181f33}.container .dropdown .label .text{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.container .dropdown .label .count{background-color:#e0e0e0;border-radius:50%;padding:2px 7px;margin:0 0 0 8px;font-style:normal;font-weight:400;font-size:14px;line-height:20px;text-align:center;letter-spacing:.2px;color:#181f33}.container .dropdown .handle{width:24px;height:24px;transition:.3s;position:absolute;right:12px;border-radius:50%;overflow:hidden}.
|
|
583
|
+
selector: "mis-nested-multi-select-dropdown",
|
|
584
|
+
template: "<div\n class=\"container\"\n [ngStyle]=\"{\n height: height.length > 0 ? height : '',\n width: width.length > 0 ? width : ''\n }\"\n>\n <div\n class=\"dropdown\"\n #select\n tabindex=\"0\"\n (keyup.enter)=\"toggleDropdown()\"\n (click)=\"toggleDropdown()\"\n [ngStyle]=\"{ background: isOpen ? '#E6EBF7' : '' }\"\n >\n <div class=\"label\">\n <p class=\"text\">{{ label }}</p>\n <p *ngIf=\"showSelectedCount && selectedCount > 0\" class=\"count\">\n {{ selectedCount }}\n </p>\n </div>\n <svg\n class=\"handle\"\n [ngStyle]=\"{ transform: isOpen ? 'rotate(180deg)' : 'rotate(0deg)' }\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M13.825 7.15845L10 10.9751L6.175 7.15845L5 8.33345L10 13.3334L15 8.33345L13.825 7.15845Z\"\n fill=\"#181F33\"\n />\n </svg>\n </div>\n</div>\n<ng-template #popupContainer>\n <div\n class=\"popup-container\"\n [ngStyle]=\"{\n height: dropdownListHeight,\n width: dropdownListWidth\n }\"\n [ngClass]=\"{\n 'position-left': dropdownListPosition === 'Left',\n 'position-right': dropdownListPosition === 'Right'\n }\"\n >\n <div *ngIf=\"searchEnabled\" class=\"search-container\">\n <svg\n *ngIf=\"!isSearchInputFocused\"\n class=\"search-icon\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M4.21508 11.1456C4.21508 7.3179 7.33722 4.21165 11.1926 4.21165C15.048 4.21165 18.1702 7.3179 18.1702 11.1456C18.1702 12.6931 17.6599 14.1226 16.7972 15.2767L15.3685 16.7013C14.2044 17.5668 12.759 18.0796 11.1926 18.0796C7.33722 18.0796 4.21508 14.9734 4.21508 11.1456ZM15.9421 17.7835C14.6021 18.7329 12.9627 19.2913 11.1926 19.2913C6.66977 19.2913 3 15.6461 3 11.1456C3 6.64512 6.66977 3 11.1926 3C15.7155 3 19.3852 6.64512 19.3852 11.1456C19.3852 12.9371 18.8037 14.5931 17.8184 15.9375L19.8361 17.4048C20.6705 17.912 21.7554 18.6543 20.2454 20.215C18.7353 21.7756 18.0099 20.6663 17.4991 19.8364L15.9421 17.7835Z\"\n fill=\"#6A737D\"\n />\n </svg>\n <input\n [ngModel]=\"searchInput\"\n [ngStyle]=\"{\n paddingLeft: isSearchInputFocused ? '12px' : '45px',\n border: isSearchInputFocused ? '1px solid #0937B2' : '1px solid #e0e0e0',\n paddingRight: isSearchInputFocused ? '45px' : '10px'\n }\"\n (ngModelChange)=\"searchInputOnChange($event)\"\n [placeholder]=\"isSearchInputFocused ? '' : 'Search Keyword'\"\n (focus)=\"searchInputFocused(true)\"\n class=\"search-input\"\n />\n <svg\n *ngIf=\"isSearchInputFocused\"\n class=\"cancel-icon\"\n (click)=\"searchInputCanceled($event)\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M8.87446 7.32144C8.44588 6.89285 7.751 6.89285 7.32242 7.32144C6.89383 7.75002 6.89383 8.4449 7.32242 8.87349L10.4488 11.9999L7.32357 15.1252C6.89498 15.5538 6.89498 16.2486 7.32357 16.6772C7.75215 17.1058 8.44703 17.1058 8.87561 16.6772L12.0009 13.552L15.1261 16.6772C15.5547 17.1058 16.2496 17.1058 16.6781 16.6772C17.1067 16.2486 17.1067 15.5537 16.6781 15.1251L13.5529 11.9999L16.6793 8.87354C17.1079 8.44496 17.1079 7.75008 16.6793 7.3215C16.2507 6.89291 15.5558 6.89291 15.1273 7.3215L12.0009 10.4479L8.87446 7.32144Z\"\n fill=\"#6A737D\"\n />\n </svg>\n </div>\n <div class=\"items\">\n <div\n tabindex=\"0\"\n (keyup.enter)=\"toggleSelectedItems($event, item)\"\n (click)=\"toggleSelectedItems($event, item)\"\n *ngFor=\"let item of searchInput ? searchData : localData\"\n >\n <div class=\"item\">\n <div class=\"checkbox-container-wrapper\">\n <div class=\"checkbox-container\">\n <mis-checkbox [checked]=\"item.checked\"></mis-checkbox>\n </div>\n <p class=\"label\">\n {{ item.label }}\n </p>\n </div>\n <div class=\"icon-container\" *ngIf=\"item.icon\">\n <img class=\"icon\" [src]=\"item.icon\" alt=\"no img\" />\n </div>\n </div>\n <div *ngIf=\"item?.children?.length > 0\" class=\"items sub\" style=\"padding-right: 0\">\n <div\n class=\"item\"\n tabindex=\"0\"\n (keyup.enter)=\"toggleSelectedItems($event, item, cItem)\"\n (click)=\"toggleSelectedItems($event, item, cItem)\"\n *ngFor=\"let cItem of item?.children\"\n >\n <div class=\"checkbox-container-wrapper\">\n <div class=\"checkbox-container\">\n <mis-checkbox [checked]=\"cItem.checked\"></mis-checkbox>\n </div>\n <p class=\"label\">\n {{ cItem.label }}\n </p>\n </div>\n <div class=\"icon-container\" *ngIf=\"cItem.icon\">\n <img class=\"icon\" [src]=\"cItem.icon\" alt=\"no img\" />\n </div>\n </div>\n </div>\n </div>\n <div class=\"noData\" *ngIf=\"(searchInput ? searchData : localData).length === 0\">\n {{ searchInput === \"\" ? noDataMessage : \"No results\" }}\n </div>\n </div>\n <div *ngIf=\"localData.length !== 0\" class=\"actions-container\">\n <div style=\"width: calc(50% - 4px)\">\n <mis-button [name]=\"'Reset'\" [type]=\"'Text'\" [width]=\"'100%'\" (click)=\"onReset()\"></mis-button>\n </div>\n <div style=\"width: calc(50% - 4px)\">\n <mis-button [name]=\"'Apply'\" [type]=\"'Solid'\" [width]=\"'100%'\" (click)=\"applyFilters()\"></mis-button>\n </div>\n </div>\n </div>\n</ng-template>\n",
|
|
585
|
+
styles: ["::-webkit-scrollbar{width:5px}::-webkit-scrollbar-thumb{background:#9aa7b4}.container{position:relative;display:flex;justify-content:center;align-items:center;height:32px;width:256px;flex-wrap:wrap;font-family:Lato,sans-serif}.container .dropdown{height:inherit;border:1px solid #e0e0e0;border-radius:6px;background-color:#fff;cursor:pointer;display:flex;justify-content:space-between;align-items:center;width:100%;padding:0 12px;overflow:hidden}.container .dropdown:focus-visible,.container .dropdown:hover{background-color:#f5f7fc;outline:none}.container .dropdown .label{display:flex;justify-content:flex-start;align-items:center;width:calc(100% - 32px)}.container .dropdown .label,.container .dropdown .label .text{font-style:normal;font-weight:400;font-size:14px;line-height:20px;letter-spacing:.2px;color:#181f33}.container .dropdown .label .text{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.container .dropdown .label .count{background-color:#e0e0e0;border-radius:50%;padding:2px 7px;margin:0 0 0 8px;font-style:normal;font-weight:400;font-size:14px;line-height:20px;text-align:center;letter-spacing:.2px;color:#181f33}.container .dropdown .handle{width:24px;height:24px;transition:.3s;position:absolute;right:12px;border-radius:50%;overflow:hidden}.popup-container{position:absolute;top:4px;width:100%;max-height:340px;padding-bottom:0;border:1px solid #e0e0e0;border-radius:8px;background-color:#fff;box-shadow:0 12px 24px 0 rgba(0,0,0,.12);overflow-x:hidden;display:flex;flex-direction:column;justify-content:space-between;z-index:100}.popup-container::-webkit-scrollbar{width:0;height:0}.popup-container .search-container{position:relative;box-sizing:border-box;padding:8px}.popup-container .search-container .search-icon{position:absolute;width:24px;height:24px;top:50%;transform:translateY(-50%);left:18px;z-index:1}.popup-container .search-container .search-input{height:40px;width:100%;padding:12px;border:1px solid #e0e0e0;box-sizing:border-box;border-radius:8px;outline:none;caret-color:#0937b2;font-style:normal;font-weight:400;font-size:12px;line-height:18px;display:flex;align-items:center;letter-spacing:.2px;color:#181f33}.popup-container .search-container .cancel-icon{position:absolute;cursor:pointer;width:24px;height:24px;top:50%;transform:translateY(-50%);right:18px;z-index:1}.popup-container .items{padding:8px 0 8px 8px;overflow-y:scroll;height:100%}.popup-container .items::-webkit-scrollbar{width:5px;height:0}.popup-container .items::-webkit-scrollbar-thumb{background:#9aa7b4;border-radius:10px}.popup-container .items .noData{display:flex;justify-content:center;align-items:center;font-style:normal;font-weight:400;font-size:14px;line-height:20px;letter-spacing:.2px;color:#181f33}.popup-container .items .item{cursor:pointer;display:flex;justify-content:flex-start;align-items:center;padding:8px 12px;border-radius:6px;height:auto}.popup-container .items .item:focus-visible,.popup-container .items .item:hover{background-color:#f5f7fc;outline:none}.popup-container .items .item .checkbox-container-wrapper{display:flex;justify-content:flex-start;align-items:center;width:90%}.popup-container .items .item .checkbox-container-wrapper .checkbox-container{display:block;position:relative;cursor:pointer;font-size:22px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.popup-container .items .item .checkbox-container-wrapper .checkbox-container input{position:absolute;opacity:0;cursor:pointer;height:0;width:0}.popup-container .items .item .checkbox-container-wrapper .checkbox-container input:checked~.checkmark:after{display:block}.popup-container .items .item .checkbox-container-wrapper .checkbox-container .checkmark{position:absolute;top:-8px;left:0;height:15px;width:15px;border-radius:4px;background-color:#0079f1;border:1px solid #6a737d}.popup-container .items .item .checkbox-container-wrapper .checkbox-container .checkmark:after{content:\"\";position:absolute;display:none;left:5px;top:2px;width:3px;height:6px;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg)}.popup-container .items .item .checkbox-container-wrapper .label{margin:0 0 0 8px;font-style:normal;font-weight:400;font-size:14px;line-height:20px;letter-spacing:.2px;color:#181f33;text-overflow:ellipsis;overflow:hidden}.popup-container .items .item .icon-container{width:10%;display:flex;justify-content:flex-end}.popup-container .items .item .icon-container .icon{width:20px;height:20px}.popup-container .actions-container{display:flex;justify-content:space-between;bottom:0;align-items:center;position:-webkit-sticky;position:sticky;padding:16px;background-color:#fff;border-top:1px solid #e0e0e0}.popup-container .actions-container .cancel{cursor:pointer;padding:10px 32px;text-align:center;font-size:16px;line-height:24px;border-radius:8px}.popup-container .actions-container .cancel:hover{background:rgba(9,55,178,.04)}.popup-container .actions-container .apply{cursor:pointer;padding:10px 32px;text-align:center;color:#fff;font-size:16px;line-height:24px;background:#0937b2;border-radius:8px}"]
|
|
550
586
|
},] }
|
|
551
587
|
];
|
|
552
588
|
NestedMultiSelectDropdownComponent.ctorParameters = function () { return [
|
|
553
|
-
{ type: core.ElementRef }
|
|
589
|
+
{ type: core.ElementRef },
|
|
590
|
+
{ type: overlay.Overlay },
|
|
591
|
+
{ type: core.ViewContainerRef }
|
|
554
592
|
]; };
|
|
555
593
|
NestedMultiSelectDropdownComponent.propDecorators = {
|
|
556
594
|
data: [{ type: core.Input }],
|
|
@@ -565,7 +603,8 @@
|
|
|
565
603
|
noDataMessage: [{ type: core.Input }],
|
|
566
604
|
selectedItems: [{ type: core.Input }],
|
|
567
605
|
onChange: [{ type: core.Output }],
|
|
568
|
-
|
|
606
|
+
selectElement: [{ type: core.ViewChild, args: ["select", { static: false },] }],
|
|
607
|
+
popupContainer: [{ type: core.ViewChild, args: ["popupContainer", { static: false },] }]
|
|
569
608
|
};
|
|
570
609
|
|
|
571
610
|
var NestedMultiSelectDropdownModule = /** @class */ (function () {
|
|
@@ -579,7 +618,7 @@
|
|
|
579
618
|
NestedMultiSelectDropdownModule.decorators = [
|
|
580
619
|
{ type: core.NgModule, args: [{
|
|
581
620
|
declarations: [NestedMultiSelectDropdownComponent],
|
|
582
|
-
imports: [common.CommonModule, forms.FormsModule, checkbox.CheckboxModule, button.ButtonModule],
|
|
621
|
+
imports: [common.CommonModule, forms.FormsModule, overlay.OverlayModule, checkbox.CheckboxModule, button.ButtonModule],
|
|
583
622
|
exports: [NestedMultiSelectDropdownComponent]
|
|
584
623
|
},] }
|
|
585
624
|
];
|