mis-crystal-design-system 4.0.49 → 4.0.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/action-list/mis-crystal-design-system-action-list.metadata.json +1 -1
- package/bundles/mis-crystal-design-system-action-list.umd.js +655 -495
- package/bundles/mis-crystal-design-system-action-list.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-action-list.umd.min.js +1 -15
- package/bundles/mis-crystal-design-system-action-list.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-analytics.umd.js +568 -409
- package/bundles/mis-crystal-design-system-analytics.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-analytics.umd.min.js +1 -15
- package/bundles/mis-crystal-design-system-analytics.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-checkbox.umd.js +1 -1
- package/bundles/mis-crystal-design-system-checkbox.umd.min.js +1 -1
- package/bundles/mis-crystal-design-system-checkbox.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-datepicker_v2.umd.js +849 -690
- package/bundles/mis-crystal-design-system-datepicker_v2.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-datepicker_v2.umd.min.js +1 -15
- package/bundles/mis-crystal-design-system-datepicker_v2.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-daterangepicker_v2.umd.js +2 -3
- package/bundles/mis-crystal-design-system-daterangepicker_v2.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-daterangepicker_v2.umd.min.js +1 -1
- package/bundles/mis-crystal-design-system-daterangepicker_v2.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-dropdown.umd.js +703 -544
- package/bundles/mis-crystal-design-system-dropdown.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-dropdown.umd.min.js +1 -15
- package/bundles/mis-crystal-design-system-dropdown.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-dynamic-form.umd.js +882 -723
- package/bundles/mis-crystal-design-system-dynamic-form.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-dynamic-form.umd.min.js +1 -15
- package/bundles/mis-crystal-design-system-dynamic-form.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-input-stepper.umd.js +2 -0
- package/bundles/mis-crystal-design-system-input-stepper.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-input-stepper.umd.min.js +1 -1
- package/bundles/mis-crystal-design-system-input-stepper.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-input.umd.js +1 -1
- package/bundles/mis-crystal-design-system-input.umd.min.js +1 -1
- package/bundles/mis-crystal-design-system-input.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-loader.umd.js +1 -1
- package/bundles/mis-crystal-design-system-loader.umd.min.js +1 -1
- package/bundles/mis-crystal-design-system-loader.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-multi-select-dropdown.umd.js +769 -610
- package/bundles/mis-crystal-design-system-multi-select-dropdown.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-multi-select-dropdown.umd.min.js +1 -15
- package/bundles/mis-crystal-design-system-multi-select-dropdown.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-nested-multi-select-dropdown.umd.js +782 -623
- package/bundles/mis-crystal-design-system-nested-multi-select-dropdown.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-nested-multi-select-dropdown.umd.min.js +1 -15
- package/bundles/mis-crystal-design-system-nested-multi-select-dropdown.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-ske-loader.umd.js +1 -1
- package/bundles/mis-crystal-design-system-ske-loader.umd.min.js +1 -1
- package/bundles/mis-crystal-design-system-ske-loader.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-snackbar.umd.js +19 -11
- package/bundles/mis-crystal-design-system-snackbar.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-snackbar.umd.min.js +1 -1
- package/bundles/mis-crystal-design-system-snackbar.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-specificdatepicker.umd.js +1120 -961
- package/bundles/mis-crystal-design-system-specificdatepicker.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-specificdatepicker.umd.min.js +1 -15
- package/bundles/mis-crystal-design-system-specificdatepicker.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-star-rating.umd.js +2 -2
- package/bundles/mis-crystal-design-system-star-rating.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-star-rating.umd.min.js +1 -1
- package/bundles/mis-crystal-design-system-star-rating.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-table.umd.js +927 -768
- package/bundles/mis-crystal-design-system-table.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-table.umd.min.js +1 -15
- package/bundles/mis-crystal-design-system-table.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-timepicker.umd.js +829 -670
- package/bundles/mis-crystal-design-system-timepicker.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-timepicker.umd.min.js +1 -15
- package/bundles/mis-crystal-design-system-timepicker.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-virtual-scroll.umd.js +616 -457
- package/bundles/mis-crystal-design-system-virtual-scroll.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-virtual-scroll.umd.min.js +1 -15
- package/bundles/mis-crystal-design-system-virtual-scroll.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-widgets.umd.js +621 -462
- package/bundles/mis-crystal-design-system-widgets.umd.js.map +1 -1
- package/bundles/mis-crystal-design-system-widgets.umd.min.js +1 -15
- package/bundles/mis-crystal-design-system-widgets.umd.min.js.map +1 -1
- package/checkbox/mis-crystal-design-system-checkbox.metadata.json +1 -1
- package/datepicker_v2/mis-crystal-design-system-datepicker_v2.metadata.json +1 -1
- package/daterangepicker_v2/mis-crystal-design-system-daterangepicker_v2.metadata.json +1 -1
- package/daterangepicker_v2/tz-drp-container/tz-drp-container.component.d.ts +0 -1
- package/dropdown/mis-crystal-design-system-dropdown.metadata.json +1 -1
- package/dynamic-form/mis-crystal-design-system-dynamic-form.metadata.json +1 -1
- package/esm2015/action-list/action-list.component.js +6 -5
- package/esm2015/checkbox/checkbox.component.js +1 -1
- package/esm2015/datepicker_v2/tz-dp-container/tz-dp-container.component.js +1 -1
- package/esm2015/daterangepicker_v2/tz-drp-container/tz-drp-container.component.js +3 -4
- package/esm2015/dropdown/dropdown.component.js +1 -1
- package/esm2015/dynamic-form/dynamic-form.component.js +1 -1
- package/esm2015/input/mis-input.component.js +1 -1
- package/esm2015/input-stepper/input-stepper/input-stepper.component.js +3 -1
- package/esm2015/loader/loader.component.js +1 -1
- package/esm2015/multi-select-dropdown/multi-select-dropdown.component.js +1 -1
- package/esm2015/nested-multi-select-dropdown/nested-multi-select-dropdown.component.js +1 -1
- package/esm2015/ske-loader/ske-loader.component.js +1 -1
- package/esm2015/snackbar/snackbar/snackbar.component.js +9 -13
- package/esm2015/snackbar/snackbar.module.js +13 -2
- package/esm2015/specificdatepicker/tz-sdp-container/tz-sdp-container.component.js +1 -1
- package/esm2015/star-rating/star-rating.component.js +3 -3
- package/esm2015/table/table.component.js +1 -1
- package/fesm2015/mis-crystal-design-system-action-list.js +5 -4
- package/fesm2015/mis-crystal-design-system-action-list.js.map +1 -1
- package/fesm2015/mis-crystal-design-system-checkbox.js +1 -1
- package/fesm2015/mis-crystal-design-system-datepicker_v2.js +1 -1
- package/fesm2015/mis-crystal-design-system-daterangepicker_v2.js +2 -3
- package/fesm2015/mis-crystal-design-system-daterangepicker_v2.js.map +1 -1
- package/fesm2015/mis-crystal-design-system-dropdown.js +1 -1
- package/fesm2015/mis-crystal-design-system-dynamic-form.js +1 -1
- package/fesm2015/mis-crystal-design-system-input-stepper.js +2 -0
- package/fesm2015/mis-crystal-design-system-input-stepper.js.map +1 -1
- package/fesm2015/mis-crystal-design-system-input.js +1 -1
- package/fesm2015/mis-crystal-design-system-loader.js +1 -1
- package/fesm2015/mis-crystal-design-system-multi-select-dropdown.js +1 -1
- package/fesm2015/mis-crystal-design-system-nested-multi-select-dropdown.js +1 -1
- package/fesm2015/mis-crystal-design-system-ske-loader.js +1 -1
- package/fesm2015/mis-crystal-design-system-snackbar.js +20 -12
- package/fesm2015/mis-crystal-design-system-snackbar.js.map +1 -1
- package/fesm2015/mis-crystal-design-system-specificdatepicker.js +1 -1
- package/fesm2015/mis-crystal-design-system-star-rating.js +2 -2
- package/fesm2015/mis-crystal-design-system-star-rating.js.map +1 -1
- package/fesm2015/mis-crystal-design-system-table.js +1 -1
- package/input/mis-crystal-design-system-input.metadata.json +1 -1
- package/loader/mis-crystal-design-system-loader.metadata.json +1 -1
- package/multi-select-dropdown/mis-crystal-design-system-multi-select-dropdown.metadata.json +1 -1
- package/nested-multi-select-dropdown/mis-crystal-design-system-nested-multi-select-dropdown.metadata.json +1 -1
- package/package.json +1 -1
- package/ske-loader/mis-crystal-design-system-ske-loader.metadata.json +1 -1
- package/snackbar/mis-crystal-design-system-snackbar.metadata.json +1 -1
- package/snackbar/snackbar/snackbar.component.d.ts +5 -5
- package/snackbar/snackbar.module.d.ts +3 -0
- package/specificdatepicker/mis-crystal-design-system-specificdatepicker.metadata.json +1 -1
- package/table/mis-crystal-design-system-table.metadata.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mis-crystal-design-system-daterangepicker_v2.js","sources":["../../../projects/mis-components/daterangepicker_v2/daterangepicker-constants.ts","../../../projects/mis-components/daterangepicker_v2/utils/index.ts","../../../projects/mis-components/daterangepicker_v2/tz-drp-container/tz-drp-container.component.ts","../../../projects/mis-components/daterangepicker_v2/tz-daterangepicker.directive.ts","../../../projects/mis-components/daterangepicker_v2/daterangepicker.module.ts","../../../projects/mis-components/daterangepicker_v2/mis-crystal-design-system-daterangepicker_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\";\n","import { ICurrentMonth } from \"../models/drp-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};\n","import { Component, Inject, OnInit } from \"@angular/core\";\nimport { CONTAINER_DATA, DATE_FORMAT } from \"../daterangepicker-constants\";\nimport { ICurrentMonth, ICurrentMonthDates, IDatePickerData, IWeekDay, ISelectedDatesConfig } from \"../models/drp-config.model\";\nimport { parseZone, Moment, tz } from \"moment-timezone\";\nimport { getMonth } from \"../utils\";\nimport { ToastService } from \"mis-crystal-design-system/toast\";\nimport * as moment from \"moment\";\n\n@Component({\n selector: \"mis-tz-drp\",\n templateUrl: \"./tz-drp-container.component.html\",\n styleUrls: [\"./tz-drp-container.component.scss\"]\n})\nexport class TzDrpContainerComponent implements OnInit {\n data: IDatePickerData;\n private parseZoneInstance = (...args) => {\n return tz(args[0], args[1], this.data.dpConfig.timezone);\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 nextMonthNumber: number;\n nextMonth: ICurrentMonth;\n nextYearNumber: number;\n nextMonthDates: ICurrentMonthDates[] = [];\n isPreviousMonthDisabled: boolean = false;\n isNextMonthDisabled: boolean = false;\n selectionStarted = false;\n localSelectedDates: ISelectedDatesConfig;\n isDatesValid = false;\n arrowUrl: string;\n constructor(@Inject(CONTAINER_DATA) data: IDatePickerData, private toast: ToastService) {\n this.data = data;\n this.localSelectedDates = this.data.dates;\n this.isDatesValid = false;\n if (this.localSelectedDates.startDate && this.localSelectedDates.endDate) {\n this.isDatesValid = true;\n }\n if (this.data?.dpConfig?.timezone) {\n this.parseZoneInstance = (...args) => {\n return tz(args[0], args[1], this.data.dpConfig.timezone);\n };\n }\n this.currentMonthNumber = this.parseZoneInstance().month();\n this.nextMonthNumber = this.parseZoneInstance().add(1, \"month\").month();\n this.currentMonth = getMonth(this.currentMonthNumber);\n this.nextMonth = getMonth(this.nextMonthNumber);\n this.currentYearNumber = this.parseZoneInstance().year();\n this.nextYearNumber = this.parseZoneInstance().add(1, \"month\").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 this.arrowUrl = 'assets/arrow__icon.svg';\n }\n\n ngOnInit(): void {\n this.currentDateInstance();\n this.calculateMinMaxDays();\n }\n\n private currentDateInstance(): void {\n if (!this.localSelectedDates?.startDate) {\n this.currentMonthDates = this.generateDates(this.currentMonthNumber, this.currentYearNumber);\n this.nextMonthDates = this.generateDates(this.nextMonthNumber, this.nextYearNumber);\n return;\n }\n const selectedStartDate = this.parseZoneInstance(this.localSelectedDates?.startDate, this.data.dpConfig.format);\n if (selectedStartDate.isValid()) {\n this.currentYearNumber = selectedStartDate.year();\n this.nextYearNumber = selectedStartDate.add(1, \"month\").year();\n this.currentMonthNumber = selectedStartDate.get(\"month\") - 1;\n this.nextMonthNumber = selectedStartDate.add(1, \"month\").month() - 1;\n if(this.currentMonthNumber === -1){\n this.currentMonthNumber = 11\n }\n if(this.nextMonthNumber === -1){\n this.nextMonthNumber = 11\n }\n this.currentMonth = getMonth(this.currentMonthNumber);\n this.nextMonth = getMonth(this.nextMonthNumber);\n }\n this.currentMonthDates = this.generateDates(this.currentMonthNumber, this.currentYearNumber);\n this.nextMonthDates = this.generateDates(this.nextMonthNumber, this.nextYearNumber);\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.nextMonthNumber = thisMonth.clone().add(1, \"month\").month();\n this.currentMonth = getMonth(this.currentMonthNumber);\n this.nextMonth = getMonth(this.nextMonthNumber);\n if (this.nextMonthNumber === 0 && direction === \"PREVIOUS\") {\n this.currentYearNumber--;\n } else if (this.currentMonthNumber === 11 && direction === \"NEXT\") {\n this.nextYearNumber++;\n }else if (this.currentMonthNumber === 0 && direction === \"NEXT\") {\n this.currentYearNumber++;\n } else if (this.nextMonthNumber === 11 && direction === \"PREVIOUS\") {\n this.nextYearNumber--;\n }else{\n this.nextYearNumber = this.currentYearNumber;\n }\n this.currentMonthDates = this.generateDates(this.currentMonthNumber, this.currentYearNumber);\n this.nextMonthDates = this.generateDates(this.nextMonthNumber, this.nextYearNumber);\n this.calculateMinMaxDays();\n }\n\n private generateDates(month: number, currentYearNumber: number): ICurrentMonthDates[] {\n let dates: ICurrentMonthDates[] = [];\n const daysInMonth = parseZone().year(currentYearNumber).month(month).daysInMonth();\n for (let currentDate = 1; currentDate <= daysInMonth; currentDate++) {\n const date = moment().year(currentYearNumber).month(month).date(currentDate);\n const dateString = date.format(this.data.dpConfig.format);\n let isDisabledDay = this.data.datesDisabled.some(d => d === dateString);\n const minDate = this.parseZoneInstance(this.data.dpConfig.minDate, this.data.dpConfig.format);\n if (!isDisabledDay && minDate.isValid()) {\n let Date = this.parseZoneInstance().year(currentYearNumber).month(month).date(currentDate);\n isDisabledDay = minDate.isAfter(Date, \"day\");\n }\n const maxDate = this.parseZoneInstance(this.data.dpConfig.maxDate, this.data.dpConfig.format);\n if (!isDisabledDay && maxDate.isValid()) {\n isDisabledDay = maxDate.isBefore(date, \"day\");\n }\n const isCurrentDay =\n this.parseZoneInstance().year(currentYearNumber).month(month).date(currentDate).format(this.data.dpConfig.format) ===\n this.parseZoneInstance().format(this.data.dpConfig.format);\n const isSelectedStartDay =\n !isDisabledDay &&\n (this.localSelectedDates?.startDate ?? false) &&\n date.format(this.data.dpConfig.format) === this.localSelectedDates?.startDate;\n const isAfterSelectedStartDate = moment(date,this.data?.dpConfig?.format).startOf('day').isAfter(moment(this.localSelectedDates.startDate,this.data?.dpConfig?.format).startOf('day'), 'day');\n\n const isBeforeSelectedEndDate = moment(date,this.data?.dpConfig?.format).startOf('day').isBefore(moment(this.localSelectedDates.endDate,this.data?.dpConfig?.format).startOf('day'), 'day');\n const inRangeDay =\n (this.localSelectedDates.startDate ?? false) &&\n (this.localSelectedDates.endDate ?? false) &&\n isAfterSelectedStartDate &&\n isBeforeSelectedEndDate;\n const isSelectedEndDay =\n !isDisabledDay &&\n ((this.localSelectedDates?.startDate && this.localSelectedDates?.endDate) ?? false) &&\n date.format(this.data.dpConfig.format) === this.localSelectedDates?.endDate;\n dates.push({\n date: currentDate,\n weekDay: date.day(),\n isCurrentDay,\n isSelectedStartDay,\n isSelectedEndDay,\n inRangeDay,\n toastMessage: this.data.messages.find(q => date.format(this.data.dpConfig.format) === q.date)?.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(from: \"LEFT\" | \"RIGHT\", day: ICurrentMonthDates) {\n if (day.date <= 0) return;\n if (!day.isDisabledDay) {\n if (this.selectionStarted) {\n \n const momentDay = parseZone()\n .year(from === \"LEFT\" ? this.currentYearNumber : this.nextYearNumber)\n .month(from === \"LEFT\" ? this.currentMonthNumber : this.nextMonthNumber)\n .date(day.date);\n if (momentDay.isBefore(this.localSelectedDates.startDate, \"day\")) {\n this.localSelectedDates = {\n startDate: momentDay.format(this.data.dpConfig.format),\n endDate: null\n };\n\n this.currentMonthDates = this.generateDates(this.currentMonthNumber, this.currentYearNumber);\n this.nextMonthDates = this.generateDates(this.nextMonthNumber, this.nextYearNumber);\n return;\n }\n this.selectionStarted = false;\n this.localSelectedDates = {\n ...this.localSelectedDates,\n endDate: momentDay.format(this.data.dpConfig.format)\n };\n } else {\n this.selectionStarted = true;\n this.localSelectedDates = {\n startDate: parseZone()\n .year(from === \"LEFT\" ? this.currentYearNumber : this.nextYearNumber)\n .month(from === \"LEFT\" ? this.currentMonthNumber : this.nextMonthNumber)\n .date(day.date)\n .format(this.data.dpConfig.format),\n endDate: null\n };\n }\n this.currentMonthDates = this.generateDates(this.currentMonthNumber, this.currentYearNumber);\n this.nextMonthDates = this.generateDates(this.nextMonthNumber, this.nextYearNumber);\n this.isDatesValid = false;\n if (this.localSelectedDates.startDate && this.localSelectedDates.endDate) {\n this.isDatesValid = true;\n }\n }\n if (day.toastMessage) {\n this.toast.displayMsg(day.toastMessage, 4000);\n }\n }\n applyDates() {\n this.data.dateChange(this.localSelectedDates);\n }\n cancelDatePicker() {\n this.data.close();\n }\n}\n","import { 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 { genPositionPairs } from \"mis-crystal-design-system/utils\";\nimport { CONTAINER_DATA, DATE_FORMAT } from \"./daterangepicker-constants\";\nimport { IDatePickerConfig, IDatePickerToastText, ISelectedDatesConfig } from \"./models/drp-config.model\";\nimport { TzDrpContainerComponent } from \"./tz-drp-container/tz-drp-container.component\";\n\n@Directive({\n selector: \"input[misTzDrp]\"\n})\nexport class TzDaterangepickerDirective {\n @Input() dpConfig: Partial<IDatePickerConfig> = {\n format: DATE_FORMAT,\n minDate: \"\",\n maxDate: \"\"\n };\n // dd-mm-yyyy 01-12-2022\n @Input() set selectedDates(dates: ISelectedDatesConfig) {\n this.dates = { startDate: null, endDate: null, ...dates };\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<ISelectedDatesConfig>(true);\n private isOpen = false;\n dates: ISelectedDatesConfig;\n\n private dpDisabledDates: string[] = [];\n\n constructor(\n @Self() @Optional() private control: NgControl,\n private element: ElementRef,\n private overlay: Overlay,\n private viewContainerRef: ViewContainerRef\n ) {}\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 genPositionPairs(\n {\n positionX: this.positionX,\n positionY: this.positionY,\n offsetX: this.offsetX,\n offsetY: this.offsetY\n },\n true\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(\n TzDrpContainerComponent,\n this.viewContainerRef,\n Injector.create({\n providers: [\n {\n provide: CONTAINER_DATA,\n useValue: {\n messages: this.dateMessages,\n dates: this.control?.control.value || this.dates,\n dpConfig: this.dpConfig,\n datesDisabled: this.dpDisabledDates,\n dateChange: this.applyDate.bind(this),\n close: this.close.bind(this)\n }\n }\n ]\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(dates: ISelectedDatesConfig) {\n this.dateChange.emit(dates);\n this.control?.control.patchValue(dates);\n this.dates = dates;\n this.close();\n }\n\n 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 { TzDrpContainerComponent } from \"./tz-drp-container/tz-drp-container.component\";\nimport { TzDaterangepickerDirective } from \"./tz-daterangepicker.directive\";\nimport { ToastModule } from \"mis-crystal-design-system/toast\";\nimport { ButtonModule } from \"mis-crystal-design-system/button\";\nimport { OverlayModule } from \"@angular/cdk/overlay\";\n\n@NgModule({\n declarations: [TzDrpContainerComponent, TzDaterangepickerDirective],\n imports: [CommonModule, OverlayModule, ToastModule.forRoot(), ButtonModule.forRoot()],\n exports: [TzDrpContainerComponent, TzDaterangepickerDirective],\n entryComponents: [TzDrpContainerComponent]\n})\nexport class DateRangepickerModuleV2 {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {CONTAINER_DATA as ɵc} from './daterangepicker-constants';\nexport {IDatePickerData as ɵa} from './models/drp-config.model';\nexport {TzDrpContainerComponent as ɵb} from './tz-drp-container/tz-drp-container.component';"],"names":[],"mappings":";;;;;;;;;;;;AAAA;MAIa,cAAc,GAAG,IAAI,cAAc,CAAK,gBAAgB,EAAE;AACh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AiB;aAC5B;;;YATQ,SAAS,uBAoCb,IAAI,YAAI,QAAQ;YArCD,UAAU;YAFrB,OAAO;YAEqF,gBAAgB;;;uBAYlH,KAAK;4BAML,KAAK;4BAGL,KAAK;2BAGL,KAAK;wBACL,KAAK;wBACL,KAAK;sBACL,KAAK;sBACL,KAAK;yBAEL,MAAM;+BAaN,YAAY,SAAC,OAAO;;;MC/BV,uBAAuB;;;YANnC,QAAQ,SAAC;gBACR,YAAY,EAAE,CAAC,uBAAuB,EAAE,0BAA0B,CAAC;gBACnE,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,EAAE,WAAW,CAAC,OAAO,EAAE,EAAE,YAAY,CAAC,OAAO,EAAE,CAAC;gBACrF,OAAO,EAAE,CAAC,uBAAuB,EAAE,0BAA0B,CAAC;gBAC9D,eAAe,EAAE,CAAC,uBAAuB,CAAC;aAC3C;;;ACbD;;;;;;"}
|
|
1
|
+
{"version":3,"file":"mis-crystal-design-system-daterangepicker_v2.js","sources":["../../../projects/mis-components/daterangepicker_v2/daterangepicker-constants.ts","../../../projects/mis-components/daterangepicker_v2/utils/index.ts","../../../projects/mis-components/daterangepicker_v2/tz-drp-container/tz-drp-container.component.ts","../../../projects/mis-components/daterangepicker_v2/tz-daterangepicker.directive.ts","../../../projects/mis-components/daterangepicker_v2/daterangepicker.module.ts","../../../projects/mis-components/daterangepicker_v2/mis-crystal-design-system-daterangepicker_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\";\n","import { ICurrentMonth } from \"../models/drp-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};\n","import { Component, Inject, OnInit } from \"@angular/core\";\nimport { CONTAINER_DATA, DATE_FORMAT } from \"../daterangepicker-constants\";\nimport { ICurrentMonth, ICurrentMonthDates, IDatePickerData, IWeekDay, ISelectedDatesConfig } from \"../models/drp-config.model\";\nimport { parseZone, Moment, tz } from \"moment-timezone\";\nimport { getMonth } from \"../utils\";\nimport { ToastService } from \"mis-crystal-design-system/toast\";\nimport * as moment from \"moment\";\n\n@Component({\n selector: \"mis-tz-drp\",\n templateUrl: \"./tz-drp-container.component.html\",\n styleUrls: [\"./tz-drp-container.component.scss\"]\n})\nexport class TzDrpContainerComponent implements OnInit {\n data: IDatePickerData;\n private parseZoneInstance = (...args) => {\n return tz(args[0], args[1], this.data.dpConfig.timezone);\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 nextMonthNumber: number;\n nextMonth: ICurrentMonth;\n nextYearNumber: number;\n nextMonthDates: ICurrentMonthDates[] = [];\n isPreviousMonthDisabled: boolean = false;\n isNextMonthDisabled: boolean = false;\n selectionStarted = false;\n localSelectedDates: ISelectedDatesConfig;\n isDatesValid = false;\n constructor(@Inject(CONTAINER_DATA) data: IDatePickerData, private toast: ToastService) {\n this.data = data;\n this.localSelectedDates = this.data.dates;\n this.isDatesValid = false;\n if (this.localSelectedDates.startDate && this.localSelectedDates.endDate) {\n this.isDatesValid = true;\n }\n if (this.data?.dpConfig?.timezone) {\n this.parseZoneInstance = (...args) => {\n return tz(args[0], args[1], this.data.dpConfig.timezone);\n };\n }\n this.currentMonthNumber = this.parseZoneInstance().month();\n this.nextMonthNumber = this.parseZoneInstance().add(1, \"month\").month();\n this.currentMonth = getMonth(this.currentMonthNumber);\n this.nextMonth = getMonth(this.nextMonthNumber);\n this.currentYearNumber = this.parseZoneInstance().year();\n this.nextYearNumber = this.parseZoneInstance().add(1, \"month\").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 if (!this.localSelectedDates?.startDate) {\n this.currentMonthDates = this.generateDates(this.currentMonthNumber, this.currentYearNumber);\n this.nextMonthDates = this.generateDates(this.nextMonthNumber, this.nextYearNumber);\n return;\n }\n const selectedStartDate = this.parseZoneInstance(this.localSelectedDates?.startDate, this.data.dpConfig.format);\n if (selectedStartDate.isValid()) {\n this.currentYearNumber = selectedStartDate.year();\n this.nextYearNumber = selectedStartDate.add(1, \"month\").year();\n this.currentMonthNumber = selectedStartDate.get(\"month\") - 1;\n this.nextMonthNumber = selectedStartDate.add(1, \"month\").month() - 1;\n if(this.currentMonthNumber === -1){\n this.currentMonthNumber = 11\n }\n if(this.nextMonthNumber === -1){\n this.nextMonthNumber = 11\n }\n this.currentMonth = getMonth(this.currentMonthNumber);\n this.nextMonth = getMonth(this.nextMonthNumber);\n }\n this.currentMonthDates = this.generateDates(this.currentMonthNumber, this.currentYearNumber);\n this.nextMonthDates = this.generateDates(this.nextMonthNumber, this.nextYearNumber);\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.nextMonthNumber = thisMonth.clone().add(1, \"month\").month();\n this.currentMonth = getMonth(this.currentMonthNumber);\n this.nextMonth = getMonth(this.nextMonthNumber);\n if (this.nextMonthNumber === 0 && direction === \"PREVIOUS\") {\n this.currentYearNumber--;\n } else if (this.currentMonthNumber === 11 && direction === \"NEXT\") {\n this.nextYearNumber++;\n }else if (this.currentMonthNumber === 0 && direction === \"NEXT\") {\n this.currentYearNumber++;\n } else if (this.nextMonthNumber === 11 && direction === \"PREVIOUS\") {\n this.nextYearNumber--;\n }else{\n this.nextYearNumber = this.currentYearNumber;\n }\n this.currentMonthDates = this.generateDates(this.currentMonthNumber, this.currentYearNumber);\n this.nextMonthDates = this.generateDates(this.nextMonthNumber, this.nextYearNumber);\n this.calculateMinMaxDays();\n }\n\n private generateDates(month: number, currentYearNumber: number): ICurrentMonthDates[] {\n let dates: ICurrentMonthDates[] = [];\n const daysInMonth = parseZone().year(currentYearNumber).month(month).daysInMonth();\n for (let currentDate = 1; currentDate <= daysInMonth; currentDate++) {\n const date = moment().year(currentYearNumber).month(month).date(currentDate);\n const dateString = date.format(this.data.dpConfig.format);\n let isDisabledDay = this.data.datesDisabled.some(d => d === dateString);\n const minDate = this.parseZoneInstance(this.data.dpConfig.minDate, this.data.dpConfig.format);\n if (!isDisabledDay && minDate.isValid()) {\n let Date = this.parseZoneInstance().year(currentYearNumber).month(month).date(currentDate);\n isDisabledDay = minDate.isAfter(Date, \"day\");\n }\n const maxDate = this.parseZoneInstance(this.data.dpConfig.maxDate, this.data.dpConfig.format);\n if (!isDisabledDay && maxDate.isValid()) {\n isDisabledDay = maxDate.isBefore(date, \"day\");\n }\n const isCurrentDay =\n this.parseZoneInstance().year(currentYearNumber).month(month).date(currentDate).format(this.data.dpConfig.format) ===\n this.parseZoneInstance().format(this.data.dpConfig.format);\n const isSelectedStartDay =\n !isDisabledDay &&\n (this.localSelectedDates?.startDate ?? false) &&\n date.format(this.data.dpConfig.format) === this.localSelectedDates?.startDate;\n const isAfterSelectedStartDate = moment(date,this.data?.dpConfig?.format).startOf('day').isAfter(moment(this.localSelectedDates.startDate,this.data?.dpConfig?.format).startOf('day'), 'day');\n\n const isBeforeSelectedEndDate = moment(date,this.data?.dpConfig?.format).startOf('day').isBefore(moment(this.localSelectedDates.endDate,this.data?.dpConfig?.format).startOf('day'), 'day');\n const inRangeDay =\n (this.localSelectedDates.startDate ?? false) &&\n (this.localSelectedDates.endDate ?? false) &&\n isAfterSelectedStartDate &&\n isBeforeSelectedEndDate;\n const isSelectedEndDay =\n !isDisabledDay &&\n ((this.localSelectedDates?.startDate && this.localSelectedDates?.endDate) ?? false) &&\n date.format(this.data.dpConfig.format) === this.localSelectedDates?.endDate;\n dates.push({\n date: currentDate,\n weekDay: date.day(),\n isCurrentDay,\n isSelectedStartDay,\n isSelectedEndDay,\n inRangeDay,\n toastMessage: this.data.messages.find(q => date.format(this.data.dpConfig.format) === q.date)?.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(from: \"LEFT\" | \"RIGHT\", day: ICurrentMonthDates) {\n if (day.date <= 0) return;\n if (!day.isDisabledDay) {\n if (this.selectionStarted) {\n \n const momentDay = parseZone()\n .year(from === \"LEFT\" ? this.currentYearNumber : this.nextYearNumber)\n .month(from === \"LEFT\" ? this.currentMonthNumber : this.nextMonthNumber)\n .date(day.date);\n if (momentDay.isBefore(this.localSelectedDates.startDate, \"day\")) {\n this.localSelectedDates = {\n startDate: momentDay.format(this.data.dpConfig.format),\n endDate: null\n };\n\n this.currentMonthDates = this.generateDates(this.currentMonthNumber, this.currentYearNumber);\n this.nextMonthDates = this.generateDates(this.nextMonthNumber, this.nextYearNumber);\n return;\n }\n this.selectionStarted = false;\n this.localSelectedDates = {\n ...this.localSelectedDates,\n endDate: momentDay.format(this.data.dpConfig.format)\n };\n } else {\n this.selectionStarted = true;\n this.localSelectedDates = {\n startDate: parseZone()\n .year(from === \"LEFT\" ? this.currentYearNumber : this.nextYearNumber)\n .month(from === \"LEFT\" ? this.currentMonthNumber : this.nextMonthNumber)\n .date(day.date)\n .format(this.data.dpConfig.format),\n endDate: null\n };\n }\n this.currentMonthDates = this.generateDates(this.currentMonthNumber, this.currentYearNumber);\n this.nextMonthDates = this.generateDates(this.nextMonthNumber, this.nextYearNumber);\n this.isDatesValid = false;\n if (this.localSelectedDates.startDate && this.localSelectedDates.endDate) {\n this.isDatesValid = true;\n }\n }\n if (day.toastMessage) {\n this.toast.displayMsg(day.toastMessage, 4000);\n }\n }\n applyDates() {\n this.data.dateChange(this.localSelectedDates);\n }\n cancelDatePicker() {\n this.data.close();\n }\n}\n","import { 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 { genPositionPairs } from \"mis-crystal-design-system/utils\";\nimport { CONTAINER_DATA, DATE_FORMAT } from \"./daterangepicker-constants\";\nimport { IDatePickerConfig, IDatePickerToastText, ISelectedDatesConfig } from \"./models/drp-config.model\";\nimport { TzDrpContainerComponent } from \"./tz-drp-container/tz-drp-container.component\";\n\n@Directive({\n selector: \"input[misTzDrp]\"\n})\nexport class TzDaterangepickerDirective {\n @Input() dpConfig: Partial<IDatePickerConfig> = {\n format: DATE_FORMAT,\n minDate: \"\",\n maxDate: \"\"\n };\n // dd-mm-yyyy 01-12-2022\n @Input() set selectedDates(dates: ISelectedDatesConfig) {\n this.dates = { startDate: null, endDate: null, ...dates };\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<ISelectedDatesConfig>(true);\n private isOpen = false;\n dates: ISelectedDatesConfig;\n\n private dpDisabledDates: string[] = [];\n\n constructor(\n @Self() @Optional() private control: NgControl,\n private element: ElementRef,\n private overlay: Overlay,\n private viewContainerRef: ViewContainerRef\n ) {}\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 genPositionPairs(\n {\n positionX: this.positionX,\n positionY: this.positionY,\n offsetX: this.offsetX,\n offsetY: this.offsetY\n },\n true\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(\n TzDrpContainerComponent,\n this.viewContainerRef,\n Injector.create({\n providers: [\n {\n provide: CONTAINER_DATA,\n useValue: {\n messages: this.dateMessages,\n dates: this.control?.control.value || this.dates,\n dpConfig: this.dpConfig,\n datesDisabled: this.dpDisabledDates,\n dateChange: this.applyDate.bind(this),\n close: this.close.bind(this)\n }\n }\n ]\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(dates: ISelectedDatesConfig) {\n this.dateChange.emit(dates);\n this.control?.control.patchValue(dates);\n this.dates = dates;\n this.close();\n }\n\n 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 { TzDrpContainerComponent } from \"./tz-drp-container/tz-drp-container.component\";\nimport { TzDaterangepickerDirective } from \"./tz-daterangepicker.directive\";\nimport { ToastModule } from \"mis-crystal-design-system/toast\";\nimport { ButtonModule } from \"mis-crystal-design-system/button\";\nimport { OverlayModule } from \"@angular/cdk/overlay\";\n\n@NgModule({\n declarations: [TzDrpContainerComponent, TzDaterangepickerDirective],\n imports: [CommonModule, OverlayModule, ToastModule.forRoot(), ButtonModule.forRoot()],\n exports: [TzDrpContainerComponent, TzDaterangepickerDirective],\n entryComponents: [TzDrpContainerComponent]\n})\nexport class DateRangepickerModuleV2 {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {CONTAINER_DATA as ɵc} from './daterangepicker-constants';\nexport {IDatePickerData as ɵa} from './models/drp-config.model';\nexport {TzDrpContainerComponent as ɵb} from './tz-drp-container/tz-drp-container.component';"],"names":[],"mappings":";;;;;;;;;;;;AAAA;MAIa,cAAc,GAAG,IAAI,cAAc,CAAK,gBAAgB,EAAE;AAChE,MAAM,WAAW,GAAG,YAAY;;ACHhC,MAAM,QAAQ,GAAG,CAAC,KAAa;IACpC,IAAI,KAAK,CAAC;IACV,QAAQ,KAAK;QACX,KAAK,CAAC;YACJ,KAAK,GAAG,SAAS,CAAC;YAClB,MAAM;QACR,KAAK,CAAC;YACJ,KAAK,GAAG,UAAU,CAAC;YACnB,MAAM;QACR,KAAK,CAAC;YACJ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,CAAC,uBAAuB,EAAE,0BAA0B,CAAC;gBACnE,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,EAAE,WAAW,CAAC,OAAO,EAAE,EAAE,YAAY,CAAC,OAAO,EAAE,CAAC;gBACrF,OAAO,EAAE,CAAC,uBAAuB,EAAE,0BAA0B,CAAC;gBAC9D,eAAe,EAAE,CAAC,uBAAuB,CAAC;aAC3C;;;ACbD;;;;;;"}
|
|
@@ -137,7 +137,7 @@ DropdownComponent.decorators = [
|
|
|
137
137
|
{ type: Component, args: [{
|
|
138
138
|
selector: "mis-dropdown",
|
|
139
139
|
template: "<div (click)=\"setUpAsyncDataSearch()\"\n class=\"main-container\"\n [ngStyle]=\"{\n height: height.length > 0 ? height : '',\n width: width.length > 0 ? width : ''\n }\"\n>\n <div\n class=\"dropdown\"\n #select\n tabindex=\"0\"\n (keyup.enter)=\"toggleDropdown()\"\n (click)=\"toggleDropdown()\"\n [ngStyle]=\"customStyles\"\n [ngClass]=\"isOpen ? 'dropdown-port': ''\"\n >\n <img class=\"img-container\" [src]=\"selectedItem.customIcon\" *ngIf=\"selectedItem.customIcon\">\n <div class=\"label\">\n <p class=\"text\" *ngIf=\"!showOnlyIcon; else showIcon\">\n {{ multiLine ? selectedItem.label?.primaryText : selectedItem.label || label }}\n </p>\n <ng-template #showIcon>\n <p class=\"text\" *ngIf=\"!selectedItem.icon\">\n {{ label }}\n </p>\n <img class=\"icon\" *ngIf=\"!!selectedItem.icon\" [src]=\"selectedItem.icon\" alt=\"no img\" />\n </ng-template>\n </div>\n <svg\n class=\"handle\"\n [ngStyle]=\"{ transform: isOpen ? 'rotate(180deg)' : 'rotate(0deg)' }\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M13.825 7.15845L10 10.9751L6.175 7.15845L5 8.33345L10 13.3334L15 8.33345L13.825 7.15845Z\"\n fill=\"#181F33\"\n />\n </svg>\n </div>\n</div>\n<ng-template #popupContainer>\n <div\n class=\"popup-container\"\n [ngStyle]=\"{\n height: dropdownListHeight,\n width: dropdownListWidth\n }\"\n >\n <div *ngIf=\"searchEnabled\" class=\"search-container\">\n <svg\n *ngIf=\"!isSearchInputFocused\"\n class=\"search-icon\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M4.21508 11.1456C4.21508 7.3179 7.33722 4.21165 11.1926 4.21165C15.048 4.21165 18.1702 7.3179 18.1702 11.1456C18.1702 12.6931 17.6599 14.1226 16.7972 15.2767L15.3685 16.7013C14.2044 17.5668 12.759 18.0796 11.1926 18.0796C7.33722 18.0796 4.21508 14.9734 4.21508 11.1456ZM15.9421 17.7835C14.6021 18.7329 12.9627 19.2913 11.1926 19.2913C6.66977 19.2913 3 15.6461 3 11.1456C3 6.64512 6.66977 3 11.1926 3C15.7155 3 19.3852 6.64512 19.3852 11.1456C19.3852 12.9371 18.8037 14.5931 17.8184 15.9375L19.8361 17.4048C20.6705 17.912 21.7554 18.6543 20.2454 20.215C18.7353 21.7756 18.0099 20.6663 17.4991 19.8364L15.9421 17.7835Z\"\n fill=\"#6A737D\"\n />\n </svg>\n <input\n [ngModel]=\"searchInput\"\n [ngStyle]=\"{\n paddingLeft: isSearchInputFocused ? '12px' : '45px',\n border: isSearchInputFocused ? '1px solid #0937B2' : '1px solid #e0e0e0',\n paddingRight: isSearchInputFocused ? '45px' : '10px'\n }\"\n (ngModelChange)=\"searchInputOnChange($event)\"\n [placeholder]=\"isSearchInputFocused ? '' : searchLabel\"\n (focus)=\"searchInputFocused(true)\"\n class=\"search-input\"\n />\n <svg\n *ngIf=\"isSearchInputFocused\"\n class=\"cancel-icon\"\n (click)=\"searchInputCanceled($event)\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M8.87446 7.32144C8.44588 6.89285 7.751 6.89285 7.32242 7.32144C6.89383 7.75002 6.89383 8.4449 7.32242 8.87349L10.4488 11.9999L7.32357 15.1252C6.89498 15.5538 6.89498 16.2486 7.32357 16.6772C7.75215 17.1058 8.44703 17.1058 8.87561 16.6772L12.0009 13.552L15.1261 16.6772C15.5547 17.1058 16.2496 17.1058 16.6781 16.6772C17.1067 16.2486 17.1067 15.5537 16.6781 15.1251L13.5529 11.9999L16.6793 8.87354C17.1079 8.44496 17.1079 7.75008 16.6793 7.3215C16.2507 6.89291 15.5558 6.89291 15.1273 7.3215L12.0009 10.4479L8.87446 7.32144Z\"\n fill=\"#6A737D\"\n />\n </svg>\n </div>\n <div class=\"status-container\" *ngIf=\"loading\">\n <mis-loader [mobileView]=\"true\"></mis-loader>\n </div>\n <div class=\"items\" *ngIf=\"!loading\"> \n <cdk-virtual-scroll-viewport [itemSize]=\"itemSizeForCdk\" class=\"dropdown-viewport\">\n <div\n class=\"item\"\n tabindex=\"0\"\n [ngClass]=\"{ 'item-disabled': item.disabled, 'item-selected': (higlightSelectedValue && item.value === selectedItem.value), 'icon-only' : showOnlyIcon }\"\n (click)=\"item.disabled ? null : selectItem(item)\"\n (keyup.enter)=\"item.disabled ? null : selectItem(item)\"\n *cdkVirtualFor=\"let item of searchInput ? searchData : data;\"\n >\n <div class=\"label\" *ngIf=\"!showOnlyIcon\" [ngStyle]=\"{ width: item.icon ? '90%' : '100%', 'display': multiLine ? 'flex': 'inherit', 'flex-direction': multiLine ? 'column': 'inherit' }\">\n <span class=\"primaryText\" [ngStyle]=\"getIconStyles(item.icon, activeItem)\">{{ multiLine ? item.label?.primaryText : item.label }}</span>\n <span class=\"secondaryText\" *ngIf=\"multiLine\" [ngStyle]=\"getIconStyles(item.icon, activeItem)\"> {{ item.label?.secondaryText ? item.label?.secondaryText : additionalInfoMessage }} </span>\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 </cdk-virtual-scroll-viewport>\n <div class=\"noData\" *ngIf=\"(searchInput ? searchData : data).length === 0\">\n {{ searchInput === \"\" ? noDataMessage : \"No results\" }}\n </div>\n </div>\n </div>\n</ng-template>\n",
|
|
140
|
-
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:focus-visible,.main-container .dropdown:hover{background-color:#f5f7fc;outline:none}.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 .dropdown .img-container{width:20px;height:20px}.main-container .dropdown-port{background:#e6ebf7}.popup-container{width:100%;max-height:340px;padding-bottom:0;border:1px solid #e0e0e0;border-radius:8px;background-color:#fff;box-shadow:0 12px 24px 0 rgba(0,0,0,.12);display:flex;flex-direction:column;overflow:hidden;justify-content:space-between}.popup-container::-webkit-scrollbar{width:0;height:0}.popup-container .search-container{position:relative;box-sizing:border-box;padding:8px}.popup-container .search-container .search-icon{position:absolute;width:24px;height:24px;top:50%;transform:translateY(-50%);left:18px;z-index:1}.popup-container .search-container .search-input{height:40px;width:100%;padding:12px;border:1px solid #e0e0e0;box-sizing:border-box;border-radius:8px;outline:none;caret-color:#0937b2;font-style:normal;font-weight:400;font-size:12px;line-height:18px;display:flex;align-items:center;letter-spacing:.2px;color:#181f33}.popup-container .search-container .cancel-icon{position:absolute;cursor:pointer;width:24px;height:24px;top:50%;transform:translateY(-50%);right:18px;z-index:1}.popup-container .items{padding:8px 0 8px 8px;overflow-y:scroll}.popup-container .items::-webkit-scrollbar{width:5px;height:0}.popup-container .items::-webkit-scrollbar-thumb{background:#9aa7b4;border-radius:10px}.popup-container .items .noData{display:flex;justify-content:center;align-items:center;font-style:normal;font-weight:400;font-size:14px;line-height:20px;letter-spacing:.2px;color:#181f33}.popup-container .items .dropdown-viewport{height:200px}.popup-container .items .dropdown-viewport .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}.popup-container .items .dropdown-viewport .item:focus-visible,.popup-container .items .dropdown-viewport .item:hover{background-color:#f5f7fc;outline:none}.popup-container .items .dropdown-viewport .item .label{width:100%;line-height:20px;font-size:14px;font-style:normal;font-weight:400;text-overflow:ellipsis;overflow:hidden}.popup-container .items .dropdown-viewport .item .label .primaryText{color:#181f33;font-family:Lato;font-size:14px;line-height:20px;letter-spacing:.2px}.popup-container .items .dropdown-viewport .item .label .secondaryText{color:#6a737d;font-family:Lato;font-size:14px;line-height:20px;letter-spacing:.2px}.popup-container .items .dropdown-viewport .item .icon-container{width:10%;display:flex;justify-content:flex-end}.popup-container .items .dropdown-viewport .item .icon-container .icon{width:20px;height:20px}.popup-container .items .item-disabled{cursor:not-allowed!important}.popup-container .items .item-disabled:focus-visible,.popup-container .items .item-disabled:hover{background-color:transparent!important;outline:none!important}.popup-container .items .item-disabled .label>span{color:#929dab!important;-webkit-user-select:none!important;-moz-user-select:none!important
|
|
140
|
+
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:focus-visible,.main-container .dropdown:hover{background-color:#f5f7fc;outline:none}.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 .dropdown .img-container{width:20px;height:20px}.main-container .dropdown-port{background:#e6ebf7}.popup-container{width:100%;max-height:340px;padding-bottom:0;border:1px solid #e0e0e0;border-radius:8px;background-color:#fff;box-shadow:0 12px 24px 0 rgba(0,0,0,.12);display:flex;flex-direction:column;overflow:hidden;justify-content:space-between}.popup-container::-webkit-scrollbar{width:0;height:0}.popup-container .search-container{position:relative;box-sizing:border-box;padding:8px}.popup-container .search-container .search-icon{position:absolute;width:24px;height:24px;top:50%;transform:translateY(-50%);left:18px;z-index:1}.popup-container .search-container .search-input{height:40px;width:100%;padding:12px;border:1px solid #e0e0e0;box-sizing:border-box;border-radius:8px;outline:none;caret-color:#0937b2;font-style:normal;font-weight:400;font-size:12px;line-height:18px;display:flex;align-items:center;letter-spacing:.2px;color:#181f33}.popup-container .search-container .cancel-icon{position:absolute;cursor:pointer;width:24px;height:24px;top:50%;transform:translateY(-50%);right:18px;z-index:1}.popup-container .items{padding:8px 0 8px 8px;overflow-y:scroll}.popup-container .items::-webkit-scrollbar{width:5px;height:0}.popup-container .items::-webkit-scrollbar-thumb{background:#9aa7b4;border-radius:10px}.popup-container .items .noData{display:flex;justify-content:center;align-items:center;font-style:normal;font-weight:400;font-size:14px;line-height:20px;letter-spacing:.2px;color:#181f33}.popup-container .items .dropdown-viewport{height:200px}.popup-container .items .dropdown-viewport .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}.popup-container .items .dropdown-viewport .item:focus-visible,.popup-container .items .dropdown-viewport .item:hover{background-color:#f5f7fc;outline:none}.popup-container .items .dropdown-viewport .item .label{width:100%;line-height:20px;font-size:14px;font-style:normal;font-weight:400;text-overflow:ellipsis;overflow:hidden}.popup-container .items .dropdown-viewport .item .label .primaryText{color:#181f33;font-family:Lato;font-size:14px;line-height:20px;letter-spacing:.2px}.popup-container .items .dropdown-viewport .item .label .secondaryText{color:#6a737d;font-family:Lato;font-size:14px;line-height:20px;letter-spacing:.2px}.popup-container .items .dropdown-viewport .item .icon-container{width:10%;display:flex;justify-content:flex-end}.popup-container .items .dropdown-viewport .item .icon-container .icon{width:20px;height:20px}.popup-container .items .item-disabled{cursor:not-allowed!important}.popup-container .items .item-disabled:focus-visible,.popup-container .items .item-disabled:hover{background-color:transparent!important;outline:none!important}.popup-container .items .item-disabled .label>span{color:#929dab!important;-webkit-user-select:none!important;-moz-user-select:none!important;user-select:none!important}.popup-container .items .item-selected{background-color:#e0e6f6;outline:none}.popup-container .items .icon-only{justify-content:center!important}::-webkit-scrollbar{height:8px;width:8px;background:#fff;border-radius:13px}::-webkit-scrollbar-thumb{background:#c8cdd3;border-radius:13px;cursor:pointer}.status-container{display:flex;justify-content:center;align-items:center;height:128px}.status-container p{text-align:center}"]
|
|
141
141
|
},] }
|
|
142
142
|
];
|
|
143
143
|
DropdownComponent.ctorParameters = () => [
|
|
@@ -251,7 +251,7 @@ DynamicFormComponent.decorators = [
|
|
|
251
251
|
{ type: Component, args: [{
|
|
252
252
|
selector: "mis-dynamic-form",
|
|
253
253
|
template: "<form [formGroup]=\"dynamicForm\">\n <ng-container formArrayName=\"dynamicFields\">\n <ng-container [formGroupName]=\"i\" *ngFor=\"let fieldControl of getDynamicFieldsControls().controls; let i = index\">\n <ng-container\n [ngTemplateOutlet]=\"dynamicField\"\n [ngTemplateOutletContext]=\"{\n $implicit: formFields[i],\n formGroup: fieldControl,\n control: fieldControl.controls.value\n }\"\n >\n </ng-container>\n <div class=\"sub-dynamic-form\" *ngIf=\"fieldControl.value && (!!formFields[i]?.subFields && formFields[i]?.subFields?.length > 0 && matchParentConfig(formFields[i]?.subFields, fieldControl.controls.value.value.value))\">\n <ng-container *ngFor=\"let subFieldControl of fieldControl.controls.subFields.controls;\">\n <ng-container\n [ngTemplateOutlet]=\"dynamicField\"\n [ngTemplateOutletContext]=\"{\n $implicit: formFields[i].subFields[findSelectedIndex(formFields[i]?.subFields, fieldControl.controls.value.value.value)],\n control: subFieldControl\n }\">\n </ng-container>\n </ng-container>\n </div>\n </ng-container>\n </ng-container>\n</form>\n\n\n<ng-template #dynamicField let-field let-control=\"control\" let-formgroup=\"formGroup\">\n\n <!-- fieldType: 'input' fieldInputType: 'text' | 'number' -->\n <div class=\"dynamic-field multi-line-field-container\"\n *ngIf=\"field.fieldType === 'input' && (field.fieldInputType === 'text' || field.fieldInputType === 'number')\">\n <p class=\"h7 field-title-sm\">\n {{ field.title }}\n </p>\n <div style=\"flex-basis: 100%\"></div>\n <input class=\"input-field ip-text\" [type]=\"field.fieldInputType\" [formControl]=\"control\"\n (ngModelChange)=\"updateSubDynamicFields(field, formgroup, $event)\" \n [ngStyle]=\"{'border': control.touched && control.errors ? '1px solid #B00020': ''}\"\n [placeholder]=\"field.placeholderText ? field.placeholderText : 'Input Text'\" \n [min]=\"field.fieldInputType === 'number' ? 0 : '' \"/>\n <ng-container *ngIf=\"control.touched && control.errors\"\n [ngTemplateOutlet]=\"dynamicFieldErrors\" \n [ngTemplateOutletContext]=\"{ $implicit: control.errors }\"\n >\n </ng-container>\n </div>\n\n <!-- fieldType: 'input' fieldInputType: 'textarea' -->\n <div class=\"dynamic-field multi-line-field-container\"\n *ngIf=\"field.fieldType === 'input' && field.fieldInputType === 'textarea'\">\n <p class=\"h7 field-title-sm\">\n {{ field.title }}\n </p>\n <div style=\"flex-basis: 100%\"></div>\n <textarea class=\"input-field ip-textarea\" type=\"text\"\n [ngStyle]=\"{'border': control.touched && control.errors ? '1px solid #B00020': ''}\"\n [placeholder]=\"field.placeholderText ? field.placeholderText : 'Input Text'\" [formControl]=\"control\" (ngModelChange)=\"updateSubDynamicFields(field, formgroup, $event)\"></textarea>\n <ng-container *ngIf=\"control.touched && control.errors\" [ngTemplateOutlet]=\"dynamicFieldErrors\"\n [ngTemplateOutletContext]=\"{ $implicit: control.errors }\">\n </ng-container>\n </div>\n\n <!-- fieldType: 'input' fieldInputType: 'date' -->\n <div class=\"dynamic-field single-line-field-container\"\n *ngIf=\"field.fieldType === 'input' && field.fieldInputType === 'date'\">\n <p class=\"h6\">\n {{ field.title }}\n </p>\n <div class=\"date-picker-container\">\n <input class=\"date-picker\" readonly misTzDp [dpConfig]=\"field.fieldConfig\"\n (dateChange)=\"control.setValue($event)\" [selectedDate]=\"control.value\" [offsetY]=\"0\"\n [value]=\"control.value\" #dp />\n <img alt=\"data-picker\" *ngIf=\"calendarIconUrl\" class=\"date-picker-icon\" [src]=\"calendarIconUrl\"\n (click)=\"dp.click()\" />\n </div>\n <ng-container *ngIf=\"control.touched && control.errors\" [ngTemplateOutlet]=\"dynamicFieldErrors\"\n [ngTemplateOutletContext]=\"{ $implicit: control.errors }\">\n </ng-container>\n </div>\n\n <!-- fieldType: 'boolean' fieldInputType: 'toggle' -->\n <div class=\"dynamic-field single-line-field-container\"\n *ngIf=\"field.fieldType === 'boolean' && field.fieldInputType === 'toggle'\">\n <p class=\"h6\">\n {{ field.title }}\n </p>\n <mis-switch [control]=\"control\" (valueChanged)=\"updateSubDynamicFields(field, formgroup, $event)\"></mis-switch>\n <ng-container *ngIf=\"control.touched && control.errors\" [ngTemplateOutlet]=\"dynamicFieldErrors\"\n [ngTemplateOutletContext]=\"{ $implicit: control.errors }\">\n </ng-container>\n </div>\n\n <!-- fieldType: 'singleSelect' fieldInputType: 'dropdown' -->\n <div class=\"dynamic-field single-line-field-container\"\n *ngIf=\"field.fieldType === 'singleSelect' && field.fieldInputType === 'dropdown'\">\n <p class=\"h6\">\n {{ field.title }}\n </p>\n <mis-dropdown [searchEnabled]=\"false\" [width]=\"'140px'\" [data]=\"field.itemsList\" [selectedItem]=\"control.value\"\n (onChange)=\"updateSelectedValueForSingleSelect(field, control, formgroup, $event);\">\n </mis-dropdown>\n <ng-container *ngIf=\"control.touched && control.errors\" [ngTemplateOutlet]=\"dynamicFieldErrors\"\n [ngTemplateOutletContext]=\"{ $implicit: control.errors }\">\n </ng-container>\n </div>\n\n <!-- fieldType: 'singleSelect' fieldInputType: 'radio' -->\n <div class=\"dynamic-field multi-line-field-container\"\n *ngIf=\"field.fieldType === 'singleSelect' && field.fieldInputType === 'radio'\">\n <p class=\"h7 field-title-sm\">\n {{ field.title }}\n </p>\n <div style=\"flex-basis: 100%\"></div>\n <div id=\"checkboxes-container\">\n <div class=\"radio-checkbox-common\" *ngFor=\"let item of field.itemsList\"\n [ngClass]=\"{ 'checkbox-active': item.label === control.value?.label }\"\n (click)=\"updateSelectedValueForSingleSelect(field, control, formgroup, item);\">\n <img *ngIf=\"(item.label === control.value?.label) && activeBtnIconUrl\" [src]=\"activeBtnIconUrl\" alt=\"\" />\n <p class=\"h6\">{{ item.label }}</p>\n </div>\n </div>\n <ng-container *ngIf=\"control.touched && control.errors\" [ngTemplateOutlet]=\"dynamicFieldErrors\"\n [ngTemplateOutletContext]=\"{ $implicit: control.errors }\">\n </ng-container>\n </div>\n\n <!-- fieldType: 'multiSelect' fieldInputType: 'checkbox' -->\n <div class=\"dynamic-field multi-line-field-container\"\n *ngIf=\"field.fieldType === 'multiSelect' && field.fieldInputType === 'checkbox'\">\n <p class=\"h7 field-title-sm\">\n {{ field.title }}\n </p>\n <div style=\"flex-basis: 100%\"></div>\n <div id=\"checkboxes-container\">\n <div class=\"radio-checkbox-common\" *ngFor=\"let item of field.itemsList\"\n [ngClass]=\"{ 'checkbox-active': isCheckBoxSelected(item.label, control.value) }\"\n (click)=\"updateSelectedValueForMultiSelect(field, control, formgroup, [item])\">\n <img *ngIf=\"isCheckBoxSelected(item.label, control.value) && activeBtnIconUrl\" [src]=\"activeBtnIconUrl\"\n alt=\"\" />\n <p class=\"h6\">{{ item.label }}</p>\n </div>\n </div>\n <ng-container *ngIf=\"control.touched && control.errors\" [ngTemplateOutlet]=\"dynamicFieldErrors\"\n [ngTemplateOutletContext]=\"{ $implicit: control.errors }\">\n </ng-container>\n </div>\n\n <!-- fieldType: 'multiSelect' fieldInputType: 'dropdown' -->\n <div class=\"dynamic-field single-line-field-container\"\n *ngIf=\"field.fieldType === 'multiSelect' && field.fieldInputType === 'dropdown'\">\n <p class=\"h6\">\n {{ field.title }}\n </p>\n <mis-multi-select-dropdown [width]=\"'140px'\" [showSelectedCount]=\"true\" [dropdownListWidth]=\"'256px'\"\n [searchEnabled]=\"false\" [hideApplyButton]=\"true\" [data]=\"field.itemsList\"\n [selectedItems]=\"control.value\" (onChange)=\"updateSelectedValueForMultiSelect(field, control, formgroup, $event);\"></mis-multi-select-dropdown>\n <ng-container *ngIf=\"control.touched && control.errors\" [ngTemplateOutlet]=\"dynamicFieldErrors\"\n [ngTemplateOutletContext]=\"{ $implicit: control.errors }\">\n </ng-container>\n </div>\n\n</ng-template>\n\n<ng-template #dynamicFieldErrors let-errors>\n <div id=\"error-messages-container\">\n <ng-container *ngFor=\"let error of errors | keyvalue\">\n <p class=\"h8\">\n {{\" \u2022 \" + error.value}}\n </p>\n <div style=\"flex-basis: 100%; height: 0\"></div>\n </ng-container>\n </div>\n</ng-template>",
|
|
254
|
-
styles: ["p{margin:0;cursor:default}::ng-deep .main-container{margin:0;max-width:100%}.sub-dynamic-form{padding-left:24px}.dynamic-field ::ng-deep .container{height:32px!important}.single-line-field-container{justify-content:space-between;align-items:center}.multi-line-field-container,.single-line-field-container{display:flex;padding:28px 16px;border-bottom:1px solid var(--grey-seperators)}.multi-line-field-container{justify-content:flex-start;align-items:flex-start;flex-wrap:wrap}.field-title-sm{margin-bottom:8px;cursor:default}.input-field{width:100%;background-color:var(--grey-bg-1);border:1px solid var(--grey-seperators);border-radius:6px}.ip-text{height:44px;padding:8px 12px}.ip-textarea{max-height:94px;padding:8px}input:focus{outline:none}input::-moz-placeholder{color:var(--grey-seperators)}input
|
|
254
|
+
styles: ["p{margin:0;cursor:default}::ng-deep .main-container{margin:0;max-width:100%}.sub-dynamic-form{padding-left:24px}.dynamic-field ::ng-deep .container{height:32px!important}.single-line-field-container{justify-content:space-between;align-items:center}.multi-line-field-container,.single-line-field-container{display:flex;padding:28px 16px;border-bottom:1px solid var(--grey-seperators)}.multi-line-field-container{justify-content:flex-start;align-items:flex-start;flex-wrap:wrap}.field-title-sm{margin-bottom:8px;cursor:default}.input-field{width:100%;background-color:var(--grey-bg-1);border:1px solid var(--grey-seperators);border-radius:6px}.ip-text{height:44px;padding:8px 12px}.ip-textarea{max-height:94px;padding:8px}input:focus{outline:none}input::-moz-placeholder{color:var(--grey-seperators)}input::placeholder{color:var(--grey-seperators)}textarea:focus{outline:none}.date-picker-container{position:relative;width:140px}.date-picker-container .date-picker{cursor:pointer;height:32px;width:100%;font-size:14px;border-radius:6px;padding:0 12px;border:1px solid var(--grey-seperators);inset:10px auto auto 80px;background-color:var(--text-white)}.date-picker-container .date-picker:hover{background-color:var(--grey-hover)}.date-picker-container .date-picker-icon{position:absolute;top:50%;right:12px;transform:translateY(-50%);cursor:pointer}form .dynamic-field:last-child{border-bottom:none!important}#checkboxes-container{display:flex;justify-content:flex-start;align-items:center;flex-wrap:wrap}.radio-checkbox-common{display:flex;justify-content:center;align-items:center;cursor:pointer;margin-right:8px;margin-bottom:8px;background-color:var(--text-white);padding:12px 16px;border:1px solid var(--text-muted);border-radius:8px}.radio-checkbox-common p{color:var(--text-muted);cursor:pointer}.radio-checkbox-common img{margin-right:8px}.checkbox-active{background-color:var(--pmry-500)}.checkbox-active p{color:var(--text-white)}#error-messages-container{margin-top:4px;width:100%;display:flex;justify-content:flex-start;align-items:center;flex-wrap:wrap}#error-messages-container p{color:var(--sem-error)}"]
|
|
255
255
|
},] }
|
|
256
256
|
];
|
|
257
257
|
DynamicFormComponent.ctorParameters = () => [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mis-crystal-design-system-input-stepper.js","sources":["../../../projects/mis-components/input-stepper/input-stepper/input-stepper.component.ts","../../../projects/mis-components/input-stepper/input-stepper.module.ts","../../../projects/mis-components/input-stepper/mis-crystal-design-system-input-stepper.ts"],"sourcesContent":["import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\n\n@Component({\n selector: 'mis-input-stepper',\n templateUrl: './input-stepper.component.html',\n styleUrls: ['./input-stepper.component.css']\n})\nexport class InputStepperComponent {\n @Input() value: number = 1;\n @Input() width?: string = '200px';\n @Input() minLimit : number = 0;\n @Input() maxLimit: number = 2;\n @Output() valueChange: EventEmitter<number> = new EventEmitter<number>();\n\n constructor() { }\n\n increment() {\n this.value++;\n this.emitValueChange();\n }\n\n decrement() {\n if (this.value > 0) {\n this.value--;\n this.emitValueChange();\n }\n }\n\n onInputChange(newValue: string) {\n const parsedValue = parseInt(newValue, 10);\n if (!isNaN(parsedValue)) {\n this.value = parsedValue;\n this.emitValueChange();\n }\n }\n\n private emitValueChange() {\n console.log(\"value change\", this.value);\n this.valueChange.emit(this.value);\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { InputStepperComponent } from './input-stepper/input-stepper.component';\n\n\n\n@NgModule({\n declarations: [\n InputStepperComponent\n ],\n imports: [\n CommonModule\n ],\n exports: [\n InputStepperComponent\n ]\n})\nexport class InputStepperModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAOa,qBAAqB;IAOhC;QANS,UAAK,GAAW,CAAC,CAAC;QAClB,UAAK,GAAY,OAAO,CAAC;QACzB,aAAQ,GAAY,CAAC,CAAC;QACtB,aAAQ,GAAW,CAAC,CAAC;QACpB,gBAAW,GAAyB,IAAI,YAAY,EAAU,CAAC;KAExD;IAEjB,SAAS;QACP,IAAI,CAAC,KAAK,EAAE,CAAC;QACb,IAAI,CAAC,eAAe,EAAE,CAAC;KACxB;IAED,SAAS;QACP,IAAI,IAAI,CAAC,KAAK,GAAG,CAAC,EAAE;YAClB,IAAI,CAAC,KAAK,EAAE,CAAC;YACb,IAAI,CAAC,eAAe,EAAE,CAAC;SACxB;KACF;IAED,aAAa,CAAC,QAAgB;QAC5B,MAAM,WAAW,GAAG,QAAQ,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;QAC3C,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,EAAE;YACvB,IAAI,CAAC,KAAK,GAAG,WAAW,CAAC;YACzB,IAAI,CAAC,eAAe,EAAE,CAAC;SACxB;KACF;IAEO,eAAe;QACrB,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;QACxC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KACnC;;;
|
|
1
|
+
{"version":3,"file":"mis-crystal-design-system-input-stepper.js","sources":["../../../projects/mis-components/input-stepper/input-stepper/input-stepper.component.ts","../../../projects/mis-components/input-stepper/input-stepper.module.ts","../../../projects/mis-components/input-stepper/mis-crystal-design-system-input-stepper.ts"],"sourcesContent":["import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\n\n@Component({\n selector: 'mis-input-stepper',\n templateUrl: './input-stepper.component.html',\n styleUrls: ['./input-stepper.component.css']\n})\nexport class InputStepperComponent {\n @Input() value: number = 1;\n @Input() width?: string = '200px';\n @Input() minLimit : number = 0;\n @Input() maxLimit: number = 2;\n @Output() valueChange: EventEmitter<number> = new EventEmitter<number>();\n\n constructor() { }\n\n increment() {\n if(this.value === this.maxLimit) return;\n this.value++;\n this.emitValueChange();\n }\n\n decrement() {\n if (this.value > 0) {\n this.value--;\n this.emitValueChange();\n }\n }\n\n onInputChange(newValue: string) {\n const parsedValue = parseInt(newValue, 10);\n if (!isNaN(parsedValue)) {\n this.value = parsedValue;\n this.emitValueChange();\n }\n }\n\n private emitValueChange() {\n console.log(\"value change\", this.value);\n this.valueChange.emit(this.value);\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { InputStepperComponent } from './input-stepper/input-stepper.component';\n\n\n\n@NgModule({\n declarations: [\n InputStepperComponent\n ],\n imports: [\n CommonModule\n ],\n exports: [\n InputStepperComponent\n ]\n})\nexport class InputStepperModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAOa,qBAAqB;IAOhC;QANS,UAAK,GAAW,CAAC,CAAC;QAClB,UAAK,GAAY,OAAO,CAAC;QACzB,aAAQ,GAAY,CAAC,CAAC;QACtB,aAAQ,GAAW,CAAC,CAAC;QACpB,gBAAW,GAAyB,IAAI,YAAY,EAAU,CAAC;KAExD;IAEjB,SAAS;QACP,IAAG,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,QAAQ;YAAE,OAAO;QACxC,IAAI,CAAC,KAAK,EAAE,CAAC;QACb,IAAI,CAAC,eAAe,EAAE,CAAC;KACxB;IAED,SAAS;QACP,IAAI,IAAI,CAAC,KAAK,GAAG,CAAC,EAAE;YAClB,IAAI,CAAC,KAAK,EAAE,CAAC;YACb,IAAI,CAAC,eAAe,EAAE,CAAC;SACxB;KACF;IAED,aAAa,CAAC,QAAgB;QAC5B,MAAM,WAAW,GAAG,QAAQ,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;QAC3C,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,EAAE;YACvB,IAAI,CAAC,KAAK,GAAG,WAAW,CAAC;YACzB,IAAI,CAAC,eAAe,EAAE,CAAC;SACxB;KACF;IAEO,eAAe;QACrB,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;QACxC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KACnC;;;YAtCF,SAAS,SAAC;gBACT,QAAQ,EAAE,mBAAmB;gBAC7B,4WAA6C;;aAE9C;;;;oBAEE,KAAK;oBACL,KAAK;uBACL,KAAK;uBACL,KAAK;0BACL,MAAM;;;MCKI,kBAAkB;;;YAX9B,QAAQ,SAAC;gBACR,YAAY,EAAE;oBACZ,qBAAqB;iBACtB;gBACD,OAAO,EAAE;oBACP,YAAY;iBACb;gBACD,OAAO,EAAE;oBACP,qBAAqB;iBACtB;aACF;;;AChBD;;;;;;"}
|
|
@@ -67,7 +67,7 @@ MisInputComponent.decorators = [
|
|
|
67
67
|
{ type: Component, args: [{
|
|
68
68
|
selector: "mis-input",
|
|
69
69
|
template: "<div\n [class]=\"'input-container ' + size\"\n [ngClass]=\"{\n rounded: type === 'rounded',\n floating: type === 'floating',\n 'has-error': !inputValidity || hasError,\n 'no-hint': noHints,\n 'mis-disabled': inputCtrl?.disabled\n }\"\n>\n <div class=\"input-wrapper\">\n <ng-content select=\"[mis-input-icon]\"></ng-content>\n <div class=\"mis-input\">\n <ng-content select=\"input\"></ng-content>\n <span class=\"mis-placeholder\">{{ placeholder }}<span *ngIf=\"isMandatory\" style=\"color: red;\">*</span></span>\n </div>\n <ng-content select=\"[mis-input-act]\"></ng-content>\n </div>\n <ng-content select=\"[mis-input-hint]\"></ng-content>\n <ng-content select=\"[mis-input-error]\"></ng-content>\n</div>\n",
|
|
70
|
-
styles: [":root{--pmry-200:#99baf7;--pmry-100:#cbddfb;--pmry-500:#0937b2;--pmry-400:#3c68d0;--pmry-600:#062a99;--pmry-700:#041f80;--pmry-300:#638fe7;--pmry-800:#021567;--pmry-900:#010f55;--sec-d-purple:#40447f;--sec-maroon:#6b034e;--sec-mud-red:#b23600;--sec-orange:#ed711c;--sec-purple:#815fd5;--sec-teal:#10adae;--sec-yellow:#d4900c;--sec-green:#547f40;--sec-bright-green:#27d22e;--sec-dark-teal:#035f6b;--sec-chocolate:#7c2f33;--sec-rube-pink:#c13d6d;--sec-cerulean:#0087b2;--sem-error:#b00020;--sem-info:#0091ff;--sem-warning:#ff9d00;--sem-success:#38af49;--grey-bg-1:#fafafa;--grey-bg:#f5f5f5;--grey-seperators:#e0e0e0;--grey-disabled:#c8cdd3;--grey-hover:#f5f7fc;--grey-pressed:#e6ebf7;--grey-row:#f5f7fc;--dec-light-yellow:#f4e7c3;--dec-light-purple:#dacff9;--dec-light-green:#e4f5e9;--dec-light-green2:#f1fff3;--dec-light-pink:#fae1ea;--dec-:#f4cbc1;--dec-lt-orange:#faefed;--dec-light-blue:#cfecf9;--dec-row-selection:#f1fdf8;--dec-row-selection2:#f2fbff;--dec-row-lines:#d3e1e9;--text-white:#fff;--text-disabled:#929dab;--text-muted:#6a737d;--text-black:#181f33;--MR-solid-blue2:#c8d5f6;--MR-solid-purple:#c9c3fb;--MR-solid-orange:#eeac9f;--MR-solid-green:#acdada;--MR-solid-brown:#e8c8af;--MR-solid-yellow:#ffefc7;--MR-solid-blue:#bbe6ff;--MR-solid-pink:#ffc6f2;--tr-hover:#f0f3fa;--tr-pressed:#dae1f3}.input-container{position:relative;padding-bottom:24px}.input-container.mis-disabled .input-wrapper{pointer-events:none!important}.input-container .input-wrapper{box-sizing:border-box;display:flex;align-items:center;flex-direction:row;flex-wrap:nowrap;transition:all 60ms ease-in;background-color:#fff;padding:3px 16px;gap:16px}.input-container .input-wrapper .mis-input{flex:1 1 auto;z-index:0;position:relative;display:flex;align-items:center}.input-container .input-wrapper input{flex:1 1 auto;border:none;outline:none;height:100%;padding:0;font-family:Lato;font-style:normal;font-weight:400;font-size:16px;height:24px;color:#181f33;background-color:transparent;width:100%;vertical-align:middle}.input-container .input-wrapper input::-moz-placeholder{-moz-transition:all .1s ease-in;transition:all .1s ease-in;opacity:0;transform-origin:left center;color:transparent}.input-container .input-wrapper input
|
|
70
|
+
styles: [":root{--pmry-200:#99baf7;--pmry-100:#cbddfb;--pmry-500:#0937b2;--pmry-400:#3c68d0;--pmry-600:#062a99;--pmry-700:#041f80;--pmry-300:#638fe7;--pmry-800:#021567;--pmry-900:#010f55;--sec-d-purple:#40447f;--sec-maroon:#6b034e;--sec-mud-red:#b23600;--sec-orange:#ed711c;--sec-purple:#815fd5;--sec-teal:#10adae;--sec-yellow:#d4900c;--sec-green:#547f40;--sec-bright-green:#27d22e;--sec-dark-teal:#035f6b;--sec-chocolate:#7c2f33;--sec-rube-pink:#c13d6d;--sec-cerulean:#0087b2;--sem-error:#b00020;--sem-info:#0091ff;--sem-warning:#ff9d00;--sem-success:#38af49;--grey-bg-1:#fafafa;--grey-bg:#f5f5f5;--grey-seperators:#e0e0e0;--grey-disabled:#c8cdd3;--grey-hover:#f5f7fc;--grey-pressed:#e6ebf7;--grey-row:#f5f7fc;--dec-light-yellow:#f4e7c3;--dec-light-purple:#dacff9;--dec-light-green:#e4f5e9;--dec-light-green2:#f1fff3;--dec-light-pink:#fae1ea;--dec-:#f4cbc1;--dec-lt-orange:#faefed;--dec-light-blue:#cfecf9;--dec-row-selection:#f1fdf8;--dec-row-selection2:#f2fbff;--dec-row-lines:#d3e1e9;--text-white:#fff;--text-disabled:#929dab;--text-muted:#6a737d;--text-black:#181f33;--MR-solid-blue2:#c8d5f6;--MR-solid-purple:#c9c3fb;--MR-solid-orange:#eeac9f;--MR-solid-green:#acdada;--MR-solid-brown:#e8c8af;--MR-solid-yellow:#ffefc7;--MR-solid-blue:#bbe6ff;--MR-solid-pink:#ffc6f2;--tr-hover:#f0f3fa;--tr-pressed:#dae1f3}.input-container{position:relative;padding-bottom:24px}.input-container.mis-disabled .input-wrapper{pointer-events:none!important}.input-container .input-wrapper{box-sizing:border-box;display:flex;align-items:center;flex-direction:row;flex-wrap:nowrap;transition:all 60ms ease-in;background-color:#fff;padding:3px 16px;gap:16px}.input-container .input-wrapper .mis-input{flex:1 1 auto;z-index:0;position:relative;display:flex;align-items:center}.input-container .input-wrapper input{flex:1 1 auto;border:none;outline:none;height:100%;padding:0;font-family:Lato;font-style:normal;font-weight:400;font-size:16px;height:24px;color:#181f33;background-color:transparent;width:100%;vertical-align:middle}.input-container .input-wrapper input::-moz-placeholder{-moz-transition:all .1s ease-in;transition:all .1s ease-in;opacity:0;transform-origin:left center;color:transparent}.input-container .input-wrapper input::placeholder{transition:all .1s ease-in;opacity:0;transform-origin:left center;color:transparent}.input-container .input-wrapper .mis-placeholder{position:absolute;font-family:Lato;font-style:normal;font-weight:400;font-size:16px;line-height:24px;color:#6a737d;z-index:-1;transition:all .15s ease-in}.input-container .input-wrapper:focus-within{background-color:#f5f5f5}.input-container .input-wrapper:focus-within{border:1px solid #0937b2}.input-container .input-wrapper [mis-input-act],.input-container .input-wrapper [mis-input-icon]{width:18px;height:18px;color:#6a737d;font-size:24px;line-height:18px}.input-container .input-wrapper [mis-input-act]{cursor:pointer}.input-container.no-hint{padding-bottom:0}.input-container.rounded input{box-sizing:initial}.input-container.rounded.sm input{padding:3px 16px}.input-container.rounded.md input{padding:9px 16px}.input-container.rounded.lg input{padding:15px 16px}.input-container.rounded .input-wrapper{border-radius:4px;border:1px solid #e0e0e0;padding:0}.input-container.rounded .input-wrapper:hover{background-color:#f5f5f5}.input-container.rounded .input-wrapper:focus-within{border:1px solid #0937b2}.input-container.rounded .input-wrapper input:not(:-moz-placeholder-shown)+.mis-placeholder{color:transparent!important}.input-container.rounded .input-wrapper input:not(:placeholder-shown)+.mis-placeholder{color:transparent!important}.input-container.rounded .input-wrapper .mis-placeholder{margin-left:16px;transition-duration:50ms}.input-container.rounded.has-error .input-wrapper{border:1px solid #b00020!important}.input-container.floating .input-wrapper{padding-top:24px;padding-bottom:7px;border-bottom:1px solid #e0e0e0}.input-container.floating .input-wrapper input:focus+.mis-placeholder{color:#0937b2!important}.input-container.floating .input-wrapper input:not(:-moz-placeholder-shown)+.mis-placeholder{transform:translateY(calc(-100% + 6px))!important;font-size:12px!important;letter-spacing:.2px!important}.input-container.floating .input-wrapper input:focus+.mis-placeholder,.input-container.floating .input-wrapper input:not(:placeholder-shown)+.mis-placeholder{transform:translateY(calc(-100% + 6px))!important;font-size:12px!important;letter-spacing:.2px!important}.input-container.floating .input-wrapper:focus-within{border:none;border-bottom:1px solid #0937b2}.input-container.floating .input-wrapper:focus-within input::-moz-placeholder{color:#6a737d;opacity:1;font-size:16px}.input-container.floating .input-wrapper:focus-within input::placeholder{color:#6a737d;opacity:1;font-size:16px}.input-container.floating.has-error .input-wrapper{border-bottom:1px solid #b00020!important}.input-container.floating.has-error .input-wrapper .mis-placeholder{color:#b00020!important}.input-container [mis-input-error],.input-container [mis-input-hint]{position:absolute;left:0;right:0;bottom:0;line-height:24px;height:24px;font-size:12px;color:#6a737d;letter-spacing:.2px}.input-container [mis-input-error]{color:#b00020}"]
|
|
71
71
|
},] }
|
|
72
72
|
];
|
|
73
73
|
MisInputComponent.ctorParameters = () => [];
|
|
@@ -12,7 +12,7 @@ LoaderComponent.decorators = [
|
|
|
12
12
|
{ type: Component, args: [{
|
|
13
13
|
selector: "mis-loader",
|
|
14
14
|
template: "<div\n id=\"spinner\"\n [ngClass]=\"{\n mobile: mobileView\n }\"\n></div>\n",
|
|
15
|
-
styles: ["#spinner{
|
|
15
|
+
styles: ["#spinner{animation:frames 1s linear infinite;background:transparent;border-radius:100%;border:4px solid #e0e0e0;border-top-color:#6200ee;width:40px;height:40px;padding:0;position:absolute}@keyframes frames{0%{transform:rotate(0deg)}to{transform:rotate(359deg)}}.mobile{height:20px!important;width:20px!important;border:2px solid #e0e0e0!important;border-top-color:#6200ee!important}"]
|
|
16
16
|
},] }
|
|
17
17
|
];
|
|
18
18
|
LoaderComponent.ctorParameters = () => [];
|
|
@@ -242,7 +242,7 @@ MultiSelectDropdownComponent.decorators = [
|
|
|
242
242
|
{ type: Component, args: [{
|
|
243
243
|
selector: "mis-multi-select-dropdown",
|
|
244
244
|
template: "<div\n class=\"container\"\n [ngStyle]=\"{\n height: height.length > 0 ? height : '',\n width: width.length > 0 ? width : ''\n }\"\n>\n <div\n class=\"dropdown\"\n #select\n tabindex=\"0\"\n (keyup.enter)=\"toggleDropdown()\"\n (click)=\"toggleDropdown()\"\n [ngStyle]=\"{ background: isOpen ? '#E6EBF7' : '' }\"\n >\n <div class=\"label\">\n <ng-container *ngIf=\"!customLabelTemplate\">\n <p class=\"text\">{{ label }}</p>\n <p *ngIf=\"showSelectedCount && localSelectedItems?.length > 0\" class=\"count\">\n {{ localSelectedItems?.length }}\n </p>\n </ng-container>\n <ng-container *ngIf=\"customLabelTemplate\">\n <ng-container *ngTemplateOutlet=\"customLabelTemplate\">\n </ng-container>\n </ng-container>\n </div>\n <svg\n class=\"handle\"\n [ngStyle]=\"{ transform: isOpen ? 'rotate(180deg)' : 'rotate(0deg)' }\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M13.825 7.15845L10 10.9751L6.175 7.15845L5 8.33345L10 13.3334L15 8.33345L13.825 7.15845Z\"\n fill=\"#181F33\"\n />\n </svg>\n </div>\n</div>\n<ng-template #popupContainer>\n <div\n class=\"popup-container\"\n [ngStyle]=\"{\n 'height': dropdownListHeight,\n width: dropdownListWidth\n }\"\n [ngClass]=\"{\n 'position-left': dropdownListPosition === 'Left',\n 'position-right': dropdownListPosition === 'Right'\n }\"\n >\n <div *ngIf=\"searchEnabled\" class=\"search-container\">\n <svg\n *ngIf=\"!isSearchInputFocused\"\n class=\"search-icon\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M4.21508 11.1456C4.21508 7.3179 7.33722 4.21165 11.1926 4.21165C15.048 4.21165 18.1702 7.3179 18.1702 11.1456C18.1702 12.6931 17.6599 14.1226 16.7972 15.2767L15.3685 16.7013C14.2044 17.5668 12.759 18.0796 11.1926 18.0796C7.33722 18.0796 4.21508 14.9734 4.21508 11.1456ZM15.9421 17.7835C14.6021 18.7329 12.9627 19.2913 11.1926 19.2913C6.66977 19.2913 3 15.6461 3 11.1456C3 6.64512 6.66977 3 11.1926 3C15.7155 3 19.3852 6.64512 19.3852 11.1456C19.3852 12.9371 18.8037 14.5931 17.8184 15.9375L19.8361 17.4048C20.6705 17.912 21.7554 18.6543 20.2454 20.215C18.7353 21.7756 18.0099 20.6663 17.4991 19.8364L15.9421 17.7835Z\"\n fill=\"#6A737D\"\n />\n </svg>\n <input\n [ngModel]=\"searchInput\"\n [ngStyle]=\"{\n paddingLeft: isSearchInputFocused ? '12px' : '45px',\n border: isSearchInputFocused ? '1px solid #0937B2' : '1px solid #e0e0e0',\n paddingRight: isSearchInputFocused ? '45px' : '10px'\n }\"\n (ngModelChange)=\"searchInputOnChange($event)\"\n [placeholder]=\"isSearchInputFocused ? '' : 'Search Keyword'\"\n (focus)=\"searchInputFocused(true)\"\n class=\"search-input\"\n />\n <svg\n *ngIf=\"isSearchInputFocused\"\n class=\"cancel-icon\"\n (click)=\"searchInputCanceled($event)\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M8.87446 7.32144C8.44588 6.89285 7.751 6.89285 7.32242 7.32144C6.89383 7.75002 6.89383 8.4449 7.32242 8.87349L10.4488 11.9999L7.32357 15.1252C6.89498 15.5538 6.89498 16.2486 7.32357 16.6772C7.75215 17.1058 8.44703 17.1058 8.87561 16.6772L12.0009 13.552L15.1261 16.6772C15.5547 17.1058 16.2496 17.1058 16.6781 16.6772C17.1067 16.2486 17.1067 15.5537 16.6781 15.1251L13.5529 11.9999L16.6793 8.87354C17.1079 8.44496 17.1079 7.75008 16.6793 7.3215C16.2507 6.89291 15.5558 6.89291 15.1273 7.3215L12.0009 10.4479L8.87446 7.32144Z\"\n fill=\"#6A737D\"\n />\n </svg>\n </div>\n <div class=\"items\">\n <div\n class=\"item\"\n tabindex=\"0\"\n (keyup.enter)=\"toggleSelectedItems($event, item)\"\n (click)=\"toggleSelectedItems($event, item)\"\n *ngFor=\"let item of searchInput ? searchData : localData\"\n >\n <div class=\"checkbox-container-wrapper\">\n <div class=\"checkbox-container\">\n <mis-checkbox [checked]=\"item.checked\" tabindex=\"-1\"></mis-checkbox>\n </div>\n <p class=\"label\">\n {{ item.label }}\n </p>\n </div>\n <div class=\"icon-container\" *ngIf=\"item.icon\">\n <img class=\"icon\" [src]=\"item.icon\" alt=\"no img\" />\n </div>\n </div>\n <div class=\"noData\" *ngIf=\"(searchInput ? searchData : localData).length === 0\">\n {{ searchInput === \"\" ? noDataMessage : \"No results\" }}\n </div>\n </div>\n <div *ngIf=\"localData.length !== 0 && !hideApplyButton\" class=\"actions-container\">\n <div style=\"width: calc(50% - 4px)\">\n <mis-button [name]=\"'Reset'\" [type]=\"'Text'\" [width]=\"'100%'\" (click)=\"onReset()\"></mis-button>\n </div>\n <div style=\"width: calc(50% - 4px)\">\n <mis-button [name]=\"'Apply'\" [type]=\"'Solid'\" [width]=\"'100%'\" (click)=\"applyFilters()\"></mis-button>\n </div>\n </div>\n </div>\n</ng-template>\n",
|
|
245
|
-
styles: [".container{position:relative;display:flex;justify-content:center;align-items:center;flex-wrap:wrap;height:32px;width:256px;font-family:Lato,sans-serif!important}.container .dropdown{height:inherit;border:1px solid #e0e0e0;border-radius:6px;background-color:#fff;cursor:pointer;display:flex;justify-content:space-between;align-items:center;width:100%;padding:0 12px;overflow:hidden}.container .dropdown:focus-visible,.container .dropdown:hover{background-color:#f5f7fc;outline:none}.container .dropdown .label{display:flex;justify-content:flex-start;align-items:center;width:calc(100% - 32px)}.container .dropdown .label,.container .dropdown .label .text{font-style:normal;font-weight:400;font-size:14px;line-height:20px;letter-spacing:.2px;color:#181f33}.container .dropdown .label .text{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.container .dropdown .label .count{background-color:#e0e0e0;border-radius:50%;padding:2px 7px;margin:0 0 0 8px;font-style:normal;font-weight:400;font-size:14px;line-height:20px;text-align:center;letter-spacing:.2px;color:#181f33}.container .dropdown .handle{width:24px;height:24px;transition:.3s;position:absolute;right:12px;border-radius:50%;overflow:hidden}.popup-container{width:100%;max-height:340px;padding-bottom:0;border:1px solid #e0e0e0;border-radius:8px;background-color:#fff;box-shadow:0 12px 24px 0 rgba(0,0,0,.12);display:flex;flex-direction:column;overflow:hidden;justify-content:flex-start}.popup-container::-webkit-scrollbar{width:0;height:0}.popup-container .search-container{position:relative;box-sizing:border-box;padding:8px}.popup-container .search-container .search-icon{position:absolute;width:24px;height:24px;top:50%;transform:translateY(-50%);left:18px;z-index:1}.popup-container .search-container .search-input{height:40px;width:100%;padding:12px;border:1px solid #e0e0e0;box-sizing:border-box;border-radius:8px;outline:none;caret-color:#0937b2;font-style:normal;font-weight:400;font-size:12px;line-height:18px;display:flex;align-items:center;letter-spacing:.2px;color:#181f33}.popup-container .search-container .cancel-icon{position:absolute;cursor:pointer;width:24px;height:24px;top:50%;transform:translateY(-50%);right:18px;z-index:1}.popup-container .items{padding:8px 0 8px 8px;overflow-y:scroll}.popup-container .items::-webkit-scrollbar{width:5px;height:0}.popup-container .items::-webkit-scrollbar-thumb{background:#9aa7b4;border-radius:10px}.popup-container .items .noData{display:flex;justify-content:center;align-items:center;font-style:normal;font-weight:400;font-size:14px;line-height:20px;letter-spacing:.2px;color:#181f33}.popup-container .items .item{cursor:pointer;display:flex;justify-content:flex-start;align-items:center;padding:8px 12px;border-radius:6px;height:auto}.popup-container .items .item:focus-visible,.popup-container .items .item:hover{background-color:#f5f7fc;outline:none}.popup-container .items .item .checkbox-container-wrapper{display:flex;justify-content:flex-start;align-items:center;width:90%}.popup-container .items .item .checkbox-container-wrapper .checkbox-container{display:block;position:relative;cursor:pointer;font-size:22px;-webkit-user-select:none;-moz-user-select:none
|
|
245
|
+
styles: [".container{position:relative;display:flex;justify-content:center;align-items:center;flex-wrap:wrap;height:32px;width:256px;font-family:Lato,sans-serif!important}.container .dropdown{height:inherit;border:1px solid #e0e0e0;border-radius:6px;background-color:#fff;cursor:pointer;display:flex;justify-content:space-between;align-items:center;width:100%;padding:0 12px;overflow:hidden}.container .dropdown:focus-visible,.container .dropdown:hover{background-color:#f5f7fc;outline:none}.container .dropdown .label{display:flex;justify-content:flex-start;align-items:center;width:calc(100% - 32px)}.container .dropdown .label,.container .dropdown .label .text{font-style:normal;font-weight:400;font-size:14px;line-height:20px;letter-spacing:.2px;color:#181f33}.container .dropdown .label .text{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.container .dropdown .label .count{background-color:#e0e0e0;border-radius:50%;padding:2px 7px;margin:0 0 0 8px;font-style:normal;font-weight:400;font-size:14px;line-height:20px;text-align:center;letter-spacing:.2px;color:#181f33}.container .dropdown .handle{width:24px;height:24px;transition:.3s;position:absolute;right:12px;border-radius:50%;overflow:hidden}.popup-container{width:100%;max-height:340px;padding-bottom:0;border:1px solid #e0e0e0;border-radius:8px;background-color:#fff;box-shadow:0 12px 24px 0 rgba(0,0,0,.12);display:flex;flex-direction:column;overflow:hidden;justify-content:flex-start}.popup-container::-webkit-scrollbar{width:0;height:0}.popup-container .search-container{position:relative;box-sizing:border-box;padding:8px}.popup-container .search-container .search-icon{position:absolute;width:24px;height:24px;top:50%;transform:translateY(-50%);left:18px;z-index:1}.popup-container .search-container .search-input{height:40px;width:100%;padding:12px;border:1px solid #e0e0e0;box-sizing:border-box;border-radius:8px;outline:none;caret-color:#0937b2;font-style:normal;font-weight:400;font-size:12px;line-height:18px;display:flex;align-items:center;letter-spacing:.2px;color:#181f33}.popup-container .search-container .cancel-icon{position:absolute;cursor:pointer;width:24px;height:24px;top:50%;transform:translateY(-50%);right:18px;z-index:1}.popup-container .items{padding:8px 0 8px 8px;overflow-y:scroll}.popup-container .items::-webkit-scrollbar{width:5px;height:0}.popup-container .items::-webkit-scrollbar-thumb{background:#9aa7b4;border-radius:10px}.popup-container .items .noData{display:flex;justify-content:center;align-items:center;font-style:normal;font-weight:400;font-size:14px;line-height:20px;letter-spacing:.2px;color:#181f33}.popup-container .items .item{cursor:pointer;display:flex;justify-content:flex-start;align-items:center;padding:8px 12px;border-radius:6px;height:auto}.popup-container .items .item:focus-visible,.popup-container .items .item:hover{background-color:#f5f7fc;outline:none}.popup-container .items .item .checkbox-container-wrapper{display:flex;justify-content:flex-start;align-items:center;width:90%}.popup-container .items .item .checkbox-container-wrapper .checkbox-container{display:block;position:relative;cursor:pointer;font-size:22px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.popup-container .items .item .checkbox-container-wrapper .checkbox-container input{position:absolute;opacity:0;cursor:pointer;height:0;width:0}.popup-container .items .item .checkbox-container-wrapper .checkbox-container input:checked~.checkmark:after{display:block}.popup-container .items .item .checkbox-container-wrapper .checkbox-container .checkmark{position:absolute;top:-8px;left:0;height:15px;width:15px;border-radius:4px;background-color:#0079f1;border:1px solid #6a737d}.popup-container .items .item .checkbox-container-wrapper .checkbox-container .checkmark:after{content:\"\";position:absolute;display:none;left:5px;top:2px;width:3px;height:6px;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg)}.popup-container .items .item .checkbox-container-wrapper .label{margin:0 0 0 8px;line-height:20px;font-size:14px;font-style:normal;font-weight:400;letter-spacing:.2;text-overflow:ellipsis;overflow:hidden}.popup-container .items .item .icon-container{width:10%;display:flex;justify-content:flex-end}.popup-container .items .item .icon-container .icon{width:20px;height:20px}.popup-container .actions-container{display:flex;justify-content:space-between;bottom:0;align-items:center;position:sticky;padding:16px;background-color:#fff;border-top:1px solid #e0e0e0;margin-top:auto}.popup-container .actions-container .cancel{cursor:pointer;padding:10px 32px;text-align:center;font-size:16px;line-height:24px;border-radius:8px}.popup-container .actions-container .cancel:hover{background:rgba(9,55,178,.04)}.popup-container .actions-container .apply{cursor:pointer;padding:10px 32px;text-align:center;color:#fff;font-size:16px;line-height:24px;background:#0937b2;border-radius:8px}"]
|
|
246
246
|
},] }
|
|
247
247
|
];
|
|
248
248
|
MultiSelectDropdownComponent.ctorParameters = () => [
|
|
@@ -243,7 +243,7 @@ NestedMultiSelectDropdownComponent.decorators = [
|
|
|
243
243
|
{ type: Component, args: [{
|
|
244
244
|
selector: "mis-nested-multi-select-dropdown",
|
|
245
245
|
template: "<div\n class=\"container\"\n [ngStyle]=\"{\n height: height.length > 0 ? height : '',\n width: width.length > 0 ? width : ''\n }\"\n>\n <div\n class=\"dropdown\"\n #select\n tabindex=\"0\"\n (keyup.enter)=\"toggleDropdown()\"\n (click)=\"toggleDropdown()\"\n [ngStyle]=\"{ background: isOpen ? '#E6EBF7' : '' }\"\n >\n <div class=\"label\">\n <p class=\"text\">{{ label }}</p>\n <p *ngIf=\"showSelectedCount && selectedCount > 0\" class=\"count\">\n {{ selectedCount }}\n </p>\n </div>\n <svg\n class=\"handle\"\n [ngStyle]=\"{ transform: isOpen ? 'rotate(180deg)' : 'rotate(0deg)' }\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M13.825 7.15845L10 10.9751L6.175 7.15845L5 8.33345L10 13.3334L15 8.33345L13.825 7.15845Z\"\n fill=\"#181F33\"\n />\n </svg>\n </div>\n</div>\n<ng-template #popupContainer>\n <div\n class=\"popup-container\"\n [ngStyle]=\"{\n height: dropdownListHeight,\n width: dropdownListWidth\n }\"\n [ngClass]=\"{\n 'position-left': dropdownListPosition === 'Left',\n 'position-right': dropdownListPosition === 'Right'\n }\"\n >\n <div *ngIf=\"searchEnabled\" class=\"search-container\">\n <svg\n *ngIf=\"!isSearchInputFocused\"\n class=\"search-icon\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M4.21508 11.1456C4.21508 7.3179 7.33722 4.21165 11.1926 4.21165C15.048 4.21165 18.1702 7.3179 18.1702 11.1456C18.1702 12.6931 17.6599 14.1226 16.7972 15.2767L15.3685 16.7013C14.2044 17.5668 12.759 18.0796 11.1926 18.0796C7.33722 18.0796 4.21508 14.9734 4.21508 11.1456ZM15.9421 17.7835C14.6021 18.7329 12.9627 19.2913 11.1926 19.2913C6.66977 19.2913 3 15.6461 3 11.1456C3 6.64512 6.66977 3 11.1926 3C15.7155 3 19.3852 6.64512 19.3852 11.1456C19.3852 12.9371 18.8037 14.5931 17.8184 15.9375L19.8361 17.4048C20.6705 17.912 21.7554 18.6543 20.2454 20.215C18.7353 21.7756 18.0099 20.6663 17.4991 19.8364L15.9421 17.7835Z\"\n fill=\"#6A737D\"\n />\n </svg>\n <input\n [ngModel]=\"searchInput\"\n [ngStyle]=\"{\n paddingLeft: isSearchInputFocused ? '12px' : '45px',\n border: isSearchInputFocused ? '1px solid #0937B2' : '1px solid #e0e0e0',\n paddingRight: isSearchInputFocused ? '45px' : '10px'\n }\"\n (ngModelChange)=\"searchInputOnChange($event)\"\n [placeholder]=\"isSearchInputFocused ? '' : 'Search Keyword'\"\n (focus)=\"searchInputFocused(true)\"\n class=\"search-input\"\n />\n <svg\n *ngIf=\"isSearchInputFocused\"\n class=\"cancel-icon\"\n (click)=\"searchInputCanceled($event)\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M8.87446 7.32144C8.44588 6.89285 7.751 6.89285 7.32242 7.32144C6.89383 7.75002 6.89383 8.4449 7.32242 8.87349L10.4488 11.9999L7.32357 15.1252C6.89498 15.5538 6.89498 16.2486 7.32357 16.6772C7.75215 17.1058 8.44703 17.1058 8.87561 16.6772L12.0009 13.552L15.1261 16.6772C15.5547 17.1058 16.2496 17.1058 16.6781 16.6772C17.1067 16.2486 17.1067 15.5537 16.6781 15.1251L13.5529 11.9999L16.6793 8.87354C17.1079 8.44496 17.1079 7.75008 16.6793 7.3215C16.2507 6.89291 15.5558 6.89291 15.1273 7.3215L12.0009 10.4479L8.87446 7.32144Z\"\n fill=\"#6A737D\"\n />\n </svg>\n </div>\n <div class=\"items\">\n <div\n tabindex=\"0\"\n (keyup.enter)=\"toggleSelectedItems($event, item)\"\n (click)=\"toggleSelectedItems($event, item)\"\n *ngFor=\"let item of searchInput ? searchData : localData\"\n >\n <div class=\"item\">\n <div class=\"checkbox-container-wrapper\">\n <div class=\"checkbox-container\">\n <mis-checkbox [checked]=\"item.checked\"></mis-checkbox>\n </div>\n <p class=\"label\">\n {{ item.label }}\n </p>\n </div>\n <div class=\"icon-container\" *ngIf=\"item.icon\">\n <img class=\"icon\" [src]=\"item.icon\" alt=\"no img\" />\n </div>\n </div>\n <div *ngIf=\"item?.children?.length > 0\" class=\"items sub\" style=\"padding-right: 0\">\n <div\n class=\"item\"\n tabindex=\"0\"\n (keyup.enter)=\"toggleSelectedItems($event, item, cItem)\"\n (click)=\"toggleSelectedItems($event, item, cItem)\"\n *ngFor=\"let cItem of item?.children\"\n >\n <div class=\"checkbox-container-wrapper\">\n <div class=\"checkbox-container\">\n <mis-checkbox [checked]=\"cItem.checked\"></mis-checkbox>\n </div>\n <p class=\"label\">\n {{ cItem.label }}\n </p>\n </div>\n <div class=\"icon-container\" *ngIf=\"cItem.icon\">\n <img class=\"icon\" [src]=\"cItem.icon\" alt=\"no img\" />\n </div>\n </div>\n </div>\n </div>\n <div class=\"noData\" *ngIf=\"(searchInput ? searchData : localData).length === 0\">\n {{ searchInput === \"\" ? noDataMessage : \"No results\" }}\n </div>\n </div>\n <div *ngIf=\"localData.length !== 0\" class=\"actions-container\">\n <div style=\"width: calc(50% - 4px)\">\n <mis-button [name]=\"'Reset'\" [type]=\"'Text'\" [width]=\"'100%'\" (click)=\"onReset()\"></mis-button>\n </div>\n <div style=\"width: calc(50% - 4px)\">\n <mis-button [name]=\"'Apply'\" [type]=\"'Solid'\" [width]=\"'100%'\" (click)=\"applyFilters()\"></mis-button>\n </div>\n </div>\n </div>\n</ng-template>\n",
|
|
246
|
-
styles: ["::-webkit-scrollbar{width:5px}::-webkit-scrollbar-thumb{background:#9aa7b4}.container{position:relative;display:flex;justify-content:center;align-items:center;height:32px;width:256px;flex-wrap:wrap;font-family:Lato,sans-serif}.container .dropdown{height:inherit;border:1px solid #e0e0e0;border-radius:6px;background-color:#fff;cursor:pointer;display:flex;justify-content:space-between;align-items:center;width:100%;padding:0 12px;overflow:hidden}.container .dropdown:focus-visible,.container .dropdown:hover{background-color:#f5f7fc;outline:none}.container .dropdown .label{display:flex;justify-content:flex-start;align-items:center;width:calc(100% - 32px)}.container .dropdown .label,.container .dropdown .label .text{font-style:normal;font-weight:400;font-size:14px;line-height:20px;letter-spacing:.2px;color:#181f33}.container .dropdown .label .text{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.container .dropdown .label .count{background-color:#e0e0e0;border-radius:50%;padding:2px 7px;margin:0 0 0 8px;font-style:normal;font-weight:400;font-size:14px;line-height:20px;text-align:center;letter-spacing:.2px;color:#181f33}.container .dropdown .handle{width:24px;height:24px;transition:.3s;position:absolute;right:12px;border-radius:50%;overflow:hidden}.popup-container{position:absolute;top:4px;width:100%;max-height:340px;padding-bottom:0;border:1px solid #e0e0e0;border-radius:8px;background-color:#fff;box-shadow:0 12px 24px 0 rgba(0,0,0,.12);overflow-x:hidden;display:flex;flex-direction:column;justify-content:space-between;z-index:100}.popup-container::-webkit-scrollbar{width:0;height:0}.popup-container .search-container{position:relative;box-sizing:border-box;padding:8px}.popup-container .search-container .search-icon{position:absolute;width:24px;height:24px;top:50%;transform:translateY(-50%);left:18px;z-index:1}.popup-container .search-container .search-input{height:40px;width:100%;padding:12px;border:1px solid #e0e0e0;box-sizing:border-box;border-radius:8px;outline:none;caret-color:#0937b2;font-style:normal;font-weight:400;font-size:12px;line-height:18px;display:flex;align-items:center;letter-spacing:.2px;color:#181f33}.popup-container .search-container .cancel-icon{position:absolute;cursor:pointer;width:24px;height:24px;top:50%;transform:translateY(-50%);right:18px;z-index:1}.popup-container .items{padding:8px 0 8px 8px;overflow-y:scroll;height:100%}.popup-container .items::-webkit-scrollbar{width:5px;height:0}.popup-container .items::-webkit-scrollbar-thumb{background:#9aa7b4;border-radius:10px}.popup-container .items .noData{display:flex;justify-content:center;align-items:center;font-style:normal;font-weight:400;font-size:14px;line-height:20px;letter-spacing:.2px;color:#181f33}.popup-container .items .item{cursor:pointer;display:flex;justify-content:flex-start;align-items:center;padding:8px 12px;border-radius:6px;height:auto}.popup-container .items .item:focus-visible,.popup-container .items .item:hover{background-color:#f5f7fc;outline:none}.popup-container .items .item .checkbox-container-wrapper{display:flex;justify-content:flex-start;align-items:center;width:90%}.popup-container .items .item .checkbox-container-wrapper .checkbox-container{display:block;position:relative;cursor:pointer;font-size:22px;-webkit-user-select:none;-moz-user-select:none
|
|
246
|
+
styles: ["::-webkit-scrollbar{width:5px}::-webkit-scrollbar-thumb{background:#9aa7b4}.container{position:relative;display:flex;justify-content:center;align-items:center;height:32px;width:256px;flex-wrap:wrap;font-family:Lato,sans-serif}.container .dropdown{height:inherit;border:1px solid #e0e0e0;border-radius:6px;background-color:#fff;cursor:pointer;display:flex;justify-content:space-between;align-items:center;width:100%;padding:0 12px;overflow:hidden}.container .dropdown:focus-visible,.container .dropdown:hover{background-color:#f5f7fc;outline:none}.container .dropdown .label{display:flex;justify-content:flex-start;align-items:center;width:calc(100% - 32px)}.container .dropdown .label,.container .dropdown .label .text{font-style:normal;font-weight:400;font-size:14px;line-height:20px;letter-spacing:.2px;color:#181f33}.container .dropdown .label .text{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.container .dropdown .label .count{background-color:#e0e0e0;border-radius:50%;padding:2px 7px;margin:0 0 0 8px;font-style:normal;font-weight:400;font-size:14px;line-height:20px;text-align:center;letter-spacing:.2px;color:#181f33}.container .dropdown .handle{width:24px;height:24px;transition:.3s;position:absolute;right:12px;border-radius:50%;overflow:hidden}.popup-container{position:absolute;top:4px;width:100%;max-height:340px;padding-bottom:0;border:1px solid #e0e0e0;border-radius:8px;background-color:#fff;box-shadow:0 12px 24px 0 rgba(0,0,0,.12);overflow-x:hidden;display:flex;flex-direction:column;justify-content:space-between;z-index:100}.popup-container::-webkit-scrollbar{width:0;height:0}.popup-container .search-container{position:relative;box-sizing:border-box;padding:8px}.popup-container .search-container .search-icon{position:absolute;width:24px;height:24px;top:50%;transform:translateY(-50%);left:18px;z-index:1}.popup-container .search-container .search-input{height:40px;width:100%;padding:12px;border:1px solid #e0e0e0;box-sizing:border-box;border-radius:8px;outline:none;caret-color:#0937b2;font-style:normal;font-weight:400;font-size:12px;line-height:18px;display:flex;align-items:center;letter-spacing:.2px;color:#181f33}.popup-container .search-container .cancel-icon{position:absolute;cursor:pointer;width:24px;height:24px;top:50%;transform:translateY(-50%);right:18px;z-index:1}.popup-container .items{padding:8px 0 8px 8px;overflow-y:scroll;height:100%}.popup-container .items::-webkit-scrollbar{width:5px;height:0}.popup-container .items::-webkit-scrollbar-thumb{background:#9aa7b4;border-radius:10px}.popup-container .items .noData{display:flex;justify-content:center;align-items:center;font-style:normal;font-weight:400;font-size:14px;line-height:20px;letter-spacing:.2px;color:#181f33}.popup-container .items .item{cursor:pointer;display:flex;justify-content:flex-start;align-items:center;padding:8px 12px;border-radius:6px;height:auto}.popup-container .items .item:focus-visible,.popup-container .items .item:hover{background-color:#f5f7fc;outline:none}.popup-container .items .item .checkbox-container-wrapper{display:flex;justify-content:flex-start;align-items:center;width:90%}.popup-container .items .item .checkbox-container-wrapper .checkbox-container{display:block;position:relative;cursor:pointer;font-size:22px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.popup-container .items .item .checkbox-container-wrapper .checkbox-container input{position:absolute;opacity:0;cursor:pointer;height:0;width:0}.popup-container .items .item .checkbox-container-wrapper .checkbox-container input:checked~.checkmark:after{display:block}.popup-container .items .item .checkbox-container-wrapper .checkbox-container .checkmark{position:absolute;top:-8px;left:0;height:15px;width:15px;border-radius:4px;background-color:#0079f1;border:1px solid #6a737d}.popup-container .items .item .checkbox-container-wrapper .checkbox-container .checkmark:after{content:\"\";position:absolute;display:none;left:5px;top:2px;width:3px;height:6px;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg)}.popup-container .items .item .checkbox-container-wrapper .label{margin:0 0 0 8px;font-style:normal;font-weight:400;font-size:14px;line-height:20px;letter-spacing:.2px;color:#181f33;text-overflow:ellipsis;overflow:hidden}.popup-container .items .item .icon-container{width:10%;display:flex;justify-content:flex-end}.popup-container .items .item .icon-container .icon{width:20px;height:20px}.popup-container .actions-container{display:flex;justify-content:space-between;bottom:0;align-items:center;position:sticky;padding:16px;background-color:#fff;border-top:1px solid #e0e0e0}.popup-container .actions-container .cancel{cursor:pointer;padding:10px 32px;text-align:center;font-size:16px;line-height:24px;border-radius:8px}.popup-container .actions-container .cancel:hover{background:rgba(9,55,178,.04)}.popup-container .actions-container .apply{cursor:pointer;padding:10px 32px;text-align:center;color:#fff;font-size:16px;line-height:24px;background:#0937b2;border-radius:8px}"]
|
|
247
247
|
},] }
|
|
248
248
|
];
|
|
249
249
|
NestedMultiSelectDropdownComponent.ctorParameters = () => [
|
|
@@ -19,7 +19,7 @@ SkeLoaderComponent.decorators = [
|
|
|
19
19
|
{ type: Component, args: [{
|
|
20
20
|
selector: 'mis-skeleton-loader',
|
|
21
21
|
template: "<div style=\"overflow: hidden\" [ngStyle]=\"{'height': this.height,'width' : this.width}\">\n <div *ngFor=\"let n of rowCount; let i = index;\">\n <div class=\"ske-loader\" [ngStyle]=\"{'height':this.lineHeight,'margin-bottom':this.gap }\"></div>\n </div>\n</div>\n",
|
|
22
|
-
styles: [".ske-loader{background:grey;position:relative;width:100%;background:#e5e5e5;background:linear-gradient(110deg,#ececec 8%,#f5f5f5 18%,#ececec 33%);border-radius:5px;background-size:200% 100
|
|
22
|
+
styles: [".ske-loader{background:grey;position:relative;width:100%;background:#e5e5e5;background:linear-gradient(110deg,#ececec 8%,#f5f5f5 18%,#ececec 33%);border-radius:5px;background-size:200% 100%;animation:shine 1s linear infinite;overflow:hidden}@keyframes shine{to{background-position-x:-200%}}"]
|
|
23
23
|
},] }
|
|
24
24
|
];
|
|
25
25
|
SkeLoaderComponent.ctorParameters = () => [];
|
|
@@ -1,29 +1,26 @@
|
|
|
1
1
|
import { OverlayConfig, Overlay } from '@angular/cdk/overlay';
|
|
2
2
|
import { ComponentPortal } from '@angular/cdk/portal';
|
|
3
|
-
import { EventEmitter, Component, Output, ɵɵdefineInjectable, ɵɵinject, Injectable, NgModule } from '@angular/core';
|
|
3
|
+
import { EventEmitter, Component, Input, Output, ɵɵdefineInjectable, ɵɵinject, Injectable, NgModule } from '@angular/core';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
|
|
6
|
-
// snackbar.component.ts
|
|
7
6
|
class SnackbarComponent {
|
|
8
|
-
constructor(
|
|
9
|
-
this.input = input;
|
|
7
|
+
constructor() {
|
|
10
8
|
this.triggerAction = new EventEmitter();
|
|
11
9
|
}
|
|
12
|
-
|
|
13
|
-
this.triggerAction.emit(
|
|
10
|
+
onActionClick() {
|
|
11
|
+
this.triggerAction.emit();
|
|
14
12
|
}
|
|
15
13
|
}
|
|
16
14
|
SnackbarComponent.decorators = [
|
|
17
15
|
{ type: Component, args: [{
|
|
18
|
-
selector: '
|
|
19
|
-
template: "<div class=\"snackbar-container\">\n <div class=\"messages\" *ngIf=\"!
|
|
16
|
+
selector: 'app-snackbar',
|
|
17
|
+
template: "<div class=\"snackbar-container\">\n <div class=\"messages\" *ngIf=\"!config.hasComponent\">\n <span class=\"message\">\n <img *ngIf=\"config.iconUrl\" [src]=\"config.iconUrl\" alt=\"\">\n {{ config.message }}\n </span>\n <div class=\"snackbar-action\" *ngIf=\"config.actionString\">\n <button (click)=\"onActionClick()\">{{ config.actionString }}</button>\n </div>\n </div>\n <div class=\"component-container\" *ngIf=\"config.hasComponent\">\n <ng-content></ng-content>\n </div>\n</div>\n",
|
|
20
18
|
styles: [".snackbar-container{position:fixed;bottom:20px;left:50%;transform:translateX(-50%);background-color:#181f33;color:#fff;border-radius:8px;padding:8px 12px;max-width:400px;width:90%;z-index:1000;box-shadow:0 4px 8px rgba(0,0,0,.2)}.messages{display:flex;align-items:center;justify-content:space-between}.message{flex:1;padding-right:10px;font-size:16px;font-weight:700}.snackbar-action button{background-color:#181f33;color:#fff;border:none;border-radius:4px;padding:8px 16px;cursor:pointer;font-size:16px!important;transition:background-color .3s ease}.snackbar-action button:hover{background-color:#0056b3}.component-container{margin-top:10px}@media (max-width:768px){.snackbar-container{left:10px;right:10px;transform:none;width:auto;max-width:none}}"]
|
|
21
19
|
},] }
|
|
22
20
|
];
|
|
23
|
-
SnackbarComponent.ctorParameters = () => [
|
|
24
|
-
{ type: SnackbarService }
|
|
25
|
-
];
|
|
21
|
+
SnackbarComponent.ctorParameters = () => [];
|
|
26
22
|
SnackbarComponent.propDecorators = {
|
|
23
|
+
config: [{ type: Input }],
|
|
27
24
|
triggerAction: [{ type: Output }]
|
|
28
25
|
};
|
|
29
26
|
|
|
@@ -70,6 +67,18 @@ SnackbarService.ctorParameters = () => [
|
|
|
70
67
|
];
|
|
71
68
|
|
|
72
69
|
class SnackbarModule {
|
|
70
|
+
static forRoot() {
|
|
71
|
+
return {
|
|
72
|
+
ngModule: SnackbarModule,
|
|
73
|
+
providers: [SnackbarService]
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
static forChild() {
|
|
77
|
+
return {
|
|
78
|
+
ngModule: SnackbarModule,
|
|
79
|
+
providers: [SnackbarService]
|
|
80
|
+
};
|
|
81
|
+
}
|
|
73
82
|
}
|
|
74
83
|
SnackbarModule.decorators = [
|
|
75
84
|
{ type: NgModule, args: [{
|
|
@@ -81,7 +90,6 @@ SnackbarModule.decorators = [
|
|
|
81
90
|
],
|
|
82
91
|
exports: [SnackbarComponent],
|
|
83
92
|
entryComponents: [SnackbarComponent],
|
|
84
|
-
providers: [SnackbarService]
|
|
85
93
|
},] }
|
|
86
94
|
];
|
|
87
95
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mis-crystal-design-system-snackbar.js","sources":["../../../projects/mis-components/snackbar/snackbar/snackbar.component.ts","../../../projects/mis-components/snackbar/snackbar.service.ts","../../../projects/mis-components/snackbar/snackbar.module.ts","../../../projects/mis-components/snackbar/mis-crystal-design-system-snackbar.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"mis-crystal-design-system-snackbar.js","sources":["../../../projects/mis-components/snackbar/snackbar/snackbar.component.ts","../../../projects/mis-components/snackbar/snackbar.service.ts","../../../projects/mis-components/snackbar/snackbar.module.ts","../../../projects/mis-components/snackbar/mis-crystal-design-system-snackbar.ts"],"sourcesContent":["import { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { ISnackBarConfig } from '../snackbar.service';\n\n@Component({\n selector: 'app-snackbar',\n templateUrl: './snackbar.component.html',\n styleUrls: ['./snackbar.component.css']\n})\nexport class SnackbarComponent {\n @Input() config: ISnackBarConfig;\n @Output() triggerAction = new EventEmitter<void>();\n constructor(){}\n onActionClick(): void {\n this.triggerAction.emit();\n }\n}\n","export interface ISnackBarConfig {\n message: string;\n actionString: string;\n hasComponent: boolean;\n iconUrl?: string;\n component?: ComponentRef<any>;\n duration?: number;\n onActionClick?: () => void;\n}\nimport { Overlay, OverlayConfig, OverlayRef } from \"@angular/cdk/overlay\";\nimport { ComponentPortal } from \"@angular/cdk/portal\";\nimport { ComponentRef, Injectable } from \"@angular/core\"; // Assuming you have defined ISnackBarConfig interface\nimport { SnackbarComponent } from \"./snackbar/snackbar.component\";\n\n@Injectable({\n providedIn: \"root\"\n})\nexport class SnackbarService {\n config: ISnackBarConfig;\n private snackbarRef: OverlayRef;\n\n constructor(private overlay: Overlay) {}\n\n openSnackbar(config: ISnackBarConfig): void {\n this.config = config;\n const overlayConfig = new OverlayConfig({\n hasBackdrop: false,\n positionStrategy: this.overlay.position().global().centerHorizontally().bottom(\"48px\")\n });\n\n this.snackbarRef = this.overlay.create(overlayConfig);\n\n const snackbarPortal = new ComponentPortal(SnackbarComponent);\n const componentRef = this.snackbarRef.attach(snackbarPortal);\n\n // componentRef.instance.config = config;\n\n config.duration = config.duration || 3000;\n setTimeout(() => {\n this.closeSnackbar();\n }, config.duration);\n\n componentRef.instance.triggerAction.subscribe(() => {\n if (config.onActionClick) {\n config.onActionClick();\n }\n this.closeSnackbar();\n });\n }\n\n closeSnackbar(): void {\n if (this.snackbarRef) {\n this.snackbarRef.dispose();\n this.snackbarRef = null;\n }\n }\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { SnackbarComponent } from './snackbar/snackbar.component';\nimport { SnackbarService } from './snackbar.service';\n\n\n\n@NgModule({\n declarations: [\n SnackbarComponent\n ],\n imports: [\n CommonModule\n ],\n exports: [SnackbarComponent],\n entryComponents: [SnackbarComponent],\n})\nexport class SnackbarModule {\n static forRoot(): ModuleWithProviders<SnackbarModule> {\n return {\n ngModule: SnackbarModule,\n providers: [SnackbarService]\n };\n }\n\n static forChild(): ModuleWithProviders<SnackbarModule> {\n return {\n ngModule: SnackbarModule,\n providers: [ SnackbarService]\n };\n }\n }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAQa,iBAAiB;IAG5B;QADU,kBAAa,GAAG,IAAI,YAAY,EAAQ,CAA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