mis-crystal-design-system 2.4.5 → 2.4.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/bundles/mis-crystal-design-system-datepicker_v2.umd.js +24 -10
  2. package/bundles/mis-crystal-design-system-datepicker_v2.umd.js.map +1 -1
  3. package/bundles/mis-crystal-design-system-datepicker_v2.umd.min.js +2 -2
  4. package/bundles/mis-crystal-design-system-datepicker_v2.umd.min.js.map +1 -1
  5. package/bundles/mis-crystal-design-system-daterangepicker_v2.umd.js +17 -26
  6. package/bundles/mis-crystal-design-system-daterangepicker_v2.umd.js.map +1 -1
  7. package/bundles/mis-crystal-design-system-daterangepicker_v2.umd.min.js +2 -2
  8. package/bundles/mis-crystal-design-system-daterangepicker_v2.umd.min.js.map +1 -1
  9. package/bundles/mis-crystal-design-system-tooltip.umd.js +86 -120
  10. package/bundles/mis-crystal-design-system-tooltip.umd.js.map +1 -1
  11. package/bundles/mis-crystal-design-system-tooltip.umd.min.js +1 -1
  12. package/bundles/mis-crystal-design-system-tooltip.umd.min.js.map +1 -1
  13. package/bundles/mis-crystal-design-system-utils.umd.js +33 -0
  14. package/bundles/mis-crystal-design-system-utils.umd.js.map +1 -0
  15. package/bundles/mis-crystal-design-system-utils.umd.min.js +2 -0
  16. package/bundles/mis-crystal-design-system-utils.umd.min.js.map +1 -0
  17. package/datepicker_v2/mis-crystal-design-system-datepicker_v2.metadata.json +1 -1
  18. package/daterangepicker_v2/mis-crystal-design-system-daterangepicker_v2.metadata.json +1 -1
  19. package/daterangepicker_v2/tz-daterangepicker.directive.d.ts +0 -1
  20. package/esm2015/datepicker_v2/tz-datepicker.directive.js +23 -8
  21. package/esm2015/daterangepicker_v2/tz-daterangepicker.directive.js +17 -25
  22. package/esm2015/tooltip/index.js +2 -2
  23. package/esm2015/tooltip/models/tooltip.model.js +2 -0
  24. package/esm2015/tooltip/public_api.js +4 -4
  25. package/esm2015/tooltip/tooltip-container/tooltip.component.js +34 -0
  26. package/esm2015/tooltip/tooltip.directive.js +68 -57
  27. package/esm2015/tooltip/tooltip.module.js +5 -5
  28. package/esm2015/utils/index.js +17 -0
  29. package/esm2015/utils/mis-crystal-design-system-utils.js +5 -0
  30. package/fesm2015/mis-crystal-design-system-datepicker_v2.js +21 -6
  31. package/fesm2015/mis-crystal-design-system-datepicker_v2.js.map +1 -1
  32. package/fesm2015/mis-crystal-design-system-daterangepicker_v2.js +15 -23
  33. package/fesm2015/mis-crystal-design-system-daterangepicker_v2.js.map +1 -1
  34. package/fesm2015/mis-crystal-design-system-tooltip.js +86 -101
  35. package/fesm2015/mis-crystal-design-system-tooltip.js.map +1 -1
  36. package/fesm2015/mis-crystal-design-system-utils.js +24 -0
  37. package/fesm2015/mis-crystal-design-system-utils.js.map +1 -0
  38. package/package.json +1 -1
  39. package/tooltip/index.d.ts +1 -1
  40. package/tooltip/mis-crystal-design-system-tooltip.metadata.json +1 -1
  41. package/tooltip/models/tooltip.model.d.ts +1 -0
  42. package/tooltip/public_api.d.ts +4 -3
  43. package/tooltip/tooltip-container/tooltip.component.d.ts +10 -0
  44. package/tooltip/tooltip.directive.d.ts +10 -13
  45. package/tooltip/tooltip.module.d.ts +1 -1
  46. package/utils/index.d.ts +7 -0
  47. package/utils/mis-crystal-design-system-utils.d.ts +4 -0
  48. package/utils/mis-crystal-design-system-utils.metadata.json +1 -0
  49. package/utils/package.json +11 -0
  50. package/esm2015/tooltip/tooltip.component.js +0 -60
  51. package/tooltip/tooltip.component.d.ts +0 -15
@@ -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\";","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}","import { Component, Inject, OnInit } from \"@angular/core\";\nimport { CONTAINER_DATA, DATE_FORMAT } from \"../daterangepicker-constants\";\nimport {\n ICurrentMonth,\n ICurrentMonthDates,\n IDatePickerData,\n IWeekDay,\n ISelectedDatesConfig,\n} from \"../models/drp-config.model\";\nimport { parseZone, Moment } from \"moment-timezone\";\nimport { getMonth } from \"../utils\";\nimport { ToastService } from \"mis-crystal-design-system/toast\";\n\n@Component({\n selector: \"mis-tz-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 parseZone(...args);\n };\n private rawWeekDays: string[] = [\n \"SUN\",\n \"MON\",\n \"TUE\",\n \"WED\",\n \"THU\",\n \"FRI\",\n \"SAT\",\n ];\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\n constructor(\n @Inject(CONTAINER_DATA) data: IDatePickerData,\n private toast: ToastService\n ) {\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 parseZone(...args).tz(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(\n this.currentMonthNumber,\n this.currentYearNumber\n );\n this.nextMonthDates = this.generateDates(\n this.nextMonthNumber,\n this.nextYearNumber\n );\n return;\n }\n const selectedStartDate = this.parseZoneInstance(\n this.localSelectedDates?.startDate,\n this.data.dpConfig.format\n );\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 this.currentMonth = getMonth(this.currentMonthNumber);\n this.nextMonth = getMonth(this.nextMonthNumber);\n }\n this.currentMonthDates = this.generateDates(\n this.currentMonthNumber,\n this.currentYearNumber\n );\n this.nextMonthDates = this.generateDates(\n this.nextMonthNumber,\n this.nextYearNumber\n );\n }\n\n private calculateMinMaxDays() {\n const currentInstance = this.parseZoneInstance()\n .year(this.currentYearNumber)\n .month(this.currentMonthNumber);\n const minDate = this.parseZoneInstance(\n this.data.dpConfig.minDate,\n this.data.dpConfig.format\n );\n if (minDate.isValid()) {\n this.isPreviousMonthDisabled = minDate.isSameOrAfter(\n currentInstance,\n \"month\"\n );\n }\n const maxDate = this.parseZoneInstance(\n this.data.dpConfig.maxDate,\n this.data.dpConfig.format\n );\n if (maxDate.isValid()) {\n this.isNextMonthDisabled = maxDate.isSameOrBefore(\n currentInstance,\n \"month\"\n );\n }\n }\n\n navigateMonth(direction: \"NEXT\" | \"PREVIOUS\"): void {\n let thisMonth: Moment = parseZone()\n .year(this.currentYearNumber)\n .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.add(1, \"month\").month();\n this.currentMonth = getMonth(this.currentMonthNumber);\n this.nextMonth = getMonth(this.nextMonthNumber);\n this.currentYearNumber = thisMonth.year();\n this.nextYearNumber = thisMonth.add(1, \"month\").year();\n this.currentMonthDates = this.generateDates(\n this.currentMonthNumber,\n this.currentYearNumber\n );\n this.nextMonthDates = this.generateDates(\n this.nextMonthNumber,\n this.nextYearNumber\n );\n this.calculateMinMaxDays();\n }\n\n private generateDates(\n month: number,\n currentYearNumber: number\n ): ICurrentMonthDates[] {\n let dates: ICurrentMonthDates[] = [];\n const daysInMonth = parseZone()\n .year(currentYearNumber)\n .month(month)\n .daysInMonth();\n for (let currentDate = 1; currentDate <= daysInMonth; currentDate++) {\n const date = this.parseZoneInstance()\n .year(currentYearNumber)\n .month(month)\n .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(\n this.data.dpConfig.minDate,\n this.data.dpConfig.format\n );\n if (!isDisabledDay && minDate.isValid()) {\n isDisabledDay = minDate.isAfter(date, \"day\");\n }\n const maxDate = this.parseZoneInstance(\n this.data.dpConfig.maxDate,\n this.data.dpConfig.format\n );\n if (!isDisabledDay && maxDate.isValid()) {\n isDisabledDay = maxDate.isBefore(date, \"day\");\n }\n const isCurrentDay =\n this.parseZoneInstance()\n .year(currentYearNumber)\n .month(month)\n .date(currentDate)\n .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) ===\n this.localSelectedDates?.startDate;\n const isAfterSelectedStartDate = this.parseZoneInstance(date).isAfter(\n this.localSelectedDates.startDate,\n \"day\"\n );\n const isBeforeSelectedEndDate = this.parseZoneInstance(date).isBefore(\n parseZone(this.localSelectedDates.endDate),\n \"day\"\n );\n const inRangeDay =\n (this.localSelectedDates.startDate ?? false) &&\n (this.localSelectedDates.endDate ?? false) &&\n isAfterSelectedStartDate &&\n isBeforeSelectedEndDate;\n\n const isSelectedEndDay =\n !isDisabledDay &&\n ((this.localSelectedDates?.startDate &&\n this.localSelectedDates?.endDate) ??\n false) &&\n date.format(this.data.dpConfig.format) ===\n this.localSelectedDates?.endDate;\n dates.push({\n date: currentDate,\n weekDay: date.day(),\n isCurrentDay,\n isSelectedStartDay,\n isSelectedEndDay,\n inRangeDay,\n toastMessage:\n this.data.messages.find(\n (q) => date.format(this.data.dpConfig.format) === q.date\n )?.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 const momentDay = parseZone()\n .year(from === \"LEFT\" ? this.currentYearNumber : this.nextYearNumber)\n .month(\n from === \"LEFT\" ? this.currentMonthNumber : this.nextMonthNumber\n )\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 this.currentMonthDates = this.generateDates(\n this.currentMonthNumber,\n this.currentYearNumber\n );\n this.nextMonthDates = this.generateDates(\n this.nextMonthNumber,\n this.nextYearNumber\n );\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(\n from === \"LEFT\" ? this.currentYearNumber : this.nextYearNumber\n )\n .month(\n from === \"LEFT\" ? this.currentMonthNumber : this.nextMonthNumber\n )\n .date(day.date)\n .format(this.data.dpConfig.format),\n endDate: null,\n };\n }\n this.currentMonthDates = this.generateDates(\n this.currentMonthNumber,\n this.currentYearNumber\n );\n this.nextMonthDates = this.generateDates(\n this.nextMonthNumber,\n this.nextYearNumber\n );\n this.isDatesValid = false;\n if (\n this.localSelectedDates.startDate &&\n this.localSelectedDates.endDate\n ) {\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 {\n ConnectionPositionPair,\n Overlay,\n OverlayConfig,\n OverlayRef,\n PositionStrategy,\n} from \"@angular/cdk/overlay\";\nimport { ComponentPortal } from \"@angular/cdk/portal\";\nimport {\n Directive,\n ElementRef,\n EventEmitter,\n HostListener,\n Injector,\n Input,\n Optional,\n Output,\n Self,\n ViewContainerRef,\n} from \"@angular/core\";\nimport { NgControl } from \"@angular/forms\";\nimport { take } from \"rxjs/operators\";\nimport { CONTAINER_DATA, DATE_FORMAT } from \"./daterangepicker-constants\";\nimport {\n IDatePickerConfig,\n IDatePickerToastText,\n ISelectedDatesConfig,\n} 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(this.genPositionPairs())\n .withPush(true);\n const config = new OverlayConfig({\n hasBackdrop: true,\n positionStrategy,\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n backdropClass: \"cdk-overlay-transparent-backdrop\",\n });\n this.overlayRef = this.overlay.create(config);\n const tempRef = new ComponentPortal(\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 private genPositionPairs(): ConnectionPositionPair[] {\n return [\n new ConnectionPositionPair(\n { originX: this.positionX, originY: this.positionY },\n {\n overlayX: this.positionX,\n overlayY: this.positionY === \"bottom\" ? \"top\" : \"bottom\",\n },\n this.offsetX,\n this.offsetY\n ),\n new ConnectionPositionPair(\n { originX: \"center\", originY: \"bottom\" },\n { overlayX: \"center\", overlayY: \"top\" }\n ),\n new ConnectionPositionPair(\n { originX: \"center\", originY: \"top\" },\n { overlayX: \"center\", overlayY: \"bottom\" }\n ),\n new ConnectionPositionPair(\n { originX: \"start\", originY: \"bottom\" },\n { overlayX: \"start\", overlayY: \"top\" }\n ),\n new ConnectionPositionPair(\n { originX: \"start\", originY: \"top\" },\n { overlayX: \"start\", overlayY: \"bottom\" }\n ),\n new ConnectionPositionPair(\n { originX: \"end\", originY: \"bottom\" },\n { overlayX: \"end\", overlayY: \"top\" }\n ),\n new ConnectionPositionPair(\n { originX: \"end\", originY: \"top\" },\n { overlayX: \"end\", overlayY: \"bottom\" }\n ),\n ];\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\";\n\n@NgModule({\n declarations: [TzDrpContainerComponent, TzDaterangepickerDirective],\n imports: [CommonModule, 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;IAClC,IAAI,KAAK,CAAC;IACV,QAAQ,KAAK;QACT,KAAK,CAAC;YACF,KAAK,GAAG,SAAS,CAAA;YACjB,MAAM;QACV,KAAK,CAAC;YACF,KAAK,GAAG,UAAU,CAAA;YAClB,MAAM;QACV,KAAK,CAAC;YACF,KAAK,GAAG,OAAO,CAAA;YACf,MAAM;QACV,KAAK,CAAC;YACF,KAAK,GAAG,OAAO,CAAA;YACf,MAAM;QACV,KAAK,CAAC;YACF,KAAK,GAAG,KAAK,CAAA;YACb,MAAM;QACV,KAAK,CAAC;YACF,KAAK,GAAG,MAAM,CAAA;YACd,MAAM;QACV,KAAK,CAAC;YACF,KAAK,GAAG,MAAM,CAAA;YACd,MAAM;QACV,KAAK,CAAC;YACF,KAAK,GAAG,QAAQ,CAAA;YAChB,MAAM;QACV,KAAK,CAAC;YACF,KAAK,GAAG,WAAW,CAAA;YACnB,MAAM;QACV,KAAK,CAAC;YACF,KAAK,GAAG,SAAS,CAAA;YACjB,MAAM;QACV,KAAK,EAA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ACD,IAAI,sBAAsB,CACxB,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,EACrC,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,CACrC;YACD,IAAI,sBAAsB,CACxB,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,EAClC,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,CACxC;SACF,CAAC;KACH;;;YAvIF,SAAS,SAAC;gBACT,QAAQ,EAAE,iBAAiB;aAC5B;;;YAZQ,SAAS,uBAuCb,IAAI,YAAI,QAAQ;YAjDnB,UAAU;YARV,OAAO;YAgBP,gBAAgB;;;uBAgBf,KAAK;4BAML,KAAK;4BAGL,KAAK;2BAGL,KAAK;wBACL,KAAK;wBACL,KAAK;sBACL,KAAK;sBACL,KAAK;yBAEL,MAAM;+BAaN,YAAY,SAAC,OAAO;;;MCpDV,uBAAuB;;;YANnC,QAAQ,SAAC;gBACR,YAAY,EAAE,CAAC,uBAAuB,EAAE,0BAA0B,CAAC;gBACnE,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,CAAC,OAAO,EAAE,EAAE,YAAY,CAAC,OAAO,EAAE,CAAC;gBACtE,OAAO,EAAE,CAAC,uBAAuB,EAAE,0BAA0B,CAAC;gBAC9D,eAAe,EAAE,CAAC,uBAAuB,CAAC;aAC3C;;;ACZD;;;;;;"}
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\";","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}","import { Component, Inject, OnInit } from \"@angular/core\";\nimport { CONTAINER_DATA, DATE_FORMAT } from \"../daterangepicker-constants\";\nimport {\n ICurrentMonth,\n ICurrentMonthDates,\n IDatePickerData,\n IWeekDay,\n ISelectedDatesConfig,\n} from \"../models/drp-config.model\";\nimport { parseZone, Moment } from \"moment-timezone\";\nimport { getMonth } from \"../utils\";\nimport { ToastService } from \"mis-crystal-design-system/toast\";\n\n@Component({\n selector: \"mis-tz-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 parseZone(...args);\n };\n private rawWeekDays: string[] = [\n \"SUN\",\n \"MON\",\n \"TUE\",\n \"WED\",\n \"THU\",\n \"FRI\",\n \"SAT\",\n ];\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\n constructor(\n @Inject(CONTAINER_DATA) data: IDatePickerData,\n private toast: ToastService\n ) {\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 parseZone(...args).tz(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(\n this.currentMonthNumber,\n this.currentYearNumber\n );\n this.nextMonthDates = this.generateDates(\n this.nextMonthNumber,\n this.nextYearNumber\n );\n return;\n }\n const selectedStartDate = this.parseZoneInstance(\n this.localSelectedDates?.startDate,\n this.data.dpConfig.format\n );\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 this.currentMonth = getMonth(this.currentMonthNumber);\n this.nextMonth = getMonth(this.nextMonthNumber);\n }\n this.currentMonthDates = this.generateDates(\n this.currentMonthNumber,\n this.currentYearNumber\n );\n this.nextMonthDates = this.generateDates(\n this.nextMonthNumber,\n this.nextYearNumber\n );\n }\n\n private calculateMinMaxDays() {\n const currentInstance = this.parseZoneInstance()\n .year(this.currentYearNumber)\n .month(this.currentMonthNumber);\n const minDate = this.parseZoneInstance(\n this.data.dpConfig.minDate,\n this.data.dpConfig.format\n );\n if (minDate.isValid()) {\n this.isPreviousMonthDisabled = minDate.isSameOrAfter(\n currentInstance,\n \"month\"\n );\n }\n const maxDate = this.parseZoneInstance(\n this.data.dpConfig.maxDate,\n this.data.dpConfig.format\n );\n if (maxDate.isValid()) {\n this.isNextMonthDisabled = maxDate.isSameOrBefore(\n currentInstance,\n \"month\"\n );\n }\n }\n\n navigateMonth(direction: \"NEXT\" | \"PREVIOUS\"): void {\n let thisMonth: Moment = parseZone()\n .year(this.currentYearNumber)\n .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.add(1, \"month\").month();\n this.currentMonth = getMonth(this.currentMonthNumber);\n this.nextMonth = getMonth(this.nextMonthNumber);\n this.currentYearNumber = thisMonth.year();\n this.nextYearNumber = thisMonth.add(1, \"month\").year();\n this.currentMonthDates = this.generateDates(\n this.currentMonthNumber,\n this.currentYearNumber\n );\n this.nextMonthDates = this.generateDates(\n this.nextMonthNumber,\n this.nextYearNumber\n );\n this.calculateMinMaxDays();\n }\n\n private generateDates(\n month: number,\n currentYearNumber: number\n ): ICurrentMonthDates[] {\n let dates: ICurrentMonthDates[] = [];\n const daysInMonth = parseZone()\n .year(currentYearNumber)\n .month(month)\n .daysInMonth();\n for (let currentDate = 1; currentDate <= daysInMonth; currentDate++) {\n const date = this.parseZoneInstance()\n .year(currentYearNumber)\n .month(month)\n .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(\n this.data.dpConfig.minDate,\n this.data.dpConfig.format\n );\n if (!isDisabledDay && minDate.isValid()) {\n isDisabledDay = minDate.isAfter(date, \"day\");\n }\n const maxDate = this.parseZoneInstance(\n this.data.dpConfig.maxDate,\n this.data.dpConfig.format\n );\n if (!isDisabledDay && maxDate.isValid()) {\n isDisabledDay = maxDate.isBefore(date, \"day\");\n }\n const isCurrentDay =\n this.parseZoneInstance()\n .year(currentYearNumber)\n .month(month)\n .date(currentDate)\n .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) ===\n this.localSelectedDates?.startDate;\n const isAfterSelectedStartDate = this.parseZoneInstance(date).isAfter(\n this.localSelectedDates.startDate,\n \"day\"\n );\n const isBeforeSelectedEndDate = this.parseZoneInstance(date).isBefore(\n parseZone(this.localSelectedDates.endDate),\n \"day\"\n );\n const inRangeDay =\n (this.localSelectedDates.startDate ?? false) &&\n (this.localSelectedDates.endDate ?? false) &&\n isAfterSelectedStartDate &&\n isBeforeSelectedEndDate;\n\n const isSelectedEndDay =\n !isDisabledDay &&\n ((this.localSelectedDates?.startDate &&\n this.localSelectedDates?.endDate) ??\n false) &&\n date.format(this.data.dpConfig.format) ===\n this.localSelectedDates?.endDate;\n dates.push({\n date: currentDate,\n weekDay: date.day(),\n isCurrentDay,\n isSelectedStartDay,\n isSelectedEndDay,\n inRangeDay,\n toastMessage:\n this.data.messages.find(\n (q) => date.format(this.data.dpConfig.format) === q.date\n )?.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 const momentDay = parseZone()\n .year(from === \"LEFT\" ? this.currentYearNumber : this.nextYearNumber)\n .month(\n from === \"LEFT\" ? this.currentMonthNumber : this.nextMonthNumber\n )\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 this.currentMonthDates = this.generateDates(\n this.currentMonthNumber,\n this.currentYearNumber\n );\n this.nextMonthDates = this.generateDates(\n this.nextMonthNumber,\n this.nextYearNumber\n );\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(\n from === \"LEFT\" ? this.currentYearNumber : this.nextYearNumber\n )\n .month(\n from === \"LEFT\" ? this.currentMonthNumber : this.nextMonthNumber\n )\n .date(day.date)\n .format(this.data.dpConfig.format),\n endDate: null,\n };\n }\n this.currentMonthDates = this.generateDates(\n this.currentMonthNumber,\n this.currentYearNumber\n );\n this.nextMonthDates = this.generateDates(\n this.nextMonthNumber,\n this.nextYearNumber\n );\n this.isDatesValid = false;\n if (\n this.localSelectedDates.startDate &&\n this.localSelectedDates.endDate\n ) {\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 { ConnectionPositionPair, Overlay, OverlayConfig, OverlayRef, PositionStrategy } from \"@angular/cdk/overlay\";\nimport { ComponentPortal } from \"@angular/cdk/portal\";\nimport { Directive, ElementRef, EventEmitter, HostListener, Injector, Input, Optional, Output, Self, ViewContainerRef } from \"@angular/core\";\nimport { NgControl } from \"@angular/forms\";\nimport { take } from \"rxjs/operators\";\nimport { 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\";\n\n@NgModule({\n declarations: [TzDrpContainerComponent, TzDaterangepickerDirective],\n imports: [CommonModule, 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;IAClC,IAAI,KAAK,CAAC;IACV,QAAQ,KAAK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K;2BAGL,KAAK;wBACL,KAAK;wBACL,KAAK;sBACL,KAAK;sBACL,KAAK;yBAEL,MAAM;+BAaN,YAAY,SAAC,OAAO;;;MChCV,uBAAuB;;;YANnC,QAAQ,SAAC;gBACR,YAAY,EAAE,CAAC,uBAAuB,EAAE,0BAA0B,CAAC;gBACnE,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,CAAC,OAAO,EAAE,EAAE,YAAY,CAAC,OAAO,EAAE,CAAC;gBACtE,OAAO,EAAE,CAAC,uBAAuB,EAAE,0BAA0B,CAAC;gBAC9D,eAAe,EAAE,CAAC,uBAAuB,CAAC;aAC3C;;;ACZD;;;;;;"}
@@ -1,77 +1,52 @@
1
- import { Component, Renderer2, Input, ViewChild, Directive, ElementRef, ViewContainerRef, ComponentFactoryResolver, HostListener, NgModule } from '@angular/core';
1
+ import { Component, ViewChild, Directive, ElementRef, ViewContainerRef, Input, HostListener, NgModule } from '@angular/core';
2
+ import { OverlayConfig, Overlay } from '@angular/cdk/overlay';
3
+ import { take } from 'rxjs/operators';
4
+ import { ComponentPortal } from '@angular/cdk/portal';
5
+ import { genPositionPairs } from 'mis-crystal-design-system/utils';
2
6
  import { CommonModule } from '@angular/common';
3
7
 
4
8
  class ToolTipComponent {
5
- constructor(renderer) {
6
- this.renderer = renderer;
7
- this.toolTipText = '';
8
- this.toolTipWidth = '';
9
- this.toolTipPosition = 'Bottom';
10
- }
11
- set text(value) {
12
- this.toolTipText = value;
13
- this.updateToolTipPosition();
14
- }
15
- set width(value) {
16
- this.toolTipWidth = value;
17
- this.updateToolTipPosition();
18
- }
19
- set position(value) {
20
- this.toolTipPosition = value;
21
- this.updateToolTipPosition();
22
- }
23
- ngOnInit() {
9
+ constructor() {
10
+ this.toolTipText = "";
11
+ this.toolTipPosition = "bottom";
24
12
  }
13
+ ngOnInit() { }
25
14
  ngAfterViewInit() {
26
- this.updateToolTipPosition();
27
- }
28
- updateToolTipPosition() {
29
- if (this.container) {
30
- let width = this.container.nativeElement.offsetWidth;
31
- if (this.toolTipPosition === 'Left') {
32
- this.renderer.setStyle(this.container.nativeElement, 'left', `-${width + 12}px`);
33
- this.renderer.setStyle(this.container.nativeElement, 'right', '');
34
- }
35
- else if (this.toolTipPosition === 'Right') {
36
- this.renderer.setStyle(this.container.nativeElement, 'left', '');
37
- this.renderer.setStyle(this.container.nativeElement, 'right', `-${width + 12}px`);
38
- }
39
- else {
40
- this.renderer.setStyle(this.container.nativeElement, 'left', '50%');
41
- this.renderer.setStyle(this.container.nativeElement, 'right', '');
42
- }
15
+ var _a;
16
+ if (!((_a = this.container) === null || _a === void 0 ? void 0 : _a.nativeElement))
17
+ return;
18
+ if (this.toolTipPosition === "top" || this.toolTipPosition === "bottom") {
19
+ const eleWidth = this.container.nativeElement.getBoundingClientRect();
20
+ this.container.nativeElement.style.left = eleWidth.width / -2 + "px";
21
+ return;
22
+ }
23
+ if (this.toolTipPosition === "left") {
24
+ const eleWidth = this.container.nativeElement.getBoundingClientRect();
25
+ this.container.nativeElement.style.left = -eleWidth.width + "px";
43
26
  }
44
27
  }
45
28
  }
46
29
  ToolTipComponent.decorators = [
47
30
  { type: Component, args: [{
48
- selector: 'mis-tooltip',
49
- template: "<div id=\"tooltip-container\" [hidden]=\"toolTipText.length < 1\"\n #container\n [ngStyle]=\"{'width': toolTipWidth.length > 0? toolTipWidth : ''}\"\n [ngClass]=\"{\n 'left': toolTipPosition === 'Left',\n 'right': toolTipPosition === 'Right',\n 'top': toolTipPosition === 'Top',\n 'bottom': toolTipPosition === 'Bottom'\n }\"\n>\n <div id=\"tooltip\">\n <div id=\"tooltip-text\">{{toolTipText}}</div>\n <span\n id=\"arrow\"\n [ngClass]=\"{\n 'arrow-left': toolTipPosition === 'Left',\n 'arrow-right': toolTipPosition === 'Right',\n 'arrow-top': toolTipPosition === 'Top',\n 'arrow-bottom': toolTipPosition === 'Bottom'\n }\"\n ></span>\n </div>\n</div>\n",
50
- styles: ["#tooltip-container{position:absolute;z-index:1}#tooltip-container.top{left:50%;transform:translateX(-50%);top:-48px}#tooltip-container.bottom{left:50%;transform:translateX(-50%);bottom:-48px}#tooltip-container.left,#tooltip-container.right{top:50%;transform:translateY(-50%)}#tooltip{position:relative;display:block;padding:8px 12px;border-radius:8px;color:#fff;background:#181f33;font-family:Lato,sans-serif;font-style:normal;font-weight:400;font-size:14px;line-height:20px;text-align:center;letter-spacing:.2px}#tooltip-text{width:100%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}#arrow{position:absolute;height:12px;width:12px;background:#181f33;z-index:1}.arrow-top{bottom:-6px}.arrow-bottom,.arrow-top{left:50%;transform:translateX(-50%) rotate(-45deg);-webkit-transform:translateX(-50%) rotate(-45deg)}.arrow-bottom{top:-6px}.arrow-left{right:-6px}.arrow-left,.arrow-right{top:50%;transform:translateY(-50%) rotate(-45deg);-webkit-transform:translateY(-50%) rotate(-45deg)}.arrow-right{left:-6px}"]
31
+ selector: "mis-tooltip",
32
+ template: "<div id=\"tooltip-container\" *ngIf=\"toolTipText.length > 0\" #container>\n <div id=\"tooltip\">\n <div id=\"tooltip-text\">{{ toolTipText }}</div>\n <span\n id=\"arrow\"\n [ngClass]=\"{\n 'arrow-left': toolTipPosition === 'left',\n 'arrow-right': toolTipPosition === 'right',\n 'arrow-top': toolTipPosition === 'top',\n 'arrow-bottom': toolTipPosition === 'bottom'\n }\"\n ></span>\n </div>\n</div>\n",
33
+ styles: ["#tooltip-container{position:absolute;z-index:1}#tooltip{position:relative;display:block;padding:8px 12px;border-radius:8px;color:#fff;background:#181f33;font-family:Lato,sans-serif;font-style:normal;font-weight:400;font-size:14px;line-height:20px;text-align:center;letter-spacing:.2px}#tooltip-text{width:100%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}#arrow{position:absolute;height:12px;width:12px;background:#181f33;z-index:1}.arrow-top{bottom:-6px}.arrow-bottom,.arrow-top{left:50%;transform:translateX(-50%) rotate(-45deg);-webkit-transform:translateX(-50%) rotate(-45deg)}.arrow-bottom{top:-6px}.arrow-left{right:-6px}.arrow-left,.arrow-right{top:50%;transform:translateY(-50%) rotate(-45deg);-webkit-transform:translateY(-50%) rotate(-45deg)}.arrow-right{left:-6px}"]
51
34
  },] }
52
35
  ];
53
- ToolTipComponent.ctorParameters = () => [
54
- { type: Renderer2 }
55
- ];
36
+ ToolTipComponent.ctorParameters = () => [];
56
37
  ToolTipComponent.propDecorators = {
57
- text: [{ type: Input }],
58
- width: [{ type: Input }],
59
- position: [{ type: Input }],
60
- container: [{ type: ViewChild, args: ['container',] }]
38
+ container: [{ type: ViewChild, args: ["container",] }]
61
39
  };
62
40
 
63
41
  class ToolTipDirective {
64
- constructor(elementRef, renderer, viewContainerRef, componentFactoryResolver) {
65
- this.elementRef = elementRef;
66
- this.renderer = renderer;
42
+ constructor(element, overlay, viewContainerRef) {
43
+ this.element = element;
44
+ this.overlay = overlay;
67
45
  this.viewContainerRef = viewContainerRef;
68
- this.componentFactoryResolver = componentFactoryResolver;
69
46
  this.isToolTipDisplayed = false;
70
- this.toolTipWidth = '';
71
- this.toolTipText = '';
72
- this.toolTipPosition = 'Bottom';
73
- this.responsivePosition = false;
74
- this.showOnHover = false;
47
+ this.toolTipText = "";
48
+ this.toolTipPosition = "bottom";
49
+ this.showOnHover = true;
75
50
  }
76
51
  set showToolTip(value) {
77
52
  this.isToolTipDisplayed = value;
@@ -80,17 +55,11 @@ class ToolTipDirective {
80
55
  else
81
56
  this.hideToolTip();
82
57
  }
83
- set width(value) {
84
- this.toolTipWidth = value;
85
- this.createToolTip();
86
- }
87
58
  set text(value) {
88
59
  this.toolTipText = value;
89
- this.createToolTip();
90
60
  }
91
61
  set position(value) {
92
62
  this.toolTipPosition = value;
93
- this.createToolTip();
94
63
  }
95
64
  onMouseEnter() {
96
65
  if (this.showOnHover)
@@ -100,68 +69,84 @@ class ToolTipDirective {
100
69
  if (this.showOnHover)
101
70
  this.hideToolTip();
102
71
  }
103
- ngOnInit() {
104
- this.createToolTip();
105
- }
72
+ ngOnInit() { }
106
73
  ngAfterViewInit() {
107
- this.renderer.setStyle(this.elementRef.nativeElement, 'position', 'relative');
108
74
  if (this.isToolTipDisplayed)
109
75
  this.displayToolTip();
110
76
  else
111
77
  this.hideToolTip();
112
- if (this.isToolTipDisplayed && this.responsivePosition)
113
- this.updatePosition();
114
- }
115
- createToolTip() {
116
- const cmpFactoryResolver = this.componentFactoryResolver.resolveComponentFactory(ToolTipComponent);
117
- this.viewContainerRef.clear();
118
- this.componentRef = this.viewContainerRef.createComponent(cmpFactoryResolver);
119
- this.componentRef.instance.width = this.toolTipWidth;
120
- this.componentRef.instance.text = this.toolTipText;
121
- this.componentRef.instance.position = this.toolTipPosition;
122
78
  }
123
79
  displayToolTip() {
124
- let isChild = this.elementRef.nativeElement.contains(this.componentRef.location.nativeElement);
125
- if (!isChild)
126
- this.renderer.appendChild(this.elementRef.nativeElement, this.componentRef.location.nativeElement);
127
- if (this.responsivePosition)
128
- this.updatePosition();
80
+ const positionStrategy = this.overlay
81
+ .position()
82
+ .flexibleConnectedTo(this.element)
83
+ .withPositions(genPositionPairs({
84
+ positionX: "center",
85
+ positionY: this.toolTipPosition === "top" ? "top" : "center",
86
+ offsetX: this.positionTooltip("OFFSET_X"),
87
+ offsetY: this.positionTooltip("OFFSET_Y")
88
+ }, false))
89
+ .withPush(true);
90
+ const config = new OverlayConfig({
91
+ hasBackdrop: false,
92
+ positionStrategy,
93
+ scrollStrategy: this.overlay.scrollStrategies.reposition()
94
+ });
95
+ this.overlayRef = this.overlay.create(config);
96
+ const tempRef = new ComponentPortal(ToolTipComponent, this.viewContainerRef);
97
+ const tooltipRef = this.overlayRef.attach(tempRef);
98
+ tooltipRef.instance.toolTipText = this.toolTipText;
99
+ tooltipRef.instance.toolTipPosition = this.toolTipPosition;
100
+ this.overlayRef
101
+ .backdropClick()
102
+ .pipe(take(1))
103
+ .subscribe(() => {
104
+ this.hideToolTip();
105
+ });
106
+ }
107
+ positionTooltip(type) {
108
+ if (type === "OFFSET_X") {
109
+ return this.toolTipPosition === "right"
110
+ ? this.element.nativeElement.offsetWidth / 2 + 8
111
+ : this.toolTipPosition === "left"
112
+ ? (this.element.nativeElement.offsetWidth / 2 + 8) * -1
113
+ : this.toolTipPosition === "top" || this.toolTipPosition === "bottom"
114
+ ? 0
115
+ : 8;
116
+ }
117
+ if (type !== "OFFSET_Y")
118
+ return;
119
+ return this.toolTipPosition === "right" || this.toolTipPosition === "left"
120
+ ? -18
121
+ : this.toolTipPosition === "top"
122
+ ? -44
123
+ : this.toolTipPosition === "bottom"
124
+ ? this.element.nativeElement.offsetHeight / 2 + 8
125
+ : 8;
129
126
  }
130
127
  hideToolTip() {
131
- let isChild = this.elementRef.nativeElement.contains(this.componentRef.location.nativeElement);
132
- if (isChild)
133
- this.renderer.removeChild(this.elementRef.nativeElement, this.componentRef.location.nativeElement);
134
- }
135
- updatePosition() {
136
- // let rect: any = this.componentRef.location.nativeElement.children[0].getBoundingClientRect()
137
- // let {x, y, height, width} = rect
138
- //TODO: Add logic for responsive positioning
139
- // Use default value as priority and dont change it here 'toolTipPosition'
140
- // Update the position using below line
141
- // this.componentRef.instance.position = 'Right'
142
- // console.log(x, y, height, width)
128
+ var _a, _b;
129
+ (_a = this.overlayRef) === null || _a === void 0 ? void 0 : _a.detach();
130
+ (_b = this.overlayRef) === null || _b === void 0 ? void 0 : _b.dispose();
143
131
  }
144
132
  }
145
133
  ToolTipDirective.decorators = [
146
134
  { type: Directive, args: [{
147
- selector: '[misToolTip]'
135
+ selector: "[misToolTip]"
148
136
  },] }
149
137
  ];
150
138
  ToolTipDirective.ctorParameters = () => [
151
139
  { type: ElementRef },
152
- { type: Renderer2 },
153
- { type: ViewContainerRef },
154
- { type: ComponentFactoryResolver }
140
+ { type: Overlay },
141
+ { type: ViewContainerRef }
155
142
  ];
156
143
  ToolTipDirective.propDecorators = {
157
- responsivePosition: [{ type: Input }],
158
144
  showOnHover: [{ type: Input }],
159
145
  showToolTip: [{ type: Input }],
160
- width: [{ type: Input }],
161
146
  text: [{ type: Input }],
162
147
  position: [{ type: Input }],
163
- onMouseEnter: [{ type: HostListener, args: ['mouseenter',] }],
164
- onMouseLeave: [{ type: HostListener, args: ['mouseleave',] }]
148
+ onMouseEnter: [{ type: HostListener, args: ["mouseenter",] }],
149
+ onMouseLeave: [{ type: HostListener, args: ["mouseleave",] }]
165
150
  };
166
151
 
167
152
  class ToolTipModule {
@@ -1 +1 @@
1
- {"version":3,"file":"mis-crystal-design-system-tooltip.js","sources":["../../../projects/mis-components/tooltip/tooltip.component.ts","../../../projects/mis-components/tooltip/tooltip.directive.ts","../../../projects/mis-components/tooltip/tooltip.module.ts","../../../projects/mis-components/tooltip/mis-crystal-design-system-tooltip.ts"],"sourcesContent":["import {AfterViewInit, Component, ElementRef, Input, OnInit, Renderer2, ViewChild} from '@angular/core';\n\n@Component({\n selector: 'mis-tooltip',\n templateUrl: './tooltip.component.html',\n styleUrls: ['./tooltip.component.scss']\n})\nexport class ToolTipComponent implements OnInit, AfterViewInit{\n\n public toolTipText: string = ''\n public toolTipWidth: string = ''\n public toolTipPosition: 'Left' | 'Right' | 'Top' | 'Bottom' = 'Bottom'\n\n @Input() set text(value: string){\n this.toolTipText = value\n this.updateToolTipPosition()\n }\n @Input() set width(value: string){\n this.toolTipWidth = value;\n this.updateToolTipPosition()\n }\n @Input() set position(value: 'Left' | 'Right' | 'Top' | 'Bottom'){\n this.toolTipPosition = value\n this.updateToolTipPosition()\n }\n\n @ViewChild('container') container: ElementRef\n\n constructor(private renderer: Renderer2) {\n }\n ngOnInit() {\n }\n ngAfterViewInit(){\n this.updateToolTipPosition()\n }\n updateToolTipPosition(){\n if(this.container){\n let width = this.container.nativeElement.offsetWidth\n if(this.toolTipPosition === 'Left'){\n this.renderer.setStyle(this.container.nativeElement, 'left', `-${width + 12}px`)\n this.renderer.setStyle(this.container.nativeElement, 'right', '')\n }\n else if(this.toolTipPosition === 'Right'){\n this.renderer.setStyle(this.container.nativeElement, 'left', '')\n this.renderer.setStyle(this.container.nativeElement, 'right', `-${width + 12}px`)\n }\n else{\n this.renderer.setStyle(this.container.nativeElement, 'left', '50%')\n this.renderer.setStyle(this.container.nativeElement, 'right', '')\n }\n }\n }\n}\n","import {\n AfterViewInit,\n ComponentFactoryResolver, ComponentRef,\n Directive,\n ElementRef, HostListener, Input,\n OnInit,\n Renderer2,\n ViewContainerRef\n} from '@angular/core';\nimport {ToolTipComponent} from './tooltip.component';\nimport {isChildNodeOf} from 'codelyzer/util/isChildNodeOf';\n\n@Directive({\n selector: '[misToolTip]'\n})\nexport class ToolTipDirective implements OnInit, AfterViewInit {\n public isToolTipDisplayed: boolean = false\n public toolTipWidth: string = ''\n public toolTipText: string = ''\n public toolTipPosition: 'Left' | 'Right' | 'Top' | 'Bottom' = 'Bottom'\n\n @Input() responsivePosition: boolean = false\n @Input() showOnHover: boolean = false\n @Input() set showToolTip(value: boolean){\n this.isToolTipDisplayed = value\n if(value) this.displayToolTip()\n else this.hideToolTip()\n }\n @Input() set width(value: string){\n this.toolTipWidth = value\n this.createToolTip()\n }\n @Input() set text(value: string){\n this.toolTipText = value\n this.createToolTip()\n }\n @Input() set position(value: 'Left' | 'Right' | 'Top' | 'Bottom'){\n this.toolTipPosition = value\n this.createToolTip()\n }\n\n @HostListener('mouseenter',) onMouseEnter() {\n if (this.showOnHover) this.displayToolTip()\n }\n @HostListener('mouseleave',) onMouseLeave(){\n if(this.showOnHover) this.hideToolTip()\n }\n\n private componentRef: ComponentRef<ToolTipComponent>\n constructor(\n private elementRef: ElementRef,\n private renderer: Renderer2,\n private viewContainerRef: ViewContainerRef,\n private componentFactoryResolver: ComponentFactoryResolver\n ) {\n }\n\n ngOnInit() {\n this.createToolTip()\n }\n ngAfterViewInit(){\n this.renderer.setStyle(this.elementRef.nativeElement, 'position', 'relative')\n if(this.isToolTipDisplayed) this.displayToolTip()\n else this.hideToolTip()\n if(this.isToolTipDisplayed && this.responsivePosition) this.updatePosition()\n }\n createToolTip(){\n const cmpFactoryResolver = this.componentFactoryResolver.resolveComponentFactory(ToolTipComponent);\n this.viewContainerRef.clear();\n this.componentRef = this.viewContainerRef.createComponent(cmpFactoryResolver);\n this.componentRef.instance.width = this.toolTipWidth\n this.componentRef.instance.text = this.toolTipText\n this.componentRef.instance.position = this.toolTipPosition\n }\n displayToolTip(){\n let isChild = this.elementRef.nativeElement.contains(this.componentRef.location.nativeElement)\n if(!isChild) this.renderer.appendChild(this.elementRef.nativeElement, this.componentRef.location.nativeElement)\n if(this.responsivePosition) this.updatePosition()\n }\n hideToolTip(){\n let isChild = this.elementRef.nativeElement.contains(this.componentRef.location.nativeElement)\n if(isChild) this.renderer.removeChild(this.elementRef.nativeElement, this.componentRef.location.nativeElement)\n }\n updatePosition(){\n // let rect: any = this.componentRef.location.nativeElement.children[0].getBoundingClientRect()\n // let {x, y, height, width} = rect\n //TODO: Add logic for responsive positioning\n // Use default value as priority and dont change it here 'toolTipPosition'\n // Update the position using below line\n // this.componentRef.instance.position = 'Right'\n // console.log(x, y, height, width)\n }\n}\n\n","import { NgModule, ModuleWithProviders } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { ToolTipDirective } from './tooltip.directive';\nimport {ToolTipComponent} from './tooltip.component';\n\n@NgModule({\n declarations: [ToolTipDirective, ToolTipComponent],\n imports: [CommonModule],\n exports: [ToolTipDirective, ToolTipComponent],\n entryComponents:[ToolTipComponent]\n})\nexport class ToolTipModule {\n static forRoot(): ModuleWithProviders<ToolTipModule> {\n return { ngModule: ToolTipModule, providers: [] };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAOa,gBAAgB;IAqB3B,YAAoB,QAAmB;QAAnB,aAAQ,GAAR,QAAQ,CAAW;QAnBhC,gBAAW,GAAW,EAAE,CAAA;QACxB,iBAAY,GAAW,EAAE,CAAA;QACzB,oBAAe,GAAwC,QAAQ,CAAA;KAkBrE;IAhBD,IAAa,IAAI,CAAC,KAAa;QAC7B,IAAI,CAAC,WA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AC,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAA;QAC/G,IAAG,IAAI,CAAC,kBAAkB;YAAE,IAAI,CAAC,cAAc,EAAE,CAAA;KAClD;IACD,WAAW;QACT,IAAI,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAA;QAC9F,IAAG,OAAO;YAAE,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAA;KAC/G;IACD,cAAc;;;;;;;;KAQb;;;YA/EF,SAAS,SAAC;gBACT,QAAQ,EAAE,cAAc;aACzB;;;YAVC,UAAU;YAEV,SAAS;YACT,gBAAgB;YALhB,wBAAwB;;;iCAmBvB,KAAK;0BACL,KAAK;0BACL,KAAK;oBAKL,KAAK;mBAIL,KAAK;uBAIL,KAAK;2BAKL,YAAY,SAAC,YAAY;2BAGzB,YAAY,SAAC,YAAY;;;MChCf,aAAa;IACxB,OAAO,OAAO;QACZ,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC;KACnD;;;YATF,QAAQ,SAAC;gBACR,YAAY,EAAE,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;gBAClD,OAAO,EAAE,CAAC,YAAY,CAAC;gBACvB,OAAO,EAAE,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;gBAC7C,eAAe,EAAC,CAAC,gBAAgB,CAAC;aACnC;;;ACXD;;;;;;"}
1
+ {"version":3,"file":"mis-crystal-design-system-tooltip.js","sources":["../../../projects/mis-components/tooltip/tooltip-container/tooltip.component.ts","../../../projects/mis-components/tooltip/tooltip.directive.ts","../../../projects/mis-components/tooltip/tooltip.module.ts","../../../projects/mis-components/tooltip/mis-crystal-design-system-tooltip.ts"],"sourcesContent":["import { AfterViewInit, Component, ElementRef, Inject, OnInit, ViewChild } from \"@angular/core\";\nimport { ITooltipPositions } from \"../models/tooltip.model\";\n\n@Component({\n selector: \"mis-tooltip\",\n templateUrl: \"./tooltip.component.html\",\n styleUrls: [\"./tooltip.component.scss\"]\n})\nexport class ToolTipComponent implements OnInit, AfterViewInit {\n public toolTipText: string = \"\";\n public toolTipPosition: ITooltipPositions = \"bottom\";\n\n @ViewChild(\"container\") container: ElementRef;\n\n constructor() {}\n ngOnInit() {}\n ngAfterViewInit() {\n if (!this.container?.nativeElement) return;\n if (this.toolTipPosition === \"top\" || this.toolTipPosition === \"bottom\") {\n const eleWidth = this.container.nativeElement.getBoundingClientRect();\n this.container.nativeElement.style.left = eleWidth.width / -2 + \"px\";\n return;\n }\n if (this.toolTipPosition === \"left\") {\n const eleWidth = this.container.nativeElement.getBoundingClientRect();\n this.container.nativeElement.style.left = -eleWidth.width + \"px\";\n }\n }\n}\n","import { AfterViewInit, Directive, ElementRef, HostListener, Input, OnInit, ViewContainerRef, Injector } from \"@angular/core\";\nimport { Overlay, OverlayConfig, OverlayRef } from \"@angular/cdk/overlay\";\nimport { take } from \"rxjs/operators\";\nimport { ComponentPortal } from \"@angular/cdk/portal\";\nimport { ToolTipComponent } from \"./tooltip-container/tooltip.component\";\nimport { genPositionPairs } from \"mis-crystal-design-system/utils\";\nimport { ITooltipPositions } from \"./models/tooltip.model\";\n\n@Directive({\n selector: \"[misToolTip]\"\n})\nexport class ToolTipDirective implements OnInit, AfterViewInit {\n public isToolTipDisplayed: boolean = false;\n public toolTipText: string = \"\";\n public toolTipPosition: ITooltipPositions = \"bottom\";\n private overlayRef: OverlayRef;\n\n @Input() showOnHover: boolean = true;\n @Input() set showToolTip(value: boolean) {\n this.isToolTipDisplayed = value;\n if (value) this.displayToolTip();\n else this.hideToolTip();\n }\n @Input() set text(value: string) {\n this.toolTipText = value;\n }\n @Input() set position(value: ITooltipPositions) {\n this.toolTipPosition = value;\n }\n\n @HostListener(\"mouseenter\") onMouseEnter() {\n if (this.showOnHover) this.displayToolTip();\n }\n @HostListener(\"mouseleave\") onMouseLeave() {\n if (this.showOnHover) this.hideToolTip();\n }\n\n constructor(private element: ElementRef, private overlay: Overlay, private viewContainerRef: ViewContainerRef) {}\n\n ngOnInit() {}\n ngAfterViewInit() {\n if (this.isToolTipDisplayed) this.displayToolTip();\n else this.hideToolTip();\n }\n\n displayToolTip() {\n const positionStrategy = this.overlay\n .position()\n .flexibleConnectedTo(this.element)\n .withPositions(\n genPositionPairs(\n {\n positionX: \"center\",\n positionY: this.toolTipPosition === \"top\" ? \"top\" : \"center\",\n offsetX: this.positionTooltip(\"OFFSET_X\"),\n offsetY: this.positionTooltip(\"OFFSET_Y\")\n },\n false\n )\n )\n .withPush(true);\n const config = new OverlayConfig({\n hasBackdrop: false,\n positionStrategy,\n scrollStrategy: this.overlay.scrollStrategies.reposition()\n });\n this.overlayRef = this.overlay.create(config);\n const tempRef = new ComponentPortal(ToolTipComponent, this.viewContainerRef);\n const tooltipRef = this.overlayRef.attach(tempRef);\n tooltipRef.instance.toolTipText = this.toolTipText;\n tooltipRef.instance.toolTipPosition = this.toolTipPosition;\n this.overlayRef\n .backdropClick()\n .pipe(take(1))\n .subscribe(() => {\n this.hideToolTip();\n });\n }\n\n positionTooltip(type: \"OFFSET_X\" | \"OFFSET_Y\") {\n if (type === \"OFFSET_X\") {\n return this.toolTipPosition === \"right\"\n ? this.element.nativeElement.offsetWidth / 2 + 8\n : this.toolTipPosition === \"left\"\n ? (this.element.nativeElement.offsetWidth / 2 + 8) * -1\n : this.toolTipPosition === \"top\" || this.toolTipPosition === \"bottom\"\n ? 0\n : 8;\n }\n if (type !== \"OFFSET_Y\") return;\n return this.toolTipPosition === \"right\" || this.toolTipPosition === \"left\"\n ? -18\n : this.toolTipPosition === \"top\"\n ? -44\n : this.toolTipPosition === \"bottom\"\n ? this.element.nativeElement.offsetHeight / 2 + 8\n : 8;\n }\n\n hideToolTip() {\n this.overlayRef?.detach();\n this.overlayRef?.dispose();\n }\n}\n","import { NgModule, ModuleWithProviders } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\n\nimport { ToolTipDirective } from \"./tooltip.directive\";\nimport { ToolTipComponent } from \"./tooltip-container/tooltip.component\";\n\n@NgModule({\n declarations: [ToolTipDirective, ToolTipComponent],\n imports: [CommonModule],\n exports: [ToolTipDirective, ToolTipComponent],\n entryComponents: [ToolTipComponent]\n})\nexport class ToolTipModule {\n static forRoot(): ModuleWithProviders<ToolTipModule> {\n return { ngModule: ToolTipModule, providers: [] };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAQa,gBAAgB;IAM3B;QALO,gBAAW,GAAW,EAAE,CAAC;QACzB,oBAAe,GAAsB,QAAQ,CAAC;KAIrC;IAChB,QAAQ,MAAK;IACb,eAAe;;QACb,IAAI,QAAC,IAAI,CAAC,SAAS,0CAAE,aAAa,CAAA;YAAE,OAAO;QAC3C,IAAI,IAAI,CAAC,eAAe,KAAK,KAAK,IAAI,IAAI,CAAC,eAAe,KAAK,QAAQ,EAAE;YACvE,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,qBAAqB,EAAE,CAAC;YACtE,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC;YACrE,OAAO;SACR;QACD,IAAI,IAAI,CAAC,eAAe,KAAK,MAAM,EAAE;YACnC,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,qBAAqB,EAAE,CAAC;YACtE,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC,QAAQ,CAAC,KAAK,GAAG,IAAI,CAAC;SAClE;KACF;;;YAxBF,S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offsetX = 0, offsetY = 0 }, isResponsive) => {
4
+ const positions = [
5
+ new ConnectionPositionPair({ originX: positionX, originY: positionY }, {
6
+ overlayX: positionX,
7
+ overlayY: positionY
8
+ }, offsetX, offsetY),
9
+ new ConnectionPositionPair({ originX: "center", originY: "bottom" }, { overlayX: "center", overlayY: "top" }, offsetX, offsetY),
10
+ new ConnectionPositionPair({ originX: "center", originY: "top" }, { overlayX: "center", overlayY: "bottom" }, offsetX, offsetY),
11
+ new ConnectionPositionPair({ originX: "start", originY: "bottom" }, { overlayX: "start", overlayY: "top" }, offsetX, offsetY),
12
+ new ConnectionPositionPair({ originX: "start", originY: "top" }, { overlayX: "start", overlayY: "bottom" }, offsetX, offsetY),
13
+ new ConnectionPositionPair({ originX: "end", originY: "bottom" }, { overlayX: "end", overlayY: "top" }, offsetX, offsetY),
14
+ new ConnectionPositionPair({ originX: "end", originY: "top" }, { overlayX: "end", overlayY: "bottom" }, offsetX, offsetY)
15
+ ];
16
+ return isResponsive ? positions : positions.slice(0, 1);
17
+ };
18
+
19
+ /**
20
+ * Generated bundle index. Do not edit.
21
+ */
22
+
23
+ export { genPositionPairs };
24
+ //# sourceMappingURL=mis-crystal-design-system-utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mis-crystal-design-system-utils.js","sources":["../../../projects/mis-components/utils/index.ts","../../../projects/mis-components/utils/mis-crystal-design-system-utils.ts"],"sourcesContent":["import { ConnectionPositionPair } from \"@angular/cdk/overlay\";\n\nexport const genPositionPairs = ({ positionX, positionY, offsetX = 0, offsetY = 0 }, isResponsive: boolean): ConnectionPositionPair[] => {\n const positions = [\n new ConnectionPositionPair(\n { originX: positionX, originY: positionY },\n {\n overlayX: positionX,\n overlayY: positionY\n },\n offsetX,\n offsetY\n ),\n new ConnectionPositionPair({ originX: \"center\", originY: \"bottom\" }, { overlayX: \"center\", overlayY: \"top\" }, offsetX, offsetY),\n new ConnectionPositionPair({ originX: \"center\", originY: \"top\" }, { overlayX: \"center\", overlayY: \"bottom\" }, offsetX, offsetY),\n new ConnectionPositionPair({ originX: \"start\", originY: \"bottom\" }, { overlayX: \"start\", overlayY: \"top\" }, offsetX, offsetY),\n new ConnectionPositionPair({ originX: \"start\", originY: \"top\" }, { overlayX: \"start\", overlayY: \"bottom\" }, offsetX, offsetY),\n new ConnectionPositionPair({ originX: \"end\", originY: \"bottom\" }, { overlayX: \"end\", overlayY: \"top\" }, offsetX, offsetY),\n new ConnectionPositionPair({ originX: \"end\", originY: \"top\" }, { overlayX: \"end\", overlayY: \"bottom\" }, offsetX, offsetY)\n ];\n return isResponsive ? positions : positions.slice(0, 1);\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;MAEa,gBAAgB,GAAG,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,GAAG,CAAC,EAAE,OAAO,GAAG,CAAC,EAAE,EAAE,YAAqB;IACxG,MAAM,SAAS,GAAG;QAChB,IAAI,sBAAsB,CACxB,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,EAC1C;YACE,QAAQ,EAAE,SAAS;YACnB,QAAQ,EAAE,SAAS;SACpB,EACD,OAAO,EACP,OAAO,CACR;QACD,IAAI,sBAAsB,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC;QAC/H,IAAI,sBAAsB,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC;QAC/H,IAAI,sBAAsB,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC;QAC7H,IAAI,sBAAsB,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC;QAC7H,IAAI,sBAAsB,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC;QACzH,IAAI,sBAAsB,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC;KAC1H,CAAC;IACF,OAAO,YAAY,GAAG,SAAS,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAC1D;;ACrBA;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mis-crystal-design-system",
3
- "version": "2.4.5",
3
+ "version": "2.4.6",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "*",
6
6
  "@angular/core": "*",
@@ -1 +1 @@
1
- export * from './public_api';
1
+ export * from "./public_api";
@@ -1 +1 @@
1
- {"__symbolic":"module","version":4,"metadata":{"ToolTipDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":12,"character":1},"arguments":[{"selector":"[misToolTip]"}]}],"members":{"responsivePosition":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":21,"character":3}}]}],"showOnHover":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":22,"character":3}}]}],"showToolTip":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":23,"character":3}}]}],"width":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":28,"character":3}}]}],"text":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":32,"character":3}}]}],"position":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":36,"character":3}}]}],"onMouseEnter":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":41,"character":3},"arguments":["mouseenter"]}]}],"onMouseLeave":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":44,"character":3},"arguments":["mouseleave"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":50,"character":24},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":51,"character":22},{"__symbolic":"reference","module":"@angular/core","name":"ViewContainerRef","line":52,"character":30},{"__symbolic":"reference","module":"@angular/core","name":"ComponentFactoryResolver","line":53,"character":38}]}],"ngOnInit":[{"__symbolic":"method"}],"ngAfterViewInit":[{"__symbolic":"method"}],"createToolTip":[{"__symbolic":"method"}],"displayToolTip":[{"__symbolic":"method"}],"hideToolTip":[{"__symbolic":"method"}],"updatePosition":[{"__symbolic":"method"}]}},"ToolTipComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":2,"character":1},"arguments":[{"selector":"mis-tooltip","template":"<div id=\"tooltip-container\" [hidden]=\"toolTipText.length < 1\"\n #container\n [ngStyle]=\"{'width': toolTipWidth.length > 0? toolTipWidth : ''}\"\n [ngClass]=\"{\n 'left': toolTipPosition === 'Left',\n 'right': toolTipPosition === 'Right',\n 'top': toolTipPosition === 'Top',\n 'bottom': toolTipPosition === 'Bottom'\n }\"\n>\n <div id=\"tooltip\">\n <div id=\"tooltip-text\">{{toolTipText}}</div>\n <span\n id=\"arrow\"\n [ngClass]=\"{\n 'arrow-left': toolTipPosition === 'Left',\n 'arrow-right': toolTipPosition === 'Right',\n 'arrow-top': toolTipPosition === 'Top',\n 'arrow-bottom': toolTipPosition === 'Bottom'\n }\"\n ></span>\n </div>\n</div>\n","styles":["#tooltip-container{position:absolute;z-index:1}#tooltip-container.top{left:50%;transform:translateX(-50%);top:-48px}#tooltip-container.bottom{left:50%;transform:translateX(-50%);bottom:-48px}#tooltip-container.left,#tooltip-container.right{top:50%;transform:translateY(-50%)}#tooltip{position:relative;display:block;padding:8px 12px;border-radius:8px;color:#fff;background:#181f33;font-family:Lato,sans-serif;font-style:normal;font-weight:400;font-size:14px;line-height:20px;text-align:center;letter-spacing:.2px}#tooltip-text{width:100%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}#arrow{position:absolute;height:12px;width:12px;background:#181f33;z-index:1}.arrow-top{bottom:-6px}.arrow-bottom,.arrow-top{left:50%;transform:translateX(-50%) rotate(-45deg);-webkit-transform:translateX(-50%) rotate(-45deg)}.arrow-bottom{top:-6px}.arrow-left{right:-6px}.arrow-left,.arrow-right{top:50%;transform:translateY(-50%) rotate(-45deg);-webkit-transform:translateY(-50%) rotate(-45deg)}.arrow-right{left:-6px}"]}]}],"members":{"text":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":13,"character":3}}]}],"width":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":17,"character":3}}]}],"position":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":21,"character":3}}]}],"container":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":26,"character":3},"arguments":["container"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":28,"character":32}]}],"ngOnInit":[{"__symbolic":"method"}],"ngAfterViewInit":[{"__symbolic":"method"}],"updateToolTipPosition":[{"__symbolic":"method"}]}},"ToolTipModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":6,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"ToolTipDirective"},{"__symbolic":"reference","name":"ToolTipComponent"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":8,"character":12}],"exports":[{"__symbolic":"reference","name":"ToolTipDirective"},{"__symbolic":"reference","name":"ToolTipComponent"}],"entryComponents":[{"__symbolic":"reference","name":"ToolTipComponent"}]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":[],"value":{"ngModule":{"__symbolic":"reference","name":"ToolTipModule"},"providers":[]}}}}},"origins":{"ToolTipDirective":"./tooltip.directive","ToolTipComponent":"./tooltip.component","ToolTipModule":"./tooltip.module"},"importAs":"mis-crystal-design-system/tooltip"}
1
+ {"__symbolic":"module","version":4,"metadata":{"ToolTipDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":8,"character":1},"arguments":[{"selector":"[misToolTip]"}]}],"members":{"showOnHover":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":17,"character":3}}]}],"showToolTip":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":18,"character":3}}]}],"text":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":23,"character":3}}]}],"position":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":26,"character":3}}]}],"onMouseEnter":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":30,"character":3},"arguments":["mouseenter"]}]}],"onMouseLeave":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":33,"character":3},"arguments":["mouseleave"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":37,"character":31},{"__symbolic":"reference","module":"@angular/cdk/overlay","name":"Overlay","line":37,"character":60},{"__symbolic":"reference","module":"@angular/core","name":"ViewContainerRef","line":37,"character":95}]}],"ngOnInit":[{"__symbolic":"method"}],"ngAfterViewInit":[{"__symbolic":"method"}],"displayToolTip":[{"__symbolic":"method"}],"positionTooltip":[{"__symbolic":"method"}],"hideToolTip":[{"__symbolic":"method"}]}},"ToolTipComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":3,"character":1},"arguments":[{"selector":"mis-tooltip","template":"<div id=\"tooltip-container\" *ngIf=\"toolTipText.length > 0\" #container>\n <div id=\"tooltip\">\n <div id=\"tooltip-text\">{{ toolTipText }}</div>\n <span\n id=\"arrow\"\n [ngClass]=\"{\n 'arrow-left': toolTipPosition === 'left',\n 'arrow-right': toolTipPosition === 'right',\n 'arrow-top': toolTipPosition === 'top',\n 'arrow-bottom': toolTipPosition === 'bottom'\n }\"\n ></span>\n </div>\n</div>\n","styles":["#tooltip-container{position:absolute;z-index:1}#tooltip{position:relative;display:block;padding:8px 12px;border-radius:8px;color:#fff;background:#181f33;font-family:Lato,sans-serif;font-style:normal;font-weight:400;font-size:14px;line-height:20px;text-align:center;letter-spacing:.2px}#tooltip-text{width:100%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}#arrow{position:absolute;height:12px;width:12px;background:#181f33;z-index:1}.arrow-top{bottom:-6px}.arrow-bottom,.arrow-top{left:50%;transform:translateX(-50%) rotate(-45deg);-webkit-transform:translateX(-50%) rotate(-45deg)}.arrow-bottom{top:-6px}.arrow-left{right:-6px}.arrow-left,.arrow-right{top:50%;transform:translateY(-50%) rotate(-45deg);-webkit-transform:translateY(-50%) rotate(-45deg)}.arrow-right{left:-6px}"]}]}],"members":{"container":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":12,"character":3},"arguments":["container"]}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}],"ngAfterViewInit":[{"__symbolic":"method"}]}},"ToolTipModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":6,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"ToolTipDirective"},{"__symbolic":"reference","name":"ToolTipComponent"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":8,"character":12}],"exports":[{"__symbolic":"reference","name":"ToolTipDirective"},{"__symbolic":"reference","name":"ToolTipComponent"}],"entryComponents":[{"__symbolic":"reference","name":"ToolTipComponent"}]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":[],"value":{"ngModule":{"__symbolic":"reference","name":"ToolTipModule"},"providers":[]}}}},"ITooltipPositions":{"__symbolic":"interface"}},"origins":{"ToolTipDirective":"./tooltip.directive","ToolTipComponent":"./tooltip-container/tooltip.component","ToolTipModule":"./tooltip.module","ITooltipPositions":"./models/tooltip.model"},"importAs":"mis-crystal-design-system/tooltip"}
@@ -0,0 +1 @@
1
+ export declare type ITooltipPositions = "left" | "right" | "top" | "bottom";
@@ -1,3 +1,4 @@
1
- export { ToolTipDirective } from './tooltip.directive';
2
- export { ToolTipComponent } from './tooltip.component';
3
- export { ToolTipModule } from './tooltip.module';
1
+ export { ToolTipDirective } from "./tooltip.directive";
2
+ export { ToolTipComponent } from "./tooltip-container/tooltip.component";
3
+ export { ToolTipModule } from "./tooltip.module";
4
+ export { ITooltipPositions } from "./models/tooltip.model";
@@ -0,0 +1,10 @@
1
+ import { AfterViewInit, ElementRef, OnInit } from "@angular/core";
2
+ import { ITooltipPositions } from "../models/tooltip.model";
3
+ export declare class ToolTipComponent implements OnInit, AfterViewInit {
4
+ toolTipText: string;
5
+ toolTipPosition: ITooltipPositions;
6
+ container: ElementRef;
7
+ constructor();
8
+ ngOnInit(): void;
9
+ ngAfterViewInit(): void;
10
+ }