@agorapulse/ui-components 14.0.6 → 14.1.1
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/agorapulse-ui-components-14.1.1.tgz +0 -0
- package/directives/truncate-tooltip.directive.d.ts +3 -2
- package/directives/truncate-tooltip.model.d.ts +5 -0
- package/esm2020/datepicker/datepicker.component.mjs +2 -2
- package/esm2020/directives/truncate-tooltip.directive.mjs +11 -3
- package/esm2020/directives/truncate-tooltip.model.mjs +2 -0
- package/esm2020/index.mjs +2 -1
- package/esm2020/neo-datepicker/agorapulse-ui-components-neo-datepicker.mjs +5 -0
- package/esm2020/neo-datepicker/day-detail.model.mjs +2 -0
- package/esm2020/neo-datepicker/day-disabled.pipe.mjs +21 -0
- package/esm2020/neo-datepicker/neo-datepicker.component.mjs +189 -0
- package/esm2020/neo-datepicker/public_api.mjs +4 -0
- package/esm2020/src/lib/agorapulse-ui-components.module.mjs +16 -2
- package/esm2020/tooltip-neo/tooltip-neo.component.mjs +6 -3
- package/esm2020/tooltip-neo/tooltip-neo.directive.mjs +3 -2
- package/esm2020/tooltip-neo/tooltip-neo.model.mjs +1 -1
- package/fesm2015/agorapulse-ui-components-datepicker.mjs +1 -1
- package/fesm2015/agorapulse-ui-components-datepicker.mjs.map +1 -1
- package/fesm2015/agorapulse-ui-components-directives.mjs +6 -1
- package/fesm2015/agorapulse-ui-components-directives.mjs.map +1 -1
- package/fesm2015/agorapulse-ui-components-neo-datepicker.mjs +214 -0
- package/fesm2015/agorapulse-ui-components-neo-datepicker.mjs.map +1 -0
- package/fesm2015/agorapulse-ui-components-tooltip-neo.mjs +7 -3
- package/fesm2015/agorapulse-ui-components-tooltip-neo.mjs.map +1 -1
- package/fesm2015/agorapulse-ui-components.mjs +16 -1
- package/fesm2015/agorapulse-ui-components.mjs.map +1 -1
- package/fesm2020/agorapulse-ui-components-datepicker.mjs +1 -1
- package/fesm2020/agorapulse-ui-components-datepicker.mjs.map +1 -1
- package/fesm2020/agorapulse-ui-components-directives.mjs +9 -1
- package/fesm2020/agorapulse-ui-components-directives.mjs.map +1 -1
- package/fesm2020/agorapulse-ui-components-neo-datepicker.mjs +214 -0
- package/fesm2020/agorapulse-ui-components-neo-datepicker.mjs.map +1 -0
- package/fesm2020/agorapulse-ui-components-tooltip-neo.mjs +7 -3
- package/fesm2020/agorapulse-ui-components-tooltip-neo.mjs.map +1 -1
- package/fesm2020/agorapulse-ui-components.mjs +16 -1
- package/fesm2020/agorapulse-ui-components.mjs.map +1 -1
- package/index.d.ts +1 -0
- package/neo-datepicker/day-detail.model.d.ts +9 -0
- package/neo-datepicker/day-disabled.pipe.d.ts +8 -0
- package/neo-datepicker/index.d.ts +5 -0
- package/neo-datepicker/neo-datepicker.component.d.ts +49 -0
- package/neo-datepicker/public_api.d.ts +3 -0
- package/package.json +11 -2
- package/src/lib/agorapulse-ui-components.module.d.ts +13 -12
- package/tooltip-neo/tooltip-neo.component.d.ts +1 -0
- package/tooltip-neo/tooltip-neo.model.d.ts +1 -0
- package/agorapulse-ui-components-14.0.6.tgz +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agorapulse-ui-components-directives.mjs","sources":["../../../libs/ui-components/directives/src/autosize-textarea.directive.ts","../../../libs/ui-components/directives/src/default-image.directive.ts","../../../libs/ui-components/directives/src/ellipsis.directive.ts","../../../libs/ui-components/directives/src/equal-validator.directive.ts","../../../libs/ui-components/directives/src/frozen-gif.directive.ts","../../../libs/ui-components/directives/src/multi-style-text.directive.ts","../../../libs/ui-components/directives/src/truncate-tooltip.directive.ts","../../../libs/ui-components/directives/src/agorapulse-ui-components-directives.ts"],"sourcesContent":["import { AfterContentChecked, Directive, ElementRef, HostListener } from '@angular/core';\n\n@Directive({\n selector: 'textarea[apAutosize]',\n standalone: true\n})\n/**\n * expand textarea to fit content. Doesn't shrink.\n */\nexport class AutosizeTextareaDirective implements AfterContentChecked {\n\n static maxHeight: number = 200;\n\n constructor(public element: ElementRef) {}\n\n @HostListener('input')\n public onInput() {\n this.resize();\n }\n\n public ngAfterContentChecked() {\n this.resize();\n }\n\n public resize() {\n const style = this.element.nativeElement.style;\n const scrollHeight = this.element.nativeElement.scrollHeight;\n const actualHeight = this.element.nativeElement.offsetHeight;\n if (AutosizeTextareaDirective.maxHeight < scrollHeight) {\n // we arrived at the max\n style.overflow = 'auto';\n style.height = `${AutosizeTextareaDirective.maxHeight}px`;\n } else if (actualHeight < scrollHeight) {\n style.overflow = 'hidden';\n style.height = `${scrollHeight}px`;\n }\n }\n\n}\n","import {Directive, Input} from '@angular/core';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'img[default]',\n standalone: true,\n // eslint-disable-next-line @angular-eslint/no-host-metadata-property\n host: {\n '(error)': 'updateUrl()',\n '[src]': 'src'\n }\n})\nexport class DefaultImageDirective {\n @Input() src: string;\n @Input() default: string;\n\n updateUrl() {\n if (this.default) {\n this.src = this.default;\n } else {\n this.src = 'assets/lib-ui-components/img/default-avatar.png';\n }\n }\n}\n","import {AfterContentChecked, Directive, ElementRef, EventEmitter, Input, Output,} from '@angular/core';\n\n/**\n * Removes excess text from element until it fits in elements\n * and appends a ellipsis symbol to end of text. This requires that\n * the elements height be fixed\n *\n * @example\n * ```html\n * <p apEllipsis>Ullamco esse laborum</p>\n * ```\n *\n */\n@Directive({\n selector: '[apEllipsis]',\n standalone: true,\n})\nexport class EllipsisDirective implements AfterContentChecked {\n\n @Input() apEllipsisSeparator: string;\n @Input() apEllipsisClip: boolean = false;\n @Input() apEllipsisIndex: number;\n @Input() apEllipsisChar: string = '...';\n @Input() apEllipsisClickable: boolean = false;\n\n @Output() apEllipsisRemovedElementsCount = new EventEmitter<number>();\n @Output() apEllipsisRemovedText = new EventEmitter<string>();\n\n private get hasOverflow(): boolean {\n const el: HTMLElement = this.el.nativeElement;\n return (el.scrollHeight > el.offsetHeight) || (el.scrollWidth > el.offsetWidth);\n }\n\n constructor(private el: ElementRef) { }\n\n ngAfterContentChecked() {\n this.clipText();\n }\n\n private clipText(): void {\n const el: HTMLElement = this.el.nativeElement;\n let text = el.innerText;\n let removedText = '';\n if (this.apEllipsisIndex > -1) {\n removedText = text.substring(this.apEllipsisIndex, text.length - 1) + removedText;\n text = text.substring(0, this.apEllipsisIndex);\n el.innerText = `${text}${this.apEllipsisChar}`;\n\n if (this.apEllipsisClickable) {\n el.addEventListener('click', () => {\n el.innerText = `${text}${removedText}`;\n });\n }\n } else {\n while (this.hasOverflow && text.length > 0) {\n removedText = text[text.length - 1] + removedText;\n text = text.substring(0, text.length - 1);\n el.innerText = `${text}${this.apEllipsisChar}`;\n }\n }\n\n if (this.apEllipsisSeparator) {\n const removedElementsCount = removedText.split(this.apEllipsisSeparator)\n .filter(element => !!element && element.length > 0).length;\n if (removedElementsCount > 0) {\n this.apEllipsisRemovedElementsCount.emit(removedElementsCount);\n }\n }\n if (removedText && removedText.length > 0) {\n this.apEllipsisRemovedText.emit(removedText);\n }\n }\n}\n","// Based on https://scotch.io/tutorials/how-to-implement-a-custom-validator-directive-confirm-password-in-angular-2\nimport { Directive, forwardRef, Attribute } from '@angular/core';\nimport { Validator, AbstractControl, NG_VALIDATORS } from '@angular/forms';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[validateEqual][formControlName],[validateEqual][formControl],[validateEqual][ngModel]',\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => EqualValidatorDirective),\n multi: true\n }\n ],\n standalone: true,\n})\nexport class EqualValidatorDirective implements Validator {\n\n constructor(@Attribute('validateEqual') public validateEqual: string,\n @Attribute('validateEqualReference') public validateEqualReference: string) {}\n\n validate(self: AbstractControl): { [key: string]: any } {\n const other = self.root.get(this.validateEqual);\n if (other) {\n if (this.isReference()) {\n if (self.value === other.value) {\n delete other.errors['validateEqual'];\n if (!Object.keys(other.errors).length) {\n other.setErrors(null);\n }\n } else {\n other.setErrors({ validateEqual: false });\n }\n } else if (self.value !== other.value) {\n return { validateEqual: false };\n }\n }\n return null;\n }\n\n private isReference(): boolean {\n if (!this.validateEqualReference) {\n return false;\n }\n return this.validateEqualReference === 'true';\n }\n\n}\n","import {Directive, ElementRef, HostBinding, Input, OnChanges} from '@angular/core';\n\nexport class GifService {\n static isGif(src: string) {\n return src && src.split('?')[0].endsWith('.gif');\n }\n}\n\n/**\n * If the image is a GIF then replace the img element by a canvas containing a frozen gif.\n * Note 1: if the image is displayed under a condition, the condition must be applied on the parent of the image, so the\n * new canvas element will have the same condition.\n * Note 2: the image must not have the properties \"display\" and \"visibility\" in its style. Since they are used to frozen\n * the GIF. You need to apply this properties on the parent element.\n * Note 3: If the GIF is frozen, all the event are propagated to the image. However, all events are dispatched\n * with an Event instance. Ex: click event is not dispatched with a MouseEvent instance.\n */\n\n@Directive({\n selector: 'img[apFrozenGif]',\n // eslint-disable-next-line @angular-eslint/no-host-metadata-property\n host: {\n '[src]': 'src'\n },\n standalone: true,\n})\nexport class FrozenGifDirective implements OnChanges {\n @Input() src: string;\n @Input() apFrozen = true;\n // Add all the events that need to be propagated.\n @Input() apGifEvents: string[] = ['click'];\n\n private readonly element: HTMLImageElement;\n private canvas: HTMLCanvasElement;\n\n constructor(private elementRef: ElementRef) {\n const element = this.elementRef.nativeElement;\n if (!(element instanceof HTMLImageElement)) {\n return;\n }\n\n this.element = element;\n }\n\n ngOnChanges(changes: any): void {\n let freeze = false;\n if (changes.src) {\n freeze = true;\n }\n if (changes.frozen) {\n if (changes.frozen.currentValue) {\n freeze = true;\n } else {\n this.unfreeze();\n }\n }\n\n if (freeze) {\n this.freeze();\n }\n\n }\n\n private freeze() {\n if (!GifService.isGif(this.src) || !this.apFrozen) {\n this.unfreeze();\n return;\n }\n\n // hack to avoid displaying the GIF before replacing it by the canvas\n this.element.style.visibility = 'hidden';\n this.element.addEventListener('load', () => this.addCanvas());\n }\n\n private addCanvas() {\n if (this.canvas) {\n this.canvas.remove();\n }\n\n this.canvas = document.createElement('canvas');\n this.canvas.width = this.element.width;\n this.canvas.height = this.element.height;\n this.canvas.getContext('2d').drawImage(this.element, 0, 0, this.canvas.width, this.canvas.height);\n for (let i = 0; i < this.element.attributes.length; i++) {\n const attr = this.element.attributes[i];\n if (attr.name === 'id') { // avoid two elements with the same id\n this.canvas.setAttribute('id', attr.value + '_frozenGif');\n } else if (attr.name === 'style' && attr.value.includes('visibility: hidden;') || attr.value.includes('display: none;')) {\n // remove the added 'visibility: hidden' and 'display: none'\n const styleValue = attr.value;\n this.canvas.setAttribute('style', styleValue.replace('visibility: hidden;', '').replace('display: none;', ''));\n } else if (attr.name !== '\"') { // test for invalid attributes\n this.canvas.setAttribute(attr.name, attr.value);\n }\n }\n\n this.addEvents();\n\n this.element.parentNode.insertBefore(this.canvas, this.element);\n this.element.style.display = 'none';\n }\n\n private addEvents() {\n this.apGifEvents.forEach((eventName: string) => {\n this.canvas.addEventListener(eventName, (ev: Event) => this.element.dispatchEvent(\n // wm: find a way to dispatch the right event type\n new Event(ev.type, ev)\n ));\n });\n }\n\n private unfreeze() {\n if (this.canvas) {\n this.canvas.remove();\n this.canvas = null;\n }\n this.element.style.visibility = 'inherit';\n this.element.style.display = 'inherit';\n }\n}\n","import {Directive, Input, Renderer2, ElementRef, Output, EventEmitter} from '@angular/core';\n\nconst PART_START = '<ng-container data-mst=\"';\nconst PARSE_MIDDLE = '\">';\nconst PARSE_END = '</ng-container>';\nconst DATA_SEPARATOR = ',';\nconst OPTIONAL_EVENTS_SEPARATOR = ';';\n\ninterface Part {\n content: string;\n clazz?: string[]; // Not defined on sterile text\n clickName?: string; // Not defined on sterile text\n}\n\n/**\n * This directive aims to parse simple string to extract some specific tags and to turn them into SPAN with styling classes attributes and optional event listening.\n * The specific tags must this schema: <ng-container data-mst=\"STYLING-CLASSES\">TEXT</ng-container>.\n * Example: 'Lorem <ng-container data-mst=\"my-style\">ipsum</ng-container> dolor sit amet'.\n */\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[multiStyleText]',\n standalone: true,\n})\nexport class MultiStyleTextDirective {\n\n private childrenCreated: any[] = [];\n\n @Input() set multiStyleText(fullText: string) {\n // First remove previously added children (on update).\n for (const child of this.childrenCreated) {\n this.renderer.removeChild(this.elRef.nativeElement, child);\n }\n\n if (fullText && fullText.length > 0) {\n MultiStyleTextDirective.parse(fullText).forEach((part: Part) => {\n if (part.clazz || part.clickName) {\n // Parsed item with styling classes and/or event listening.\n const span = this.renderer.createElement('span');\n const text = this.renderer.createText(part.content);\n this.renderer.appendChild(span, text);\n if (part.clazz) {\n part.clazz.forEach(clazz => this.renderer.addClass(span, clazz));\n }\n if (part.clickName) {\n this.renderer.listen(span, 'click', () => this.partEvent.emit(part.clickName));\n }\n this.renderer.appendChild(this.elRef.nativeElement, span);\n this.childrenCreated.push(span);\n } else {\n // Specific of part without styling classes (could be used to get event listening only)\n const text = this.renderer.createText(part.content);\n this.renderer.appendChild(this.elRef.nativeElement, text);\n this.childrenCreated.push(text);\n }\n });\n }\n }\n\n @Output() partEvent = new EventEmitter<string>();\n\n public constructor(\n private elRef: ElementRef,\n private renderer: Renderer2\n ) {\n }\n\n private static parse(toParse: string): Part[] {\n const parts: Part[] = [];\n let startIndex = toParse.indexOf(PART_START);\n while (startIndex >= 0) {\n if (startIndex > 0) {\n // Optional text before first parsed part.\n parts.push({content: toParse.substring(0, startIndex)});\n }\n const elem = this.cutFirstGroup(toParse.substring(startIndex));\n if (elem === 'invalid') {\n return [];\n } else if (elem) {\n parts.push({\n content: elem.content,\n clazz: elem.classes,\n clickName: elem.clickName\n });\n toParse = elem.rest;\n startIndex = toParse.indexOf(PART_START);\n } else {\n parts.push({content: toParse});\n }\n }\n // Very end\n if (toParse.length > 0) {\n parts.push({content: toParse});\n }\n return parts;\n }\n\n private static cutFirstGroup(toCut: string): {content: string, classes: string[], clickName: string, rest: string} | 'invalid' | null {\n if (!toCut.startsWith(PART_START)) {\n // String doesn't start with expected parser start.\n return null;\n }\n\n const afterParserStart = toCut.substring(PART_START.length);\n let index = afterParserStart.indexOf(PARSE_MIDDLE);\n if (index <= 0) {\n console.error('Not able to parse invalid string: ' + toCut);\n return 'invalid';\n }\n const data = afterParserStart.substring(0, index);\n let classes;\n let clickName;\n const eventsPartSeparatorIndex = data.indexOf(OPTIONAL_EVENTS_SEPARATOR);\n if (eventsPartSeparatorIndex > 0) {\n // Case the data contains events part with dedicated separator\n classes = data.substring(0, eventsPartSeparatorIndex);\n clickName = data.substring(eventsPartSeparatorIndex + 1);\n } else {\n // Otherwise, only design classes are provided\n classes = data;\n clickName = undefined;\n }\n let rest = afterParserStart.substring(index + PARSE_MIDDLE.length);\n index = rest.indexOf(PARSE_END);\n if (index <= 0) {\n console.error('Not able to parse invalid string: ' + toCut);\n return 'invalid';\n }\n const content = rest.substring(0, index);\n rest = rest.substring(index + PARSE_END.length);\n\n return {\n content,\n classes: classes.split(DATA_SEPARATOR),\n clickName,\n rest\n };\n }\n}\n","// Agorapulse\nimport {TooltipNeoDirective, TooltipNeoParams} from '@agorapulse/ui-components/tooltip-neo';\n// Angular\nimport {Directive, ElementRef, Input, OnDestroy, OnInit} from '@angular/core';\n// Third-parties\nimport {fromEvent, Subscription} from \"rxjs\";\n\n@Directive({selector: '[apTooltipNeo][truncateTooltip]', standalone: true,})\nexport class TruncateTooltipDirective implements OnInit, OnDestroy {\n\n @Input() truncateTooltip: string | TooltipNeoParams;\n\n private elementRefMouseOver$: Subscription;\n\n constructor(\n private tooltipNeo: TooltipNeoDirective,\n private elementRef: ElementRef<HTMLElement>\n ) {\n }\n\n private updateTruncateState(): void {\n const element = this.elementRef.nativeElement;\n const truncated = element.scrollWidth > element.clientWidth;\n this.tooltipNeo.apTooltipNeo = truncated ? this.truncateTooltip : '';\n }\n\n ngOnInit(): void {\n this.elementRefMouseOver$ = fromEvent(this.elementRef.nativeElement, 'mouseover')\n .subscribe(() => this.updateTruncateState());\n }\n\n ngOnDestroy(): void {\n this.elementRefMouseOver$.unsubscribe();\n }\n}\n","/**\n * Generated bundle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ED,QAAQ,GAAA;AACJ,QAAA,IAAI,CAAC,oBAAoB,GAAG,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,WAAW,CAAC;aAC5E,SAAS,CAAC,MAAM,IAAI,CAAC,mBAAmB,EAAE,CAAC,CAAC;KACpD;IAED,WAAW,GAAA;AACP,QAAA,IAAI,CAAC,oBAAoB,CAAC,WAAW,EAAE,CAAC;KAC3C;;qHAzBQ,wBAAwB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,mBAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,UAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;yGAAxB,wBAAwB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,iCAAA,EAAA,MAAA,EAAA,EAAA,eAAA,EAAA,iBAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;2FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBADpC,SAAS;YAAC,IAAA,EAAA,CAAA,EAAC,QAAQ,EAAE,iCAAiC,EAAE,UAAU,EAAE,IAAI,GAAE,CAAA;mIAG9D,eAAe,EAAA,CAAA;sBAAvB,KAAK;;;ACVV;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"agorapulse-ui-components-directives.mjs","sources":["../../../libs/ui-components/directives/src/autosize-textarea.directive.ts","../../../libs/ui-components/directives/src/default-image.directive.ts","../../../libs/ui-components/directives/src/ellipsis.directive.ts","../../../libs/ui-components/directives/src/equal-validator.directive.ts","../../../libs/ui-components/directives/src/frozen-gif.directive.ts","../../../libs/ui-components/directives/src/multi-style-text.directive.ts","../../../libs/ui-components/directives/src/truncate-tooltip.directive.ts","../../../libs/ui-components/directives/src/agorapulse-ui-components-directives.ts"],"sourcesContent":["import { AfterContentChecked, Directive, ElementRef, HostListener } from '@angular/core';\n\n@Directive({\n selector: 'textarea[apAutosize]',\n standalone: true\n})\n/**\n * expand textarea to fit content. Doesn't shrink.\n */\nexport class AutosizeTextareaDirective implements AfterContentChecked {\n\n static maxHeight: number = 200;\n\n constructor(public element: ElementRef) {}\n\n @HostListener('input')\n public onInput() {\n this.resize();\n }\n\n public ngAfterContentChecked() {\n this.resize();\n }\n\n public resize() {\n const style = this.element.nativeElement.style;\n const scrollHeight = this.element.nativeElement.scrollHeight;\n const actualHeight = this.element.nativeElement.offsetHeight;\n if (AutosizeTextareaDirective.maxHeight < scrollHeight) {\n // we arrived at the max\n style.overflow = 'auto';\n style.height = `${AutosizeTextareaDirective.maxHeight}px`;\n } else if (actualHeight < scrollHeight) {\n style.overflow = 'hidden';\n style.height = `${scrollHeight}px`;\n }\n }\n\n}\n","import {Directive, Input} from '@angular/core';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'img[default]',\n standalone: true,\n // eslint-disable-next-line @angular-eslint/no-host-metadata-property\n host: {\n '(error)': 'updateUrl()',\n '[src]': 'src'\n }\n})\nexport class DefaultImageDirective {\n @Input() src: string;\n @Input() default: string;\n\n updateUrl() {\n if (this.default) {\n this.src = this.default;\n } else {\n this.src = 'assets/lib-ui-components/img/default-avatar.png';\n }\n }\n}\n","import {AfterContentChecked, Directive, ElementRef, EventEmitter, Input, Output,} from '@angular/core';\n\n/**\n * Removes excess text from element until it fits in elements\n * and appends a ellipsis symbol to end of text. This requires that\n * the elements height be fixed\n *\n * @example\n * ```html\n * <p apEllipsis>Ullamco esse laborum</p>\n * ```\n *\n */\n@Directive({\n selector: '[apEllipsis]',\n standalone: true,\n})\nexport class EllipsisDirective implements AfterContentChecked {\n\n @Input() apEllipsisSeparator: string;\n @Input() apEllipsisClip: boolean = false;\n @Input() apEllipsisIndex: number;\n @Input() apEllipsisChar: string = '...';\n @Input() apEllipsisClickable: boolean = false;\n\n @Output() apEllipsisRemovedElementsCount = new EventEmitter<number>();\n @Output() apEllipsisRemovedText = new EventEmitter<string>();\n\n private get hasOverflow(): boolean {\n const el: HTMLElement = this.el.nativeElement;\n return (el.scrollHeight > el.offsetHeight) || (el.scrollWidth > el.offsetWidth);\n }\n\n constructor(private el: ElementRef) { }\n\n ngAfterContentChecked() {\n this.clipText();\n }\n\n private clipText(): void {\n const el: HTMLElement = this.el.nativeElement;\n let text = el.innerText;\n let removedText = '';\n if (this.apEllipsisIndex > -1) {\n removedText = text.substring(this.apEllipsisIndex, text.length - 1) + removedText;\n text = text.substring(0, this.apEllipsisIndex);\n el.innerText = `${text}${this.apEllipsisChar}`;\n\n if (this.apEllipsisClickable) {\n el.addEventListener('click', () => {\n el.innerText = `${text}${removedText}`;\n });\n }\n } else {\n while (this.hasOverflow && text.length > 0) {\n removedText = text[text.length - 1] + removedText;\n text = text.substring(0, text.length - 1);\n el.innerText = `${text}${this.apEllipsisChar}`;\n }\n }\n\n if (this.apEllipsisSeparator) {\n const removedElementsCount = removedText.split(this.apEllipsisSeparator)\n .filter(element => !!element && element.length > 0).length;\n if (removedElementsCount > 0) {\n this.apEllipsisRemovedElementsCount.emit(removedElementsCount);\n }\n }\n if (removedText && removedText.length > 0) {\n this.apEllipsisRemovedText.emit(removedText);\n }\n }\n}\n","// Based on https://scotch.io/tutorials/how-to-implement-a-custom-validator-directive-confirm-password-in-angular-2\nimport { Directive, forwardRef, Attribute } from '@angular/core';\nimport { Validator, AbstractControl, NG_VALIDATORS } from '@angular/forms';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[validateEqual][formControlName],[validateEqual][formControl],[validateEqual][ngModel]',\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => EqualValidatorDirective),\n multi: true\n }\n ],\n standalone: true,\n})\nexport class EqualValidatorDirective implements Validator {\n\n constructor(@Attribute('validateEqual') public validateEqual: string,\n @Attribute('validateEqualReference') public validateEqualReference: string) {}\n\n validate(self: AbstractControl): { [key: string]: any } {\n const other = self.root.get(this.validateEqual);\n if (other) {\n if (this.isReference()) {\n if (self.value === other.value) {\n delete other.errors['validateEqual'];\n if (!Object.keys(other.errors).length) {\n other.setErrors(null);\n }\n } else {\n other.setErrors({ validateEqual: false });\n }\n } else if (self.value !== other.value) {\n return { validateEqual: false };\n }\n }\n return null;\n }\n\n private isReference(): boolean {\n if (!this.validateEqualReference) {\n return false;\n }\n return this.validateEqualReference === 'true';\n }\n\n}\n","import {Directive, ElementRef, HostBinding, Input, OnChanges} from '@angular/core';\n\nexport class GifService {\n static isGif(src: string) {\n return src && src.split('?')[0].endsWith('.gif');\n }\n}\n\n/**\n * If the image is a GIF then replace the img element by a canvas containing a frozen gif.\n * Note 1: if the image is displayed under a condition, the condition must be applied on the parent of the image, so the\n * new canvas element will have the same condition.\n * Note 2: the image must not have the properties \"display\" and \"visibility\" in its style. Since they are used to frozen\n * the GIF. You need to apply this properties on the parent element.\n * Note 3: If the GIF is frozen, all the event are propagated to the image. However, all events are dispatched\n * with an Event instance. Ex: click event is not dispatched with a MouseEvent instance.\n */\n\n@Directive({\n selector: 'img[apFrozenGif]',\n // eslint-disable-next-line @angular-eslint/no-host-metadata-property\n host: {\n '[src]': 'src'\n },\n standalone: true,\n})\nexport class FrozenGifDirective implements OnChanges {\n @Input() src: string;\n @Input() apFrozen = true;\n // Add all the events that need to be propagated.\n @Input() apGifEvents: string[] = ['click'];\n\n private readonly element: HTMLImageElement;\n private canvas: HTMLCanvasElement;\n\n constructor(private elementRef: ElementRef) {\n const element = this.elementRef.nativeElement;\n if (!(element instanceof HTMLImageElement)) {\n return;\n }\n\n this.element = element;\n }\n\n ngOnChanges(changes: any): void {\n let freeze = false;\n if (changes.src) {\n freeze = true;\n }\n if (changes.frozen) {\n if (changes.frozen.currentValue) {\n freeze = true;\n } else {\n this.unfreeze();\n }\n }\n\n if (freeze) {\n this.freeze();\n }\n\n }\n\n private freeze() {\n if (!GifService.isGif(this.src) || !this.apFrozen) {\n this.unfreeze();\n return;\n }\n\n // hack to avoid displaying the GIF before replacing it by the canvas\n this.element.style.visibility = 'hidden';\n this.element.addEventListener('load', () => this.addCanvas());\n }\n\n private addCanvas() {\n if (this.canvas) {\n this.canvas.remove();\n }\n\n this.canvas = document.createElement('canvas');\n this.canvas.width = this.element.width;\n this.canvas.height = this.element.height;\n this.canvas.getContext('2d').drawImage(this.element, 0, 0, this.canvas.width, this.canvas.height);\n for (let i = 0; i < this.element.attributes.length; i++) {\n const attr = this.element.attributes[i];\n if (attr.name === 'id') { // avoid two elements with the same id\n this.canvas.setAttribute('id', attr.value + '_frozenGif');\n } else if (attr.name === 'style' && attr.value.includes('visibility: hidden;') || attr.value.includes('display: none;')) {\n // remove the added 'visibility: hidden' and 'display: none'\n const styleValue = attr.value;\n this.canvas.setAttribute('style', styleValue.replace('visibility: hidden;', '').replace('display: none;', ''));\n } else if (attr.name !== '\"') { // test for invalid attributes\n this.canvas.setAttribute(attr.name, attr.value);\n }\n }\n\n this.addEvents();\n\n this.element.parentNode.insertBefore(this.canvas, this.element);\n this.element.style.display = 'none';\n }\n\n private addEvents() {\n this.apGifEvents.forEach((eventName: string) => {\n this.canvas.addEventListener(eventName, (ev: Event) => this.element.dispatchEvent(\n // wm: find a way to dispatch the right event type\n new Event(ev.type, ev)\n ));\n });\n }\n\n private unfreeze() {\n if (this.canvas) {\n this.canvas.remove();\n this.canvas = null;\n }\n this.element.style.visibility = 'inherit';\n this.element.style.display = 'inherit';\n }\n}\n","import {Directive, Input, Renderer2, ElementRef, Output, EventEmitter} from '@angular/core';\n\nconst PART_START = '<ng-container data-mst=\"';\nconst PARSE_MIDDLE = '\">';\nconst PARSE_END = '</ng-container>';\nconst DATA_SEPARATOR = ',';\nconst OPTIONAL_EVENTS_SEPARATOR = ';';\n\ninterface Part {\n content: string;\n clazz?: string[]; // Not defined on sterile text\n clickName?: string; // Not defined on sterile text\n}\n\n/**\n * This directive aims to parse simple string to extract some specific tags and to turn them into SPAN with styling classes attributes and optional event listening.\n * The specific tags must this schema: <ng-container data-mst=\"STYLING-CLASSES\">TEXT</ng-container>.\n * Example: 'Lorem <ng-container data-mst=\"my-style\">ipsum</ng-container> dolor sit amet'.\n */\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[multiStyleText]',\n standalone: true,\n})\nexport class MultiStyleTextDirective {\n\n private childrenCreated: any[] = [];\n\n @Input() set multiStyleText(fullText: string) {\n // First remove previously added children (on update).\n for (const child of this.childrenCreated) {\n this.renderer.removeChild(this.elRef.nativeElement, child);\n }\n\n if (fullText && fullText.length > 0) {\n MultiStyleTextDirective.parse(fullText).forEach((part: Part) => {\n if (part.clazz || part.clickName) {\n // Parsed item with styling classes and/or event listening.\n const span = this.renderer.createElement('span');\n const text = this.renderer.createText(part.content);\n this.renderer.appendChild(span, text);\n if (part.clazz) {\n part.clazz.forEach(clazz => this.renderer.addClass(span, clazz));\n }\n if (part.clickName) {\n this.renderer.listen(span, 'click', () => this.partEvent.emit(part.clickName));\n }\n this.renderer.appendChild(this.elRef.nativeElement, span);\n this.childrenCreated.push(span);\n } else {\n // Specific of part without styling classes (could be used to get event listening only)\n const text = this.renderer.createText(part.content);\n this.renderer.appendChild(this.elRef.nativeElement, text);\n this.childrenCreated.push(text);\n }\n });\n }\n }\n\n @Output() partEvent = new EventEmitter<string>();\n\n public constructor(\n private elRef: ElementRef,\n private renderer: Renderer2\n ) {\n }\n\n private static parse(toParse: string): Part[] {\n const parts: Part[] = [];\n let startIndex = toParse.indexOf(PART_START);\n while (startIndex >= 0) {\n if (startIndex > 0) {\n // Optional text before first parsed part.\n parts.push({content: toParse.substring(0, startIndex)});\n }\n const elem = this.cutFirstGroup(toParse.substring(startIndex));\n if (elem === 'invalid') {\n return [];\n } else if (elem) {\n parts.push({\n content: elem.content,\n clazz: elem.classes,\n clickName: elem.clickName\n });\n toParse = elem.rest;\n startIndex = toParse.indexOf(PART_START);\n } else {\n parts.push({content: toParse});\n }\n }\n // Very end\n if (toParse.length > 0) {\n parts.push({content: toParse});\n }\n return parts;\n }\n\n private static cutFirstGroup(toCut: string): {content: string, classes: string[], clickName: string, rest: string} | 'invalid' | null {\n if (!toCut.startsWith(PART_START)) {\n // String doesn't start with expected parser start.\n return null;\n }\n\n const afterParserStart = toCut.substring(PART_START.length);\n let index = afterParserStart.indexOf(PARSE_MIDDLE);\n if (index <= 0) {\n console.error('Not able to parse invalid string: ' + toCut);\n return 'invalid';\n }\n const data = afterParserStart.substring(0, index);\n let classes;\n let clickName;\n const eventsPartSeparatorIndex = data.indexOf(OPTIONAL_EVENTS_SEPARATOR);\n if (eventsPartSeparatorIndex > 0) {\n // Case the data contains events part with dedicated separator\n classes = data.substring(0, eventsPartSeparatorIndex);\n clickName = data.substring(eventsPartSeparatorIndex + 1);\n } else {\n // Otherwise, only design classes are provided\n classes = data;\n clickName = undefined;\n }\n let rest = afterParserStart.substring(index + PARSE_MIDDLE.length);\n index = rest.indexOf(PARSE_END);\n if (index <= 0) {\n console.error('Not able to parse invalid string: ' + toCut);\n return 'invalid';\n }\n const content = rest.substring(0, index);\n rest = rest.substring(index + PARSE_END.length);\n\n return {\n content,\n classes: classes.split(DATA_SEPARATOR),\n clickName,\n rest\n };\n }\n}\n","// Agorapulse\nimport {TooltipNeoDirective, TooltipNeoParams} from '@agorapulse/ui-components/tooltip-neo';\n// Angular\nimport {Directive, ElementRef, Input, OnDestroy, OnInit} from '@angular/core';\n// Third-parties\nimport {fromEvent, Subscription} from 'rxjs';\nimport {TruncateTooltipNeoParams} from './truncate-tooltip.model';\n\n@Directive({selector: '[apTooltipNeo][truncateTooltip]', standalone: true,})\nexport class TruncateTooltipDirective implements OnInit, OnDestroy {\n\n @Input() truncateTooltip: string | TruncateTooltipNeoParams;\n\n private elementRefMouseOver$: Subscription;\n\n constructor(\n private tooltipNeo: TooltipNeoDirective,\n private elementRef: ElementRef<HTMLElement>\n ) {\n }\n\n private updateTruncateState(): void {\n const element = this.elementRef.nativeElement;\n const truncated = element.scrollWidth > element.clientWidth;\n\n let defaultTooltip: string | TooltipNeoParams = '';\n // In case a default tooltip content exists, even not truncated, the tooltip stay displayed\n if (typeof(this.truncateTooltip) === 'object' && this.truncateTooltip.defaultContent) {\n defaultTooltip = {\n ...this.truncateTooltip,\n content: this.truncateTooltip.defaultContent\n }\n }\n this.tooltipNeo.apTooltipNeo = truncated ? this.truncateTooltip : defaultTooltip;\n\n }\n\n ngOnInit(): void {\n this.elementRefMouseOver$ = fromEvent(this.elementRef.nativeElement, 'mouseover')\n .subscribe(() => this.updateTruncateState());\n }\n\n ngOnDestroy(): void {\n this.elementRefMouseOver$.unsubscribe();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;AAMA;;AAEG;MACU,yBAAyB,CAAA;AAIlC,IAAA,WAAA,CAAmB,OAAmB,EAAA;AAAnB,QAAA,IAAO,CAAA,OAAA,GAAP,OAAO,CAAY;KAAI;IAGnC,OAAO,GAAA;QACV,IAAI,CAAC,MAAM,EAAE,CAAC;KACjB;IAEM,qBAAqB,GAAA;QACxB,IAAI,CAAC,MAAM,EAAE,CAAC;KACjB;IAEM,MAAM,GAAA;QACT,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC;QAC/C,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,YAAY,CAAC;QAC7D,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,YAAY,CAAC;AAC7D,QAAA,IAAI,yBAAyB,CAAC,SAAS,GAAG,YAAY,EAAE;;AAEpD,YAAA,KAAK,CAAC,QAAQ,GAAG,MAAM,CAAC;YACxB,KAAK,CAAC,MAAM,GAAG,CAAA,EAAG,yBAAyB,CAAC,SAAS,IAAI,CAAC;AAC7D,SAAA;aAAM,IAAI,YAAY,GAAG,YAAY,EAAE;AACpC,YAAA,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC1B,YAAA,KAAK,CAAC,MAAM,GAAG,CAAG,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EAAA,MAAA,EAAA,EAAA,eAAA,EAAA,iBAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;2FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBADpC,SAAS;YAAC,IAAA,EAAA,CAAA,EAAC,QAAQ,EAAE,iCAAiC,EAAE,UAAU,EAAE,IAAI,GAAE,CAAA;mIAG9D,eAAe,EAAA,CAAA;sBAAvB,KAAK;;;ACXV;;AAEG;;;;"}
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import * as i1 from '@agorapulse/ui-symbol';
|
|
2
|
+
import { AgorapulseUiSymbolModule } from '@agorapulse/ui-symbol';
|
|
3
|
+
import { TitleCasePipe, NgForOf, NgIf, SlicePipe, NgTemplateOutlet } from '@angular/common';
|
|
4
|
+
import * as i0 from '@angular/core';
|
|
5
|
+
import { Pipe, EventEmitter, inject, Component, ChangeDetectionStrategy, Input, Output } from '@angular/core';
|
|
6
|
+
import * as i2 from '@angular/material/button';
|
|
7
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
8
|
+
import dayjs from 'dayjs';
|
|
9
|
+
import 'dayjs/locale/de';
|
|
10
|
+
import 'dayjs/locale/en';
|
|
11
|
+
import 'dayjs/locale/es';
|
|
12
|
+
import 'dayjs/locale/fr';
|
|
13
|
+
import 'dayjs/locale/pt';
|
|
14
|
+
import localeData from 'dayjs/plugin/localeData';
|
|
15
|
+
|
|
16
|
+
class DayDisabledPipe {
|
|
17
|
+
transform(day, todayTimestamp, minDateTimestamp, maxDateTimestamp) {
|
|
18
|
+
return day.month !== 0
|
|
19
|
+
|| (day.timestamp < todayTimestamp && !minDateTimestamp)
|
|
20
|
+
|| (minDateTimestamp && day.timestamp < minDateTimestamp)
|
|
21
|
+
|| (maxDateTimestamp && day.timestamp > maxDateTimestamp);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
DayDisabledPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: DayDisabledPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
25
|
+
DayDisabledPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: DayDisabledPipe, isStandalone: true, name: "dayDisabled" });
|
|
26
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: DayDisabledPipe, decorators: [{
|
|
27
|
+
type: Pipe,
|
|
28
|
+
args: [{
|
|
29
|
+
name: 'dayDisabled',
|
|
30
|
+
pure: true,
|
|
31
|
+
standalone: true
|
|
32
|
+
}]
|
|
33
|
+
}] });
|
|
34
|
+
|
|
35
|
+
class NeoDatepickerComponent {
|
|
36
|
+
constructor() {
|
|
37
|
+
this.ONE_DAY = 60 * 60 * 24 * 1000;
|
|
38
|
+
this.TODAY_TIMESTAMP = Date.now() - (Date.now() % this.ONE_DAY) + new Date().getTimezoneOffset() * 1000 * 60;
|
|
39
|
+
this._mode = 'single';
|
|
40
|
+
this.startsOn = 'monday';
|
|
41
|
+
this.datesSelected = new EventEmitter();
|
|
42
|
+
this.nextMonth = new EventEmitter();
|
|
43
|
+
this.previousMonth = new EventEmitter();
|
|
44
|
+
this.selectedDaysTimestamp = new Set();
|
|
45
|
+
this.dayDisabledPipe = inject(DayDisabledPipe);
|
|
46
|
+
}
|
|
47
|
+
set mode(mode) {
|
|
48
|
+
this._mode = mode;
|
|
49
|
+
if (this._mode === 'single') {
|
|
50
|
+
this._selectedDates = this._selectedDates.slice(0, 1);
|
|
51
|
+
this.selectedDaysTimestamp = new Set(Array.from(this.selectedDaysTimestamp).slice(0, 1));
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
get mode() {
|
|
55
|
+
return this._mode;
|
|
56
|
+
}
|
|
57
|
+
set selectedDates(dates) {
|
|
58
|
+
if (this._mode === 'single') {
|
|
59
|
+
dates = dates.slice(0, 1);
|
|
60
|
+
}
|
|
61
|
+
this.selectedDaysTimestamp = new Set();
|
|
62
|
+
this._selectedDates = dates;
|
|
63
|
+
if (this._selectedDates.length) {
|
|
64
|
+
this._selectedDates.forEach(day => {
|
|
65
|
+
this.selectedDaysTimestamp.add(day.toDate().getTime());
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
get selectedDates() {
|
|
70
|
+
return this._selectedDates;
|
|
71
|
+
}
|
|
72
|
+
ngOnInit() {
|
|
73
|
+
dayjs.extend(localeData);
|
|
74
|
+
const date = new Date();
|
|
75
|
+
this.currentYear = date.getFullYear();
|
|
76
|
+
this.currentMonth = date.getMonth();
|
|
77
|
+
if (this.minDate) {
|
|
78
|
+
this.minDateTimestamp = this.minDate.toDate().getTime();
|
|
79
|
+
}
|
|
80
|
+
if (this.maxDate) {
|
|
81
|
+
this.maxDateTimestamp = this.maxDate.toDate().getTime();
|
|
82
|
+
}
|
|
83
|
+
if (this.locale) {
|
|
84
|
+
dayjs.locale(this.locale);
|
|
85
|
+
}
|
|
86
|
+
this.months = dayjs.months();
|
|
87
|
+
this.weekDays = [...dayjs.weekdays()];
|
|
88
|
+
if (this.startsOn === 'monday') {
|
|
89
|
+
const sunday = this.weekDays.slice(0, 1);
|
|
90
|
+
this.weekDays.splice(0, 1);
|
|
91
|
+
this.weekDays = this.weekDays.concat(sunday);
|
|
92
|
+
}
|
|
93
|
+
this.currentMonthDates = this.getMonthDetails(this.currentYear, this.currentMonth);
|
|
94
|
+
}
|
|
95
|
+
getDayDetails(index, firstDay, month, numberOfDays, year) {
|
|
96
|
+
const date = index - firstDay;
|
|
97
|
+
const day = index % 7;
|
|
98
|
+
let prevMonth = month - 1;
|
|
99
|
+
let prevYear = year;
|
|
100
|
+
if (prevMonth < 0) {
|
|
101
|
+
prevMonth = 11;
|
|
102
|
+
prevYear--;
|
|
103
|
+
}
|
|
104
|
+
const prevMonthNumberOfDays = this.getNumberOfDays(prevYear, prevMonth);
|
|
105
|
+
const _date = (date < 0 ? prevMonthNumberOfDays + date : date % numberOfDays) + 1;
|
|
106
|
+
const _month = date < 0 ? -1 : date >= numberOfDays ? 1 : 0;
|
|
107
|
+
const newDate = new Date(year, _month + month, _date);
|
|
108
|
+
const timestamp = newDate.getTime();
|
|
109
|
+
const dayString = this.weekDays[day];
|
|
110
|
+
return {
|
|
111
|
+
date: _date,
|
|
112
|
+
day,
|
|
113
|
+
month: _month,
|
|
114
|
+
timestamp,
|
|
115
|
+
dayString,
|
|
116
|
+
dayjs: dayjs(newDate),
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
getNumberOfDays(year, month) {
|
|
120
|
+
return 40 - new Date(year, month, 40).getDate();
|
|
121
|
+
}
|
|
122
|
+
getMonthDetails(year, month) {
|
|
123
|
+
let firstDay = new Date(year, month).getDay();
|
|
124
|
+
if (this.startsOn === 'monday') {
|
|
125
|
+
firstDay -= 1;
|
|
126
|
+
}
|
|
127
|
+
const numberOfDays = this.getNumberOfDays(year, month);
|
|
128
|
+
const monthArray = [];
|
|
129
|
+
const rows = 6;
|
|
130
|
+
let currentDay = null;
|
|
131
|
+
let index = 0;
|
|
132
|
+
const cols = 7;
|
|
133
|
+
for (let row = 0; row < rows; row++) {
|
|
134
|
+
for (let col = 0; col < cols; col++) {
|
|
135
|
+
currentDay = this.getDayDetails(index, firstDay, month, numberOfDays, year);
|
|
136
|
+
monthArray.push(currentDay);
|
|
137
|
+
index++;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
return monthArray;
|
|
141
|
+
}
|
|
142
|
+
onPreviousMonth() {
|
|
143
|
+
this.previousMonth.emit();
|
|
144
|
+
this.currentMonth -= 1;
|
|
145
|
+
if (this.currentMonth === -1) {
|
|
146
|
+
this.currentMonth = 11;
|
|
147
|
+
this.currentYear -= 1;
|
|
148
|
+
}
|
|
149
|
+
this.currentMonthDates = this.getMonthDetails(this.currentYear, this.currentMonth);
|
|
150
|
+
}
|
|
151
|
+
onNextMonth() {
|
|
152
|
+
this.nextMonth.emit();
|
|
153
|
+
this.currentMonth += 1;
|
|
154
|
+
if (this.currentMonth === 12) {
|
|
155
|
+
this.currentMonth = 0;
|
|
156
|
+
this.currentYear += 1;
|
|
157
|
+
}
|
|
158
|
+
this.currentMonthDates = this.getMonthDetails(this.currentYear, this.currentMonth);
|
|
159
|
+
}
|
|
160
|
+
onSelectDay(dayDetail) {
|
|
161
|
+
const dayDisabled = this.dayDisabledPipe.transform(dayDetail, this.TODAY_TIMESTAMP, this.minDateTimestamp, this.maxDateTimestamp);
|
|
162
|
+
if (!dayDisabled) {
|
|
163
|
+
if (this.mode === 'single') {
|
|
164
|
+
this.selectedDaysTimestamp.clear();
|
|
165
|
+
}
|
|
166
|
+
if (this.minDate && dayDetail.dayjs.isBefore(dayjs(this.minDate))) {
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
if (this.maxDate && dayDetail.dayjs.isAfter(dayjs(this.maxDate))) {
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
if (this.selectedDaysTimestamp.has(dayDetail.timestamp)) {
|
|
173
|
+
this.selectedDaysTimestamp.delete(dayDetail.timestamp);
|
|
174
|
+
}
|
|
175
|
+
else {
|
|
176
|
+
this.selectedDaysTimestamp.add(dayDetail.timestamp);
|
|
177
|
+
}
|
|
178
|
+
this.datesSelected.emit(Array.from(this.selectedDaysTimestamp).map(timestamp => dayjs(timestamp)));
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
NeoDatepickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: NeoDatepickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
183
|
+
NeoDatepickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: NeoDatepickerComponent, isStandalone: true, selector: "ap-neo-date-picker", inputs: { dayTemplate: "dayTemplate", locale: "locale", minDate: "minDate", maxDate: "maxDate", mode: "mode", selectedDates: "selectedDates", startsOn: "startsOn" }, outputs: { datesSelected: "datesSelected", nextMonth: "nextMonth", previousMonth: "previousMonth" }, providers: [DayDisabledPipe], ngImport: i0, template: "<div class=\"date-picker-container\">\n <div class=\"date-picker\">\n <div class=\"month-navigation\">\n <button mat-stroked-button\n class=\"circle ghost left\"\n (click)=\"onPreviousMonth()\"\n >\n <ap-symbol\n symbolId=\"arrow-button-left\"\n size=\"micro\"\n >\n </ap-symbol>\n </button>\n <span>\n {{ months[currentMonth] | titlecase }} {{ currentYear }}\n </span>\n <button mat-stroked-button\n class=\"circle ghost right\"\n (click)=\"onNextMonth()\"\n >\n <ap-symbol\n symbolId=\"arrow-button-right\"\n size=\"micro\"\n >\n </ap-symbol>\n </button>\n </div>\n <div class=\"week-header\">\n <ng-container *ngFor=\"let day of weekDays\">\n <div class=\"day\">\n {{ day | slice:0:2 | titlecase }}\n </div>\n </ng-container>\n </div>\n <div class=\"days-container\">\n <ng-container *ngFor=\"let day of currentMonthDates\">\n <ng-container *ngIf=\"dayTemplate\"\n [ngTemplateOutlet]=\"dayTemplate\"\n [ngTemplateOutletContext]=\"{day: day}\"\n ></ng-container>\n <ng-container *ngIf=\"!dayTemplate\">\n <div class=\"day\"\n [class.disabled]=\"day | dayDisabled:TODAY_TIMESTAMP:minDateTimestamp:maxDateTimestamp\"\n [class.today]=\"day.timestamp === TODAY_TIMESTAMP\"\n [class.selected]=\"selectedDaysTimestamp.has(day.timestamp)\"\n (click)=\"onSelectDay(day)\"\n >\n <span>\n {{ day.date }}\n </span>\n </div>\n </ng-container>\n </ng-container>\n </div>\n </div>\n</div>\n", styles: ["[color=facebook]{color:#1877f2}[bgcolor=facebook],[hcolor=facebook]:hover{background-color:#1877f2}[border=facebook]{border:1px solid #1877f2}[color=google]{color:#4e85e8}[bgcolor=google],[hcolor=google]:hover{background-color:#4e85e8}[border=google]{border:1px solid #4e85e8}[color=instagram]{color:#e1306c}[bgcolor=instagram],[hcolor=instagram]:hover{background-color:#e1306c}[border=instagram]{border:1px solid #e1306c}[color=instagrammagenta]{color:#c13584}[bgcolor=instagrammagenta],[hcolor=instagrammagenta]:hover{background-color:#c13584}[border=instagrammagenta]{border:1px solid #c13584}[color=instagramblue]{color:#5851db}[bgcolor=instagramblue],[hcolor=instagramblue]:hover{background-color:#5851db}[border=instagramblue]{border:1px solid #5851db}[color=instagrampurple]{color:#833ab4}[bgcolor=instagrampurple],[hcolor=instagrampurple]:hover{background-color:#833ab4}[border=instagrampurple]{border:1px solid #833ab4}[color=instagramorange]{color:#f56040}[bgcolor=instagramorange],[hcolor=instagramorange]:hover{background-color:#f56040}[border=instagramorange]{border:1px solid #f56040}[color=instagramyellow]{color:#ffdc80}[bgcolor=instagramyellow],[hcolor=instagramyellow]:hover{background-color:#ffdc80}[border=instagramyellow]{border:1px solid #ffdc80}[color=linkedin]{color:#2c67bc}[bgcolor=linkedin],[hcolor=linkedin]:hover{background-color:#2c67bc}[border=linkedin]{border:1px solid #2c67bc}[color=twitter]{color:#55acee}[bgcolor=twitter],[hcolor=twitter]:hover{background-color:#55acee}[border=twitter]{border:1px solid #55acee}[color=youtube]{color:red}[bgcolor=youtube],[hcolor=youtube]:hover{background-color:red}[border=youtube]{border:1px solid #ff0000}[color=blood-orange]{color:#ff4d00}[bgcolor=blood-orange],[hcolor=blood-orange]:hover{background-color:#ff4d00}[border=blood-orange]{border:1px solid #ff4d00}[color=pinkish-orange]{color:#ff7b49}[bgcolor=pinkish-orange],[hcolor=pinkish-orange]:hover{background-color:#ff7b49}[border=pinkish-orange]{border:1px solid #ff7b49}[color=charcoal-grey]{color:#2a2f34}[bgcolor=charcoal-grey],[hcolor=charcoal-grey]:hover{background-color:#2a2f34}[border=charcoal-grey]{border:1px solid #2a2f34}[color=azure]{color:#00aeef}[bgcolor=azure],[hcolor=azure]:hover{background-color:#00aeef}[border=azure]{border:1px solid #00aeef}[color=light-azure]{color:#eaf5fd}[bgcolor=light-azure],[hcolor=light-azure]:hover{background-color:#eaf5fd}[border=light-azure]{border:1px solid #eaf5fd}[color=blue-grey]{color:#8d98a9}[bgcolor=blue-grey],[hcolor=blue-grey]:hover{background-color:#8d98a9}[border=blue-grey]{border:1px solid #8d98a9}[color=silver]{color:#ced0da}[bgcolor=silver],[hcolor=silver]:hover{background-color:#ced0da}[border=silver]{border:1px solid #ced0da}[color=pale-grey]{color:#dfe3e9}[bgcolor=pale-grey],[hcolor=pale-grey]:hover{background-color:#dfe3e9}[border=pale-grey]{border:1px solid #dfe3e9}[color=grey-white]{color:#f5f7f8}[bgcolor=grey-white],[hcolor=grey-white]:hover{background-color:#f5f7f8}[border=grey-white]{border:1px solid #f5f7f8}[color=cool-grey]{color:#b4bbc6}[bgcolor=cool-grey],[hcolor=cool-grey]:hover{background-color:#b4bbc6}[border=cool-grey]{border:1px solid #b4bbc6}[color=black]{color:#344563}[bgcolor=black],[hcolor=black]:hover{background-color:#344563}[border=black]{border:1px solid #344563}[color=grey-blue]{color:#68768c}[bgcolor=grey-blue],[hcolor=grey-blue]:hover{background-color:#68768c}[border=grey-blue]{border:1px solid #68768c}[color=strawberry]{color:#f4282d}[bgcolor=strawberry],[hcolor=strawberry]:hover{background-color:#f4282d}[border=strawberry]{border:1px solid #f4282d}[color=light-strawberry]{color:#f8eded}[bgcolor=light-strawberry],[hcolor=light-strawberry]:hover{background-color:#f8eded}[border=light-strawberry]{border:1px solid #f8eded}[color=white]{color:#fff}[bgcolor=white],[hcolor=white]:hover{background-color:#fff}[border=white]{border:1px solid #ffffff}[color=cool-green]{color:#33c15d}[bgcolor=cool-green],[hcolor=cool-green]:hover{background-color:#33c15d}[border=cool-green]{border:1px solid #33c15d}[color=light-green]{color:#ebfaef}[bgcolor=light-green],[hcolor=light-green]:hover{background-color:#ebfaef}[border=light-green]{border:1px solid #ebfaef}[color=transparent]{color:transparent}[bgcolor=transparent],[hcolor=transparent]:hover{background-color:transparent}[border=transparent]{border:1px solid transparent}[color=c0]{color:#a566a5}[bgcolor=c0],[hcolor=c0]:hover{background-color:#a566a5}[border=c0]{border:1px solid #A566A5}[color=c1]{color:#c7ab82}[bgcolor=c1],[hcolor=c1]:hover{background-color:#c7ab82}[border=c1]{border:1px solid #C7AB82}[color=c2]{color:#f2713c}[bgcolor=c2],[hcolor=c2]:hover{background-color:#f2713c}[border=c2]{border:1px solid #F2713C}[color=c3]{color:#ffd006}[bgcolor=c3],[hcolor=c3]:hover{background-color:#ffd006}[border=c3]{border:1px solid #FFD006}[color=c4]{color:#94c5aa}[bgcolor=c4],[hcolor=c4]:hover{background-color:#94c5aa}[border=c4]{border:1px solid #94C5AA}[color=c5]{color:#2a9d8f}[bgcolor=c5],[hcolor=c5]:hover{background-color:#2a9d8f}[border=c5]{border:1px solid #2A9D8F}[color=c6]{color:#78acd8}[bgcolor=c6],[hcolor=c6]:hover{background-color:#78acd8}[border=c6]{border:1px solid #78ACD8}[color=c7]{color:#525a9e}[bgcolor=c7],[hcolor=c7]:hover{background-color:#525a9e}[border=c7]{border:1px solid #525A9E}[color=c8]{color:#6a2459}[bgcolor=c8],[hcolor=c8]:hover{background-color:#6a2459}[border=c8]{border:1px solid #6A2459}[color=c9]{color:#74729e}[bgcolor=c9],[hcolor=c9]:hover{background-color:#74729e}[border=c9]{border:1px solid #74729E}:host .date-picker-container{display:flex;justify-content:center;align-items:center}:host .date-picker-container .date-picker{width:248px}:host .date-picker-container .date-picker .month-navigation{display:flex;justify-content:space-between;margin-bottom:32px}:host .date-picker-container .date-picker .month-navigation .left ap-symbol{margin-right:2px}:host .date-picker-container .date-picker .month-navigation .right ap-symbol{margin-left:2px}:host .date-picker-container .date-picker .month-navigation ap-symbol{display:grid;place-content:center}:host .date-picker-container .date-picker .month-navigation span{font-style:normal;font-weight:700;font-size:16px;line-height:20px;text-align:center;color:#344563;align-items:center;display:flex}:host .date-picker-container .date-picker .week-header{display:flex;justify-content:space-between;margin-bottom:8px}:host .date-picker-container .date-picker .week-header .day{width:32px;text-align:center;font-weight:700;font-size:12px;line-height:15px;color:#aeb5c1}:host .date-picker-container .date-picker .days-container{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:2px}:host .date-picker-container .date-picker .days-container .day{font-style:normal;font-weight:400;font-size:14px;line-height:128.7%;text-align:center;width:32px;height:32px;display:flex;justify-content:center;align-items:center;border-radius:100%;position:relative}:host .date-picker-container .date-picker .days-container .day:hover{cursor:pointer}:host .date-picker-container .date-picker .days-container .day:hover:not(.disabled):not(.selected){background:#f5f5f7}:host .date-picker-container .date-picker .days-container .day.today{border:1px #178dfe solid}:host .date-picker-container .date-picker .days-container .day.selected{background:#178dfe;color:#fff!important}:host .date-picker-container .date-picker .days-container .day.selected .bubble{background:white!important}:host .date-picker-container .date-picker .days-container .day.disabled{color:#aeb5c1}:host .date-picker-container .date-picker .days-container .day .bubble{width:4px;height:4px;border-radius:100%;bottom:3px;position:absolute;background:#178dfe}\n"], dependencies: [{ kind: "ngmodule", type: AgorapulseUiSymbolModule }, { kind: "component", type: i1.SymbolComponent, selector: "ap-symbol", inputs: ["color", "id", "symbolId", "size", "state"] }, { kind: "pipe", type: TitleCasePipe, name: "titlecase" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: SlicePipe, name: "slice" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: DayDisabledPipe, name: "dayDisabled" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
184
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: NeoDatepickerComponent, decorators: [{
|
|
185
|
+
type: Component,
|
|
186
|
+
args: [{ selector: 'ap-neo-date-picker', changeDetection: ChangeDetectionStrategy.OnPush, providers: [DayDisabledPipe], imports: [AgorapulseUiSymbolModule, TitleCasePipe, MatButtonModule, NgForOf, NgIf, SlicePipe, NgTemplateOutlet, DayDisabledPipe], standalone: true, template: "<div class=\"date-picker-container\">\n <div class=\"date-picker\">\n <div class=\"month-navigation\">\n <button mat-stroked-button\n class=\"circle ghost left\"\n (click)=\"onPreviousMonth()\"\n >\n <ap-symbol\n symbolId=\"arrow-button-left\"\n size=\"micro\"\n >\n </ap-symbol>\n </button>\n <span>\n {{ months[currentMonth] | titlecase }} {{ currentYear }}\n </span>\n <button mat-stroked-button\n class=\"circle ghost right\"\n (click)=\"onNextMonth()\"\n >\n <ap-symbol\n symbolId=\"arrow-button-right\"\n size=\"micro\"\n >\n </ap-symbol>\n </button>\n </div>\n <div class=\"week-header\">\n <ng-container *ngFor=\"let day of weekDays\">\n <div class=\"day\">\n {{ day | slice:0:2 | titlecase }}\n </div>\n </ng-container>\n </div>\n <div class=\"days-container\">\n <ng-container *ngFor=\"let day of currentMonthDates\">\n <ng-container *ngIf=\"dayTemplate\"\n [ngTemplateOutlet]=\"dayTemplate\"\n [ngTemplateOutletContext]=\"{day: day}\"\n ></ng-container>\n <ng-container *ngIf=\"!dayTemplate\">\n <div class=\"day\"\n [class.disabled]=\"day | dayDisabled:TODAY_TIMESTAMP:minDateTimestamp:maxDateTimestamp\"\n [class.today]=\"day.timestamp === TODAY_TIMESTAMP\"\n [class.selected]=\"selectedDaysTimestamp.has(day.timestamp)\"\n (click)=\"onSelectDay(day)\"\n >\n <span>\n {{ day.date }}\n </span>\n </div>\n </ng-container>\n </ng-container>\n </div>\n </div>\n</div>\n", styles: ["[color=facebook]{color:#1877f2}[bgcolor=facebook],[hcolor=facebook]:hover{background-color:#1877f2}[border=facebook]{border:1px solid #1877f2}[color=google]{color:#4e85e8}[bgcolor=google],[hcolor=google]:hover{background-color:#4e85e8}[border=google]{border:1px solid #4e85e8}[color=instagram]{color:#e1306c}[bgcolor=instagram],[hcolor=instagram]:hover{background-color:#e1306c}[border=instagram]{border:1px solid #e1306c}[color=instagrammagenta]{color:#c13584}[bgcolor=instagrammagenta],[hcolor=instagrammagenta]:hover{background-color:#c13584}[border=instagrammagenta]{border:1px solid #c13584}[color=instagramblue]{color:#5851db}[bgcolor=instagramblue],[hcolor=instagramblue]:hover{background-color:#5851db}[border=instagramblue]{border:1px solid #5851db}[color=instagrampurple]{color:#833ab4}[bgcolor=instagrampurple],[hcolor=instagrampurple]:hover{background-color:#833ab4}[border=instagrampurple]{border:1px solid #833ab4}[color=instagramorange]{color:#f56040}[bgcolor=instagramorange],[hcolor=instagramorange]:hover{background-color:#f56040}[border=instagramorange]{border:1px solid #f56040}[color=instagramyellow]{color:#ffdc80}[bgcolor=instagramyellow],[hcolor=instagramyellow]:hover{background-color:#ffdc80}[border=instagramyellow]{border:1px solid #ffdc80}[color=linkedin]{color:#2c67bc}[bgcolor=linkedin],[hcolor=linkedin]:hover{background-color:#2c67bc}[border=linkedin]{border:1px solid #2c67bc}[color=twitter]{color:#55acee}[bgcolor=twitter],[hcolor=twitter]:hover{background-color:#55acee}[border=twitter]{border:1px solid #55acee}[color=youtube]{color:red}[bgcolor=youtube],[hcolor=youtube]:hover{background-color:red}[border=youtube]{border:1px solid #ff0000}[color=blood-orange]{color:#ff4d00}[bgcolor=blood-orange],[hcolor=blood-orange]:hover{background-color:#ff4d00}[border=blood-orange]{border:1px solid #ff4d00}[color=pinkish-orange]{color:#ff7b49}[bgcolor=pinkish-orange],[hcolor=pinkish-orange]:hover{background-color:#ff7b49}[border=pinkish-orange]{border:1px solid #ff7b49}[color=charcoal-grey]{color:#2a2f34}[bgcolor=charcoal-grey],[hcolor=charcoal-grey]:hover{background-color:#2a2f34}[border=charcoal-grey]{border:1px solid #2a2f34}[color=azure]{color:#00aeef}[bgcolor=azure],[hcolor=azure]:hover{background-color:#00aeef}[border=azure]{border:1px solid #00aeef}[color=light-azure]{color:#eaf5fd}[bgcolor=light-azure],[hcolor=light-azure]:hover{background-color:#eaf5fd}[border=light-azure]{border:1px solid #eaf5fd}[color=blue-grey]{color:#8d98a9}[bgcolor=blue-grey],[hcolor=blue-grey]:hover{background-color:#8d98a9}[border=blue-grey]{border:1px solid #8d98a9}[color=silver]{color:#ced0da}[bgcolor=silver],[hcolor=silver]:hover{background-color:#ced0da}[border=silver]{border:1px solid #ced0da}[color=pale-grey]{color:#dfe3e9}[bgcolor=pale-grey],[hcolor=pale-grey]:hover{background-color:#dfe3e9}[border=pale-grey]{border:1px solid #dfe3e9}[color=grey-white]{color:#f5f7f8}[bgcolor=grey-white],[hcolor=grey-white]:hover{background-color:#f5f7f8}[border=grey-white]{border:1px solid #f5f7f8}[color=cool-grey]{color:#b4bbc6}[bgcolor=cool-grey],[hcolor=cool-grey]:hover{background-color:#b4bbc6}[border=cool-grey]{border:1px solid #b4bbc6}[color=black]{color:#344563}[bgcolor=black],[hcolor=black]:hover{background-color:#344563}[border=black]{border:1px solid #344563}[color=grey-blue]{color:#68768c}[bgcolor=grey-blue],[hcolor=grey-blue]:hover{background-color:#68768c}[border=grey-blue]{border:1px solid #68768c}[color=strawberry]{color:#f4282d}[bgcolor=strawberry],[hcolor=strawberry]:hover{background-color:#f4282d}[border=strawberry]{border:1px solid #f4282d}[color=light-strawberry]{color:#f8eded}[bgcolor=light-strawberry],[hcolor=light-strawberry]:hover{background-color:#f8eded}[border=light-strawberry]{border:1px solid #f8eded}[color=white]{color:#fff}[bgcolor=white],[hcolor=white]:hover{background-color:#fff}[border=white]{border:1px solid #ffffff}[color=cool-green]{color:#33c15d}[bgcolor=cool-green],[hcolor=cool-green]:hover{background-color:#33c15d}[border=cool-green]{border:1px solid #33c15d}[color=light-green]{color:#ebfaef}[bgcolor=light-green],[hcolor=light-green]:hover{background-color:#ebfaef}[border=light-green]{border:1px solid #ebfaef}[color=transparent]{color:transparent}[bgcolor=transparent],[hcolor=transparent]:hover{background-color:transparent}[border=transparent]{border:1px solid transparent}[color=c0]{color:#a566a5}[bgcolor=c0],[hcolor=c0]:hover{background-color:#a566a5}[border=c0]{border:1px solid #A566A5}[color=c1]{color:#c7ab82}[bgcolor=c1],[hcolor=c1]:hover{background-color:#c7ab82}[border=c1]{border:1px solid #C7AB82}[color=c2]{color:#f2713c}[bgcolor=c2],[hcolor=c2]:hover{background-color:#f2713c}[border=c2]{border:1px solid #F2713C}[color=c3]{color:#ffd006}[bgcolor=c3],[hcolor=c3]:hover{background-color:#ffd006}[border=c3]{border:1px solid #FFD006}[color=c4]{color:#94c5aa}[bgcolor=c4],[hcolor=c4]:hover{background-color:#94c5aa}[border=c4]{border:1px solid #94C5AA}[color=c5]{color:#2a9d8f}[bgcolor=c5],[hcolor=c5]:hover{background-color:#2a9d8f}[border=c5]{border:1px solid #2A9D8F}[color=c6]{color:#78acd8}[bgcolor=c6],[hcolor=c6]:hover{background-color:#78acd8}[border=c6]{border:1px solid #78ACD8}[color=c7]{color:#525a9e}[bgcolor=c7],[hcolor=c7]:hover{background-color:#525a9e}[border=c7]{border:1px solid #525A9E}[color=c8]{color:#6a2459}[bgcolor=c8],[hcolor=c8]:hover{background-color:#6a2459}[border=c8]{border:1px solid #6A2459}[color=c9]{color:#74729e}[bgcolor=c9],[hcolor=c9]:hover{background-color:#74729e}[border=c9]{border:1px solid #74729E}:host .date-picker-container{display:flex;justify-content:center;align-items:center}:host .date-picker-container .date-picker{width:248px}:host .date-picker-container .date-picker .month-navigation{display:flex;justify-content:space-between;margin-bottom:32px}:host .date-picker-container .date-picker .month-navigation .left ap-symbol{margin-right:2px}:host .date-picker-container .date-picker .month-navigation .right ap-symbol{margin-left:2px}:host .date-picker-container .date-picker .month-navigation ap-symbol{display:grid;place-content:center}:host .date-picker-container .date-picker .month-navigation span{font-style:normal;font-weight:700;font-size:16px;line-height:20px;text-align:center;color:#344563;align-items:center;display:flex}:host .date-picker-container .date-picker .week-header{display:flex;justify-content:space-between;margin-bottom:8px}:host .date-picker-container .date-picker .week-header .day{width:32px;text-align:center;font-weight:700;font-size:12px;line-height:15px;color:#aeb5c1}:host .date-picker-container .date-picker .days-container{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:2px}:host .date-picker-container .date-picker .days-container .day{font-style:normal;font-weight:400;font-size:14px;line-height:128.7%;text-align:center;width:32px;height:32px;display:flex;justify-content:center;align-items:center;border-radius:100%;position:relative}:host .date-picker-container .date-picker .days-container .day:hover{cursor:pointer}:host .date-picker-container .date-picker .days-container .day:hover:not(.disabled):not(.selected){background:#f5f5f7}:host .date-picker-container .date-picker .days-container .day.today{border:1px #178dfe solid}:host .date-picker-container .date-picker .days-container .day.selected{background:#178dfe;color:#fff!important}:host .date-picker-container .date-picker .days-container .day.selected .bubble{background:white!important}:host .date-picker-container .date-picker .days-container .day.disabled{color:#aeb5c1}:host .date-picker-container .date-picker .days-container .day .bubble{width:4px;height:4px;border-radius:100%;bottom:3px;position:absolute;background:#178dfe}\n"] }]
|
|
187
|
+
}], propDecorators: { dayTemplate: [{
|
|
188
|
+
type: Input
|
|
189
|
+
}], locale: [{
|
|
190
|
+
type: Input
|
|
191
|
+
}], minDate: [{
|
|
192
|
+
type: Input
|
|
193
|
+
}], maxDate: [{
|
|
194
|
+
type: Input
|
|
195
|
+
}], mode: [{
|
|
196
|
+
type: Input
|
|
197
|
+
}], selectedDates: [{
|
|
198
|
+
type: Input
|
|
199
|
+
}], startsOn: [{
|
|
200
|
+
type: Input
|
|
201
|
+
}], datesSelected: [{
|
|
202
|
+
type: Output
|
|
203
|
+
}], nextMonth: [{
|
|
204
|
+
type: Output
|
|
205
|
+
}], previousMonth: [{
|
|
206
|
+
type: Output
|
|
207
|
+
}] } });
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Generated bundle index. Do not edit.
|
|
211
|
+
*/
|
|
212
|
+
|
|
213
|
+
export { DayDisabledPipe, NeoDatepickerComponent };
|
|
214
|
+
//# sourceMappingURL=agorapulse-ui-components-neo-datepicker.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agorapulse-ui-components-neo-datepicker.mjs","sources":["../../../libs/ui-components/neo-datepicker/src/day-disabled.pipe.ts","../../../libs/ui-components/neo-datepicker/src/neo-datepicker.component.ts","../../../libs/ui-components/neo-datepicker/src/neo-datepicker.component.html","../../../libs/ui-components/neo-datepicker/src/agorapulse-ui-components-neo-datepicker.ts"],"sourcesContent":["import {Pipe, PipeTransform} from '@angular/core';\nimport {DayDetail} from \"./day-detail.model\";\n\n@Pipe({\n name: 'dayDisabled',\n pure: true,\n standalone: true\n})\nexport class DayDisabledPipe implements PipeTransform {\n\n transform(day: DayDetail, todayTimestamp: number, minDateTimestamp?: number, maxDateTimestamp?: number): boolean {\n return day.month !== 0\n || (day.timestamp < todayTimestamp && !minDateTimestamp)\n || (minDateTimestamp && day.timestamp < minDateTimestamp)\n || (maxDateTimestamp && day.timestamp > maxDateTimestamp)\n }\n}\n","import {AgorapulseUiSymbolModule} from '@agorapulse/ui-symbol';\nimport {NgForOf, NgIf, NgTemplateOutlet, SlicePipe, TitleCasePipe} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n inject,\n Input,\n OnInit,\n Output,\n TemplateRef,\n} from '@angular/core';\nimport {MatButtonModule} from '@angular/material/button';\nimport dayjs from 'dayjs';\nimport 'dayjs/locale/de';\nimport 'dayjs/locale/en';\nimport 'dayjs/locale/es';\nimport 'dayjs/locale/fr';\nimport 'dayjs/locale/pt';\nimport localeData from 'dayjs/plugin/localeData';\nimport {DayDetail} from './day-detail.model';\nimport {DayDisabledPipe} from './day-disabled.pipe';\n\nexport type NeoDatePickerMode = 'single' | 'multiple';\nexport type NeoDatePickerStartsOn = 'monday' | 'sunday';\nexport type NeoDatePickerLocale = 'en' | 'es' | 'fr' | 'pt' | 'de';\n\n@Component({\n selector: 'ap-neo-date-picker',\n styleUrls: ['neo-datepicker.component.scss'],\n templateUrl: 'neo-datepicker.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [DayDisabledPipe],\n imports: [AgorapulseUiSymbolModule, TitleCasePipe, MatButtonModule, NgForOf, NgIf, SlicePipe, NgTemplateOutlet, DayDisabledPipe],\n standalone: true,\n})\nexport class NeoDatepickerComponent implements OnInit {\n readonly ONE_DAY: number = 60 * 60 * 24 * 1000;\n readonly TODAY_TIMESTAMP: number =\n Date.now() - (Date.now() % this.ONE_DAY) + new Date().getTimezoneOffset() * 1000 * 60;\n\n @Input() dayTemplate: TemplateRef<HTMLElement>;\n @Input() locale: NeoDatePickerLocale;\n @Input() minDate: dayjs.Dayjs;\n @Input() maxDate: dayjs.Dayjs;\n\n private _mode: NeoDatePickerMode = 'single';\n @Input() set mode(mode: NeoDatePickerMode) {\n this._mode = mode;\n if (this._mode === 'single') {\n this._selectedDates = this._selectedDates.slice(0, 1);\n this.selectedDaysTimestamp = new Set(Array.from(this.selectedDaysTimestamp).slice(0, 1));\n }\n }\n get mode(): NeoDatePickerMode {\n return this._mode;\n }\n\n private _selectedDates: dayjs.Dayjs[];\n @Input() set selectedDates(dates: dayjs.Dayjs[]) {\n if (this._mode === 'single') {\n dates = dates.slice(0, 1);\n }\n this.selectedDaysTimestamp = new Set();\n this._selectedDates = dates;\n if (this._selectedDates.length) {\n this._selectedDates.forEach(day => {\n this.selectedDaysTimestamp.add(day.toDate().getTime());\n });\n }\n }\n\n get selectedDates(): dayjs.Dayjs[] {\n return this._selectedDates;\n }\n\n @Input() startsOn: NeoDatePickerStartsOn = 'monday';\n\n @Output() datesSelected: EventEmitter<dayjs.Dayjs[]> = new EventEmitter<dayjs.Dayjs[]>();\n @Output() nextMonth: EventEmitter<void> = new EventEmitter<void>();\n @Output() previousMonth: EventEmitter<void> = new EventEmitter<void>();\n\n currentYear: number;\n currentMonth: number;\n currentMonthDates: any;\n minDateTimestamp: number;\n maxDateTimestamp: number;\n months: string[];\n selectedDaysTimestamp: Set<number> = new Set();\n weekDays: string[];\n\n dayDisabledPipe: DayDisabledPipe = inject(DayDisabledPipe);\n\n ngOnInit(): void {\n dayjs.extend(localeData);\n const date = new Date();\n this.currentYear = date.getFullYear();\n this.currentMonth = date.getMonth();\n if (this.minDate) {\n this.minDateTimestamp = this.minDate.toDate().getTime();\n }\n if (this.maxDate) {\n this.maxDateTimestamp = this.maxDate.toDate().getTime();\n }\n if (this.locale) {\n dayjs.locale(this.locale);\n }\n this.months = dayjs.months();\n this.weekDays = [...dayjs.weekdays()];\n\n if (this.startsOn === 'monday') {\n const sunday = this.weekDays.slice(0, 1);\n this.weekDays.splice(0, 1);\n this.weekDays = this.weekDays.concat(sunday);\n }\n this.currentMonthDates = this.getMonthDetails(this.currentYear, this.currentMonth);\n }\n\n getDayDetails(index: number, firstDay: number, month: number, numberOfDays: number, year: number): DayDetail {\n const date = index - firstDay;\n const day = index % 7;\n let prevMonth = month - 1;\n let prevYear = year;\n if (prevMonth < 0) {\n prevMonth = 11;\n prevYear--;\n }\n const prevMonthNumberOfDays = this.getNumberOfDays(prevYear, prevMonth);\n const _date = (date < 0 ? prevMonthNumberOfDays + date : date % numberOfDays) + 1;\n const _month = date < 0 ? -1 : date >= numberOfDays ? 1 : 0;\n const newDate = new Date(year, _month + month, _date);\n const timestamp = newDate.getTime();\n const dayString = this.weekDays[day];\n return {\n date: _date,\n day,\n month: _month,\n timestamp,\n dayString,\n dayjs: dayjs(newDate),\n };\n }\n\n getNumberOfDays(year: number, month: number): number {\n return 40 - new Date(year, month, 40).getDate();\n }\n\n getMonthDetails(year: number, month: number): DayDetail[] {\n let firstDay = new Date(year, month).getDay();\n if (this.startsOn === 'monday') {\n firstDay -= 1;\n }\n const numberOfDays = this.getNumberOfDays(year, month);\n const monthArray = [];\n const rows = 6;\n let currentDay = null;\n let index = 0;\n const cols = 7;\n\n for (let row = 0; row < rows; row++) {\n for (let col = 0; col < cols; col++) {\n currentDay = this.getDayDetails(index, firstDay, month, numberOfDays, year);\n monthArray.push(currentDay);\n index++;\n }\n }\n return monthArray;\n }\n\n onPreviousMonth(): void {\n this.previousMonth.emit();\n this.currentMonth -= 1;\n if (this.currentMonth === -1) {\n this.currentMonth = 11;\n this.currentYear -= 1;\n }\n this.currentMonthDates = this.getMonthDetails(this.currentYear, this.currentMonth);\n }\n\n onNextMonth(): void {\n this.nextMonth.emit();\n this.currentMonth += 1;\n if (this.currentMonth === 12) {\n this.currentMonth = 0;\n this.currentYear += 1;\n }\n this.currentMonthDates = this.getMonthDetails(this.currentYear, this.currentMonth);\n }\n\n onSelectDay(dayDetail: DayDetail): void {\n const dayDisabled = this.dayDisabledPipe.transform(\n dayDetail,\n this.TODAY_TIMESTAMP,\n this.minDateTimestamp,\n this.maxDateTimestamp\n );\n if (!dayDisabled) {\n if (this.mode === 'single') {\n this.selectedDaysTimestamp.clear();\n }\n if (this.minDate && dayDetail.dayjs.isBefore(dayjs(this.minDate))) {\n return;\n }\n if (this.maxDate && dayDetail.dayjs.isAfter(dayjs(this.maxDate))) {\n return;\n }\n if (this.selectedDaysTimestamp.has(dayDetail.timestamp)) {\n this.selectedDaysTimestamp.delete(dayDetail.timestamp);\n } else {\n this.selectedDaysTimestamp.add(dayDetail.timestamp);\n }\n this.datesSelected.emit(Array.from(this.selectedDaysTimestamp).map(timestamp => dayjs(timestamp)));\n }\n }\n}\n","<div class=\"date-picker-container\">\n <div class=\"date-picker\">\n <div class=\"month-navigation\">\n <button mat-stroked-button\n class=\"circle ghost left\"\n (click)=\"onPreviousMonth()\"\n >\n <ap-symbol\n symbolId=\"arrow-button-left\"\n size=\"micro\"\n >\n </ap-symbol>\n </button>\n <span>\n {{ months[currentMonth] | titlecase }} {{ currentYear }}\n </span>\n <button mat-stroked-button\n class=\"circle ghost right\"\n (click)=\"onNextMonth()\"\n >\n <ap-symbol\n symbolId=\"arrow-button-right\"\n size=\"micro\"\n >\n </ap-symbol>\n </button>\n </div>\n <div class=\"week-header\">\n <ng-container *ngFor=\"let day of weekDays\">\n <div class=\"day\">\n {{ day | slice:0:2 | titlecase }}\n </div>\n </ng-container>\n </div>\n <div class=\"days-container\">\n <ng-container *ngFor=\"let day of currentMonthDates\">\n <ng-container *ngIf=\"dayTemplate\"\n [ngTemplateOutlet]=\"dayTemplate\"\n [ngTemplateOutletContext]=\"{day: day}\"\n ></ng-container>\n <ng-container *ngIf=\"!dayTemplate\">\n <div class=\"day\"\n [class.disabled]=\"day | dayDisabled:TODAY_TIMESTAMP:minDateTimestamp:maxDateTimestamp\"\n [class.today]=\"day.timestamp === TODAY_TIMESTAMP\"\n [class.selected]=\"selectedDaysTimestamp.has(day.timestamp)\"\n (click)=\"onSelectDay(day)\"\n >\n <span>\n {{ day.date }}\n </span>\n </div>\n </ng-container>\n </ng-container>\n </div>\n </div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;MAQa,eAAe,CAAA;AAExB,IAAA,SAAS,CAAC,GAAc,EAAE,cAAsB,EAAE,gBAAyB,EAAE,gBAAyB,EAAA;AAClG,QAAA,OAAO,GAAG,CAAC,KAAK,KAAK,CAAC;gBACd,GAAG,CAAC,SAAS,GAAG,cAAc,IAAI,CAAC,gBAAgB,CAAC;AACrD,gBAAC,gBAAgB,IAAI,GAAG,CAAC,SAAS,GAAG,gBAAgB,CAAC;gBACrD,gBAAgB,IAAI,GAAG,CAAC,SAAS,GAAG,gBAAgB,CAAC,CAAA;KAChE;;4GAPQ,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;0GAAf,eAAe,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,aAAA,EAAA,CAAA,CAAA;2FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAL3B,IAAI;AAAC,YAAA,IA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
|
this.templateRefContent = this.params.content;
|
|
33
33
|
}
|
|
34
|
+
if (this.params.templateContext) {
|
|
35
|
+
this.templateContext = this.params.templateContext;
|
|
36
|
+
}
|
|
34
37
|
}
|
|
35
38
|
onClickOutside(event) {
|
|
36
39
|
if (!this.elementRef.nativeElement.contains(event.target)) {
|
|
@@ -39,7 +42,7 @@ class TooltipNeoComponent {
|
|
|
39
42
|
}
|
|
40
43
|
}
|
|
41
44
|
TooltipNeoComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TooltipNeoComponent, deps: [{ token: i0.ElementRef }, { token: TooltipNeoService }], target: i0.ɵɵFactoryTarget.Component });
|
|
42
|
-
TooltipNeoComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TooltipNeoComponent, isStandalone: true, selector: "ap-tooltip-neo", inputs: { params: "params" }, host: { listeners: { "document:click": "onClickOutside($event)" } }, ngImport: i0, template: "<div @neoTooltip [ngSwitch]=\"params.contentType\"\n class=\"tooltip {{params.maxWidth}}\"\n [style.background]=\"params.backgroundColor\"\n [style.border]=\"border\"\n >\n <div *ngIf=\"params.displayArrow\"\n class=\"arrow-tooltip {{params.position}}\"\n [class.border]=\"!!params.borderColor\"\n [style.background]=\"params.backgroundColor\"\n [style.borderTop]=\"border\"\n [style.borderRight]=\"border\"\n ></div>\n <ng-container *ngIf=\"params.title\">\n <div class=\"text title\">{{params.title}}</div>\n </ng-container>\n <ng-container *ngSwitchCase=\"'text'\">\n <ng-container *ngIf=\"params.content\">\n <div class=\"text content\">{{params.content}}</div>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'template'\">\n <ng-container
|
|
45
|
+
TooltipNeoComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TooltipNeoComponent, isStandalone: true, selector: "ap-tooltip-neo", inputs: { params: "params" }, host: { listeners: { "document:click": "onClickOutside($event)" } }, ngImport: i0, template: "<div @neoTooltip [ngSwitch]=\"params.contentType\"\n class=\"tooltip {{params.maxWidth}}\"\n [style.background]=\"params.backgroundColor\"\n [style.border]=\"border\"\n >\n <div *ngIf=\"params.displayArrow\"\n class=\"arrow-tooltip {{params.position}}\"\n [class.border]=\"!!params.borderColor\"\n [style.background]=\"params.backgroundColor\"\n [style.borderTop]=\"border\"\n [style.borderRight]=\"border\"\n ></div>\n <ng-container *ngIf=\"params.title\">\n <div class=\"text title\">{{params.title}}</div>\n </ng-container>\n <ng-container *ngSwitchCase=\"'text'\">\n <ng-container *ngIf=\"params.content\">\n <div class=\"text content\">{{params.content}}</div>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'template'\">\n <ng-container [ngTemplateOutlet]=\"templateRefContent\"\n [ngTemplateOutletContext]=\"templateContext\"\n >\n </ng-container>\n </ng-container>\n</div>\n", styles: ["[color=facebook]{color:#1877f2}[bgcolor=facebook],[hcolor=facebook]:hover{background-color:#1877f2}[border=facebook]{border:1px solid #1877f2}[color=google]{color:#4e85e8}[bgcolor=google],[hcolor=google]:hover{background-color:#4e85e8}[border=google]{border:1px solid #4e85e8}[color=instagram]{color:#e1306c}[bgcolor=instagram],[hcolor=instagram]:hover{background-color:#e1306c}[border=instagram]{border:1px solid #e1306c}[color=instagrammagenta]{color:#c13584}[bgcolor=instagrammagenta],[hcolor=instagrammagenta]:hover{background-color:#c13584}[border=instagrammagenta]{border:1px solid #c13584}[color=instagramblue]{color:#5851db}[bgcolor=instagramblue],[hcolor=instagramblue]:hover{background-color:#5851db}[border=instagramblue]{border:1px solid #5851db}[color=instagrampurple]{color:#833ab4}[bgcolor=instagrampurple],[hcolor=instagrampurple]:hover{background-color:#833ab4}[border=instagrampurple]{border:1px solid #833ab4}[color=instagramorange]{color:#f56040}[bgcolor=instagramorange],[hcolor=instagramorange]:hover{background-color:#f56040}[border=instagramorange]{border:1px solid #f56040}[color=instagramyellow]{color:#ffdc80}[bgcolor=instagramyellow],[hcolor=instagramyellow]:hover{background-color:#ffdc80}[border=instagramyellow]{border:1px solid #ffdc80}[color=linkedin]{color:#2c67bc}[bgcolor=linkedin],[hcolor=linkedin]:hover{background-color:#2c67bc}[border=linkedin]{border:1px solid #2c67bc}[color=twitter]{color:#55acee}[bgcolor=twitter],[hcolor=twitter]:hover{background-color:#55acee}[border=twitter]{border:1px solid #55acee}[color=youtube]{color:red}[bgcolor=youtube],[hcolor=youtube]:hover{background-color:red}[border=youtube]{border:1px solid #ff0000}[color=blood-orange]{color:#ff4d00}[bgcolor=blood-orange],[hcolor=blood-orange]:hover{background-color:#ff4d00}[border=blood-orange]{border:1px solid #ff4d00}[color=pinkish-orange]{color:#ff7b49}[bgcolor=pinkish-orange],[hcolor=pinkish-orange]:hover{background-color:#ff7b49}[border=pinkish-orange]{border:1px solid #ff7b49}[color=charcoal-grey]{color:#2a2f34}[bgcolor=charcoal-grey],[hcolor=charcoal-grey]:hover{background-color:#2a2f34}[border=charcoal-grey]{border:1px solid #2a2f34}[color=azure]{color:#00aeef}[bgcolor=azure],[hcolor=azure]:hover{background-color:#00aeef}[border=azure]{border:1px solid #00aeef}[color=light-azure]{color:#eaf5fd}[bgcolor=light-azure],[hcolor=light-azure]:hover{background-color:#eaf5fd}[border=light-azure]{border:1px solid #eaf5fd}[color=blue-grey]{color:#8d98a9}[bgcolor=blue-grey],[hcolor=blue-grey]:hover{background-color:#8d98a9}[border=blue-grey]{border:1px solid #8d98a9}[color=silver]{color:#ced0da}[bgcolor=silver],[hcolor=silver]:hover{background-color:#ced0da}[border=silver]{border:1px solid #ced0da}[color=pale-grey]{color:#dfe3e9}[bgcolor=pale-grey],[hcolor=pale-grey]:hover{background-color:#dfe3e9}[border=pale-grey]{border:1px solid #dfe3e9}[color=grey-white]{color:#f5f7f8}[bgcolor=grey-white],[hcolor=grey-white]:hover{background-color:#f5f7f8}[border=grey-white]{border:1px solid #f5f7f8}[color=cool-grey]{color:#b4bbc6}[bgcolor=cool-grey],[hcolor=cool-grey]:hover{background-color:#b4bbc6}[border=cool-grey]{border:1px solid #b4bbc6}[color=black]{color:#344563}[bgcolor=black],[hcolor=black]:hover{background-color:#344563}[border=black]{border:1px solid #344563}[color=grey-blue]{color:#68768c}[bgcolor=grey-blue],[hcolor=grey-blue]:hover{background-color:#68768c}[border=grey-blue]{border:1px solid #68768c}[color=strawberry]{color:#f4282d}[bgcolor=strawberry],[hcolor=strawberry]:hover{background-color:#f4282d}[border=strawberry]{border:1px solid #f4282d}[color=light-strawberry]{color:#f8eded}[bgcolor=light-strawberry],[hcolor=light-strawberry]:hover{background-color:#f8eded}[border=light-strawberry]{border:1px solid #f8eded}[color=white]{color:#fff}[bgcolor=white],[hcolor=white]:hover{background-color:#fff}[border=white]{border:1px solid #ffffff}[color=cool-green]{color:#33c15d}[bgcolor=cool-green],[hcolor=cool-green]:hover{background-color:#33c15d}[border=cool-green]{border:1px solid #33c15d}[color=light-green]{color:#ebfaef}[bgcolor=light-green],[hcolor=light-green]:hover{background-color:#ebfaef}[border=light-green]{border:1px solid #ebfaef}[color=transparent]{color:transparent}[bgcolor=transparent],[hcolor=transparent]:hover{background-color:transparent}[border=transparent]{border:1px solid transparent}[color=c0]{color:#a566a5}[bgcolor=c0],[hcolor=c0]:hover{background-color:#a566a5}[border=c0]{border:1px solid #A566A5}[color=c1]{color:#c7ab82}[bgcolor=c1],[hcolor=c1]:hover{background-color:#c7ab82}[border=c1]{border:1px solid #C7AB82}[color=c2]{color:#f2713c}[bgcolor=c2],[hcolor=c2]:hover{background-color:#f2713c}[border=c2]{border:1px solid #F2713C}[color=c3]{color:#ffd006}[bgcolor=c3],[hcolor=c3]:hover{background-color:#ffd006}[border=c3]{border:1px solid #FFD006}[color=c4]{color:#94c5aa}[bgcolor=c4],[hcolor=c4]:hover{background-color:#94c5aa}[border=c4]{border:1px solid #94C5AA}[color=c5]{color:#2a9d8f}[bgcolor=c5],[hcolor=c5]:hover{background-color:#2a9d8f}[border=c5]{border:1px solid #2A9D8F}[color=c6]{color:#78acd8}[bgcolor=c6],[hcolor=c6]:hover{background-color:#78acd8}[border=c6]{border:1px solid #78ACD8}[color=c7]{color:#525a9e}[bgcolor=c7],[hcolor=c7]:hover{background-color:#525a9e}[border=c7]{border:1px solid #525A9E}[color=c8]{color:#6a2459}[bgcolor=c8],[hcolor=c8]:hover{background-color:#6a2459}[border=c8]{border:1px solid #6A2459}[color=c9]{color:#74729e}[bgcolor=c9],[hcolor=c9]:hover{background-color:#74729e}[border=c9]{border:1px solid #74729E}.tooltip{border-radius:8px;filter:drop-shadow(0px 0px 10px rgba(0,0,0,.08));position:relative;display:flex;flex-direction:column;align-items:flex-start;min-height:18px}.tooltip .arrow-tooltip{position:absolute;height:12px;width:12px;border-top-right-radius:2px}.tooltip .arrow-tooltip.topLeft{left:12px;top:calc(100% - 6px);transform:rotate(135deg)}.tooltip .arrow-tooltip.top{left:calc(50% - 6px);top:calc(100% - 6px);transform:rotate(135deg)}.tooltip .arrow-tooltip.topRight{right:12px;top:calc(100% - 6px);transform:rotate(135deg)}.tooltip .arrow-tooltip.left{top:calc(50% - 6px);transform:rotate(45deg)}.tooltip .arrow-tooltip.left:not(.border){right:-6px}.tooltip .arrow-tooltip.left.border{right:-7px}.tooltip .arrow-tooltip.right{top:calc(50% - 6px);transform:rotate(-135deg)}.tooltip .arrow-tooltip.right:not(.border){left:-6px}.tooltip .arrow-tooltip.right.border{left:-7px}.tooltip .arrow-tooltip.bottomLeft{left:12px;transform:rotate(-45deg)}.tooltip .arrow-tooltip.bottomLeft:not(.border){top:-6px}.tooltip .arrow-tooltip.bottomLeft.border{top:-7px}.tooltip .arrow-tooltip.bottom{left:calc(50% - 6px);transform:rotate(-45deg)}.tooltip .arrow-tooltip.bottom:not(.border){top:-6px}.tooltip .arrow-tooltip.bottom.border{top:-7px}.tooltip .arrow-tooltip.bottomRight{right:12px;transform:rotate(-45deg)}.tooltip .arrow-tooltip.bottomRight:not(.border){top:-6px}.tooltip .arrow-tooltip.bottomRight.border{top:-7px}.tooltip.full{max-width:350px}.tooltip.medium{max-width:300px}.tooltip .text{font-size:14px;color:#212e44}.tooltip .title{align-items:flex-start;font-weight:700;margin:8px 16px 0}.tooltip .content{padding:8px 16px;overflow-wrap:anywhere}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }], animations: [
|
|
43
46
|
trigger('neoTooltip', [
|
|
44
47
|
transition(':enter', [style({ opacity: 0 }), animate(200, style({ opacity: 1 }))]),
|
|
45
48
|
transition(':leave', [animate(200, style({ opacity: 0 }))]),
|
|
@@ -52,7 +55,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
52
55
|
transition(':enter', [style({ opacity: 0 }), animate(200, style({ opacity: 1 }))]),
|
|
53
56
|
transition(':leave', [animate(200, style({ opacity: 0 }))]),
|
|
54
57
|
]),
|
|
55
|
-
], imports: [NgIf, NgSwitch, NgTemplateOutlet, NgSwitchCase], template: "<div @neoTooltip [ngSwitch]=\"params.contentType\"\n class=\"tooltip {{params.maxWidth}}\"\n [style.background]=\"params.backgroundColor\"\n [style.border]=\"border\"\n >\n <div *ngIf=\"params.displayArrow\"\n class=\"arrow-tooltip {{params.position}}\"\n [class.border]=\"!!params.borderColor\"\n [style.background]=\"params.backgroundColor\"\n [style.borderTop]=\"border\"\n [style.borderRight]=\"border\"\n ></div>\n <ng-container *ngIf=\"params.title\">\n <div class=\"text title\">{{params.title}}</div>\n </ng-container>\n <ng-container *ngSwitchCase=\"'text'\">\n <ng-container *ngIf=\"params.content\">\n <div class=\"text content\">{{params.content}}</div>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'template'\">\n <ng-container
|
|
58
|
+
], imports: [NgIf, NgSwitch, NgTemplateOutlet, NgSwitchCase], template: "<div @neoTooltip [ngSwitch]=\"params.contentType\"\n class=\"tooltip {{params.maxWidth}}\"\n [style.background]=\"params.backgroundColor\"\n [style.border]=\"border\"\n >\n <div *ngIf=\"params.displayArrow\"\n class=\"arrow-tooltip {{params.position}}\"\n [class.border]=\"!!params.borderColor\"\n [style.background]=\"params.backgroundColor\"\n [style.borderTop]=\"border\"\n [style.borderRight]=\"border\"\n ></div>\n <ng-container *ngIf=\"params.title\">\n <div class=\"text title\">{{params.title}}</div>\n </ng-container>\n <ng-container *ngSwitchCase=\"'text'\">\n <ng-container *ngIf=\"params.content\">\n <div class=\"text content\">{{params.content}}</div>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'template'\">\n <ng-container [ngTemplateOutlet]=\"templateRefContent\"\n [ngTemplateOutletContext]=\"templateContext\"\n >\n </ng-container>\n </ng-container>\n</div>\n", styles: ["[color=facebook]{color:#1877f2}[bgcolor=facebook],[hcolor=facebook]:hover{background-color:#1877f2}[border=facebook]{border:1px solid #1877f2}[color=google]{color:#4e85e8}[bgcolor=google],[hcolor=google]:hover{background-color:#4e85e8}[border=google]{border:1px solid #4e85e8}[color=instagram]{color:#e1306c}[bgcolor=instagram],[hcolor=instagram]:hover{background-color:#e1306c}[border=instagram]{border:1px solid #e1306c}[color=instagrammagenta]{color:#c13584}[bgcolor=instagrammagenta],[hcolor=instagrammagenta]:hover{background-color:#c13584}[border=instagrammagenta]{border:1px solid #c13584}[color=instagramblue]{color:#5851db}[bgcolor=instagramblue],[hcolor=instagramblue]:hover{background-color:#5851db}[border=instagramblue]{border:1px solid #5851db}[color=instagrampurple]{color:#833ab4}[bgcolor=instagrampurple],[hcolor=instagrampurple]:hover{background-color:#833ab4}[border=instagrampurple]{border:1px solid #833ab4}[color=instagramorange]{color:#f56040}[bgcolor=instagramorange],[hcolor=instagramorange]:hover{background-color:#f56040}[border=instagramorange]{border:1px solid #f56040}[color=instagramyellow]{color:#ffdc80}[bgcolor=instagramyellow],[hcolor=instagramyellow]:hover{background-color:#ffdc80}[border=instagramyellow]{border:1px solid #ffdc80}[color=linkedin]{color:#2c67bc}[bgcolor=linkedin],[hcolor=linkedin]:hover{background-color:#2c67bc}[border=linkedin]{border:1px solid #2c67bc}[color=twitter]{color:#55acee}[bgcolor=twitter],[hcolor=twitter]:hover{background-color:#55acee}[border=twitter]{border:1px solid #55acee}[color=youtube]{color:red}[bgcolor=youtube],[hcolor=youtube]:hover{background-color:red}[border=youtube]{border:1px solid #ff0000}[color=blood-orange]{color:#ff4d00}[bgcolor=blood-orange],[hcolor=blood-orange]:hover{background-color:#ff4d00}[border=blood-orange]{border:1px solid #ff4d00}[color=pinkish-orange]{color:#ff7b49}[bgcolor=pinkish-orange],[hcolor=pinkish-orange]:hover{background-color:#ff7b49}[border=pinkish-orange]{border:1px solid #ff7b49}[color=charcoal-grey]{color:#2a2f34}[bgcolor=charcoal-grey],[hcolor=charcoal-grey]:hover{background-color:#2a2f34}[border=charcoal-grey]{border:1px solid #2a2f34}[color=azure]{color:#00aeef}[bgcolor=azure],[hcolor=azure]:hover{background-color:#00aeef}[border=azure]{border:1px solid #00aeef}[color=light-azure]{color:#eaf5fd}[bgcolor=light-azure],[hcolor=light-azure]:hover{background-color:#eaf5fd}[border=light-azure]{border:1px solid #eaf5fd}[color=blue-grey]{color:#8d98a9}[bgcolor=blue-grey],[hcolor=blue-grey]:hover{background-color:#8d98a9}[border=blue-grey]{border:1px solid #8d98a9}[color=silver]{color:#ced0da}[bgcolor=silver],[hcolor=silver]:hover{background-color:#ced0da}[border=silver]{border:1px solid #ced0da}[color=pale-grey]{color:#dfe3e9}[bgcolor=pale-grey],[hcolor=pale-grey]:hover{background-color:#dfe3e9}[border=pale-grey]{border:1px solid #dfe3e9}[color=grey-white]{color:#f5f7f8}[bgcolor=grey-white],[hcolor=grey-white]:hover{background-color:#f5f7f8}[border=grey-white]{border:1px solid #f5f7f8}[color=cool-grey]{color:#b4bbc6}[bgcolor=cool-grey],[hcolor=cool-grey]:hover{background-color:#b4bbc6}[border=cool-grey]{border:1px solid #b4bbc6}[color=black]{color:#344563}[bgcolor=black],[hcolor=black]:hover{background-color:#344563}[border=black]{border:1px solid #344563}[color=grey-blue]{color:#68768c}[bgcolor=grey-blue],[hcolor=grey-blue]:hover{background-color:#68768c}[border=grey-blue]{border:1px solid #68768c}[color=strawberry]{color:#f4282d}[bgcolor=strawberry],[hcolor=strawberry]:hover{background-color:#f4282d}[border=strawberry]{border:1px solid #f4282d}[color=light-strawberry]{color:#f8eded}[bgcolor=light-strawberry],[hcolor=light-strawberry]:hover{background-color:#f8eded}[border=light-strawberry]{border:1px solid #f8eded}[color=white]{color:#fff}[bgcolor=white],[hcolor=white]:hover{background-color:#fff}[border=white]{border:1px solid #ffffff}[color=cool-green]{color:#33c15d}[bgcolor=cool-green],[hcolor=cool-green]:hover{background-color:#33c15d}[border=cool-green]{border:1px solid #33c15d}[color=light-green]{color:#ebfaef}[bgcolor=light-green],[hcolor=light-green]:hover{background-color:#ebfaef}[border=light-green]{border:1px solid #ebfaef}[color=transparent]{color:transparent}[bgcolor=transparent],[hcolor=transparent]:hover{background-color:transparent}[border=transparent]{border:1px solid transparent}[color=c0]{color:#a566a5}[bgcolor=c0],[hcolor=c0]:hover{background-color:#a566a5}[border=c0]{border:1px solid #A566A5}[color=c1]{color:#c7ab82}[bgcolor=c1],[hcolor=c1]:hover{background-color:#c7ab82}[border=c1]{border:1px solid #C7AB82}[color=c2]{color:#f2713c}[bgcolor=c2],[hcolor=c2]:hover{background-color:#f2713c}[border=c2]{border:1px solid #F2713C}[color=c3]{color:#ffd006}[bgcolor=c3],[hcolor=c3]:hover{background-color:#ffd006}[border=c3]{border:1px solid #FFD006}[color=c4]{color:#94c5aa}[bgcolor=c4],[hcolor=c4]:hover{background-color:#94c5aa}[border=c4]{border:1px solid #94C5AA}[color=c5]{color:#2a9d8f}[bgcolor=c5],[hcolor=c5]:hover{background-color:#2a9d8f}[border=c5]{border:1px solid #2A9D8F}[color=c6]{color:#78acd8}[bgcolor=c6],[hcolor=c6]:hover{background-color:#78acd8}[border=c6]{border:1px solid #78ACD8}[color=c7]{color:#525a9e}[bgcolor=c7],[hcolor=c7]:hover{background-color:#525a9e}[border=c7]{border:1px solid #525A9E}[color=c8]{color:#6a2459}[bgcolor=c8],[hcolor=c8]:hover{background-color:#6a2459}[border=c8]{border:1px solid #6A2459}[color=c9]{color:#74729e}[bgcolor=c9],[hcolor=c9]:hover{background-color:#74729e}[border=c9]{border:1px solid #74729E}.tooltip{border-radius:8px;filter:drop-shadow(0px 0px 10px rgba(0,0,0,.08));position:relative;display:flex;flex-direction:column;align-items:flex-start;min-height:18px}.tooltip .arrow-tooltip{position:absolute;height:12px;width:12px;border-top-right-radius:2px}.tooltip .arrow-tooltip.topLeft{left:12px;top:calc(100% - 6px);transform:rotate(135deg)}.tooltip .arrow-tooltip.top{left:calc(50% - 6px);top:calc(100% - 6px);transform:rotate(135deg)}.tooltip .arrow-tooltip.topRight{right:12px;top:calc(100% - 6px);transform:rotate(135deg)}.tooltip .arrow-tooltip.left{top:calc(50% - 6px);transform:rotate(45deg)}.tooltip .arrow-tooltip.left:not(.border){right:-6px}.tooltip .arrow-tooltip.left.border{right:-7px}.tooltip .arrow-tooltip.right{top:calc(50% - 6px);transform:rotate(-135deg)}.tooltip .arrow-tooltip.right:not(.border){left:-6px}.tooltip .arrow-tooltip.right.border{left:-7px}.tooltip .arrow-tooltip.bottomLeft{left:12px;transform:rotate(-45deg)}.tooltip .arrow-tooltip.bottomLeft:not(.border){top:-6px}.tooltip .arrow-tooltip.bottomLeft.border{top:-7px}.tooltip .arrow-tooltip.bottom{left:calc(50% - 6px);transform:rotate(-45deg)}.tooltip .arrow-tooltip.bottom:not(.border){top:-6px}.tooltip .arrow-tooltip.bottom.border{top:-7px}.tooltip .arrow-tooltip.bottomRight{right:12px;transform:rotate(-45deg)}.tooltip .arrow-tooltip.bottomRight:not(.border){top:-6px}.tooltip .arrow-tooltip.bottomRight.border{top:-7px}.tooltip.full{max-width:350px}.tooltip.medium{max-width:300px}.tooltip .text{font-size:14px;color:#212e44}.tooltip .title{align-items:flex-start;font-weight:700;margin:8px 16px 0}.tooltip .content{padding:8px 16px;overflow-wrap:anywhere}\n"] }]
|
|
56
59
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: TooltipNeoService }]; }, propDecorators: { params: [{
|
|
57
60
|
type: Input
|
|
58
61
|
}], onClickOutside: [{
|
|
@@ -174,7 +177,7 @@ class TooltipNeoDirective {
|
|
|
174
177
|
}
|
|
175
178
|
setSettings() {
|
|
176
179
|
if (typeof this.apTooltipNeo === 'object') {
|
|
177
|
-
const { content, backgroundColor = '#ffffff', borderColor, contentType = 'text', display = true, displayArrow = true, maxWidth = 'full', position = 'top', title = '', } = this.apTooltipNeo;
|
|
180
|
+
const { content, backgroundColor = '#ffffff', borderColor, contentType = 'text', templateContext = null, display = true, displayArrow = true, maxWidth = 'full', position = 'top', title = '', } = this.apTooltipNeo;
|
|
178
181
|
this.params = {
|
|
179
182
|
content,
|
|
180
183
|
backgroundColor,
|
|
@@ -185,6 +188,7 @@ class TooltipNeoDirective {
|
|
|
185
188
|
maxWidth,
|
|
186
189
|
position,
|
|
187
190
|
title,
|
|
191
|
+
templateContext
|
|
188
192
|
};
|
|
189
193
|
this.allowDisplay = TooltipNeoDirective.enableTooltip(content, contentType, display);
|
|
190
194
|
}
|