@acorex/components 18.5.15 → 18.5.17
Sign up to get free protection for your applications and to get access to all the features.
- package/action-sheet/lib/action-sheet.component.d.ts +26 -0
- package/alert/lib/alert.component.d.ts +50 -2
- package/audio-wave/lib/audio-wave.component.d.ts +48 -0
- package/avatar/lib/avatar.component.d.ts +20 -1
- package/badge/lib/badge.component.d.ts +8 -0
- package/bottom-navigation/lib/bottom-navigation.component.d.ts +16 -0
- package/breadcrumbs/lib/breadcrumbs-item.component.d.ts +11 -0
- package/breadcrumbs/lib/breadcrumbs.component.d.ts +11 -0
- package/button/lib/button-item-list.component.d.ts +34 -0
- package/button/lib/button-item.component.d.ts +47 -0
- package/button/lib/button.component.d.ts +36 -0
- package/button-group/lib/button-group.component.d.ts +53 -0
- package/calendar/lib/calendar-range.component.d.ts +48 -0
- package/calendar/lib/calendar.component.d.ts +114 -0
- package/check-box/lib/check-box.component.d.ts +36 -0
- package/chips/lib/chips.component.d.ts +13 -0
- package/circular-progress/lib/circular-progress.component.d.ts +67 -1
- package/collapse/lib/collapse-group.component.d.ts +38 -0
- package/collapse/lib/collapse.component.d.ts +55 -0
- package/color-box/lib/color-box.component.d.ts +28 -1
- package/color-palette/lib/color-palette-input.component.d.ts +35 -0
- package/color-palette/lib/color-palette-picker.component.d.ts +53 -0
- package/color-palette/lib/color-palette-preview.component.d.ts +17 -0
- package/color-palette/lib/color-palette-swatches.component.d.ts +30 -0
- package/color-palette/lib/color-palette.component.d.ts +8 -0
- package/comment/lib/comment-container/comment-container.component.d.ts +5 -0
- package/comment/lib/comment-item/comment-item.component.d.ts +16 -2
- package/comment/lib/comment-like/comment-like.component.d.ts +8 -0
- package/comment/lib/comment-reply/comment-reply.component.d.ts +4 -0
- package/comment/lib/comment-view/comment-view.component.d.ts +4 -0
- package/common/lib/components/base-component.class.d.ts +8 -0
- package/common/lib/components/button-base-component.class.d.ts +21 -0
- package/common/lib/components/interactive-component.class.d.ts +15 -0
- package/conversation/lib/conversation-container/conversation-container.component.d.ts +4 -0
- package/conversation/lib/conversation-input/conversation-input.component.d.ts +79 -2
- package/conversation/lib/conversation-message/conversation-message.component.d.ts +41 -0
- package/conversation/lib/conversation-messages/conversation-message-audio/conversation-message-audio.component.d.ts +62 -0
- package/conversation/lib/conversation-messages/conversation-message-file/conversation-message-file.component.d.ts +34 -0
- package/conversation/lib/conversation-messages/conversation-message-image/conversation-message-image.component.d.ts +21 -0
- package/conversation/lib/conversation-messages/conversation-message-image-popup/conversation-message-image-popup.component.d.ts +11 -0
- package/conversation/lib/conversation-messages/conversation-message-text/conversation-message-text.component.d.ts +29 -0
- package/conversation/lib/conversation-messages/conversation-message-video/conversation-message-video.component.d.ts +11 -0
- package/conversation/lib/conversation-messages/conversation-message-voice/conversation-message-voice.component.d.ts +72 -0
- package/conversation/lib/conversation-view/conversation-view.component.d.ts +22 -0
- package/data-pager/lib/data-pager-base.component.d.ts +9 -0
- package/data-pager/lib/data-pager-info.component.d.ts +14 -0
- package/data-pager/lib/data-pager-input-selector.component.d.ts +17 -0
- package/data-pager/lib/data-pager-next-buttons.components.d.ts +20 -0
- package/data-pager/lib/data-pager-numeric-selector.component.d.ts +14 -0
- package/esm2022/action-sheet/lib/action-sheet.component.mjs +21 -1
- package/esm2022/alert/lib/alert.component.mjs +48 -3
- package/esm2022/audio-wave/lib/audio-wave.component.mjs +43 -1
- package/esm2022/avatar/lib/avatar.component.mjs +21 -2
- package/esm2022/badge/lib/badge.component.mjs +9 -1
- package/esm2022/bottom-navigation/lib/bottom-navigation.component.mjs +14 -1
- package/esm2022/breadcrumbs/lib/breadcrumbs-item.component.mjs +9 -1
- package/esm2022/breadcrumbs/lib/breadcrumbs.component.mjs +6 -1
- package/esm2022/button/lib/button-item-list.component.mjs +35 -1
- package/esm2022/button/lib/button-item.component.mjs +36 -1
- package/esm2022/button/lib/button.component.mjs +39 -3
- package/esm2022/button-group/lib/button-group.component.mjs +48 -1
- package/esm2022/calendar/lib/calendar-range.component.mjs +46 -1
- package/esm2022/calendar/lib/calendar.component.mjs +112 -1
- package/esm2022/check-box/lib/check-box.component.mjs +34 -1
- package/esm2022/chips/lib/chips.component.mjs +14 -1
- package/esm2022/circular-progress/lib/circular-progress.component.mjs +69 -1
- package/esm2022/collapse/lib/collapse-group.component.mjs +39 -1
- package/esm2022/collapse/lib/collapse.component.mjs +53 -1
- package/esm2022/color-box/lib/color-box.component.mjs +23 -2
- package/esm2022/color-palette/lib/color-palette-input.component.mjs +36 -1
- package/esm2022/color-palette/lib/color-palette-picker.component.mjs +54 -1
- package/esm2022/color-palette/lib/color-palette-preview.component.mjs +18 -1
- package/esm2022/color-palette/lib/color-palette-swatches.component.mjs +28 -1
- package/esm2022/color-palette/lib/color-palette.component.mjs +9 -1
- package/esm2022/comment/lib/comment-container/comment-container.component.mjs +6 -1
- package/esm2022/comment/lib/comment-item/comment-item.component.mjs +15 -1
- package/esm2022/comment/lib/comment-like/comment-like.component.mjs +9 -1
- package/esm2022/comment/lib/comment-reply/comment-reply.component.mjs +5 -1
- package/esm2022/comment/lib/comment-view/comment-view.component.mjs +5 -1
- package/esm2022/common/lib/components/base-component.class.mjs +9 -1
- package/esm2022/common/lib/components/button-base-component.class.mjs +22 -1
- package/esm2022/common/lib/components/interactive-component.class.mjs +16 -1
- package/esm2022/conversation/lib/conversation-container/conversation-container.component.mjs +5 -1
- package/esm2022/conversation/lib/conversation-input/conversation-input.component.mjs +75 -1
- package/esm2022/conversation/lib/conversation-message/conversation-message.component.mjs +39 -1
- package/esm2022/conversation/lib/conversation-messages/conversation-message-audio/conversation-message-audio.component.mjs +63 -1
- package/esm2022/conversation/lib/conversation-messages/conversation-message-file/conversation-message-file.component.mjs +35 -1
- package/esm2022/conversation/lib/conversation-messages/conversation-message-image/conversation-message-image.component.mjs +22 -1
- package/esm2022/conversation/lib/conversation-messages/conversation-message-image-popup/conversation-message-image-popup.component.mjs +9 -1
- package/esm2022/conversation/lib/conversation-messages/conversation-message-text/conversation-message-text.component.mjs +30 -1
- package/esm2022/conversation/lib/conversation-messages/conversation-message-video/conversation-message-video.component.mjs +12 -1
- package/esm2022/conversation/lib/conversation-messages/conversation-message-voice/conversation-message-voice.component.mjs +70 -1
- package/esm2022/conversation/lib/conversation-view/conversation-view.component.mjs +23 -1
- package/esm2022/data-pager/lib/data-pager-base.component.mjs +7 -1
- package/esm2022/data-pager/lib/data-pager-info.component.mjs +9 -1
- package/esm2022/data-pager/lib/data-pager-input-selector.component.mjs +18 -1
- package/esm2022/data-pager/lib/data-pager-next-buttons.components.mjs +18 -1
- package/esm2022/data-pager/lib/data-pager-numeric-selector.component.mjs +15 -1
- package/esm2022/scheduler/lib/scheduler-month-view.component.mjs +20 -1
- package/esm2022/scheduler/lib/scheduler-week-view.component.mjs +5 -1
- package/esm2022/scheduler/lib/scheduler.component.mjs +10 -1
- package/esm2022/search-box/lib/search-box.component.mjs +19 -2
- package/esm2022/select-box/lib/select-box.component.mjs +50 -2
- package/esm2022/selection-list/lib/selection-list.component.mjs +51 -1
- package/esm2022/side-menu/lib/side-menu.component.mjs +5 -1
- package/esm2022/skeleton/lib/skeleton.component.mjs +11 -1
- package/esm2022/slider/lib/slider.component.mjs +52 -2
- package/esm2022/step-wizard/lib/step-wizard.component.mjs +23 -1
- package/esm2022/switch/lib/switch-content.component.mjs +5 -1
- package/esm2022/switch/lib/switch.component.mjs +11 -1
- package/esm2022/tabs/lib/tab-item.component.mjs +24 -1
- package/esm2022/tabs/lib/tabs.component.mjs +36 -1
- package/esm2022/tag/lib/tag.component.mjs +2 -1
- package/esm2022/text-area/lib/text-area.component.mjs +8 -1
- package/esm2022/text-box/lib/text-box.component.mjs +13 -1
- package/esm2022/toast/lib/toast.component.mjs +6 -1
- package/esm2022/tooltip/lib/tooltip.component.mjs +5 -1
- package/esm2022/uploader/lib/uploader-dialog-container.component.mjs +16 -1
- package/esm2022/uploader/lib/uploader-drop-zone.component.mjs +5 -1
- package/esm2022/uploader/lib/uploader-list.component.mjs +8 -3
- package/esm2022/uploader/lib/uploader.models.mjs +14 -1
- package/esm2022/wysiwyg/lib/wysiwyg/wysiwyg-container/wysiwyg-container.component.mjs +18 -1
- package/esm2022/wysiwyg/lib/wysiwyg/wysiwyg-toolbar/wysiwyg-toolbar.component.mjs +106 -36
- package/esm2022/wysiwyg/lib/wysiwyg/wysiwyg-view/wysiwyg-view.component.mjs +9 -1
- package/esm2022/wysiwyg/lib/wysiwyg/wysiwyg.service.mjs +4 -1
- package/fesm2022/acorex-components-action-sheet.mjs +20 -0
- package/fesm2022/acorex-components-action-sheet.mjs.map +1 -1
- package/fesm2022/acorex-components-alert.mjs +47 -2
- package/fesm2022/acorex-components-alert.mjs.map +1 -1
- package/fesm2022/acorex-components-audio-wave.mjs +42 -0
- package/fesm2022/acorex-components-audio-wave.mjs.map +1 -1
- package/fesm2022/acorex-components-avatar.mjs +20 -1
- package/fesm2022/acorex-components-avatar.mjs.map +1 -1
- package/fesm2022/acorex-components-badge.mjs +8 -0
- package/fesm2022/acorex-components-badge.mjs.map +1 -1
- package/fesm2022/acorex-components-bottom-navigation.mjs +13 -0
- package/fesm2022/acorex-components-bottom-navigation.mjs.map +1 -1
- package/fesm2022/acorex-components-breadcrumbs.mjs +13 -0
- package/fesm2022/acorex-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/acorex-components-button-group.mjs +47 -0
- package/fesm2022/acorex-components-button-group.mjs.map +1 -1
- package/fesm2022/acorex-components-button.mjs +107 -2
- package/fesm2022/acorex-components-button.mjs.map +1 -1
- package/fesm2022/acorex-components-calendar.mjs +156 -0
- package/fesm2022/acorex-components-calendar.mjs.map +1 -1
- package/fesm2022/acorex-components-check-box.mjs +33 -0
- package/fesm2022/acorex-components-check-box.mjs.map +1 -1
- package/fesm2022/acorex-components-chips.mjs +13 -0
- package/fesm2022/acorex-components-chips.mjs.map +1 -1
- package/fesm2022/acorex-components-circular-progress.mjs +68 -0
- package/fesm2022/acorex-components-circular-progress.mjs.map +1 -1
- package/fesm2022/acorex-components-collapse.mjs +90 -0
- package/fesm2022/acorex-components-collapse.mjs.map +1 -1
- package/fesm2022/acorex-components-color-box.mjs +22 -1
- package/fesm2022/acorex-components-color-box.mjs.map +1 -1
- package/fesm2022/acorex-components-color-palette.mjs +140 -0
- package/fesm2022/acorex-components-color-palette.mjs.map +1 -1
- package/fesm2022/acorex-components-comment.mjs +35 -0
- package/fesm2022/acorex-components-comment.mjs.map +1 -1
- package/fesm2022/acorex-components-common.mjs +44 -0
- package/fesm2022/acorex-components-common.mjs.map +1 -1
- package/fesm2022/acorex-components-conversation.mjs +372 -0
- package/fesm2022/acorex-components-conversation.mjs.map +1 -1
- package/fesm2022/acorex-components-data-pager.mjs +62 -0
- package/fesm2022/acorex-components-data-pager.mjs.map +1 -1
- package/fesm2022/acorex-components-scheduler.mjs +32 -0
- package/fesm2022/acorex-components-scheduler.mjs.map +1 -1
- package/fesm2022/acorex-components-search-box.mjs +18 -1
- package/fesm2022/acorex-components-search-box.mjs.map +1 -1
- package/fesm2022/acorex-components-select-box.mjs +49 -1
- package/fesm2022/acorex-components-select-box.mjs.map +1 -1
- package/fesm2022/acorex-components-selection-list.mjs +50 -0
- package/fesm2022/acorex-components-selection-list.mjs.map +1 -1
- package/fesm2022/acorex-components-side-menu.mjs +4 -0
- package/fesm2022/acorex-components-side-menu.mjs.map +1 -1
- package/fesm2022/acorex-components-skeleton.mjs +10 -0
- package/fesm2022/acorex-components-skeleton.mjs.map +1 -1
- package/fesm2022/acorex-components-slider.mjs +51 -1
- package/fesm2022/acorex-components-slider.mjs.map +1 -1
- package/fesm2022/acorex-components-step-wizard.mjs +22 -0
- package/fesm2022/acorex-components-step-wizard.mjs.map +1 -1
- package/fesm2022/acorex-components-switch.mjs +14 -0
- package/fesm2022/acorex-components-switch.mjs.map +1 -1
- package/fesm2022/acorex-components-tabs.mjs +58 -0
- package/fesm2022/acorex-components-tabs.mjs.map +1 -1
- package/fesm2022/acorex-components-tag.mjs +1 -0
- package/fesm2022/acorex-components-tag.mjs.map +1 -1
- package/fesm2022/acorex-components-text-area.mjs +7 -0
- package/fesm2022/acorex-components-text-area.mjs.map +1 -1
- package/fesm2022/acorex-components-text-box.mjs +12 -0
- package/fesm2022/acorex-components-text-box.mjs.map +1 -1
- package/fesm2022/acorex-components-toast.mjs +5 -0
- package/fesm2022/acorex-components-toast.mjs.map +1 -1
- package/fesm2022/acorex-components-tooltip.mjs +4 -0
- package/fesm2022/acorex-components-tooltip.mjs.map +1 -1
- package/fesm2022/acorex-components-uploader.mjs +39 -2
- package/fesm2022/acorex-components-uploader.mjs.map +1 -1
- package/fesm2022/acorex-components-wysiwyg.mjs +134 -35
- package/fesm2022/acorex-components-wysiwyg.mjs.map +1 -1
- package/package.json +71 -71
- package/scheduler/lib/scheduler-month-view.component.d.ts +20 -0
- package/scheduler/lib/scheduler-week-view.component.d.ts +4 -0
- package/scheduler/lib/scheduler.component.d.ts +10 -0
- package/search-box/lib/search-box.component.d.ts +19 -1
- package/select-box/lib/select-box.component.d.ts +78 -1
- package/selection-list/lib/selection-list.component.d.ts +55 -0
- package/side-menu/lib/side-menu.component.d.ts +4 -0
- package/skeleton/lib/skeleton.component.d.ts +10 -0
- package/slider/lib/slider.component.d.ts +51 -1
- package/step-wizard/lib/step-wizard.component.d.ts +23 -0
- package/switch/lib/switch-content.component.d.ts +4 -0
- package/switch/lib/switch.component.d.ts +14 -0
- package/tabs/lib/tab-item.component.d.ts +32 -0
- package/tabs/lib/tabs.component.d.ts +42 -0
- package/tag/lib/tag.component.d.ts +4 -0
- package/text-area/lib/text-area.component.d.ts +13 -0
- package/text-box/lib/text-box.component.d.ts +27 -0
- package/toast/lib/toast.component.d.ts +6 -0
- package/tooltip/lib/tooltip.component.d.ts +13 -0
- package/uploader/lib/uploader-dialog-container.component.d.ts +15 -0
- package/uploader/lib/uploader-drop-zone.component.d.ts +4 -0
- package/uploader/lib/uploader-list.component.d.ts +5 -0
- package/uploader/lib/uploader.models.d.ts +4 -0
- package/wysiwyg/lib/wysiwyg/wysiwyg-container/wysiwyg-container.component.d.ts +19 -3
- package/wysiwyg/lib/wysiwyg/wysiwyg-toolbar/wysiwyg-toolbar.component.d.ts +61 -20
- package/wysiwyg/lib/wysiwyg/wysiwyg-view/wysiwyg-view.component.d.ts +4 -0
- package/wysiwyg/lib/wysiwyg/wysiwyg.service.d.ts +3 -0
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-tag.mjs","sources":["../../../../libs/components/tag/src/lib/tag.component.ts","../../../../libs/components/tag/src/lib/tag.component.html","../../../../libs/components/tag/src/lib/tag.module.ts","../../../../libs/components/tag/src/acorex-components-tag.ts"],"sourcesContent":["import { MXColorLookComponent } from '@acorex/components/common';\nimport { ChangeDetectionStrategy, Component, HostBinding, Input, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'ax-tag',\n templateUrl: './tag.component.html',\n styleUrls: ['./tag.component.scss'],\n inputs: ['color', 'look'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXTagComponent extends MXColorLookComponent {\n @Input()\n text: string;\n\n @HostBinding('class')\n private get __hostClass(): string {\n return `ax-el-${this.color}-${this.look}`;\n }\n}\n","<ng-content select=\"ax-prefix\"></ng-content>\n<div class=\"ax-tag-text\">{{text}}</div>\n<ng-content select=\"ax-suffix\"></ng-content>","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXTagComponent } from './tag.component';\n\n@NgModule({\n declarations: [AXTagComponent],\n imports: [CommonModule],\n exports: [AXTagComponent],\n providers: [],\n})\nexport class AXTagModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAWM,MAAO,cAAe,SAAQ,oBAAoB,CAAA
|
1
|
+
{"version":3,"file":"acorex-components-tag.mjs","sources":["../../../../libs/components/tag/src/lib/tag.component.ts","../../../../libs/components/tag/src/lib/tag.component.html","../../../../libs/components/tag/src/lib/tag.module.ts","../../../../libs/components/tag/src/acorex-components-tag.ts"],"sourcesContent":["import { MXColorLookComponent } from '@acorex/components/common';\nimport { ChangeDetectionStrategy, Component, HostBinding, Input, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'ax-tag',\n templateUrl: './tag.component.html',\n styleUrls: ['./tag.component.scss'],\n inputs: ['color', 'look'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXTagComponent extends MXColorLookComponent {\n /**\n * Represents the text content to be displayed or used within the component.\n */\n @Input()\n text: string;\n\n /** @ignore */\n @HostBinding('class')\n private get __hostClass(): string {\n return `ax-el-${this.color}-${this.look}`;\n }\n}\n","<ng-content select=\"ax-prefix\"></ng-content>\n<div class=\"ax-tag-text\">{{text}}</div>\n<ng-content select=\"ax-suffix\"></ng-content>","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXTagComponent } from './tag.component';\n\n@NgModule({\n declarations: [AXTagComponent],\n imports: [CommonModule],\n exports: [AXTagComponent],\n providers: [],\n})\nexport class AXTagModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAWM,MAAO,cAAe,SAAQ,oBAAoB,CAAA;;AAQtD,IAAA,IACY,WAAW,GAAA;QACrB,OAAO,CAAA,MAAA,EAAS,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,IAAI,CAAA,CAAE,CAAC;KAC3C;8GAXU,cAAc,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAd,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,cAAc,oLCX3B,2IAE4C,EAAA,MAAA,EAAA,CAAA,60BAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EA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OAAO,EAAE,CAAC,cAAc,CAAC;AACzB,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA,CAAA;;;ACTD;;AAEG;;;;"}
|
@@ -9,9 +9,16 @@ import { CommonModule } from '@angular/common';
|
|
9
9
|
class AXTextAreaComponent extends classes((MXInputBaseValueComponent), MXLookComponent) {
|
10
10
|
constructor() {
|
11
11
|
super(...arguments);
|
12
|
+
/**
|
13
|
+
* Specifies the number of rows for the component, typically used for configuring the size of a text area or similar input field.
|
14
|
+
*/
|
12
15
|
this.rows = 0;
|
16
|
+
/**
|
17
|
+
* Indicates whether the component allows resizing.
|
18
|
+
*/
|
13
19
|
this.allowResize = true;
|
14
20
|
}
|
21
|
+
/** @ignore */
|
15
22
|
_handleModelChange(value) {
|
16
23
|
this.commitValue(value, true);
|
17
24
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-text-area.mjs","sources":["../../../../libs/components/text-area/src/lib/text-area.component.ts","../../../../libs/components/text-area/src/lib/text-area.component.html","../../../../libs/components/text-area/src/lib/text-area.module.ts","../../../../libs/components/text-area/src/acorex-components-text-area.ts"],"sourcesContent":["import {\n AXClearableComponent,\n AXComponent,\n AXFocusableComponent,\n AXValuableComponent,\n MXInputBaseValueComponent,\n MXLookComponent,\n} from '@acorex/components/common';\n\nimport { ChangeDetectionStrategy, Component, ElementRef, Input, ViewChild, ViewEncapsulation, forwardRef } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { classes } from 'polytype';\n\n@Component({\n selector: 'ax-text-area',\n templateUrl: './text-area.component.html',\n styleUrls: ['./text-area.component.scss'],\n inputs: ['disabled', 'tabIndex', 'readonly', 'value', 'state', 'name', 'placeholder', 'maxLength', 'look'],\n outputs: [\n 'onBlur',\n 'onFocus',\n 'valueChange',\n 'stateChange',\n 'onValueChanged',\n 'readonlyChange',\n 'disabledChange',\n 'onKeyDown',\n 'onKeyUp',\n 'onKeyPress',\n ],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n { provide: AXComponent, useExisting: AXTextAreaComponent },\n { provide: AXFocusableComponent, useExisting: AXTextAreaComponent },\n { provide: AXClearableComponent, useExisting: AXTextAreaComponent },\n { provide: AXValuableComponent, useExisting: AXTextAreaComponent },\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AXTextAreaComponent),\n multi: true,\n },\n ],\n})\nexport class AXTextAreaComponent extends classes(MXInputBaseValueComponent<string>, MXLookComponent) {\n @ViewChild('input')\n input: ElementRef<HTMLInputElement>;\n\n @Input()\n rows = 0;\n\n @Input()\n allowResize = true;\n\n @Input()\n public showCounter: boolean;\n\n @Input()\n public maxLength: number;\n\n protected _handleModelChange(value: string | null) {\n this.commitValue(value, true);\n }\n}\n","<div class=\"ax-editor-container ax-look-{{this.look}}\" [class.ax-state-disabled]=\"disabled\">\n <textarea class=\"ax-textarea\" #input [id]=\"id\" [name]=\"name\" type=\"text\" [rows]=\"rows\"\n [attr.placeholder]=\"placeholder\" [attr.maxlength]=\"maxLength\" [class.ax-state-disabled]=\"disabled\"\n [class.ax-state-readonly]=\"readonly\" [class.ax-state-no-resizing]=\"!allowResize\" [disabled]=\"disabled\"\n [readonly]=\"readonly\" [tabindex]=\"tabIndex\" [ngModel]=\"value\" (ngModelChange)=\"_handleModelChange($event)\"\n (keydown)=\"emitOnKeydownEvent($event)\" (keyup)=\"emitOnKeyupEvent($event)\" (keypress)=\"emitOnKeypressEvent($event)\"\n (focus)=\"emitOnFocusEvent($event)\" (blur)=\"emitOnBlurEvent($event)\">\n</textarea>\n <ng-content select=\"ax-validation-rule\"> </ng-content>\n @if(showCounter){\n <div class=\"counter\">\n {{ input.value.length }}\n @if(maxLength){\n <span>/ {{ maxLength }}</span>\n }\n </div>\n }\n</div>\n<div class=\"ax-error-container\"></div>","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { AXTextAreaComponent } from './text-area.component';\n\n@NgModule({\n declarations: [AXTextAreaComponent],\n imports: [CommonModule, FormsModule],\n exports: [AXTextAreaComponent],\n})\nexport class AXTextAreaModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AA4CM,MAAO,mBAAoB,SAAQ,OAAO,EAAC,yBAAiC,GAAE,eAAe,CAAC,CAAA;AA/BpG,IAAA,WAAA,GAAA;;
|
1
|
+
{"version":3,"file":"acorex-components-text-area.mjs","sources":["../../../../libs/components/text-area/src/lib/text-area.component.ts","../../../../libs/components/text-area/src/lib/text-area.component.html","../../../../libs/components/text-area/src/lib/text-area.module.ts","../../../../libs/components/text-area/src/acorex-components-text-area.ts"],"sourcesContent":["import {\n AXClearableComponent,\n AXComponent,\n AXFocusableComponent,\n AXValuableComponent,\n MXInputBaseValueComponent,\n MXLookComponent,\n} from '@acorex/components/common';\n\nimport { ChangeDetectionStrategy, Component, ElementRef, Input, ViewChild, ViewEncapsulation, forwardRef } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { classes } from 'polytype';\n\n@Component({\n selector: 'ax-text-area',\n templateUrl: './text-area.component.html',\n styleUrls: ['./text-area.component.scss'],\n inputs: ['disabled', 'tabIndex', 'readonly', 'value', 'state', 'name', 'placeholder', 'maxLength', 'look'],\n outputs: [\n 'onBlur',\n 'onFocus',\n 'valueChange',\n 'stateChange',\n 'onValueChanged',\n 'readonlyChange',\n 'disabledChange',\n 'onKeyDown',\n 'onKeyUp',\n 'onKeyPress',\n ],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n { provide: AXComponent, useExisting: AXTextAreaComponent },\n { provide: AXFocusableComponent, useExisting: AXTextAreaComponent },\n { provide: AXClearableComponent, useExisting: AXTextAreaComponent },\n { provide: AXValuableComponent, useExisting: AXTextAreaComponent },\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AXTextAreaComponent),\n multi: true,\n },\n ],\n})\nexport class AXTextAreaComponent extends classes(MXInputBaseValueComponent<string>, MXLookComponent) {\n @ViewChild('input')\n input: ElementRef<HTMLInputElement>;\n\n /**\n * Specifies the number of rows for the component, typically used for configuring the size of a text area or similar input field.\n */\n @Input()\n rows = 0;\n\n /**\n * Indicates whether the component allows resizing.\n */\n @Input()\n allowResize = true;\n\n /**\n * Determines whether a counter is displayed in the component.\n */\n @Input()\n public showCounter: boolean;\n\n /**\n * Specifies the maximum number of characters allowed in the input field.\n */\n @Input()\n public maxLength: number;\n\n /** @ignore */\n protected _handleModelChange(value: string | null) {\n this.commitValue(value, true);\n }\n}\n","<div class=\"ax-editor-container ax-look-{{this.look}}\" [class.ax-state-disabled]=\"disabled\">\n <textarea class=\"ax-textarea\" #input [id]=\"id\" [name]=\"name\" type=\"text\" [rows]=\"rows\"\n [attr.placeholder]=\"placeholder\" [attr.maxlength]=\"maxLength\" [class.ax-state-disabled]=\"disabled\"\n [class.ax-state-readonly]=\"readonly\" [class.ax-state-no-resizing]=\"!allowResize\" [disabled]=\"disabled\"\n [readonly]=\"readonly\" [tabindex]=\"tabIndex\" [ngModel]=\"value\" (ngModelChange)=\"_handleModelChange($event)\"\n (keydown)=\"emitOnKeydownEvent($event)\" (keyup)=\"emitOnKeyupEvent($event)\" (keypress)=\"emitOnKeypressEvent($event)\"\n (focus)=\"emitOnFocusEvent($event)\" (blur)=\"emitOnBlurEvent($event)\">\n</textarea>\n <ng-content select=\"ax-validation-rule\"> </ng-content>\n @if(showCounter){\n <div class=\"counter\">\n {{ input.value.length }}\n @if(maxLength){\n <span>/ {{ maxLength }}</span>\n }\n </div>\n }\n</div>\n<div class=\"ax-error-container\"></div>","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { AXTextAreaComponent } from './text-area.component';\n\n@NgModule({\n declarations: [AXTextAreaComponent],\n imports: [CommonModule, FormsModule],\n exports: [AXTextAreaCom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AA,CAAA;sBADjB,KAAK;gBAOC,SAAS,EAAA,CAAA;sBADf,KAAK;;;ME3DK,gBAAgB,CAAA;8GAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;AAAhB,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,gBAAgB,iBAJZ,mBAAmB,CAAA,EAAA,OAAA,EAAA,CACxB,YAAY,EAAE,WAAW,aACzB,mBAAmB,CAAA,EAAA,CAAA,CAAA,EAAA;+GAElB,gBAAgB,EAAA,OAAA,EAAA,CAHjB,YAAY,EAAE,WAAW,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGxB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAL5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,mBAAmB,CAAC;AACnC,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,CAAC;oBACpC,OAAO,EAAE,CAAC,mBAAmB,CAAC;AAC/B,iBAAA,CAAA;;;ACTD;;AAEG;;;;"}
|
@@ -45,16 +45,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImpor
|
|
45
45
|
class AXTextBoxComponent extends classes((MXInputBaseValueComponent), MXLookComponent) {
|
46
46
|
constructor() {
|
47
47
|
super(...arguments);
|
48
|
+
/** @ignore */
|
48
49
|
this._updateOn = 'change';
|
50
|
+
/** @ignore */
|
49
51
|
this._maskOptions = { mask: null };
|
50
52
|
}
|
53
|
+
/**
|
54
|
+
* This public getter provides access to the `_maskOptions` property, which holds the configuration options for the mask feature.
|
55
|
+
*/
|
51
56
|
get maskOptions() {
|
52
57
|
return this._maskOptions;
|
53
58
|
}
|
59
|
+
/**
|
60
|
+
* @param value {AXMaskOptions} - The new mask configuration options to be set.
|
61
|
+
*/
|
54
62
|
set maskOptions(value) {
|
55
63
|
this._maskOptions = value;
|
56
64
|
this.setMask();
|
57
65
|
}
|
66
|
+
/** @ignore */
|
58
67
|
ngAfterContentInit() {
|
59
68
|
if (this._maskOptionsContent?.mask) {
|
60
69
|
if (typeof this._maskOptionsContent.mask == 'string' || this._maskOptionsContent.mask instanceof RegExp) {
|
@@ -70,6 +79,7 @@ class AXTextBoxComponent extends classes((MXInputBaseValueComponent), MXLookComp
|
|
70
79
|
//
|
71
80
|
this.setMask();
|
72
81
|
}
|
82
|
+
/** @ignore */
|
73
83
|
setMask() {
|
74
84
|
if (this._maskObj)
|
75
85
|
this._maskObj.destroy();
|
@@ -85,12 +95,14 @@ class AXTextBoxComponent extends classes((MXInputBaseValueComponent), MXLookComp
|
|
85
95
|
}
|
86
96
|
}
|
87
97
|
}
|
98
|
+
/** @ignore */
|
88
99
|
_onComplete(e) {
|
89
100
|
this.commitValue(this._maskObj.value, e?.isTrusted ?? false);
|
90
101
|
if (typeof this._maskOptionsContent?.updateValue === 'function') {
|
91
102
|
this._maskOptionsContent?.updateValue(this._maskObj.value, this._maskObj.unmaskedValue);
|
92
103
|
}
|
93
104
|
}
|
105
|
+
/** @ignore */
|
94
106
|
_handleModelChange(value) {
|
95
107
|
this.commitValue(value, true);
|
96
108
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-text-box.mjs","sources":["../../../../libs/components/text-box/src/lib/mask-options.directive.ts","../../../../libs/components/text-box/src/lib/text-box.component.ts","../../../../libs/components/text-box/src/lib/text-box.component.html","../../../../libs/components/text-box/src/lib/text-box.module.ts","../../../../libs/components/text-box/src/acorex-components-text-box.ts"],"sourcesContent":["import { Directive, EventEmitter, Input, Output } from '@angular/core';\nimport { MaskedOptions } from 'imask';\n\nexport type AXMaskOptions = MaskedOptions | any;\n\nexport interface AXMaskOptionsInterface {\n mask: MaskedOptions | string | RegExp;\n updateValue?: (masked: string, unmasked: string) => void;\n}\n\n@Directive({\n selector: 'ax-mask-options',\n})\nexport class AXMaskOptionsDirective implements AXMaskOptionsInterface {\n private _mask: MaskedOptions | string | RegExp;\n\n @Output()\n public onMaskChange = new EventEmitter<MaskedOptions | string | RegExp>();\n\n @Input()\n public get mask(): MaskedOptions | string | RegExp {\n return this._mask;\n }\n\n public set mask(v: MaskedOptions | string | RegExp) {\n this._mask = v;\n this.onMaskChange.emit(v);\n }\n\n @Input()\n updateValue?: (masked: string, unmasked: string) => void;\n}\n","/* eslint-disable @angular-eslint/no-inputs-metadata-property */\nimport {\n AXClearableComponent,\n AXComponent,\n AXFocusableComponent,\n AXValuableComponent,\n MXInputBaseValueComponent,\n MXLookComponent,\n} from '@acorex/components/common';\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n ElementRef,\n Input,\n ViewChild,\n ViewEncapsulation,\n forwardRef,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport IMask, { InputMask } from 'imask';\nimport { classes } from 'polytype';\nimport { AXMaskOptions, AXMaskOptionsDirective } from './mask-options.directive';\n\n/**\n * The Textbox is a component which detects user interaction and triggers a corresponding event\n *\n * @category Components\n */\n@Component({\n selector: 'ax-text-box',\n templateUrl: 'text-box.component.html',\n styleUrls: ['text-box.component.scss'],\n inputs: [\n 'disabled',\n 'tabIndex',\n 'readonly',\n 'value',\n 'state',\n 'name',\n 'id',\n 'placeholder',\n 'maxLength',\n 'allowNull',\n 'type',\n 'autoComplete',\n 'look',\n ],\n outputs: [\n 'onBlur',\n 'onFocus',\n 'valueChange',\n 'stateChange',\n 'onValueChanged',\n 'readonlyChange',\n 'disabledChange',\n 'onKeyDown',\n 'onKeyUp',\n 'onKeyPress',\n ],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n { provide: AXComponent, useExisting: AXTextBoxComponent },\n { provide: AXFocusableComponent, useExisting: AXTextBoxComponent },\n { provide: AXClearableComponent, useExisting: AXTextBoxComponent },\n { provide: AXValuableComponent, useExisting: AXTextBoxComponent },\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AXTextBoxComponent),\n multi: true,\n },\n ],\n})\nexport class AXTextBoxComponent extends classes(MXInputBaseValueComponent<string>, MXLookComponent) implements AfterContentInit {\n protected _updateOn: 'change' | 'blur' | 'submit' = 'change';\n\n @ViewChild('input', { static: true })\n private input: ElementRef<HTMLInputElement>;\n\n private _maskObj: InputMask<any>;\n\n private _maskOptions: AXMaskOptions = { mask: null };\n @Input('mask-options')\n public get maskOptions(): AXMaskOptions {\n return this._maskOptions;\n }\n\n public set maskOptions(value: AXMaskOptions) {\n this._maskOptions = value;\n this.setMask();\n }\n\n @Input()\n maxLength: number;\n\n @Input()\n type: string;\n\n @Input()\n autoComplete: string;\n\n @Input('class')\n classNames: string;\n\n @ContentChild(AXMaskOptionsDirective, { static: true })\n protected _maskOptionsContent: AXMaskOptionsDirective;\n\n ngAfterContentInit() {\n if (this._maskOptionsContent?.mask) {\n if (typeof this._maskOptionsContent.mask == 'string' || this._maskOptionsContent.mask instanceof RegExp) {\n Object.assign(this.maskOptions, {\n mask: this._maskOptionsContent.mask,\n unmask: false,\n });\n }\n if (typeof this._maskOptionsContent.mask == 'object') {\n Object.assign(this.maskOptions, this._maskOptionsContent.mask);\n }\n }\n //\n this.setMask();\n }\n\n private setMask() {\n if (this._maskObj) this._maskObj.destroy();\n //\n if (this.maskOptions?.mask) {\n this._maskObj = IMask(this.input.nativeElement, this.maskOptions);\n this._updateOn = 'submit';\n this._maskObj.on('accept', this._onComplete.bind(this));\n this._maskObj.on('complete', this._onComplete.bind(this));\n if (this.value) {\n this._maskObj.value = `${this.value}`;\n this._maskObj.updateValue();\n }\n }\n }\n\n private _onComplete(e: InputEvent) {\n this.commitValue(this._maskObj.value, e?.isTrusted ?? false);\n if (typeof this._maskOptionsContent?.updateValue === 'function') {\n this._maskOptionsContent?.updateValue(this._maskObj.value, this._maskObj.unmaskedValue);\n }\n }\n\n protected _handleModelChange(value: string | null) {\n this.commitValue(value, true);\n }\n}\n","<div class=\"ax-editor-container ax-look-{{look}} {{classNames}}\" [class.ax-state-disabled]=\"disabled\">\n <ng-content select=\"ax-prefix\"> </ng-content>\n <input #input class=\"ax-input\" [id]=\"id\" [name]=\"name\" [attr.autocomplete]=\"autoComplete\" [attr.type]=\"type\"\n [attr.placeholder]=\"placeholder\" [attr.maxlength]=\"maxLength\" [class.ax-state-disabled]=\"disabled\"\n [class.ax-state-readonly]=\"readonly\" [disabled]=\"disabled\" [readonly]=\"readonly\" [tabindex]=\"tabIndex\"\n [ngModel]=\"value\" (ngModelChange)=\"_handleModelChange($event)\" [ngModelOptions]=\"{ updateOn: _updateOn }\"\n (keydown)=\"emitOnKeydownEvent($event)\" (keyup)=\"emitOnKeyupEvent($event)\" (keypress)=\"emitOnKeypressEvent($event)\"\n (focus)=\"emitOnFocusEvent($event)\" (blur)=\"emitOnBlurEvent($event)\" />\n @if(input.value && !disabled && !readonly){\n <ng-content select=\"ax-clear-button\"></ng-content>\n }\n <ng-content select=\"ax-suffix\"> </ng-content>\n</div>\n<ng-content select=\"ax-validation-rule\"> </ng-content>\n<div class=\"ax-error-container\"></div>","import { AXButtonModule } from '@acorex/components/button';\nimport { AXCommonModule } from '@acorex/components/common';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { AXMaskOptionsDirective } from './mask-options.directive';\nimport { AXTextBoxComponent } from './text-box.component';\n\n@NgModule({\n imports: [CommonModule, AXCommonModule, FormsModule, AXButtonModule, AXDecoratorModule],\n exports: [AXTextBoxComponent, AXMaskOptionsDirective],\n declarations: [AXTextBoxComponent, AXMaskOptionsDirective],\n providers: [],\n})\nexport class AXTextBoxModule {}\n","/**\n * Generated bundle index. Do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AiB,CAC5E,EAAA,OAAA,EAAA,CAAA,kBAAkB,EAAE,sBAAsB,CAAA,EAAA,CAAA,CAAA,EAAA;+GAIzC,eAAe,EAAA,OAAA,EAAA,CALhB,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,cAAc,EAAE,iBAAiB,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAK3E,eAAe,EAAA,UAAA,EAAA,CAAA;kBAN3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,cAAc,EAAE,iBAAiB,CAAC;AACvF,oBAAA,OAAO,EAAE,CAAC,kBAAkB,EAAE,sBAAsB,CAAC;AACrD,oBAAA,YAAY,EAAE,CAAC,kBAAkB,EAAE,sBAAsB,CAAC;AAC1D,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA,CAAA;;;ACdD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-components-text-box.mjs","sources":["../../../../libs/components/text-box/src/lib/mask-options.directive.ts","../../../../libs/components/text-box/src/lib/text-box.component.ts","../../../../libs/components/text-box/src/lib/text-box.component.html","../../../../libs/components/text-box/src/lib/text-box.module.ts","../../../../libs/components/text-box/src/acorex-components-text-box.ts"],"sourcesContent":["import { Directive, EventEmitter, Input, Output } from '@angular/core';\nimport { MaskedOptions } from 'imask';\n\nexport type AXMaskOptions = MaskedOptions | any;\n\nexport interface AXMaskOptionsInterface {\n mask: MaskedOptions | string | RegExp;\n updateValue?: (masked: string, unmasked: string) => void;\n}\n\n@Directive({\n selector: 'ax-mask-options',\n})\nexport class AXMaskOptionsDirective implements AXMaskOptionsInterface {\n private _mask: MaskedOptions | string | RegExp;\n\n @Output()\n public onMaskChange = new EventEmitter<MaskedOptions | string | RegExp>();\n\n @Input()\n public get mask(): MaskedOptions | string | RegExp {\n return this._mask;\n }\n\n public set mask(v: MaskedOptions | string | RegExp) {\n this._mask = v;\n this.onMaskChange.emit(v);\n }\n\n @Input()\n updateValue?: (masked: string, unmasked: string) => void;\n}\n","/* eslint-disable @angular-eslint/no-inputs-metadata-property */\nimport {\n AXClearableComponent,\n AXComponent,\n AXFocusableComponent,\n AXValuableComponent,\n MXInputBaseValueComponent,\n MXLookComponent,\n} from '@acorex/components/common';\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n ElementRef,\n Input,\n ViewChild,\n ViewEncapsulation,\n forwardRef,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport IMask, { InputMask } from 'imask';\nimport { classes } from 'polytype';\nimport { AXMaskOptions, AXMaskOptionsDirective } from './mask-options.directive';\n\n/**\n * The Textbox is a component which detects user interaction and triggers a corresponding event\n *\n * @category Components\n */\n@Component({\n selector: 'ax-text-box',\n templateUrl: 'text-box.component.html',\n styleUrls: ['text-box.component.scss'],\n inputs: [\n 'disabled',\n 'tabIndex',\n 'readonly',\n 'value',\n 'state',\n 'name',\n 'id',\n 'placeholder',\n 'maxLength',\n 'allowNull',\n 'type',\n 'autoComplete',\n 'look',\n ],\n outputs: [\n 'onBlur',\n 'onFocus',\n 'valueChange',\n 'stateChange',\n 'onValueChanged',\n 'readonlyChange',\n 'disabledChange',\n 'onKeyDown',\n 'onKeyUp',\n 'onKeyPress',\n ],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n { provide: AXComponent, useExisting: AXTextBoxComponent },\n { provide: AXFocusableComponent, useExisting: AXTextBoxComponent },\n { provide: AXClearableComponent, useExisting: AXTextBoxComponent },\n { provide: AXValuableComponent, useExisting: AXTextBoxComponent },\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AXTextBoxComponent),\n multi: true,\n },\n ],\n})\nexport class AXTextBoxComponent extends classes(MXInputBaseValueComponent<string>, MXLookComponent) implements AfterContentInit {\n /** @ignore */\n protected _updateOn: 'change' | 'blur' | 'submit' = 'change';\n\n /** @ignore */\n @ViewChild('input', { static: true })\n private input: ElementRef<HTMLInputElement>;\n\n /** @ignore */\n private _maskObj: InputMask<any>;\n\n /** @ignore */\n private _maskOptions: AXMaskOptions = { mask: null };\n\n /**\n * This public getter provides access to the `_maskOptions` property, which holds the configuration options for the mask feature.\n */\n @Input('mask-options')\n public get maskOptions(): AXMaskOptions {\n return this._maskOptions;\n }\n\n /**\n * @param value {AXMaskOptions} - The new mask configuration options to be set.\n */\n public set maskOptions(value: AXMaskOptions) {\n this._maskOptions = value;\n this.setMask();\n }\n\n /**\n * This property defines the maximum number of characters that the input field can accept. It can be dynamically bound from a parent component template to enforce input length constraints.\n */\n @Input()\n maxLength: number;\n\n /**\n * This property determines the type of the input element (e.g., 'text', 'password', 'email', etc.). It can be dynamically bound from a parent component template to change the input field type based on different conditions or requirements.\n */\n @Input()\n type: string;\n\n /**\n * This property determines whether the input field should have autocomplete enabled and what type of autocomplete suggestions should be provided\n */\n @Input()\n autoComplete: string;\n\n /**\n * This will apply 'my-custom-class' and 'another-class' to the component's root element.\n */\n @Input('class')\n classNames: string;\n\n /** @ignore */\n @ContentChild(AXMaskOptionsDirective, { static: true })\n protected _maskOptionsContent: AXMaskOptionsDirective;\n\n /** @ignore */\n ngAfterContentInit() {\n if (this._maskOptionsContent?.mask) {\n if (typeof this._maskOptionsContent.mask == 'string' || this._maskOptionsContent.mask instanceof RegExp) {\n Object.assign(this.maskOptions, {\n mask: this._maskOptionsContent.mask,\n unmask: false,\n });\n }\n if (typeof this._maskOptionsContent.mask == 'object') {\n Object.assign(this.maskOptions, this._maskOptionsContent.mask);\n }\n }\n //\n this.setMask();\n }\n\n /** @ignore */\n private setMask() {\n if (this._maskObj) this._maskObj.destroy();\n //\n if (this.maskOptions?.mask) {\n this._maskObj = IMask(this.input.nativeElement, this.maskOptions);\n this._updateOn = 'submit';\n this._maskObj.on('accept', this._onComplete.bind(this));\n this._maskObj.on('complete', this._onComplete.bind(this));\n if (this.value) {\n this._maskObj.value = `${this.value}`;\n this._maskObj.updateValue();\n }\n }\n }\n\n /** @ignore */\n private _onComplete(e: InputEvent) {\n this.commitValue(this._maskObj.value, e?.isTrusted ?? false);\n if (typeof this._maskOptionsContent?.updateValue === 'function') {\n this._maskOptionsContent?.updateValue(this._maskObj.value, this._maskObj.unmaskedValue);\n }\n }\n\n /** @ignore */\n protected _handleModelChange(value: string | null) {\n this.commitValue(value, true);\n }\n}\n","<div class=\"ax-editor-container ax-look-{{look}} {{classNames}}\" [class.ax-state-disabled]=\"disabled\">\n <ng-content select=\"ax-prefix\"> </ng-content>\n <input #input class=\"ax-input\" [id]=\"id\" [name]=\"name\" [attr.autocomplete]=\"autoComplete\" [attr.type]=\"type\"\n [attr.placeholder]=\"placeholder\" [attr.maxlength]=\"maxLength\" [class.ax-state-disabled]=\"disabled\"\n [class.ax-state-readonly]=\"readonly\" [disabled]=\"disabled\" [readonly]=\"readonly\" [tabindex]=\"tabIndex\"\n [ngModel]=\"value\" (ngModelChange)=\"_handleModelChange($event)\" [ngModelOptions]=\"{ updateOn: _updateOn }\"\n (keydown)=\"emitOnKeydownEvent($event)\" (keyup)=\"emitOnKeyupEvent($event)\" (keypress)=\"emitOnKeypressEvent($event)\"\n (focus)=\"emitOnFocusEvent($event)\" (blur)=\"emitOnBlurEvent($event)\" />\n @if(input.value && !disabled && !readonly){\n <ng-content select=\"ax-clear-button\"></ng-content>\n }\n <ng-content select=\"ax-suffix\"> </ng-content>\n</div>\n<ng-content select=\"ax-validation-rule\"> </ng-content>\n<div class=\"ax-error-container\"></div>","import { AXButtonModule } from '@acorex/components/button';\nimport { AXCommonModule } from '@acorex/components/common';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { AXMaskOptionsDirective } from './mask-options.directive';\nimport { AXTextBoxComponent } from './text-box.component';\n\n@NgModule({\n imports: [CommonModule, AXCommonModule, FormsModule, AXButtonModule, AXDecoratorModule],\n exports: [AXTextBoxComponent, AXMaskOptionsDirective],\n declarations: [AXTextBoxComponent, AXMaskOptionsDirective],\n providers: [],\n})\nexport class AXTextBoxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;MAaa,sBAAsB,CAAA;AAHnC,IAAA,WAAA,GAAA;AAOS,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,YAAY,EAAmC,CAAC;AAc3E,KAAA;AAZC,IAAA,IACW,IAAI,GAAA;QACb,OAAO,IAAI,CAAC,KAAK,CAAC;KACnB;IAED,IAAW,IAAI,CAAC,CAAkC,EAAA;AAChD,QAAA,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;AACf,QAAA,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KAC3B;8GAdU,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;kGAAtB,sBAAsB,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,WAAA,EAAA,aAAA,EAAA,EAAA,OAAA,EAAA,EAAA,YAAA,EAAA,cAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;2FAAtB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAHlC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,iBAAiB;AAC5B,iBAAA,CAAA;8BAKQ,YAAY,EAAA,CAAA;sBADlB,MAAM;gBAII,IAAI,EAAA,CAAA;sBADd,KAAK;gBAWN,WAAW,EAAA,CAAA;sBADV,KAAK;;;AC7BR;AAyBA;;;;AAIG;AA8CG,MAAO,kBAAmB,SAAQ,OAAO,EAAC,yBAAiC,GAAE,eAAe,CAAC,CAAA;AA7CnG,IAAA,WAAA,GAAA;;;Q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AAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,iBAHX,kBAAkB,EAAE,sBAAsB,CAAA,EAAA,OAAA,EAAA,CAF/C,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,cAAc,EAAE,iBAAiB,CAC5E,EAAA,OAAA,EAAA,CAAA,kBAAkB,EAAE,sBAAsB,CAAA,EAAA,CAAA,CAAA,EAAA;+GAIzC,eAAe,EAAA,OAAA,EAAA,CALhB,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,cAAc,EAAE,iBAAiB,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAK3E,eAAe,EAAA,UAAA,EAAA,CAAA;kBAN3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,cAAc,EAAE,iBAAiB,CAAC;AACvF,oBAAA,OAAO,EAAE,CAAC,kBAAkB,EAAE,sBAAsB,CAAC;AACrD,oBAAA,YAAY,EAAE,CAAC,kBAAkB,EAAE,sBAAsB,CAAC;AAC1D,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA,CAAA;;;ACdD;;AAEG;;;;"}
|
@@ -29,8 +29,10 @@ class AXToastComponent extends MXBaseComponent {
|
|
29
29
|
super();
|
30
30
|
this.config = config;
|
31
31
|
this.dialogRef = dialogRef;
|
32
|
+
/** @ignore */
|
32
33
|
this._toastWidth = 100;
|
33
34
|
}
|
35
|
+
/** @ignore */
|
34
36
|
ngOnInit() {
|
35
37
|
super.ngOnInit();
|
36
38
|
if (this.config.timeOut) {
|
@@ -61,14 +63,17 @@ class AXToastComponent extends MXBaseComponent {
|
|
61
63
|
this._icon = this.config.icon;
|
62
64
|
}
|
63
65
|
}
|
66
|
+
/** @ignore */
|
64
67
|
_handleButtonClick(button) {
|
65
68
|
if (button.onClick) {
|
66
69
|
button.onClick({ source: button });
|
67
70
|
}
|
68
71
|
}
|
72
|
+
/** @ignore */
|
69
73
|
get __hostClass() {
|
70
74
|
return `ax-${this.config.color}`;
|
71
75
|
}
|
76
|
+
/** @ignore */
|
72
77
|
close() {
|
73
78
|
this.dialogRef.close({
|
74
79
|
component: this,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-toast.mjs","sources":["../../../../libs/components/toast/src/lib/toast.component.ts","../../../../libs/components/toast/src/lib/toast.component.html","../../../../libs/components/toast/src/lib/toast.config.ts","../../../../libs/components/toast/src/lib/toast.service.ts","../../../../libs/components/toast/src/lib/toast.module.ts","../../../../libs/components/toast/src/acorex-components-toast.ts"],"sourcesContent":["import { AXButtonItem } from '@acorex/components/button';\nimport { AXClosbaleComponent, AXComponentCloseEvent, MXBaseComponent } from '@acorex/components/common';\nimport { DIALOG_DATA, DialogRef } from '@angular/cdk/dialog';\nimport { ChangeDetectionStrategy, Component, HostBinding, Inject, OnInit, ViewEncapsulation } from '@angular/core';\nimport { AXToastData } from './toast.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-toast',\n templateUrl: './toast.component.html',\n styleUrls: ['./toast.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [{ provide: AXClosbaleComponent, useExisting: AXToastComponent }],\n})\nexport class AXToastComponent extends MXBaseComponent implements OnInit {\n protected _toastWidth = 100;\n\n protected _icon: string;\n\n /**\n * @ignore\n */\n constructor(\n @Inject(DIALOG_DATA)\n public config: AXToastData,\n private dialogRef: DialogRef<AXComponentCloseEvent>,\n ) {\n super();\n }\n\n override ngOnInit() {\n super.ngOnInit();\n if (this.config.timeOut) {\n setTimeout(() => {\n this.close();\n }, this.config.timeOut);\n }\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 'warning':\n this._icon = 'ax-icon ax-icon-warning';\n break;\n case 'danger':\n this._icon = 'ax-icon ax-icon-error';\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 _handleButtonClick(button: AXButtonItem) {\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-toast-icon ax-icon-solid {{ _icon }}\"></span>\n<div class=\"ax-toast-content\">\n <div class=\"ax-toast-title\" [class.ax-mb-2]=\"config.title && config.content\">{{ config.title | translate | async }}\n </div>\n <div class=\"ax-toast-content\" [innerHTML]=\"config.content\"></div>\n</div>\n@if(config.closeButton){\n<ax-close-button></ax-close-button>\n}\n@if(config.timeOutProgress && config.timeOut){\n<div class=\"ax-toast-progress\" [style.animation-duration.ms]=\"config.timeOut\"></div>\n}","import { AXLocation } from '@acorex/components/common';\nimport { AX_GLOBAL_CONFIG } from '@acorex/core/config';\nimport { InjectionToken, inject } from '@angular/core';\nimport { set } from 'lodash-es';\n\nexport interface AXToastConfig {\n gap: number;\n timeOut: number;\n timeOutProgress: boolean;\n location: AXLocation;\n}\n\nexport const AX_TOAST_CONFIG = new InjectionToken<AXToastConfig>('AX_TOAST_CONFIG', {\n providedIn: 'root',\n factory: () => {\n const global = inject(AX_GLOBAL_CONFIG);\n set(global, 'layout.toast', AX_TOAST_CONFIG);\n return AXToastDefaultConfig;\n },\n});\n\nexport const AXToastDefaultConfig: AXToastConfig = {\n gap: 5,\n timeOut: 2500,\n timeOutProgress: true,\n location: 'bottom-center',\n};\n\nexport type PartialToastConfig = Partial<AXToastConfig>;\n\nexport function toastConfig(config: PartialToastConfig = {}): AXToastConfig {\n const result = {\n ...AXToastDefaultConfig,\n ...config,\n };\n return result;\n}\n","import { Dialog } from '@angular/cdk/dialog';\nimport { GlobalPositionStrategy, ScrollStrategy, ScrollStrategyOptions } from '@angular/cdk/overlay';\nimport { Injectable, inject } from '@angular/core';\nimport { AXToastDisplayConfig, AXToastRef } from './toast.class';\nimport { AXToastComponent } from './toast.component';\nimport { AXToastConfig, AX_TOAST_CONFIG } from './toast.config';\n\n@Injectable()\nexport class AXToastService {\n private dialog: Dialog = inject(Dialog);\n private defaultConfig: AXToastConfig = inject(AX_TOAST_CONFIG);\n\n scrollStrategy: ScrollStrategy;\n\n constructor(private readonly scrollStrategyOptions: ScrollStrategyOptions) {\n this.scrollStrategy = this.scrollStrategyOptions.noop();\n }\n primary(content: string) {\n this.show({\n timeOut: this.defaultConfig.timeOut,\n color: 'primary',\n content: content,\n });\n }\n secondary(content: string) {\n this.show({\n timeOut: this.defaultConfig.timeOut,\n color: 'secondary',\n content: content,\n });\n }\n success(content: string) {\n this.show({\n timeOut: this.defaultConfig.timeOut,\n color: 'success',\n content: content,\n });\n }\n\n warning(content: string) {\n this.show({\n timeOut: this.defaultConfig.timeOut,\n color: 'warning',\n content: content,\n });\n }\n danger(content: string) {\n this.show({\n timeOut: this.defaultConfig.timeOut,\n color: 'danger',\n content: content,\n });\n }\n show(config: AXToastDisplayConfig): AXToastRef {\n const opt = Object.assign(\n {\n closeButton: true,\n location: this.defaultConfig.location ?? 'bottom-center',\n },\n config,\n );\n const gap = this.defaultConfig.gap;\n\n let positionStrategy = new GlobalPositionStrategy();\n const pos = this.getPosition(opt.location) + gap + 'px';\n switch (opt.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 }\n\n const dialogRef = this.dialog.open(AXToastComponent, {\n data: opt,\n autoFocus: '__no_element__',\n restoreFocus: true,\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 scrollStrategy: this.scrollStrategy,\n });\n\n const toastRef = dialogRef.componentInstance as AXToastComponent;\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.map((c) => c.componentInstance as AXToastComponent).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 { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXToastComponent } from './toast.component';\nimport { AXToastService } from './toast.service';\n\nconst COMPONENT = [AXToastComponent];\nconst MODULES = [CommonModule, AXButtonModule, AXDecoratorModule, AXLoadingModule, DialogModule, AXTranslationModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [AXToastService],\n})\nexport class AXToastModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from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BACvB,SAAS,EAAE,CAAC,cAAc,CAAC;AAC5B,iBAAA,CAAA;;;AClBD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-components-toast.mjs","sources":["../../../../libs/components/toast/src/lib/toast.component.ts","../../../../libs/components/toast/src/lib/toast.component.html","../../../../libs/components/toast/src/lib/toast.config.ts","../../../../libs/components/toast/src/lib/toast.service.ts","../../../../libs/components/toast/src/lib/toast.module.ts","../../../../libs/components/toast/src/acorex-components-toast.ts"],"sourcesContent":["import { AXButtonItem } from '@acorex/components/button';\nimport { AXClosbaleComponent, AXComponentCloseEvent, MXBaseComponent } from '@acorex/components/common';\nimport { DIALOG_DATA, DialogRef } from '@angular/cdk/dialog';\nimport { ChangeDetectionStrategy, Component, HostBinding, Inject, OnInit, ViewEncapsulation } from '@angular/core';\nimport { AXToastData } from './toast.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-toast',\n templateUrl: './toast.component.html',\n styleUrls: ['./toast.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [{ provide: AXClosbaleComponent, useExisting: AXToastComponent }],\n})\nexport class AXToastComponent extends MXBaseComponent implements OnInit {\n /** @ignore */\n protected _toastWidth = 100;\n\n /** @ignore */\n protected _icon: string;\n\n /**\n * @ignore\n */\n constructor(\n @Inject(DIALOG_DATA)\n public config: AXToastData,\n private dialogRef: DialogRef<AXComponentCloseEvent>,\n ) {\n super();\n }\n\n /** @ignore */\n override ngOnInit() {\n super.ngOnInit();\n if (this.config.timeOut) {\n setTimeout(() => {\n this.close();\n }, this.config.timeOut);\n }\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 'warning':\n this._icon = 'ax-icon ax-icon-warning';\n break;\n case 'danger':\n this._icon = 'ax-icon ax-icon-error';\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 /** @ignore */\n _handleButtonClick(button: AXButtonItem) {\n if (button.onClick) {\n button.onClick({ source: button });\n }\n }\n\n /** @ignore */\n @HostBinding('class')\n private get __hostClass(): string {\n return `ax-${this.config.color}`;\n }\n\n /** @ignore */\n close() {\n this.dialogRef.close({\n component: this,\n htmlElement: this.getHostElement(),\n });\n }\n}\n","<span class=\"ax-toast-icon ax-icon-solid {{ _icon }}\"></span>\n<div class=\"ax-toast-content\">\n <div class=\"ax-toast-title\" [class.ax-mb-2]=\"config.title && config.content\">{{ config.title | translate | async }}\n </div>\n <div class=\"ax-toast-content\" [innerHTML]=\"config.content\"></div>\n</div>\n@if(config.closeButton){\n<ax-close-button></ax-close-button>\n}\n@if(config.timeOutProgress && config.timeOut){\n<div class=\"ax-toast-progress\" [style.animation-duration.ms]=\"config.timeOut\"></div>\n}","import { AXLocation } from '@acorex/components/common';\nimport { AX_GLOBAL_CONFIG } from '@acorex/core/config';\nimport { InjectionToken, inject } from '@angular/core';\nimport { set } from 'lodash-es';\n\nexport interface AXToastConfig {\n gap: number;\n timeOut: number;\n timeOutProgress: boolean;\n location: AXLocation;\n}\n\nexport const AX_TOAST_CONFIG = new InjectionToken<AXToastConfig>('AX_TOAST_CONFIG', {\n providedIn: 'root',\n factory: () => {\n const global = inject(AX_GLOBAL_CONFIG);\n set(global, 'layout.toast', AX_TOAST_CONFIG);\n return AXToastDefaultConfig;\n },\n});\n\nexport const AXToastDefaultConfig: AXToastConfig = {\n gap: 5,\n timeOut: 2500,\n timeOutProgress: true,\n location: 'bottom-center',\n};\n\nexport type PartialToastConfig = Partial<AXToastConfig>;\n\nexport function toastConfig(config: PartialToastConfig = {}): AXToastConfig {\n const result = {\n ...AXToastDefaultConfig,\n ...config,\n };\n return result;\n}\n","import { Dialog } from '@angular/cdk/dialog';\nimport { GlobalPositionStrategy, ScrollStrategy, ScrollStrategyOptions } from '@angular/cdk/overlay';\nimport { Injectable, inject } from '@angular/core';\nimport { AXToastDisplayConfig, AXToastRef } from './toast.class';\nimport { AXToastComponent } from './toast.component';\nimport { AXToastConfig, AX_TOAST_CONFIG } from './toast.config';\n\n@Injectable()\nexport class AXToastService {\n private dialog: Dialog = inject(Dialog);\n private defaultConfig: AXToastConfig = inject(AX_TOAST_CONFIG);\n\n scrollStrategy: ScrollStrategy;\n\n constructor(private readonly scrollStrategyOptions: ScrollStrategyOptions) {\n this.scrollStrategy = this.scrollStrategyOptions.noop();\n }\n primary(content: string) {\n this.show({\n timeOut: this.defaultConfig.timeOut,\n color: 'primary',\n content: content,\n });\n }\n secondary(content: string) {\n this.show({\n timeOut: this.defaultConfig.timeOut,\n color: 'secondary',\n content: content,\n });\n }\n success(content: string) {\n this.show({\n timeOut: this.defaultConfig.timeOut,\n color: 'success',\n content: content,\n });\n }\n\n warning(content: string) {\n this.show({\n timeOut: this.defaultConfig.timeOut,\n color: 'warning',\n content: content,\n });\n }\n danger(content: string) {\n this.show({\n timeOut: this.defaultConfig.timeOut,\n color: 'danger',\n content: content,\n });\n }\n show(config: AXToastDisplayConfig): AXToastRef {\n const opt = Object.assign(\n {\n closeButton: true,\n location: this.defaultConfig.location ?? 'bottom-center',\n },\n config,\n );\n const gap = this.defaultConfig.gap;\n\n let positionStrategy = new GlobalPositionStrategy();\n const pos = this.getPosition(opt.location) + gap + 'px';\n switch (opt.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 }\n\n const dialogRef = this.dialog.open(AXToastComponent, {\n data: opt,\n autoFocus: '__no_element__',\n restoreFocus: true,\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 scrollStrategy: this.scrollStrategy,\n });\n\n const toastRef = dialogRef.componentInstance as AXToastComponent;\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.map((c) => c.componentInstance as AXToastComponent).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 { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXToastComponent } from './toast.component';\nimport { AXToastService } from './toast.service';\n\nconst COMPONENT = [AXToastComponent];\nconst MODULES = [CommonModule, AXButtonModule, AXDecoratorModule, AXLoadingModule, DialogModule, AXTranslationModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [AXToastService],\n})\nexport class AXToastModule {}\n","/**\n * Generated bundle index. Do not edit.\n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GAAG,SAAS,CAAC;oBACvB,SAAS,EAAE,CAAC,cAAc,CAAC;AAC5B,iBAAA,CAAA;;;AClBD;;AAEG;;;;"}
|
@@ -5,6 +5,10 @@ import { AXPopoverComponent } from '@acorex/components/popover';
|
|
5
5
|
import { OverlayModule } from '@angular/cdk/overlay';
|
6
6
|
import { CommonModule } from '@angular/common';
|
7
7
|
|
8
|
+
/**
|
9
|
+
* A component for displaying tooltips with additional information or context when hovering over elements.
|
10
|
+
* @category Components
|
11
|
+
*/
|
8
12
|
class AXTooltipComponent extends MXBaseComponent {
|
9
13
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXTooltipComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
10
14
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.2", type: AXTooltipComponent, selector: "ax-tooltip", inputs: { text: "text", position: "position" }, usesInheritance: true, ngImport: i0, template: "<div class=\"ax-tooltip-container\">\n <div class=\"ax-tooltip\">\n {{ text }}\n </div>\n <!-- <div class=\"ax-tooltip-tringle ax-tooltip-tringle-{{ position }}\"></div> -->\n</div>", styles: [".ax-dark .ax-tooltip-container{--ax-tooltip-background: 255, 255, 255;--ax-tooltip-color: 97, 97, 97}.ax-tooltip-container{position:relative;--ax-tooltip-background: 97, 97, 97;--ax-tooltip-color: 255, 255, 255}.ax-tooltip-container .ax-tooltip{display:block;padding:.25rem .5rem;background-color:rgba(var(--ax-tooltip-background));color:rgba(var(--ax-tooltip-color));border-radius:.25rem;font-size:.75rem;font-weight:400}\n"], encapsulation: i0.ViewEncapsulation.None }); }
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-tooltip.mjs","sources":["../../../../libs/components/tooltip/src/lib/tooltip.component.ts","../../../../libs/components/tooltip/src/lib/tooltip.component.html","../../../../libs/components/tooltip/src/lib/tooltip.directive.ts","../../../../libs/components/tooltip/src/lib/tooltip.module.ts","../../../../libs/components/tooltip/src/acorex-components-tooltip.ts"],"sourcesContent":["import { AXPlacement, MXBaseComponent } from '@acorex/components/common';\nimport { Component, Input, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'ax-tooltip',\n templateUrl: './tooltip.component.html',\n styleUrls: ['./tooltip.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXTooltipComponent extends MXBaseComponent {\n @Input()\n text: string;\n\n @Input()\n position: AXPlacement;\n}\n","<div class=\"ax-tooltip-container\">\n <div class=\"ax-tooltip\">\n {{ text }}\n </div>\n <!-- <div class=\"ax-tooltip-tringle ax-tooltip-tringle-{{ position }}\"></div> -->\n</div>","import { AXPlacementType, convertToPlacement } from '@acorex/components/common';\nimport { AXPopoverComponent } from '@acorex/components/popover';\nimport { Directive, ElementRef, Input, OnInit, TemplateRef, ViewContainerRef } from '@angular/core';\nimport { AXTooltipComponent } from './tooltip.component';\n\n@Directive({\n selector: '[axTooltip]',\n})\nexport class AXTooltipDirective implements OnInit {\n @Input('axTooltip')\n public content: string | TemplateRef<unknown>;\n\n private _placement: AXPlacementType = convertToPlacement('top');\n @Input('axTooltipPlacement')\n public get placement(): AXPlacementType {\n return this._placement;\n }\n public set placement(v: AXPlacementType) {\n this._placement = v;\n if (this.popupRef) {\n this.popupRef.placement = v;\n }\n }\n\n private _openAfter = 100;\n @Input('axTooltipOpenAfter')\n public get openAfter(): number {\n return this._openAfter;\n }\n public set openAfter(v: number) {\n this._openAfter = v;\n if (this.popupRef) {\n this.popupRef.openAfter = v;\n }\n }\n\n private _closeAfter = 100;\n @Input('axTooltipCloseAfter')\n public get closeAfter(): number {\n return this._closeAfter;\n }\n public set closeAfter(v: number) {\n this._closeAfter = v;\n if (this.popupRef) {\n this.popupRef.closeAfter = v;\n }\n }\n\n private popupRef: AXPopoverComponent;\n\n constructor(\n private elementRef: ElementRef,\n private vc: ViewContainerRef,\n ) {\n this.popupRef = this.vc.createComponent(AXPopoverComponent).instance;\n this.popupRef.target = this.elementRef.nativeElement;\n }\n\n ngOnInit(): void {\n this.popupRef.target = this.elementRef.nativeElement;\n this.popupRef.openOn = 'hover';\n this.popupRef.closeOn = 'leave';\n this.popupRef.placement = this.placement;\n this.popupRef.openAfter = this.openAfter;\n this.popupRef.closeAfter = this.closeAfter;\n if (typeof this.content === 'string') {\n this.popupRef.content = AXTooltipComponent;\n this.popupRef.context = { text: this.content };\n } else if (this.content instanceof TemplateRef) {\n this.popupRef.content = this.content;\n //this.popupRef.context = { text: this.content };\n }\n }\n}\n","import { OverlayModule } from '@angular/cdk/overlay';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXTooltipComponent } from './tooltip.component';\nimport { AXTooltipDirective } from './tooltip.directive';\n\nconst COMPONENT = [AXTooltipComponent, AXTooltipDirective];\nconst MODULES = [CommonModule, OverlayModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n})\nexport class AXTooltipModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;
|
1
|
+
{"version":3,"file":"acorex-components-tooltip.mjs","sources":["../../../../libs/components/tooltip/src/lib/tooltip.component.ts","../../../../libs/components/tooltip/src/lib/tooltip.component.html","../../../../libs/components/tooltip/src/lib/tooltip.directive.ts","../../../../libs/components/tooltip/src/lib/tooltip.module.ts","../../../../libs/components/tooltip/src/acorex-components-tooltip.ts"],"sourcesContent":["import { AXPlacement, MXBaseComponent } from '@acorex/components/common';\nimport { Component, Input, ViewEncapsulation } from '@angular/core';\n\n/**\n * A component for displaying tooltips with additional information or context when hovering over elements.\n * @category Components\n */\n@Component({\n selector: 'ax-tooltip',\n templateUrl: './tooltip.component.html',\n styleUrls: ['./tooltip.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXTooltipComponent extends MXBaseComponent {\n /**\n * The text content displayed in the tooltip.\n * @defaultValue 'string'\n */\n @Input()\n text: string;\n\n /**\n * Specifies the position of the tooltip relative to the target element.\n *\n * @type {AXPlacement}\n */\n @Input()\n position: AXPlacement;\n}\n","<div class=\"ax-tooltip-container\">\n <div class=\"ax-tooltip\">\n {{ text }}\n </div>\n <!-- <div class=\"ax-tooltip-tringle ax-tooltip-tringle-{{ position }}\"></div> -->\n</div>","import { AXPlacementType, convertToPlacement } from '@acorex/components/common';\nimport { AXPopoverComponent } from '@acorex/components/popover';\nimport { Directive, ElementRef, Input, OnInit, TemplateRef, ViewContainerRef } from '@angular/core';\nimport { AXTooltipComponent } from './tooltip.component';\n\n@Directive({\n selector: '[axTooltip]',\n})\nexport class AXTooltipDirective implements OnInit {\n @Input('axTooltip')\n public content: string | TemplateRef<unknown>;\n\n private _placement: AXPlacementType = convertToPlacement('top');\n @Input('axTooltipPlacement')\n public get placement(): AXPlacementType {\n return this._placement;\n }\n public set placement(v: AXPlacementType) {\n this._placement = v;\n if (this.popupRef) {\n this.popupRef.placement = v;\n }\n }\n\n private _openAfter = 100;\n @Input('axTooltipOpenAfter')\n public get openAfter(): number {\n return this._openAfter;\n }\n public set openAfter(v: number) {\n this._openAfter = v;\n if (this.popupRef) {\n this.popupRef.openAfter = v;\n }\n }\n\n private _closeAfter = 100;\n @Input('axTooltipCloseAfter')\n public get closeAfter(): number {\n return this._closeAfter;\n }\n public set closeAfter(v: number) {\n this._closeAfter = v;\n if (this.popupRef) {\n this.popupRef.closeAfter = v;\n }\n }\n\n private popupRef: AXPopoverComponent;\n\n constructor(\n private elementRef: ElementRef,\n private vc: ViewContainerRef,\n ) {\n this.popupRef = this.vc.createComponent(AXPopoverComponent).instance;\n this.popupRef.target = this.elementRef.nativeElement;\n }\n\n ngOnInit(): void {\n this.popupRef.target = this.elementRef.nativeElement;\n this.popupRef.openOn = 'hover';\n this.popupRef.closeOn = 'leave';\n this.popupRef.placement = this.placement;\n this.popupRef.openAfter = this.openAfter;\n this.popupRef.closeAfter = this.closeAfter;\n if (typeof this.content === 'string') {\n this.popupRef.content = AXTooltipComponent;\n this.popupRef.context = { text: this.content };\n } else if (this.content instanceof TemplateRef) {\n this.popupRef.content = this.content;\n //this.popupRef.context = { text: this.content };\n }\n }\n}\n","import { OverlayModule } from '@angular/cdk/overlay';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXTooltipComponent } from './tooltip.component';\nimport { AXTooltipDirective } from './tooltip.directive';\n\nconst COMPONENT = [AXTooltipComponent, AXTooltipDirective];\nconst MODULES = [CommonModule, OverlayModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n})\nexport class AXTooltipModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAGA;;;AAGG;AAOG,MAAO,kBAAmB,SAAQ,eAAe,CAAA;8GAA1C,kBAAkB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAlB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,kBAAkB,yHCb/B,6LAKM,EAAA,MAAA,EAAA,CAAA,0aAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;2FDQO,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAN9B,SAAS;+BACE,YAAY,EAAA,aAAA,EAGP,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAAA,6LAAA,EAAA,MAAA,EAAA,CAAA,0aAAA,CAAA,EAAA,CAAA;8BAQrC,IAAI,EAAA,CAAA;sBADH,KAAK;gBASN,QAAQ,EAAA,CAAA;sBADP,KAAK;;;MElBK,kBAAkB,CAAA;AAK7B,IAAA,IACW,SAAS,GAAA;QAClB,OAAO,I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Y,EAAE,CAAC,GAAG,SAAS,CAAC;AAC5B,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACrB,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACxB,iBAAA,CAAA;;;ACbD;;AAEG;;;;"}
|
@@ -50,6 +50,8 @@ class AXUploadRequest {
|
|
50
50
|
this.estimateTime = computed(() => this._estimateTime());
|
51
51
|
this._status = signal('new');
|
52
52
|
this.status = computed(() => this._status());
|
53
|
+
this._message = signal(null);
|
54
|
+
this.message = computed(() => this._message());
|
53
55
|
this.bytesTransferred = 0;
|
54
56
|
}
|
55
57
|
estimateTimeRemaining(bytesTransferred) {
|
@@ -84,6 +86,17 @@ class AXUploadRequest {
|
|
84
86
|
this.bytesTransferred = 0;
|
85
87
|
this._estimateTime.set(0);
|
86
88
|
this._progress.set(0);
|
89
|
+
if (this.onCancel)
|
90
|
+
this.onCancel(this);
|
91
|
+
}
|
92
|
+
error(message) {
|
93
|
+
this._status.set('failed');
|
94
|
+
this.bytesTransferred = 0;
|
95
|
+
this._estimateTime.set(0);
|
96
|
+
this._progress.set(0);
|
97
|
+
this._message.set(message);
|
98
|
+
if (this.onFailed)
|
99
|
+
this.onFailed(this);
|
87
100
|
}
|
88
101
|
finish(data) {
|
89
102
|
this._status.set('completed');
|
@@ -311,17 +324,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImpor
|
|
311
324
|
}]
|
312
325
|
}] });
|
313
326
|
|
327
|
+
/**
|
328
|
+
* A component that displays a list of uploaded files.
|
329
|
+
* @category Components
|
330
|
+
*/
|
314
331
|
class AXUploaderListComponent extends AXBasePageComponent {
|
315
332
|
constructor() {
|
316
333
|
super(...arguments);
|
334
|
+
/** @ignore */
|
317
335
|
this.uploadService = inject(AXUploaderService);
|
318
336
|
}
|
319
337
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXUploaderListComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
320
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.2", type: AXUploaderListComponent, selector: "ax-uploader-list", usesInheritance: true, ngImport: i0, template: "@if((uploadService.totalEstimateTime | async) > 0)\n{\n<div class=\"ax-uploader-progress-status\">\n <div>{{ (uploadService.totalEstimateTime | async) | format: 'timeleft' | async }}</div>\n <button (click)=\"uploadService.cancelAll()\">{{ 'cancel' | translate | async }}</button>\n</div>\n}\n<ul class=\"ax-uploader-list-items\">\n @for (item of uploadService.files | async; track item.name) {\n <li>\n <div class=\"ax-file ax-bg-success-500\">\n <span>{{ item.ext }}</span>\n </div>\n <div class=\"ax-item-container\">\n <div class=\"ax-item-name\" [title]=\"item.name\">{{ item.name }}</div>\n <div
|
338
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.2", type: AXUploaderListComponent, selector: "ax-uploader-list", usesInheritance: true, ngImport: i0, template: "@if((uploadService.totalEstimateTime | async) > 0)\n{\n<div class=\"ax-uploader-progress-status\">\n <div>{{ (uploadService.totalEstimateTime | async) | format: 'timeleft' | async }}</div>\n <button (click)=\"uploadService.cancelAll()\">{{ 'cancel' | translate | async }}</button>\n</div>\n}\n<ul class=\"ax-uploader-list-items\">\n @for (item of uploadService.files | async; track item.name) {\n <li>\n <div class=\"ax-file ax-bg-success-500\">\n <span>{{ item.ext }}</span>\n </div>\n <div class=\"ax-item-container\">\n <div class=\"ax-item-name\" [title]=\"item.name\">{{ item.name }}</div>\n <div class=\"ax-status\">\n @switch (item.status()) {\n @case ('inprogress') {\n <span>{{ item.size | format: 'filesize' | async }}</span> / {{ item.estimateTime() | format: 'timeleft' | async\n }}\n }\n @case ('failed') {\n <span class=\"ax-state-failed\">{{ item.message() }}</span>\n }\n }\n </div>\n </div>\n <div class=\"ax-status\">\n @switch (item.status()) {\n @case ('completed') {\n <i class=\"ax-icon ax-icon-solid ax-icon-check-circle ax-state-completed\"></i>\n }\n @case ('canceled') {\n <span class=\"ax-state-canceled\">{{ 'canceled' | translate | async }}</span>\n }\n @case ('failed') {\n <span class=\"ax-state-failed\">{{ 'failed' | translate | async }}</span>\n }\n @default {\n <ax-circular-progress [size]=\"22\" [stroke]=\"6\" [progress]=\"item.progress()\" class=\"ax-show\">\n </ax-circular-progress>\n <i class=\"ax-icon ax-icon-solid ax-icon-close ax-hide\" (click)=\"item.cancel()\"\n title=\"{{ 'cancel' | translate | async }}\"></i>\n }\n }\n </div>\n </li>\n }\n</ul>", styles: [".ax-dark ax-uploader-list .ax-uploader-progress-status{border-color:rgba(var(--ax-color-primary-500));background-color:rgba(var(--ax-color-primary-500),.25);color:rgba(var(--ax-color-primary-fore))}ax-uploader-list .ax-uploader-progress-status{display:flex;align-items:center;justify-content:space-between;border-bottom-width:1px;border-top-width:1px;border-color:rgba(var(--ax-color-primary-200));background-color:rgba(var(--ax-color-primary-200));padding:.5rem .75rem;font-size:.875rem;line-height:1.25rem;color:rgba(var(--ax-color-primary-fore-tint))}ax-uploader-list .ax-uploader-list-items{max-height:75vh;width:100%;overflow-y:auto;overflow-x:hidden;padding:.5rem 1rem;gap:.5rem;display:flex;flex-direction:column}ax-uploader-list .ax-uploader-list-items li{display:flex;align-items:center;font-size:.875rem;line-height:1.25rem;gap:1rem;width:100%}ax-uploader-list .ax-uploader-list-items li .ax-item-container{display:flex;flex-direction:column;flex:1;-webkit-user-select:none;user-select:none}ax-uploader-list .ax-uploader-list-items li .ax-item-container .ax-item-name{font-size:.875rem;line-height:1.25rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block;width:12rem}ax-uploader-list .ax-uploader-list-items li .ax-status{position:relative;color:rgba(var(--ax-color-black),.5)}ax-uploader-list .ax-uploader-list-items li .ax-status .ax-icon{font-size:1.375rem}ax-uploader-list .ax-uploader-list-items li .ax-status .ax-icon-close{cursor:pointer}ax-uploader-list .ax-uploader-list-items li .ax-status .ax-state-canceled{color:rgba(var(--ax-color-neutral-500))}ax-uploader-list .ax-uploader-list-items li .ax-status .ax-state-failed{color:rgba(var(--ax-color-danger-500))}ax-uploader-list .ax-uploader-list-items li .ax-status .ax-state-completed{color:rgba(var(--ax-color-success-500))}ax-uploader-list .ax-uploader-list-items li:hover .ax-hide{display:flex!important}ax-uploader-list .ax-uploader-list-items li:hover .ax-show{display:none!important}ax-uploader-list .ax-uploader-list-items li .ax-show{display:flex!important}ax-uploader-list .ax-uploader-list-items li .ax-hide{display:none!important}.ax-file{position:relative;display:flex;align-items:center;justify-content:center;width:1.5rem;aspect-ratio:.7;border-radius:.25rem;color:rgba(var(--ax-color-white))}.ax-file>*{position:absolute;bottom:.3rem;font-weight:700;font-size:.65rem;line-height:.65rem}.ax-file:before{content:\"\";position:absolute;top:0;right:0;border-width:0 12px 12px 0;border-color:rgba(var(--ax-color-surface)) rgba(var(--ax-color-surface)) rgba(var(--ax-color-black),.3) rgba(var(--ax-color-black),.3)}\n"], dependencies: [{ kind: "component", type: i1.AXCircularProgressComponent, selector: "ax-circular-progress", inputs: ["color", "progress", "stroke", "size"], outputs: ["ValueChange", "strokeChange", "sizeChange"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: i4.AXFormatPipe, name: "format" }], encapsulation: i0.ViewEncapsulation.None }); }
|
321
339
|
}
|
322
340
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXUploaderListComponent, decorators: [{
|
323
341
|
type: Component,
|
324
|
-
args: [{ selector: 'ax-uploader-list', encapsulation: ViewEncapsulation.None, template: "@if((uploadService.totalEstimateTime | async) > 0)\n{\n<div class=\"ax-uploader-progress-status\">\n <div>{{ (uploadService.totalEstimateTime | async) | format: 'timeleft' | async }}</div>\n <button (click)=\"uploadService.cancelAll()\">{{ 'cancel' | translate | async }}</button>\n</div>\n}\n<ul class=\"ax-uploader-list-items\">\n @for (item of uploadService.files | async; track item.name) {\n <li>\n <div class=\"ax-file ax-bg-success-500\">\n <span>{{ item.ext }}</span>\n </div>\n <div class=\"ax-item-container\">\n <div class=\"ax-item-name\" [title]=\"item.name\">{{ item.name }}</div>\n <div
|
342
|
+
args: [{ selector: 'ax-uploader-list', encapsulation: ViewEncapsulation.None, template: "@if((uploadService.totalEstimateTime | async) > 0)\n{\n<div class=\"ax-uploader-progress-status\">\n <div>{{ (uploadService.totalEstimateTime | async) | format: 'timeleft' | async }}</div>\n <button (click)=\"uploadService.cancelAll()\">{{ 'cancel' | translate | async }}</button>\n</div>\n}\n<ul class=\"ax-uploader-list-items\">\n @for (item of uploadService.files | async; track item.name) {\n <li>\n <div class=\"ax-file ax-bg-success-500\">\n <span>{{ item.ext }}</span>\n </div>\n <div class=\"ax-item-container\">\n <div class=\"ax-item-name\" [title]=\"item.name\">{{ item.name }}</div>\n <div class=\"ax-status\">\n @switch (item.status()) {\n @case ('inprogress') {\n <span>{{ item.size | format: 'filesize' | async }}</span> / {{ item.estimateTime() | format: 'timeleft' | async\n }}\n }\n @case ('failed') {\n <span class=\"ax-state-failed\">{{ item.message() }}</span>\n }\n }\n </div>\n </div>\n <div class=\"ax-status\">\n @switch (item.status()) {\n @case ('completed') {\n <i class=\"ax-icon ax-icon-solid ax-icon-check-circle ax-state-completed\"></i>\n }\n @case ('canceled') {\n <span class=\"ax-state-canceled\">{{ 'canceled' | translate | async }}</span>\n }\n @case ('failed') {\n <span class=\"ax-state-failed\">{{ 'failed' | translate | async }}</span>\n }\n @default {\n <ax-circular-progress [size]=\"22\" [stroke]=\"6\" [progress]=\"item.progress()\" class=\"ax-show\">\n </ax-circular-progress>\n <i class=\"ax-icon ax-icon-solid ax-icon-close ax-hide\" (click)=\"item.cancel()\"\n title=\"{{ 'cancel' | translate | async }}\"></i>\n }\n }\n </div>\n </li>\n }\n</ul>", styles: [".ax-dark ax-uploader-list .ax-uploader-progress-status{border-color:rgba(var(--ax-color-primary-500));background-color:rgba(var(--ax-color-primary-500),.25);color:rgba(var(--ax-color-primary-fore))}ax-uploader-list .ax-uploader-progress-status{display:flex;align-items:center;justify-content:space-between;border-bottom-width:1px;border-top-width:1px;border-color:rgba(var(--ax-color-primary-200));background-color:rgba(var(--ax-color-primary-200));padding:.5rem .75rem;font-size:.875rem;line-height:1.25rem;color:rgba(var(--ax-color-primary-fore-tint))}ax-uploader-list .ax-uploader-list-items{max-height:75vh;width:100%;overflow-y:auto;overflow-x:hidden;padding:.5rem 1rem;gap:.5rem;display:flex;flex-direction:column}ax-uploader-list .ax-uploader-list-items li{display:flex;align-items:center;font-size:.875rem;line-height:1.25rem;gap:1rem;width:100%}ax-uploader-list .ax-uploader-list-items li .ax-item-container{display:flex;flex-direction:column;flex:1;-webkit-user-select:none;user-select:none}ax-uploader-list .ax-uploader-list-items li .ax-item-container .ax-item-name{font-size:.875rem;line-height:1.25rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block;width:12rem}ax-uploader-list .ax-uploader-list-items li .ax-status{position:relative;color:rgba(var(--ax-color-black),.5)}ax-uploader-list .ax-uploader-list-items li .ax-status .ax-icon{font-size:1.375rem}ax-uploader-list .ax-uploader-list-items li .ax-status .ax-icon-close{cursor:pointer}ax-uploader-list .ax-uploader-list-items li .ax-status .ax-state-canceled{color:rgba(var(--ax-color-neutral-500))}ax-uploader-list .ax-uploader-list-items li .ax-status .ax-state-failed{color:rgba(var(--ax-color-danger-500))}ax-uploader-list .ax-uploader-list-items li .ax-status .ax-state-completed{color:rgba(var(--ax-color-success-500))}ax-uploader-list .ax-uploader-list-items li:hover .ax-hide{display:flex!important}ax-uploader-list .ax-uploader-list-items li:hover .ax-show{display:none!important}ax-uploader-list .ax-uploader-list-items li .ax-show{display:flex!important}ax-uploader-list .ax-uploader-list-items li .ax-hide{display:none!important}.ax-file{position:relative;display:flex;align-items:center;justify-content:center;width:1.5rem;aspect-ratio:.7;border-radius:.25rem;color:rgba(var(--ax-color-white))}.ax-file>*{position:absolute;bottom:.3rem;font-weight:700;font-size:.65rem;line-height:.65rem}.ax-file:before{content:\"\";position:absolute;top:0;right:0;border-width:0 12px 12px 0;border-color:rgba(var(--ax-color-surface)) rgba(var(--ax-color-surface)) rgba(var(--ax-color-black),.3) rgba(var(--ax-color-black),.3)}\n"] }]
|
325
343
|
}] });
|
326
344
|
|
327
345
|
var uploaderList_component = /*#__PURE__*/Object.freeze({
|
@@ -329,14 +347,29 @@ var uploaderList_component = /*#__PURE__*/Object.freeze({
|
|
329
347
|
AXUploaderListComponent: AXUploaderListComponent
|
330
348
|
});
|
331
349
|
|
350
|
+
/**
|
351
|
+
* A container for managing the uploader dialog with collapse and expand animations.
|
352
|
+
* @category Components
|
353
|
+
*/
|
332
354
|
class AXUploaderDialogContainerComponent {
|
333
355
|
constructor() {
|
356
|
+
/** @ignore */
|
334
357
|
this.parent = inject(AXClosbaleComponent);
|
358
|
+
/**
|
359
|
+
* Indicates whether the component is in a collapsed state.
|
360
|
+
* @defaultValue false
|
361
|
+
*/
|
335
362
|
this.isCollapsed = false;
|
336
363
|
}
|
364
|
+
/**
|
365
|
+
* Closes the parent dialog or container.
|
366
|
+
*/
|
337
367
|
close() {
|
338
368
|
this.parent.close();
|
339
369
|
}
|
370
|
+
/**
|
371
|
+
* Toggles the collapsed state of the component.
|
372
|
+
*/
|
340
373
|
toggle() {
|
341
374
|
this.isCollapsed = !this.isCollapsed;
|
342
375
|
}
|
@@ -362,6 +395,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImpor
|
|
362
395
|
], template: "<div class=\"ax-uploader-list-header\">\n <div>{{'Uploading' | translate | async }}</div>\n <div>\n <i class=\"ax-icon\" [ngClass]=\"{ 'ax-icon-chevron-down': !isCollapsed, 'ax-icon-chevron-up': isCollapsed }\"\n (click)=\"toggle()\"></i>\n <i class=\"ax-icon ax-icon-close\" (click)=\"close()\"></i>\n </div>\n</div>\n<div [@collapse]=\"isCollapsed\">\n <ax-uploader-list></ax-uploader-list>\n</div>", styles: ["ax-uploader-dialog-container{display:block;background-color:rgba(var(--ax-color-surface));-webkit-border-top-left-radius:.75rem;-webkit-border-top-right-radius:.75rem;-moz-border-radius-topleft:.75rem;-moz-border-radius-topright:.75rem;border-top-left-radius:.75rem;border-top-right-radius:.75rem;overflow:hidden;box-shadow:-1px -1px 10px #00000029;border:1px solid;border-color:rgba(var(--ax-color-border-default));outline-color:rgba(var(--ax-color-primary-500))}ax-uploader-dialog-container .ax-uploader-list-header{display:flex;justify-content:space-between;background-color:rgba(var(--ax-color-on-surface));padding:.75rem 1rem;font-weight:500;color:rgba(var(--ax-color-on-surface-fore))}ax-uploader-dialog-container .ax-uploader-list-header .ax-icon{margin-inline-start:.5rem;cursor:pointer}ax-uploader-dialog-container .ax-uploader-list-header .ax-icon:hover{opacity:.75}\n"] }]
|
363
396
|
}] });
|
364
397
|
|
398
|
+
/**
|
399
|
+
* A component that provides a drop zone area for uploading files.
|
400
|
+
* @category Components
|
401
|
+
*/
|
365
402
|
class AXUploaderDropZoneComponent extends MXBaseComponent {
|
366
403
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXUploaderDropZoneComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
367
404
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.2", type: AXUploaderDropZoneComponent, selector: "ax-uploader-drop-zone", usesInheritance: true, ngImport: i0, template: "<div class=\"ax-uploader-drop-zone-container\" axUploaderZone>\n <ax-icon class=\"ax-icon ax-icon-upload\"></ax-icon>\n <div class=\"ax-uploader-drop-zone-description\">\n <span>Drag & Drop or <a href=\"#\">Choose file</a> to upload</span>\n <p>SVG, PNG, JPG or GIF (MAX. 800x400px)</p>\n </div>\n</div>", styles: [".ax-uploader-drop-zone-container{display:flex;flex-direction:column;align-items:center;justify-content:center;border-radius:.5rem;margin:1rem;padding:1rem;gap:1rem;border:2px dashed;border-color:rgba(var(--ax-color-border-default))}.ax-uploader-drop-zone-container:hover{border-color:rgba(var(--ax-color-primary-500));background-color:rgba(var(--ax-color-primary-50))}.ax-uploader-drop-zone-container ax-icon{font-size:1.875rem;line-height:2.25rem;color:#a3a3a3}.ax-uploader-drop-zone-container .ax-uploader-drop-zone-description{display:flex;flex-direction:column;gap:.5rem}.ax-uploader-drop-zone-container .ax-uploader-drop-zone-description a{color:rgba(var(--ax-color-primary-500))}.ax-uploader-drop-zone-container .ax-uploader-drop-zone-description p{font-size:.875rem;line-height:1.25rem;color:#a3a3a3}\n"], dependencies: [{ kind: "component", type: i1$2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "directive", type: AXUploaderZoneDirective, selector: "[axUploaderZone]", inputs: ["multiple", "accept"], outputs: ["onChanged", "onFileUploadComplete", "onFilesUploadComplete"] }], encapsulation: i0.ViewEncapsulation.None }); }
|