mis-crystal-design-system 2.4.8 → 2.4.9

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.
Files changed (61) hide show
  1. package/action-list/action-list.component.d.ts +50 -0
  2. package/action-list/action-list.module.d.ts +4 -0
  3. package/action-list/index.d.ts +1 -0
  4. package/action-list/mis-crystal-design-system-action-list.d.ts +4 -0
  5. package/action-list/mis-crystal-design-system-action-list.metadata.json +1 -0
  6. package/action-list/package.json +11 -0
  7. package/action-list/public_api.d.ts +2 -0
  8. package/bundles/mis-crystal-design-system-action-list.umd.js +516 -0
  9. package/bundles/mis-crystal-design-system-action-list.umd.js.map +1 -0
  10. package/bundles/mis-crystal-design-system-action-list.umd.min.js +16 -0
  11. package/bundles/mis-crystal-design-system-action-list.umd.min.js.map +1 -0
  12. package/bundles/mis-crystal-design-system-checkbox.umd.js +1 -1
  13. package/bundles/mis-crystal-design-system-checkbox.umd.min.js +1 -1
  14. package/bundles/mis-crystal-design-system-checkbox.umd.min.js.map +1 -1
  15. package/bundles/mis-crystal-design-system-dropdown.umd.js +1 -1
  16. package/bundles/mis-crystal-design-system-dropdown.umd.js.map +1 -1
  17. package/bundles/mis-crystal-design-system-dropdown.umd.min.js +1 -1
  18. package/bundles/mis-crystal-design-system-dropdown.umd.min.js.map +1 -1
  19. package/bundles/mis-crystal-design-system-menu.umd.js +119 -0
  20. package/bundles/mis-crystal-design-system-menu.umd.js.map +1 -0
  21. package/bundles/mis-crystal-design-system-menu.umd.min.js +2 -0
  22. package/bundles/mis-crystal-design-system-menu.umd.min.js.map +1 -0
  23. package/bundles/mis-crystal-design-system-multi-select-dropdown.umd.js +1 -1
  24. package/bundles/mis-crystal-design-system-multi-select-dropdown.umd.js.map +1 -1
  25. package/bundles/mis-crystal-design-system-multi-select-dropdown.umd.min.js +1 -1
  26. package/bundles/mis-crystal-design-system-multi-select-dropdown.umd.min.js.map +1 -1
  27. package/checkbox/mis-crystal-design-system-checkbox.metadata.json +1 -1
  28. package/dropdown/mis-crystal-design-system-dropdown.metadata.json +1 -1
  29. package/esm2015/action-list/action-list.component.js +168 -0
  30. package/esm2015/action-list/action-list.module.js +18 -0
  31. package/esm2015/action-list/index.js +2 -0
  32. package/esm2015/action-list/mis-crystal-design-system-action-list.js +5 -0
  33. package/esm2015/action-list/public_api.js +3 -0
  34. package/esm2015/checkbox/checkbox.component.js +1 -1
  35. package/esm2015/dropdown/dropdown.component.js +2 -2
  36. package/esm2015/menu/index.js +2 -0
  37. package/esm2015/menu/menu-close.directive.js +18 -0
  38. package/esm2015/menu/menu.directive.js +70 -0
  39. package/esm2015/menu/menu.module.js +17 -0
  40. package/esm2015/menu/mis-crystal-design-system-menu.js +5 -0
  41. package/esm2015/menu/public_api.js +4 -0
  42. package/esm2015/multi-select-dropdown/multi-select-dropdown.component.js +2 -2
  43. package/fesm2015/mis-crystal-design-system-action-list.js +191 -0
  44. package/fesm2015/mis-crystal-design-system-action-list.js.map +1 -0
  45. package/fesm2015/mis-crystal-design-system-checkbox.js +1 -1
  46. package/fesm2015/mis-crystal-design-system-dropdown.js +1 -1
  47. package/fesm2015/mis-crystal-design-system-dropdown.js.map +1 -1
  48. package/fesm2015/mis-crystal-design-system-menu.js +106 -0
  49. package/fesm2015/mis-crystal-design-system-menu.js.map +1 -0
  50. package/fesm2015/mis-crystal-design-system-multi-select-dropdown.js +1 -1
  51. package/fesm2015/mis-crystal-design-system-multi-select-dropdown.js.map +1 -1
  52. package/menu/index.d.ts +1 -0
  53. package/menu/menu-close.directive.d.ts +6 -0
  54. package/menu/menu.directive.d.ts +18 -0
  55. package/menu/menu.module.d.ts +3 -0
  56. package/menu/mis-crystal-design-system-menu.d.ts +4 -0
  57. package/menu/mis-crystal-design-system-menu.metadata.json +1 -0
  58. package/menu/package.json +11 -0
  59. package/menu/public_api.d.ts +3 -0
  60. package/multi-select-dropdown/mis-crystal-design-system-multi-select-dropdown.metadata.json +1 -1
  61. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mis-crystal-design-system-action-list.js","sources":["../../../projects/mis-components/action-list/action-list.component.ts","../../../projects/mis-components/action-list/action-list.module.ts","../../../projects/mis-components/action-list/mis-crystal-design-system-action-list.ts"],"sourcesContent":["import { ConnectionPositionPair, Overlay, OverlayConfig, OverlayRef } from \"@angular/cdk/overlay\";\nimport { TemplatePortal } from \"@angular/cdk/portal\";\nimport { Component, ElementRef, EventEmitter, HostListener, Input, OnInit, Output, TemplateRef, ViewChild, ViewContainerRef } from \"@angular/core\";\n\n@Component({\n selector: \"mis-action-list\",\n templateUrl: \"./action-list.component.html\",\n styleUrls: [\"./action-list.component.scss\"]\n})\nexport class ActionListComponent implements OnInit {\n isOpen = false;\n\n subItems: ActionItem[] = [];\n\n @Input() data: ActionItems[] = [];\n @Input() height: string = \"\";\n @Input() width: string = \"\";\n @Input() label: string = \"Select\";\n\n @Input() dropdownListHeight: string = \"\";\n @Input() dropdownListWidth: string = \"\";\n @Input() dropdownListPosition: \"Left\" | \"Right\" = \"Left\";\n\n @Input() searchEnabled: boolean = true;\n @Input() noDataMessage: string = \"No Data\";\n selectedItems: ActionItem[] = [];\n\n @Output() onChange: EventEmitter<any> = new EventEmitter();\n\n @ViewChild(\"select\", { static: false }) selectElement: ElementRef;\n @ViewChild(\"popupContainer\", { static: false }) popupContainer: TemplateRef<Element>;\n @ViewChild(\"subPopupContainer\", { static: false }) subPopupContainer: TemplateRef<Element>;\n private overlayRef: OverlayRef;\n private subOverlayRef: OverlayRef;\n\n constructor(private eRef: ElementRef, private overlay: Overlay, private viewContainerRef: ViewContainerRef) {}\n ngOnInit() {\n this.selectedItems = [];\n this.data.forEach(q =>\n q.children.forEach(w => {\n if (w.checked) this.selectedItems.push(w);\n })\n );\n this.label = this.selectedItems[0]?.label;\n }\n\n @HostListener(\"document:click\", [\"$event\"])\n clickout(event) {\n const isClickedOutside = !this.eRef.nativeElement.contains(event.target);\n if (isClickedOutside) {\n !this.overlayRef?.hasAttached() && this.onCancel();\n }\n }\n filterByValue(array: ActionItem[], string: string) {\n return array.filter(o => o.label.toLowerCase().includes(string.toLowerCase()));\n }\n toggleDropdown() {\n this.isOpen = !this.isOpen;\n if (this.isOpen) this.openDropdown(this.popupContainer, this.selectElement.nativeElement, false);\n else this.onCancel();\n }\n private openDropdown(template: TemplateRef<Element>, origin: HTMLElement, openRight: boolean): 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 positions = [\n ...(this.dropdownListPosition === \"Right\" ? positionsBottom.reverse() : positionsBottom),\n ...(this.dropdownListPosition === \"Right\" ? positionsTop.reverse() : positionsTop)\n ];\n const positionStrategy = this.overlay\n .position()\n .flexibleConnectedTo(origin)\n .withPositions(\n openRight ? [new ConnectionPositionPair({ originX: \"end\", originY: \"top\" }, { overlayX: \"start\", overlayY: \"top\" }, 8)] : positions\n )\n .withPush(true);\n const configs = new OverlayConfig({\n hasBackdrop: !openRight,\n backdropClass: \"cdk-overlay-transparent-backdrop\",\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n positionStrategy,\n width: origin.clientWidth || 140\n });\n if (openRight) {\n this.subOverlayRef = this.overlay.create(configs);\n if (this.dropdownListWidth) this.subOverlayRef.updateSize({ width: this.dropdownListWidth });\n if (this.dropdownListHeight) this.subOverlayRef.updateSize({ height: this.dropdownListHeight });\n this.subOverlayRef.attach(new TemplatePortal(template, this.viewContainerRef));\n this.subOverlayRef.backdropClick().subscribe(() => {\n this.onCancel();\n });\n return;\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(() => {\n this.onCancel();\n });\n }\n selectItem(item: ActionItem) {\n if (this.data.some(q => q.children.some(w => w.value === item.value && w.checked))) {\n if (item.type === \"MULTIPLE\") this.selectedItems = this.selectedItems.filter(q => q.value !== item.value);\n this.data = this.data.map(q => ({\n ...q,\n children: q?.children?.map(e => ({\n ...e,\n checked: e.checked && e.value !== item.value\n }))\n }));\n } else {\n this.data = this.data.map(q => ({\n ...q,\n children: q?.children?.map(e => ({\n ...e,\n checked: (e.type === \"MULTIPLE\" && (e.checked || e.value === item.value)) || (e.type === \"SINGLE\" && e.value === item.value)\n }))\n }));\n if (item.type === \"MULTIPLE\") this.selectedItems.push({ ...item, checked: true });\n }\n this.label =\n item.type === \"MULTIPLE\" ? (this.selectedItems.length > 0 ? this.selectedItems[0]?.label : \"Select\") : item.checked ? \"Select\" : item.label;\n this.subItems = this.data.find(q => q.children?.some(w => w.value === item.value))?.children || [];\n this.onChange.emit(this.data);\n if (item.type === \"SINGLE\") this.toggleDropdown();\n }\n onHover(item: ActionItem, isHovered, element?: any) {\n if (isHovered) {\n this.subItems.length > 0 && this.subOverlayRef?.detach();\n this.subItems = this.data.find(q => q?.children?.some(w => w?.parentValue === item?.value))?.children || [];\n this.subItems.length > 0 && this.openDropdown(this.subPopupContainer, element?.nativeElement || element, true);\n } else {\n this.subItems = [];\n this.subOverlayRef?.detach();\n }\n }\n onCancel() {\n this.isOpen = false;\n this.overlayRef?.detach();\n this.subOverlayRef?.detach();\n }\n}\n\nexport interface ActionItems {\n label: string;\n value: string;\n icon?: string;\n disabled?: boolean;\n children?: ActionItem[];\n}\n\nexport interface ActionItem {\n type: \"SINGLE\" | \"MULTIPLE\";\n label: string;\n value: string;\n parentValue: string;\n icon?: string;\n checked: boolean;\n disabled?: boolean;\n}\n","import { CommonModule } from \"@angular/common\";\nimport { FormsModule } from \"@angular/forms\";\nimport { NgModule, ModuleWithProviders } from \"@angular/core\";\nimport { ActionListComponent } from \"./action-list.component\";\nimport { CheckboxModule } from \"mis-crystal-design-system/checkbox\";\n\n@NgModule({\n declarations: [ActionListComponent],\n imports: [CommonModule, FormsModule, CheckboxModule],\n exports: [ActionListComponent]\n})\nexport class ActionListModule {\n static forRoot(): ModuleWithProviders<ActionListModule> {\n return { ngModule: ActionListModule, providers: [] };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MASa,mBAAmB;IA0B9B,YAAoB,IAAgB,EAAU,OAAgB,EAAU,gBAAkC;QAAtF,SAAI,GAAJ,IAAI,CAAY;QAAU,YAAO,GAAP,OAAO,CAAS;QAAU,qBAAgB,GAAhB,gBAAgB,CAAkB;QAzB1G,WAAM,GAAG,KAAK,CAAC;QAEf,aAAQ,GAAiB,EAAE,CAAC;QAEnB,SAAI,GAAkB,EAAE,CAAC;QACzB,WAAM,GAAW,EAAE,CAAC;QACpB,UAAK,GAAW,EAAE,CAAC;QACnB,UAAK,GAAW,QAAQ,CAAC;QAEzB,uBAAkB,GAAW,EAAE,CAAC;QAChC,sBAAiB,GAAW,EAAE,CAAC;QAC/B,yBAAoB,GAAqB,MAAM,CAAC;QAEhD,kBAAa,GAAY,IAAI,CAAC;QAC9B,kBAAa,GAAW,SAAS,CAAC;QAC3C,kBAAa,GAAiB,EAAE,CAAC;QAEvB,aAAQ,GAAsB,IAAI,YAAY,EAAE,CAAC;KAQmD;IAC9G,QAAQ;;QACN,IAAI,CAAC,aAAa,GAAG,EAAE,CAAC;QACxB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,IACjB,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;YAClB,IAAI,CAAC,CAAC,OAAO;gBAAE,IA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ACVD;;;;;;"}
@@ -64,7 +64,7 @@ class CheckboxComponent {
64
64
  CheckboxComponent.decorators = [
65
65
  { type: Component, args: [{
66
66
  selector: 'mis-checkbox',
67
- template: "<div\n class=\"checkbox-container\"\n (click)=\"!formControl.disabled && toggleState()\"\n>\n <input\n hidden\n type=\"checkbox\"\n [formControl]=\"formControl\"\n (click)=\"$event.stopPropagation()\"\n >\n <span\n class=\"checkmark\"\n tabindex=\"0\"\n *ngIf=\"!isIndeterminate\"\n [ngClass]=\"{\n 'disabled-checkbox': formControl.disabled,\n 'error': isError && !formControl.disabled\n }\"\n ></span>\n <span\n class=\"checkmark indeterminate\"\n tabindex=\"0\"\n *ngIf=\"isIndeterminate\"\n [ngClass]=\"{\n 'disabled-checkbox': formControl.disabled,\n 'error': isError && !formControl.disabled\n }\"\n ></span>\n</div>\n",
67
+ template: "<div\n class=\"checkbox-container\"\n [ngStyle]=\"{ cursor: formControl.disabled ? 'not-allowed' : 'pointer' }\"\n (click)=\"!formControl.disabled && toggleState()\"\n>\n <input hidden type=\"checkbox\" [formControl]=\"formControl\" (click)=\"$event.stopPropagation()\" />\n <span\n class=\"checkmark\"\n tabindex=\"0\"\n *ngIf=\"!isIndeterminate\"\n [ngClass]=\"{\n 'disabled-checkbox': formControl.disabled,\n error: isError && !formControl.disabled\n }\"\n ></span>\n <span\n class=\"checkmark indeterminate\"\n tabindex=\"0\"\n *ngIf=\"isIndeterminate\"\n [ngClass]=\"{\n 'disabled-checkbox': formControl.disabled,\n error: isError && !formControl.disabled\n }\"\n ></span>\n</div>\n",
68
68
  styles: [".checkbox-container{height:20px;width:20px;position:relative;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:sub}.checkbox-container input{opacity:0;cursor:pointer}.checkbox-container input,.checkmark{position:absolute;height:20px;width:20px}.checkmark{display:flex;justify-content:center;align-items:center;top:0;left:0;border-radius:4px;background-color:#fff;border:2px solid #6a737d;box-sizing:border-box}.checkmark:hover{border-color:#929dab}.checkmark:focus,.checkmark:focus-within{box-shadow:0 0 0 .09em #fff,0 0 .01em .2em #0937b2;outline:none}.checkbox-container input:checked~.checkmark{background-color:#0937b2;border-color:#0937b2}.checkbox-container input:checked~.checkmark.disabled-checkbox{background-color:#c8cdd3;border-color:#c8cdd3}.checkmark:after{content:\"\";position:absolute;display:none}.checkbox-container input:checked~.checkmark:after{display:block}.checkbox-container .checkmark:after{top:1px;width:4px;height:9px;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg)}.checkbox-container .checkmark.indeterminate:after{top:2px;width:2px;height:0;border:solid #fff;border-width:0 0 12px;border-radius:14px;transform:rotate(90deg);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg)}.disabled-checkbox{pointer-events:none;border-color:#c8cdd3}.error{border-color:#b00020}.checkbox-container input:checked~.error.checkmark{border:#b00020!important;background:#b00020!important}.checkbox-container .error.checkmark:after{top:3px;width:4px;height:9px;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg)}.checkbox-container .error.checkmark.indeterminate:after{top:4px;width:2px;height:0;border:solid #fff;border-width:0 0 12px;border-radius:14px;transform:rotate(90deg);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg)}.error:focus,.error:focus-within{box-shadow:none!important;outline:none}"]
69
69
  },] }
70
70
  ];
@@ -65,7 +65,7 @@ class DropdownComponent {
65
65
  DropdownComponent.decorators = [
66
66
  { type: Component, args: [{
67
67
  selector: 'mis-dropdown',
68
- template: "<div class=\"main-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\">\n {{ selectedItem.label || label }}\n </p>\n </div>\n <svg class=\"handle\" [ngStyle]=\"{ transform: isOpen ? 'rotate(180deg)': 'rotate(0deg)' }\" width=\"20\" height=\"20\"\n viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\"\n d=\"M13.825 7.15845L10 10.9751L6.175 7.15845L5 8.33345L10 13.3334L15 8.33345L13.825 7.15845Z\" fill=\"#181F33\" />\n </svg>\n </div>\n <div style=\"flex-basis: 0;\"></div>\n <div style=\"width: 100%; position: relative;\">\n <div *ngIf=\"isOpen\" 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 *ngIf=\"!isSearchInputFocused\" class=\"search-icon\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" 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 </svg>\n <input\n [ngModel]=\"searchInput\"\n [ngStyle]=\"{ paddingLeft: isSearchInputFocused ? '12px' : '45px', border:isSearchInputFocused? '1px solid #0937B2':'1px solid #e0e0e0', paddingRight: isSearchInputFocused ? '45px' : '10px' }\"\n (ngModelChange)=\"searchInputOnChange($event)\"\n [placeholder]=\"isSearchInputFocused ? '' : 'Search Keyword'\"\n (focus)=\"searchInputFocused(true)\"\n class=\"search-input\"\n />\n <svg *ngIf=\"isSearchInputFocused\" class=\"cancel-icon\" (click)=\"searchInputCanceled($event)\" width=\"24\" height=\"24\"\n viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" 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 </svg>\n </div>\n <div class=\"items\">\n <div class=\"item\" [ngClass]=\"{'item-disabled': item.disabled}\" (click)=\"item.disabled ? null : selectItem(item)\" *ngFor=\"let item of searchInput ? searchData : data\">\n <div class=\"label\" [ngStyle]=\"{'width': item.icon? '90%': '100%'}\">\n {{ item.label }}\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 : data).length === 0\">\n {{ searchInput === '' ? noDataMessage : 'No results' }}\n </div>\n </div>\n </div>\n </div>\n</div>\n",
68
+ template: "<div\n class=\"main-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\">\n {{ selectedItem.label || label }}\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\n class=\"item\"\n [ngClass]=\"{ 'item-disabled': item.disabled }\"\n (click)=\"item.disabled ? null : selectItem(item)\"\n *ngFor=\"let item of searchInput ? searchData : data\"\n >\n <div class=\"label\" [ngStyle]=\"{ width: item.icon ? '90%' : '100%' }\">\n {{ item.label }}\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 : data).length === 0\">\n {{ searchInput === \"\" ? noDataMessage : \"No results\" }}\n </div>\n </div>\n </div>\n </div>\n</div>\n",
69
69
  styles: [".main-container{position:relative;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;height:32px;width:256px;font-family:Lato,sans-serif!important}.main-container .dropdown{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;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%;box-sizing:border-box;padding:0 12px}.main-container .dropdown:hover{background-color:#f5f7fc}.main-container .dropdown .label{box-sizing:border-box;display:flex;justify-content:flex-start;align-items:center;width:calc(100% - 32px)}.main-container .dropdown .label,.main-container .dropdown .label .text{font-style:normal;font-weight:400;font-size:14px;line-height:20px;letter-spacing:.2px;color:#181f33}.main-container .dropdown .label .text{margin:0!important;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.main-container .dropdown .label .count{background-color:#e0e0e0;border-radius:50%;padding:2px 7px;margin:0}.main-container .dropdown .handle{width:24px;height:24px;transition:.3s;position:absolute;right:12px;border-radius:50%;overflow:hidden}.main-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}.main-container .popup-container::-webkit-scrollbar{width:0;height:0}.main-container .popup-container .search-container{position:relative;box-sizing:border-box;padding:8px}.main-container .popup-container .search-container .search-icon{position:absolute;width:24px;height:24px;top:50%;transform:translateY(-50%);left:18px;z-index:1}.main-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}.main-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}.main-container .popup-container .items{padding:8px 0 8px 8px;overflow-y:scroll;height:100%}.main-container .popup-container .items::-webkit-scrollbar{width:5px;height:0}.main-container .popup-container .items::-webkit-scrollbar-thumb{background:#9aa7b4;border-radius:10px}.main-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}.main-container .popup-container .items .item{cursor:pointer;display:flex;justify-content:flex-start;align-items:center;gap:10px;padding:8px 12px;border-radius:6px;height:auto;letter-spacing:.2px;color:#181f33}.main-container .popup-container .items .item:hover{background-color:#f5f7fc}.main-container .popup-container .items .item .label{width:100%;line-height:20px;font-size:14px;font-style:normal;font-weight:400}.main-container .popup-container .items .item .icon-container{width:10%;display:flex;justify-content:flex-end}.main-container .popup-container .items .item .icon-container .icon{width:20px;height:20px}.main-container .popup-container .items .item-disabled{cursor:not-allowed}.main-container .popup-container .items .item-disabled:hover{background-color:transparent}.main-container .popup-container .items .item-disabled .label{color:#929dab;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.position-left{right:0}.position-right{left:0}"]
70
70
  },] }
71
71
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"mis-crystal-design-system-dropdown.js","sources":["../../../projects/mis-components/dropdown/dropdown.component.ts","../../../projects/mis-components/dropdown/dropdown.module.ts","../../../projects/mis-components/dropdown/mis-crystal-design-system-dropdown.ts"],"sourcesContent":["import {\n Component,\n ElementRef,\n EventEmitter,\n HostListener,\n Input,\n OnInit,\n Output\n} from '@angular/core';\n\n@Component({\n selector: 'mis-dropdown',\n templateUrl: './dropdown.component.html',\n styleUrls: ['./dropdown.component.scss']\n})\nexport class DropdownComponent implements OnInit {\n isOpen = false;\n isSearchInputFocused: boolean = false;\n searchInput: string = '';\n searchData: DropdownItem[] = [];\n\n @Input() data: DropdownItem[] = [];\n @Input() height: string = ''\n @Input() width: string = ''\n @Input() label: string = 'Select';\n\n @Input() dropdownListHeight: string = ''\n @Input() dropdownListWidth: string = ''\n @Input() dropdownListPosition: 'Left' | 'Right' = 'Left'\n\n @Input() searchEnabled: boolean = true;\n @Input() selectedItem: DropdownItem = { value: '', label: '' };\n @Input() noDataMessage: string = 'No Data';\n\n @Output() onChange: EventEmitter<any> = new EventEmitter();\n\n constructor(private eRef: ElementRef) { }\n ngOnInit() { }\n\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 filterByValue(array: DropdownItem[], string: string) {\n return array.filter(o =>\n o.label.toLowerCase().includes(string.toLowerCase())\n );\n }\n searchInputOnChange(newValue) {\n this.searchInput = newValue;\n if (newValue) {\n this.searchData = this.filterByValue(this.data, newValue);\n } else {\n this.searchData = [];\n this.searchInput = '';\n }\n }\n searchInputFocused(isFocused: boolean) {\n this.isSearchInputFocused = isFocused;\n }\n searchInputCanceled(event) {\n event.stopPropagation();\n this.searchInput = '';\n this.isSearchInputFocused = false;\n }\n toggleDropdown() {\n this.isOpen = !this.isOpen;\n }\n selectItem(item) {\n this.onChange.emit(item);\n this.toggleDropdown();\n }\n onCancel() {\n this.isSearchInputFocused = false;\n this.isOpen = false;\n this.searchInput = '';\n }\n}\nexport interface DropdownItem {\n label: string;\n value: string;\n icon?: string;\n disabled?: boolean;\n}\n","import { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { NgModule, ModuleWithProviders } from '@angular/core';\nimport { DropdownComponent } from './dropdown.component';\n\n@NgModule({\n declarations: [DropdownComponent],\n imports: [CommonModule, FormsModule],\n exports: [DropdownComponent]\n})\nexport class DropdownModule {\n static forRoot(): ModuleWithProviders<DropdownModule> {\n return { ngModule: DropdownModule, providers: [] };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAea,iBAAiB;IAqB1B,YAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;QApBpC,WAAM,GAAG,KAAK,CAAC;QACf,yBAAoB,GAAY,KAAK,CAAC;QACtC,gBAAW,GAAW,EAAE,CAAC;QACzB,eAAU,GAAmB,EAAE,CAAC;QAEvB,SAAI,GAAmB,EAAE,CAAC;QAC1B,WAAM,GAAW,EAAE,CAAA;QACnB,UAAK,GAAW,EAAE,CAAA;QAClB,UAAK,GAAW,QAAQ,CAAC;QAEzB,uBAAkB,GAAW,EAAE,CAAA;QAC/B,sBAAiB,GAAW,EAAE,CAAA;QAC9B,yBAAoB,GAAqB,MAAM,CAAA;QAE/C,kBAAa,GAAY,IAAI,CAAC;QAC9B,iBAAY,GAAiB,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;QACtD,kBAAa,GAAW,SAAS,CAAC;QAEjC,aAAQ,GAAsB,IAAI,YAAY,EAAE,CAAC;KAElB;IACzC,QAAQ,MAAM;IAGd,QAAQ,CAAC,KAAK;QACV,MAAM,gBAAgB,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QACzE,IAAI,gBAAgB,EAAE;YAClB,IAAI,CAAC,QAAQ,EAAE,CAAC;SACnB;KACJ;IACD,aAAa,CAAC,KAAqB,EAAE,MAAc;QAC/C,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,IACjB,CAAC,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CACvD,CAAC;KACL;IACD,mBAAmB,CAAC,QAAQ;QACxB,IAAI,CAAC,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YARJ,QAAQ,SAAC;gBACN,YAAY,EAAE,CAAC,iBAAiB,CAAC;gBACjC,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,CAAC;gBACpC,OAAO,EAAE,CAAC,iBAAiB,CAAC;aAC/B;;;ACTD;;;;;;"}
1
+ {"version":3,"file":"mis-crystal-design-system-dropdown.js","sources":["../../../projects/mis-components/dropdown/dropdown.component.ts","../../../projects/mis-components/dropdown/dropdown.module.ts","../../../projects/mis-components/dropdown/mis-crystal-design-system-dropdown.ts"],"sourcesContent":["import {\n Component,\n ElementRef,\n EventEmitter,\n HostListener,\n Input,\n OnInit,\n Output\n} from '@angular/core';\n\n@Component({\n selector: 'mis-dropdown',\n templateUrl: './dropdown.component.html',\n styleUrls: ['./dropdown.component.scss']\n})\nexport class DropdownComponent implements OnInit {\n isOpen = false;\n isSearchInputFocused: boolean = false;\n searchInput: string = '';\n searchData: DropdownItem[] = [];\n\n @Input() data: DropdownItem[] = [];\n @Input() height: string = ''\n @Input() width: string = ''\n @Input() label: string = 'Select';\n\n @Input() dropdownListHeight: string = ''\n @Input() dropdownListWidth: string = ''\n @Input() dropdownListPosition: 'Left' | 'Right' = 'Left'\n\n @Input() searchEnabled: boolean = true;\n @Input() selectedItem: DropdownItem = { value: '', label: '' };\n @Input() noDataMessage: string = 'No Data';\n\n @Output() onChange: EventEmitter<any> = new EventEmitter();\n\n constructor(private eRef: ElementRef) { }\n ngOnInit() { }\n\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 filterByValue(array: DropdownItem[], string: string) {\n return array.filter(o =>\n o.label.toLowerCase().includes(string.toLowerCase())\n );\n }\n searchInputOnChange(newValue) {\n this.searchInput = newValue;\n if (newValue) {\n this.searchData = this.filterByValue(this.data, newValue);\n } else {\n this.searchData = [];\n this.searchInput = '';\n }\n }\n searchInputFocused(isFocused: boolean) {\n this.isSearchInputFocused = isFocused;\n }\n searchInputCanceled(event) {\n event.stopPropagation();\n this.searchInput = '';\n this.isSearchInputFocused = false;\n }\n toggleDropdown() {\n this.isOpen = !this.isOpen;\n }\n selectItem(item) {\n this.onChange.emit(item);\n this.toggleDropdown();\n }\n onCancel() {\n this.isSearchInputFocused = false;\n this.isOpen = false;\n this.searchInput = '';\n }\n}\nexport interface DropdownItem {\n label: string;\n value: string;\n icon?: string;\n disabled?: boolean;\n}\n","import { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { NgModule, ModuleWithProviders } from '@angular/core';\nimport { DropdownComponent } from './dropdown.component';\n\n@NgModule({\n declarations: [DropdownComponent],\n imports: [CommonModule, FormsModule],\n exports: [DropdownComponent]\n})\nexport class DropdownModule {\n static forRoot(): ModuleWithProviders<DropdownModule> {\n return { ngModule: DropdownModule, providers: [] };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAea,iBAAiB;IAqB1B,YAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;QApBpC,WAAM,GAAG,KAAK,CAAC;QACf,yBAAoB,GAAY,KAAK,CAAC;QACtC,gBAAW,GAAW,EAAE,CAAC;QACzB,eAAU,GAAmB,EAAE,CAAC;QAEvB,SAAI,GAAmB,EAAE,CAAC;QAC1B,WAAM,GAAW,EAAE,CAAA;QACnB,UAAK,GAAW,EAAE,CAAA;QAClB,UAAK,GAAW,QAAQ,CAAC;QAEzB,uBAAkB,GAAW,EAAE,CAAA;QAC/B,sBAAiB,GAAW,EAAE,CAAA;QAC9B,yBAAoB,GAAqB,MAAM,CAAA;QAE/C,kBAAa,GAAY,IAAI,CAAC;QAC9B,iBAAY,GAAiB,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;QACtD,kBAAa,GAAW,SAAS,CAAC;QAEjC,aAAQ,GAAsB,IAAI,YAAY,EAAE,CAAC;KAElB;IACzC,QAAQ,MAA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C;QACpB,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;KACzB;;;YArEJ,SAAS,SAAC;gBACP,QAAQ,EAAE,cAAc;gBACxB,uoJAAwC;;aAE3C;;;YAZG,UAAU;;;mBAmBT,KAAK;qBACL,KAAK;oBACL,KAAK;oBACL,KAAK;iCAEL,KAAK;gCACL,KAAK;mCACL,KAAK;4BAEL,KAAK;2BACL,KAAK;4BACL,KAAK;uBAEL,MAAM;uBAKN,YAAY,SAAC,gBAAgB,EAAE,CAAC,QAAQ,CAAC;;;MC7BjC,cAAc;IACvB,OAAO,OAAO;QACV,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC;KACtD;;;YARJ,QAAQ,SAAC;gBACN,YAAY,EAAE,CAAC,iBAAiB,CAAC;gBACjC,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,CAAC;gBACpC,OAAO,EAAE,CAAC,iBAAiB,CAAC;aAC/B;;;ACTD;;;;;;"}
@@ -0,0 +1,106 @@
1
+ import { ConnectionPositionPair, OverlayConfig, Overlay, OverlayModule } from '@angular/cdk/overlay';
2
+ import { TemplatePortal, PortalModule } from '@angular/cdk/portal';
3
+ import { Directive, ElementRef, ViewContainerRef, Input, HostListener, NgModule } from '@angular/core';
4
+ import { take } from 'rxjs/operators';
5
+ import { CommonModule } from '@angular/common';
6
+
7
+ /** @format */
8
+ class MenuDirective {
9
+ constructor(overlay, element, viewContainerRef) {
10
+ this.overlay = overlay;
11
+ this.element = element;
12
+ this.viewContainerRef = viewContainerRef;
13
+ this.positionX = "start";
14
+ this.positionY = "bottom";
15
+ this.offsetX = 0;
16
+ this.offsetY = 0;
17
+ }
18
+ onClick(event) {
19
+ this.menuShow();
20
+ }
21
+ menuShow() {
22
+ const positionStrategy = this.overlay
23
+ .position()
24
+ .flexibleConnectedTo(this.element)
25
+ .withPositions([
26
+ new ConnectionPositionPair({ originX: this.positionX, originY: this.positionY }, { overlayX: this.positionX, overlayY: this.positionY === "bottom" ? "top" : "bottom" }, this.offsetX, this.offsetY),
27
+ new ConnectionPositionPair({ originX: "start", originY: "bottom" }, { overlayX: "start", overlayY: "top" }, this.offsetX, this.offsetY),
28
+ new ConnectionPositionPair({ originX: "end", originY: "top" }, { overlayX: "end", overlayY: "bottom" }, this.offsetX, this.offsetY)
29
+ ])
30
+ .withPush(true);
31
+ const config = new OverlayConfig({
32
+ hasBackdrop: true,
33
+ positionStrategy,
34
+ scrollStrategy: this.overlay.scrollStrategies.reposition(),
35
+ backdropClass: "cdk-overlay-transparent-backdrop"
36
+ });
37
+ this.overlayRef = this.overlay.create(config);
38
+ const tempRef = new TemplatePortal(this.menu, this.viewContainerRef);
39
+ this.overlayRef.attach(tempRef);
40
+ this.overlayRef
41
+ .backdropClick()
42
+ .pipe(take(1))
43
+ .subscribe(res => {
44
+ this.close();
45
+ });
46
+ }
47
+ close() {
48
+ var _a, _b;
49
+ (_a = this.overlayRef) === null || _a === void 0 ? void 0 : _a.detach();
50
+ (_b = this.overlayRef) === null || _b === void 0 ? void 0 : _b.dispose();
51
+ }
52
+ }
53
+ MenuDirective.decorators = [
54
+ { type: Directive, args: [{
55
+ selector: "[misMenu]",
56
+ exportAs: "misMenu"
57
+ },] }
58
+ ];
59
+ MenuDirective.ctorParameters = () => [
60
+ { type: Overlay },
61
+ { type: ElementRef },
62
+ { type: ViewContainerRef }
63
+ ];
64
+ MenuDirective.propDecorators = {
65
+ menu: [{ type: Input, args: ["misMenu",] }],
66
+ positionX: [{ type: Input }],
67
+ positionY: [{ type: Input }],
68
+ offsetX: [{ type: Input }],
69
+ offsetY: [{ type: Input }],
70
+ onClick: [{ type: HostListener, args: ["click", ["$event"],] }]
71
+ };
72
+
73
+ class MenuCloseDirective {
74
+ constructor() { }
75
+ closeMenu() {
76
+ this.menu.close();
77
+ }
78
+ }
79
+ MenuCloseDirective.decorators = [
80
+ { type: Directive, args: [{
81
+ selector: "[misMenuClose]"
82
+ },] }
83
+ ];
84
+ MenuCloseDirective.ctorParameters = () => [];
85
+ MenuCloseDirective.propDecorators = {
86
+ menu: [{ type: Input, args: ["misMenuClose",] }],
87
+ closeMenu: [{ type: HostListener, args: ["click", [],] }]
88
+ };
89
+
90
+ /** @format */
91
+ class MisMenuModule {
92
+ }
93
+ MisMenuModule.decorators = [
94
+ { type: NgModule, args: [{
95
+ declarations: [MenuDirective, MenuCloseDirective],
96
+ imports: [CommonModule, OverlayModule, PortalModule],
97
+ exports: [MenuDirective, MenuCloseDirective]
98
+ },] }
99
+ ];
100
+
101
+ /**
102
+ * Generated bundle index. Do not edit.
103
+ */
104
+
105
+ export { MenuCloseDirective, MenuDirective, MisMenuModule };
106
+ //# sourceMappingURL=mis-crystal-design-system-menu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mis-crystal-design-system-menu.js","sources":["../../../projects/mis-components/menu/menu.directive.ts","../../../projects/mis-components/menu/menu-close.directive.ts","../../../projects/mis-components/menu/menu.module.ts","../../../projects/mis-components/menu/mis-crystal-design-system-menu.ts"],"sourcesContent":["/** @format */\n\nimport { ConnectionPositionPair, Overlay, OverlayConfig, OverlayRef } from \"@angular/cdk/overlay\";\nimport { TemplatePortal } from \"@angular/cdk/portal\";\nimport { Directive, ElementRef, HostListener, Input, TemplateRef, ViewContainerRef } from \"@angular/core\";\nimport { take } from \"rxjs/operators\";\n\n@Directive({\n selector: \"[misMenu]\",\n exportAs: \"misMenu\"\n})\nexport class MenuDirective {\n @Input(\"misMenu\") menu: TemplateRef<ElementRef>;\n @Input() positionX: \"start\" | \"end\" = \"start\";\n @Input() positionY: \"top\" | \"bottom\" = \"bottom\";\n @Input() offsetX = 0;\n @Input() offsetY = 0;\n private overlayRef: OverlayRef;\n\n constructor(private overlay: Overlay, private element: ElementRef, private viewContainerRef: ViewContainerRef) {}\n @HostListener(\"click\", [\"$event\"]) onClick(event) {\n this.menuShow();\n }\n private menuShow() {\n const positionStrategy = this.overlay\n .position()\n .flexibleConnectedTo(this.element)\n .withPositions([\n new ConnectionPositionPair(\n { originX: this.positionX, originY: this.positionY },\n { overlayX: this.positionX, overlayY: this.positionY === \"bottom\" ? \"top\" : \"bottom\" },\n this.offsetX,\n this.offsetY\n ),\n new ConnectionPositionPair({ originX: \"start\", originY: \"bottom\" }, { overlayX: \"start\", overlayY: \"top\" }, this.offsetX, this.offsetY),\n new ConnectionPositionPair({ originX: \"end\", originY: \"top\" }, { overlayX: \"end\", overlayY: \"bottom\" }, this.offsetX, this.offsetY)\n ])\n .withPush(true);\n const config = new OverlayConfig({\n hasBackdrop: true,\n positionStrategy,\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n backdropClass: \"cdk-overlay-transparent-backdrop\"\n });\n this.overlayRef = this.overlay.create(config);\n\n const tempRef = new TemplatePortal(this.menu, this.viewContainerRef);\n this.overlayRef.attach(tempRef);\n this.overlayRef\n .backdropClick()\n .pipe(take(1))\n .subscribe(res => {\n this.close();\n });\n }\n\n close(): void {\n this.overlayRef?.detach();\n this.overlayRef?.dispose();\n }\n}\n","import { Directive, HostListener, Input } from \"@angular/core\";\nimport { MenuDirective } from \"./menu.directive\";\n\n@Directive({\n selector: \"[misMenuClose]\"\n})\nexport class MenuCloseDirective {\n @Input(\"misMenuClose\") menu: MenuDirective;\n constructor() {}\n\n @HostListener(\"click\", []) closeMenu() {\n this.menu.close();\n }\n}\n","/** @format */\n\nimport { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { MenuDirective } from \"./menu.directive\";\nimport { OverlayModule } from \"@angular/cdk/overlay\";\nimport { PortalModule } from \"@angular/cdk/portal\";\nimport { MenuCloseDirective } from \"./menu-close.directive\";\n\n@NgModule({\n declarations: [MenuDirective, MenuCloseDirective],\n imports: [CommonModule, OverlayModule, PortalModule],\n exports: [MenuDirective, MenuCloseDirective]\n})\nexport class MisMenuModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAAA;MAWa,aAAa;IAQxB,YA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,aAAa,EAAE,kBAAkB,CAAC;gBACjD,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,EAAE,YAAY,CAAC;gBACpD,OAAO,EAAE,CAAC,aAAa,EAAE,kBAAkB,CAAC;aAC7C;;;ACbD;;;;;;"}
@@ -197,7 +197,7 @@ class MultiSelectDropdownComponent {
197
197
  MultiSelectDropdownComponent.decorators = [
198
198
  { type: Component, args: [{
199
199
  selector: "mis-multi-select-dropdown",
200
- template: "<div class=\"container\" [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 class=\"handle\" [ngStyle]=\"{ transform: isOpen ? 'rotate(180deg)': 'rotate(0deg)' }\" width=\"20\" height=\"20\"\n viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\"\n d=\"M13.825 7.15845L10 10.9751L6.175 7.15845L5 8.33345L10 13.3334L15 8.33345L13.825 7.15845Z\" fill=\"#181F33\" />\n </svg>\n </div>\n <div style=\"flex-basis: 0;\"></div>\n <div style=\"width: 100%; position: relative;\">\n <div *ngIf=\"isOpen\" 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 *ngIf=\"!isSearchInputFocused\" class=\"search-icon\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" 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 </svg>\n <input\n [ngModel]=\"searchInput\"\n [ngStyle]=\"{ paddingLeft: isSearchInputFocused ? '12px' : '45px', border:isSearchInputFocused? '1px solid #0937B2':'1px solid #e0e0e0', paddingRight: isSearchInputFocused ? '45px' : '10px' }\"\n (ngModelChange)=\"searchInputOnChange($event)\"\n [placeholder]=\"isSearchInputFocused ? '' : 'Search Keyword'\"\n (focus)=\"searchInputFocused(true)\"\n class=\"search-input\"\n />\n <svg *ngIf=\"isSearchInputFocused\" class=\"cancel-icon\" (click)=\"searchInputCanceled($event)\" width=\"24\" height=\"24\"\n viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" 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 </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\n [checked]=\"item.checked\"\n ></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\n [name]=\"'Reset'\"\n [type]=\"'Text'\"\n [width]=\"'100%'\"\n (click)=\"onReset()\"\n ></mis-button>\n </div>\n <div style=\"width: calc(50% - 4px)\">\n <mis-button\n [name]=\"'Apply'\"\n [type]=\"'Solid'\"\n [width]=\"'100%'\"\n (click)=\"applyFilters()\"\n ></mis-button>\n </div>\n </div>\n </div>\n </div>\n\n</div>\n",
200
+ 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",
201
201
  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}"]
202
202
  },] }
203
203
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"mis-crystal-design-system-multi-select-dropdown.js","sources":["../../../projects/mis-components/multi-select-dropdown/multi-select-dropdown.component.ts","../../../projects/mis-components/multi-select-dropdown/multi-select-dropdown.module.ts","../../../projects/mis-components/multi-select-dropdown/mis-crystal-design-system-multi-select-dropdown.ts"],"sourcesContent":["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","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAca,4BAA4B;IAsCvC,YAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;QArCpC,gBAAW,GAAW,EAAE,CAAC;QACzB,WAAM,GAAG,KAAK,CAAC;QACf,uBAAkB,GAA8B,EAAE,CAAC;QACnD,cAAS,GAA8B,EAAE,CAAC;QAC1C,eAAU,GAA8B,EAAE,CAAC;QAC3C,yBAAoB,GAAY,KAAK,CAAC;QACtC,oBAAe,GAAG,oBAAoB,CAAC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":"mis-crystal-design-system-multi-select-dropdown.js","sources":["../../../projects/mis-components/multi-select-dropdown/multi-select-dropdown.component.ts","../../../projects/mis-components/multi-select-dropdown/multi-select-dropdown.module.ts","../../../projects/mis-components/multi-select-dropdown/mis-crystal-design-system-multi-select-dropdown.ts"],"sourcesContent":["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","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAca,4BAA4B;IAsCvC,YAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;QArCpC,gBAAW,GAAW,EAAE,CAAC;QACzB,WAAM,GAAG,KAAK,CAAC;QACf,uBAAkB,GAA8B,EAAE,CAAC;QACnD,cAAS,GAA8B,EAAE,CAAC;QAC1C,eAAU,GAA8B,EAAE,CAAC;QAC3C,yBAAoB,GAAY,KAAK,CAAC;QACtC,oBAAe,GAAG,oBAAoB,CAAC;QAM9B,UAAK,GAAW,QAAQ,CAAC;QACzB,WAAM,GAAW,EAAE,CAAC;QACpB,UAAK,GAAW,EAAE,CAAC;QACnB,uBAAkB,GAAW,EAAE,CAAC;QAChC,sBAAiB,GAAW,EAAE,CAAC;QAC/B,yBAAoB,GAAqB,MAAM,CAAC;QAChD,oBAAe,GAAY,KAAK,CAAC;QACjC,kBAAa,GAAY,IAAI,CAAC;QAC9B,sBAAiB,GAAY,KAAK,CAAC;QACnC,kBAAa,GAAW,SAAS,CAAC;QAClC,YAAO,GAAY;YAC1B,UAAU,EAAE,IAAI;SACjB,CAAC;QAIO,oBAAe,GAAY,KAAK,CAAC;QAChC,aAAQ,GAAsB,IAAI,YAAY,EAAE,CAAC;KAQnB;IA9BxC,IAAa,IAAI,CAAC,MAAiC;QACjD,IAAI,CAAC,SAAS,GAAG,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ACpB,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;KACvB;;;YA1OF,SAAS,SAAC;gBACT,QAAQ,EAAE,2BAA2B;gBACrC,gwKAAqD;;aAEtD;;;YAXC,UAAU;;;mBAoBT,KAAK;oBAKL,KAAK;qBACL,KAAK;oBACL,KAAK;iCACL,KAAK;gCACL,KAAK;mCACL,KAAK;8BACL,KAAK;4BACL,KAAK;gCACL,KAAK;4BACL,KAAK;sBACL,KAAK;4BAGL,KAAK;8BAGL,KAAK;uBACL,MAAM;uBACN,YAAY,SAAC,gBAAgB,EAAE,CAAC,QAAQ,CAAC;;;MCjC/B,yBAAyB;IAClC,OAAO,OAAO;QACV,OAAO,EAAE,QAAQ,EAAE,yBAAyB,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC;KACjE;;;YARJ,QAAQ,SAAC;gBACN,YAAY,EAAE,CAAC,4BAA4B,CAAC;gBAC5C,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,YAAY,CAAC;gBAClE,OAAO,EAAE,CAAC,4BAA4B,CAAC;aAC1C;;;ACXD;;;;;;"}
@@ -0,0 +1 @@
1
+ export * from './public_api';
@@ -0,0 +1,6 @@
1
+ import { MenuDirective } from "./menu.directive";
2
+ export declare class MenuCloseDirective {
3
+ menu: MenuDirective;
4
+ constructor();
5
+ closeMenu(): void;
6
+ }
@@ -0,0 +1,18 @@
1
+ /** @format */
2
+ import { Overlay } from "@angular/cdk/overlay";
3
+ import { ElementRef, TemplateRef, ViewContainerRef } from "@angular/core";
4
+ export declare class MenuDirective {
5
+ private overlay;
6
+ private element;
7
+ private viewContainerRef;
8
+ menu: TemplateRef<ElementRef>;
9
+ positionX: "start" | "end";
10
+ positionY: "top" | "bottom";
11
+ offsetX: number;
12
+ offsetY: number;
13
+ private overlayRef;
14
+ constructor(overlay: Overlay, element: ElementRef, viewContainerRef: ViewContainerRef);
15
+ onClick(event: any): void;
16
+ private menuShow;
17
+ close(): void;
18
+ }
@@ -0,0 +1,3 @@
1
+ /** @format */
2
+ export declare class MisMenuModule {
3
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './index';
@@ -0,0 +1 @@
1
+ {"__symbolic":"module","version":4,"metadata":{"MenuDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":7,"character":1},"arguments":[{"selector":"[misMenu]","exportAs":"misMenu"}]}],"members":{"menu":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":12,"character":3},"arguments":["misMenu"]}]}],"positionX":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":13,"character":3}}]}],"positionY":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":14,"character":3}}]}],"offsetX":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":15,"character":3}}]}],"offsetY":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":16,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/cdk/overlay","name":"Overlay","line":19,"character":31},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":19,"character":57},{"__symbolic":"reference","module":"@angular/core","name":"ViewContainerRef","line":19,"character":95}]}],"onClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":20,"character":3},"arguments":["click",["$event"]]}]}],"menuShow":[{"__symbolic":"method"}],"close":[{"__symbolic":"method"}]}},"MenuCloseDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":3,"character":1},"arguments":[{"selector":"[misMenuClose]"}]}],"members":{"menu":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":7,"character":3},"arguments":["misMenuClose"]}]}],"__ctor__":[{"__symbolic":"constructor"}],"closeMenu":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":10,"character":3},"arguments":["click",[]]}]}]}},"MisMenuModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":9,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"MenuDirective"},{"__symbolic":"reference","name":"MenuCloseDirective"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":11,"character":12},{"__symbolic":"reference","module":"@angular/cdk/overlay","name":"OverlayModule","line":11,"character":26},{"__symbolic":"reference","module":"@angular/cdk/portal","name":"PortalModule","line":11,"character":41}],"exports":[{"__symbolic":"reference","name":"MenuDirective"},{"__symbolic":"reference","name":"MenuCloseDirective"}]}]}],"members":{}}},"origins":{"MenuDirective":"./menu.directive","MenuCloseDirective":"./menu-close.directive","MisMenuModule":"./menu.module"},"importAs":"mis-crystal-design-system/menu"}
@@ -0,0 +1,11 @@
1
+ {
2
+ "main": "../bundles/mis-crystal-design-system-menu.umd.js",
3
+ "module": "../fesm2015/mis-crystal-design-system-menu.js",
4
+ "es2015": "../fesm2015/mis-crystal-design-system-menu.js",
5
+ "esm2015": "../esm2015/menu/mis-crystal-design-system-menu.js",
6
+ "fesm2015": "../fesm2015/mis-crystal-design-system-menu.js",
7
+ "typings": "mis-crystal-design-system-menu.d.ts",
8
+ "metadata": "mis-crystal-design-system-menu.metadata.json",
9
+ "sideEffects": false,
10
+ "name": "mis-crystal-design-system/menu"
11
+ }
@@ -0,0 +1,3 @@
1
+ export { MenuDirective } from "./menu.directive";
2
+ export { MenuCloseDirective } from "./menu-close.directive";
3
+ export { MisMenuModule } from "./menu.module";
@@ -1 +1 @@
1
- {"__symbolic":"module","version":4,"metadata":{"MultiSelectDropdownComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":9,"character":1},"arguments":[{"selector":"mis-multi-select-dropdown","template":"<div class=\"container\" [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 class=\"handle\" [ngStyle]=\"{ transform: isOpen ? 'rotate(180deg)': 'rotate(0deg)' }\" width=\"20\" height=\"20\"\n viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\"\n d=\"M13.825 7.15845L10 10.9751L6.175 7.15845L5 8.33345L10 13.3334L15 8.33345L13.825 7.15845Z\" fill=\"#181F33\" />\n </svg>\n </div>\n <div style=\"flex-basis: 0;\"></div>\n <div style=\"width: 100%; position: relative;\">\n <div *ngIf=\"isOpen\" 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 *ngIf=\"!isSearchInputFocused\" class=\"search-icon\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" 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 </svg>\n <input\n [ngModel]=\"searchInput\"\n [ngStyle]=\"{ paddingLeft: isSearchInputFocused ? '12px' : '45px', border:isSearchInputFocused? '1px solid #0937B2':'1px solid #e0e0e0', paddingRight: isSearchInputFocused ? '45px' : '10px' }\"\n (ngModelChange)=\"searchInputOnChange($event)\"\n [placeholder]=\"isSearchInputFocused ? '' : 'Search Keyword'\"\n (focus)=\"searchInputFocused(true)\"\n class=\"search-input\"\n />\n <svg *ngIf=\"isSearchInputFocused\" class=\"cancel-icon\" (click)=\"searchInputCanceled($event)\" width=\"24\" height=\"24\"\n viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" 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 </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\n [checked]=\"item.checked\"\n ></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\n [name]=\"'Reset'\"\n [type]=\"'Text'\"\n [width]=\"'100%'\"\n (click)=\"onReset()\"\n ></mis-button>\n </div>\n <div style=\"width: calc(50% - 4px)\">\n <mis-button\n [name]=\"'Apply'\"\n [type]=\"'Solid'\"\n [width]=\"'100%'\"\n (click)=\"applyFilters()\"\n ></mis-button>\n </div>\n </div>\n </div>\n </div>\n\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}"]}]}],"members":{"data":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":22,"character":3}}]}],"label":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":27,"character":3}}]}],"height":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":28,"character":3}}]}],"width":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":29,"character":3}}]}],"dropdownListHeight":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":30,"character":3}}]}],"dropdownListWidth":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":31,"character":3}}]}],"dropdownListPosition":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":32,"character":3}}]}],"enableSelectAll":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":33,"character":3}}]}],"searchEnabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":34,"character":3}}]}],"showSelectedCount":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":35,"character":3}}]}],"noDataMessage":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":36,"character":3}}]}],"options":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":37,"character":3}}]}],"selectedItems":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":40,"character":3}}]}],"hideApplyButton":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":43,"character":3}}]}],"onChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":44,"character":3}}]}],"clickout":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":45,"character":3},"arguments":["document:click",["$event"]]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":52,"character":28}]}],"ngOnInit":[{"__symbolic":"method"}],"handlerSetLocalSelectedItems":[{"__symbolic":"method"}],"searchInputFocused":[{"__symbolic":"method"}],"searchInputCanceled":[{"__symbolic":"method"}],"toggleDropdown":[{"__symbolic":"method"}],"filterByValue":[{"__symbolic":"method"}],"searchInputOnChange":[{"__symbolic":"method"}],"formatValues":[{"__symbolic":"method"}],"toggleSelectedItems":[{"__symbolic":"method"}],"applyFilters":[{"__symbolic":"method"}],"onReset":[{"__symbolic":"method"}],"onCancel":[{"__symbolic":"method"}]}},"MultiSelectDropdownItem":{"__symbolic":"interface"},"MultiSelectDropdownModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":7,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"MultiSelectDropdownComponent"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":9,"character":14},{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule","line":9,"character":28},{"__symbolic":"reference","module":"mis-crystal-design-system/checkbox","name":"CheckboxModule","line":9,"character":41},{"__symbolic":"reference","module":"mis-crystal-design-system/button","name":"ButtonModule","line":9,"character":57}],"exports":[{"__symbolic":"reference","name":"MultiSelectDropdownComponent"}]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":[],"value":{"ngModule":{"__symbolic":"reference","name":"MultiSelectDropdownModule"},"providers":[]}}}}},"origins":{"MultiSelectDropdownComponent":"./multi-select-dropdown.component","MultiSelectDropdownItem":"./multi-select-dropdown.component","MultiSelectDropdownModule":"./multi-select-dropdown.module"},"importAs":"mis-crystal-design-system/multi-select-dropdown"}
1
+ {"__symbolic":"module","version":4,"metadata":{"MultiSelectDropdownComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":9,"character":1},"arguments":[{"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}"]}]}],"members":{"data":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":22,"character":3}}]}],"label":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":27,"character":3}}]}],"height":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":28,"character":3}}]}],"width":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":29,"character":3}}]}],"dropdownListHeight":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":30,"character":3}}]}],"dropdownListWidth":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":31,"character":3}}]}],"dropdownListPosition":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":32,"character":3}}]}],"enableSelectAll":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":33,"character":3}}]}],"searchEnabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":34,"character":3}}]}],"showSelectedCount":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":35,"character":3}}]}],"noDataMessage":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":36,"character":3}}]}],"options":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":37,"character":3}}]}],"selectedItems":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":40,"character":3}}]}],"hideApplyButton":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":43,"character":3}}]}],"onChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":44,"character":3}}]}],"clickout":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":45,"character":3},"arguments":["document:click",["$event"]]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":52,"character":28}]}],"ngOnInit":[{"__symbolic":"method"}],"handlerSetLocalSelectedItems":[{"__symbolic":"method"}],"searchInputFocused":[{"__symbolic":"method"}],"searchInputCanceled":[{"__symbolic":"method"}],"toggleDropdown":[{"__symbolic":"method"}],"filterByValue":[{"__symbolic":"method"}],"searchInputOnChange":[{"__symbolic":"method"}],"formatValues":[{"__symbolic":"method"}],"toggleSelectedItems":[{"__symbolic":"method"}],"applyFilters":[{"__symbolic":"method"}],"onReset":[{"__symbolic":"method"}],"onCancel":[{"__symbolic":"method"}]}},"MultiSelectDropdownItem":{"__symbolic":"interface"},"MultiSelectDropdownModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":7,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"MultiSelectDropdownComponent"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":9,"character":14},{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule","line":9,"character":28},{"__symbolic":"reference","module":"mis-crystal-design-system/checkbox","name":"CheckboxModule","line":9,"character":41},{"__symbolic":"reference","module":"mis-crystal-design-system/button","name":"ButtonModule","line":9,"character":57}],"exports":[{"__symbolic":"reference","name":"MultiSelectDropdownComponent"}]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":[],"value":{"ngModule":{"__symbolic":"reference","name":"MultiSelectDropdownModule"},"providers":[]}}}}},"origins":{"MultiSelectDropdownComponent":"./multi-select-dropdown.component","MultiSelectDropdownItem":"./multi-select-dropdown.component","MultiSelectDropdownModule":"./multi-select-dropdown.module"},"importAs":"mis-crystal-design-system/multi-select-dropdown"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mis-crystal-design-system",
3
- "version": "2.4.8",
3
+ "version": "2.4.9",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "*",
6
6
  "@angular/core": "*",