mis-crystal-design-system 2.3.2 → 2.3.6

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 (51) hide show
  1. package/bundles/mis-crystal-design-system-datepicker_v2.umd.js +29 -18
  2. package/bundles/mis-crystal-design-system-datepicker_v2.umd.js.map +1 -1
  3. package/bundles/mis-crystal-design-system-datepicker_v2.umd.min.js +1 -1
  4. package/bundles/mis-crystal-design-system-datepicker_v2.umd.min.js.map +1 -1
  5. package/bundles/mis-crystal-design-system-dropdown.umd.js +1 -1
  6. package/bundles/mis-crystal-design-system-dropdown.umd.min.js +1 -1
  7. package/bundles/mis-crystal-design-system-dropdown.umd.min.js.map +1 -1
  8. package/bundles/mis-crystal-design-system-table.umd.js +1 -1
  9. package/bundles/mis-crystal-design-system-table.umd.min.js +1 -1
  10. package/bundles/mis-crystal-design-system-table.umd.min.js.map +1 -1
  11. package/bundles/mis-crystal-design-system-widgets.umd.js +477 -0
  12. package/bundles/mis-crystal-design-system-widgets.umd.js.map +1 -0
  13. package/bundles/mis-crystal-design-system-widgets.umd.min.js +16 -0
  14. package/bundles/mis-crystal-design-system-widgets.umd.min.js.map +1 -0
  15. package/datepicker_v2/mis-crystal-design-system-datepicker_v2.metadata.json +1 -1
  16. package/datepicker_v2/tz-datepicker.directive.d.ts +5 -2
  17. package/dropdown/mis-crystal-design-system-dropdown.metadata.json +1 -1
  18. package/esm2015/datepicker_v2/tz-datepicker.directive.js +18 -7
  19. package/esm2015/datepicker_v2/tz-dp-container/tz-dp-container.component.js +13 -13
  20. package/esm2015/dropdown/dropdown.component.js +1 -1
  21. package/esm2015/table/filter/filter.component.js +1 -1
  22. package/esm2015/widgets/classes/async-widget.js +22 -0
  23. package/esm2015/widgets/classes/base-widget.js +32 -0
  24. package/esm2015/widgets/classes/sync-widget.js +20 -0
  25. package/esm2015/widgets/classes/widget-group.js +32 -0
  26. package/esm2015/widgets/index.js +2 -0
  27. package/esm2015/widgets/interfaces/widgets.model.js +2 -0
  28. package/esm2015/widgets/mis-crystal-design-system-widgets.js +5 -0
  29. package/esm2015/widgets/public_api.js +7 -0
  30. package/esm2015/widgets/services/widget.service.js +16 -0
  31. package/esm2015/widgets/widgets.module.js +12 -0
  32. package/fesm2015/mis-crystal-design-system-datepicker_v2.js +30 -19
  33. package/fesm2015/mis-crystal-design-system-datepicker_v2.js.map +1 -1
  34. package/fesm2015/mis-crystal-design-system-dropdown.js +1 -1
  35. package/fesm2015/mis-crystal-design-system-table.js +1 -1
  36. package/fesm2015/mis-crystal-design-system-widgets.js +122 -0
  37. package/fesm2015/mis-crystal-design-system-widgets.js.map +1 -0
  38. package/package.json +1 -1
  39. package/table/mis-crystal-design-system-table.metadata.json +1 -1
  40. package/widgets/classes/async-widget.d.ts +8 -0
  41. package/widgets/classes/base-widget.d.ts +14 -0
  42. package/widgets/classes/sync-widget.d.ts +8 -0
  43. package/widgets/classes/widget-group.d.ts +16 -0
  44. package/widgets/index.d.ts +1 -0
  45. package/widgets/interfaces/widgets.model.d.ts +13 -0
  46. package/widgets/mis-crystal-design-system-widgets.d.ts +4 -0
  47. package/widgets/mis-crystal-design-system-widgets.metadata.json +1 -0
  48. package/widgets/package.json +11 -0
  49. package/widgets/public_api.d.ts +6 -0
  50. package/widgets/services/widget.service.d.ts +6 -0
  51. package/widgets/widgets.module.d.ts +2 -0
@@ -63,7 +63,7 @@ DropdownComponent.decorators = [
63
63
  { type: Component, args: [{
64
64
  selector: 'mis-dropdown',
65
65
  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",
66
- 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{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}"]
66
+ 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}"]
67
67
  },] }
68
68
  ];
69
69
  DropdownComponent.ctorParameters = () => [
@@ -64,7 +64,7 @@ TableFilterComponent.decorators = [
64
64
  { type: Component, args: [{
65
65
  selector: 'mis-table-filter',
66
66
  template: "<div id=\"main-container\"\n #mainContainer\n [ngStyle]=\"containerStyles\"\n>\n <div id=\"search-bar-container\">\n <input (keyup)=\"updateSearchValue($event)\" type=\"text\" placeholder=\"Search\">\n <svg id=\"search-icon\" width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M1.21496 8.14563C1.21496 4.3179 4.33709 1.21165 8.19249 1.21165C12.0479 1.21165 15.17 4.3179 15.17 8.14563C15.17 9.69308 14.6598 11.1226 13.797 12.2767L12.3684 13.7013C11.2043 14.5668 9.75891 15.0796 8.19249 15.0796C4.33709 15.0796 1.21496 11.9734 1.21496 8.14563ZM12.9419 14.7835C11.602 15.7329 9.96259 16.2913 8.19249 16.2913C3.66965 16.2913 -0.00012207 12.6461 -0.00012207 8.14563C-0.00012207 3.64512 3.66965 0 8.19249 0C12.7153 0 16.3851 3.64512 16.3851 8.14563C16.3851 9.93713 15.8036 11.5931 14.8183 12.9375L16.836 14.4048C17.6704 14.912 18.7553 15.6543 17.2453 17.215C15.7352 18.7756 15.0098 17.6663 14.499 16.8364L12.9419 14.7835Z\" fill=\"#6A737D\"/>\n </svg>\n </div>\n <div id=\"filters-main-container\">\n <div class=\"filters-sub-container\">\n <div *ngFor=\"let filter of getCheckedFilters()\">\n <div class=\"filter\">\n <mis-checkbox\n [checked]=\"true\"\n [name]=\"filter.value\"\n (valueChange)=\"updateFilter($event)\"\n ></mis-checkbox>\n <span class=\"filter-text\">{{filter.name}}</span>\n </div>\n </div>\n </div>\n <div class=\"separator\" style=\"margin: 16px 0px;\" *ngIf=\"getCheckedFilters().length && (getCheckedFilters().length < filtersData.length)\"></div>\n <div class=\"filters-sub-container\">\n <div *ngFor=\"let filter of getFiltersBasedOnSearchValue()\">\n <div class=\"filter\" *ngIf=\"!filter.checked\">\n <mis-checkbox\n [checked]=\"false\"\n [name]=\"filter.value\"\n (valueChange)=\"updateFilter($event)\"\n ></mis-checkbox>\n <span class=\"filter-text\">{{filter.name}}</span>\n </div>\n </div>\n <div id=\"no-results-container\" *ngIf=\"getFiltersBasedOnSearchValue().length < 1\">\n <span class=\"filter-text\">No matches found</span>\n </div>\n </div>\n <div class=\"separator\" style=\"margin: 16px 0px;\"></div>\n <div id=\"buttons-container\">\n <button id=\"reset-btn\" style=\"margin-right: 8px;\" (click)=\"resetFilters()\">Reset</button>\n <button id=\"apply-btn\" (click)=\"applyFilters()\">Apply</button>\n </div>\n </div>\n</div>\n",
67
- styles: ["#main-container{position:absolute;background:#fff;z-index:2;right:calc(50% - 128px);width:256px;padding:16px;font-family:Lato,sans-serif;box-shadow:0 12px 24px rgba(0,0,0,.12),0 4px 8px rgba(0,0,0,.12);border-radius:8px}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-thumb{background:#9aa7b4}#search-bar-container{width:100%;position:relative;margin-bottom:8px}input{width:100%;padding:12px 12px 12px 42px;border:1px solid #000;border-radius:4px;height:48px;box-shadow:none;outline:none;font-style:normal;font-weight:400;font-size:15px;line-height:20px;letter-spacing:.1px;color:#181f33}input:focus{border:1px solid #0937b2}#search-icon{position:absolute;top:15px;left:12px}.filters-sub-container{max-height:144px;overflow-y:auto}.filter{height:36px;display:flex;justify-content:flex-start;align-items:center}.filter-text{font-size:14px;line-height:20px;padding-right:8px;letter-spacing:.2px;color:#181f33;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}#no-results-container{height:36px;display:flex;justify-content:center;align-items:center}.separator{border:1px solid #e0e0e0}#buttons-container{display:flex;justify-content:center;align-items:center}button{width:calc(50% - 4px);border:none;box-shadow:none;outline:none;font-size:16px;line-height:24px;text-align:center;letter-spacing:.2px;padding:10px 30px;background:none;border-radius:8px}#apply-btn{background:#0937b2;color:#fff}#reset-btn{background:#fff;color:#0937b2}"]
67
+ styles: ["#main-container{position:absolute;background:#fff;z-index:2;right:calc(50% - 128px);width:256px;padding:16px;font-family:Lato,sans-serif;box-shadow:0 12px 24px rgba(0,0,0,.12),0 4px 8px rgba(0,0,0,.12);border-radius:8px}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-thumb{background:#9aa7b4}#search-bar-container{width:100%;position:relative;margin-bottom:8px}input{width:100%;padding:12px 12px 12px 42px;border:1px solid #000;border-radius:4px;height:48px;box-shadow:none;outline:none;font-style:normal;font-weight:400;font-size:15px;line-height:20px;letter-spacing:.1px;color:#181f33}input:focus{border:1px solid #0937b2}#search-icon{position:absolute;top:15px;left:12px}.filters-sub-container{max-height:144px;overflow-y:auto}.filter{height:36px;display:flex;justify-content:flex-start;align-items:center}.filter-text{font-size:14px;line-height:20px;padding-left:8px;letter-spacing:.2px;color:#181f33;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}#no-results-container{height:36px;display:flex;justify-content:center;align-items:center}.separator{border:1px solid #e0e0e0}#buttons-container{display:flex;justify-content:center;align-items:center}button{width:calc(50% - 4px);border:none;box-shadow:none;outline:none;font-size:16px;line-height:24px;text-align:center;letter-spacing:.2px;padding:10px 30px;background:none;border-radius:8px}#apply-btn{background:#0937b2;color:#fff}#reset-btn{background:#fff;color:#0937b2}"]
68
68
  },] }
69
69
  ];
70
70
  TableFilterComponent.ctorParameters = () => [];
@@ -0,0 +1,22 @@
1
+ import { tap, switchMap } from "rxjs/operators";
2
+ import { BaseWidget } from "./base-widget";
3
+ // Data type that the stream will return
4
+ export class AsyncWidget extends BaseWidget {
5
+ // @param dataStream: Stream to subscribe to when widget refreshed
6
+ constructor(dataStream, customStates = []) {
7
+ super(dataStream, customStates);
8
+ if (dataStream) {
9
+ this.updateValue(dataStream);
10
+ }
11
+ }
12
+ // Change widget data stream
13
+ updateValue(dataStream) {
14
+ this.value = this.reset$.pipe(switchMap(() => {
15
+ this.toggleLoader(true);
16
+ return dataStream.pipe(tap(() => {
17
+ this.toggleLoader(false);
18
+ }), tap((value) => this.updateCustomStates(this.customStates, value)));
19
+ }));
20
+ }
21
+ }
22
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXN5bmMtd2lkZ2V0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbWlzLWNvbXBvbmVudHMvd2lkZ2V0cy9jbGFzc2VzL2FzeW5jLXdpZGdldC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxPQUFPLEVBQUUsR0FBRyxFQUFFLFNBQVMsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBRWhELE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDM0Msd0NBQXdDO0FBQ3hDLE1BQU0sT0FBTyxXQUFxQixTQUFRLFVBQWE7SUFJckQsa0VBQWtFO0lBQ2xFLFlBQVksVUFBMEIsRUFBRSxlQUFzQyxFQUFFO1FBQzlFLEtBQUssQ0FBQyxVQUFVLEVBQUUsWUFBWSxDQUFDLENBQUM7UUFDaEMsSUFBSSxVQUFVLEVBQUU7WUFDZCxJQUFJLENBQUMsV0FBVyxDQUFDLFVBQVUsQ0FBQyxDQUFDO1NBQzlCO0lBQ0gsQ0FBQztJQUVELDRCQUE0QjtJQUM1QixXQUFXLENBQUMsVUFBeUI7UUFDbkMsSUFBSSxDQUFDLEtBQUssR0FBRyxJQUFJLENBQUMsTUFBTSxDQUFDLElBQUksQ0FDM0IsU0FBUyxDQUFDLEdBQUcsRUFBRTtZQUNiLElBQUksQ0FBQyxZQUFZLENBQUMsSUFBSSxDQUFDLENBQUM7WUFDeEIsT0FBTyxVQUFVLENBQUMsSUFBSSxDQUNwQixHQUFHLENBQUMsR0FBRyxFQUFFO2dCQUNQLElBQUksQ0FBQyxZQUFZLENB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pZiAoZGF0YVN0cmVhbSkge1xuICAgICAgdGhpcy51cGRhdGVWYWx1ZShkYXRhU3RyZWFtKTtcbiAgICB9XG4gIH1cblxuICAvLyBDaGFuZ2Ugd2lkZ2V0IGRhdGEgc3RyZWFtXG4gIHVwZGF0ZVZhbHVlKGRhdGFTdHJlYW06IE9ic2VydmFibGU8RD4pOiB2b2lkIHtcbiAgICB0aGlzLnZhbHVlID0gdGhpcy5yZXNldCQucGlwZShcbiAgICAgIHN3aXRjaE1hcCgoKSA9PiB7XG4gICAgICAgIHRoaXMudG9nZ2xlTG9hZGVyKHRydWUpO1xuICAgICAgICByZXR1cm4gZGF0YVN0cmVhbS5waXBlKFxuICAgICAgICAgIHRhcCgoKSA9PiB7XG4gICAgICAgICAgICB0aGlzLnRvZ2dsZUxvYWRlcihmYWxzZSk7XG4gICAgICAgICAgfSksXG4gICAgICAgICAgdGFwKCh2YWx1ZTogRCkgPT4gdGhpcy51cGRhdGVDdXN0b21TdGF0ZXModGhpcy5jdXN0b21TdGF0ZXMsIHZhbHVlKSlcbiAgICAgICAgKTtcbiAgICAgIH0pXG4gICAgKTtcbiAgfVxufVxuIl19
@@ -0,0 +1,32 @@
1
+ import { ReplaySubject, Subject } from "rxjs";
2
+ export class BaseWidget {
3
+ constructor(data, customStates = []) {
4
+ // Get loader stream
5
+ this.loader$ = new ReplaySubject(1);
6
+ this.loader = this.loader$.asObservable();
7
+ this.state = {};
8
+ // reset data/stream
9
+ this.reset$ = new Subject();
10
+ this.customStates = customStates;
11
+ }
12
+ // Toggle loader with value
13
+ toggleLoader(value) {
14
+ this.loader$.next(value);
15
+ }
16
+ // Trigger widget refresh
17
+ reset() {
18
+ this.reset$.next();
19
+ }
20
+ updateValue(data) { }
21
+ updateCustomStates(customStates, value) {
22
+ if (customStates.length > 0) {
23
+ customStates.forEach(customState => {
24
+ this.state = Object.assign(Object.assign({}, this.state), customState(value));
25
+ });
26
+ }
27
+ else {
28
+ this.state = {};
29
+ }
30
+ }
31
+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biAgLy8gcmVzZXQgZGF0YS9zdHJlYW1cbiAgcHJvdGVjdGVkIHJlc2V0JCA9IG5ldyBTdWJqZWN0PHZvaWQ+KCk7XG5cbiAgLy8gVHJpZ2dlciB3aWRnZXQgcmVmcmVzaFxuICByZXNldCgpOiB2b2lkIHtcbiAgICB0aGlzLnJlc2V0JC5uZXh0KCk7XG4gIH1cblxuICB1cGRhdGVWYWx1ZShkYXRhOiB1bmtub3duKTogdm9pZCB7fVxuXG4gIHByb3RlY3RlZCB1cGRhdGVDdXN0b21TdGF0ZXMoY3VzdG9tU3RhdGVzOiBBcnJheTxDdXN0b21TdGF0ZTxEPj4sIHZhbHVlOiBEKTogdm9pZCB7XG4gICAgaWYgKGN1c3RvbVN0YXRlcy5sZW5ndGggPiAwKSB7XG4gICAgICBjdXN0b21TdGF0ZXMuZm9yRWFjaChjdXN0b21TdGF0ZSA9PiB7XG4gICAgICAgIHRoaXMuc3RhdGUgPSB7IC4uLnRoaXMuc3RhdGUsIC4uLmN1c3RvbVN0YXRlKHZhbHVlKSB9O1xuICAgICAgfSk7XG4gICAgfSBlbHNlIHtcbiAgICAgIHRoaXMuc3RhdGUgPSB7fTtcbiAgICB9XG4gIH1cbn1cbiJdfQ==
@@ -0,0 +1,20 @@
1
+ import { BaseWidget } from "./base-widget";
2
+ export class SyncWidget extends BaseWidget {
3
+ // @param dataStream: Stream to subscribe to when widget refreshed
4
+ constructor(data, customStates = []) {
5
+ super(data, customStates);
6
+ if (data) {
7
+ this.value = data;
8
+ }
9
+ }
10
+ // Change data value
11
+ updateValue(value) {
12
+ this.value = value;
13
+ this.updateCustomStates(this.customStates, value);
14
+ }
15
+ reset() {
16
+ super.reset();
17
+ this.value = null;
18
+ }
19
+ }
20
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3luYy13aWRnZXQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0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VN0cmVhbTogU3RyZWFtIHRvIHN1YnNjcmliZSB0byB3aGVuIHdpZGdldCByZWZyZXNoZWRcbiAgY29uc3RydWN0b3IoZGF0YT86IEQsIGN1c3RvbVN0YXRlczogQXJyYXk8Q3VzdG9tU3RhdGU8RD4+ID0gW10pIHtcbiAgICBzdXBlcihkYXRhLCBjdXN0b21TdGF0ZXMpO1xuICAgIGlmIChkYXRhKSB7XG4gICAgICB0aGlzLnZhbHVlID0gZGF0YTtcbiAgICB9XG4gIH1cblxuICAvLyBDaGFuZ2UgZGF0YSB2YWx1ZVxuICB1cGRhdGVWYWx1ZSh2YWx1ZTogRCk6IHZvaWQge1xuICAgIHRoaXMudmFsdWUgPSB2YWx1ZTtcbiAgICB0aGlzLnVwZGF0ZUN1c3RvbVN0YXRlcyh0aGlzLmN1c3RvbVN0YXRlcywgdmFsdWUpO1xuICB9XG5cbiAgcmVzZXQoKTogdm9pZCB7XG4gICAgc3VwZXIucmVzZXQoKTtcbiAgICB0aGlzLnZhbHVlID0gbnVsbDtcbiAgfVxufVxuIl19
@@ -0,0 +1,32 @@
1
+ import { BaseWidget } from "./base-widget";
2
+ export class WidgetGroup extends BaseWidget {
3
+ constructor(widgets) {
4
+ super();
5
+ this.items = new Map();
6
+ Object.keys(widgets).forEach(key => {
7
+ this.addWidget(key, widgets[key]);
8
+ });
9
+ }
10
+ get value() {
11
+ const keys = Array.from(this.items.keys());
12
+ return keys.reduce((acc, key) => {
13
+ return Object.assign(Object.assign({}, acc), { [key]: this.get(key).value });
14
+ }, {});
15
+ }
16
+ get widgets() {
17
+ return Array.from(this.items.values());
18
+ }
19
+ addWidget(key, widget) {
20
+ this.items.set(key, widget);
21
+ }
22
+ get(key) {
23
+ return this.items.get(key);
24
+ }
25
+ removeWidget(key) {
26
+ this.items.delete(key);
27
+ }
28
+ reset() {
29
+ this.widgets.forEach(widget => widget.reset());
30
+ }
31
+ }
32
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJm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@@
1
+ export * from "./public_api";
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9taXMtY29tcG9uZW50cy93aWRnZXRzL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsY0FBYyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSBcIi4vcHVibGljX2FwaVwiO1xuIl19
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2lkZ2V0cy5tb2RlbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL21pcy1jb21wb25lbnRzL3dpZGdldHMvaW50ZXJmYWNlcy93aWRnZXRzLm1vZGVsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBBc3luY1dpZGdldCB9IGZyb20gXCIuLi9jbGFzc2VzL2FzeW5jLXdpZGdldFwiO1xuaW1wb3J0IHsgQmFzZVdpZGdldCB9IGZyb20gXCIuLi9jbGFzc2VzL2Jhc2Utd2lkZ2V0XCI7XG5pbXBvcnQgeyBTeW5jV2lkZ2V0IH0gZnJvbSBcIi4uL2NsYXNzZXMvc3luYy13aWRnZXRcIjtcblxuZXhwb3J0IGludGVyZmFjZSBXaWRnZXRNYXAge1xuICBba2V5OiBzdHJpbmddOiBBc3luY1dpZGdldCB8IFN5bmNXaWRnZXQ7XG59XG5cbmV4cG9ydCBpbnRlcmZhY2UgV2lkZ2V0VGFwIHtcbiAgKHdpZGdldDogQmFzZVdpZGdldDx1bmtub3duPik6IHZvaWQ7XG59XG5cbmV4cG9ydCB0eXBlIEN1c3RvbVN0YXRlPEQ+ID0gKGRhdGE6IEQpID0+IFdpZGdldFN0YXRlTWFwO1xuXG5leHBvcnQgaW50ZXJmYWNlIFdpZGdldFN0YXRlTWFwIHtcbiAgW2tleTogc3RyaW5nXTogYm9vbGVhbjtcbn1cbiJdfQ==
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './index';
5
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWlzLWNyeXN0YWwtZGVzaWduLXN5c3RlbS13aWRnZXRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvbWlzLWNvbXBvbmVudHMvd2lkZ2V0cy9taXMtY3J5c3RhbC1kZXNpZ24tc3lzdGVtLXdpZGdldHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLFNBQVMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9pbmRleCc7XG4iXX0=
@@ -0,0 +1,7 @@
1
+ export * from "./classes/sync-widget";
2
+ export * from "./classes/async-widget";
3
+ export * from "./classes/base-widget";
4
+ export * from "./classes/widget-group";
5
+ export * from "./interfaces/widgets.model";
6
+ export * from "./widgets.module";
7
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL21pcy1jb21wb25lbnRzL3dpZGdldHMvcHVibGljX2FwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLHVCQUF1QixDQUFDO0FBQ3RDLGNBQWMsd0JBQXdCLENBQUM7QUFDdkMsY0FBYyx1QkFBdUIsQ0FBQztBQUN0QyxjQUFjLHdCQUF3QixDQUFDO0FBQ3ZDLGNBQWMsNEJBQTRCLENBQUM7QUFDM0MsY0FBYyxrQkFBa0IsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gXCIuL2NsYXNzZXMvc3luYy13aWRnZXRcIjtcbmV4cG9ydCAqIGZyb20gXCIuL2NsYXNzZXMvYXN5bmMtd2lkZ2V0XCI7XG5leHBvcnQgKiBmcm9tIFwiLi9jbGFzc2VzL2Jhc2Utd2lkZ2V0XCI7XG5leHBvcnQgKiBmcm9tIFwiLi9jbGFzc2VzL3dpZGdldC1ncm91cFwiO1xuZXhwb3J0ICogZnJvbSBcIi4vaW50ZXJmYWNlcy93aWRnZXRzLm1vZGVsXCI7XG5leHBvcnQgKiBmcm9tIFwiLi93aWRnZXRzLm1vZHVsZVwiO1xuIl19
@@ -0,0 +1,16 @@
1
+ import { Injectable } from "@angular/core";
2
+ import { Subject } from "rxjs";
3
+ export class WidgetService {
4
+ constructor() {
5
+ this.refresh$ = new Subject();
6
+ this.refresh = this.refresh$.asObservable();
7
+ }
8
+ refreshWidgets(types) {
9
+ setTimeout(() => this.refresh$.next(types), 10);
10
+ }
11
+ }
12
+ WidgetService.decorators = [
13
+ { type: Injectable }
14
+ ];
15
+ WidgetService.ctorParameters = () => [];
16
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2lkZ2V0LnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9taXMtY29tcG9uZW50cy93aWRnZXRzL3NlcnZpY2VzL3dpZGdldC5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDM0MsT0FBTyxFQUFpQixPQUFPLEVBQUUsTUFBTSxNQUFNLENBQUM7QUFFOUMsTUFBTSxPQUFPLGFBQWE7SUFJeEI7UUFIUSxhQUFRLEdBQUcsSUFBSSxPQUFPLEVBQXdCLENBQUM7UUFDdkQsWUFBTyxHQUFHLElBQUksQ0FBQyxRQUFRLENBQUMsWUFBWSxFQUFFLENBQUM7SUFFeEIsQ0FBQztJQUVoQixjQUFjLENBQUMsS0FBZ0I7UUFDN0IsVUFBVSxDQUFDLEdBQUcsRUFBRSxDQUFDLElBQUksQ0FBQyxRQUFRLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxFQUFFLEVBQUUsQ0FBQyxDQUFDO0lBQ2xELENBQUM7OztZQVRGLFVBQVUiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBJbmplY3RhYmxlIH0gZnJvbSBcIkBhbmd1bGFyL2NvcmVcIjtcbmltcG9ydCB7IFJlcGxheVN1YmplY3QsIFN1YmplY3QgfSBmcm9tIFwicnhqc1wiO1xuQEluamVjdGFibGUoKVxuZXhwb3J0IGNsYXNzIFdpZGdldFNlcnZpY2Uge1xuICBwcml2YXRlIHJlZnJlc2gkID0gbmV3IFN1YmplY3Q8c3RyaW5nW10gfCB1bmRlZmluZWQ+KCk7XG4gIHJlZnJlc2ggPSB0aGlzLnJlZnJlc2gkLmFzT2JzZXJ2YWJsZSgpO1xuXG4gIGNvbnN0cnVjdG9yKCkge31cblxuICByZWZyZXNoV2lkZ2V0cyh0eXBlcz86IHN0cmluZ1tdKTogdm9pZCB7XG4gICAgc2V0VGltZW91dCgoKSA9PiB0aGlzLnJlZnJlc2gkLm5leHQodHlwZXMpLCAxMCk7XG4gIH1cbn1cbiJdfQ==
@@ -0,0 +1,12 @@
1
+ import { NgModule } from "@angular/core";
2
+ import { CommonModule } from "@angular/common";
3
+ export class WidgetsModule {
4
+ }
5
+ WidgetsModule.decorators = [
6
+ { type: NgModule, args: [{
7
+ declarations: [],
8
+ imports: [CommonModule],
9
+ providers: []
10
+ },] }
11
+ ];
12
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2lkZ2V0cy5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9taXMtY29tcG9uZW50cy93aWRnZXRzL3dpZGdldHMubW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDekMsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBUS9DLE1BQU0sT0FBTyxhQUFhOzs7WUFMekIsUUFBUSxTQUFDO2dCQUNSLFlBQVksRUFBRSxFQUFFO2dCQUNoQixPQUFPLEVBQUUsQ0FBQyxZQUFZLENBQUM7Z0JBQ3ZCLFNBQVMsRUFBRSxFQUFFO2FBQ2QiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBOZ01vZHVsZSB9IGZyb20gXCJAYW5ndWxhci9jb3JlXCI7XG5pbXBvcnQgeyBDb21tb25Nb2R1bGUgfSBmcm9tIFwiQGFuZ3VsYXIvY29tbW9uXCI7XG5pbXBvcnQgeyBXaWRnZXRTZXJ2aWNlIH0gZnJvbSBcIi4vc2VydmljZXMvd2lkZ2V0LnNlcnZpY2VcIjtcblxuQE5nTW9kdWxlKHtcbiAgZGVjbGFyYXRpb25zOiBbXSxcbiAgaW1wb3J0czogW0NvbW1vbk1vZHVsZV0sXG4gIHByb3ZpZGVyczogW11cbn0pXG5leHBvcnQgY2xhc3MgV2lkZ2V0c01vZHVsZSB7fVxuIl19
@@ -2,7 +2,7 @@ import { InjectionToken, Component, Inject, EventEmitter, Injector, Directive, S
2
2
  import { CommonModule } from '@angular/common';
3
3
  import { parseZone } from 'moment-timezone';
4
4
  import { ToastService, ToastModule } from 'mis-crystal-design-system/toast';
5
- import { ConnectionPositionPair, OverlayConfig, Overlay } from '@angular/cdk/overlay';
5
+ import { OverlayConfig, ConnectionPositionPair, Overlay } from '@angular/cdk/overlay';
6
6
  import { ComponentPortal } from '@angular/cdk/portal';
7
7
  import { NgControl } from '@angular/forms';
8
8
  import { take } from 'rxjs/operators';
@@ -65,9 +65,6 @@ class TzDpContainerComponent {
65
65
  };
66
66
  this.rawWeekDays = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT'];
67
67
  this.weekDays = [];
68
- this.currentMonthNumber = this.parseZoneInstance().month();
69
- this.currentMonth = getMonth(this.currentMonthNumber);
70
- this.currentYearNumber = this.parseZoneInstance().year();
71
68
  this.currentMonthDates = [];
72
69
  this.isPreviousMonthDisabled = false;
73
70
  this.isNextMonthDisabled = false;
@@ -77,6 +74,9 @@ class TzDpContainerComponent {
77
74
  return parseZone(...args).tz(this.data.dpConfig.timezone);
78
75
  };
79
76
  }
77
+ this.currentMonthNumber = this.parseZoneInstance().month();
78
+ this.currentMonth = getMonth(this.currentMonthNumber);
79
+ this.currentYearNumber = this.parseZoneInstance().year();
80
80
  this.weekDays = this.rawWeekDays.map((day, index) => ({
81
81
  label: `${day[0]}${day.slice(1).toLowerCase()}`,
82
82
  isCurrentDay: this.parseZoneInstance().day() === index,
@@ -90,7 +90,7 @@ class TzDpContainerComponent {
90
90
  this.calculateMinMaxDays();
91
91
  }
92
92
  currentDateInstance() {
93
- const selectedDate = this.parseZoneInstance(this.data.date, this.data.dpConfig.format);
93
+ const selectedDate = parseZone(this.data.date, this.data.dpConfig.format);
94
94
  if (selectedDate.isValid()) {
95
95
  this.currentYearNumber = selectedDate.year();
96
96
  this.currentMonthNumber = selectedDate.month();
@@ -110,7 +110,7 @@ class TzDpContainerComponent {
110
110
  }
111
111
  }
112
112
  navigateMonth(direction) {
113
- let thisMonth = this.parseZoneInstance().year(this.currentYearNumber).month(this.currentMonthNumber);
113
+ let thisMonth = parseZone().year(this.currentYearNumber).month(this.currentMonthNumber);
114
114
  if (direction === "NEXT") {
115
115
  thisMonth = thisMonth.add(1, 'month');
116
116
  }
@@ -126,23 +126,23 @@ class TzDpContainerComponent {
126
126
  generateDates(month, currentYearNumber) {
127
127
  var _a;
128
128
  let dates = [];
129
- const thisMonth = this.parseZoneInstance().year(currentYearNumber).month(month);
129
+ const thisMonth = parseZone().year(currentYearNumber).month(month);
130
130
  for (let startDate = 1; startDate <= thisMonth.endOf('month').date(); startDate++) {
131
131
  let isDisabledDay = this.data.datesDisabled.some(d => d === thisMonth.date(startDate).format(this.data.dpConfig.format));
132
- const minDate = this.parseZoneInstance(this.data.dpConfig.minDate, this.data.dpConfig.format);
132
+ const minDate = parseZone(this.data.dpConfig.minDate, this.data.dpConfig.format);
133
133
  if (!isDisabledDay && minDate.isValid()) {
134
134
  isDisabledDay = minDate.isAfter(thisMonth.date(startDate), 'day');
135
135
  }
136
- const maxDate = this.parseZoneInstance(this.data.dpConfig.maxDate, this.data.dpConfig.format);
136
+ const maxDate = parseZone(this.data.dpConfig.maxDate, this.data.dpConfig.format);
137
137
  if (!isDisabledDay && maxDate.isValid()) {
138
138
  isDisabledDay = maxDate.isBefore(thisMonth.date(startDate), 'day');
139
139
  }
140
140
  dates.push({
141
141
  date: startDate,
142
142
  weekDay: thisMonth.date(startDate).day(),
143
- isCurrentDay: thisMonth.date(startDate).isSame(this.parseZoneInstance(), 'day'),
144
- isSelectedDay: thisMonth.date(startDate).isSame(this.parseZoneInstance(this.data.date, this.data.dpConfig.format), 'day'),
145
- toastMessage: ((_a = this.data.messages.find(q => thisMonth.date(startDate).isSame(this.parseZoneInstance(q.date, this.data.dpConfig.format), 'day'))) === null || _a === void 0 ? void 0 : _a.message) || '',
143
+ isCurrentDay: this.parseZoneInstance().year(currentYearNumber).month(month).date(startDate).date(startDate).isSame(parseZone(), 'day'),
144
+ isSelectedDay: thisMonth.date(startDate).isSame(parseZone(this.data.date, this.data.dpConfig.format), 'day'),
145
+ toastMessage: ((_a = this.data.messages.find(q => thisMonth.date(startDate).isSame(parseZone(q.date, this.data.dpConfig.format), 'day'))) === null || _a === void 0 ? void 0 : _a.message) || '',
146
146
  isDisabledDay,
147
147
  });
148
148
  }
@@ -155,7 +155,7 @@ class TzDpContainerComponent {
155
155
  if (day.date <= 0)
156
156
  return;
157
157
  if (!day.isDisabledDay) {
158
- this.data.dateChange(this.parseZoneInstance().year(this.currentYearNumber).month(this.currentMonthNumber).date(day.date).format(this.data.dpConfig.format));
158
+ this.data.dateChange(parseZone().year(this.currentYearNumber).month(this.currentMonthNumber).date(day.date).format(this.data.dpConfig.format));
159
159
  }
160
160
  if (day.toastMessage) {
161
161
  this.toast.displayMsg(day.toastMessage, 4000);
@@ -186,8 +186,10 @@ class TzDatepickerDirective {
186
186
  maxDate: ""
187
187
  };
188
188
  this.dateMessages = [];
189
- this.positionX = "start";
189
+ this.positionX = "center";
190
190
  this.positionY = "bottom";
191
+ this.offsetX = 0;
192
+ this.offsetY = 0;
191
193
  this.dateChange = new EventEmitter(true);
192
194
  this.isOpen = false;
193
195
  this.dpDisabledDates = [];
@@ -213,11 +215,7 @@ class TzDatepickerDirective {
213
215
  const positionStrategy = this.overlay
214
216
  .position()
215
217
  .flexibleConnectedTo(this.element)
216
- .withPositions([
217
- new ConnectionPositionPair({ originX: this.positionX, originY: this.positionY }, { overlayX: this.positionX, overlayY: this.positionY === "bottom" ? "top" : "bottom" }),
218
- new ConnectionPositionPair({ originX: "start", originY: "bottom" }, { overlayX: "start", overlayY: "top" }),
219
- new ConnectionPositionPair({ originX: "end", originY: "top" }, { overlayX: "end", overlayY: "bottom" }),
220
- ])
218
+ .withPositions(this.genPositionPairs())
221
219
  .withPush(true);
222
220
  const config = new OverlayConfig({
223
221
  hasBackdrop: true,
@@ -251,6 +249,17 @@ class TzDatepickerDirective {
251
249
  this.overlayRef.detach();
252
250
  this.overlayRef.dispose();
253
251
  }
252
+ genPositionPairs() {
253
+ return [
254
+ new ConnectionPositionPair({ originX: this.positionX, originY: this.positionY }, { overlayX: this.positionX, overlayY: this.positionY === "bottom" ? "top" : "bottom" }, this.offsetX, this.offsetY),
255
+ new ConnectionPositionPair({ originX: "center", originY: "bottom" }, { overlayX: "center", overlayY: "top" }),
256
+ new ConnectionPositionPair({ originX: "center", originY: "top" }, { overlayX: "center", overlayY: "bottom" }),
257
+ new ConnectionPositionPair({ originX: "start", originY: "bottom" }, { overlayX: "start", overlayY: "top" }),
258
+ new ConnectionPositionPair({ originX: "start", originY: "top" }, { overlayX: "start", overlayY: "bottom" }),
259
+ new ConnectionPositionPair({ originX: "end", originY: "bottom" }, { overlayX: "end", overlayY: "top" }),
260
+ new ConnectionPositionPair({ originX: "end", originY: "top" }, { overlayX: "end", overlayY: "bottom" }),
261
+ ];
262
+ }
254
263
  }
255
264
  TzDatepickerDirective.decorators = [
256
265
  { type: Directive, args: [{
@@ -270,6 +279,8 @@ TzDatepickerDirective.propDecorators = {
270
279
  dateMessages: [{ type: Input }],
271
280
  positionX: [{ type: Input }],
272
281
  positionY: [{ type: Input }],
282
+ offsetX: [{ type: Input }],
283
+ offsetY: [{ type: Input }],
273
284
  dateChange: [{ type: Output }],
274
285
  toggleDatePicker: [{ type: HostListener, args: ["click",] }]
275
286
  };
@@ -1 +1 @@
1
- {"version":3,"file":"mis-crystal-design-system-datepicker_v2.js","sources":["../../../projects/mis-components/datepicker_v2/datepicker-constants.ts","../../../projects/mis-components/datepicker_v2/utils/index.ts","../../../projects/mis-components/datepicker_v2/tz-dp-container/tz-dp-container.component.ts","../../../projects/mis-components/datepicker_v2/tz-datepicker.directive.ts","../../../projects/mis-components/datepicker_v2/datepicker.module.ts","../../../projects/mis-components/datepicker_v2/mis-crystal-design-system-datepicker_v2.ts"],"sourcesContent":["/** @format */\n\nimport { InjectionToken } from \"@angular/core\";\n\nexport const CONTAINER_DATA = new InjectionToken<{}>('CONTAINER_DATA');\nexport const DATE_FORMAT = \"DD-MM-YYYY\";","import { ICurrentMonth } from \"../models/dp-config.model\";\n\nexport const getMonth = (index: number): ICurrentMonth => {\n let month;\n switch (index) {\n case 0:\n month = 'January'\n break;\n case 1:\n month = 'February'\n break;\n case 2:\n month = 'March'\n break;\n case 3:\n month = 'April'\n break;\n case 4:\n month = 'May'\n break;\n case 5:\n month = 'June'\n break;\n case 6:\n month = 'July'\n break;\n case 7:\n month = 'August'\n break;\n case 8:\n month = 'September'\n break;\n case 9:\n month = 'October'\n break;\n case 10:\n month = 'November'\n break;\n case 11:\n month = 'December'\n break;\n default:\n break;\n }\n return month;\n}","import { Component, Inject, OnInit } from \"@angular/core\";\nimport { CONTAINER_DATA, DATE_FORMAT } from \"../datepicker-constants\";\nimport { ICurrentMonth, ICurrentMonthDates, IDatePickerData, IWeekDay } from \"../models/dp-config.model\";\nimport { parseZone, Moment } from 'moment-timezone';\nimport { getMonth } from \"../utils\";\nimport { ToastService } from 'mis-crystal-design-system/toast'\n\n@Component({\n selector: \"mis-tz-dp\",\n templateUrl: \"./tz-dp-container.component.html\",\n styleUrls: [\"./tz-dp-container.component.scss\"],\n})\nexport class TzDpContainerComponent implements OnInit {\n data: IDatePickerData;\n private parseZoneInstance = (...args) => {\n return parseZone(...args);\n };\n private rawWeekDays: string[] = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']\n weekDays: IWeekDay[] = [];\n currentMonthNumber: number = this.parseZoneInstance().month();\n currentMonth: ICurrentMonth = getMonth(this.currentMonthNumber);\n currentYearNumber: number = this.parseZoneInstance().year();\n currentMonthDates: ICurrentMonthDates[] = [];\n isPreviousMonthDisabled: boolean = false;\n isNextMonthDisabled: boolean = false;\n\n constructor(@Inject(CONTAINER_DATA) data: IDatePickerData, private toast: ToastService) {\n this.data = data;\n if (this.data?.dpConfig?.timezone) {\n this.parseZoneInstance = (...args) => {\n return parseZone(...args).tz(this.data.dpConfig.timezone);\n }\n }\n this.weekDays = this.rawWeekDays.map((day, index) => ({\n label: `${day[0]}${day.slice(1).toLowerCase()}`,\n isCurrentDay: this.parseZoneInstance().day() === index,\n }));\n if (!this.data?.dpConfig?.format) {\n this.data.dpConfig = {\n ...this.data.dpConfig,\n format: DATE_FORMAT,\n };\n }\n }\n\n ngOnInit(): void {\n this.currentDateInstance();\n this.calculateMinMaxDays();\n }\n\n private currentDateInstance(): void {\n const selectedDate = this.parseZoneInstance(this.data.date, this.data.dpConfig.format);\n if (selectedDate.isValid()) {\n this.currentYearNumber = selectedDate.year();\n this.currentMonthNumber = selectedDate.month();\n this.currentMonth = getMonth(this.currentMonthNumber);\n }\n this.currentMonthDates = this.generateDates(this.currentMonthNumber, this.currentYearNumber);\n }\n\n private calculateMinMaxDays() {\n const currentInstance = this.parseZoneInstance().year(this.currentYearNumber).month(this.currentMonthNumber);\n const minDate = this.parseZoneInstance(this.data.dpConfig.minDate, this.data.dpConfig.format);\n if (minDate.isValid()) {\n this.isPreviousMonthDisabled = minDate.isSameOrAfter(currentInstance, 'month');\n }\n const maxDate = this.parseZoneInstance(this.data.dpConfig.maxDate, this.data.dpConfig.format);\n if (maxDate.isValid()) {\n this.isNextMonthDisabled = maxDate.isSameOrBefore(currentInstance, 'month');\n }\n }\n\n navigateMonth(direction: \"NEXT\" | \"PREVIOUS\"): void {\n let thisMonth: Moment = this.parseZoneInstance().year(this.currentYearNumber).month(this.currentMonthNumber);\n if (direction === \"NEXT\") {\n thisMonth = thisMonth.add(1, 'month');\n } else if (direction === \"PREVIOUS\") {\n thisMonth = thisMonth.subtract(1, 'month');\n }\n this.currentMonthNumber = thisMonth.month();\n this.currentMonth = getMonth(this.currentMonthNumber);\n this.currentYearNumber = thisMonth.year();\n this.currentMonthDates = this.generateDates(this.currentMonthNumber, this.currentYearNumber);\n this.calculateMinMaxDays();\n }\n\n private generateDates(month: number, currentYearNumber: number): ICurrentMonthDates[] {\n let dates: ICurrentMonthDates[] = [];\n const thisMonth = this.parseZoneInstance().year(currentYearNumber).month(month);\n for (let startDate = 1; startDate <= thisMonth.endOf('month').date(); startDate++) {\n let isDisabledDay = this.data.datesDisabled.some(d => d === thisMonth.date(startDate).format(this.data.dpConfig.format));\n const minDate = this.parseZoneInstance(this.data.dpConfig.minDate, this.data.dpConfig.format);\n if (!isDisabledDay && minDate.isValid()) {\n isDisabledDay = minDate.isAfter(thisMonth.date(startDate), 'day');\n }\n const maxDate = this.parseZoneInstance(this.data.dpConfig.maxDate, this.data.dpConfig.format);\n if (!isDisabledDay && maxDate.isValid()) {\n isDisabledDay = maxDate.isBefore(thisMonth.date(startDate), 'day');\n }\n dates.push({\n date: startDate,\n weekDay: thisMonth.date(startDate).day(),\n isCurrentDay: thisMonth.date(startDate).isSame(this.parseZoneInstance(), 'day'),\n isSelectedDay: thisMonth.date(startDate).isSame(this.parseZoneInstance(this.data.date, this.data.dpConfig.format), 'day'),\n toastMessage: this.data.messages.find(q => thisMonth.date(startDate).isSame(this.parseZoneInstance(q.date, this.data.dpConfig.format), 'day'))?.message || '',\n isDisabledDay,\n });\n }\n for (let i = dates[0].weekDay; i > 0; i--) {\n dates.unshift({ date: 0, weekDay: i - 1 });\n }\n return dates;\n }\n\n selectDay(day: ICurrentMonthDates) {\n if (day.date <= 0) return;\n if (!day.isDisabledDay) {\n this.data.dateChange(this.parseZoneInstance().year(this.currentYearNumber).month(this.currentMonthNumber).date(day.date).format(this.data.dpConfig.format));\n }\n if (day.toastMessage) {\n this.toast.displayMsg(day.toastMessage, 4000);\n }\n }\n\n}\n","import { ConnectionPositionPair, Overlay, OverlayConfig, OverlayRef } from \"@angular/cdk/overlay\";\nimport { ComponentPortal } from \"@angular/cdk/portal\";\nimport { Directive, ElementRef, EventEmitter, HostListener, Injector, Input, Optional, Output, Self, ViewContainerRef } from \"@angular/core\";\nimport { NgControl } from \"@angular/forms\";\nimport { take } from \"rxjs/operators\";\nimport { CONTAINER_DATA, DATE_FORMAT } from \"./datepicker-constants\";\nimport { IDatePickerConfig, IDatePickerToastText } from \"./models/dp-config.model\";\nimport { TzDpContainerComponent } from './tz-dp-container/tz-dp-container.component';\n\n@Directive({\n selector: \"input[misTzDp]\",\n})\nexport class TzDatepickerDirective {\n @Input() dpConfig: Partial<IDatePickerConfig> = {\n format: DATE_FORMAT,\n minDate: \"\",\n maxDate: \"\"\n };\n // dd-mm-yyyy 01-12-2022\n @Input() set selectedDate(date: string) {\n this.date = date;\n }\n @Input() set datesDisabled(dates: string[]) {\n this.dpDisabledDates = dates;\n }\n @Input() dateMessages: IDatePickerToastText[] = [];\n @Input() positionX: \"start\" | \"end\" = \"start\";\n @Input() positionY: \"top\" | \"bottom\" = \"bottom\";\n private overlayRef: OverlayRef;\n @Output() dateChange = new EventEmitter<string>(true);\n private isOpen = false;\n date: string;\n\n private dpDisabledDates: string[] = [];\n\n constructor(@Self() @Optional() private control: NgControl, private element: ElementRef, private overlay: Overlay, private viewContainerRef: ViewContainerRef) { }\n\n @HostListener(\"click\")\n toggleDatePicker() {\n if (this.isOpen) {\n this.close();\n } else {\n this.open();\n }\n }\n\n private open() {\n this.isOpen = true;\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 ),\n new ConnectionPositionPair(\n { originX: \"start\", originY: \"bottom\" },\n { overlayX: \"start\", overlayY: \"top\" },\n ),\n new ConnectionPositionPair(\n { originX: \"end\", originY: \"top\" },\n { overlayX: \"end\", overlayY: \"bottom\" },\n ),\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 const tempRef = new ComponentPortal(TzDpContainerComponent, this.viewContainerRef, Injector.create({\n providers: [\n { provide: CONTAINER_DATA, useValue: { messages: this.dateMessages, date: this.control?.control.value || this.date, dpConfig: this.dpConfig, datesDisabled: this.dpDisabledDates, dateChange: this.applyDate.bind(this) } },\n ]\n }));\n this.overlayRef.attach(tempRef);\n this.overlayRef\n .backdropClick()\n .pipe(take(1))\n .subscribe(() => {\n this.close();\n });\n }\n\n applyDate(date: string) {\n this.dateChange.emit(date);\n this.control?.control.patchValue(date);\n this.date = date;\n this.close();\n }\n\n private close() {\n this.isOpen = false;\n this.overlayRef.detach();\n this.overlayRef.dispose();\n }\n}\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { TzDpContainerComponent } from \"./tz-dp-container/tz-dp-container.component\";\nimport { TzDatepickerDirective } from \"./tz-datepicker.directive\";\nimport { ToastModule } from 'mis-crystal-design-system/toast';\n@NgModule({\n declarations: [TzDpContainerComponent, TzDatepickerDirective],\n imports: [CommonModule, ToastModule.forRoot()],\n exports: [TzDpContainerComponent, TzDatepickerDirective],\n entryComponents: [TzDpContainerComponent]\n})\nexport class DatepickerModuleV2 {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {CONTAINER_DATA as ɵc} from './datepicker-constants';\nexport {IDatePickerData as ɵa} from './models/dp-config.model';\nexport {TzDpContainerComponent as ɵb} from './tz-dp-container/tz-dp-container.component';"],"names":[],"mappings":";;;;;;;;;AAAA;MAIa,cAAc,GAAG,IAAI,cAAc,CAAK,gBAAgB,EAAE;AAChE,MAAM,WAAW,GAAG,YAAY;;ACHhC,MAAM,QAAQ,GAAG,CAAC,KAAa;IAClC,IAAI,KAAK,CAAC;IACV,QAAQ,KAAK;QACT,KAAK,CAAC;YACF,KAAK,GAAG,SAAS,CAAA;YACjB,MAAM;QACV,KAAK,CAAC;YACF,KAAK,GAAG,UAAU,CAAA;YAClB,MAAM;QACV,KAAK,CAAC;YACF,KAAK,GAAG,OAAO,CAAA;YACf,MAAM;QACV,KAAK,CAAC;YACF,KAAK,GAAG,OAAO,CAAA;YACf,MAAM;QACV,KAAK,CAAC;YACF,KAAK,GAAG,KAAK,CAAA;YACb,MAA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C;QACzB,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC;KAC3B;;;YAzFF,SAAS,SAAC;gBACT,QAAQ,EAAE,gBAAgB;aAC3B;;;YARQ,SAAS,uBAgCH,IAAI,YAAI,QAAQ;YAjCX,UAAU;YAFG,OAAO;YAE6D,gBAAgB;;;uBAWlH,KAAK;2BAML,KAAK;4BAGL,KAAK;2BAGL,KAAK;wBACL,KAAK;wBACL,KAAK;yBAEL,MAAM;+BAQN,YAAY,SAAC,OAAO;;;MC1BV,kBAAkB;;;YAN9B,QAAQ,SAAC;gBACR,YAAY,EAAE,CAAC,sBAAsB,EAAE,qBAAqB,CAAC;gBAC7D,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,CAAC,OAAO,EAAE,CAAC;gBAC9C,OAAO,EAAE,CAAC,sBAAsB,EAAE,qBAAqB,CAAC;gBACxD,eAAe,EAAE,CAAC,sBAAsB,CAAC;aAC1C;;;ACVD;;;;;;"}
1
+ {"version":3,"file":"mis-crystal-design-system-datepicker_v2.js","sources":["../../../projects/mis-components/datepicker_v2/datepicker-constants.ts","../../../projects/mis-components/datepicker_v2/utils/index.ts","../../../projects/mis-components/datepicker_v2/tz-dp-container/tz-dp-container.component.ts","../../../projects/mis-components/datepicker_v2/tz-datepicker.directive.ts","../../../projects/mis-components/datepicker_v2/datepicker.module.ts","../../../projects/mis-components/datepicker_v2/mis-crystal-design-system-datepicker_v2.ts"],"sourcesContent":["/** @format */\n\nimport { InjectionToken } from \"@angular/core\";\n\nexport const CONTAINER_DATA = new InjectionToken<{}>('CONTAINER_DATA');\nexport const DATE_FORMAT = \"DD-MM-YYYY\";","import { ICurrentMonth } from \"../models/dp-config.model\";\n\nexport const getMonth = (index: number): ICurrentMonth => {\n let month;\n switch (index) {\n case 0:\n month = 'January'\n break;\n case 1:\n month = 'February'\n break;\n case 2:\n month = 'March'\n break;\n case 3:\n month = 'April'\n break;\n case 4:\n month = 'May'\n break;\n case 5:\n month = 'June'\n break;\n case 6:\n month = 'July'\n break;\n case 7:\n month = 'August'\n break;\n case 8:\n month = 'September'\n break;\n case 9:\n month = 'October'\n break;\n case 10:\n month = 'November'\n break;\n case 11:\n month = 'December'\n break;\n default:\n break;\n }\n return month;\n}","import { Component, Inject, OnInit } from \"@angular/core\";\nimport { CONTAINER_DATA, DATE_FORMAT } from \"../datepicker-constants\";\nimport { ICurrentMonth, ICurrentMonthDates, IDatePickerData, IWeekDay } from \"../models/dp-config.model\";\nimport { parseZone, Moment } from 'moment-timezone';\nimport { getMonth } from \"../utils\";\nimport { ToastService } from 'mis-crystal-design-system/toast'\n\n@Component({\n selector: \"mis-tz-dp\",\n templateUrl: \"./tz-dp-container.component.html\",\n styleUrls: [\"./tz-dp-container.component.scss\"],\n})\nexport class TzDpContainerComponent implements OnInit {\n data: IDatePickerData;\n private parseZoneInstance = (...args) => {\n return parseZone(...args);\n };\n private rawWeekDays: string[] = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']\n weekDays: IWeekDay[] = [];\n currentMonthNumber: number;\n currentMonth: ICurrentMonth;\n currentYearNumber: number;\n currentMonthDates: ICurrentMonthDates[] = [];\n isPreviousMonthDisabled: boolean = false;\n isNextMonthDisabled: boolean = false;\n\n constructor(@Inject(CONTAINER_DATA) data: IDatePickerData, private toast: ToastService) {\n this.data = data;\n if (this.data?.dpConfig?.timezone) {\n this.parseZoneInstance = (...args) => {\n return parseZone(...args).tz(this.data.dpConfig.timezone);\n }\n }\n this.currentMonthNumber = this.parseZoneInstance().month();\n this.currentMonth = getMonth(this.currentMonthNumber);\n this.currentYearNumber = this.parseZoneInstance().year();\n this.weekDays = this.rawWeekDays.map((day, index) => ({\n label: `${day[0]}${day.slice(1).toLowerCase()}`,\n isCurrentDay: this.parseZoneInstance().day() === index,\n }));\n if (!this.data?.dpConfig?.format) {\n this.data.dpConfig = {\n ...this.data.dpConfig,\n format: DATE_FORMAT,\n };\n }\n }\n\n ngOnInit(): void {\n this.currentDateInstance();\n this.calculateMinMaxDays();\n }\n\n private currentDateInstance(): void {\n const selectedDate = parseZone(this.data.date, this.data.dpConfig.format);\n if (selectedDate.isValid()) {\n this.currentYearNumber = selectedDate.year();\n this.currentMonthNumber = selectedDate.month();\n this.currentMonth = getMonth(this.currentMonthNumber);\n }\n this.currentMonthDates = this.generateDates(this.currentMonthNumber, this.currentYearNumber);\n }\n\n private calculateMinMaxDays() {\n const currentInstance = this.parseZoneInstance().year(this.currentYearNumber).month(this.currentMonthNumber);\n const minDate = this.parseZoneInstance(this.data.dpConfig.minDate, this.data.dpConfig.format);\n if (minDate.isValid()) {\n this.isPreviousMonthDisabled = minDate.isSameOrAfter(currentInstance, 'month');\n }\n const maxDate = this.parseZoneInstance(this.data.dpConfig.maxDate, this.data.dpConfig.format);\n if (maxDate.isValid()) {\n this.isNextMonthDisabled = maxDate.isSameOrBefore(currentInstance, 'month');\n }\n }\n\n navigateMonth(direction: \"NEXT\" | \"PREVIOUS\"): void {\n let thisMonth: Moment = parseZone().year(this.currentYearNumber).month(this.currentMonthNumber);\n if (direction === \"NEXT\") {\n thisMonth = thisMonth.add(1, 'month');\n } else if (direction === \"PREVIOUS\") {\n thisMonth = thisMonth.subtract(1, 'month');\n }\n this.currentMonthNumber = thisMonth.month();\n this.currentMonth = getMonth(this.currentMonthNumber);\n this.currentYearNumber = thisMonth.year();\n this.currentMonthDates = this.generateDates(this.currentMonthNumber, this.currentYearNumber);\n this.calculateMinMaxDays();\n }\n\n private generateDates(month: number, currentYearNumber: number): ICurrentMonthDates[] {\n let dates: ICurrentMonthDates[] = [];\n const thisMonth = parseZone().year(currentYearNumber).month(month);\n for (let startDate = 1; startDate <= thisMonth.endOf('month').date(); startDate++) {\n let isDisabledDay = this.data.datesDisabled.some(d => d === thisMonth.date(startDate).format(this.data.dpConfig.format));\n const minDate = parseZone(this.data.dpConfig.minDate, this.data.dpConfig.format);\n if (!isDisabledDay && minDate.isValid()) {\n isDisabledDay = minDate.isAfter(thisMonth.date(startDate), 'day');\n }\n const maxDate = parseZone(this.data.dpConfig.maxDate, this.data.dpConfig.format);\n if (!isDisabledDay && maxDate.isValid()) {\n isDisabledDay = maxDate.isBefore(thisMonth.date(startDate), 'day');\n }\n dates.push({\n date: startDate,\n weekDay: thisMonth.date(startDate).day(),\n isCurrentDay: this.parseZoneInstance().year(currentYearNumber).month(month).date(startDate).date(startDate).isSame(parseZone(), 'day'),\n isSelectedDay: thisMonth.date(startDate).isSame(parseZone(this.data.date, this.data.dpConfig.format), 'day'),\n toastMessage: this.data.messages.find(q => thisMonth.date(startDate).isSame(parseZone(q.date, this.data.dpConfig.format), 'day'))?.message || '',\n isDisabledDay,\n });\n }\n for (let i = dates[0].weekDay; i > 0; i--) {\n dates.unshift({ date: 0, weekDay: i - 1 });\n }\n return dates;\n }\n\n selectDay(day: ICurrentMonthDates) {\n if (day.date <= 0) return;\n if (!day.isDisabledDay) {\n this.data.dateChange(parseZone().year(this.currentYearNumber).month(this.currentMonthNumber).date(day.date).format(this.data.dpConfig.format));\n }\n if (day.toastMessage) {\n this.toast.displayMsg(day.toastMessage, 4000);\n }\n }\n\n}\n","import { ConnectionPositionPair, Overlay, OverlayConfig, OverlayRef, PositionStrategy } from \"@angular/cdk/overlay\";\nimport { ComponentPortal } from \"@angular/cdk/portal\";\nimport { Directive, ElementRef, EventEmitter, HostListener, Injector, Input, Optional, Output, Self, ViewContainerRef } from \"@angular/core\";\nimport { NgControl } from \"@angular/forms\";\nimport { take } from \"rxjs/operators\";\nimport { CONTAINER_DATA, DATE_FORMAT } from \"./datepicker-constants\";\nimport { IDatePickerConfig, IDatePickerToastText } from \"./models/dp-config.model\";\nimport { TzDpContainerComponent } from './tz-dp-container/tz-dp-container.component';\n\n@Directive({\n selector: \"input[misTzDp]\",\n})\nexport class TzDatepickerDirective {\n @Input() dpConfig: Partial<IDatePickerConfig> = {\n format: DATE_FORMAT,\n minDate: \"\",\n maxDate: \"\"\n };\n // dd-mm-yyyy 01-12-2022\n @Input() set selectedDate(date: string) {\n this.date = date;\n }\n @Input() set datesDisabled(dates: string[]) {\n this.dpDisabledDates = dates;\n }\n @Input() dateMessages: IDatePickerToastText[] = [];\n @Input() positionX: \"start\" | \"center\" | \"end\" = \"center\";\n @Input() positionY: \"top\" | \"center\" | \"bottom\" = \"bottom\";\n @Input() offsetX:number = 0;\n @Input() offsetY:number = 0;\n private overlayRef: OverlayRef;\n @Output() dateChange = new EventEmitter<string>(true);\n private isOpen = false;\n date: string;\n\n private dpDisabledDates: string[] = [];\n\n constructor(@Self() @Optional() private control: NgControl, private element: ElementRef, private overlay: Overlay, private viewContainerRef: ViewContainerRef) { }\n\n @HostListener(\"click\")\n toggleDatePicker() {\n if (this.isOpen) {\n this.close();\n } else {\n this.open();\n }\n }\n\n private open() {\n this.isOpen = true;\n const positionStrategy = this.overlay\n .position()\n .flexibleConnectedTo(this.element)\n .withPositions(this.genPositionPairs())\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 const tempRef = new ComponentPortal(TzDpContainerComponent, this.viewContainerRef, Injector.create({\n providers: [\n { provide: CONTAINER_DATA, useValue: { messages: this.dateMessages, date: this.control?.control.value || this.date, dpConfig: this.dpConfig, datesDisabled: this.dpDisabledDates, dateChange: this.applyDate.bind(this) } },\n ]\n }));\n this.overlayRef.attach(tempRef);\n this.overlayRef\n .backdropClick()\n .pipe(take(1))\n .subscribe(() => {\n this.close();\n });\n }\n\n applyDate(date: string) {\n this.dateChange.emit(date);\n this.control?.control.patchValue(date);\n this.date = date;\n this.close();\n }\n\n private close() {\n this.isOpen = false;\n this.overlayRef.detach();\n this.overlayRef.dispose();\n }\n\n private genPositionPairs():ConnectionPositionPair[] {\n return [\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: \"center\", originY: \"bottom\" }, { overlayX: \"center\", overlayY: \"top\" }),\n new ConnectionPositionPair({ originX: \"center\", originY: \"top\" }, { overlayX: \"center\", overlayY: \"bottom\" }),\n new ConnectionPositionPair({ originX: \"start\", originY: \"bottom\" }, { overlayX: \"start\", overlayY: \"top\" }),\n new ConnectionPositionPair({ originX: \"start\", originY: \"top\" }, { overlayX: \"start\", overlayY: \"bottom\" }),\n new ConnectionPositionPair({ originX: \"end\", originY: \"bottom\" }, { overlayX: \"end\", overlayY: \"top\" }),\n new ConnectionPositionPair({ originX: \"end\", originY: \"top\" }, { overlayX: \"end\", overlayY: \"bottom\" }),\n ];\n }\n}\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { TzDpContainerComponent } from \"./tz-dp-container/tz-dp-container.component\";\nimport { TzDatepickerDirective } from \"./tz-datepicker.directive\";\nimport { ToastModule } from 'mis-crystal-design-system/toast';\n@NgModule({\n declarations: [TzDpContainerComponent, TzDatepickerDirective],\n imports: [CommonModule, ToastModule.forRoot()],\n exports: [TzDpContainerComponent, TzDatepickerDirective],\n entryComponents: [TzDpContainerComponent]\n})\nexport class DatepickerModuleV2 {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {CONTAINER_DATA as ɵc} from './datepicker-constants';\nexport {IDatePickerData as ɵa} from './models/dp-config.model';\nexport {TzDpContainerComponent as ɵb} from './tz-dp-container/tz-dp-container.component';"],"names":[],"mappings":";;;;;;;;;AAAA;MAIa,cAAc,GAAG,IAAI,cAAc,CAAK,gBAAgB,EAAE;AAChE,MAAM,WAAW,GAAG,YAAY;;ACHhC,MAAM,QAAQ,GAAG,CAAC,KAAa;IAClC,IAAI,KAAK,CAAC;IACV,QAAQ,KAAK;QACT,KAAK,CAAC;YACF,KAAK,GAAG,SAAS,CAAA;YACjB,MAAM;QACV,KAAK,CAAC;YACF,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AGL,KAAK;2BAGL,KAAK;wBACL,KAAK;wBACL,KAAK;sBACL,KAAK;sBACL,KAAK;yBAEL,MAAM;+BAQN,YAAY,SAAC,OAAO;;;MC5BV,kBAAkB;;;YAN9B,QAAQ,SAAC;gBACR,YAAY,EAAE,CAAC,sBAAsB,EAAE,qBAAqB,CAAC;gBAC7D,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,CAAC,OAAO,EAAE,CAAC;gBAC9C,OAAO,EAAE,CAAC,sBAAsB,EAAE,qBAAqB,CAAC;gBACxD,eAAe,EAAE,CAAC,sBAAsB,CAAC;aAC1C;;;ACVD;;;;;;"}
@@ -66,7 +66,7 @@ DropdownComponent.decorators = [
66
66
  { type: Component, args: [{
67
67
  selector: 'mis-dropdown',
68
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",
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{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}"]
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
  ];
72
72
  DropdownComponent.ctorParameters = () => [
@@ -370,7 +370,7 @@ TableFilterComponent.decorators = [
370
370
  { type: Component, args: [{
371
371
  selector: 'mis-table-filter',
372
372
  template: "<div id=\"main-container\"\n #mainContainer\n [ngStyle]=\"containerStyles\"\n>\n <div id=\"search-bar-container\">\n <input (keyup)=\"updateSearchValue($event)\" type=\"text\" placeholder=\"Search\">\n <svg id=\"search-icon\" width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M1.21496 8.14563C1.21496 4.3179 4.33709 1.21165 8.19249 1.21165C12.0479 1.21165 15.17 4.3179 15.17 8.14563C15.17 9.69308 14.6598 11.1226 13.797 12.2767L12.3684 13.7013C11.2043 14.5668 9.75891 15.0796 8.19249 15.0796C4.33709 15.0796 1.21496 11.9734 1.21496 8.14563ZM12.9419 14.7835C11.602 15.7329 9.96259 16.2913 8.19249 16.2913C3.66965 16.2913 -0.00012207 12.6461 -0.00012207 8.14563C-0.00012207 3.64512 3.66965 0 8.19249 0C12.7153 0 16.3851 3.64512 16.3851 8.14563C16.3851 9.93713 15.8036 11.5931 14.8183 12.9375L16.836 14.4048C17.6704 14.912 18.7553 15.6543 17.2453 17.215C15.7352 18.7756 15.0098 17.6663 14.499 16.8364L12.9419 14.7835Z\" fill=\"#6A737D\"/>\n </svg>\n </div>\n <div id=\"filters-main-container\">\n <div class=\"filters-sub-container\">\n <div *ngFor=\"let filter of getCheckedFilters()\">\n <div class=\"filter\">\n <mis-checkbox\n [checked]=\"true\"\n [name]=\"filter.value\"\n (valueChange)=\"updateFilter($event)\"\n ></mis-checkbox>\n <span class=\"filter-text\">{{filter.name}}</span>\n </div>\n </div>\n </div>\n <div class=\"separator\" style=\"margin: 16px 0px;\" *ngIf=\"getCheckedFilters().length && (getCheckedFilters().length < filtersData.length)\"></div>\n <div class=\"filters-sub-container\">\n <div *ngFor=\"let filter of getFiltersBasedOnSearchValue()\">\n <div class=\"filter\" *ngIf=\"!filter.checked\">\n <mis-checkbox\n [checked]=\"false\"\n [name]=\"filter.value\"\n (valueChange)=\"updateFilter($event)\"\n ></mis-checkbox>\n <span class=\"filter-text\">{{filter.name}}</span>\n </div>\n </div>\n <div id=\"no-results-container\" *ngIf=\"getFiltersBasedOnSearchValue().length < 1\">\n <span class=\"filter-text\">No matches found</span>\n </div>\n </div>\n <div class=\"separator\" style=\"margin: 16px 0px;\"></div>\n <div id=\"buttons-container\">\n <button id=\"reset-btn\" style=\"margin-right: 8px;\" (click)=\"resetFilters()\">Reset</button>\n <button id=\"apply-btn\" (click)=\"applyFilters()\">Apply</button>\n </div>\n </div>\n</div>\n",
373
- styles: ["#main-container{position:absolute;background:#fff;z-index:2;right:calc(50% - 128px);width:256px;padding:16px;font-family:Lato,sans-serif;box-shadow:0 12px 24px rgba(0,0,0,.12),0 4px 8px rgba(0,0,0,.12);border-radius:8px}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-thumb{background:#9aa7b4}#search-bar-container{width:100%;position:relative;margin-bottom:8px}input{width:100%;padding:12px 12px 12px 42px;border:1px solid #000;border-radius:4px;height:48px;box-shadow:none;outline:none;font-style:normal;font-weight:400;font-size:15px;line-height:20px;letter-spacing:.1px;color:#181f33}input:focus{border:1px solid #0937b2}#search-icon{position:absolute;top:15px;left:12px}.filters-sub-container{max-height:144px;overflow-y:auto}.filter{height:36px;display:flex;justify-content:flex-start;align-items:center}.filter-text{font-size:14px;line-height:20px;padding-right:8px;letter-spacing:.2px;color:#181f33;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}#no-results-container{height:36px;display:flex;justify-content:center;align-items:center}.separator{border:1px solid #e0e0e0}#buttons-container{display:flex;justify-content:center;align-items:center}button{width:calc(50% - 4px);border:none;box-shadow:none;outline:none;font-size:16px;line-height:24px;text-align:center;letter-spacing:.2px;padding:10px 30px;background:none;border-radius:8px}#apply-btn{background:#0937b2;color:#fff}#reset-btn{background:#fff;color:#0937b2}"]
373
+ styles: ["#main-container{position:absolute;background:#fff;z-index:2;right:calc(50% - 128px);width:256px;padding:16px;font-family:Lato,sans-serif;box-shadow:0 12px 24px rgba(0,0,0,.12),0 4px 8px rgba(0,0,0,.12);border-radius:8px}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-thumb{background:#9aa7b4}#search-bar-container{width:100%;position:relative;margin-bottom:8px}input{width:100%;padding:12px 12px 12px 42px;border:1px solid #000;border-radius:4px;height:48px;box-shadow:none;outline:none;font-style:normal;font-weight:400;font-size:15px;line-height:20px;letter-spacing:.1px;color:#181f33}input:focus{border:1px solid #0937b2}#search-icon{position:absolute;top:15px;left:12px}.filters-sub-container{max-height:144px;overflow-y:auto}.filter{height:36px;display:flex;justify-content:flex-start;align-items:center}.filter-text{font-size:14px;line-height:20px;padding-left:8px;letter-spacing:.2px;color:#181f33;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}#no-results-container{height:36px;display:flex;justify-content:center;align-items:center}.separator{border:1px solid #e0e0e0}#buttons-container{display:flex;justify-content:center;align-items:center}button{width:calc(50% - 4px);border:none;box-shadow:none;outline:none;font-size:16px;line-height:24px;text-align:center;letter-spacing:.2px;padding:10px 30px;background:none;border-radius:8px}#apply-btn{background:#0937b2;color:#fff}#reset-btn{background:#fff;color:#0937b2}"]
374
374
  },] }
375
375
  ];
376
376
  TableFilterComponent.ctorParameters = () => [];