mis-crystal-design-system 14.0.43 → 14.0.44-test
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/datepicker_v2/datepicker.module.d.ts +2 -1
- package/datepicker_v2/tz-datepicker.directive.d.ts +2 -0
- package/datepicker_v2/tz-dp-container/tz-dp-container.component.d.ts +2 -0
- package/daterangepicker_v2/daterangepicker.module.d.ts +2 -1
- package/daterangepicker_v2/tz-daterangepicker.directive.d.ts +2 -0
- package/daterangepicker_v2/tz-drp-container/tz-drp-container.component.d.ts +2 -0
- package/dropdown/dropdown.component.d.ts +1 -0
- package/dropdown/dropdown.module.d.ts +2 -1
- package/esm2020/datepicker_v2/datepicker.module.mjs +5 -4
- package/esm2020/datepicker_v2/tz-datepicker.directive.mjs +21 -2
- package/esm2020/datepicker_v2/tz-dp-container/tz-dp-container.component.mjs +55 -40
- package/esm2020/daterangepicker_v2/daterangepicker.module.mjs +5 -4
- package/esm2020/daterangepicker_v2/tz-daterangepicker.directive.mjs +21 -2
- package/esm2020/daterangepicker_v2/tz-drp-container/tz-drp-container.component.mjs +88 -67
- package/esm2020/dropdown/dropdown.component.mjs +52 -38
- package/esm2020/dropdown/dropdown.module.mjs +5 -4
- package/esm2020/mobile-filter/mobile-filter.component.mjs +18 -16
- package/esm2020/phone-input/phone-input.component.mjs +13 -82
- package/esm2020/table/table.component.mjs +2 -2
- package/fesm2015/mis-crystal-design-system-datepicker_v2.mjs +80 -43
- package/fesm2015/mis-crystal-design-system-datepicker_v2.mjs.map +1 -1
- package/fesm2015/mis-crystal-design-system-daterangepicker_v2.mjs +113 -70
- package/fesm2015/mis-crystal-design-system-daterangepicker_v2.mjs.map +1 -1
- package/fesm2015/mis-crystal-design-system-dropdown.mjs +57 -40
- package/fesm2015/mis-crystal-design-system-dropdown.mjs.map +1 -1
- package/fesm2015/mis-crystal-design-system-mobile-filter.mjs +17 -15
- package/fesm2015/mis-crystal-design-system-mobile-filter.mjs.map +1 -1
- package/fesm2015/mis-crystal-design-system-phone-input.mjs +10 -84
- package/fesm2015/mis-crystal-design-system-phone-input.mjs.map +1 -1
- package/fesm2015/mis-crystal-design-system-table.mjs +2 -2
- package/fesm2015/mis-crystal-design-system-table.mjs.map +1 -1
- package/fesm2020/mis-crystal-design-system-datepicker_v2.mjs +78 -43
- package/fesm2020/mis-crystal-design-system-datepicker_v2.mjs.map +1 -1
- package/fesm2020/mis-crystal-design-system-daterangepicker_v2.mjs +111 -70
- package/fesm2020/mis-crystal-design-system-daterangepicker_v2.mjs.map +1 -1
- package/fesm2020/mis-crystal-design-system-dropdown.mjs +55 -40
- package/fesm2020/mis-crystal-design-system-dropdown.mjs.map +1 -1
- package/fesm2020/mis-crystal-design-system-mobile-filter.mjs +17 -15
- package/fesm2020/mis-crystal-design-system-mobile-filter.mjs.map +1 -1
- package/fesm2020/mis-crystal-design-system-phone-input.mjs +10 -79
- package/fesm2020/mis-crystal-design-system-phone-input.mjs.map +1 -1
- package/fesm2020/mis-crystal-design-system-table.mjs +2 -2
- package/fesm2020/mis-crystal-design-system-table.mjs.map +1 -1
- package/package.json +1 -1
- package/phone-input/phone-input.component.d.ts +11 -25
|
@@ -31,7 +31,7 @@ function MobileFilterComponent_ng_container_7_Template(rf, ctx) {
|
|
|
31
31
|
const _r7 = i0.ɵɵgetCurrentView();
|
|
32
32
|
i0.ɵɵelementContainerStart(0);
|
|
33
33
|
i0.ɵɵelementStart(1, "div", 12);
|
|
34
|
-
i0.ɵɵlistener("click", function MobileFilterComponent_ng_container_7_Template_div_click_1_listener() { const restoredCtx = i0.ɵɵrestoreView(_r7); const filter_r2 = restoredCtx.$implicit; const ctx_r6 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r6.currentSelectedItem = filter_r2.key); });
|
|
34
|
+
i0.ɵɵlistener("click", function MobileFilterComponent_ng_container_7_Template_div_click_1_listener() { const restoredCtx = i0.ɵɵrestoreView(_r7); const filter_r2 = restoredCtx.$implicit; const ctx_r6 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r6.currentSelectedItem = filter_r2.key); })("keyup.enter", function MobileFilterComponent_ng_container_7_Template_div_keyup_enter_1_listener() { const restoredCtx = i0.ɵɵrestoreView(_r7); const filter_r2 = restoredCtx.$implicit; const ctx_r8 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r8.currentSelectedItem = filter_r2.key); });
|
|
35
35
|
i0.ɵɵelementStart(2, "span", 13);
|
|
36
36
|
i0.ɵɵtext(3);
|
|
37
37
|
i0.ɵɵelementEnd();
|
|
@@ -58,8 +58,9 @@ function MobileFilterComponent_ng_container_14_mis_checkbox_2_Template(rf, ctx)
|
|
|
58
58
|
i0.ɵɵelement(0, "mis-checkbox", 22);
|
|
59
59
|
}
|
|
60
60
|
if (rf & 2) {
|
|
61
|
-
const
|
|
62
|
-
i0.ɵɵproperty("checked",
|
|
61
|
+
const option_r9 = i0.ɵɵnextContext().$implicit;
|
|
62
|
+
i0.ɵɵproperty("checked", option_r9.selected);
|
|
63
|
+
i0.ɵɵattribute("aria-label", (option_r9.selected ? "Selected" : "Unselected") + " checkbox " + option_r9.label);
|
|
63
64
|
}
|
|
64
65
|
}
|
|
65
66
|
function MobileFilterComponent_ng_container_14_input_3_Template(rf, ctx) {
|
|
@@ -67,34 +68,35 @@ function MobileFilterComponent_ng_container_14_input_3_Template(rf, ctx) {
|
|
|
67
68
|
i0.ɵɵelement(0, "input", 23);
|
|
68
69
|
}
|
|
69
70
|
if (rf & 2) {
|
|
70
|
-
const
|
|
71
|
-
i0.ɵɵproperty("checked",
|
|
71
|
+
const option_r9 = i0.ɵɵnextContext().$implicit;
|
|
72
|
+
i0.ɵɵproperty("checked", option_r9.selected);
|
|
73
|
+
i0.ɵɵattribute("aria-label", (option_r9.selected ? "Selected" : "Unselected") + " radioButton " + option_r9.label);
|
|
72
74
|
}
|
|
73
75
|
}
|
|
74
76
|
function MobileFilterComponent_ng_container_14_Template(rf, ctx) {
|
|
75
77
|
if (rf & 1) {
|
|
76
|
-
const
|
|
78
|
+
const _r16 = i0.ɵɵgetCurrentView();
|
|
77
79
|
i0.ɵɵelementContainerStart(0);
|
|
78
80
|
i0.ɵɵelementStart(1, "div", 18);
|
|
79
|
-
i0.ɵɵlistener("click", function MobileFilterComponent_ng_container_14_Template_div_click_1_listener() { const restoredCtx = i0.ɵɵrestoreView(
|
|
80
|
-
i0.ɵɵtemplate(2, MobileFilterComponent_ng_container_14_mis_checkbox_2_Template, 1,
|
|
81
|
-
i0.ɵɵtemplate(3, MobileFilterComponent_ng_container_14_input_3_Template, 1,
|
|
81
|
+
i0.ɵɵlistener("click", function MobileFilterComponent_ng_container_14_Template_div_click_1_listener() { const restoredCtx = i0.ɵɵrestoreView(_r16); const option_r9 = restoredCtx.$implicit; const ctx_r15 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r15.toggleFilter(option_r9.value, option_r9.selected)); })("keyup.enter", function MobileFilterComponent_ng_container_14_Template_div_keyup_enter_1_listener() { const restoredCtx = i0.ɵɵrestoreView(_r16); const option_r9 = restoredCtx.$implicit; const ctx_r17 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r17.toggleFilter(option_r9.value, option_r9.selected)); });
|
|
82
|
+
i0.ɵɵtemplate(2, MobileFilterComponent_ng_container_14_mis_checkbox_2_Template, 1, 2, "mis-checkbox", 19);
|
|
83
|
+
i0.ɵɵtemplate(3, MobileFilterComponent_ng_container_14_input_3_Template, 1, 2, "input", 20);
|
|
82
84
|
i0.ɵɵelementStart(4, "span", 21);
|
|
83
85
|
i0.ɵɵtext(5);
|
|
84
86
|
i0.ɵɵelementEnd()();
|
|
85
87
|
i0.ɵɵelementContainerEnd();
|
|
86
88
|
}
|
|
87
89
|
if (rf & 2) {
|
|
88
|
-
const
|
|
90
|
+
const option_r9 = ctx.$implicit;
|
|
89
91
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
90
92
|
i0.ɵɵadvance(2);
|
|
91
93
|
i0.ɵɵproperty("ngIf", ctx_r1.localFilterOptions[ctx_r1.currentSelectedItem].multiSelect);
|
|
92
94
|
i0.ɵɵadvance(1);
|
|
93
95
|
i0.ɵɵproperty("ngIf", !ctx_r1.localFilterOptions[ctx_r1.currentSelectedItem].multiSelect);
|
|
94
96
|
i0.ɵɵadvance(1);
|
|
95
|
-
i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction1(4, _c0,
|
|
97
|
+
i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction1(4, _c0, option_r9.selected ? "#181F33" : "#6A737D"));
|
|
96
98
|
i0.ɵɵadvance(1);
|
|
97
|
-
i0.ɵɵtextInterpolate(
|
|
99
|
+
i0.ɵɵtextInterpolate(option_r9.label);
|
|
98
100
|
}
|
|
99
101
|
}
|
|
100
102
|
class MobileFilterComponent {
|
|
@@ -131,10 +133,10 @@ class MobileFilterComponent {
|
|
|
131
133
|
}
|
|
132
134
|
}
|
|
133
135
|
MobileFilterComponent.ɵfac = function MobileFilterComponent_Factory(t) { return new (t || MobileFilterComponent)(); };
|
|
134
|
-
MobileFilterComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MobileFilterComponent, selectors: [["mis-mobile-filter"]], inputs: { currentSelectedItem: "currentSelectedItem", filterOptions: "filterOptions", backIcon: "backIcon", headerName: "headerName", applyBtnName: "applyBtnName", clearBtnName: "clearBtnName" }, outputs: { closeFilters: "closeFilters", clearFilters: "clearFilters", applyFilters: "applyFilters" }, decls: 20, vars: 10, consts: [[1, "filters-container"], [1, "head", "display-flex"], ["alt", "", 3, "src", "click"], [1, "body", "display-flex"], [1, "filters"], [4, "ngFor", "ngForOf"], [1, "filter-options-container"], [1, "filter-options-title"], [1, "filter-options"], [1, "footer", "display-flex"], ["mis-button", "", "size", "md", "type", "text", 3, "click"], ["mis-button", "", "size", "md", "type", "primary", 3, "click"], [1, "filter", "display-flex", 3, "click"], [1, "filterName", 3, "ngStyle"], ["class", "selectedNumber", 4, "ngIf"], ["class", "highlightor", 4, "ngIf"], [1, "selectedNumber"], [1, "highlightor"], [1, "filter-option", "display-flex", 3, "click"], [3, "checked", 4, "ngIf"], ["type", "radio", 3, "checked", 4, "ngIf"], [3, "ngStyle"], [3, "checked"], ["type", "radio", 3, "checked"]], template: function MobileFilterComponent_Template(rf, ctx) {
|
|
136
|
+
MobileFilterComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MobileFilterComponent, selectors: [["mis-mobile-filter"]], inputs: { currentSelectedItem: "currentSelectedItem", filterOptions: "filterOptions", backIcon: "backIcon", headerName: "headerName", applyBtnName: "applyBtnName", clearBtnName: "clearBtnName" }, outputs: { closeFilters: "closeFilters", clearFilters: "clearFilters", applyFilters: "applyFilters" }, decls: 20, vars: 10, consts: [[1, "filters-container"], [1, "head", "display-flex"], ["tabindex", "0", "aria-label", "Close Filters Arrow", "alt", "", 3, "src", "click", "keyup.enter"], [1, "body", "display-flex"], [1, "filters"], [4, "ngFor", "ngForOf"], [1, "filter-options-container"], [1, "filter-options-title"], [1, "filter-options"], [1, "footer", "display-flex"], ["mis-button", "", "size", "md", "type", "text", 3, "click"], ["mis-button", "", "size", "md", "type", "primary", 3, "click"], ["tabindex", "0", 1, "filter", "display-flex", 3, "click", "keyup.enter"], [1, "filterName", 3, "ngStyle"], ["class", "selectedNumber", 4, "ngIf"], ["class", "highlightor", 4, "ngIf"], [1, "selectedNumber"], [1, "highlightor"], [1, "filter-option", "display-flex", 3, "click", "keyup.enter"], [3, "checked", 4, "ngIf"], ["type", "radio", 3, "checked", 4, "ngIf"], [3, "ngStyle"], [3, "checked"], ["type", "radio", 3, "checked"]], template: function MobileFilterComponent_Template(rf, ctx) {
|
|
135
137
|
if (rf & 1) {
|
|
136
138
|
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "img", 2);
|
|
137
|
-
i0.ɵɵlistener("click", function MobileFilterComponent_Template_img_click_2_listener() { return ctx.closeFilters.emit(); });
|
|
139
|
+
i0.ɵɵlistener("click", function MobileFilterComponent_Template_img_click_2_listener() { return ctx.closeFilters.emit(); })("keyup.enter", function MobileFilterComponent_Template_img_keyup_enter_2_listener() { return ctx.closeFilters.emit(); });
|
|
138
140
|
i0.ɵɵelementEnd();
|
|
139
141
|
i0.ɵɵelementStart(3, "span");
|
|
140
142
|
i0.ɵɵtext(4);
|
|
@@ -178,7 +180,7 @@ MobileFilterComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Mobil
|
|
|
178
180
|
(function () {
|
|
179
181
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MobileFilterComponent, [{
|
|
180
182
|
type: Component,
|
|
181
|
-
args: [{ selector: 'mis-mobile-filter', template: "<div class=\"filters-container\">\n <div class=\"head display-flex\">\n <img (click)=\"closeFilters.emit();\" [src]=\"backIcon\" alt=\"\">\n <span>{{headerName}}</span>\n </div>\n <div class=\"body display-flex\">\n <div class=\"filters\">\n <ng-container *ngFor=\"let filter of localFilterOptions | keyvalue : originalOrder\">\n <div class=\"filter display-flex\" (click)=\"currentSelectedItem = filter.key\">\n <span class=\"filterName\" [ngStyle]=\"{'color': filter.key === currentSelectedItem ? '#0937B2' : '#181F33'}\">{{ localFilterOptions[filter.key]?.name }}</span>\n <span class=\"selectedNumber\" *ngIf=\"localFilterOptions[filter.key]['multiSelect'] && localFilterOptions[filter.key]['noOfSelectedItems'] > 0\">{{ localFilterOptions[filter.key]['noOfSelectedItems'] }}</span>\n <div class=\"highlightor\" *ngIf=\"filter.key === currentSelectedItem\"></div>\n </div>\n </ng-container>\n </div>\n <div class=\"filter-options-container\">\n <div class=\"filter-options-title\">\n <span>{{ localFilterOptions[currentSelectedItem]?.name }}</span>\n </div>\n <div class=\"filter-options\">\n <ng-container *ngFor=\"let option of localFilterOptions[currentSelectedItem]?.options; let i = index\">\n <div class=\"filter-option display-flex\"
|
|
183
|
+
args: [{ selector: 'mis-mobile-filter', template: "<div class=\"filters-container\">\n <div class=\"head display-flex\">\n <img \n tabindex=\"0\"\n (click)=\"closeFilters.emit();\"\n (keyup.enter)=\"closeFilters.emit();\" \n aria-label=\"Close Filters Arrow\"\n [src]=\"backIcon\" alt=\"\">\n <span>{{headerName}}</span>\n </div>\n <div class=\"body display-flex\">\n <div class=\"filters\">\n <ng-container *ngFor=\"let filter of localFilterOptions | keyvalue : originalOrder\">\n <div class=\"filter display-flex\" \n tabindex=\"0\"\n (click)=\"currentSelectedItem = filter.key\"\n (keyup.enter)=\"currentSelectedItem = filter.key\"\n >\n <span class=\"filterName\" [ngStyle]=\"{'color': filter.key === currentSelectedItem ? '#0937B2' : '#181F33'}\">{{ localFilterOptions[filter.key]?.name }}</span>\n <span class=\"selectedNumber\" *ngIf=\"localFilterOptions[filter.key]['multiSelect'] && localFilterOptions[filter.key]['noOfSelectedItems'] > 0\">{{ localFilterOptions[filter.key]['noOfSelectedItems'] }}</span>\n <div class=\"highlightor\" *ngIf=\"filter.key === currentSelectedItem\"></div>\n </div>\n </ng-container>\n </div>\n <div class=\"filter-options-container\">\n <div class=\"filter-options-title\">\n <span>{{ localFilterOptions[currentSelectedItem]?.name }}</span>\n </div>\n <div class=\"filter-options\">\n <ng-container *ngFor=\"let option of localFilterOptions[currentSelectedItem]?.options; let i = index\">\n <div class=\"filter-option display-flex\"\n (click)=\"toggleFilter(option.value, option.selected)\" \n (keyup.enter)=\"toggleFilter(option.value, option.selected)\"\n >\n <mis-checkbox [attr.aria-label]=\"(option.selected ? 'Selected' : 'Unselected') + ' checkbox ' + option.label\" *ngIf=\"localFilterOptions[currentSelectedItem].multiSelect\" [checked]=\"option.selected\"></mis-checkbox>\n <input type=\"radio\" [attr.aria-label]=\"(option.selected ? 'Selected' : 'Unselected') + ' radioButton ' + option.label\" *ngIf=\"!localFilterOptions[currentSelectedItem].multiSelect\" [checked]=\"option.selected\">\n <span [ngStyle]=\"{'color': option.selected ? '#181F33' : '#6A737D'}\">{{ option.label }}</span>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n <div class=\"footer display-flex\">\n <button\n mis-button\n size=\"md\"\n type=\"text\"\n (click)=\"clearFilters.emit()\">\n {{clearBtnName}}\n </button>\n <button\n mis-button\n size=\"md\"\n type=\"primary\"\n (click)=\"applyFilters.emit(localFilterOptions)\"\n >\n {{applyBtnName}}\n </button>\n </div>\n</div>\n", styles: [".display-flex{display:flex}.filters-container{position:absolute;inset:0;background-color:#fff;cursor:default}.filters-container *{font-family:Lato}.filters-container .head{height:56px;border-bottom:1px solid #E0E0E0;justify-content:flex-start;align-items:center;padding:0 16px;gap:12px}.filters-container .head img{cursor:pointer}.filters-container .head span{font-weight:700;font-size:17px;line-height:24px;letter-spacing:.2px}.filters-container .body{height:calc(100vh - 129px)}.filters-container .body .filters{width:120px;border-right:1px solid #E0E0E0;flex-shrink:0}.filters-container .body .filters .filter{height:56px;padding:0 16px;border-bottom:1px solid #E0E0E0;align-items:center;font-size:15px;justify-content:space-between;position:relative}.filters-container .body .filters .filter .filterName{color:#6a737d;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.filters-container .body .filters .filter .selectedNumber{background-color:#f5f5f5;height:24px;width:auto;font-size:14px;min-width:24px;border-radius:50%;text-align:center;line-height:24px;padding:0 8px}.filters-container .body .filters .filter .highlightor{position:absolute;left:0;height:100%;width:4px;background-color:#0937b2}.filters-container .body .filter-options-container{padding:16px 16px 0 12px;width:calc(100% - 56px);overflow-x:hidden}.filters-container .body .filter-options-container *{color:#181f33}.filters-container .body .filter-options-container .filter-options-title{text-transform:uppercase;font-size:12px;line-height:16px;letter-spacing:.25px}.filters-container .body .filter-options-container .filter-options-title span{color:#6a737d}.filters-container .body .filter-options-container .filter-options{margin-top:16px;overflow-y:scroll;height:calc(100% - 32px)}.filters-container .body .filter-options-container .filter-options .filter-option{height:48px;border-bottom:1px solid #E0E0E0;align-items:center;padding-left:16px;gap:13px;font-size:15px}.filters-container .body .filter-options-container .filter-options .filter-option span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.filters-container .body .filter-options-container .filter-options .filter-option input[type=radio]{accent-color:#0937B2;width:20px;height:20px}.filters-container .footer{height:73px;border-top:1px solid #E0E0E0;padding:0 16px;align-items:center;justify-content:space-between}.filters-container .footer button{width:160px}\n"] }]
|
|
182
184
|
}], function () { return []; }, { currentSelectedItem: [{
|
|
183
185
|
type: Input
|
|
184
186
|
}], filterOptions: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mis-crystal-design-system-mobile-filter.mjs","sources":["../../../projects/mis-components/mobile-filter/mobile-filter.component.html","../../../projects/mis-components/mobile-filter/mobile-filter.component.ts","../../../projects/mis-components/mobile-filter/mobile-filter.module.ts","../../../projects/mis-components/mobile-filter/mis-crystal-design-system-mobile-filter.ts"],"sourcesContent":["<div class=\"filters-container\">\n <div class=\"head display-flex\">\n <img (click)=\"closeFilters.emit();\" [src]=\"backIcon\" alt=\"\">\n <span>{{headerName}}</span>\n </div>\n <div class=\"body display-flex\">\n <div class=\"filters\">\n <ng-container *ngFor=\"let filter of localFilterOptions | keyvalue : originalOrder\">\n <div class=\"filter display-flex\" (click)=\"currentSelectedItem = filter.key\">\n <span class=\"filterName\" [ngStyle]=\"{'color': filter.key === currentSelectedItem ? '#0937B2' : '#181F33'}\">{{ localFilterOptions[filter.key]?.name }}</span>\n <span class=\"selectedNumber\" *ngIf=\"localFilterOptions[filter.key]['multiSelect'] && localFilterOptions[filter.key]['noOfSelectedItems'] > 0\">{{ localFilterOptions[filter.key]['noOfSelectedItems'] }}</span>\n <div class=\"highlightor\" *ngIf=\"filter.key === currentSelectedItem\"></div>\n </div>\n </ng-container>\n </div>\n <div class=\"filter-options-container\">\n <div class=\"filter-options-title\">\n <span>{{ localFilterOptions[currentSelectedItem]?.name }}</span>\n </div>\n <div class=\"filter-options\">\n <ng-container *ngFor=\"let option of localFilterOptions[currentSelectedItem]?.options; let i = index\">\n <div class=\"filter-option display-flex\" (click)=\"toggleFilter(option.value, option.selected)\" >\n <mis-checkbox *ngIf=\"localFilterOptions[currentSelectedItem].multiSelect\" [checked]=\"option.selected\"></mis-checkbox>\n <input type=\"radio\" *ngIf=\"!localFilterOptions[currentSelectedItem].multiSelect\" [checked]=\"option.selected\">\n <span [ngStyle]=\"{'color': option.selected ? '#181F33' : '#6A737D'}\">{{ option.label }}</span>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n <div class=\"footer display-flex\">\n <button\n mis-button\n size=\"md\"\n type=\"text\"\n (click)=\"clearFilters.emit()\">\n {{clearBtnName}}\n </button>\n <button\n mis-button\n size=\"md\"\n type=\"primary\"\n (click)=\"applyFilters.emit(localFilterOptions)\"\n >\n {{applyBtnName}}\n </button>\n </div>\n</div>\n","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\n\n@Component({\n selector: 'mis-mobile-filter',\n templateUrl: './mobile-filter.component.html',\n styleUrls: ['./mobile-filter.component.scss']\n})\nexport class MobileFilterComponent implements OnInit {\n\n localFilterOptions: IFilterOptions;\n @Input() currentSelectedItem: string = 'Sort';\n\n @Input() set filterOptions(options) {\n this.localFilterOptions = options;\n };\n\n @Input() backIcon: string = '';\n\n @Input() headerName: string = 'Filters';\n @Input() applyBtnName: string = 'Apply';\n @Input() clearBtnName: string = 'Clear Filters';\n\n @Output() closeFilters = new EventEmitter();\n @Output() clearFilters = new EventEmitter();\n @Output() applyFilters = new EventEmitter<IFilterOptions>();\n\n constructor() { }\n\n ngOnInit(): void {\n }\n\n originalOrder() { // used in template for keyvalue pipe sorting\n return 0;\n }\n\n toggleFilter(data, isSelectedItem) {\n const isMultiSelect = this.localFilterOptions[this.currentSelectedItem].multiSelect;\n this.localFilterOptions[this.currentSelectedItem].noOfSelectedItems = 0;\n this.localFilterOptions[this.currentSelectedItem].options = this.localFilterOptions[this.currentSelectedItem].options.map(option => {\n const isSelectedValue = option.value === data;\n (isMultiSelect && option.selected) && (this.localFilterOptions[this.currentSelectedItem].noOfSelectedItems +=1);\n return {\n ...option,\n selected: isSelectedValue ? (isMultiSelect ? !option.selected : true) : (isMultiSelect ? option.selected : false)\n }\n });\n\n // changing number of selected items for multiselect filters\n const noOfSelectedItems = this.localFilterOptions[this.currentSelectedItem].noOfSelectedItems;\n isMultiSelect ? this.localFilterOptions[this.currentSelectedItem].noOfSelectedItems = isSelectedItem ? noOfSelectedItems - 1 : noOfSelectedItems + 1 : null;\n \n }\n}\n\nexport interface IFilterOptions {\n [filterName: string]: {\n name: string;\n options: {label: string, value: string, selected: boolean, capacities?: number[], amenities?: string[]}[], // capacities & amenities are for floor\n multiSelect: boolean,\n noOfSelectedItems?: number\n }\n}\n","import { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\nimport { MobileFilterComponent } from \"./mobile-filter.component\";\nimport { ButtonModule } from \"mis-crystal-design-system/button\";\nimport { CheckboxModule } from \"mis-crystal-design-system/checkbox\";\n\n@NgModule({\n declarations: [MobileFilterComponent],\n imports: [CommonModule, ButtonModule, CheckboxModule],\n exports: [MobileFilterComponent]\n})\nexport class MobileFilterModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;QAUoB,EAA8I,CAAA,cAAA,CAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,CAAA;AAAA,QAAA,EAAyD,CAAA,MAAA,CAAA,CAAA,CAAA,CAAA;QAAA,EAAO,CAAA,YAAA,EAAA,CAAA;;;;;AAAhE,QAAA,EAAyD,CAAA,SAAA,CAAA,CAAA,CAAA,CAAA;AAAzD,QAAA,EAAyD,CAAA,iBAAA,CAAA,MAAA,CAAA,kBAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,mBAAA,CAAA,CAAA,CAAA;;;;;QACvM,EAA0E,CAAA,SAAA,CAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,CAAA;;;;;;;AAJlF,QAAA,EAAmF,CAAA,uBAAA,CAAA,CAAA,CAAA,CAAA;QAC/E,EAA4E,CAAA,cAAA,CAAA,CAAA,EAAA,K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AA,EAAA,CAAA;oEAAlB,kBAAkB,EAAA,CAAA,CAAA;wEAHnB,YAAY,EAAE,YAAY,EAAE,cAAc,CAAA,EAAA,CAAA,CAAA;;4EAGzC,kBAAkB,EAAA,CAAA;kBAL9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,qBAAqB,CAAC;AACrC,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,EAAE,cAAc,CAAC;oBACrD,OAAO,EAAE,CAAC,qBAAqB,CAAC;iBACjC,CAAA;;;wFACY,kBAAkB,EAAA,EAAA,YAAA,EAAA,CAJd,qBAAqB,CAC1B,EAAA,OAAA,EAAA,CAAA,YAAY,EAAE,YAAY,EAAE,cAAc,CAAA,EAAA,OAAA,EAAA,CAC1C,qBAAqB,CAAA,EAAA,CAAA,CAAA,EAAA,GAAA;;ACTjC;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"mis-crystal-design-system-mobile-filter.mjs","sources":["../../../projects/mis-components/mobile-filter/mobile-filter.component.html","../../../projects/mis-components/mobile-filter/mobile-filter.component.ts","../../../projects/mis-components/mobile-filter/mobile-filter.module.ts","../../../projects/mis-components/mobile-filter/mis-crystal-design-system-mobile-filter.ts"],"sourcesContent":["<div class=\"filters-container\">\n <div class=\"head display-flex\">\n <img \n tabindex=\"0\"\n (click)=\"closeFilters.emit();\"\n (keyup.enter)=\"closeFilters.emit();\" \n aria-label=\"Close Filters Arrow\"\n [src]=\"backIcon\" alt=\"\">\n <span>{{headerName}}</span>\n </div>\n <div class=\"body display-flex\">\n <div class=\"filters\">\n <ng-container *ngFor=\"let filter of localFilterOptions | keyvalue : originalOrder\">\n <div class=\"filter display-flex\" \n tabindex=\"0\"\n (click)=\"currentSelectedItem = filter.key\"\n (keyup.enter)=\"currentSelectedItem = filter.key\"\n >\n <span class=\"filterName\" [ngStyle]=\"{'color': filter.key === currentSelectedItem ? '#0937B2' : '#181F33'}\">{{ localFilterOptions[filter.key]?.name }}</span>\n <span class=\"selectedNumber\" *ngIf=\"localFilterOptions[filter.key]['multiSelect'] && localFilterOptions[filter.key]['noOfSelectedItems'] > 0\">{{ localFilterOptions[filter.key]['noOfSelectedItems'] }}</span>\n <div class=\"highlightor\" *ngIf=\"filter.key === currentSelectedItem\"></div>\n </div>\n </ng-container>\n </div>\n <div class=\"filter-options-container\">\n <div class=\"filter-options-title\">\n <span>{{ localFilterOptions[currentSelectedItem]?.name }}</span>\n </div>\n <div class=\"filter-options\">\n <ng-container *ngFor=\"let option of localFilterOptions[currentSelectedItem]?.options; let i = index\">\n <div class=\"filter-option display-flex\"\n (click)=\"toggleFilter(option.value, option.selected)\" \n (keyup.enter)=\"toggleFilter(option.value, option.selected)\"\n >\n <mis-checkbox [attr.aria-label]=\"(option.selected ? 'Selected' : 'Unselected') + ' checkbox ' + option.label\" *ngIf=\"localFilterOptions[currentSelectedItem].multiSelect\" [checked]=\"option.selected\"></mis-checkbox>\n <input type=\"radio\" [attr.aria-label]=\"(option.selected ? 'Selected' : 'Unselected') + ' radioButton ' + option.label\" *ngIf=\"!localFilterOptions[currentSelectedItem].multiSelect\" [checked]=\"option.selected\">\n <span [ngStyle]=\"{'color': option.selected ? '#181F33' : '#6A737D'}\">{{ option.label }}</span>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n <div class=\"footer display-flex\">\n <button\n mis-button\n size=\"md\"\n type=\"text\"\n (click)=\"clearFilters.emit()\">\n {{clearBtnName}}\n </button>\n <button\n mis-button\n size=\"md\"\n type=\"primary\"\n (click)=\"applyFilters.emit(localFilterOptions)\"\n >\n {{applyBtnName}}\n </button>\n </div>\n</div>\n","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\n\n@Component({\n selector: 'mis-mobile-filter',\n templateUrl: './mobile-filter.component.html',\n styleUrls: ['./mobile-filter.component.scss']\n})\nexport class MobileFilterComponent implements OnInit {\n\n localFilterOptions: IFilterOptions;\n @Input() currentSelectedItem: string = 'Sort';\n\n @Input() set filterOptions(options) {\n this.localFilterOptions = options;\n };\n\n @Input() backIcon: string = '';\n\n @Input() headerName: string = 'Filters';\n @Input() applyBtnName: string = 'Apply';\n @Input() clearBtnName: string = 'Clear Filters';\n\n @Output() closeFilters = new EventEmitter();\n @Output() clearFilters = new EventEmitter();\n @Output() applyFilters = new EventEmitter<IFilterOptions>();\n\n constructor() { }\n\n ngOnInit(): void {\n }\n\n originalOrder() { // used in template for keyvalue pipe sorting\n return 0;\n }\n\n toggleFilter(data, isSelectedItem) {\n const isMultiSelect = this.localFilterOptions[this.currentSelectedItem].multiSelect;\n this.localFilterOptions[this.currentSelectedItem].noOfSelectedItems = 0;\n this.localFilterOptions[this.currentSelectedItem].options = this.localFilterOptions[this.currentSelectedItem].options.map(option => {\n const isSelectedValue = option.value === data;\n (isMultiSelect && option.selected) && (this.localFilterOptions[this.currentSelectedItem].noOfSelectedItems +=1);\n return {\n ...option,\n selected: isSelectedValue ? (isMultiSelect ? !option.selected : true) : (isMultiSelect ? option.selected : false)\n }\n });\n\n // changing number of selected items for multiselect filters\n const noOfSelectedItems = this.localFilterOptions[this.currentSelectedItem].noOfSelectedItems;\n isMultiSelect ? this.localFilterOptions[this.currentSelectedItem].noOfSelectedItems = isSelectedItem ? noOfSelectedItems - 1 : noOfSelectedItems + 1 : null;\n \n }\n}\n\nexport interface IFilterOptions {\n [filterName: string]: {\n name: string;\n options: {label: string, value: string, selected: boolean, capacities?: number[], amenities?: string[]}[], // capacities & amenities are for floor\n multiSelect: boolean,\n noOfSelectedItems?: number\n }\n}\n","import { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\nimport { MobileFilterComponent } from \"./mobile-filter.component\";\nimport { ButtonModule } from \"mis-crystal-design-system/button\";\nimport { CheckboxModule } from \"mis-crystal-design-system/checkbox\";\n\n@NgModule({\n declarations: [MobileFilterComponent],\n imports: [CommonModule, ButtonModule, CheckboxModule],\n exports: [MobileFilterComponent]\n})\nexport class MobileFilterModule {\n}\n","/**\n *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AlB,KAAK;gBACG,YAAY,EAAA,CAAA;sBAApB,KAAK;gBACG,YAAY,EAAA,CAAA;sBAApB,KAAK;gBAEI,YAAY,EAAA,CAAA;sBAArB,MAAM;gBACG,YAAY,EAAA,CAAA;sBAArB,MAAM;gBACG,YAAY,EAAA,CAAA;sBAArB,MAAM;;;;MCbI,kBAAkB,CAAA;;oFAAlB,kBAAkB,GAAA,CAAA,EAAA,CAAA;oEAAlB,kBAAkB,EAAA,CAAA,CAAA;wEAHnB,YAAY,EAAE,YAAY,EAAE,cAAc,CAAA,EAAA,CAAA,CAAA;;4EAGzC,kBAAkB,EAAA,CAAA;kBAL9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,qBAAqB,CAAC;AACrC,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,EAAE,cAAc,CAAC;oBACrD,OAAO,EAAE,CAAC,qBAAqB,CAAC;iBACjC,CAAA;;;wFACY,kBAAkB,EAAA,EAAA,YAAA,EAAA,CAJd,qBAAqB,CAC1B,EAAA,OAAA,EAAA,CAAA,YAAY,EAAE,YAAY,EAAE,cAAc,CAAA,EAAA,OAAA,EAAA,CAC1C,qBAAqB,CAAA,EAAA,CAAA,CAAA,EAAA,GAAA;;ACTjC;;AAEG;;;;"}
|
|
@@ -2,8 +2,6 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { EventEmitter, Component, Input, Output, NgModule } from '@angular/core';
|
|
3
3
|
import * as i2 from '@angular/forms';
|
|
4
4
|
import { FormControl, ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
5
|
-
import { PhoneNumberUtil } from 'google-libphonenumber';
|
|
6
|
-
import { getCountries, getCountryCallingCode } from 'libphonenumber-js';
|
|
7
5
|
import * as i1 from '@angular/common';
|
|
8
6
|
import { CommonModule } from '@angular/common';
|
|
9
7
|
import * as i3 from 'mis-crystal-design-system/dropdown';
|
|
@@ -14,96 +12,30 @@ import { ScrollingModule } from '@angular/cdk-experimental/scrolling';
|
|
|
14
12
|
const _c0 = function (a0) { return { "height": a0 }; };
|
|
15
13
|
class PhoneInputComponent {
|
|
16
14
|
constructor() {
|
|
17
|
-
this.dropdownHeight = '';
|
|
18
|
-
this.dropdownWidth = '';
|
|
19
15
|
this.dropdownData = [];
|
|
20
|
-
this.dropdownSelectedItem = { value:
|
|
16
|
+
this.dropdownSelectedItem = { value: "", label: "" };
|
|
21
17
|
this.inputPlaceholder = 'Enter';
|
|
22
18
|
this.inputFormControl = new FormControl();
|
|
23
19
|
this.onDropdownSelection = new EventEmitter();
|
|
24
|
-
this.
|
|
25
|
-
this.
|
|
26
|
-
this.
|
|
27
|
-
this.searchEnabled = true;
|
|
28
|
-
this.inputType = 'number';
|
|
29
|
-
this.searchLabel = 'Search Keyword';
|
|
30
|
-
this.defaultCountry = 'IN';
|
|
31
|
-
this.phoneValidator = true;
|
|
32
|
-
this.countryCodes = [{ label: '', value: '', countryCode: '' }];
|
|
33
|
-
this.selectedCountryName = '';
|
|
34
|
-
this.validationMessage = '';
|
|
35
|
-
this.phoneUtil = PhoneNumberUtil.getInstance();
|
|
20
|
+
this.searchEnabled = false;
|
|
21
|
+
this.inputType = "number";
|
|
22
|
+
this.searchLabel = "Search Keyword";
|
|
36
23
|
}
|
|
37
24
|
ngOnInit() {
|
|
38
|
-
var _a, _b;
|
|
39
|
-
if (this.phoneValidator) {
|
|
40
|
-
this.loadCountryCodes();
|
|
41
|
-
this.dropdownData = this.countryCodes;
|
|
42
|
-
const countryCodeToSelect = this.defaultCountry;
|
|
43
|
-
const def = this.countryCodes.find(item => item.countryCode === countryCodeToSelect);
|
|
44
|
-
if (def) {
|
|
45
|
-
this.dropdownSelectedItem = def;
|
|
46
|
-
this.selectedCountryName = def.label;
|
|
47
|
-
}
|
|
48
|
-
this.validatePhoneNumber((_a = this.inputFormControl) === null || _a === void 0 ? void 0 : _a.value, (_b = this.dropdownSelectedItem) === null || _b === void 0 ? void 0 : _b.countryCode);
|
|
49
|
-
}
|
|
50
|
-
this.inputFormControl.valueChanges.subscribe((value) => {
|
|
51
|
-
var _a;
|
|
52
|
-
this.validatePhoneNumber(value, (_a = this.dropdownSelectedItem) === null || _a === void 0 ? void 0 : _a.countryCode);
|
|
53
|
-
});
|
|
54
25
|
}
|
|
55
26
|
handleDropdownSelection(item) {
|
|
56
|
-
|
|
57
|
-
this.dropdownSelectedItem = item;
|
|
58
|
-
this.onDropdownSelection.emit(item.countryCode);
|
|
59
|
-
this.selectedCountryName = item.label;
|
|
60
|
-
this.validatePhoneNumber((_a = this.inputFormControl) === null || _a === void 0 ? void 0 : _a.value, (_b = this.dropdownSelectedItem) === null || _b === void 0 ? void 0 : _b.countryCode);
|
|
61
|
-
this.inputFormControl.patchValue({ countryCode: item.countryCode }, { emitEvent: false });
|
|
62
|
-
}
|
|
63
|
-
loadCountryCodes() {
|
|
64
|
-
const countries = getCountries();
|
|
65
|
-
this.countryCodes = countries.map((countryCode) => ({
|
|
66
|
-
value: getCountryCallingCode(countryCode).toString(),
|
|
67
|
-
label: `${countryCode} (+${getCountryCallingCode(countryCode)})`,
|
|
68
|
-
countryCode: countryCode,
|
|
69
|
-
}));
|
|
70
|
-
}
|
|
71
|
-
validatePhoneNumber(value, countryCode) {
|
|
72
|
-
var _a, _b;
|
|
73
|
-
const phoneNumber = (value === null || value === void 0 ? void 0 : value.phoneNumber) || value;
|
|
74
|
-
if (phoneNumber && countryCode) {
|
|
75
|
-
try {
|
|
76
|
-
const number = this.phoneUtil.parseAndKeepRawInput(phoneNumber, countryCode);
|
|
77
|
-
const isValid = this.phoneUtil.isValidNumberForRegion(number, countryCode);
|
|
78
|
-
if (isValid) {
|
|
79
|
-
this.validationMessage = null;
|
|
80
|
-
this.onInvalidPhoneNumber.emit('');
|
|
81
|
-
}
|
|
82
|
-
else {
|
|
83
|
-
this.validationMessage = `Phone number invalid for country code: +${(_a = this.dropdownSelectedItem) === null || _a === void 0 ? void 0 : _a.value}(${(_b = this.dropdownSelectedItem) === null || _b === void 0 ? void 0 : _b.countryCode})`;
|
|
84
|
-
this.onInvalidPhoneNumber.emit(this.validationMessage);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
catch (error) {
|
|
88
|
-
this.validationMessage = 'Invalid input';
|
|
89
|
-
this.onInvalidPhoneNumber.emit(this.validationMessage);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
onBlur() {
|
|
94
|
-
var _a, _b;
|
|
95
|
-
this.validatePhoneNumber((_a = this.inputFormControl) === null || _a === void 0 ? void 0 : _a.value, (_b = this.dropdownSelectedItem) === null || _b === void 0 ? void 0 : _b.countryCode);
|
|
27
|
+
this.onDropdownSelection.emit(item);
|
|
96
28
|
}
|
|
97
29
|
}
|
|
98
30
|
PhoneInputComponent.ɵfac = function PhoneInputComponent_Factory(t) { return new (t || PhoneInputComponent)(); };
|
|
99
|
-
PhoneInputComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PhoneInputComponent, selectors: [["mis-phone-input"]], inputs: { dropdownHeight: "dropdownHeight", dropdownWidth: "dropdownWidth", inputHeight: "inputHeight", dropdownData: "dropdownData", dropdownSelectedItem: "dropdownSelectedItem", label: "label", inputPlaceholder: "inputPlaceholder", inputFormControl: "inputFormControl", dropdownListWidth: "dropdownListWidth", dropdownListHeight: "dropdownListHeight", searchEnabled: "searchEnabled", inputType: "inputType", searchLabel: "searchLabel"
|
|
31
|
+
PhoneInputComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PhoneInputComponent, selectors: [["mis-phone-input"]], inputs: { dropdownHeight: "dropdownHeight", dropdownWidth: "dropdownWidth", inputHeight: "inputHeight", dropdownData: "dropdownData", dropdownSelectedItem: "dropdownSelectedItem", label: "label", inputPlaceholder: "inputPlaceholder", inputFormControl: "inputFormControl", dropdownListWidth: "dropdownListWidth", dropdownListHeight: "dropdownListHeight", searchEnabled: "searchEnabled", inputType: "inputType", searchLabel: "searchLabel" }, outputs: { onDropdownSelection: "onDropdownSelection" }, decls: 5, vars: 16, consts: [[1, "main-container-phone"], [3, "height", "dropdownListWidth", "dropdownListHeight", "width", "data", "selectedItem", "label", "searchEnabled", "multiLine", "searchLabel", "onChange"], [1, "details-field"], [1, "input-box"], [1, "black-text", 3, "ngStyle", "placeholder", "formControl", "type"]], template: function PhoneInputComponent_Template(rf, ctx) {
|
|
100
32
|
if (rf & 1) {
|
|
101
33
|
i0.ɵɵelementStart(0, "div", 0)(1, "mis-dropdown", 1);
|
|
102
34
|
i0.ɵɵlistener("onChange", function PhoneInputComponent_Template_mis_dropdown_onChange_1_listener($event) { return ctx.handleDropdownSelection($event); });
|
|
103
35
|
i0.ɵɵelementEnd();
|
|
104
|
-
i0.ɵɵelementStart(2, "div", 2)(3, "div", 3)
|
|
105
|
-
i0.ɵɵ
|
|
106
|
-
i0.ɵɵelementEnd()()()
|
|
36
|
+
i0.ɵɵelementStart(2, "div", 2)(3, "div", 3);
|
|
37
|
+
i0.ɵɵelement(4, "input", 4);
|
|
38
|
+
i0.ɵɵelementEnd()()();
|
|
107
39
|
}
|
|
108
40
|
if (rf & 2) {
|
|
109
41
|
i0.ɵɵadvance(1);
|
|
@@ -115,7 +47,7 @@ PhoneInputComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PhoneIn
|
|
|
115
47
|
(function () {
|
|
116
48
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PhoneInputComponent, [{
|
|
117
49
|
type: Component,
|
|
118
|
-
args: [{ selector: "mis-phone-input", template: "<div class=\"main-container-phone\">\n <mis-dropdown
|
|
50
|
+
args: [{ selector: "mis-phone-input", template: "<div class=\"main-container-phone\">\n <mis-dropdown [height]=\"dropdownHeight\" [dropdownListWidth]=\"dropdownListWidth\"[dropdownListHeight]=\"dropdownListHeight\" [width]=\"dropdownWidth\" [data]=\"dropdownData\" [selectedItem]=\"dropdownSelectedItem\" [label]=\"label\" [searchEnabled]=\"searchEnabled\" [multiLine]=\"false\" (onChange)=\"handleDropdownSelection($event)\" [searchLabel]=\"searchLabel\"></mis-dropdown>\n <div class=\"details-field\">\n <div class=\"input-box\">\n <input\n [ngStyle]=\"{'height': inputHeight }\"\n class=\"black-text\"\n [placeholder]=\"inputPlaceholder\"\n [formControl]=\"inputFormControl\" \n [type]=\"inputType\"\n />\n </div>\n </div>\n</div>\n", styles: [".main-container-phone{display:flex;border:1px solid #E0E0E0;border-radius:6px}.details-field label{display:inline-block;min-width:224px;margin-right:24px}.details-field .input-box{width:100%}.details-field .input-box input{width:100%;height:32px}input{padding:10px 16px;border:none;outline:none;color:#181f33;line-height:24px;font-size:16px;width:100%;height:auto;border-radius:6px}.black-text{color:#181f33;font-size:16px;line-height:24px}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.main-container-phone ::ng-deep .item{padding:8px!important}.main-container-phone ::ng-deep .dropdown{border:unset!important}\n"] }]
|
|
119
51
|
}], function () { return []; }, { dropdownHeight: [{
|
|
120
52
|
type: Input
|
|
121
53
|
}], dropdownWidth: [{
|
|
@@ -134,8 +66,6 @@ PhoneInputComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PhoneIn
|
|
|
134
66
|
type: Input
|
|
135
67
|
}], onDropdownSelection: [{
|
|
136
68
|
type: Output
|
|
137
|
-
}], onInvalidPhoneNumber: [{
|
|
138
|
-
type: Output
|
|
139
69
|
}], dropdownListWidth: [{
|
|
140
70
|
type: Input
|
|
141
71
|
}], dropdownListHeight: [{
|
|
@@ -146,10 +76,6 @@ PhoneInputComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PhoneIn
|
|
|
146
76
|
type: Input
|
|
147
77
|
}], searchLabel: [{
|
|
148
78
|
type: Input
|
|
149
|
-
}], defaultCountry: [{
|
|
150
|
-
type: Input
|
|
151
|
-
}], phoneValidator: [{
|
|
152
|
-
type: Input
|
|
153
79
|
}] });
|
|
154
80
|
})();
|
|
155
81
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mis-crystal-design-system-phone-input.mjs","sources":["../../../projects/mis-components/phone-input/phone-input.component.ts","../../../projects/mis-components/phone-input/phone-input.component.html","../../../projects/mis-components/phone-input/phone-input.module.ts","../../../projects/mis-components/phone-input/mis-crystal-design-system-phone-input.ts"],"sourcesContent":["import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport { PhoneNumberUtil } from 'google-libphonenumber';\nimport { getCountries, getCountryCallingCode, CountryCode } from 'libphonenumber-js';\nimport { DropdownItem } from 'mis-crystal-design-system/dropdown';\n\ninterface CustomDropdownItem extends DropdownItem {\n countryCode: string;\n}\n\n@Component({\n selector: \"mis-phone-input\",\n templateUrl: \"./phone-input.component.html\",\n styleUrls: [\"./phone-input.component.scss\"]\n})\nexport class PhoneInputComponent implements OnInit {\n @Input() dropdownHeight?: string = '';\n @Input() dropdownWidth?: string = '';\n @Input() inputHeight?;\n @Input() dropdownData: CustomDropdownItem[] = [];\n @Input() dropdownSelectedItem: CustomDropdownItem = { value: '', label: '', countryCode: '' };\n @Input() label: string;\n @Input() inputPlaceholder: string = 'Enter';\n @Input() inputFormControl: FormControl = new FormControl();\n @Output() onDropdownSelection = new EventEmitter<string>();\n @Output() onInvalidPhoneNumber = new EventEmitter<string>();\n @Input() dropdownListWidth = '';\n @Input() dropdownListHeight = '';\n @Input() searchEnabled: boolean = true;\n @Input() inputType: string = 'number';\n @Input() searchLabel: string = 'Search Keyword';\n @Input() defaultCountry: string = 'IN';\n @Input() phoneValidator? = true;\n\n countryCodes: CustomDropdownItem[] = [{ label: '', value: '', countryCode: '' }];\n selectedCountryName: string = '';\n validationMessage: string = '';\n private phoneUtil: PhoneNumberUtil;\n\n constructor() {\n this.phoneUtil = PhoneNumberUtil.getInstance();\n }\n\n ngOnInit() {\n if (this.phoneValidator) {\n this.loadCountryCodes();\n this.dropdownData = this.countryCodes;\n const countryCodeToSelect = this.defaultCountry;\n const def = this.countryCodes.find(item => item.countryCode === countryCodeToSelect);\n if (def) {\n this.dropdownSelectedItem = def;\n this.selectedCountryName = def.label;\n }\n this.validatePhoneNumber(this.inputFormControl?.value, this.dropdownSelectedItem?.countryCode);\n }\n\n this.inputFormControl.valueChanges.subscribe((value) => {\n this.validatePhoneNumber(value, this.dropdownSelectedItem?.countryCode);\n });\n }\n\n handleDropdownSelection(item: CustomDropdownItem) {\n this.dropdownSelectedItem = item;\n this.onDropdownSelection.emit(item.countryCode);\n this.selectedCountryName = item.label;\n this.validatePhoneNumber(this.inputFormControl?.value, this.dropdownSelectedItem?.countryCode);\n this.inputFormControl.patchValue({ countryCode: item.countryCode }, { emitEvent: false });\n }\n\n loadCountryCodes() {\n const countries = getCountries();\n this.countryCodes = countries.map((countryCode) => ({\n value: getCountryCallingCode(countryCode).toString(),\n label: `${countryCode} (+${getCountryCallingCode(countryCode)})`,\n countryCode: countryCode,\n }));\n }\n\n public validatePhoneNumber(value: any, countryCode: string) {\n const phoneNumber = value?.phoneNumber || value;\n if (phoneNumber && countryCode) {\n try {\n const number = this.phoneUtil.parseAndKeepRawInput(phoneNumber, countryCode);\n const isValid = this.phoneUtil.isValidNumberForRegion(number, countryCode);\n if (isValid) {\n this.validationMessage = null;\n this.onInvalidPhoneNumber.emit('');\n } else {\n this.validationMessage = `Phone number invalid for country code: +${this.dropdownSelectedItem?.value}(${this.dropdownSelectedItem?.countryCode})`;\n this.onInvalidPhoneNumber.emit(this.validationMessage);\n }\n } catch (error) {\n this.validationMessage = 'Invalid input';\n this.onInvalidPhoneNumber.emit(this.validationMessage);\n }\n }\n }\n\n onBlur() {\n this.validatePhoneNumber(this.inputFormControl?.value, this.dropdownSelectedItem?.countryCode);\n }\n}\n","<div class=\"main-container-phone\">\n <mis-dropdown \n [height]=\"dropdownHeight\" \n [dropdownListWidth]=\"dropdownListWidth\"\n [dropdownListHeight]=\"dropdownListHeight\" \n [width]=\"dropdownWidth\" \n [data]=\"dropdownData\"\n [selectedItem]=\"dropdownSelectedItem\" \n [label]=\"label\" \n [searchEnabled]=\"searchEnabled\" \n [multiLine]=\"false\"\n (onChange)=\"handleDropdownSelection($event)\" \n [searchLabel]=\"searchLabel\">\n </mis-dropdown>\n <div class=\"details-field\">\n <div class=\"input-box\">\n <input\n [ngStyle]=\"{'height': inputHeight }\"\n class=\"black-text\" \n [placeholder]=\"inputPlaceholder\"\n [formControl]=\"inputFormControl\" \n [type]=\"inputType\"\n (blur)=\"onBlur()\"\n />\n </div>\n </div>\n</div>\n","import { CommonModule } from \"@angular/common\";\nimport { FormsModule } from \"@angular/forms\";\nimport { NgModule, ModuleWithProviders } from \"@angular/core\";\nimport { PhoneInputComponent } from \"./phone-input.component\";\nimport { OverlayModule } from \"@angular/cdk/overlay\";\nimport { ScrollingModule } from \"@angular/cdk-experimental/scrolling\";\nimport { DropdownModule } from \"mis-crystal-design-system/dropdown\";\nimport { ReactiveFormsModule } from \"@angular/forms\";\n\n\n@NgModule({\n declarations: [PhoneInputComponent],\n imports: [CommonModule,ReactiveFormsModule, FormsModule, OverlayModule, ScrollingModule, DropdownModule],\n exports: [PhoneInputComponent]\n})\nexport class PhoneInputModule {\n static forRoot(): ModuleWithProviders<PhoneInputModule> {\n return { ngModule: PhoneInputModule, providers: [] };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MAea,mBAAmB,CAAA;AAwB9B,IAAA,WAAA,GAAA;AAvBS,QAAA,IAAc,CAAA,cAAA,GAAY,EAAE,CAAC;AAC7B,QAAA,IAAa,CAAA,aAAA,GAAY,EAAE,CAAC;AAE5B,QAAA,IAAY,CAAA,YAAA,GAAyB,EAAE,CAAC;AACxC,QAAA,IAAA,CAAA,oBAAoB,GAAuB,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC;AAErF,QAAA,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EAAA,GAAA;;ACb/B;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"mis-crystal-design-system-phone-input.mjs","sources":["../../../projects/mis-components/phone-input/phone-input.component.ts","../../../projects/mis-components/phone-input/phone-input.component.html","../../../projects/mis-components/phone-input/phone-input.module.ts","../../../projects/mis-components/phone-input/mis-crystal-design-system-phone-input.ts"],"sourcesContent":["import { Component, EventEmitter, Input, OnInit, Output } from \"@angular/core\";\nimport { FormControl } from \"@angular/forms\";\nimport { DropdownItem } from \"mis-crystal-design-system/dropdown\";\n\n@Component({\n selector: \"mis-phone-input\",\n templateUrl: \"./phone-input.component.html\",\n styleUrls: [\"./phone-input.component.scss\"]\n})\nexport class PhoneInputComponent implements OnInit {\n @Input() dropdownHeight?: string;\n @Input() dropdownWidth?: string;\n @Input() inputHeight?: string;\n @Input() dropdownData: DropdownItem[] = [];\n @Input() dropdownSelectedItem:DropdownItem = { value: \"\", label: \"\" } \n @Input() label: string;\n\n @Input() inputPlaceholder: string = 'Enter';\n @Input() inputFormControl: FormControl = new FormControl();\n\n @Output() onDropdownSelection = new EventEmitter<any>();\n @Input() dropdownListWidth;\n @Input() dropdownListHeight;\n @Input() searchEnabled:boolean=false;\n @Input() inputType: string = \"number\";\n @Input() searchLabel:string = \"Search Keyword\"\n \n constructor() {}\n ngOnInit() {\n }\n\n handleDropdownSelection(item: DropdownItem){\n this.onDropdownSelection.emit(item);\n }\n\n}\n","<div class=\"main-container-phone\">\n <mis-dropdown [height]=\"dropdownHeight\" [dropdownListWidth]=\"dropdownListWidth\"[dropdownListHeight]=\"dropdownListHeight\" [width]=\"dropdownWidth\" [data]=\"dropdownData\" [selectedItem]=\"dropdownSelectedItem\" [label]=\"label\" [searchEnabled]=\"searchEnabled\" [multiLine]=\"false\" (onChange)=\"handleDropdownSelection($event)\" [searchLabel]=\"searchLabel\"></mis-dropdown>\n <div class=\"details-field\">\n <div class=\"input-box\">\n <input\n [ngStyle]=\"{'height': inputHeight }\"\n class=\"black-text\"\n [placeholder]=\"inputPlaceholder\"\n [formControl]=\"inputFormControl\" \n [type]=\"inputType\"\n />\n </div>\n </div>\n</div>\n","import { CommonModule } from \"@angular/common\";\nimport { FormsModule } from \"@angular/forms\";\nimport { NgModule, ModuleWithProviders } from \"@angular/core\";\nimport { PhoneInputComponent } from \"./phone-input.component\";\nimport { OverlayModule } from \"@angular/cdk/overlay\";\nimport { ScrollingModule } from \"@angular/cdk-experimental/scrolling\";\nimport { DropdownModule } from \"mis-crystal-design-system/dropdown\";\nimport { ReactiveFormsModule } from \"@angular/forms\";\n\n\n@NgModule({\n declarations: [PhoneInputComponent],\n imports: [CommonModule,ReactiveFormsModule, FormsModule, OverlayModule, ScrollingModule, DropdownModule],\n exports: [PhoneInputComponent]\n})\nexport class PhoneInputModule {\n static forRoot(): ModuleWithProviders<PhoneInputModule> {\n return { ngModule: PhoneInputModule, providers: [] };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;MASa,mBAAmB,CAAA;AAkB9B,IAAA,WAAA,GAAA;AAdS,QAAA,IAAY,CAAA,YAAA,GAAmB,EAAE,CAAC;AAClC,QAAA,IAAoB,CAAA,oBAAA,GAAgB,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAA;AAG5D,QAAA,IAAgB,CAAA,gBAAA,GAAW,OAAO,CAAC;AACnC,QAAA,IAAA,CAAA,gBAAgB,GAAgB,IAAI,WAAW,EAAE,CAAC;AAEjD,QAAA,IAAA,CAAA,mBAAmB,GAAG,IAAI,YAAY,EAAO,CAAC;AAG/C,QAAA,IAAa,CAAA,aAAA,GAAS,KAAK,CAAC;AAC5B,QAAA,IAAS,CAAA,SAAA,GAAW,QAAQ,CAAC;AAC7B,QAAA,IAAW,CAAA,WAAA,GAAU,gBAAgB,CAAA;KAE9B;IAChB,QAAQ,GAAA;KACP;AAED,IAAA,uBAAuB,CAAC,IAAkB,EAAA;AACxC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AA,kBAAA,CAAA,gBAAgB,EAJZ,EAAA,YAAA,EAAA,CAAA,mBAAmB,CACxB,EAAA,OAAA,EAAA,CAAA,YAAY,EAAC,mBAAmB,EAAE,WAAW,EAAE,aAAa,EAAE,eAAe,EAAE,cAAc,aAC7F,mBAAmB,CAAA,EAAA,CAAA,CAAA,EAAA,GAAA;;ACb/B;;AAEG;;;;"}
|
|
@@ -953,11 +953,11 @@ TableComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TableCompone
|
|
|
953
953
|
i0.ɵɵadvance(1);
|
|
954
954
|
i0.ɵɵproperty("ngIf", (ctx.config == null ? null : ctx.config.paginationConfig) && (ctx.tableLength >= ctx.config.paginationConfig.rowsPerPage || (ctx.config.paginationConfig == null ? null : ctx.config.paginationConfig.selectedPage) !== 1));
|
|
955
955
|
}
|
|
956
|
-
}, dependencies: [i1.NgClass, i1.NgForOf, i1.NgIf, i1.NgStyle, SubTableComponent, TableFilterComponent, CustomTableCellDirective], styles: ["#main-container[_ngcontent-%COMP%]{font-family:Lato,sans-serif;position:relative}.no-scrollbar[_ngcontent-%COMP%]::-webkit-scrollbar{width:0}.scrollbar[_ngcontent-%COMP%]::-webkit-scrollbar{width:8px;height:8px;border-radius:15px}.scrollbar[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#9aa7b4;border-radius:15px}#table-container[_ngcontent-%COMP%]{height:inherit;overflow-y:auto}.scroll-horizontally[_ngcontent-%COMP%]{height:inherit;width
|
|
956
|
+
}, dependencies: [i1.NgClass, i1.NgForOf, i1.NgIf, i1.NgStyle, SubTableComponent, TableFilterComponent, CustomTableCellDirective], styles: ["#main-container[_ngcontent-%COMP%]{font-family:Lato,sans-serif;position:relative}.no-scrollbar[_ngcontent-%COMP%]::-webkit-scrollbar{width:0}.scrollbar[_ngcontent-%COMP%]::-webkit-scrollbar{width:8px;height:8px;border-radius:15px}.scrollbar[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#9aa7b4;border-radius:15px}#table-container[_ngcontent-%COMP%]{height:inherit;overflow-y:auto}.scroll-horizontally[_ngcontent-%COMP%]{height:inherit;width:fit-content;overflow-y:unset!important;overflow-x:visible}#col-headers-container[_ngcontent-%COMP%]{display:flex;align-items:center;position:sticky;background-color:#fff;width:100%;z-index:1;min-height:44px;border-bottom:1px solid #e0e0e0;top:0;left:0;right:0}.col-header[_ngcontent-%COMP%]{padding:0 16px;display:flex;align-items:center;height:100%}.col-header-text[_ngcontent-%COMP%]{font-style:normal;font-weight:700;line-height:20px;display:flex;align-items:center;letter-spacing:.2px;margin:0}.filter-icon[_ngcontent-%COMP%]{margin-left:8px;padding:0 8px;position:relative;cursor:pointer}#filter-active[_ngcontent-%COMP%]{height:8px;width:8px;background:#16cbbc;border-radius:50%;position:absolute;top:4px;right:4px}.sub-row[_ngcontent-%COMP%]{height:auto;border-bottom:none}.loader[_ngcontent-%COMP%] .mat-progress-spinner circle, .mat-spinner[_ngcontent-%COMP%] circle[_ngcontent-%COMP%]{stroke:#0937b2}.t-row[_ngcontent-%COMP%]{display:flex;min-height:44px;background-color:#fff;width:100%;border-bottom:1px solid #e0e0e0}.t-row[_ngcontent-%COMP%]:hover{background-color:#e7eefd}.active-row[_ngcontent-%COMP%]{background-color:#e6f6fd}.t-col-container[_ngcontent-%COMP%]{padding:0 16px}.t-row-hover[_ngcontent-%COMP%]:hover{background-color:#0000}.t-col-container-hover[_ngcontent-%COMP%]:hover{background-color:#e6ebf7}.t-col-container-hover[_ngcontent-%COMP%]:first-child{border-left:1px solid #e0e0e0}.t-col-container-hover[_ngcontent-%COMP%]{border-right:1px solid #e0e0e0}.t-col[_ngcontent-%COMP%]{display:flex;align-items:center;height:100%}.t-col-text[_ngcontent-%COMP%]{font-style:normal;font-weight:400;font-size:14px;line-height:20px;display:flex;align-items:center;letter-spacing:.2px;margin:0}#pagination-container[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;align-items:center;height:56px}#pagination-text[_ngcontent-%COMP%]{font-style:normal;font-weight:400;font-size:12px;line-height:18px;letter-spacing:.4px;color:#6a737d;margin:0 96px 0 0}#pages-container[_ngcontent-%COMP%]{display:flex;margin-right:32px}.page[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;border:1px solid #6a737d;box-sizing:border-box;border-radius:4px;width:32px;height:32px;font-size:14px;line-height:20px;letter-spacing:.2px;color:#6a737d;margin-right:8px;cursor:pointer}.page-seperator[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:32px;height:32px;margin-right:8px}.dot[_ngcontent-%COMP%]{height:3px;width:3px;border-radius:50%;background:#6a737d}.page-active[_ngcontent-%COMP%]{color:#0937b2;border:1px solid #0937b2}"] });
|
|
957
957
|
(function () {
|
|
958
958
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TableComponent, [{
|
|
959
959
|
type: Component,
|
|
960
|
-
args: [{ selector: "mis-table", template: "<div\n [ngStyle]=\"{\n height: getContainerHeight(),\n width: getContainerWidth(),\n 'overflow-x': config.canScrollHorizontally ? 'auto' : 'unset'\n }\"\n id=\"main-container\"\n>\n <mis-table-filter\n #filter\n (filtersApplied)=\"updateAppliedFilters($event)\"\n *ngIf=\"showFilter\"\n [containerStyles]=\"filterContainerStyles\"\n [filtersData]=\"filterData\"\n ></mis-table-filter>\n <div\n #table\n id=\"table-container\"\n [ngClass]=\"{ 'no-scrollbar': expandedIndex < 0, scrollbar: !(expandedIndex < 0), 'scroll-horizontally': config.canScrollHorizontally }\"\n >\n <div\n [ngStyle]=\"getColHeadersRowStyles()\"\n id=\"col-headers-container\"\n >\n <div\n #colHeaderRef\n (click)=\"colHeader?.action ? colHeader?.action(colHeader) : null\"\n *ngFor=\"let colHeader of config?.colHeaderConfig\"\n class=\"col-header\"\n [ngStyle]=\"{\n width: colHeader?.style?.width || '',\n cursor: colHeader.action ? 'pointer' : 'default',\n 'justify-content': colHeader?.style?.justifyContent\n ? colHeader?.style?.justifyContent\n : colHeader.type === 'number'\n ? 'flex-end'\n : 'space-between'\n }\"\n >\n <p *ngIf=\"colHeader?.type !== 'custom'\" class=\"col-header-text\">\n {{ colHeader?.data || \" \" }}\n </p>\n <span\n (click)=\"filterData = colHeader.filters; toggleFilter(colHeader.data); $event.stopPropagation()\"\n *ngIf=\"colHeader?.type !== 'custom' && colHeader?.filters && colHeader?.filters?.length > 0\"\n class=\"filter-icon\"\n >\n <span *ngIf=\"appliedFilters[colHeader.data]?.length > 0\" id=\"filter-active\"></span>\n <svg fill=\"none\" height=\"10\" viewBox=\"0 0 13 10\" width=\"13\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n clip-rule=\"evenodd\"\n d=\"M4.97546 10H7.64213V8H4.97546V10ZM0.308472 0V2H12.3085V0H0.308472ZM2.30847 6H10.3085V4H2.30847V6Z\"\n fill=\"#181F33\"\n fill-rule=\"evenodd\"\n />\n </svg>\n </span>\n <ng-template\n *ngIf=\"colHeader?.type === 'custom'\"\n [customComponent]=\"colHeader?.componentRef\"\n [data]=\"colHeader.data\"\n customTableCell\n ></ng-template>\n </div>\n </div>\n <div id=\"data-container\">\n <div class=\"row-wrapper\" *ngFor=\"let row of tableData; let i = index\">\n <div\n class=\"t-row\"\n [ngClass]=\"{ 't-row-hover': config.cellHover, 'active-row': i === activeRowIndex }\"\n [ngStyle]=\"{ 'min-height': config?.rowConfig?.height ? config.rowConfig.height : '44px' }\"\n (click)=\"selectRow(i)\"\n >\n <div\n (click)=\"config?.colConfig[i]?.action ? config?.colConfig[i]?.action(col) : null\"\n *ngFor=\"let col of row; let i = index\"\n [ngStyle]=\"{\n width: config?.colConfig[i]?.style?.width || config?.colHeaderConfig[i]?.style?.width || ''\n }\"\n class=\"t-col-container\"\n [ngClass]=\"{ 't-col-container-hover': config.cellHover }\"\n >\n <div\n class=\"t-col\"\n [style]=\"config.colConfig[i]?.style\"\n [ngStyle]=\"{\n width: '100%',\n cursor: config.colConfig[i]?.action ? 'pointer' : 'default',\n 'justify-content': config.colConfig[i]?.style?.justifyContent\n ? config.colConfig[i]?.style?.justifyContent\n : config.colConfig[i]?.type === 'number'\n ? 'flex-end'\n : 'space-between'\n }\"\n >\n <p\n *ngIf=\"config.colConfig[i]?.type !== 'custom'\"\n [ngStyle]=\"{\n color: config?.colConfig[i]?.style?.color ? config?.colConfig[i]?.style?.color : ''\n }\"\n class=\"t-col-text\"\n >\n {{ col }}\n </p>\n <ng-template\n *ngIf=\"config.colConfig[i]?.type === 'custom'\"\n [customComponent]=\"config.colConfig[i].componentRef\"\n [data]=\"col\"\n customTableCell\n ></ng-template>\n </div>\n </div>\n </div>\n <div *ngIf=\"config?.canExpand && expandedIndex === i\" class=\"sub-row\">\n <ng-container *ngIf=\"subTableDataLoading\">\n <div style=\"display: flex; justify-content: center; align-items: center; padding: 16px\">Loading...</div>\n </ng-container>\n <ng-container *ngIf=\"!subTableDataLoading && subTableData.length === 0\">\n <div style=\"display: flex; justify-content: center; align-items: center; padding: 16px\">No Data Available...</div>\n </ng-container>\n <ng-container *ngIf=\"!subTableDataLoading && subTableData.length > 0\">\n <sub-table [config]=\"subTableconfig\" [tableData]=\"subTableData\"></sub-table>\n </ng-container>\n </div>\n </div>\n </div>\n </div>\n <div\n *ngIf=\"config?.paginationConfig && (tableLength >= config.paginationConfig.rowsPerPage || config.paginationConfig?.selectedPage !== 1)\"\n id=\"pagination-container\"\n >\n <p id=\"pagination-text\">\n Showing\n {{ (config.paginationConfig?.selectedPage - 1) * config.paginationConfig.rowsPerPage + 1 }}-{{\n (config.paginationConfig?.selectedPage - 1) * config.paginationConfig.rowsPerPage + tableLength\n }}\n of {{ config.paginationConfig.totalNoOfRows }} items\n </p>\n <div id=\"pages-container\">\n <span (click)=\"updateSelectedPage(config.paginationConfig?.selectedPage - 1)\" class=\"page\">\n <svg fill=\"none\" height=\"10\" viewBox=\"0 0 7 10\" width=\"7\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n clip-rule=\"evenodd\"\n d=\"M0.857405 5.56295C0.855794 5.56139 0.854188 5.55982 0.852588 5.55824C0.695955 5.40408 0.617641 5.20203 0.617647 4.99998C0.617641 4.79793 0.695955 4.59588 0.852588 4.44172C0.854188 4.44014 0.855794 4.43858 0.857404 4.43702L5.13066 0.231231C5.44392 -0.0770771 5.9518 -0.0770771 6.26506 0.231231C6.57831 0.53954 6.57831 1.03941 6.26506 1.34772L2.5542 4.99998L6.26506 8.65225C6.57831 8.96055 6.57831 9.46042 6.26506 9.76873C5.9518 10.077 5.44392 10.077 5.13066 9.76873L0.857405 5.56295Z\"\n fill=\"#181F33\"\n fill-rule=\"evenodd\"\n />\n </svg>\n </span>\n <div *ngFor=\"let pageNumber of pages\">\n <span\n (click)=\"updateSelectedPage(pageNumber)\"\n *ngIf=\"pageNumber != 0\"\n [ngClass]=\"{ 'page-active': pageNumber == config.paginationConfig?.selectedPage }\"\n class=\"page\"\n >{{ pageNumber }}</span\n >\n <span *ngIf=\"pageNumber == 0\" class=\"page-seperator\">\n <div style=\"display: flex\">\n <span class=\"dot\" style=\"margin-right: 4px\"></span>\n <span class=\"dot\" style=\"margin-right: 4px\"></span>\n <span class=\"dot\"></span>\n </div>\n </span>\n </div>\n <span (click)=\"updateSelectedPage(config.paginationConfig?.selectedPage + 1)\" class=\"page\">\n <svg fill=\"none\" height=\"10\" viewBox=\"0 0 7 10\" width=\"7\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n clip-rule=\"evenodd\"\n d=\"M6.1426 5.56295C6.14421 5.56139 6.14581 5.55982 6.14741 5.55824C6.30405 5.40408 6.38236 5.20203 6.38236 4.99998C6.38236 4.79793 6.30405 4.59588 6.14741 4.44172C6.14581 4.44014 6.14421 4.43858 6.1426 4.43702L1.86934 0.231231C1.55608 -0.0770771 1.0482 -0.0770771 0.734942 0.231231C0.421688 0.53954 0.421688 1.03941 0.734942 1.34772L4.4458 4.99998L0.734941 8.65225C0.421686 8.96055 0.421686 9.46042 0.734941 9.76873C1.0482 10.077 1.55608 10.077 1.86934 9.76873L6.1426 5.56295Z\"\n fill=\"#181F33\"\n fill-rule=\"evenodd\"\n />\n </svg>\n </span>\n </div>\n </div>\n</div>\n", styles: ["#main-container{font-family:Lato,sans-serif;position:relative}.no-scrollbar::-webkit-scrollbar{width:0}.scrollbar::-webkit-scrollbar{width:8px;height:8px;border-radius:15px}.scrollbar::-webkit-scrollbar-thumb{background:#9aa7b4;border-radius:15px}#table-container{height:inherit;overflow-y:auto}.scroll-horizontally{height:inherit;width:-moz-fit-content;width:fit-content;overflow-y:unset!important;overflow-x:visible}#col-headers-container{display:flex;align-items:center;position:sticky;background-color:#fff;width:100%;z-index:1;min-height:44px;border-bottom:1px solid #e0e0e0;top:0;left:0;right:0}.col-header{padding:0 16px;display:flex;align-items:center;height:100%}.col-header-text{font-style:normal;font-weight:700;line-height:20px;display:flex;align-items:center;letter-spacing:.2px;margin:0}.filter-icon{margin-left:8px;padding:0 8px;position:relative;cursor:pointer}#filter-active{height:8px;width:8px;background:#16cbbc;border-radius:50%;position:absolute;top:4px;right:4px}.sub-row{height:auto;border-bottom:none}.loader ::ng-deep .mat-progress-spinner circle,.mat-spinner circle{stroke:#0937b2}.t-row{display:flex;min-height:44px;background-color:#fff;width:100%;border-bottom:1px solid #e0e0e0}.t-row:hover{background-color:#e7eefd}.active-row{background-color:#e6f6fd}.t-col-container{padding:0 16px}.t-row-hover:hover{background-color:#0000}.t-col-container-hover:hover{background-color:#e6ebf7}.t-col-container-hover:first-child{border-left:1px solid #e0e0e0}.t-col-container-hover{border-right:1px solid #e0e0e0}.t-col{display:flex;align-items:center;height:100%}.t-col-text{font-style:normal;font-weight:400;font-size:14px;line-height:20px;display:flex;align-items:center;letter-spacing:.2px;margin:0}#pagination-container{display:flex;justify-content:flex-end;align-items:center;height:56px}#pagination-text{font-style:normal;font-weight:400;font-size:12px;line-height:18px;letter-spacing:.4px;color:#6a737d;margin:0 96px 0 0}#pages-container{display:flex;margin-right:32px}.page{display:flex;justify-content:center;align-items:center;border:1px solid #6a737d;box-sizing:border-box;border-radius:4px;width:32px;height:32px;font-size:14px;line-height:20px;letter-spacing:.2px;color:#6a737d;margin-right:8px;cursor:pointer}.page-seperator{display:flex;justify-content:center;align-items:center;width:32px;height:32px;margin-right:8px}.dot{height:3px;width:3px;border-radius:50%;background:#6a737d}.page-active{color:#0937b2;border:1px solid #0937b2}\n"] }]
|
|
960
|
+
args: [{ selector: "mis-table", template: "<div\n [ngStyle]=\"{\n height: getContainerHeight(),\n width: getContainerWidth(),\n 'overflow-x': config.canScrollHorizontally ? 'auto' : 'unset'\n }\"\n id=\"main-container\"\n>\n <mis-table-filter\n #filter\n (filtersApplied)=\"updateAppliedFilters($event)\"\n *ngIf=\"showFilter\"\n [containerStyles]=\"filterContainerStyles\"\n [filtersData]=\"filterData\"\n ></mis-table-filter>\n <div\n #table\n id=\"table-container\"\n [ngClass]=\"{ 'no-scrollbar': expandedIndex < 0, scrollbar: !(expandedIndex < 0), 'scroll-horizontally': config.canScrollHorizontally }\"\n >\n <div\n [ngStyle]=\"getColHeadersRowStyles()\"\n id=\"col-headers-container\"\n >\n <div\n #colHeaderRef\n (click)=\"colHeader?.action ? colHeader?.action(colHeader) : null\"\n *ngFor=\"let colHeader of config?.colHeaderConfig\"\n class=\"col-header\"\n [ngStyle]=\"{\n width: colHeader?.style?.width || '',\n cursor: colHeader.action ? 'pointer' : 'default',\n 'justify-content': colHeader?.style?.justifyContent\n ? colHeader?.style?.justifyContent\n : colHeader.type === 'number'\n ? 'flex-end'\n : 'space-between'\n }\"\n >\n <p *ngIf=\"colHeader?.type !== 'custom'\" class=\"col-header-text\">\n {{ colHeader?.data || \" \" }}\n </p>\n <span\n (click)=\"filterData = colHeader.filters; toggleFilter(colHeader.data); $event.stopPropagation()\"\n *ngIf=\"colHeader?.type !== 'custom' && colHeader?.filters && colHeader?.filters?.length > 0\"\n class=\"filter-icon\"\n >\n <span *ngIf=\"appliedFilters[colHeader.data]?.length > 0\" id=\"filter-active\"></span>\n <svg fill=\"none\" height=\"10\" viewBox=\"0 0 13 10\" width=\"13\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n clip-rule=\"evenodd\"\n d=\"M4.97546 10H7.64213V8H4.97546V10ZM0.308472 0V2H12.3085V0H0.308472ZM2.30847 6H10.3085V4H2.30847V6Z\"\n fill=\"#181F33\"\n fill-rule=\"evenodd\"\n />\n </svg>\n </span>\n <ng-template\n *ngIf=\"colHeader?.type === 'custom'\"\n [customComponent]=\"colHeader?.componentRef\"\n [data]=\"colHeader.data\"\n customTableCell\n ></ng-template>\n </div>\n </div>\n <div id=\"data-container\">\n <div class=\"row-wrapper\" *ngFor=\"let row of tableData; let i = index\">\n <div\n class=\"t-row\"\n [ngClass]=\"{ 't-row-hover': config.cellHover, 'active-row': i === activeRowIndex }\"\n [ngStyle]=\"{ 'min-height': config?.rowConfig?.height ? config.rowConfig.height : '44px' }\"\n (click)=\"selectRow(i)\"\n >\n <div\n (click)=\"config?.colConfig[i]?.action ? config?.colConfig[i]?.action(col) : null\"\n *ngFor=\"let col of row; let i = index\"\n [ngStyle]=\"{\n width: config?.colConfig[i]?.style?.width || config?.colHeaderConfig[i]?.style?.width || ''\n }\"\n class=\"t-col-container\"\n [ngClass]=\"{ 't-col-container-hover': config.cellHover }\"\n >\n <div\n class=\"t-col\"\n [style]=\"config.colConfig[i]?.style\"\n [ngStyle]=\"{\n width: '100%',\n cursor: config.colConfig[i]?.action ? 'pointer' : 'default',\n 'justify-content': config.colConfig[i]?.style?.justifyContent\n ? config.colConfig[i]?.style?.justifyContent\n : config.colConfig[i]?.type === 'number'\n ? 'flex-end'\n : 'space-between'\n }\"\n >\n <p\n *ngIf=\"config.colConfig[i]?.type !== 'custom'\"\n [ngStyle]=\"{\n color: config?.colConfig[i]?.style?.color ? config?.colConfig[i]?.style?.color : ''\n }\"\n class=\"t-col-text\"\n >\n {{ col }}\n </p>\n <ng-template\n *ngIf=\"config.colConfig[i]?.type === 'custom'\"\n [customComponent]=\"config.colConfig[i].componentRef\"\n [data]=\"col\"\n customTableCell\n ></ng-template>\n </div>\n </div>\n </div>\n <div *ngIf=\"config?.canExpand && expandedIndex === i\" class=\"sub-row\">\n <ng-container *ngIf=\"subTableDataLoading\">\n <div style=\"display: flex; justify-content: center; align-items: center; padding: 16px\">Loading...</div>\n </ng-container>\n <ng-container *ngIf=\"!subTableDataLoading && subTableData.length === 0\">\n <div style=\"display: flex; justify-content: center; align-items: center; padding: 16px\">No Data Available...</div>\n </ng-container>\n <ng-container *ngIf=\"!subTableDataLoading && subTableData.length > 0\">\n <sub-table [config]=\"subTableconfig\" [tableData]=\"subTableData\"></sub-table>\n </ng-container>\n </div>\n </div>\n </div>\n </div>\n <div\n *ngIf=\"config?.paginationConfig && (tableLength >= config.paginationConfig.rowsPerPage || config.paginationConfig?.selectedPage !== 1)\"\n id=\"pagination-container\"\n >\n <p id=\"pagination-text\">\n Showing\n {{ (config.paginationConfig?.selectedPage - 1) * config.paginationConfig.rowsPerPage + 1 }}-{{\n (config.paginationConfig?.selectedPage - 1) * config.paginationConfig.rowsPerPage + tableLength\n }}\n of {{ config.paginationConfig.totalNoOfRows }} items\n </p>\n <div id=\"pages-container\">\n <span (click)=\"updateSelectedPage(config.paginationConfig?.selectedPage - 1)\" class=\"page\">\n <svg fill=\"none\" height=\"10\" viewBox=\"0 0 7 10\" width=\"7\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n clip-rule=\"evenodd\"\n d=\"M0.857405 5.56295C0.855794 5.56139 0.854188 5.55982 0.852588 5.55824C0.695955 5.40408 0.617641 5.20203 0.617647 4.99998C0.617641 4.79793 0.695955 4.59588 0.852588 4.44172C0.854188 4.44014 0.855794 4.43858 0.857404 4.43702L5.13066 0.231231C5.44392 -0.0770771 5.9518 -0.0770771 6.26506 0.231231C6.57831 0.53954 6.57831 1.03941 6.26506 1.34772L2.5542 4.99998L6.26506 8.65225C6.57831 8.96055 6.57831 9.46042 6.26506 9.76873C5.9518 10.077 5.44392 10.077 5.13066 9.76873L0.857405 5.56295Z\"\n fill=\"#181F33\"\n fill-rule=\"evenodd\"\n />\n </svg>\n </span>\n <div *ngFor=\"let pageNumber of pages\">\n <span\n (click)=\"updateSelectedPage(pageNumber)\"\n *ngIf=\"pageNumber != 0\"\n [ngClass]=\"{ 'page-active': pageNumber == config.paginationConfig?.selectedPage }\"\n class=\"page\"\n >{{ pageNumber }}</span\n >\n <span *ngIf=\"pageNumber == 0\" class=\"page-seperator\">\n <div style=\"display: flex\">\n <span class=\"dot\" style=\"margin-right: 4px\"></span>\n <span class=\"dot\" style=\"margin-right: 4px\"></span>\n <span class=\"dot\"></span>\n </div>\n </span>\n </div>\n <span (click)=\"updateSelectedPage(config.paginationConfig?.selectedPage + 1)\" class=\"page\">\n <svg fill=\"none\" height=\"10\" viewBox=\"0 0 7 10\" width=\"7\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n clip-rule=\"evenodd\"\n d=\"M6.1426 5.56295C6.14421 5.56139 6.14581 5.55982 6.14741 5.55824C6.30405 5.40408 6.38236 5.20203 6.38236 4.99998C6.38236 4.79793 6.30405 4.59588 6.14741 4.44172C6.14581 4.44014 6.14421 4.43858 6.1426 4.43702L1.86934 0.231231C1.55608 -0.0770771 1.0482 -0.0770771 0.734942 0.231231C0.421688 0.53954 0.421688 1.03941 0.734942 1.34772L4.4458 4.99998L0.734941 8.65225C0.421686 8.96055 0.421686 9.46042 0.734941 9.76873C1.0482 10.077 1.55608 10.077 1.86934 9.76873L6.1426 5.56295Z\"\n fill=\"#181F33\"\n fill-rule=\"evenodd\"\n />\n </svg>\n </span>\n </div>\n </div>\n</div>\n", styles: ["#main-container{font-family:Lato,sans-serif;position:relative}.no-scrollbar::-webkit-scrollbar{width:0}.scrollbar::-webkit-scrollbar{width:8px;height:8px;border-radius:15px}.scrollbar::-webkit-scrollbar-thumb{background:#9aa7b4;border-radius:15px}#table-container{height:inherit;overflow-y:auto}.scroll-horizontally{height:inherit;width:fit-content;overflow-y:unset!important;overflow-x:visible}#col-headers-container{display:flex;align-items:center;position:sticky;background-color:#fff;width:100%;z-index:1;min-height:44px;border-bottom:1px solid #e0e0e0;top:0;left:0;right:0}.col-header{padding:0 16px;display:flex;align-items:center;height:100%}.col-header-text{font-style:normal;font-weight:700;line-height:20px;display:flex;align-items:center;letter-spacing:.2px;margin:0}.filter-icon{margin-left:8px;padding:0 8px;position:relative;cursor:pointer}#filter-active{height:8px;width:8px;background:#16cbbc;border-radius:50%;position:absolute;top:4px;right:4px}.sub-row{height:auto;border-bottom:none}.loader ::ng-deep .mat-progress-spinner circle,.mat-spinner circle{stroke:#0937b2}.t-row{display:flex;min-height:44px;background-color:#fff;width:100%;border-bottom:1px solid #e0e0e0}.t-row:hover{background-color:#e7eefd}.active-row{background-color:#e6f6fd}.t-col-container{padding:0 16px}.t-row-hover:hover{background-color:#0000}.t-col-container-hover:hover{background-color:#e6ebf7}.t-col-container-hover:first-child{border-left:1px solid #e0e0e0}.t-col-container-hover{border-right:1px solid #e0e0e0}.t-col{display:flex;align-items:center;height:100%}.t-col-text{font-style:normal;font-weight:400;font-size:14px;line-height:20px;display:flex;align-items:center;letter-spacing:.2px;margin:0}#pagination-container{display:flex;justify-content:flex-end;align-items:center;height:56px}#pagination-text{font-style:normal;font-weight:400;font-size:12px;line-height:18px;letter-spacing:.4px;color:#6a737d;margin:0 96px 0 0}#pages-container{display:flex;margin-right:32px}.page{display:flex;justify-content:center;align-items:center;border:1px solid #6a737d;box-sizing:border-box;border-radius:4px;width:32px;height:32px;font-size:14px;line-height:20px;letter-spacing:.2px;color:#6a737d;margin-right:8px;cursor:pointer}.page-seperator{display:flex;justify-content:center;align-items:center;width:32px;height:32px;margin-right:8px}.dot{height:3px;width:3px;border-radius:50%;background:#6a737d}.page-active{color:#0937b2;border:1px solid #0937b2}\n"] }]
|
|
961
961
|
}], function () { return [{ type: i0.Renderer2 }]; }, { filtersUpdated: [{
|
|
962
962
|
type: Output
|
|
963
963
|
}], filter: [{
|