mis-crystal-design-system 2.9.4 → 2.9.6-phone
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/bundles/mis-crystal-design-system-datepicker_v2.umd.js +1 -1
- 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 -1
- package/bundles/mis-crystal-design-system-datepicker_v2.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-dropdown.umd.js +1 -1
- package/bundles/mis-crystal-design-system-dropdown.umd.min.js +1 -1
- package/bundles/mis-crystal-design-system-dropdown.umd.min.js.map +1 -1
- package/bundles/mis-crystal-design-system-phone-input.umd.js +68 -0
- package/bundles/mis-crystal-design-system-phone-input.umd.js.map +1 -0
- package/bundles/mis-crystal-design-system-phone-input.umd.min.js +2 -0
- package/bundles/mis-crystal-design-system-phone-input.umd.min.js.map +1 -0
- package/dropdown/mis-crystal-design-system-dropdown.metadata.json +1 -1
- package/esm2015/datepicker_v2/tz-dp-container/tz-dp-container.component.js +2 -2
- package/esm2015/dropdown/dropdown.component.js +1 -1
- package/esm2015/phone-input/index.js +2 -0
- package/esm2015/phone-input/mis-crystal-design-system-phone-input.js +5 -0
- package/esm2015/phone-input/phone-input.component.js +36 -0
- package/esm2015/phone-input/phone-input.module.js +21 -0
- package/esm2015/phone-input/public_api.js +3 -0
- package/fesm2015/mis-crystal-design-system-datepicker_v2.js +1 -1
- package/fesm2015/mis-crystal-design-system-datepicker_v2.js.map +1 -1
- package/fesm2015/mis-crystal-design-system-dropdown.js +1 -1
- package/fesm2015/mis-crystal-design-system-phone-input.js +60 -0
- package/fesm2015/mis-crystal-design-system-phone-input.js.map +1 -0
- package/package.json +1 -1
- package/phone-input/index.d.ts +1 -0
- package/phone-input/mis-crystal-design-system-phone-input.d.ts +4 -0
- package/phone-input/mis-crystal-design-system-phone-input.metadata.json +1 -0
- package/phone-input/package.json +11 -0
- package/phone-input/phone-input.component.d.ts +16 -0
- package/phone-input/phone-input.module.d.ts +4 -0
- package/phone-input/public_api.d.ts +2 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { CommonModule } from "@angular/common";
|
|
2
|
+
import { FormsModule } from "@angular/forms";
|
|
3
|
+
import { NgModule } from "@angular/core";
|
|
4
|
+
import { PhoneInputComponent } from "./phone-input.component";
|
|
5
|
+
import { OverlayModule } from "@angular/cdk/overlay";
|
|
6
|
+
import { ScrollingModule } from "@angular/cdk-experimental/scrolling";
|
|
7
|
+
import { DropdownModule } from "mis-crystal-design-system/dropdown";
|
|
8
|
+
import { ReactiveFormsModule } from "@angular/forms";
|
|
9
|
+
export class PhoneInputModule {
|
|
10
|
+
static forRoot() {
|
|
11
|
+
return { ngModule: PhoneInputModule, providers: [] };
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
PhoneInputModule.decorators = [
|
|
15
|
+
{ type: NgModule, args: [{
|
|
16
|
+
declarations: [PhoneInputComponent],
|
|
17
|
+
imports: [CommonModule, ReactiveFormsModule, FormsModule, OverlayModule, ScrollingModule, DropdownModule],
|
|
18
|
+
exports: [PhoneInputComponent]
|
|
19
|
+
},] }
|
|
20
|
+
];
|
|
21
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGhvbmUtaW5wdXQubW9kdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvbWlzLWNvbXBvbmVudHMvcGhvbmUtaW5wdXQvcGhvbmUtaW5wdXQubW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUMvQyxPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFDN0MsT0FBTyxFQUFFLFFBQVEsRUFBdUIs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ZlcmxheU1vZHVsZSB9IGZyb20gXCJAYW5ndWxhci9jZGsvb3ZlcmxheVwiO1xuaW1wb3J0IHsgU2Nyb2xsaW5nTW9kdWxlIH0gZnJvbSBcIkBhbmd1bGFyL2Nkay1leHBlcmltZW50YWwvc2Nyb2xsaW5nXCI7XG5pbXBvcnQgeyBEcm9wZG93bk1vZHVsZSB9IGZyb20gXCJtaXMtY3J5c3RhbC1kZXNpZ24tc3lzdGVtL2Ryb3Bkb3duXCI7XG5pbXBvcnQgeyBSZWFjdGl2ZUZvcm1zTW9kdWxlIH0gZnJvbSBcIkBhbmd1bGFyL2Zvcm1zXCI7XG5cblxuQE5nTW9kdWxlKHtcbiAgZGVjbGFyYXRpb25zOiBbUGhvbmVJbnB1dENvbXBvbmVudF0sXG4gIGltcG9ydHM6IFtDb21tb25Nb2R1bGUsUmVhY3RpdmVGb3Jtc01vZHVsZSwgRm9ybXNNb2R1bGUsIE92ZXJsYXlNb2R1bGUsIFNjcm9sbGluZ01vZHVsZSwgRHJvcGRvd25Nb2R1bGVdLFxuICBleHBvcnRzOiBbUGhvbmVJbnB1dENvbXBvbmVudF1cbn0pXG5leHBvcnQgY2xhc3MgUGhvbmVJbnB1dE1vZHVsZSB7XG4gIHN0YXRpYyBmb3JSb290KCk6IE1vZHVsZVdpdGhQcm92aWRlcnM8UGhvbmVJbnB1dE1vZHVsZT4ge1xuICAgIHJldHVybiB7IG5nTW9kdWxlOiBQaG9uZUlucHV0TW9kdWxlLCBwcm92aWRlcnM6IFtdIH07XG4gIH1cbn1cbiJdfQ==
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { PhoneInputComponent } from "./phone-input.component";
|
|
2
|
+
export { PhoneInputModule } from "./phone-input.module";
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL21pcy1jb21wb25lbnRzL3Bob25lLWlucHV0L3B1YmxpY19hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLG1CQUFtQixFQUFFLE1BQU0seUJBQXlCLENBQUM7QUFDOUQsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sc0JBQXNCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgeyBQaG9uZUlucHV0Q29tcG9uZW50IH0gZnJvbSBcIi4vcGhvbmUtaW5wdXQuY29tcG9uZW50XCI7XG5leHBvcnQgeyBQaG9uZUlucHV0TW9kdWxlIH0gZnJvbSBcIi4vcGhvbmUtaW5wdXQubW9kdWxlXCI7XG4iXX0=
|
|
@@ -170,7 +170,7 @@ class TzDpContainerComponent {
|
|
|
170
170
|
this.applyDate(day);
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
|
-
if (day.toastMessage || this.allowBookingOnDisabledDay) {
|
|
173
|
+
if (day.toastMessage || (this.allowBookingOnDisabledDay && day.toastMessage)) {
|
|
174
174
|
this.toast.displayMsg(day.toastMessage, 4000);
|
|
175
175
|
}
|
|
176
176
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mis-crystal-design-system-datepicker_v2.js","sources":["../../../projects/mis-components/datepicker_v2/datepicker-constants.ts","../../../projects/mis-components/datepicker_v2/utils/index.ts","../../../projects/mis-components/datepicker_v2/tz-dp-container/tz-dp-container.component.ts","../../../projects/mis-components/datepicker_v2/tz-datepicker.directive.ts","../../../projects/mis-components/datepicker_v2/datepicker.module.ts","../../../projects/mis-components/datepicker_v2/mis-crystal-design-system-datepicker_v2.ts"],"sourcesContent":["/** @format */\n\nimport { InjectionToken } from \"@angular/core\";\n\nexport const CONTAINER_DATA = new InjectionToken<{}>(\"CONTAINER_DATA\");\nexport const DATE_FORMAT = \"DD-MM-YYYY\";\n","import { ICurrentMonth } from \"../models/dp-config.model\";\n\nexport const getMonth = (index: number): ICurrentMonth => {\n let month;\n switch (index) {\n case 0:\n month = \"January\";\n break;\n case 1:\n month = \"February\";\n break;\n case 2:\n month = \"March\";\n break;\n case 3:\n month = \"April\";\n break;\n case 4:\n month = \"May\";\n break;\n case 5:\n month = \"June\";\n break;\n case 6:\n month = \"July\";\n break;\n case 7:\n month = \"August\";\n break;\n case 8:\n month = \"September\";\n break;\n case 9:\n month = \"October\";\n break;\n case 10:\n month = \"November\";\n break;\n case 11:\n month = \"December\";\n break;\n default:\n break;\n }\n return month;\n};\n","import { Component, Inject, OnInit } from \"@angular/core\";\nimport { CONTAINER_DATA, DATE_FORMAT } from \"../datepicker-constants\";\nimport { ICurrentMonth, ICurrentMonthDates, IDatePickerData, IWeekDay } from \"../models/dp-config.model\";\nimport { parseZone, Moment, tz } from \"moment-timezone\";\nimport { getMonth } from \"../utils\";\nimport { ToastService } from \"mis-crystal-design-system/toast\";\n\n@Component({\n selector: \"mis-tz-dp\",\n templateUrl: \"./tz-dp-container.component.html\",\n styleUrls: [\"./tz-dp-container.component.scss\"]\n})\nexport class TzDpContainerComponent implements OnInit {\n data: IDatePickerData;\n private parseZoneInstance = (...args) => {\n return parseZone(...args);\n };\n private rawWeekDays: string[] = [\"SUN\", \"MON\", \"TUE\", \"WED\", \"THU\", \"FRI\", \"SAT\"];\n weekDays: IWeekDay[] = [];\n currentMonthNumber: number;\n currentMonth: ICurrentMonth;\n currentYearNumber: number;\n currentMonthDates: ICurrentMonthDates[] = [];\n isPreviousMonthDisabled: boolean = false;\n isNextMonthDisabled: boolean = false;\n localSelectedDate: ICurrentMonthDates;\n allowBookingOnDisabledDay: boolean = false;\n currentSelection: any;\n\n constructor(@Inject(CONTAINER_DATA) data: IDatePickerData, private toast: ToastService) {\n this.data = data;\n if (this.data?.dpConfig?.timezone) {\n this.parseZoneInstance = (...args) => {\n return tz(args[0], args[1], this.data.dpConfig.timezone);\n };\n }\n this.currentMonthNumber = this.parseZoneInstance().month();\n this.currentMonth = getMonth(this.currentMonthNumber);\n this.currentYearNumber = this.parseZoneInstance().year();\n this.weekDays = this.rawWeekDays.map((day, index) => ({\n label: `${day[0]}${day.slice(1).toLowerCase()}`,\n isCurrentDay: this.parseZoneInstance().day() === index\n }));\n if (!this.data?.dpConfig?.format) {\n this.data.dpConfig = {\n ...this.data.dpConfig,\n format: DATE_FORMAT\n };\n }\n }\n\n ngOnInit(): void {\n this.currentDateInstance();\n this.calculateMinMaxDays();\n }\n\n private currentDateInstance(): void {\n const selectedDate = parseZone(this.data.date, this.data.dpConfig.format);\n if (selectedDate.isValid()) {\n this.currentYearNumber = selectedDate.year();\n this.currentMonthNumber = selectedDate.month();\n this.currentMonth = getMonth(this.currentMonthNumber);\n }\n this.currentMonthDates = this.generateDates(this.currentMonthNumber, this.currentYearNumber);\n }\n\n private calculateMinMaxDays() {\n const currentInstance = this.parseZoneInstance().year(this.currentYearNumber).month(this.currentMonthNumber);\n const minDate = this.parseZoneInstance(this.data.dpConfig.minDate, this.data.dpConfig.format);\n if (minDate.isValid()) {\n this.isPreviousMonthDisabled = minDate.isSameOrAfter(currentInstance, \"month\");\n }\n const maxDate = this.parseZoneInstance(this.data.dpConfig.maxDate, this.data.dpConfig.format);\n if (maxDate.isValid()) {\n this.isNextMonthDisabled = maxDate.isSameOrBefore(currentInstance, \"month\");\n }\n }\n\n navigateMonth(direction: \"NEXT\" | \"PREVIOUS\"): void {\n let thisMonth: Moment = parseZone().year(this.currentYearNumber).month(this.currentMonthNumber);\n if (direction === \"NEXT\") {\n thisMonth = thisMonth.add(1, \"month\");\n } else if (direction === \"PREVIOUS\") {\n thisMonth = thisMonth.subtract(1, \"month\");\n }\n this.currentMonthNumber = thisMonth.month();\n this.currentMonth = getMonth(this.currentMonthNumber);\n this.currentYearNumber = thisMonth.year();\n this.currentMonthDates = this.generateDates(this.currentMonthNumber, this.currentYearNumber);\n this.calculateMinMaxDays();\n }\n\n private generateDates(month: number, currentYearNumber: number): ICurrentMonthDates[] {\n let dates: ICurrentMonthDates[] = [];\n const daysInMonth = parseZone().year(currentYearNumber).month(month).daysInMonth();\n for (let currentDate = 1; currentDate <= daysInMonth; currentDate++) {\n const date = this.parseZoneInstance().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 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 dates.push({\n date: currentDate,\n weekDay: date.day(),\n isCurrentDay:\n this.parseZoneInstance().year(currentYearNumber).month(month).date(currentDate).format(this.data.dpConfig.format) ===\n this.parseZoneInstance().format(this.data.dpConfig.format),\n isSelectedDay: !isDisabledDay && date.format(this.data.dpConfig.format) === this.data.date,\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(day: ICurrentMonthDates) {\n this.currentSelection = this.parseZoneInstance().year(this.currentYearNumber).month(this.currentMonthNumber).date(day.date);\n const maxDate = this.parseZoneInstance(this.data.dpConfig.maxDate);\n const minDate = this.parseZoneInstance(this.data.dpConfig.minDate);\n this.allowBookingOnDisabledDay = this.data.allowBookingOnDisabledDay\n \n if (day.date <= 0) return;\n if ((this.currentSelection.isSameOrAfter(minDate) && this.currentSelection.isSameOrBefore(maxDate) && this.allowBookingOnDisabledDay) || (!day.isDisabledDay && !this.allowBookingOnDisabledDay)) {\n this.localSelectedDate = day;\n if (!this.data.dpConfig.showApplyButton) {\n this.applyDate(day);\n }\n }\n if (day.toastMessage || this.allowBookingOnDisabledDay) {\n this.toast.displayMsg(day.toastMessage, 4000);\n }\n }\n\n applyDate(day?: ICurrentMonthDates) {\n if (day || this.localSelectedDate) {\n this.data.dateChange(\n parseZone()\n .year(this.currentYearNumber)\n .month(this.currentMonthNumber)\n .date(day ? day.date : this.localSelectedDate.date)\n .format(this.data.dpConfig.format)\n );\n } else {\n this.cancelDatePicker();\n }\n }\n\n cancelDatePicker() {\n this.data.dateChange(\"\");\n }\n}\n","import { ConnectionPositionPair, Overlay, OverlayConfig, OverlayRef } from \"@angular/cdk/overlay\";\nimport { ComponentPortal } from \"@angular/cdk/portal\";\nimport { Directive, ElementRef, EventEmitter, HostListener, Injector, Input, OnInit, 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 \"./datepicker-constants\";\nimport { IDatePickerConfig, IDatePickerToastText } from \"./models/dp-config.model\";\nimport { TzDpContainerComponent } from \"./tz-dp-container/tz-dp-container.component\";\n\n@Directive({\n selector: \"input[misTzDp]\"\n})\nexport class TzDatepickerDirective implements OnInit {\n @Input() dpConfig: Partial<IDatePickerConfig>;\n // dd-mm-yyyy 01-12-2022\n @Input() set selectedDate(date: string) {\n this.date = date;\n }\n @Input() set datesDisabled(dates: string[]) {\n this.dpDisabledDates = dates;\n }\n @Input() dateMessages: IDatePickerToastText[] = [];\n @Input() positionX: \"start\" | \"center\" | \"end\" = \"center\";\n @Input() positionY: \"top\" | \"center\" | \"bottom\" = \"bottom\";\n @Input() offsetX: number = 0;\n @Input() offsetY: number = 0;\n @Input() allowBookingOnDisabledDay: boolean = false;\n private overlayRef: OverlayRef;\n @Output() dateChange = new EventEmitter<string>(true);\n private isOpen = false;\n date: string;\n\n private dpDisabledDates: string[] = [];\n\n constructor(\n @Self() @Optional() private control: NgControl,\n private element: ElementRef,\n private overlay: Overlay,\n private viewContainerRef: ViewContainerRef\n ) {}\n ngOnInit(): void {}\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.dpConfig = {\n format: DATE_FORMAT,\n minDate: \"\",\n maxDate: \"\",\n showApplyButton: false,\n ...this.dpConfig\n };\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 TzDpContainerComponent,\n this.viewContainerRef,\n Injector.create({\n providers: [\n {\n provide: CONTAINER_DATA,\n useValue: {\n messages: this.dateMessages,\n date: this.control?.control.value || this.date,\n allowBookingOnDisabledDay: this.allowBookingOnDisabledDay,\n dpConfig: this.dpConfig,\n datesDisabled: this.dpDisabledDates,\n dateChange: this.applyDate.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(date: string = \"\") {\n if (!date) {\n this.close();\n return;\n }\n this.dateChange.emit(date);\n this.control?.control.patchValue(date);\n this.date = date;\n this.close();\n }\n\n private close() {\n this.isOpen = false;\n this.overlayRef.detach();\n this.overlayRef.dispose();\n }\n}\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { OverlayModule } from \"@angular/cdk/overlay\";\nimport { TzDpContainerComponent } from \"./tz-dp-container/tz-dp-container.component\";\nimport { TzDatepickerDirective } from \"./tz-datepicker.directive\";\nimport { ToastModule } from \"mis-crystal-design-system/toast\";\nimport { ButtonModule } from \"mis-crystal-design-system/button\";\n\n@NgModule({\n declarations: [TzDpContainerComponent, TzDatepickerDirective],\n imports: [CommonModule, OverlayModule, ToastModule.forRoot(), ButtonModule],\n exports: [TzDpContainerComponent, TzDatepickerDirective],\n entryComponents: [TzDpContainerComponent]\n})\nexport class DatepickerModuleV2 {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {CONTAINER_DATA as ɵc} from './datepicker-constants';\nexport {IDatePickerData as ɵa} from './models/dp-config.model';\nexport {TzDpContainerComponent as ɵb} from './tz-dp-container/tz-dp-container.component';"],"names":[],"mappings":";;;;;;;;;;;AAAA;MAIa,cAAc,GAAG,IAAI,cAAc,CAAK,gBAAgB,EAAE;AAChE,MAAM,WAAW,GAAG,YAAY;;ACHhC,MAAM,QAAQ,GAAG,CAAC,KAAa;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,KAAK,GAAG,OAAO,CAAC;YAChB,MAAM;QACR,KAAK,CAAC;YACJ,KAAK,GAAG,OAAO,CAAC;YAChB,MAAM;QACR,KAAK,CAAC;YACJ,KAAK,GAAG,KAAK,CAAC;YACd,MAAM;QACR,KAAK,CAAC;YACJ,KAAK,GAAG,MAAM,CAAC;YACf,MAAM;QACR,KAAK,CAAC;YACJ,KAAK,GAAG,MAAM,CAAC;YACf,MAAM;QACR,KAAK,CAAC;YACJ,KAAK,GAAG,QAAQ,CAAC;YACjB,MAAM;QACR,KAAK,CAAC;YACJ,KAAK,GAAG,WAAW,CAAC;YACpB,MAAM;QACR,KAAK,CAAC;YACJ,KAAK,GAAG,SAAS,CAAC;YAClB,MAAM;QACR,KAAK,EAAE;YACL,KAAK,GAAG,UAAU,CAAC;YACnB,MAAM;QACR,KAAK,EAAE;YACL,KAA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AAC,sBAAsB,EAAE,qBAAqB,CAAC;gBAC7D,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,EAAE,WAAW,CAAC,OAAO,EAAE,EAAE,YAAY,CAAC;gBAC3E,OAAO,EAAE,CAAC,sBAAsB,EAAE,qBAAqB,CAAC;gBACxD,eAAe,EAAE,CAAC,sBAAsB,CAAC;aAC1C;;;ACbD;;;;;;"}
|
|
1
|
+
{"version":3,"file":"mis-crystal-design-system-datepicker_v2.js","sources":["../../../projects/mis-components/datepicker_v2/datepicker-constants.ts","../../../projects/mis-components/datepicker_v2/utils/index.ts","../../../projects/mis-components/datepicker_v2/tz-dp-container/tz-dp-container.component.ts","../../../projects/mis-components/datepicker_v2/tz-datepicker.directive.ts","../../../projects/mis-components/datepicker_v2/datepicker.module.ts","../../../projects/mis-components/datepicker_v2/mis-crystal-design-system-datepicker_v2.ts"],"sourcesContent":["/** @format */\n\nimport { InjectionToken } from \"@angular/core\";\n\nexport const CONTAINER_DATA = new InjectionToken<{}>(\"CONTAINER_DATA\");\nexport const DATE_FORMAT = \"DD-MM-YYYY\";\n","import { ICurrentMonth } from \"../models/dp-config.model\";\n\nexport const getMonth = (index: number): ICurrentMonth => {\n let month;\n switch (index) {\n case 0:\n month = \"January\";\n break;\n case 1:\n month = \"February\";\n break;\n case 2:\n month = \"March\";\n break;\n case 3:\n month = \"April\";\n break;\n case 4:\n month = \"May\";\n break;\n case 5:\n month = \"June\";\n break;\n case 6:\n month = \"July\";\n break;\n case 7:\n month = \"August\";\n break;\n case 8:\n month = \"September\";\n break;\n case 9:\n month = \"October\";\n break;\n case 10:\n month = \"November\";\n break;\n case 11:\n month = \"December\";\n break;\n default:\n break;\n }\n return month;\n};\n","import { Component, Inject, OnInit } from \"@angular/core\";\nimport { CONTAINER_DATA, DATE_FORMAT } from \"../datepicker-constants\";\nimport { ICurrentMonth, ICurrentMonthDates, IDatePickerData, IWeekDay } from \"../models/dp-config.model\";\nimport { parseZone, Moment, tz } from \"moment-timezone\";\nimport { getMonth } from \"../utils\";\nimport { ToastService } from \"mis-crystal-design-system/toast\";\n\n@Component({\n selector: \"mis-tz-dp\",\n templateUrl: \"./tz-dp-container.component.html\",\n styleUrls: [\"./tz-dp-container.component.scss\"]\n})\nexport class TzDpContainerComponent implements OnInit {\n data: IDatePickerData;\n private parseZoneInstance = (...args) => {\n return parseZone(...args);\n };\n private rawWeekDays: string[] = [\"SUN\", \"MON\", \"TUE\", \"WED\", \"THU\", \"FRI\", \"SAT\"];\n weekDays: IWeekDay[] = [];\n currentMonthNumber: number;\n currentMonth: ICurrentMonth;\n currentYearNumber: number;\n currentMonthDates: ICurrentMonthDates[] = [];\n isPreviousMonthDisabled: boolean = false;\n isNextMonthDisabled: boolean = false;\n localSelectedDate: ICurrentMonthDates;\n allowBookingOnDisabledDay: boolean = false;\n currentSelection: any;\n\n constructor(@Inject(CONTAINER_DATA) data: IDatePickerData, private toast: ToastService) {\n this.data = data;\n if (this.data?.dpConfig?.timezone) {\n this.parseZoneInstance = (...args) => {\n return tz(args[0], args[1], this.data.dpConfig.timezone);\n };\n }\n this.currentMonthNumber = this.parseZoneInstance().month();\n this.currentMonth = getMonth(this.currentMonthNumber);\n this.currentYearNumber = this.parseZoneInstance().year();\n this.weekDays = this.rawWeekDays.map((day, index) => ({\n label: `${day[0]}${day.slice(1).toLowerCase()}`,\n isCurrentDay: this.parseZoneInstance().day() === index\n }));\n if (!this.data?.dpConfig?.format) {\n this.data.dpConfig = {\n ...this.data.dpConfig,\n format: DATE_FORMAT\n };\n }\n }\n\n ngOnInit(): void {\n this.currentDateInstance();\n this.calculateMinMaxDays();\n }\n\n private currentDateInstance(): void {\n const selectedDate = parseZone(this.data.date, this.data.dpConfig.format);\n if (selectedDate.isValid()) {\n this.currentYearNumber = selectedDate.year();\n this.currentMonthNumber = selectedDate.month();\n this.currentMonth = getMonth(this.currentMonthNumber);\n }\n this.currentMonthDates = this.generateDates(this.currentMonthNumber, this.currentYearNumber);\n }\n\n private calculateMinMaxDays() {\n const currentInstance = this.parseZoneInstance().year(this.currentYearNumber).month(this.currentMonthNumber);\n const minDate = this.parseZoneInstance(this.data.dpConfig.minDate, this.data.dpConfig.format);\n if (minDate.isValid()) {\n this.isPreviousMonthDisabled = minDate.isSameOrAfter(currentInstance, \"month\");\n }\n const maxDate = this.parseZoneInstance(this.data.dpConfig.maxDate, this.data.dpConfig.format);\n if (maxDate.isValid()) {\n this.isNextMonthDisabled = maxDate.isSameOrBefore(currentInstance, \"month\");\n }\n }\n\n navigateMonth(direction: \"NEXT\" | \"PREVIOUS\"): void {\n let thisMonth: Moment = parseZone().year(this.currentYearNumber).month(this.currentMonthNumber);\n if (direction === \"NEXT\") {\n thisMonth = thisMonth.add(1, \"month\");\n } else if (direction === \"PREVIOUS\") {\n thisMonth = thisMonth.subtract(1, \"month\");\n }\n this.currentMonthNumber = thisMonth.month();\n this.currentMonth = getMonth(this.currentMonthNumber);\n this.currentYearNumber = thisMonth.year();\n this.currentMonthDates = this.generateDates(this.currentMonthNumber, this.currentYearNumber);\n this.calculateMinMaxDays();\n }\n\n private generateDates(month: number, currentYearNumber: number): ICurrentMonthDates[] {\n let dates: ICurrentMonthDates[] = [];\n const daysInMonth = parseZone().year(currentYearNumber).month(month).daysInMonth();\n for (let currentDate = 1; currentDate <= daysInMonth; currentDate++) {\n const date = this.parseZoneInstance().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 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 dates.push({\n date: currentDate,\n weekDay: date.day(),\n isCurrentDay:\n this.parseZoneInstance().year(currentYearNumber).month(month).date(currentDate).format(this.data.dpConfig.format) ===\n this.parseZoneInstance().format(this.data.dpConfig.format),\n isSelectedDay: !isDisabledDay && date.format(this.data.dpConfig.format) === this.data.date,\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(day: ICurrentMonthDates) {\n this.currentSelection = this.parseZoneInstance().year(this.currentYearNumber).month(this.currentMonthNumber).date(day.date);\n const maxDate = this.parseZoneInstance(this.data.dpConfig.maxDate);\n const minDate = this.parseZoneInstance(this.data.dpConfig.minDate);\n this.allowBookingOnDisabledDay = this.data.allowBookingOnDisabledDay\n \n if (day.date <= 0) return;\n if ((this.currentSelection.isSameOrAfter(minDate) && this.currentSelection.isSameOrBefore(maxDate) && this.allowBookingOnDisabledDay) || (!day.isDisabledDay && !this.allowBookingOnDisabledDay)) {\n this.localSelectedDate = day;\n if (!this.data.dpConfig.showApplyButton) {\n this.applyDate(day);\n }\n }\n if (day.toastMessage || (this.allowBookingOnDisabledDay && day.toastMessage)) {\n this.toast.displayMsg(day.toastMessage, 4000);\n }\n }\n\n applyDate(day?: ICurrentMonthDates) {\n if (day || this.localSelectedDate) {\n this.data.dateChange(\n parseZone()\n .year(this.currentYearNumber)\n .month(this.currentMonthNumber)\n .date(day ? day.date : this.localSelectedDate.date)\n .format(this.data.dpConfig.format)\n );\n } else {\n this.cancelDatePicker();\n }\n }\n\n cancelDatePicker() {\n this.data.dateChange(\"\");\n }\n}\n","import { ConnectionPositionPair, Overlay, OverlayConfig, OverlayRef } from \"@angular/cdk/overlay\";\nimport { ComponentPortal } from \"@angular/cdk/portal\";\nimport { Directive, ElementRef, EventEmitter, HostListener, Injector, Input, OnInit, 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 \"./datepicker-constants\";\nimport { IDatePickerConfig, IDatePickerToastText } from \"./models/dp-config.model\";\nimport { TzDpContainerComponent } from \"./tz-dp-container/tz-dp-container.component\";\n\n@Directive({\n selector: \"input[misTzDp]\"\n})\nexport class TzDatepickerDirective implements OnInit {\n @Input() dpConfig: Partial<IDatePickerConfig>;\n // dd-mm-yyyy 01-12-2022\n @Input() set selectedDate(date: string) {\n this.date = date;\n }\n @Input() set datesDisabled(dates: string[]) {\n this.dpDisabledDates = dates;\n }\n @Input() dateMessages: IDatePickerToastText[] = [];\n @Input() positionX: \"start\" | \"center\" | \"end\" = \"center\";\n @Input() positionY: \"top\" | \"center\" | \"bottom\" = \"bottom\";\n @Input() offsetX: number = 0;\n @Input() offsetY: number = 0;\n @Input() allowBookingOnDisabledDay: boolean = false;\n private overlayRef: OverlayRef;\n @Output() dateChange = new EventEmitter<string>(true);\n private isOpen = false;\n date: string;\n\n private dpDisabledDates: string[] = [];\n\n constructor(\n @Self() @Optional() private control: NgControl,\n private element: ElementRef,\n private overlay: Overlay,\n private viewContainerRef: ViewContainerRef\n ) {}\n ngOnInit(): void {}\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.dpConfig = {\n format: DATE_FORMAT,\n minDate: \"\",\n maxDate: \"\",\n showApplyButton: false,\n ...this.dpConfig\n };\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 TzDpContainerComponent,\n this.viewContainerRef,\n Injector.create({\n providers: [\n {\n provide: CONTAINER_DATA,\n useValue: {\n messages: this.dateMessages,\n date: this.control?.control.value || this.date,\n allowBookingOnDisabledDay: this.allowBookingOnDisabledDay,\n dpConfig: this.dpConfig,\n datesDisabled: this.dpDisabledDates,\n dateChange: this.applyDate.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(date: string = \"\") {\n if (!date) {\n this.close();\n return;\n }\n this.dateChange.emit(date);\n this.control?.control.patchValue(date);\n this.date = date;\n this.close();\n }\n\n private close() {\n this.isOpen = false;\n this.overlayRef.detach();\n this.overlayRef.dispose();\n }\n}\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { OverlayModule } from \"@angular/cdk/overlay\";\nimport { TzDpContainerComponent } from \"./tz-dp-container/tz-dp-container.component\";\nimport { TzDatepickerDirective } from \"./tz-datepicker.directive\";\nimport { ToastModule } from \"mis-crystal-design-system/toast\";\nimport { ButtonModule } from \"mis-crystal-design-system/button\";\n\n@NgModule({\n declarations: [TzDpContainerComponent, TzDatepickerDirective],\n imports: [CommonModule, OverlayModule, ToastModule.forRoot(), ButtonModule],\n exports: [TzDpContainerComponent, TzDatepickerDirective],\n entryComponents: [TzDpContainerComponent]\n})\nexport class DatepickerModuleV2 {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {CONTAINER_DATA as ɵc} from './datepicker-constants';\nexport {IDatePickerData as ɵa} from './models/dp-config.model';\nexport {TzDpContainerComponent as ɵb} from './tz-dp-container/tz-dp-container.component';"],"names":[],"mappings":";;;;;;;;;;;AAAA;MAIa,cAAc,GAAG,IAAI,cAAc,CAAK,gBAAgB,EAAE;AAChE,MAAM,WAAW,GAAG,YAAY;;ACHhC,MAAM,QAAQ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C,KAAK,EAAE,CAAC;YACb,OAAO;SACR;QACD,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC3B,MAAA,IAAI,CAAC,OAAO,0CAAE,OAAO,CAAC,UAAU,CAAC,IAAI,EAAE;QACvC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,KAAK,EAAE,CAAC;KACd;IAEO,KAAK;QACX,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC;QACzB,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC;KAC3B;;;YApHF,SAAS,SAAC;gBACT,QAAQ,EAAE,gBAAgB;aAC3B;;;YATQ,SAAS,uBAiCb,IAAI,YAAI,QAAQ;YAlCD,UAAU;YAFG,OAAO;YAEqE,gBAAgB;;;uBAY1H,KAAK;2BAEL,KAAK;4BAGL,KAAK;2BAGL,KAAK;wBACL,KAAK;wBACL,KAAK;sBACL,KAAK;sBACL,KAAK;wCACL,KAAK;yBAEL,MAAM;+BAcN,YAAY,SAAC,OAAO;;;MC7BV,kBAAkB;;;YAN9B,QAAQ,SAAC;gBACR,YAAY,EAAE,CAAC,sBAAsB,EAAE,qBAAqB,CAAC;gBAC7D,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,EAAE,WAAW,CAAC,OAAO,EAAE,EAAE,YAAY,CAAC;gBAC3E,OAAO,EAAE,CAAC,sBAAsB,EAAE,qBAAqB,CAAC;gBACxD,eAAe,EAAE,CAAC,sBAAsB,CAAC;aAC1C;;;ACbD;;;;;;"}
|
|
@@ -110,7 +110,7 @@ DropdownComponent.decorators = [
|
|
|
110
110
|
{ type: Component, args: [{
|
|
111
111
|
selector: "mis-dropdown",
|
|
112
112
|
template: "<div\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]=\"{ background: isOpen ? '#E6EBF7' : '' }\"\n >\n <div class=\"label\">\n <p class=\"text\">\n {{ multiLine ? selectedItem.label?.primaryText : selectedItem.label || label }}\n </p>\n </div>\n <svg\n class=\"handle\"\n [ngStyle]=\"{ transform: isOpen ? 'rotate(180deg)' : 'rotate(0deg)' }\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M13.825 7.15845L10 10.9751L6.175 7.15845L5 8.33345L10 13.3334L15 8.33345L13.825 7.15845Z\"\n fill=\"#181F33\"\n />\n </svg>\n </div>\n</div>\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 ? '' : '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 <cdk-virtual-scroll-viewport autosize class=\"dropdown-viewport\">\n <div\n class=\"item\"\n tabindex=\"0\"\n [ngClass]=\"{ 'item-disabled': item.disabled }\"\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\" [ngStyle]=\"{ width: item.icon ? '90%' : '100%', 'display': multiLine ? 'flex': 'inherit', 'flex-direction': multiLine ? 'column': 'inherit' }\">\n <span class=\"primaryText\">{{ multiLine ? item.label?.primaryText : item.label }}</span>\n <span class=\"secondaryText\" *ngIf=\"multiLine\"> {{ 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",
|
|
113
|
-
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}.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}.popup-container .items .item-disabled:focus-visible,.popup-container .items .item-disabled:hover{background-color:transparent;outline:none}.popup-container .items .item-disabled .label{color:#929dab;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}"]
|
|
113
|
+
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}.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}.popup-container .items .item-disabled:focus-visible,.popup-container .items .item-disabled:hover{background-color:transparent;outline:none}.popup-container .items .item-disabled .label{color:#929dab;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}::-webkit-scrollbar{height:8px;width:8px;background:#fff;border-radius:13px}::-webkit-scrollbar-thumb{background:#c8cdd3;border-radius:13px;cursor:pointer}"]
|
|
114
114
|
},] }
|
|
115
115
|
];
|
|
116
116
|
DropdownComponent.ctorParameters = () => [
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { EventEmitter, Component, Input, Output, NgModule } from '@angular/core';
|
|
2
|
+
import { FormControl, ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
3
|
+
import { CommonModule } from '@angular/common';
|
|
4
|
+
import { OverlayModule } from '@angular/cdk/overlay';
|
|
5
|
+
import { ScrollingModule } from '@angular/cdk-experimental/scrolling';
|
|
6
|
+
import { DropdownModule } from 'mis-crystal-design-system/dropdown';
|
|
7
|
+
|
|
8
|
+
class PhoneInputComponent {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.dropdownData = [];
|
|
11
|
+
this.dropdownSelectedItem = { value: "", label: "" };
|
|
12
|
+
this.label = "+91";
|
|
13
|
+
this.inputPlaceholder = 'Enter';
|
|
14
|
+
this.inputFormControl = new FormControl();
|
|
15
|
+
this.onDropdownSelection = new EventEmitter();
|
|
16
|
+
}
|
|
17
|
+
ngOnInit() {
|
|
18
|
+
}
|
|
19
|
+
handleDropdownSelection(item) {
|
|
20
|
+
this.onDropdownSelection.emit(item);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
PhoneInputComponent.decorators = [
|
|
24
|
+
{ type: Component, args: [{
|
|
25
|
+
selector: "mis-phone-input",
|
|
26
|
+
template: "<div class=\"main-container\">\n <mis-dropdown [height]=\"'44px'\" [width]=\"'90px'\" [data]=\"dropdownData\" [selectedItem]=\"dropdownSelectedItem\" [label]=\"label\" [searchEnabled]=\"false\" [multiLine]=\"false\" (onChange)=\"handleDropdownSelection($event)\"></mis-dropdown>\n <div class=\"details-field\">\n <div class=\"input-box\">\n <input\n class=\"black-text\"\n [placeholder]=\"inputPlaceholder\"\n [formControl]=\"inputFormControl\" \n type=\"number\"\n />\n </div>\n </div>\n</div>\n",
|
|
27
|
+
styles: [".main-container{display:flex;border:1px solid #e0e0e0;border-radius:6px}.details-field label{display:inline-block;min-width:224px;margin-right:24px}.details-field .input-box,.details-field .input-box input{width:100%}input{padding:10px 16px;border:none;outline:none;width:100%;height:auto;border-radius:6px}.black-text,input{color:#181f33;line-height:24px;font-size:16px}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}::ng-deep .dropdown{border:unset!important}::ng-deep .item{padding:8px!important}"]
|
|
28
|
+
},] }
|
|
29
|
+
];
|
|
30
|
+
PhoneInputComponent.ctorParameters = () => [];
|
|
31
|
+
PhoneInputComponent.propDecorators = {
|
|
32
|
+
dropdownHeight: [{ type: Input }],
|
|
33
|
+
dropdownWidht: [{ type: Input }],
|
|
34
|
+
dropdownData: [{ type: Input }],
|
|
35
|
+
dropdownSelectedItem: [{ type: Input }],
|
|
36
|
+
label: [{ type: Input }],
|
|
37
|
+
inputPlaceholder: [{ type: Input }],
|
|
38
|
+
inputFormControl: [{ type: Input }],
|
|
39
|
+
onDropdownSelection: [{ type: Output }]
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
class PhoneInputModule {
|
|
43
|
+
static forRoot() {
|
|
44
|
+
return { ngModule: PhoneInputModule, providers: [] };
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
PhoneInputModule.decorators = [
|
|
48
|
+
{ type: NgModule, args: [{
|
|
49
|
+
declarations: [PhoneInputComponent],
|
|
50
|
+
imports: [CommonModule, ReactiveFormsModule, FormsModule, OverlayModule, ScrollingModule, DropdownModule],
|
|
51
|
+
exports: [PhoneInputComponent]
|
|
52
|
+
},] }
|
|
53
|
+
];
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Generated bundle index. Do not edit.
|
|
57
|
+
*/
|
|
58
|
+
|
|
59
|
+
export { PhoneInputComponent, PhoneInputModule };
|
|
60
|
+
//# sourceMappingURL=mis-crystal-design-system-phone-input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mis-crystal-design-system-phone-input.js","sources":["../../../projects/mis-components/phone-input/phone-input.component.ts","../../../projects/mis-components/phone-input/phone-input.module.ts","../../../projects/mis-components/phone-input/mis-crystal-design-system-phone-input.ts"],"sourcesContent":["import { Component, EventEmitter, Input, OnInit, Output } from \"@angular/core\";\nimport { FormControl } from \"@angular/forms\";\nimport { DropdownItem } from \"mis-crystal-design-system/dropdown\";\n\n@Component({\n selector: \"mis-phone-input\",\n templateUrl: \"./phone-input.component.html\",\n styleUrls: [\"./phone-input.component.scss\"]\n})\nexport class PhoneInputComponent implements OnInit {\n @Input() dropdownHeight?: string;\n @Input() dropdownWidht?: string;\n @Input() dropdownData: DropdownItem[] = [];\n @Input() dropdownSelectedItem:DropdownItem = { value: \"\", label: \"\" } \n @Input() label: string = \"+91\";\n\n @Input() inputPlaceholder: string = 'Enter';\n @Input() inputFormControl: FormControl = new FormControl();\n\n @Output() onDropdownSelection = new EventEmitter<any>();\n \n\n\n constructor() {}\n ngOnInit() {\n }\n\n handleDropdownSelection(item: DropdownItem){\n this.onDropdownSelection.emit(item);\n }\n\n}\n","import { CommonModule } from \"@angular/common\";\nimport { FormsModule } from \"@angular/forms\";\nimport { NgModule, ModuleWithProviders } from \"@angular/core\";\nimport { PhoneInputComponent } from \"./phone-input.component\";\nimport { OverlayModule } from \"@angular/cdk/overlay\";\nimport { ScrollingModule } from \"@angular/cdk-experimental/scrolling\";\nimport { DropdownModule } from \"mis-crystal-design-system/dropdown\";\nimport { ReactiveFormsModule } from \"@angular/forms\";\n\n\n@NgModule({\n declarations: [PhoneInputComponent],\n imports: [CommonModule,ReactiveFormsModule, FormsModule, OverlayModule, ScrollingModule, DropdownModule],\n exports: [PhoneInputComponent]\n})\nexport class PhoneInputModule {\n static forRoot(): ModuleWithProviders<PhoneInputModule> {\n return { ngModule: PhoneInputModule, providers: [] };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MASa,mBAAmB;IAc9B;QAXS,iBAAY,GAAmB,EAAE,CAAC;QAClC,yBAAoB,GAAgB,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAA;QAC5D,UAAK,GAAW,KAAK,CAAC;QAEtB,qBAAgB,GAAW,OAAO,CAAC;QACnC,qBAAgB,GAAgB,IAAI,WAAW,EAAE,CAAC;QAEjD,wBAAmB,GAAG,IAAI,YAAY,EAAO,CAAC;KAIxC;IAChB,QAAQ;KACP;IAED,uBAAuB,CAAC,IAAkB;QACxC,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KACrC;;;YAzBF,SAAS,SAAC;gBACT,QAAQ,EAAE,iBAAiB;gBAC3B,2iBAA2C;;aAE5C;;;;6BAEE,KAAK;4BACL,KAAK;2BACL,KAAK;mCACL,KAAK;oBACL,KAAK;+BAEL,KAAK;+BACL,KAAK;kCAEL,MAAM;;;MCJI,gBAAgB;IAC3B,OAAO,OAAO;QACZ,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC;KACtD;;;YARF,QAAQ,SAAC;gBACR,YAAY,EAAE,CAAC,mBAAmB,CAAC;gBACnC,OAAO,EAAE,CAAC,YAAY,EAAC,mBAAmB,EAAE,WAAW,EAAE,aAAa,EAAE,eAAe,EAAE,cAAc,CAAC;gBACxG,OAAO,EAAE,CAAC,mBAAmB,CAAC;aAC/B;;;ACdD;;;;;;"}
|
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./public_api";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"__symbolic":"module","version":4,"metadata":{"PhoneInputComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":4,"character":1},"arguments":[{"selector":"mis-phone-input","template":"<div class=\"main-container\">\n <mis-dropdown [height]=\"'44px'\" [width]=\"'90px'\" [data]=\"dropdownData\" [selectedItem]=\"dropdownSelectedItem\" [label]=\"label\" [searchEnabled]=\"false\" [multiLine]=\"false\" (onChange)=\"handleDropdownSelection($event)\"></mis-dropdown>\n <div class=\"details-field\">\n <div class=\"input-box\">\n <input\n class=\"black-text\"\n [placeholder]=\"inputPlaceholder\"\n [formControl]=\"inputFormControl\" \n type=\"number\"\n />\n </div>\n </div>\n</div>\n","styles":[".main-container{display:flex;border:1px solid #e0e0e0;border-radius:6px}.details-field label{display:inline-block;min-width:224px;margin-right:24px}.details-field .input-box,.details-field .input-box input{width:100%}input{padding:10px 16px;border:none;outline:none;width:100%;height:auto;border-radius:6px}.black-text,input{color:#181f33;line-height:24px;font-size:16px}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}::ng-deep .dropdown{border:unset!important}::ng-deep .item{padding:8px!important}"]}]}],"members":{"dropdownHeight":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":10,"character":3}}]}],"dropdownWidht":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":11,"character":3}}]}],"dropdownData":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":12,"character":3}}]}],"dropdownSelectedItem":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":13,"character":3}}]}],"label":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":14,"character":3}}]}],"inputPlaceholder":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":16,"character":3}}]}],"inputFormControl":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":17,"character":3}}]}],"onDropdownSelection":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":19,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}],"handleDropdownSelection":[{"__symbolic":"method"}]}},"PhoneInputModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":10,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"PhoneInputComponent"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":12,"character":12},{"__symbolic":"reference","module":"@angular/forms","name":"ReactiveFormsModule","line":12,"character":25},{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule","line":12,"character":46},{"__symbolic":"reference","module":"@angular/cdk/overlay","name":"OverlayModule","line":12,"character":59},{"__symbolic":"reference","module":"@angular/cdk-experimental/scrolling","name":"ScrollingModule","line":12,"character":74},{"__symbolic":"reference","module":"mis-crystal-design-system/dropdown","name":"DropdownModule","line":12,"character":91}],"exports":[{"__symbolic":"reference","name":"PhoneInputComponent"}]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":[],"value":{"ngModule":{"__symbolic":"reference","name":"PhoneInputModule"},"providers":[]}}}}},"origins":{"PhoneInputComponent":"./phone-input.component","PhoneInputModule":"./phone-input.module"},"importAs":"mis-crystal-design-system/phone-input"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"main": "../bundles/mis-crystal-design-system-phone-input.umd.js",
|
|
3
|
+
"module": "../fesm2015/mis-crystal-design-system-phone-input.js",
|
|
4
|
+
"es2015": "../fesm2015/mis-crystal-design-system-phone-input.js",
|
|
5
|
+
"esm2015": "../esm2015/phone-input/mis-crystal-design-system-phone-input.js",
|
|
6
|
+
"fesm2015": "../fesm2015/mis-crystal-design-system-phone-input.js",
|
|
7
|
+
"typings": "mis-crystal-design-system-phone-input.d.ts",
|
|
8
|
+
"metadata": "mis-crystal-design-system-phone-input.metadata.json",
|
|
9
|
+
"sideEffects": false,
|
|
10
|
+
"name": "mis-crystal-design-system/phone-input"
|
|
11
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { EventEmitter, OnInit } from "@angular/core";
|
|
2
|
+
import { FormControl } from "@angular/forms";
|
|
3
|
+
import { DropdownItem } from "mis-crystal-design-system/dropdown";
|
|
4
|
+
export declare class PhoneInputComponent implements OnInit {
|
|
5
|
+
dropdownHeight?: string;
|
|
6
|
+
dropdownWidht?: string;
|
|
7
|
+
dropdownData: DropdownItem[];
|
|
8
|
+
dropdownSelectedItem: DropdownItem;
|
|
9
|
+
label: string;
|
|
10
|
+
inputPlaceholder: string;
|
|
11
|
+
inputFormControl: FormControl;
|
|
12
|
+
onDropdownSelection: EventEmitter<any>;
|
|
13
|
+
constructor();
|
|
14
|
+
ngOnInit(): void;
|
|
15
|
+
handleDropdownSelection(item: DropdownItem): void;
|
|
16
|
+
}
|