@acorex/components 18.5.13 → 18.5.15
Sign up to get free protection for your applications and to get access to all the features.
- package/button/index.d.ts +1 -0
- package/button/lib/button.class.d.ts +1 -0
- package/button/lib/button.component.d.ts +3 -1
- package/comment/index.d.ts +1 -1
- package/comment/lib/comment-container/comment-container.component.d.ts +1 -1
- package/comment/lib/comment-item/comment-item.component.d.ts +1 -1
- package/comment/lib/comment-reply-text/comment-reply-text.component.d.ts +5 -0
- package/comment/lib/comment.module.d.ts +6 -6
- package/dialog/lib/dialog.class.d.ts +1 -0
- package/dialog/lib/dialog.service.d.ts +2 -2
- package/esm2022/button/index.mjs +2 -1
- package/esm2022/button/lib/button.class.mjs +2 -0
- package/esm2022/button/lib/button.component.mjs +5 -4
- package/esm2022/comment/index.mjs +2 -2
- package/esm2022/comment/lib/comment-container/comment-container.component.mjs +3 -3
- package/esm2022/comment/lib/comment-item/comment-item.component.mjs +4 -5
- package/esm2022/comment/lib/comment-reply-text/comment-reply-text.component.mjs +12 -0
- package/esm2022/comment/lib/comment.module.mjs +7 -7
- package/esm2022/conversation/lib/conversation-input/conversation-input.component.mjs +1 -1
- package/esm2022/conversation/lib/conversation-message/conversation-message.component.mjs +1 -1
- package/esm2022/data-pager/lib/data-pager-next-buttons.components.mjs +1 -1
- package/esm2022/data-pager/lib/data-pager-numeric-selector.component.mjs +1 -1
- package/esm2022/data-pager/lib/data-pager-pagesize-dropdown.component.mjs +1 -1
- package/esm2022/data-pager/lib/data-pager-prev-buttons.component.mjs +1 -1
- package/esm2022/data-table/lib/data-table/data-table.component.mjs +1 -1
- package/esm2022/data-table/lib/infinite-scroll-data-table/infinite-scroll-data-table.component.mjs +1 -1
- package/esm2022/datetime-picker/lib/datetime-picker.component.mjs +1 -1
- package/esm2022/dialog/lib/dialog.class.mjs +1 -1
- package/esm2022/dialog/lib/dialog.component.mjs +1 -1
- package/esm2022/dialog/lib/dialog.service.mjs +5 -3
- package/esm2022/form/lib/validation-summary.component.mjs +1 -1
- package/esm2022/loading-dialog/lib/loading-dialog.component.mjs +1 -1
- package/esm2022/notification/lib/notification.component.mjs +1 -1
- package/esm2022/scheduler/lib/scheduler-month-view.component.mjs +1 -1
- package/esm2022/scheduler/lib/scheduler.component.mjs +1 -1
- package/esm2022/wysiwyg/lib/wysiwyg/wysiwyg-container/wysiwyg-container.component.mjs +2 -2
- package/esm2022/wysiwyg/lib/wysiwyg/wysiwyg-toolbar/wysiwyg-toolbar.component.mjs +62 -19
- package/esm2022/wysiwyg/lib/wysiwyg/wysiwyg-view/wysiwyg-view.component.mjs +24 -5
- package/esm2022/wysiwyg/lib/wysiwyg/wysiwyg.service.mjs +2 -1
- package/fesm2022/acorex-components-button.mjs +4 -3
- package/fesm2022/acorex-components-button.mjs.map +1 -1
- package/fesm2022/acorex-components-comment.mjs +27 -48
- package/fesm2022/acorex-components-comment.mjs.map +1 -1
- package/fesm2022/acorex-components-conversation.mjs +2 -2
- package/fesm2022/acorex-components-conversation.mjs.map +1 -1
- package/fesm2022/acorex-components-data-pager.mjs +4 -4
- package/fesm2022/acorex-components-data-pager.mjs.map +1 -1
- package/fesm2022/acorex-components-data-table.mjs +2 -2
- package/fesm2022/acorex-components-data-table.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-picker.mjs +1 -1
- package/fesm2022/acorex-components-datetime-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-dialog.mjs +5 -3
- package/fesm2022/acorex-components-dialog.mjs.map +1 -1
- package/fesm2022/acorex-components-form.mjs +1 -1
- package/fesm2022/acorex-components-form.mjs.map +1 -1
- package/fesm2022/acorex-components-loading-dialog.mjs +1 -1
- package/fesm2022/acorex-components-loading-dialog.mjs.map +1 -1
- package/fesm2022/acorex-components-notification.mjs +1 -1
- package/fesm2022/acorex-components-notification.mjs.map +1 -1
- package/fesm2022/acorex-components-scheduler.mjs +2 -2
- package/fesm2022/acorex-components-scheduler.mjs.map +1 -1
- package/fesm2022/acorex-components-wysiwyg.mjs +84 -22
- package/fesm2022/acorex-components-wysiwyg.mjs.map +1 -1
- package/package.json +69 -69
- package/wysiwyg/lib/wysiwyg/wysiwyg-toolbar/wysiwyg-toolbar.component.d.ts +19 -4
- package/wysiwyg/lib/wysiwyg/wysiwyg-view/wysiwyg-view.component.d.ts +6 -1
- package/wysiwyg/lib/wysiwyg/wysiwyg.service.d.ts +1 -0
- package/comment/lib/comment-input/comment-input.component.d.ts +0 -10
- package/esm2022/comment/lib/comment-input/comment-input.component.mjs +0 -33
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-notification.mjs","sources":["../../../../libs/components/notification/src/lib/notification.component.ts","../../../../libs/components/notification/src/lib/notification.component.html","../../../../libs/components/notification/src/lib/notification.config.ts","../../../../libs/components/notification/src/lib/notification.service.ts","../../../../libs/components/notification/src/lib/notification.module.ts","../../../../libs/components/notification/src/acorex-components-notification.ts"],"sourcesContent":["import { AXClosbaleComponent, AXComponentCloseEvent, MXBaseComponent } from '@acorex/components/common';\nimport { DIALOG_DATA, DialogRef } from '@angular/cdk/dialog';\nimport { ComponentPortal, ComponentType, Portal, TemplatePortal } from '@angular/cdk/portal';\nimport { ChangeDetectionStrategy, Component, HostBinding, Inject, TemplateRef, ViewEncapsulation } from '@angular/core';\nimport { AXNotificationButtonItem, AXNotificationData } from './notification.class';\n\n/**\n * The Button is a component which detects user interaction and triggers a corresponding event\n *\n * @category Components\n */\n@Component({\n selector: 'ax-notification',\n templateUrl: './notification.component.html',\n styleUrls: ['./notification.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [{ provide: AXClosbaleComponent, useExisting: AXNotificationComponent }],\n})\nexport class AXNotificationComponent extends MXBaseComponent {\n _selectedPortal: Portal<unknown>;\n _icon: string;\n\n /**\n * @ignore\n */\n constructor(\n @Inject(DIALOG_DATA)\n public config: AXNotificationData,\n private dialogRef: DialogRef<AXComponentCloseEvent>,\n ) {\n super();\n }\n\n override ngOnInit() {\n super.ngOnInit();\n this._initContent();\n this._initIcon();\n this._handleTimeOut();\n }\n\n private _handleTimeOut() {\n if (this.config.timeOut) {\n setTimeout(() => {\n this.close();\n }, this.config.timeOut);\n }\n }\n\n private _initContent() {\n if (this.config.content instanceof TemplateRef) {\n this._selectedPortal = new TemplatePortal(this.config.content as TemplateRef<unknown>, this.getViewContainer());\n this.cdr.markForCheck();\n } else if (typeof this.config.content === 'function') {\n this._selectedPortal = new ComponentPortal(this.config.content as ComponentType<unknown>);\n this.cdr.markForCheck();\n }\n }\n\n private _initIcon() {\n if (!this.config.icon) {\n switch (this.config.color) {\n case 'success':\n this._icon = 'ax-icon ax-icon-check-circle';\n break;\n case 'danger':\n this._icon = 'ax-icon ax-icon-error';\n break;\n case 'warning':\n this._icon = 'ax-icon ax-icon-warning';\n break;\n case 'info':\n this._icon = 'ax-icon ax-icon-info';\n break;\n default:\n this._icon = this.config.icon || 'ax-icon ax-icon-check-circle';\n break;\n }\n } else {\n this._icon = this.config.icon;\n }\n }\n\n protected _handleButtonClick(button: AXNotificationButtonItem) {\n if (button.onClick) {\n button.onClick({ source: button });\n }\n }\n\n @HostBinding('class')\n private get __hostClass(): string {\n return `ax-${this.config.color}`;\n }\n\n close() {\n this.dialogRef.close({\n component: this,\n htmlElement: this.getHostElement(),\n });\n }\n}\n","<span class=\"ax-notification-icon ax-icon-solid {{ _icon }}\"></span>\n<div class=\"ax-notification-content\">\n <div class=\"ax-notification-title\">{{ config.title | translate | async }}</div>\n @if(_selectedPortal){\n <ng-template [cdkPortalOutlet]=\"_selectedPortal\"></ng-template>\n } @else{\n <div>{{ config.content }}</div>\n }\n\n @if(config.buttons?.length){\n <div class=\"ax-notification-buttons\">\n @for(button of config.buttons; track $index){\n <ax-button class=\"ax-xs\" [text]=\"button.text | translate | async\" [color]=\"button.color\" [look]=\"button.look\"\n [disabled]=\"button.disabled\" (onClick)=\"_handleButtonClick(button)\">\n @if(button.loading){\n <ax-loading></ax-loading>\n }\n </ax-button>\n }\n </div>\n }\n\n</div>\n@if(config.closeButton){\n<ax-close-button></ax-close-button>\n}\n@if(config.timeOutProgress && config.timeOut){\n<div class=\"ax-notification-progress\" [style.animation-duration.ms]=\"config.timeOut\"></div>\n}","import { AXLocation } from '@acorex/components/common';\nimport { InjectionToken } from '@angular/core';\n\nexport interface AXNotificationConfig {\n gap: number;\n timeOut: number;\n timeOutProgress: boolean;\n location: AXLocation;\n closeButton: boolean;\n}\n\nexport const AX_NOTIFICATION_CONFIG = new InjectionToken<AXNotificationConfig>('AX_NOTIFICATION_CONFIG', {\n providedIn: 'root',\n factory: () => AXNotificationDefaultConfig,\n});\n\nexport const AXNotificationDefaultConfig: AXNotificationConfig = {\n gap: 5,\n timeOut: 2500,\n timeOutProgress: true,\n closeButton: true,\n location: 'top-end',\n};\n\nexport type PartialNotificationConfig = Partial<AXNotificationConfig>;\n\nexport function notificationConfig(config: PartialNotificationConfig = {}): AXNotificationConfig {\n const result = {\n ...AXNotificationDefaultConfig,\n ...config,\n };\n return result;\n}\n","import { Dialog } from '@angular/cdk/dialog';\nimport { GlobalPositionStrategy } from '@angular/cdk/overlay';\nimport { Injectable, inject } from '@angular/core';\nimport { AXNotificationOptions as AXNotificationDisplayConfig, AXNotificationRef } from './notification.class';\nimport { AXNotificationComponent } from './notification.component';\nimport { AXNotificationConfig, AX_NOTIFICATION_CONFIG } from './notification.config';\n\n@Injectable()\nexport class AXNotificationService {\n private dialog: Dialog = inject(Dialog);\n private defaultConfig: AXNotificationConfig = inject(AX_NOTIFICATION_CONFIG);\n\n show(config: AXNotificationDisplayConfig): AXNotificationRef {\n config = Object.assign(\n {\n closeButton: true,\n location: this.defaultConfig.location,\n },\n config,\n );\n const gap = this.defaultConfig.gap;\n\n let positionStrategy = new GlobalPositionStrategy();\n const pos = this.getPosition(config.location) + gap + 'px';\n switch (config.location) {\n case 'bottom-center':\n positionStrategy = positionStrategy.bottom(pos).centerHorizontally();\n break;\n case 'bottom-end':\n positionStrategy = positionStrategy.bottom(pos).right(gap + 'px');\n break;\n case 'bottom-start':\n positionStrategy = positionStrategy.bottom(pos).left(gap + 'px');\n break;\n case 'top-center':\n positionStrategy = positionStrategy.top(pos).centerHorizontally();\n break;\n case 'top-end':\n positionStrategy = positionStrategy.top(pos).right(gap + 'px');\n break;\n case 'top-start':\n positionStrategy = positionStrategy.top(pos).left(gap + 'px');\n break;\n case 'center-start':\n positionStrategy = positionStrategy.centerVertically().left(gap + 'px');\n break;\n case 'center-end':\n positionStrategy = positionStrategy.centerVertically().right(gap + 'px');\n break;\n default:\n break;\n }\n\n const dialogRef = this.dialog.open(AXNotificationComponent, {\n data: config,\n autoFocus: '__no_element__',\n restoreFocus: false,\n role: 'dialog',\n ariaModal: true,\n closeOnNavigation: true,\n closeOnDestroy: true,\n hasBackdrop: false,\n panelClass: ['ax-animate-animated', 'ax-animate-fadeIn', 'ax-animate-faster'],\n positionStrategy: positionStrategy,\n });\n\n const toastRef = dialogRef.componentInstance as AXNotificationComponent;\n dialogRef.closed.subscribe(() => {\n this.reposition();\n });\n\n return {\n close: () => {\n toastRef.close();\n },\n };\n }\n\n public hideAll() {\n this.dialog.closeAll();\n }\n\n private reposition(): void {\n //TODO: reposition vertically afer close toast\n }\n\n private getPosition(location: string) {\n const list = this.dialog.openDialogs\n .map((c) => c.componentInstance as AXNotificationComponent)\n .filter((c) => c.config.location == location);\n if (list.length == 0) return 0;\n if (location.split('-')[0] == 'bottom') {\n return window.innerHeight - list[list.length - 1].getHostElement().offsetTop;\n } else {\n return list[list.length - 1].getHostElement().offsetTop + list[list.length - 1].getHostElement().offsetHeight;\n }\n }\n}\n","import { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXLoadingModule } from '@acorex/components/loading';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { DialogModule } from '@angular/cdk/dialog';\nimport { PortalModule } from '@angular/cdk/portal';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXNotificationComponent } from './notification.component';\nimport { AXNotificationService } from './notification.service';\n\nconst COMPONENT = [AXNotificationComponent];\nconst MODULES = [CommonModule, PortalModule, AXButtonModule, DialogModule, AXLoadingModule, AXDecoratorModule, AXTranslationModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [AXNotificationService],\n})\nexport class AXNotificationModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAMA;;;;AAIG;AASG,MAAO,uBAAwB,SAAQ,eAAe,CAAA;AAI1D;;AAEG;IACH,WAES,CAAA,MAA0B,EACzB,SAA2C,EAAA;AAEnD,QAAA,KAAK,EAAE,CAAC;QAHD,IAAM,CAAA,MAAA,GAAN,MAAM,CAAoB;QACzB,IAAS,CAAA,SAAA,GAAT,SAAS,CAAkC;KAGpD;IAEQ,QAAQ,GAAA;QACf,KAAK,CAAC,QAAQ,EAAE,CAAC;QACjB,IAAI,CAAC,YAAY,EAAE,CAAC;QACpB,IAAI,CAAC,SAAS,EAAE,CAAC;QACjB,IAAI,CAAC,cAAc,EAAE,CAAC;KACvB;IAEO,cAAc,GAAA;AACpB,QAAA,IAAI,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;YACvB,UAAU,CAAC,MAAK;gBACd,IAAI,CAAC,KAAK,EAAE,CAAC;AACf,aAAC,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;SACzB;KACF;IAEO,YAAY,GAAA;QAClB,IAAI,IAAI,CAAC,MAAM,CAAC,OAAO,YAAY,WAAW,EAAE;AAC9C,YAAA,IAAI,CAAC,eAAe,GAAG,IAAI,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,OAA+B,EAAE,IAAI,CAAC,gBAAgB,EAAE,CAAC,CAAC;AAChH,YAAA,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC;SACzB;aAAM,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,KAAK,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AA,oBAAoB,EAFpB,SAAA,EAAA,CAAC,qBAAqB,CAAC,YAFrB,OAAO,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAIT,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBANhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,GAAG,SAAS,CAAC;AAC5B,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACrB,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;oBACvB,SAAS,EAAE,CAAC,qBAAqB,CAAC;AACnC,iBAAA,CAAA;;;ACnBD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-components-notification.mjs","sources":["../../../../libs/components/notification/src/lib/notification.component.ts","../../../../libs/components/notification/src/lib/notification.component.html","../../../../libs/components/notification/src/lib/notification.config.ts","../../../../libs/components/notification/src/lib/notification.service.ts","../../../../libs/components/notification/src/lib/notification.module.ts","../../../../libs/components/notification/src/acorex-components-notification.ts"],"sourcesContent":["import { AXClosbaleComponent, AXComponentCloseEvent, MXBaseComponent } from '@acorex/components/common';\nimport { DIALOG_DATA, DialogRef } from '@angular/cdk/dialog';\nimport { ComponentPortal, ComponentType, Portal, TemplatePortal } from '@angular/cdk/portal';\nimport { ChangeDetectionStrategy, Component, HostBinding, Inject, TemplateRef, ViewEncapsulation } from '@angular/core';\nimport { AXNotificationButtonItem, AXNotificationData } from './notification.class';\n\n/**\n * The Button is a component which detects user interaction and triggers a corresponding event\n *\n * @category Components\n */\n@Component({\n selector: 'ax-notification',\n templateUrl: './notification.component.html',\n styleUrls: ['./notification.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [{ provide: AXClosbaleComponent, useExisting: AXNotificationComponent }],\n})\nexport class AXNotificationComponent extends MXBaseComponent {\n _selectedPortal: Portal<unknown>;\n _icon: string;\n\n /**\n * @ignore\n */\n constructor(\n @Inject(DIALOG_DATA)\n public config: AXNotificationData,\n private dialogRef: DialogRef<AXComponentCloseEvent>,\n ) {\n super();\n }\n\n override ngOnInit() {\n super.ngOnInit();\n this._initContent();\n this._initIcon();\n this._handleTimeOut();\n }\n\n private _handleTimeOut() {\n if (this.config.timeOut) {\n setTimeout(() => {\n this.close();\n }, this.config.timeOut);\n }\n }\n\n private _initContent() {\n if (this.config.content instanceof TemplateRef) {\n this._selectedPortal = new TemplatePortal(this.config.content as TemplateRef<unknown>, this.getViewContainer());\n this.cdr.markForCheck();\n } else if (typeof this.config.content === 'function') {\n this._selectedPortal = new ComponentPortal(this.config.content as ComponentType<unknown>);\n this.cdr.markForCheck();\n }\n }\n\n private _initIcon() {\n if (!this.config.icon) {\n switch (this.config.color) {\n case 'success':\n this._icon = 'ax-icon ax-icon-check-circle';\n break;\n case 'danger':\n this._icon = 'ax-icon ax-icon-error';\n break;\n case 'warning':\n this._icon = 'ax-icon ax-icon-warning';\n break;\n case 'info':\n this._icon = 'ax-icon ax-icon-info';\n break;\n default:\n this._icon = this.config.icon || 'ax-icon ax-icon-check-circle';\n break;\n }\n } else {\n this._icon = this.config.icon;\n }\n }\n\n protected _handleButtonClick(button: AXNotificationButtonItem) {\n if (button.onClick) {\n button.onClick({ source: button });\n }\n }\n\n @HostBinding('class')\n private get __hostClass(): string {\n return `ax-${this.config.color}`;\n }\n\n close() {\n this.dialogRef.close({\n component: this,\n htmlElement: this.getHostElement(),\n });\n }\n}\n","<span class=\"ax-notification-icon ax-icon-solid {{ _icon }}\"></span>\n<div class=\"ax-notification-content\">\n <div class=\"ax-notification-title\">{{ config.title | translate | async }}</div>\n @if(_selectedPortal){\n <ng-template [cdkPortalOutlet]=\"_selectedPortal\"></ng-template>\n } @else{\n <div>{{ config.content }}</div>\n }\n\n @if(config.buttons?.length){\n <div class=\"ax-notification-buttons\">\n @for(button of config.buttons; track $index){\n <ax-button class=\"ax-xs\" [text]=\"button.text | translate | async\" [color]=\"button.color\" [look]=\"button.look\"\n [disabled]=\"button.disabled\" (onClick)=\"_handleButtonClick(button)\">\n @if(button.loading){\n <ax-loading></ax-loading>\n }\n </ax-button>\n }\n </div>\n }\n\n</div>\n@if(config.closeButton){\n<ax-close-button></ax-close-button>\n}\n@if(config.timeOutProgress && config.timeOut){\n<div class=\"ax-notification-progress\" [style.animation-duration.ms]=\"config.timeOut\"></div>\n}","import { AXLocation } from '@acorex/components/common';\nimport { InjectionToken } from '@angular/core';\n\nexport interface AXNotificationConfig {\n gap: number;\n timeOut: number;\n timeOutProgress: boolean;\n location: AXLocation;\n closeButton: boolean;\n}\n\nexport const AX_NOTIFICATION_CONFIG = new InjectionToken<AXNotificationConfig>('AX_NOTIFICATION_CONFIG', {\n providedIn: 'root',\n factory: () => AXNotificationDefaultConfig,\n});\n\nexport const AXNotificationDefaultConfig: AXNotificationConfig = {\n gap: 5,\n timeOut: 2500,\n timeOutProgress: true,\n closeButton: true,\n location: 'top-end',\n};\n\nexport type PartialNotificationConfig = Partial<AXNotificationConfig>;\n\nexport function notificationConfig(config: PartialNotificationConfig = {}): AXNotificationConfig {\n const result = {\n ...AXNotificationDefaultConfig,\n ...config,\n };\n return result;\n}\n","import { Dialog } from '@angular/cdk/dialog';\nimport { GlobalPositionStrategy } from '@angular/cdk/overlay';\nimport { Injectable, inject } from '@angular/core';\nimport { AXNotificationOptions as AXNotificationDisplayConfig, AXNotificationRef } from './notification.class';\nimport { AXNotificationComponent } from './notification.component';\nimport { AXNotificationConfig, AX_NOTIFICATION_CONFIG } from './notification.config';\n\n@Injectable()\nexport class AXNotificationService {\n private dialog: Dialog = inject(Dialog);\n private defaultConfig: AXNotificationConfig = inject(AX_NOTIFICATION_CONFIG);\n\n show(config: AXNotificationDisplayConfig): AXNotificationRef {\n config = Object.assign(\n {\n closeButton: true,\n location: this.defaultConfig.location,\n },\n config,\n );\n const gap = this.defaultConfig.gap;\n\n let positionStrategy = new GlobalPositionStrategy();\n const pos = this.getPosition(config.location) + gap + 'px';\n switch (config.location) {\n case 'bottom-center':\n positionStrategy = positionStrategy.bottom(pos).centerHorizontally();\n break;\n case 'bottom-end':\n positionStrategy = positionStrategy.bottom(pos).right(gap + 'px');\n break;\n case 'bottom-start':\n positionStrategy = positionStrategy.bottom(pos).left(gap + 'px');\n break;\n case 'top-center':\n positionStrategy = positionStrategy.top(pos).centerHorizontally();\n break;\n case 'top-end':\n positionStrategy = positionStrategy.top(pos).right(gap + 'px');\n break;\n case 'top-start':\n positionStrategy = positionStrategy.top(pos).left(gap + 'px');\n break;\n case 'center-start':\n positionStrategy = positionStrategy.centerVertically().left(gap + 'px');\n break;\n case 'center-end':\n positionStrategy = positionStrategy.centerVertically().right(gap + 'px');\n break;\n default:\n break;\n }\n\n const dialogRef = this.dialog.open(AXNotificationComponent, {\n data: config,\n autoFocus: '__no_element__',\n restoreFocus: false,\n role: 'dialog',\n ariaModal: true,\n closeOnNavigation: true,\n closeOnDestroy: true,\n hasBackdrop: false,\n panelClass: ['ax-animate-animated', 'ax-animate-fadeIn', 'ax-animate-faster'],\n positionStrategy: positionStrategy,\n });\n\n const toastRef = dialogRef.componentInstance as AXNotificationComponent;\n dialogRef.closed.subscribe(() => {\n this.reposition();\n });\n\n return {\n close: () => {\n toastRef.close();\n },\n };\n }\n\n public hideAll() {\n this.dialog.closeAll();\n }\n\n private reposition(): void {\n //TODO: reposition vertically afer close toast\n }\n\n private getPosition(location: string) {\n const list = this.dialog.openDialogs\n .map((c) => c.componentInstance as AXNotificationComponent)\n .filter((c) => c.config.location == location);\n if (list.length == 0) return 0;\n if (location.split('-')[0] == 'bottom') {\n return window.innerHeight - list[list.length - 1].getHostElement().offsetTop;\n } else {\n return list[list.length - 1].getHostElement().offsetTop + list[list.length - 1].getHostElement().offsetHeight;\n }\n }\n}\n","import { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXLoadingModule } from '@acorex/components/loading';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { DialogModule } from '@angular/cdk/dialog';\nimport { PortalModule } from '@angular/cdk/portal';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXNotificationComponent } from './notification.component';\nimport { AXNotificationService } from './notification.service';\n\nconst COMPONENT = [AXNotificationComponent];\nconst MODULES = [CommonModule, PortalModule, AXButtonModule, DialogModule, AXLoadingModule, AXDecoratorModule, AXTranslationModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [AXNotificationService],\n})\nexport class AXNotificationModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAMA;;;;AAIG;AASG,MAAO,uBAAwB,SAAQ,eAAe,CAAA;AAI1D;;AAEG;IACH,WAES,CAAA,MAA0B,EACzB,SAA2C,EAAA;AAEnD,QAAA,KAAK,EAAE,CAAC;QAHD,IAAM,CAAA,MAAA,GAAN,MAAM,CAAoB;QACzB,IAAS,CAAA,SAAA,GAAT,SAAS,CAAkC;KAGpD;IAEQ,QAAQ,GAAA;QACf,KAAK,CAAC,QAAQ,EAAE,CAAC;QACjB,IAAI,CAAC,YAAY,EAAE,CAAC;QACpB,IAAI,CAAC,SAAS,EAAE,CAAC;QACjB,IAAI,CAAC,cAAc,EAAE,CAAC;KACvB;IAEO,cAAc,GAAA;AACpB,QAAA,IAAI,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;YACvB,UAAU,CAAC,MAAK;gBACd,IAAI,CAAC,KAAK,EAAE,CAAC;AACf,aAAC,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;SACzB;KACF;IAEO,YAAY,GAAA;QAClB,IAAI,IAAI,CAAC,MAAM,CAAC,OAAO,YAAY,WAAW,EAAE;AAC9C,YAAA,IAAI,CAAC,eAAe,GAAG,IAAI,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,OAA+B,EAAE,IAAI,CAAC,gBAAgB,EAAE,CAAC,CA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,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,EAFpB,SAAA,EAAA,CAAC,qBAAqB,CAAC,YAFrB,OAAO,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAIT,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBANhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,GAAG,SAAS,CAAC;AAC5B,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACrB,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;oBACvB,SAAS,EAAE,CAAC,qBAAqB,CAAC;AACnC,iBAAA,CAAA;;;ACnBD;;AAEG;;;;"}
|
@@ -48,7 +48,7 @@ class AXSchedulerMonthViewComponent extends MXBaseComponent {
|
|
48
48
|
}));
|
49
49
|
}
|
50
50
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXSchedulerMonthViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
51
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.2", type: AXSchedulerMonthViewComponent, selector: "ax-scheduler-month-view", inputs: { date: "date" }, usesInheritance: true, ngImport: i0, template: "<!-- <div class=\"ax-flex ax-flex-col ax-flex-auto ax-shadow-md\"> -->\n<div class=\"ax-grid ax-grid-cols-7 ax-gap-[1px] ax-w-full ax-bg-neutral-200 ax-border-b\">\n <ng-container *ngFor=\"let item of dayNames\">\n <div class=\"ax-flex ax-items-center ax-justify-center ax-py-2 ax-bg-white ax-font-medium\">\n {{item}}\n </div>\n </ng-container>\n</div>\n<div class=\"ax-flex ax-flex-auto ax-bg-neutral-200\">\n <div class=\"ax-grid ax-grid-cols-7 ax-gap-[1px] ax-w-full\">\n <ng-container *ngFor=\"let item of _slots\">\n <div class=\"ax-py-2 ax-px-3 ax-bg-white ax-cursor-pointer hover:ax-bg-neutral-100\n ax-flex ax-flex-col ax-justify-between\" [ngClass]=\"item.cssClass\">\n <time class=\"ax-text-sm ax-flex ax-items-center ax-justify-center ax-rounded-full ax-w-6 ax-h-6\"\n [class.ax-bg-primary-500]=\"item.isToday\" [class.ax-text-white]=\"item.isToday\"\n datetime=\"item.date.format('dd')\">{{item.date.format('d')}}</time>\n <ol class=\"ax-mt-2 ax-hidden lg:ax-flex ax-flex-col ax-gap-1\">\n <li *ngIf=\"item.date.dayOfMonth % 6 === 0\">\n <a href=\"#\"\n class=\"ax-flex ax-justify-between ax-text-sm ax-bg-primary-500 ax-py-1 ax-px-2 ax-rounded ax-text-primary-fore\">\n <p class=\"ax-text-sm\">Launch Time</p>\n <time class=\"ax-ms-3\" datetime=\"item.date.format('HH A')\">\n {{item.date.format('hh A')}}\n </time>\n </a>\n </li>\n <li *ngIf=\"item.date.dayOfMonth % 5 === 0\">\n <a href=\"#\"\n class=\"ax-flex ax-justify-between ax-text-sm ax-bg-success-500 ax-py-1 ax-px-2 ax-rounded ax-text-success-fore\">\n <p class=\"ax-text-sm\">Daily meeting</p>\n <time class=\"ax-ms-3\" datetime=\"item.date.format('HH A')\">\n {{item.date.format('hh A')}}\n </time>\n </a>\n </li>\n </ol>\n <ol class=\"ax-flex ax-gap-1 ax-self-center md:ax-hidden\">\n <li *ngIf=\"item.date.dayOfMonth % 5 === 0\">\n <span class=\"ax-flex ax-w-1.5 ax-h-1.5 ax-rounded-full ax-bg-primary-500 lg:ax-hidden\"></span>\n </li>\n <li *ngIf=\"item.date.dayOfMonth % 6 === 0\">\n <span class=\"ax-flex ax-w-1.5 ax-h-1.5 ax-rounded-full ax-bg-danger-500 lg:ax-hidden\"></span>\n </li>\n <li *ngIf=\"item.date.dayOfMonth % 8 === 0\">\n <span class=\"ax-flex ax-w-1.5 ax-h-1.5 ax-rounded-full ax-bg-warning-500 lg:ax-hidden\"></span>\n </li>\n <li *ngIf=\"item.date.dayOfMonth % 3 === 0\">\n <span class=\"ax-flex ax-w-1.5 ax-h-1.5 ax-rounded-full ax-bg-success-500 lg:ax-hidden\"></span>\n </li>\n </ol>\n </div>\n </ng-container>\n </div>\n</div>\n<!-- </div> -->\n<div class=\"ax-p-4 lg:ax-hidden\">\n <ol\n class=\"ax-flex ax-flex-col ax-rounded-lg ax-border ax-bg-surface ax-divide-y ax-overflow-hidden ax-cursor-pointer\">\n <li class=\"ax-flex ax-items-start ax-justify-between ax-p-4 hover:ax-bg-neutral-100 mobile-task\">\n <div class=\"ax-flex ax-flex-col ax-gap-2\">\n <p class=\"ax-font-medium\">Daily Meeting at the Office</p>\n <div class=\"ax-flex ax-gap-2 ax-items-center\">\n <ax-icon class=\"fa-solid fa-clock ax-text-neutral-400\"></ax-icon>\n <p class=\"ax-text-sm\">3 PM</p>\n </div>\n </div>\n <ax-button text=\"Edit\" class=\"!ax-bg-surface ax-border ax-sm ax-opacity-0\"></ax-button>\n </li>\n </ol>\n</div>", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "component", type: i3.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
51
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.2", type: AXSchedulerMonthViewComponent, selector: "ax-scheduler-month-view", inputs: { date: "date" }, usesInheritance: true, ngImport: i0, template: "<!-- <div class=\"ax-flex ax-flex-col ax-flex-auto ax-shadow-md\"> -->\n<div class=\"ax-grid ax-grid-cols-7 ax-gap-[1px] ax-w-full ax-bg-neutral-200 ax-border-b\">\n <ng-container *ngFor=\"let item of dayNames\">\n <div class=\"ax-flex ax-items-center ax-justify-center ax-py-2 ax-bg-white ax-font-medium\">\n {{item}}\n </div>\n </ng-container>\n</div>\n<div class=\"ax-flex ax-flex-auto ax-bg-neutral-200\">\n <div class=\"ax-grid ax-grid-cols-7 ax-gap-[1px] ax-w-full\">\n <ng-container *ngFor=\"let item of _slots\">\n <div class=\"ax-py-2 ax-px-3 ax-bg-white ax-cursor-pointer hover:ax-bg-neutral-100\n ax-flex ax-flex-col ax-justify-between\" [ngClass]=\"item.cssClass\">\n <time class=\"ax-text-sm ax-flex ax-items-center ax-justify-center ax-rounded-full ax-w-6 ax-h-6\"\n [class.ax-bg-primary-500]=\"item.isToday\" [class.ax-text-white]=\"item.isToday\"\n datetime=\"item.date.format('dd')\">{{item.date.format('d')}}</time>\n <ol class=\"ax-mt-2 ax-hidden lg:ax-flex ax-flex-col ax-gap-1\">\n <li *ngIf=\"item.date.dayOfMonth % 6 === 0\">\n <a href=\"#\"\n class=\"ax-flex ax-justify-between ax-text-sm ax-bg-primary-500 ax-py-1 ax-px-2 ax-rounded ax-text-primary-fore\">\n <p class=\"ax-text-sm\">Launch Time</p>\n <time class=\"ax-ms-3\" datetime=\"item.date.format('HH A')\">\n {{item.date.format('hh A')}}\n </time>\n </a>\n </li>\n <li *ngIf=\"item.date.dayOfMonth % 5 === 0\">\n <a href=\"#\"\n class=\"ax-flex ax-justify-between ax-text-sm ax-bg-success-500 ax-py-1 ax-px-2 ax-rounded ax-text-success-fore\">\n <p class=\"ax-text-sm\">Daily meeting</p>\n <time class=\"ax-ms-3\" datetime=\"item.date.format('HH A')\">\n {{item.date.format('hh A')}}\n </time>\n </a>\n </li>\n </ol>\n <ol class=\"ax-flex ax-gap-1 ax-self-center md:ax-hidden\">\n <li *ngIf=\"item.date.dayOfMonth % 5 === 0\">\n <span class=\"ax-flex ax-w-1.5 ax-h-1.5 ax-rounded-full ax-bg-primary-500 lg:ax-hidden\"></span>\n </li>\n <li *ngIf=\"item.date.dayOfMonth % 6 === 0\">\n <span class=\"ax-flex ax-w-1.5 ax-h-1.5 ax-rounded-full ax-bg-danger-500 lg:ax-hidden\"></span>\n </li>\n <li *ngIf=\"item.date.dayOfMonth % 8 === 0\">\n <span class=\"ax-flex ax-w-1.5 ax-h-1.5 ax-rounded-full ax-bg-warning-500 lg:ax-hidden\"></span>\n </li>\n <li *ngIf=\"item.date.dayOfMonth % 3 === 0\">\n <span class=\"ax-flex ax-w-1.5 ax-h-1.5 ax-rounded-full ax-bg-success-500 lg:ax-hidden\"></span>\n </li>\n </ol>\n </div>\n </ng-container>\n </div>\n</div>\n<!-- </div> -->\n<div class=\"ax-p-4 lg:ax-hidden\">\n <ol\n class=\"ax-flex ax-flex-col ax-rounded-lg ax-border ax-bg-surface ax-divide-y ax-overflow-hidden ax-cursor-pointer\">\n <li class=\"ax-flex ax-items-start ax-justify-between ax-p-4 hover:ax-bg-neutral-100 mobile-task\">\n <div class=\"ax-flex ax-flex-col ax-gap-2\">\n <p class=\"ax-font-medium\">Daily Meeting at the Office</p>\n <div class=\"ax-flex ax-gap-2 ax-items-center\">\n <ax-icon class=\"fa-solid fa-clock ax-text-neutral-400\"></ax-icon>\n <p class=\"ax-text-sm\">3 PM</p>\n </div>\n </div>\n <ax-button text=\"Edit\" class=\"!ax-bg-surface ax-border ax-sm ax-opacity-0\"></ax-button>\n </li>\n </ol>\n</div>", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "responsiveOn", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "responsiveOnChange", "loadingTextChange"] }, { kind: "component", type: i3.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
52
52
|
}
|
53
53
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXSchedulerMonthViewComponent, decorators: [{
|
54
54
|
type: Component,
|
@@ -92,7 +92,7 @@ class AXSchedulerComponent extends MXBaseComponent {
|
|
92
92
|
this.current = this.current.add('month', -1);
|
93
93
|
}
|
94
94
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXSchedulerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
95
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.2", type: AXSchedulerComponent, selector: "ax-scheduler", usesInheritance: true, ngImport: i0, template: "<div class=\"ax-flex ax-flex-col ax-h-full\">\n <div class=\"scheduler-header\">\n <p>\n {{ current.format('MMMM yyyy') }}\n </p>\n <div class=\"scheduler-actions\">\n <div class=\"ax-flex ax-border ax-rounded-md ax-items-center ax-px-1 ax-gap-0.5 ax-bg-surface\">\n <button class=\"ax-w-8 ax-h-8 ax-rounded-md hover:ax-bg-neutral-100\" (click)=\"_handlePrevClick()\">\n <ax-icon class=\"fa-solid fa-chevron-left\"> </ax-icon>\n </button>\n <ng-container *ngIf=\"_size === 'SM'; else elseTemplate\">\n <span class=\"ax-text-neutral-200\">|</span>\n </ng-container>\n <ng-template #elseTemplate>\n <ax-button look=\"blank\" class=\"ax-sm\" text=\"Today\"> </ax-button>\n </ng-template>\n <button class=\"ax-w-8 ax-h-8 ax-rounded-md hover:ax-bg-neutral-100\" (click)=\"_handleNextClick()\">\n <ax-icon class=\"fa-solid fa-chevron-right\"> </ax-icon>\n </button>\n </div>\n <ax-button [text]=\"_size === 'SM' ? '' : 'Week View'\" class=\"!ax-bg-surface ax-border\">\n <ax-suffix>\n <ax-icon [class]=\"\n _size === 'SM'\n ? 'fa-solid fa-ellipsis-vertical'\n : 'fa-solid fa-chevron-down ax-text-neutral-400'\n \">\n </ax-icon>\n </ax-suffix>\n <ax-dropdown-panel (onItemClick)=\"handleOnItemClick()\" [adaptivityEnabled]=\"true\">\n <ax-button-item *ngIf=\"_size === 'SM' || _size === 'MD'\" text=\"Add Event\" name=\"text\" [divided]=\"true\"\n color=\"primary\">\n </ax-button-item>\n <ax-button-item *ngIf=\"_size === 'SM'\" text=\"Go to Today\" name=\"text\" [divided]=\"true\">\n </ax-button-item>\n <ax-button-item text=\"Day View\" name=\"text\"> </ax-button-item>\n <ax-button-item text=\"Week View\" name=\"text\"> </ax-button-item>\n <ax-button-item text=\"Month View\" name=\"text\"> </ax-button-item>\n <ax-button-item text=\"Year View\" name=\"text\"> </ax-button-item>\n </ax-dropdown-panel>\n <ax-suffix>\n <ax-icon icon=\"\"></ax-icon>\n </ax-suffix>\n </ax-button>\n <ax-button color=\"primary\" text=\"Add Event\" class=\"ax-hidden lg:ax-block\">\n <ax-prefix>\n <ax-icon class=\"fa-solid fa-plus\"></ax-icon>\n </ax-prefix>\n </ax-button>\n </div>\n </div>\n <ax-scheduler-month-view [date]=\"current\"></ax-scheduler-month-view>\n <!-- <ax-scheduler-week-view></ax-scheduler-week-view> -->\n</div>", styles: ["ax-scheduler{height:100%;display:block;border-width:1px;border-radius:.75rem;background-color:rgba(var(--ax-color-neutral-100));overflow:hidden}ax-scheduler .scheduler-header{display:flex;align-items:center;justify-content:space-between;padding:1rem;border-bottom-width:1px}ax-scheduler .scheduler-header p{margin:0;font-size:1rem;font-weight:500}ax-scheduler .scheduler-actions{display:flex;gap:.75rem}ax-scheduler ax-scheduler-month-view{display:flex;flex-direction:column;flex:1 1 auto}ax-scheduler ax-scheduler-month-view .mobile-task:hover ax-button{opacity:1}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "component", type: i2.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i3.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-sub-title, ax-placeholder, ax-overlay" }, { kind: "component", type: i4.AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "component", type: AXSchedulerMonthViewComponent, selector: "ax-scheduler-month-view", inputs: ["date"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
95
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.2", type: AXSchedulerComponent, selector: "ax-scheduler", usesInheritance: true, ngImport: i0, template: "<div class=\"ax-flex ax-flex-col ax-h-full\">\n <div class=\"scheduler-header\">\n <p>\n {{ current.format('MMMM yyyy') }}\n </p>\n <div class=\"scheduler-actions\">\n <div class=\"ax-flex ax-border ax-rounded-md ax-items-center ax-px-1 ax-gap-0.5 ax-bg-surface\">\n <button class=\"ax-w-8 ax-h-8 ax-rounded-md hover:ax-bg-neutral-100\" (click)=\"_handlePrevClick()\">\n <ax-icon class=\"fa-solid fa-chevron-left\"> </ax-icon>\n </button>\n <ng-container *ngIf=\"_size === 'SM'; else elseTemplate\">\n <span class=\"ax-text-neutral-200\">|</span>\n </ng-container>\n <ng-template #elseTemplate>\n <ax-button look=\"blank\" class=\"ax-sm\" text=\"Today\"> </ax-button>\n </ng-template>\n <button class=\"ax-w-8 ax-h-8 ax-rounded-md hover:ax-bg-neutral-100\" (click)=\"_handleNextClick()\">\n <ax-icon class=\"fa-solid fa-chevron-right\"> </ax-icon>\n </button>\n </div>\n <ax-button [text]=\"_size === 'SM' ? '' : 'Week View'\" class=\"!ax-bg-surface ax-border\">\n <ax-suffix>\n <ax-icon [class]=\"\n _size === 'SM'\n ? 'fa-solid fa-ellipsis-vertical'\n : 'fa-solid fa-chevron-down ax-text-neutral-400'\n \">\n </ax-icon>\n </ax-suffix>\n <ax-dropdown-panel (onItemClick)=\"handleOnItemClick()\" [adaptivityEnabled]=\"true\">\n <ax-button-item *ngIf=\"_size === 'SM' || _size === 'MD'\" text=\"Add Event\" name=\"text\" [divided]=\"true\"\n color=\"primary\">\n </ax-button-item>\n <ax-button-item *ngIf=\"_size === 'SM'\" text=\"Go to Today\" name=\"text\" [divided]=\"true\">\n </ax-button-item>\n <ax-button-item text=\"Day View\" name=\"text\"> </ax-button-item>\n <ax-button-item text=\"Week View\" name=\"text\"> </ax-button-item>\n <ax-button-item text=\"Month View\" name=\"text\"> </ax-button-item>\n <ax-button-item text=\"Year View\" name=\"text\"> </ax-button-item>\n </ax-dropdown-panel>\n <ax-suffix>\n <ax-icon icon=\"\"></ax-icon>\n </ax-suffix>\n </ax-button>\n <ax-button color=\"primary\" text=\"Add Event\" class=\"ax-hidden lg:ax-block\">\n <ax-prefix>\n <ax-icon class=\"fa-solid fa-plus\"></ax-icon>\n </ax-prefix>\n </ax-button>\n </div>\n </div>\n <ax-scheduler-month-view [date]=\"current\"></ax-scheduler-month-view>\n <!-- <ax-scheduler-week-view></ax-scheduler-week-view> -->\n</div>", styles: ["ax-scheduler{height:100%;display:block;border-width:1px;border-radius:.75rem;background-color:rgba(var(--ax-color-neutral-100));overflow:hidden}ax-scheduler .scheduler-header{display:flex;align-items:center;justify-content:space-between;padding:1rem;border-bottom-width:1px}ax-scheduler .scheduler-header p{margin:0;font-size:1rem;font-weight:500}ax-scheduler .scheduler-actions{display:flex;gap:.75rem}ax-scheduler ax-scheduler-month-view{display:flex;flex-direction:column;flex:1 1 auto}ax-scheduler ax-scheduler-month-view .mobile-task:hover ax-button{opacity:1}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "responsiveOn", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "responsiveOnChange", "loadingTextChange"] }, { kind: "component", type: i2.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i3.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-sub-title, ax-placeholder, ax-overlay" }, { kind: "component", type: i4.AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "component", type: AXSchedulerMonthViewComponent, selector: "ax-scheduler-month-view", inputs: ["date"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
96
96
|
}
|
97
97
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXSchedulerComponent, decorators: [{
|
98
98
|
type: Component,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-scheduler.mjs","sources":["../../../../libs/components/scheduler/src/lib/scheduler-month-view.component.ts","../../../../libs/components/scheduler/src/lib/scheduler-month-view.component.html","../../../../libs/components/scheduler/src/lib/scheduler-week-view.component.ts","../../../../libs/components/scheduler/src/lib/scheduler-week-view.component.html","../../../../libs/components/scheduler/src/lib/scheduler.component.ts","../../../../libs/components/scheduler/src/lib/scheduler.component.html","../../../../libs/components/scheduler/src/lib/scheduler.module.ts","../../../../libs/components/scheduler/src/acorex-components-scheduler.ts"],"sourcesContent":["import { MXBaseComponent } from '@acorex/components/common';\nimport { AXDateTime, AXDateTimeRange } from '@acorex/core/date-time';\nimport { AXPlatform } from '@acorex/core/platform';\nimport { ChangeDetectionStrategy, Component, Input, ViewEncapsulation, inject } from '@angular/core';\n\n@Component({\n selector: 'ax-scheduler-month-view',\n templateUrl: './scheduler-month-view.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXSchedulerMonthViewComponent extends MXBaseComponent {\n private _platform = inject(AXPlatform);\n\n protected _slots: {\n date: AXDateTime;\n cssClass: { [key: string]: boolean };\n isToday: boolean;\n }[] = [];\n protected get dayNames(): string[] {\n return this._platform.is('SM') ? [] : [];\n }\n\n private _date: AXDateTime;\n @Input()\n public get date(): AXDateTime {\n return this._date;\n }\n public set date(v: AXDateTime) {\n this._date = v;\n this.generateSlots();\n }\n\n override ngOnInit() {\n super.ngOnInit();\n this.generateSlots();\n this._platform.resize.subscribe((c) => {\n this.cdr.markForCheck();\n });\n }\n\n generateSlots() {\n const startDate = this.date.startOf('month').startOf('week');\n const endDate = this.date.endOf('month').endOf('week');\n const range = new AXDateTimeRange(startDate, endDate).enumurate('day');\n this._slots = range.map((c: AXDateTime) => ({\n date: c,\n cssClass: {\n '!ax-bg-neutral-100': c.monthOfYear != this.date.monthOfYear,\n },\n isToday: c.dayOfYear == this.date.dayOfYear,\n }));\n }\n}\n","<!-- <div class=\"ax-flex ax-flex-col ax-flex-auto ax-shadow-md\"> -->\n<div class=\"ax-grid ax-grid-cols-7 ax-gap-[1px] ax-w-full ax-bg-neutral-200 ax-border-b\">\n <ng-container *ngFor=\"let item of dayNames\">\n <div class=\"ax-flex ax-items-center ax-justify-center ax-py-2 ax-bg-white ax-font-medium\">\n {{item}}\n </div>\n </ng-container>\n</div>\n<div class=\"ax-flex ax-flex-auto ax-bg-neutral-200\">\n <div class=\"ax-grid ax-grid-cols-7 ax-gap-[1px] ax-w-full\">\n <ng-container *ngFor=\"let item of _slots\">\n <div class=\"ax-py-2 ax-px-3 ax-bg-white ax-cursor-pointer hover:ax-bg-neutral-100\n ax-flex ax-flex-col ax-justify-between\" [ngClass]=\"item.cssClass\">\n <time class=\"ax-text-sm ax-flex ax-items-center ax-justify-center ax-rounded-full ax-w-6 ax-h-6\"\n [class.ax-bg-primary-500]=\"item.isToday\" [class.ax-text-white]=\"item.isToday\"\n datetime=\"item.date.format('dd')\">{{item.date.format('d')}}</time>\n <ol class=\"ax-mt-2 ax-hidden lg:ax-flex ax-flex-col ax-gap-1\">\n <li *ngIf=\"item.date.dayOfMonth % 6 === 0\">\n <a href=\"#\"\n class=\"ax-flex ax-justify-between ax-text-sm ax-bg-primary-500 ax-py-1 ax-px-2 ax-rounded ax-text-primary-fore\">\n <p class=\"ax-text-sm\">Launch Time</p>\n <time class=\"ax-ms-3\" datetime=\"item.date.format('HH A')\">\n {{item.date.format('hh A')}}\n </time>\n </a>\n </li>\n <li *ngIf=\"item.date.dayOfMonth % 5 === 0\">\n <a href=\"#\"\n class=\"ax-flex ax-justify-between ax-text-sm ax-bg-success-500 ax-py-1 ax-px-2 ax-rounded ax-text-success-fore\">\n <p class=\"ax-text-sm\">Daily meeting</p>\n <time class=\"ax-ms-3\" datetime=\"item.date.format('HH A')\">\n {{item.date.format('hh A')}}\n </time>\n </a>\n </li>\n </ol>\n <ol class=\"ax-flex ax-gap-1 ax-self-center md:ax-hidden\">\n <li *ngIf=\"item.date.dayOfMonth % 5 === 0\">\n <span class=\"ax-flex ax-w-1.5 ax-h-1.5 ax-rounded-full ax-bg-primary-500 lg:ax-hidden\"></span>\n </li>\n <li *ngIf=\"item.date.dayOfMonth % 6 === 0\">\n <span class=\"ax-flex ax-w-1.5 ax-h-1.5 ax-rounded-full ax-bg-danger-500 lg:ax-hidden\"></span>\n </li>\n <li *ngIf=\"item.date.dayOfMonth % 8 === 0\">\n <span class=\"ax-flex ax-w-1.5 ax-h-1.5 ax-rounded-full ax-bg-warning-500 lg:ax-hidden\"></span>\n </li>\n <li *ngIf=\"item.date.dayOfMonth % 3 === 0\">\n <span class=\"ax-flex ax-w-1.5 ax-h-1.5 ax-rounded-full ax-bg-success-500 lg:ax-hidden\"></span>\n </li>\n </ol>\n </div>\n </ng-container>\n </div>\n</div>\n<!-- </div> -->\n<div class=\"ax-p-4 lg:ax-hidden\">\n <ol\n class=\"ax-flex ax-flex-col ax-rounded-lg ax-border ax-bg-surface ax-divide-y ax-overflow-hidden ax-cursor-pointer\">\n <li class=\"ax-flex ax-items-start ax-justify-between ax-p-4 hover:ax-bg-neutral-100 mobile-task\">\n <div class=\"ax-flex ax-flex-col ax-gap-2\">\n <p class=\"ax-font-medium\">Daily Meeting at the Office</p>\n <div class=\"ax-flex ax-gap-2 ax-items-center\">\n <ax-icon class=\"fa-solid fa-clock ax-text-neutral-400\"></ax-icon>\n <p class=\"ax-text-sm\">3 PM</p>\n </div>\n </div>\n <ax-button text=\"Edit\" class=\"!ax-bg-surface ax-border ax-sm ax-opacity-0\"></ax-button>\n </li>\n </ol>\n</div>","import { MXBaseComponent } from '@acorex/components/common';\nimport { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'ax-scheduler-week-view',\n templateUrl: './scheduler-week-view.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXSchedulerWeekViewComponent extends MXBaseComponent {}\n","<div class=\"ax-flex ax-flex-col ax-flex-auto ax-isolate ax-overflow-auto ax-bg-white\">\n <div class=\"ax-flex ax-flex-col ax-max-w-full\">\n <div class=\"ax-shadow-md ax-pr-8 ax-z-30 ax-sticky ax-top-0\">\n <div class=\"ax-grid ax-leading-6 ax-border-r ax-grid-cols-7\">\n <div class=\"ax-w-14 ax-col-end-1\"></div>\n <div\n class=\"ax-flex ax-items-center ax-justify-center ax-py-3 ax-bg-white ax-font-medium ax-border-l ax-border-r\">\n Mon 10\n </div>\n <div class=\"ax-flex ax-items-center ax-justify-center ax-py-3 ax-bg-white ax-font-medium ax-border-r\">\n Mon 10\n </div>\n <div class=\"ax-flex ax-items-center ax-justify-center ax-py-3 ax-bg-white ax-font-medium ax-border-r\">\n Mon 10\n </div>\n <div class=\"ax-flex ax-items-center ax-justify-center ax-py-3 ax-bg-white ax-font-medium ax-border-r\">\n Mon 10\n </div>\n <div class=\"ax-flex ax-items-center ax-justify-center ax-py-3 ax-bg-white ax-font-medium ax-border-r\">\n Mon 10\n </div>\n <div class=\"ax-flex ax-items-center ax-justify-center ax-py-3 ax-bg-white ax-font-medium ax-border-r\">\n Mon 10\n </div>\n <div class=\"ax-flex ax-items-center ax-justify-center ax-py-3 ax-bg-white ax-font-medium\">\n Mon 10\n </div>\n </div>\n </div>\n <div class=\"ax-flex ax-flex-auto\">\n <div class=\"ax-w-14 ax-z-10 ax-sticky ax-left-0 ax-bg-white ax-shadow\"></div>\n <div class=\"ax-grid ax-flex-auto ax-grid-cols-1 ax-grid-rows-1\">\n <div class=\"ax-grid ax-col-start-1 ax-col-end-2 ax-row-start-1\"\n style=\"grid-template-rows: repeat(45, minmax(3.5rem, 1fr))\">\n <div class=\"ax-row-end-1 ax-h-7\"></div>\n <div class=\"ax-border-t ax-border-b\">\n <div class=\"ax-leading-5 ax-text-right ax-w-14 -ax-mt-[0.625rem] -ax-ml-14 ax-sticky ax-left-0\">\n </div>\n </div>\n </div>\n <div class=\"ax-grid ax-grid-rows-1 ax-grid-cols-7 ax-row-start-1 ax-col-end-2 ax-col-start-1\">\n <div class=\"ax-col-start-1 ax-row-start-1 ax-row-end-[-1]\"></div>\n <div class=\"ax-col-start-2 ax-row-start-1 ax-row-end-[-1] ax-border-l\"></div>\n <div class=\"ax-col-start-3 ax-row-start-1 ax-row-end-[-1] ax-border-l\"></div>\n <div class=\"ax-col-start-4 ax-row-start-1 ax-row-end-[-1] ax-border-l\"></div>\n <div class=\"ax-col-start-5 ax-row-start-1 ax-row-end-[-1] ax-border-l\"></div>\n <div class=\"ax-col-start-6 ax-row-start-1 ax-row-end-[-1] ax-border-l\"></div>\n <div class=\"ax-col-start-7 ax-row-start-1 ax-row-end-[-1] ax-border-l\"></div>\n <div class=\"ax-col-start-8 ax-row-start-1 ax-row-end-[-1] ax-border-l ax-w-8\"></div>\n </div>\n <ol class=\"ax-grid ax-pr-8 ax-grid-cols-7 ax-row-start-1 ax-col-end-2 ax-col-start-2\"\n style=\"grid-template-rows: 1.75rem repeat(288, minmax(0px, 1fr)) auto\"></ol>\n </div>\n </div>\n </div>\n</div>","import { MXBaseComponent } from '@acorex/components/common';\nimport { AXCalendarService, AXDateTime } from '@acorex/core/date-time';\nimport { AXPlatform, AXScreenSizes } from '@acorex/core/platform';\nimport { ChangeDetectionStrategy, Component, ViewEncapsulation, inject } from '@angular/core';\n\n@Component({\n selector: 'ax-scheduler',\n templateUrl: './scheduler.component.html',\n styleUrls: ['./scheduler.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXSchedulerComponent extends MXBaseComponent {\n private _calendarService: AXCalendarService = inject(AXCalendarService);\n protected _platform: AXPlatform = inject(AXPlatform);\n protected current: AXDateTime = this._calendarService.now();\n\n protected _size: AXScreenSizes;\n\n handleOnItemClick() {}\n\n override ngOnInit(): void {\n super.ngOnInit();\n this.detectSize();\n this._platform.resize.subscribe(() => {\n this.detectSize();\n super.cdr.markForCheck();\n });\n }\n\n private detectSize() {\n this._size = this._platform.screenSize;\n }\n\n _handleNextClick() {\n this.current = this.current.add('month', 1);\n }\n\n _handlePrevClick() {\n this.current = this.current.add('month', -1);\n }\n}\n","<div class=\"ax-flex ax-flex-col ax-h-full\">\n <div class=\"scheduler-header\">\n <p>\n {{ current.format('MMMM yyyy') }}\n </p>\n <div class=\"scheduler-actions\">\n <div class=\"ax-flex ax-border ax-rounded-md ax-items-center ax-px-1 ax-gap-0.5 ax-bg-surface\">\n <button class=\"ax-w-8 ax-h-8 ax-rounded-md hover:ax-bg-neutral-100\" (click)=\"_handlePrevClick()\">\n <ax-icon class=\"fa-solid fa-chevron-left\"> </ax-icon>\n </button>\n <ng-container *ngIf=\"_size === 'SM'; else elseTemplate\">\n <span class=\"ax-text-neutral-200\">|</span>\n </ng-container>\n <ng-template #elseTemplate>\n <ax-button look=\"blank\" class=\"ax-sm\" text=\"Today\"> </ax-button>\n </ng-template>\n <button class=\"ax-w-8 ax-h-8 ax-rounded-md hover:ax-bg-neutral-100\" (click)=\"_handleNextClick()\">\n <ax-icon class=\"fa-solid fa-chevron-right\"> </ax-icon>\n </button>\n </div>\n <ax-button [text]=\"_size === 'SM' ? '' : 'Week View'\" class=\"!ax-bg-surface ax-border\">\n <ax-suffix>\n <ax-icon [class]=\"\n _size === 'SM'\n ? 'fa-solid fa-ellipsis-vertical'\n : 'fa-solid fa-chevron-down ax-text-neutral-400'\n \">\n </ax-icon>\n </ax-suffix>\n <ax-dropdown-panel (onItemClick)=\"handleOnItemClick()\" [adaptivityEnabled]=\"true\">\n <ax-button-item *ngIf=\"_size === 'SM' || _size === 'MD'\" text=\"Add Event\" name=\"text\" [divided]=\"true\"\n color=\"primary\">\n </ax-button-item>\n <ax-button-item *ngIf=\"_size === 'SM'\" text=\"Go to Today\" name=\"text\" [divided]=\"true\">\n </ax-button-item>\n <ax-button-item text=\"Day View\" name=\"text\"> </ax-button-item>\n <ax-button-item text=\"Week View\" name=\"text\"> </ax-button-item>\n <ax-button-item text=\"Month View\" name=\"text\"> </ax-button-item>\n <ax-button-item text=\"Year View\" name=\"text\"> </ax-button-item>\n </ax-dropdown-panel>\n <ax-suffix>\n <ax-icon icon=\"\"></ax-icon>\n </ax-suffix>\n </ax-button>\n <ax-button color=\"primary\" text=\"Add Event\" class=\"ax-hidden lg:ax-block\">\n <ax-prefix>\n <ax-icon class=\"fa-solid fa-plus\"></ax-icon>\n </ax-prefix>\n </ax-button>\n </div>\n </div>\n <ax-scheduler-month-view [date]=\"current\"></ax-scheduler-month-view>\n <!-- <ax-scheduler-week-view></ax-scheduler-week-view> -->\n</div>","import { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXDropdownModule } from '@acorex/components/dropdown';\nimport { AXDateTimeModule } from '@acorex/core/date-time';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXSchedulerMonthViewComponent } from './scheduler-month-view.component';\nimport { AXSchedulerWeekViewComponent } from './scheduler-week-view.component';\nimport { AXSchedulerComponent } from './scheduler.component';\n\nconst COMPONENT = [AXSchedulerComponent, AXSchedulerMonthViewComponent, AXSchedulerWeekViewComponent];\nconst MODULES = [CommonModule, AXButtonModule, AXDecoratorModule, AXDropdownModule, AXDateTimeModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXSchedulerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i5.AXSchedulerMonthViewComponent"],"mappings":";;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A,CAAA,CAAA,EAAA;AASvF,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAJf,OAAO,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAIT,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAN7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,GAAG,SAAS,CAAC;AAC5B,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACrB,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA,CAAA;;;AClBD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-components-scheduler.mjs","sources":["../../../../libs/components/scheduler/src/lib/scheduler-month-view.component.ts","../../../../libs/components/scheduler/src/lib/scheduler-month-view.component.html","../../../../libs/components/scheduler/src/lib/scheduler-week-view.component.ts","../../../../libs/components/scheduler/src/lib/scheduler-week-view.component.html","../../../../libs/components/scheduler/src/lib/scheduler.component.ts","../../../../libs/components/scheduler/src/lib/scheduler.component.html","../../../../libs/components/scheduler/src/lib/scheduler.module.ts","../../../../libs/components/scheduler/src/acorex-components-scheduler.ts"],"sourcesContent":["import { MXBaseComponent } from '@acorex/components/common';\nimport { AXDateTime, AXDateTimeRange } from '@acorex/core/date-time';\nimport { AXPlatform } from '@acorex/core/platform';\nimport { ChangeDetectionStrategy, Component, Input, ViewEncapsulation, inject } from '@angular/core';\n\n@Component({\n selector: 'ax-scheduler-month-view',\n templateUrl: './scheduler-month-view.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXSchedulerMonthViewComponent extends MXBaseComponent {\n private _platform = inject(AXPlatform);\n\n protected _slots: {\n date: AXDateTime;\n cssClass: { [key: string]: boolean };\n isToday: boolean;\n }[] = [];\n protected get dayNames(): string[] {\n return this._platform.is('SM') ? [] : [];\n }\n\n private _date: AXDateTime;\n @Input()\n public get date(): AXDateTime {\n return this._date;\n }\n public set date(v: AXDateTime) {\n this._date = v;\n this.generateSlots();\n }\n\n override ngOnInit() {\n super.ngOnInit();\n this.generateSlots();\n this._platform.resize.subscribe((c) => {\n this.cdr.markForCheck();\n });\n }\n\n generateSlots() {\n const startDate = this.date.startOf('month').startOf('week');\n const endDate = this.date.endOf('month').endOf('week');\n const range = new AXDateTimeRange(startDate, endDate).enumurate('day');\n this._slots = range.map((c: AXDateTime) => ({\n date: c,\n cssClass: {\n '!ax-bg-neutral-100': c.monthOfYear != this.date.monthOfYear,\n },\n isToday: c.dayOfYear == this.date.dayOfYear,\n }));\n }\n}\n","<!-- <div class=\"ax-flex ax-flex-col ax-flex-auto ax-shadow-md\"> -->\n<div class=\"ax-grid ax-grid-cols-7 ax-gap-[1px] ax-w-full ax-bg-neutral-200 ax-border-b\">\n <ng-container *ngFor=\"let item of dayNames\">\n <div class=\"ax-flex ax-items-center ax-justify-center ax-py-2 ax-bg-white ax-font-medium\">\n {{item}}\n </div>\n </ng-container>\n</div>\n<div class=\"ax-flex ax-flex-auto ax-bg-neutral-200\">\n <div class=\"ax-grid ax-grid-cols-7 ax-gap-[1px] ax-w-full\">\n <ng-container *ngFor=\"let item of _slots\">\n <div class=\"ax-py-2 ax-px-3 ax-bg-white ax-cursor-pointer hover:ax-bg-neutral-100\n ax-flex ax-flex-col ax-justify-between\" [ngClass]=\"item.cssClass\">\n <time class=\"ax-text-sm ax-flex ax-items-center ax-justify-center ax-rounded-full ax-w-6 ax-h-6\"\n [class.ax-bg-primary-500]=\"item.isToday\" [class.ax-text-white]=\"item.isToday\"\n datetime=\"item.date.format('dd')\">{{item.date.format('d')}}</time>\n <ol class=\"ax-mt-2 ax-hidden lg:ax-flex ax-flex-col ax-gap-1\">\n <li *ngIf=\"item.date.dayOfMonth % 6 === 0\">\n <a href=\"#\"\n class=\"ax-flex ax-justify-between ax-text-sm ax-bg-primary-500 ax-py-1 ax-px-2 ax-rounded ax-text-primary-fore\">\n <p class=\"ax-text-sm\">Launch Time</p>\n <time class=\"ax-ms-3\" datetime=\"item.date.format('HH A')\">\n {{item.date.format('hh A')}}\n </time>\n </a>\n </li>\n <li *ngIf=\"item.date.dayOfMonth % 5 === 0\">\n <a href=\"#\"\n class=\"ax-flex ax-justify-between ax-text-sm ax-bg-success-500 ax-py-1 ax-px-2 ax-rounded ax-text-success-fore\">\n <p class=\"ax-text-sm\">Daily meeting</p>\n <time class=\"ax-ms-3\" datetime=\"item.date.format('HH A')\">\n {{item.date.format('hh A')}}\n </time>\n </a>\n </li>\n </ol>\n <ol class=\"ax-flex ax-gap-1 ax-self-center md:ax-hidden\">\n <li *ngIf=\"item.date.dayOfMonth % 5 === 0\">\n <span class=\"ax-flex ax-w-1.5 ax-h-1.5 ax-rounded-full ax-bg-primary-500 lg:ax-hidden\"></span>\n </li>\n <li *ngIf=\"item.date.dayOfMonth % 6 === 0\">\n <span class=\"ax-flex ax-w-1.5 ax-h-1.5 ax-rounded-full ax-bg-danger-500 lg:ax-hidden\"></span>\n </li>\n <li *ngIf=\"item.date.dayOfMonth % 8 === 0\">\n <span class=\"ax-flex ax-w-1.5 ax-h-1.5 ax-rounded-full ax-bg-warning-500 lg:ax-hidden\"></span>\n </li>\n <li *ngIf=\"item.date.dayOfMonth % 3 === 0\">\n <span class=\"ax-flex ax-w-1.5 ax-h-1.5 ax-rounded-full ax-bg-success-500 lg:ax-hidden\"></span>\n </li>\n </ol>\n </div>\n </ng-container>\n </div>\n</div>\n<!-- </div> -->\n<div class=\"ax-p-4 lg:ax-hidden\">\n <ol\n class=\"ax-flex ax-flex-col ax-rounded-lg ax-border ax-bg-surface ax-divide-y ax-overflow-hidden ax-cursor-pointer\">\n <li class=\"ax-flex ax-items-start ax-justify-between ax-p-4 hover:ax-bg-neutral-100 mobile-task\">\n <div class=\"ax-flex ax-flex-col ax-gap-2\">\n <p class=\"ax-font-medium\">Daily Meeting at the Office</p>\n <div class=\"ax-flex ax-gap-2 ax-items-center\">\n <ax-icon class=\"fa-solid fa-clock ax-text-neutral-400\"></ax-icon>\n <p class=\"ax-text-sm\">3 PM</p>\n </div>\n </div>\n <ax-button text=\"Edit\" class=\"!ax-bg-surface ax-border ax-sm ax-opacity-0\"></ax-button>\n </li>\n </ol>\n</div>","import { MXBaseComponent } from '@acorex/components/common';\nimport { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'ax-scheduler-week-view',\n templateUrl: './scheduler-week-view.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXSchedulerWeekViewComponent extends MXBaseComponent {}\n","<div class=\"ax-flex ax-flex-col ax-flex-auto ax-isolate ax-overflow-auto ax-bg-white\">\n <div class=\"ax-flex ax-flex-col ax-max-w-full\">\n <div class=\"ax-shadow-md ax-pr-8 ax-z-30 ax-sticky ax-top-0\">\n <div class=\"ax-grid ax-leading-6 ax-border-r ax-grid-cols-7\">\n <div class=\"ax-w-14 ax-col-end-1\"></div>\n <div\n class=\"ax-flex ax-items-center ax-justify-center ax-py-3 ax-bg-white ax-font-medium ax-border-l ax-border-r\">\n Mon 10\n </div>\n <div class=\"ax-flex ax-items-center ax-justify-center ax-py-3 ax-bg-white ax-font-medium ax-border-r\">\n Mon 10\n </div>\n <div class=\"ax-flex ax-items-center ax-justify-center ax-py-3 ax-bg-white ax-font-medium ax-border-r\">\n Mon 10\n </div>\n <div class=\"ax-flex ax-items-center ax-justify-center ax-py-3 ax-bg-white ax-font-medium ax-border-r\">\n Mon 10\n </div>\n <div class=\"ax-flex ax-items-center ax-justify-center ax-py-3 ax-bg-white ax-font-medium ax-border-r\">\n Mon 10\n </div>\n <div class=\"ax-flex ax-items-center ax-justify-center ax-py-3 ax-bg-white ax-font-medium ax-border-r\">\n Mon 10\n </div>\n <div class=\"ax-flex ax-items-center ax-justify-center ax-py-3 ax-bg-white ax-font-medium\">\n Mon 10\n </div>\n </div>\n </div>\n <div class=\"ax-flex ax-flex-auto\">\n <div class=\"ax-w-14 ax-z-10 ax-sticky ax-left-0 ax-bg-white ax-shadow\"></div>\n <div class=\"ax-grid ax-flex-auto ax-grid-cols-1 ax-grid-rows-1\">\n <div class=\"ax-grid ax-col-start-1 ax-col-end-2 ax-row-start-1\"\n style=\"grid-template-rows: repeat(45, minmax(3.5rem, 1fr))\">\n <div class=\"ax-row-end-1 ax-h-7\"></div>\n <div class=\"ax-border-t ax-border-b\">\n <div class=\"ax-leading-5 ax-text-right ax-w-14 -ax-mt-[0.625rem] -ax-ml-14 ax-sticky ax-left-0\">\n </div>\n </div>\n </div>\n <div class=\"ax-grid ax-grid-rows-1 ax-grid-cols-7 ax-row-start-1 ax-col-end-2 ax-col-start-1\">\n <div class=\"ax-col-start-1 ax-row-start-1 ax-row-end-[-1]\"></div>\n <div class=\"ax-col-start-2 ax-row-start-1 ax-row-end-[-1] ax-border-l\"></div>\n <div class=\"ax-col-start-3 ax-row-start-1 ax-row-end-[-1] ax-border-l\"></div>\n <div class=\"ax-col-start-4 ax-row-start-1 ax-row-end-[-1] ax-border-l\"></div>\n <div class=\"ax-col-start-5 ax-row-start-1 ax-row-end-[-1] ax-border-l\"></div>\n <div class=\"ax-col-start-6 ax-row-start-1 ax-row-end-[-1] ax-border-l\"></div>\n <div class=\"ax-col-start-7 ax-row-start-1 ax-row-end-[-1] ax-border-l\"></div>\n <div class=\"ax-col-start-8 ax-row-start-1 ax-row-end-[-1] ax-border-l ax-w-8\"></div>\n </div>\n <ol class=\"ax-grid ax-pr-8 ax-grid-cols-7 ax-row-start-1 ax-col-end-2 ax-col-start-2\"\n style=\"grid-template-rows: 1.75rem repeat(288, minmax(0px, 1fr)) auto\"></ol>\n </div>\n </div>\n </div>\n</div>","import { MXBaseComponent } from '@acorex/components/common';\nimport { AXCalendarService, AXDateTime } from '@acorex/core/date-time';\nimport { AXPlatform, AXScreenSizes } from '@acorex/core/platform';\nimport { ChangeDetectionStrategy, Component, ViewEncapsulation, inject } from '@angular/core';\n\n@Component({\n selector: 'ax-scheduler',\n templateUrl: './scheduler.component.html',\n styleUrls: ['./scheduler.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXSchedulerComponent extends MXBaseComponent {\n private _calendarService: AXCalendarService = inject(AXCalendarService);\n protected _platform: AXPlatform = inject(AXPlatform);\n protected current: AXDateTime = this._calendarService.now();\n\n protected _size: AXScreenSizes;\n\n handleOnItemClick() {}\n\n override ngOnInit(): void {\n super.ngOnInit();\n this.detectSize();\n this._platform.resize.subscribe(() => {\n this.detectSize();\n super.cdr.markForCheck();\n });\n }\n\n private detectSize() {\n this._size = this._platform.screenSize;\n }\n\n _handleNextClick() {\n this.current = this.current.add('month', 1);\n }\n\n _handlePrevClick() {\n this.current = this.current.add('month', -1);\n }\n}\n","<div class=\"ax-flex ax-flex-col ax-h-full\">\n <div class=\"scheduler-header\">\n <p>\n {{ current.format('MMMM yyyy') }}\n </p>\n <div class=\"scheduler-actions\">\n <div class=\"ax-flex ax-border ax-rounded-md ax-items-center ax-px-1 ax-gap-0.5 ax-bg-surface\">\n <button class=\"ax-w-8 ax-h-8 ax-rounded-md hover:ax-bg-neutral-100\" (click)=\"_handlePrevClick()\">\n <ax-icon class=\"fa-solid fa-chevron-left\"> </ax-icon>\n </button>\n <ng-container *ngIf=\"_size === 'SM'; else elseTemplate\">\n <span class=\"ax-text-neutral-200\">|</span>\n </ng-container>\n <ng-template #elseTemplate>\n <ax-button look=\"blank\" class=\"ax-sm\" text=\"Today\"> </ax-button>\n </ng-template>\n <button class=\"ax-w-8 ax-h-8 ax-rounded-md hover:ax-bg-neutral-100\" (click)=\"_handleNextClick()\">\n <ax-icon class=\"fa-solid fa-chevron-right\"> </ax-icon>\n </button>\n </div>\n <ax-button [text]=\"_size === 'SM' ? '' : 'Week View'\" class=\"!ax-bg-surface ax-border\">\n <ax-suffix>\n <ax-icon [class]=\"\n _size === 'SM'\n ? 'fa-solid fa-ellipsis-vertical'\n : 'fa-solid fa-chevron-down ax-text-neutral-400'\n \">\n </ax-icon>\n </ax-suffix>\n <ax-dropdown-panel (onItemClick)=\"handleOnItemClick()\" [adaptivityEnabled]=\"true\">\n <ax-button-item *ngIf=\"_size === 'SM' || _size === 'MD'\" text=\"Add Event\" name=\"text\" [divided]=\"true\"\n color=\"primary\">\n </ax-button-item>\n <ax-button-item *ngIf=\"_size === 'SM'\" text=\"Go to Today\" name=\"text\" [divided]=\"true\">\n </ax-button-item>\n <ax-button-item text=\"Day View\" name=\"text\"> </ax-button-item>\n <ax-button-item text=\"Week View\" name=\"text\"> </ax-button-item>\n <ax-button-item text=\"Month View\" name=\"text\"> </ax-button-item>\n <ax-button-item text=\"Year View\" name=\"text\"> </ax-button-item>\n </ax-dropdown-panel>\n <ax-suffix>\n <ax-icon icon=\"\"></ax-icon>\n </ax-suffix>\n </ax-button>\n <ax-button color=\"primary\" text=\"Add Event\" class=\"ax-hidden lg:ax-block\">\n <ax-prefix>\n <ax-icon class=\"fa-solid fa-plus\"></ax-icon>\n </ax-prefix>\n </ax-button>\n </div>\n </div>\n <ax-scheduler-month-view [date]=\"current\"></ax-scheduler-month-view>\n <!-- <ax-scheduler-week-view></ax-scheduler-week-view> -->\n</div>","import { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXDropdownModule } from '@acorex/components/dropdown';\nimport { AXDateTimeModule } from '@acorex/core/date-time';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXSchedulerMonthViewComponent } from './scheduler-month-view.component';\nimport { AXSchedulerWeekViewComponent } from './scheduler-week-view.component';\nimport { AXSchedulerComponent } from './scheduler.component';\n\nconst COMPONENT = [AXSchedulerComponent, AXSchedulerMonthViewComponent, AXSchedulerWeekViewComponent];\nconst MODULES = [CommonModule, AXButtonModule, AXDecoratorModule, AXDropdownModule, AXDateTimeModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXSchedulerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i5.AXSchedulerMonthViewComponent"],"mappings":";;;;;;;;;;;;;;AAWM,MAAO,6BAA8B,SAAQ,eAAe,CAAA;AANlE,IAAA,WAAA,GAAA;;AAOU,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;QAE7B,IAAM,CAAA,MAAA,GAIV,EAAE,CAAC;AAmCV,KAAA;AAlCC,IAAA,IAAc,QAAQ,GAAA;AACpB,QAAA,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC;KAC1C;AAGD,IAAA,IACW,IAAI,GAAA;QACb,OAAO,IAAI,CAAC,KAAK,CAAC;KACnB;IACD,IAAW,IAAI,CAAC,CAAa,EAAA;AAC3B,QAAA,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;QACf,IAAI,CAAC,aAAa,EAAE,CAAC;KACtB;IAEQ,QAAQ,GAAA;QACf,KAAK,CAAC,QAAQ,EAAE,CAAC;QACjB,IAAI,CAAC,aAAa,EAAE,CAAC;QACrB,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,KAAI;AACpC,YAAA,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC;AAC1B,SAAC,CAAC,CAAC;KACJ;IAED,aAAa,GAAA;AACX,QAAA,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;AAC7D,QAAA,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,K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,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;+GAAjB,iBAAiB,EAAA,YAAA,EAAA,CATX,oBAAoB,EAAE,6BAA6B,EAAE,4BAA4B,CAAA,EAAA,OAAA,EAAA,CACnF,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,gBAAgB,aADjF,oBAAoB,EAAE,6BAA6B,EAAE,4BAA4B,CAAA,EAAA,CAAA,CAAA,EAAA;AASvF,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAJf,OAAO,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAIT,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAN7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,GAAG,SAAS,CAAC;AAC5B,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACrB,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA,CAAA;;;AClBD;;AAEG;;;;"}
|
@@ -5,7 +5,7 @@ import { AXDecoratorModule } from '@acorex/components/decorators';
|
|
5
5
|
import * as i3 from '@acorex/components/select-box';
|
6
6
|
import { AXSelectBoxModule } from '@acorex/components/select-box';
|
7
7
|
import * as i0 from '@angular/core';
|
8
|
-
import { signal, Injectable, inject, afterNextRender, Component, ViewEncapsulation, output, NgModule } from '@angular/core';
|
8
|
+
import { signal, Injectable, inject, afterNextRender, Component, ViewEncapsulation, output, input, effect, HostBinding, NgModule } from '@angular/core';
|
9
9
|
import * as i4 from '@angular/forms';
|
10
10
|
import { FormsModule } from '@angular/forms';
|
11
11
|
import { AXWysiwyg } from '@acorex/cdk/wysiwyg';
|
@@ -20,6 +20,7 @@ import { AXTextBoxModule } from '@acorex/components/text-box';
|
|
20
20
|
class AXWysiwygService {
|
21
21
|
constructor() {
|
22
22
|
this.wysiwyg = signal(null);
|
23
|
+
this.currentSelectedElemArray = signal([]);
|
23
24
|
}
|
24
25
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXWysiwygService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
25
26
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXWysiwygService }); }
|
@@ -35,7 +36,7 @@ class AXWysiwygContainerComponent extends MXBaseComponent {
|
|
35
36
|
this.view = signal(null);
|
36
37
|
this.service = inject(AXWysiwygService);
|
37
38
|
afterNextRender(() => {
|
38
|
-
this.view.set(this.getHostElement().querySelector('ax-
|
39
|
+
this.view.set(this.getHostElement().querySelector('.ax-editor-wrapper'));
|
39
40
|
this.wysiwyg.set(new AXWysiwyg(this.view(), {
|
40
41
|
placeholder: 'Write Your Message ...',
|
41
42
|
}));
|
@@ -51,19 +52,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImpor
|
|
51
52
|
}], ctorParameters: () => [] });
|
52
53
|
|
53
54
|
class AXWysiwygToolbarComponent {
|
54
|
-
submitLink() {
|
55
|
-
this.wysiwyg().addImage(this.textBoxOptions.text);
|
56
|
-
}
|
57
55
|
constructor() {
|
58
56
|
this.outputHTML = output();
|
59
57
|
this.service = inject(AXWysiwygService);
|
58
|
+
this.config = input({
|
59
|
+
bold: true,
|
60
|
+
undo: true,
|
61
|
+
redo: true,
|
62
|
+
italic: true,
|
63
|
+
underLine: true,
|
64
|
+
strike: true,
|
65
|
+
color: true,
|
66
|
+
highlight: true,
|
67
|
+
fontSize: true,
|
68
|
+
list: true,
|
69
|
+
alignment: true,
|
70
|
+
image: true,
|
71
|
+
});
|
60
72
|
this.wysiwyg = signal(null);
|
61
73
|
this.boldState = signal(false);
|
62
74
|
this.italicState = signal(false);
|
63
75
|
this.underLineState = signal(false);
|
64
76
|
this.strikeLineState = signal(false);
|
65
|
-
this.
|
66
|
-
this.unOrderListState = signal('');
|
77
|
+
this.listState = signal('');
|
67
78
|
this.alignState = signal('');
|
68
79
|
this.selectedFont = 'medium';
|
69
80
|
this.selectedColor = '';
|
@@ -98,10 +109,43 @@ class AXWysiwygToolbarComponent {
|
|
98
109
|
placeholder: 'Enter yor url ...',
|
99
110
|
size: 'ax-sm',
|
100
111
|
};
|
112
|
+
effect(() => {
|
113
|
+
this.wysiwyg().bold(false);
|
114
|
+
this.boldState.set(false);
|
115
|
+
this.wysiwyg().italic(false);
|
116
|
+
this.italicState.set(false);
|
117
|
+
this.wysiwyg().strike(false);
|
118
|
+
this.strikeLineState.set(false);
|
119
|
+
this.wysiwyg().underLine(false);
|
120
|
+
this.underLineState.set(false);
|
121
|
+
this.service.currentSelectedElemArray().forEach((item) => {
|
122
|
+
switch (item) {
|
123
|
+
case 'U':
|
124
|
+
this.wysiwyg().underLine(true);
|
125
|
+
this.underLineState.set(true);
|
126
|
+
break;
|
127
|
+
case 'S':
|
128
|
+
this.wysiwyg().strike(true);
|
129
|
+
this.strikeLineState.set(true);
|
130
|
+
break;
|
131
|
+
case 'EM':
|
132
|
+
this.wysiwyg().italic(true);
|
133
|
+
this.italicState.set(true);
|
134
|
+
break;
|
135
|
+
case 'STRONG':
|
136
|
+
this.wysiwyg().bold(true);
|
137
|
+
this.boldState.set(true);
|
138
|
+
break;
|
139
|
+
}
|
140
|
+
});
|
141
|
+
}, { allowSignalWrites: true });
|
101
142
|
afterNextRender(() => {
|
102
143
|
this.wysiwyg.set(this.service.wysiwyg());
|
103
144
|
});
|
104
145
|
}
|
146
|
+
submitLink() {
|
147
|
+
this.wysiwyg().addImage(this.textBoxOptions.text);
|
148
|
+
}
|
105
149
|
changeColorHandler(e) {
|
106
150
|
this.selectedColor = e;
|
107
151
|
this.wysiwyg().color(e);
|
@@ -151,23 +195,23 @@ class AXWysiwygToolbarComponent {
|
|
151
195
|
}
|
152
196
|
}
|
153
197
|
orderList() {
|
154
|
-
if (this.
|
155
|
-
this.wysiwyg().list('');
|
156
|
-
this.
|
198
|
+
if (!this.listState() || this.listState() === 'bullet') {
|
199
|
+
this.wysiwyg().list('ordered');
|
200
|
+
this.listState.set('ordered');
|
157
201
|
}
|
158
202
|
else {
|
159
|
-
this.wysiwyg().list('
|
160
|
-
this.
|
203
|
+
this.wysiwyg().list('');
|
204
|
+
this.listState.set('');
|
161
205
|
}
|
162
206
|
}
|
163
207
|
unOrderList() {
|
164
|
-
if (this.
|
165
|
-
this.wysiwyg().list('');
|
166
|
-
this.
|
208
|
+
if (!this.listState() || this.listState() === 'ordered') {
|
209
|
+
this.wysiwyg().list('bullet');
|
210
|
+
this.listState.set('bullet');
|
167
211
|
}
|
168
212
|
else {
|
169
|
-
this.wysiwyg().list('
|
170
|
-
this.
|
213
|
+
this.wysiwyg().list('');
|
214
|
+
this.listState.set('');
|
171
215
|
}
|
172
216
|
}
|
173
217
|
alignStateHandler(e) {
|
@@ -194,21 +238,39 @@ class AXWysiwygToolbarComponent {
|
|
194
238
|
this.wysiwyg().background('red');
|
195
239
|
}
|
196
240
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXWysiwygToolbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
197
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
241
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.2", type: AXWysiwygToolbarComponent, selector: "ax-wysiwyg-toolbar", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { outputHTML: "outputHTML" }, ngImport: i0, template: "<div class=\"ax-wysiwyg-toolbar-container ax-sm\">\n <ng-content select=\"ax-prefix\"></ng-content>\n\n <div class=\"ax-wysiwyg-tool-container\">\n @if (config().undo) {\n <ax-button class=\"\" (click)=\"undo()\" look=\"blank\">\n <ax-icon class=\"ax-icon ax-icon-undo\"></ax-icon>\n </ax-button>\n }\n\n @if (config().redo) {\n <ax-button class=\"\" (click)=\"redo()\" look=\"blank\">\n <ax-icon class=\"ax-icon ax-icon-redo\"></ax-icon>\n </ax-button>\n }\n @if (config().bold) {\n <ax-button (click)=\"bold()\" look=\"blank\" [selected]=\"boldState() ? true : false\">\n <ax-icon class=\"ax-icon ax-icon-bold\"></ax-icon>\n </ax-button>\n }\n @if (config().italic) {\n <ax-button (click)=\"italic()\" look=\"blank\" [selected]=\"italicState() ? true : false\">\n <ax-icon class=\"ax-icon ax-icon-italic\"></ax-icon>\n </ax-button>\n }\n @if (config().underLine) {\n <ax-button (click)=\"underLine()\" look=\"blank\" [selected]=\"underLineState() ? true : false\">\n <ax-icon class=\"ax-icon ax-icon-under-line\"></ax-icon>\n </ax-button>\n }\n @if (config().strike) {\n <ax-button (click)=\"strike()\" look=\"blank\" [selected]=\"strikeLineState() ? true : false\">\n <ax-icon class=\"ax-icon ax-icon-strike\"></ax-icon>\n </ax-button>\n }\n @if (config().color) {\n <ax-button #colorBtn look=\"blank\">\n <ax-icon class=\"ax-icon ax-icon-color-palette\"></ax-icon>\n </ax-button>\n <ax-popover\n [openOn]=\"popoverOption.openOn\"\n [closeOn]=\"popoverOption.closeOn\"\n [target]=\"colorBtn\"\n [placement]=\"popoverOption.placement\"\n >\n <div class=\"ax-overlay-pane\">\n <ax-color-palette (ngModelChange)=\"changeColorHandler($event)\" [ngModel]=\"selectedColor\">\n <ax-color-palette-preview></ax-color-palette-preview>\n <ax-color-palette-picker></ax-color-palette-picker>\n <ax-color-palette-input></ax-color-palette-input>\n </ax-color-palette>\n </div>\n </ax-popover>\n }\n @if (config().highlight) {\n <ax-button #highlightBtn look=\"blank\">\n <ax-icon class=\"ax-icon ax-icon-highlight\"></ax-icon>\n </ax-button>\n <ax-popover\n [openOn]=\"popoverOption.openOn\"\n [closeOn]=\"popoverOption.closeOn\"\n [target]=\"highlightBtn\"\n [placement]=\"popoverOption.placement\"\n >\n <div class=\"ax-overlay-pane\">\n <ax-color-palette (ngModelChange)=\"changeHighlightColorHandler($event)\" [ngModel]=\"selectedHighlightColor\">\n <ax-color-palette-preview></ax-color-palette-preview>\n <ax-color-palette-picker></ax-color-palette-picker>\n <ax-color-palette-input></ax-color-palette-input>\n </ax-color-palette>\n </div>\n </ax-popover>\n }\n @if (config().fontSize) {\n <ax-select-box (ngModelChange)=\"fontHandler($event)\" [ngModel]=\"selectedFont\" [dataSource]=\"fontSize\" placeholder=\"Choose...\">\n </ax-select-box>\n }\n @if (config().list) {\n <ax-button (click)=\"orderList()\" look=\"blank\" [selected]=\"listState() === 'ordered' ? true : false\">\n <ax-icon class=\"ax-icon ax-icon-order-list\"></ax-icon>\n </ax-button>\n\n <ax-button (click)=\"unOrderList()\" look=\"blank\" [selected]=\"listState() === 'bullet' ? true : false\">\n <ax-icon class=\"ax-icon ax-icon-un-order-list\"></ax-icon>\n </ax-button>\n }\n @if (config().alignment) {\n <ax-button look=\"blank\" #alignPop>\n <ax-icon class=\"ax-icon ax-icon-align-left\"></ax-icon>\n </ax-button>\n <ax-popover\n [openOn]=\"popoverOption.openOn\"\n [closeOn]=\"popoverOption.closeOn\"\n [target]=\"alignPop\"\n [placement]=\"popoverOption.placement\"\n >\n <div class=\"ax-overlay-pane\">\n <ax-button (click)=\"alignStateHandler('left')\" look=\"blank\" [selected]=\"alignState() === 'left' ? true : false\">\n <ax-icon class=\"ax-icon ax-icon-align-left\"></ax-icon>\n </ax-button>\n\n <ax-button (click)=\"alignStateHandler('center')\" look=\"blank\" [selected]=\"alignState() === 'center' ? true : false\">\n <ax-icon class=\"ax-icon ax-icon-align-center\"></ax-icon>\n </ax-button>\n\n <ax-button (click)=\"alignStateHandler('right')\" look=\"blank\" [selected]=\"alignState() === 'right' ? true : false\">\n <ax-icon class=\"ax-icon ax-icon-align-right\"></ax-icon>\n </ax-button>\n </div>\n </ax-popover>\n }\n @if (config().image) {\n <ax-button #linkBtn look=\"blank\">\n <ax-icon class=\"ax-icon ax-icon-image\"></ax-icon>\n </ax-button>\n\n <ax-popover\n [openOn]=\"popoverOption.openOn\"\n [closeOn]=\"popoverOption.closeOn\"\n [target]=\"linkBtn\"\n [placement]=\"popoverOption.placement\"\n >\n <ax-text-box class=\"{{ textBoxOptions.size }}\" [(ngModel)]=\"textBoxOptions.text\" [placeholder]=\"textBoxOptions.placeholder\">\n </ax-text-box>\n <ax-suffix>\n <ax-button (click)=\"submitLink()\" class=\"ax-sm\" color=\"secondary\" text=\"Add\"> </ax-button>\n </ax-suffix>\n </ax-popover>\n }\n </div>\n\n <ng-content select=\"ax-suffix\"></ng-content>\n</div>\n", styles: [".ax-wysiwyg-toolbar-container{display:flex;justify-content:space-between;align-items:center;padding:.5rem 1rem}.ax-wysiwyg-toolbar-container .ax-icon{font-weight:900;font-size:1rem}.ax-wysiwyg-toolbar-container .ax-wysiwyg-tool-container{display:flex}.ax-wysiwyg-toolbar-container .ax-wysiwyg-tool-container ax-button{margin-inline:.1rem}.ax-wysiwyg-toolbar-container .ax-wysiwyg-tool-container ax-select-box{margin-inline:1rem}\n"], dependencies: [{ kind: "component", type: i1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "responsiveOn", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "responsiveOnChange", "loadingTextChange"] }, { kind: "component", type: i2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i2.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-sub-title, ax-placeholder, ax-overlay" }, { kind: "component", type: i3.AXSelectBoxComponent, selector: "ax-select-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "minValue", "maxValue", "value", "state", "name", "id", "type", "look", "multiple", "valueField", "textField", "textTemplate", "dataSource", "caption", "itemTemplate", "selectedTemplate", "emptyTemplate", "loadingTemplate", "dropdownWidth"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed"] }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5.AXColorPalleteComponent, selector: "ax-color-palette", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "checked"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange"] }, { kind: "component", type: i5.AXColorPalettePreviewComponent, selector: "ax-color-palette-preview" }, { kind: "component", type: i5.AXColorPaletteInputComponent, selector: "ax-color-palette-input" }, { kind: "component", type: i5.AXColorPalettePickerComponent, selector: "ax-color-palette-picker" }, { kind: "component", type: i6.AXPopoverComponent, selector: "ax-popover", inputs: ["offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "backdropClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "component", type: i7.AXTextBoxComponent, selector: "ax-text-box", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "id", "placeholder", "maxLength", "allowNull", "type", "autoComplete", "look", "mask-options", "class"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
198
242
|
}
|
199
243
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXWysiwygToolbarComponent, decorators: [{
|
200
244
|
type: Component,
|
201
|
-
args: [{ selector: 'ax-wysiwyg-toolbar', encapsulation: ViewEncapsulation.None, template: "<div class=\"ax-wysiwyg-toolbar-container ax-sm\">\n <ng-content select=\"ax-prefix\"></ng-content>\n\n <div class=\"ax-wysiwyg-tool-container\">\n <ax-button class=\"\" (click)=\"undo()\" look=\"blank\">\n
|
245
|
+
args: [{ selector: 'ax-wysiwyg-toolbar', encapsulation: ViewEncapsulation.None, template: "<div class=\"ax-wysiwyg-toolbar-container ax-sm\">\n <ng-content select=\"ax-prefix\"></ng-content>\n\n <div class=\"ax-wysiwyg-tool-container\">\n @if (config().undo) {\n <ax-button class=\"\" (click)=\"undo()\" look=\"blank\">\n <ax-icon class=\"ax-icon ax-icon-undo\"></ax-icon>\n </ax-button>\n }\n\n @if (config().redo) {\n <ax-button class=\"\" (click)=\"redo()\" look=\"blank\">\n <ax-icon class=\"ax-icon ax-icon-redo\"></ax-icon>\n </ax-button>\n }\n @if (config().bold) {\n <ax-button (click)=\"bold()\" look=\"blank\" [selected]=\"boldState() ? true : false\">\n <ax-icon class=\"ax-icon ax-icon-bold\"></ax-icon>\n </ax-button>\n }\n @if (config().italic) {\n <ax-button (click)=\"italic()\" look=\"blank\" [selected]=\"italicState() ? true : false\">\n <ax-icon class=\"ax-icon ax-icon-italic\"></ax-icon>\n </ax-button>\n }\n @if (config().underLine) {\n <ax-button (click)=\"underLine()\" look=\"blank\" [selected]=\"underLineState() ? true : false\">\n <ax-icon class=\"ax-icon ax-icon-under-line\"></ax-icon>\n </ax-button>\n }\n @if (config().strike) {\n <ax-button (click)=\"strike()\" look=\"blank\" [selected]=\"strikeLineState() ? true : false\">\n <ax-icon class=\"ax-icon ax-icon-strike\"></ax-icon>\n </ax-button>\n }\n @if (config().color) {\n <ax-button #colorBtn look=\"blank\">\n <ax-icon class=\"ax-icon ax-icon-color-palette\"></ax-icon>\n </ax-button>\n <ax-popover\n [openOn]=\"popoverOption.openOn\"\n [closeOn]=\"popoverOption.closeOn\"\n [target]=\"colorBtn\"\n [placement]=\"popoverOption.placement\"\n >\n <div class=\"ax-overlay-pane\">\n <ax-color-palette (ngModelChange)=\"changeColorHandler($event)\" [ngModel]=\"selectedColor\">\n <ax-color-palette-preview></ax-color-palette-preview>\n <ax-color-palette-picker></ax-color-palette-picker>\n <ax-color-palette-input></ax-color-palette-input>\n </ax-color-palette>\n </div>\n </ax-popover>\n }\n @if (config().highlight) {\n <ax-button #highlightBtn look=\"blank\">\n <ax-icon class=\"ax-icon ax-icon-highlight\"></ax-icon>\n </ax-button>\n <ax-popover\n [openOn]=\"popoverOption.openOn\"\n [closeOn]=\"popoverOption.closeOn\"\n [target]=\"highlightBtn\"\n [placement]=\"popoverOption.placement\"\n >\n <div class=\"ax-overlay-pane\">\n <ax-color-palette (ngModelChange)=\"changeHighlightColorHandler($event)\" [ngModel]=\"selectedHighlightColor\">\n <ax-color-palette-preview></ax-color-palette-preview>\n <ax-color-palette-picker></ax-color-palette-picker>\n <ax-color-palette-input></ax-color-palette-input>\n </ax-color-palette>\n </div>\n </ax-popover>\n }\n @if (config().fontSize) {\n <ax-select-box (ngModelChange)=\"fontHandler($event)\" [ngModel]=\"selectedFont\" [dataSource]=\"fontSize\" placeholder=\"Choose...\">\n </ax-select-box>\n }\n @if (config().list) {\n <ax-button (click)=\"orderList()\" look=\"blank\" [selected]=\"listState() === 'ordered' ? true : false\">\n <ax-icon class=\"ax-icon ax-icon-order-list\"></ax-icon>\n </ax-button>\n\n <ax-button (click)=\"unOrderList()\" look=\"blank\" [selected]=\"listState() === 'bullet' ? true : false\">\n <ax-icon class=\"ax-icon ax-icon-un-order-list\"></ax-icon>\n </ax-button>\n }\n @if (config().alignment) {\n <ax-button look=\"blank\" #alignPop>\n <ax-icon class=\"ax-icon ax-icon-align-left\"></ax-icon>\n </ax-button>\n <ax-popover\n [openOn]=\"popoverOption.openOn\"\n [closeOn]=\"popoverOption.closeOn\"\n [target]=\"alignPop\"\n [placement]=\"popoverOption.placement\"\n >\n <div class=\"ax-overlay-pane\">\n <ax-button (click)=\"alignStateHandler('left')\" look=\"blank\" [selected]=\"alignState() === 'left' ? true : false\">\n <ax-icon class=\"ax-icon ax-icon-align-left\"></ax-icon>\n </ax-button>\n\n <ax-button (click)=\"alignStateHandler('center')\" look=\"blank\" [selected]=\"alignState() === 'center' ? true : false\">\n <ax-icon class=\"ax-icon ax-icon-align-center\"></ax-icon>\n </ax-button>\n\n <ax-button (click)=\"alignStateHandler('right')\" look=\"blank\" [selected]=\"alignState() === 'right' ? true : false\">\n <ax-icon class=\"ax-icon ax-icon-align-right\"></ax-icon>\n </ax-button>\n </div>\n </ax-popover>\n }\n @if (config().image) {\n <ax-button #linkBtn look=\"blank\">\n <ax-icon class=\"ax-icon ax-icon-image\"></ax-icon>\n </ax-button>\n\n <ax-popover\n [openOn]=\"popoverOption.openOn\"\n [closeOn]=\"popoverOption.closeOn\"\n [target]=\"linkBtn\"\n [placement]=\"popoverOption.placement\"\n >\n <ax-text-box class=\"{{ textBoxOptions.size }}\" [(ngModel)]=\"textBoxOptions.text\" [placeholder]=\"textBoxOptions.placeholder\">\n </ax-text-box>\n <ax-suffix>\n <ax-button (click)=\"submitLink()\" class=\"ax-sm\" color=\"secondary\" text=\"Add\"> </ax-button>\n </ax-suffix>\n </ax-popover>\n }\n </div>\n\n <ng-content select=\"ax-suffix\"></ng-content>\n</div>\n", styles: [".ax-wysiwyg-toolbar-container{display:flex;justify-content:space-between;align-items:center;padding:.5rem 1rem}.ax-wysiwyg-toolbar-container .ax-icon{font-weight:900;font-size:1rem}.ax-wysiwyg-toolbar-container .ax-wysiwyg-tool-container{display:flex}.ax-wysiwyg-toolbar-container .ax-wysiwyg-tool-container ax-button{margin-inline:.1rem}.ax-wysiwyg-toolbar-container .ax-wysiwyg-tool-container ax-select-box{margin-inline:1rem}\n"] }]
|
202
246
|
}], ctorParameters: () => [] });
|
203
247
|
|
204
248
|
class AXWysiwygViewComponent {
|
249
|
+
constructor() {
|
250
|
+
this.classes = input('', { alias: 'class' });
|
251
|
+
this.wysiwygService = inject(AXWysiwygService);
|
252
|
+
}
|
253
|
+
get __hostClass() {
|
254
|
+
return `${this.classes()}`;
|
255
|
+
}
|
256
|
+
editorStateHandler(e) {
|
257
|
+
this.wysiwygService.currentSelectedElemArray.set([
|
258
|
+
e.target.nodeName,
|
259
|
+
e.target.parentElement.nodeName,
|
260
|
+
e.target.parentElement.parentElement.nodeName,
|
261
|
+
e.target.parentElement.parentElement.parentElement.nodeName,
|
262
|
+
]);
|
263
|
+
}
|
205
264
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXWysiwygViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
206
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
265
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.0.2", type: AXWysiwygViewComponent, selector: "ax-wysiwyg-view", inputs: { classes: { classPropertyName: "classes", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "this.__hostClass" } }, ngImport: i0, template: "<div class=\"ax-editor-wrapper\" (click)=\"editorStateHandler($event)\">\n <!-- wysiwyg editor render here -->\n</div>\n", styles: ["ax-wysiwyg-view{display:block;width:100%;border-bottom:1px solid rgb(var(--ax-color-border-default))}.ql-container{font-family:inherit}.ql-editor.ql-blank:before{color:rgb(var(--ax-color-neutral-400));font-weight:600;font-style:normal}\n"], encapsulation: i0.ViewEncapsulation.None }); }
|
207
266
|
}
|
208
267
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXWysiwygViewComponent, decorators: [{
|
209
268
|
type: Component,
|
210
|
-
args: [{ selector: 'ax-wysiwyg-view', encapsulation: ViewEncapsulation.None, template: "<!-- wysiwyg editor render here -->\n", styles: ["ax-wysiwyg-view{display:block;width:100%;border-bottom:1px solid rgb(var(--ax-color-border-default))}.ql-container{font-family:inherit}.ql-editor.ql-blank:before{color:rgb(var(--ax-color-neutral-400));font-weight:600;font-style:normal}\n"] }]
|
211
|
-
}]
|
269
|
+
args: [{ selector: 'ax-wysiwyg-view', encapsulation: ViewEncapsulation.None, template: "<div class=\"ax-editor-wrapper\" (click)=\"editorStateHandler($event)\">\n <!-- wysiwyg editor render here -->\n</div>\n", styles: ["ax-wysiwyg-view{display:block;width:100%;border-bottom:1px solid rgb(var(--ax-color-border-default))}.ql-container{font-family:inherit}.ql-editor.ql-blank:before{color:rgb(var(--ax-color-neutral-400));font-weight:600;font-style:normal}\n"] }]
|
270
|
+
}], propDecorators: { __hostClass: [{
|
271
|
+
type: HostBinding,
|
272
|
+
args: ['class']
|
273
|
+
}] } });
|
212
274
|
|
213
275
|
const COMPONENT = [AXWysiwygContainerComponent, AXWysiwygViewComponent, AXWysiwygToolbarComponent];
|
214
276
|
const MODULES = [AXButtonModule, AXDecoratorModule, AXSelectBoxModule, FormsModule, AXColorPaletteModule, AXPopoverModule, AXTextBoxModule];
|