@acorex/components 21.0.0-next.3 → 21.0.0-next.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion/index.d.ts +0 -1
- package/autocomplete/index.d.ts +23 -9
- package/button/index.d.ts +38 -17
- package/chips/index.d.ts +3 -8
- package/code-editor/README.md +291 -1
- package/code-editor/index.d.ts +260 -12
- package/command/index.d.ts +1 -0
- package/conversation2/README.md +426 -0
- package/conversation2/index.d.ts +6139 -0
- package/data-table/index.d.ts +79 -7
- package/dialog/index.d.ts +1 -1
- package/drawer/README.md +2 -2
- package/drawer/index.d.ts +33 -57
- package/drawer-legacy/README.md +3 -0
- package/drawer-legacy/index.d.ts +86 -0
- package/editor/README.md +3 -0
- package/editor/index.d.ts +79 -0
- package/fesm2022/acorex-components-accordion.mjs +19 -24
- package/fesm2022/acorex-components-accordion.mjs.map +1 -1
- package/fesm2022/acorex-components-action-sheet.mjs +12 -12
- package/fesm2022/acorex-components-action-sheet.mjs.map +1 -1
- package/fesm2022/acorex-components-alert.mjs +14 -14
- package/fesm2022/acorex-components-alert.mjs.map +1 -1
- package/fesm2022/acorex-components-aspect-ratio.mjs +4 -4
- package/fesm2022/acorex-components-aspect-ratio.mjs.map +1 -1
- package/fesm2022/acorex-components-audio-wave.mjs +12 -11
- package/fesm2022/acorex-components-audio-wave.mjs.map +1 -1
- package/fesm2022/acorex-components-autocomplete.mjs +30 -13
- package/fesm2022/acorex-components-autocomplete.mjs.map +1 -1
- package/fesm2022/acorex-components-avatar.mjs +13 -13
- package/fesm2022/acorex-components-avatar.mjs.map +1 -1
- package/fesm2022/acorex-components-badge.mjs +10 -10
- package/fesm2022/acorex-components-badge.mjs.map +1 -1
- package/fesm2022/acorex-components-bottom-navigation.mjs +12 -12
- package/fesm2022/acorex-components-bottom-navigation.mjs.map +1 -1
- package/fesm2022/acorex-components-breadcrumbs.mjs +12 -12
- package/fesm2022/acorex-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/acorex-components-button-group.mjs +17 -19
- package/fesm2022/acorex-components-button-group.mjs.map +1 -1
- package/fesm2022/acorex-components-button.mjs +78 -29
- package/fesm2022/acorex-components-button.mjs.map +1 -1
- package/fesm2022/acorex-components-calendar.mjs +18 -18
- package/fesm2022/acorex-components-calendar.mjs.map +1 -1
- package/fesm2022/acorex-components-check-box.mjs +11 -11
- package/fesm2022/acorex-components-check-box.mjs.map +1 -1
- package/fesm2022/acorex-components-chips.mjs +12 -14
- package/fesm2022/acorex-components-chips.mjs.map +1 -1
- package/fesm2022/acorex-components-circular-progress.mjs +13 -11
- package/fesm2022/acorex-components-circular-progress.mjs.map +1 -1
- package/fesm2022/acorex-components-code-editor.mjs +494 -162
- package/fesm2022/acorex-components-code-editor.mjs.map +1 -1
- package/fesm2022/acorex-components-collapse.mjs +13 -28
- package/fesm2022/acorex-components-collapse.mjs.map +1 -1
- package/fesm2022/acorex-components-color-box.mjs +11 -11
- package/fesm2022/acorex-components-color-box.mjs.map +1 -1
- package/fesm2022/acorex-components-color-palette.mjs +32 -32
- package/fesm2022/acorex-components-color-palette.mjs.map +1 -1
- package/fesm2022/acorex-components-command.mjs +18 -11
- package/fesm2022/acorex-components-command.mjs.map +1 -1
- package/fesm2022/acorex-components-comment.mjs +34 -34
- package/fesm2022/acorex-components-comment.mjs.map +1 -1
- package/fesm2022/acorex-components-conversation.mjs +56 -65
- package/fesm2022/acorex-components-conversation.mjs.map +1 -1
- package/fesm2022/acorex-components-conversation2.mjs +17641 -0
- package/fesm2022/acorex-components-conversation2.mjs.map +1 -0
- package/fesm2022/acorex-components-cron-job.mjs +53 -53
- package/fesm2022/acorex-components-cron-job.mjs.map +1 -1
- package/fesm2022/acorex-components-data-list.mjs +5 -5
- package/fesm2022/acorex-components-data-list.mjs.map +1 -1
- package/fesm2022/acorex-components-data-pager.mjs +53 -41
- package/fesm2022/acorex-components-data-pager.mjs.map +1 -1
- package/fesm2022/acorex-components-data-table.mjs +462 -105
- package/fesm2022/acorex-components-data-table.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-box.mjs +10 -10
- package/fesm2022/acorex-components-datetime-box.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-input.mjs +8 -8
- package/fesm2022/acorex-components-datetime-input.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-picker.mjs +11 -11
- package/fesm2022/acorex-components-datetime-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-decorators.mjs +96 -54
- package/fesm2022/acorex-components-decorators.mjs.map +1 -1
- package/fesm2022/acorex-components-dialog.mjs +26 -16
- package/fesm2022/acorex-components-dialog.mjs.map +1 -1
- package/fesm2022/acorex-components-drawer-legacy.mjs +218 -0
- package/fesm2022/acorex-components-drawer-legacy.mjs.map +1 -0
- package/fesm2022/acorex-components-drawer.mjs +66 -150
- package/fesm2022/acorex-components-drawer.mjs.map +1 -1
- package/fesm2022/acorex-components-dropdown-button.mjs +9 -9
- package/fesm2022/acorex-components-dropdown-button.mjs.map +1 -1
- package/fesm2022/acorex-components-dropdown.mjs +18 -16
- package/fesm2022/acorex-components-dropdown.mjs.map +1 -1
- package/fesm2022/acorex-components-editor.mjs +195 -0
- package/fesm2022/acorex-components-editor.mjs.map +1 -0
- package/fesm2022/acorex-components-file-explorer.mjs +28 -28
- package/fesm2022/acorex-components-file-explorer.mjs.map +1 -1
- package/fesm2022/acorex-components-flow-chart.mjs +18 -18
- package/fesm2022/acorex-components-flow-chart.mjs.map +1 -1
- package/fesm2022/acorex-components-form.mjs +52 -35
- package/fesm2022/acorex-components-form.mjs.map +1 -1
- package/fesm2022/acorex-components-grid-layout-builder.mjs +14 -15
- package/fesm2022/acorex-components-grid-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-components-image-editor.mjs +166 -126
- package/fesm2022/acorex-components-image-editor.mjs.map +1 -1
- package/fesm2022/acorex-components-image.mjs +10 -10
- package/fesm2022/acorex-components-image.mjs.map +1 -1
- package/fesm2022/acorex-components-json-viewer.mjs +9 -9
- package/fesm2022/acorex-components-json-viewer.mjs.map +1 -1
- package/fesm2022/acorex-components-kanban.mjs +9 -7
- package/fesm2022/acorex-components-kanban.mjs.map +1 -1
- package/fesm2022/acorex-components-kbd.mjs +8 -8
- package/fesm2022/acorex-components-kbd.mjs.map +1 -1
- package/fesm2022/acorex-components-label.mjs +9 -9
- package/fesm2022/acorex-components-label.mjs.map +1 -1
- package/fesm2022/acorex-components-list.mjs +10 -10
- package/fesm2022/acorex-components-list.mjs.map +1 -1
- package/fesm2022/acorex-components-loading-dialog.mjs +22 -13
- package/fesm2022/acorex-components-loading-dialog.mjs.map +1 -1
- package/fesm2022/acorex-components-loading.mjs +23 -23
- package/fesm2022/acorex-components-loading.mjs.map +1 -1
- package/fesm2022/acorex-components-map.mjs +16 -15
- package/fesm2022/acorex-components-map.mjs.map +1 -1
- package/fesm2022/acorex-components-media-viewer.mjs +78 -97
- package/fesm2022/acorex-components-media-viewer.mjs.map +1 -1
- package/fesm2022/acorex-components-menu.mjs +24 -24
- package/fesm2022/acorex-components-menu.mjs.map +1 -1
- package/fesm2022/{acorex-components-modal-acorex-components-modal-h5Y-qcbh.mjs → acorex-components-modal-acorex-components-modal-BmmAkCKJ.mjs} +24 -24
- package/fesm2022/acorex-components-modal-acorex-components-modal-BmmAkCKJ.mjs.map +1 -0
- package/fesm2022/acorex-components-modal-modal-content.component-5GqTzNOs.mjs +214 -0
- package/fesm2022/acorex-components-modal-modal-content.component-5GqTzNOs.mjs.map +1 -0
- package/fesm2022/acorex-components-modal.mjs +1 -1
- package/fesm2022/acorex-components-navbar.mjs +9 -9
- package/fesm2022/acorex-components-navbar.mjs.map +1 -1
- package/fesm2022/acorex-components-notification.mjs +16 -23
- package/fesm2022/acorex-components-notification.mjs.map +1 -1
- package/fesm2022/acorex-components-number-box-legacy.mjs +412 -0
- package/fesm2022/acorex-components-number-box-legacy.mjs.map +1 -0
- package/fesm2022/acorex-components-number-box.mjs +98 -331
- package/fesm2022/acorex-components-number-box.mjs.map +1 -1
- package/fesm2022/acorex-components-otp.mjs +10 -10
- package/fesm2022/acorex-components-otp.mjs.map +1 -1
- package/fesm2022/acorex-components-page.mjs +10 -10
- package/fesm2022/acorex-components-page.mjs.map +1 -1
- package/fesm2022/acorex-components-paint.mjs +35 -40
- package/fesm2022/acorex-components-paint.mjs.map +1 -1
- package/fesm2022/acorex-components-password-box.mjs +13 -13
- package/fesm2022/acorex-components-password-box.mjs.map +1 -1
- package/fesm2022/acorex-components-pdf-reader.mjs +8 -8
- package/fesm2022/acorex-components-pdf-reader.mjs.map +1 -1
- package/fesm2022/acorex-components-phone-box.mjs +10 -10
- package/fesm2022/acorex-components-phone-box.mjs.map +1 -1
- package/fesm2022/acorex-components-picker.mjs +17 -17
- package/fesm2022/acorex-components-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-popover.mjs +12 -12
- package/fesm2022/acorex-components-popover.mjs.map +1 -1
- package/fesm2022/acorex-components-popup.mjs +13 -13
- package/fesm2022/acorex-components-popup.mjs.map +1 -1
- package/fesm2022/acorex-components-progress-bar.mjs +11 -9
- package/fesm2022/acorex-components-progress-bar.mjs.map +1 -1
- package/fesm2022/acorex-components-qrcode.mjs +8 -8
- package/fesm2022/acorex-components-qrcode.mjs.map +1 -1
- package/fesm2022/acorex-components-query-builder.mjs +9 -9
- package/fesm2022/acorex-components-query-builder.mjs.map +1 -1
- package/fesm2022/acorex-components-radio.mjs +7 -7
- package/fesm2022/acorex-components-radio.mjs.map +1 -1
- package/fesm2022/acorex-components-rail-navigation.mjs +40 -38
- package/fesm2022/acorex-components-rail-navigation.mjs.map +1 -1
- package/fesm2022/acorex-components-range-slider.mjs +11 -11
- package/fesm2022/acorex-components-range-slider.mjs.map +1 -1
- package/fesm2022/acorex-components-rate-picker.mjs +20 -35
- package/fesm2022/acorex-components-rate-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-rest-api-generator.mjs +23 -23
- package/fesm2022/acorex-components-rest-api-generator.mjs.map +1 -1
- package/fesm2022/acorex-components-result.mjs +8 -8
- package/fesm2022/acorex-components-result.mjs.map +1 -1
- package/fesm2022/acorex-components-routing-progress.mjs +8 -8
- package/fesm2022/acorex-components-routing-progress.mjs.map +1 -1
- package/fesm2022/acorex-components-rrule.mjs +111 -16
- package/fesm2022/acorex-components-rrule.mjs.map +1 -1
- package/fesm2022/acorex-components-scheduler-picker.mjs +2339 -0
- package/fesm2022/acorex-components-scheduler-picker.mjs.map +1 -0
- package/fesm2022/acorex-components-scheduler.mjs +52 -52
- package/fesm2022/acorex-components-scheduler.mjs.map +1 -1
- package/fesm2022/acorex-components-scss.mjs +4 -4
- package/fesm2022/acorex-components-scss.mjs.map +1 -1
- package/fesm2022/acorex-components-search-box.mjs +23 -12
- package/fesm2022/acorex-components-search-box.mjs.map +1 -1
- package/fesm2022/acorex-components-select-box.mjs +36 -17
- package/fesm2022/acorex-components-select-box.mjs.map +1 -1
- package/fesm2022/acorex-components-selection-list-2.mjs +10 -10
- package/fesm2022/acorex-components-selection-list-2.mjs.map +1 -1
- package/fesm2022/acorex-components-selection-list.mjs +10 -10
- package/fesm2022/acorex-components-selection-list.mjs.map +1 -1
- package/fesm2022/acorex-components-side-menu.mjs +31 -38
- package/fesm2022/acorex-components-side-menu.mjs.map +1 -1
- package/fesm2022/acorex-components-skeleton.mjs +8 -8
- package/fesm2022/acorex-components-skeleton.mjs.map +1 -1
- package/fesm2022/acorex-components-slider.mjs +11 -11
- package/fesm2022/acorex-components-slider.mjs.map +1 -1
- package/fesm2022/acorex-components-sliding-item.mjs +17 -17
- package/fesm2022/acorex-components-sliding-item.mjs.map +1 -1
- package/fesm2022/acorex-components-step-wizard.mjs +16 -16
- package/fesm2022/acorex-components-step-wizard.mjs.map +1 -1
- package/fesm2022/acorex-components-switch.mjs +14 -14
- package/fesm2022/acorex-components-switch.mjs.map +1 -1
- package/fesm2022/acorex-components-tabs.mjs +20 -16
- package/fesm2022/acorex-components-tabs.mjs.map +1 -1
- package/fesm2022/acorex-components-tag-box.mjs +51 -21
- package/fesm2022/acorex-components-tag-box.mjs.map +1 -1
- package/fesm2022/acorex-components-tag.mjs +47 -11
- package/fesm2022/acorex-components-tag.mjs.map +1 -1
- package/fesm2022/acorex-components-text-area.mjs +9 -9
- package/fesm2022/acorex-components-text-area.mjs.map +1 -1
- package/fesm2022/acorex-components-text-box.mjs +13 -13
- package/fesm2022/acorex-components-text-box.mjs.map +1 -1
- package/fesm2022/acorex-components-time-duration.mjs +54 -14
- package/fesm2022/acorex-components-time-duration.mjs.map +1 -1
- package/fesm2022/acorex-components-time-line.mjs +14 -29
- package/fesm2022/acorex-components-time-line.mjs.map +1 -1
- package/fesm2022/acorex-components-toast.mjs +14 -14
- package/fesm2022/acorex-components-toast.mjs.map +1 -1
- package/fesm2022/acorex-components-toolbar.mjs +9 -9
- package/fesm2022/acorex-components-toolbar.mjs.map +1 -1
- package/fesm2022/acorex-components-tooltip.mjs +12 -12
- package/fesm2022/acorex-components-tooltip.mjs.map +1 -1
- package/fesm2022/acorex-components-tree-view.mjs +16 -45
- package/fesm2022/acorex-components-tree-view.mjs.map +1 -1
- package/fesm2022/acorex-components-tree2.mjs +689 -0
- package/fesm2022/acorex-components-tree2.mjs.map +1 -0
- package/fesm2022/acorex-components-uploader.mjs +28 -641
- package/fesm2022/acorex-components-uploader.mjs.map +1 -1
- package/fesm2022/acorex-components-video-player.mjs +8 -8
- package/fesm2022/acorex-components-video-player.mjs.map +1 -1
- package/fesm2022/acorex-components-wysiwyg.mjs +213 -462
- package/fesm2022/acorex-components-wysiwyg.mjs.map +1 -1
- package/fesm2022/acorex-components.mjs.map +1 -1
- package/form/index.d.ts +3 -3
- package/grid-layout-builder/index.d.ts +1 -2
- package/image-editor/index.d.ts +8 -5
- package/loading/index.d.ts +1 -1
- package/media-viewer/index.d.ts +2 -3
- package/notification/index.d.ts +0 -2
- package/number-box/README.md +2 -2
- package/number-box/index.d.ts +31 -171
- package/number-box-legacy/README.md +3 -0
- package/number-box-legacy/index.d.ts +191 -0
- package/package.json +53 -26
- package/paint/index.d.ts +1 -6
- package/phone-box/index.d.ts +4 -4
- package/rate-picker/index.d.ts +5 -15
- package/rrule/index.d.ts +96 -1
- package/scheduler-picker/README.md +15 -0
- package/scheduler-picker/index.d.ts +1360 -0
- package/search-box/index.d.ts +6 -1
- package/select-box/index.d.ts +15 -10
- package/side-menu/index.d.ts +3 -2
- package/tag/index.d.ts +8 -2
- package/tag-box/index.d.ts +12 -3
- package/time-duration/index.d.ts +19 -3
- package/tree2/README.md +3 -0
- package/tree2/index.d.ts +337 -0
- package/uploader/index.d.ts +4 -331
- package/wysiwyg/index.d.ts +57 -159
- package/drawer-2/README.md +0 -3
- package/drawer-2/index.d.ts +0 -62
- package/fesm2022/acorex-components-drawer-2.mjs +0 -134
- package/fesm2022/acorex-components-drawer-2.mjs.map +0 -1
- package/fesm2022/acorex-components-modal-acorex-components-modal-h5Y-qcbh.mjs.map +0 -1
- package/fesm2022/acorex-components-modal-modal-content.component-B6tyMLdU.mjs +0 -235
- package/fesm2022/acorex-components-modal-modal-content.component-B6tyMLdU.mjs.map +0 -1
- package/fesm2022/acorex-components-number-box-2.mjs +0 -183
- package/fesm2022/acorex-components-number-box-2.mjs.map +0 -1
- package/number-box-2/README.md +0 -3
- package/number-box-2/index.d.ts +0 -41
|
@@ -1,15 +1,12 @@
|
|
|
1
|
+
import { AXInputMaskDirective } from '@acorex/cdk/input-mask';
|
|
1
2
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input,
|
|
3
|
-
import { IMaskDirective, IMaskModule } from 'angular-imask';
|
|
4
|
-
import { createMask } from 'imask';
|
|
3
|
+
import { input, model, signal, viewChild, afterNextRender, effect, forwardRef, HostBinding, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
|
5
4
|
import { MXInputBaseValueComponent, MXLookComponent, AXComponent, AXFocusableComponent, AXClearableComponent, AXValuableComponent } from '@acorex/cdk/common';
|
|
5
|
+
import { AXButtonModule } from '@acorex/components/button';
|
|
6
|
+
import { AXDecoratorModule } from '@acorex/components/decorators';
|
|
6
7
|
import * as i1 from '@angular/forms';
|
|
7
8
|
import { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
8
|
-
import { toNumber, isEmpty } from 'lodash-es';
|
|
9
9
|
import { classes } from 'polytype';
|
|
10
|
-
import { AXButtonModule } from '@acorex/components/button';
|
|
11
|
-
import { AXDecoratorModule } from '@acorex/components/decorators';
|
|
12
|
-
import { CommonModule } from '@angular/common';
|
|
13
10
|
|
|
14
11
|
/**
|
|
15
12
|
* The NumberBox is a component which detects user interaction and triggers a corresponding event
|
|
@@ -17,296 +14,116 @@ import { CommonModule } from '@angular/common';
|
|
|
17
14
|
* @category Components
|
|
18
15
|
*/
|
|
19
16
|
class AXNumberBoxComponent extends classes((MXInputBaseValueComponent), MXLookComponent) {
|
|
20
|
-
/**
|
|
21
|
-
* A number value that specifies the all digits of number.
|
|
22
|
-
*/
|
|
23
|
-
get allDigits() {
|
|
24
|
-
return this._allDigits;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Sets the all digits of number.
|
|
28
|
-
* @param {number} v
|
|
29
|
-
*/
|
|
30
|
-
set allDigits(v) {
|
|
31
|
-
this.setOption({
|
|
32
|
-
name: 'allDigits',
|
|
33
|
-
value: v,
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* A character value that specifies the separator character.
|
|
38
|
-
*/
|
|
39
|
-
get thousandsSeparator() {
|
|
40
|
-
return this._thousandsSeparator;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Sets the thousands separator for formatting.
|
|
44
|
-
* @param {string} v
|
|
45
|
-
*/
|
|
46
|
-
set thousandsSeparator(v) {
|
|
47
|
-
this.setOption({
|
|
48
|
-
name: 'thousandsSeparator',
|
|
49
|
-
value: v ?? '',
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* A character value that specifies the separator character.
|
|
54
|
-
*/
|
|
55
|
-
get padDecimalZeros() {
|
|
56
|
-
return this._padDecimalZeros;
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Sets whether decimal zeros should be padded.
|
|
60
|
-
* @param {boolean} v
|
|
61
|
-
*/
|
|
62
|
-
set padDecimalZeros(v) {
|
|
63
|
-
this.setOption({
|
|
64
|
-
name: 'padDecimalZeros',
|
|
65
|
-
value: v,
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Specifies the number of decimals that the user can enter
|
|
70
|
-
*/
|
|
71
|
-
get decimals() {
|
|
72
|
-
return this._decimals;
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Sets the decimal places; defaults to 0 if not provided.
|
|
76
|
-
*/
|
|
77
|
-
set decimals(v) {
|
|
78
|
-
this.setOption({
|
|
79
|
-
name: 'decimals',
|
|
80
|
-
value: v ?? 0,
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Specifies the smallest value that is valid
|
|
85
|
-
*/
|
|
86
|
-
get minValue() {
|
|
87
|
-
return this._minValue;
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Sets the number of decimal places to be used.
|
|
91
|
-
* @param {number} v
|
|
92
|
-
* @defaultvalue 0
|
|
93
|
-
*/
|
|
94
|
-
set minValue(v) {
|
|
95
|
-
this.setOption({
|
|
96
|
-
name: 'minValue',
|
|
97
|
-
value: v != null ? Number(v) : Number.MIN_SAFE_INTEGER,
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Specifies the greatest value that is valid
|
|
102
|
-
*/
|
|
103
|
-
get maxValue() {
|
|
104
|
-
return this._maxValue;
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* Sets the maximum allowable value, defaulting to `Number.MAX_SAFE_INTEGER` if null.
|
|
108
|
-
* @param v
|
|
109
|
-
*/
|
|
110
|
-
set maxValue(v) {
|
|
111
|
-
this.setOption({
|
|
112
|
-
name: 'maxValue',
|
|
113
|
-
value: v != null ? Number(v) : Number.MAX_SAFE_INTEGER,
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
17
|
constructor() {
|
|
117
|
-
super();
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
this.
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
this.
|
|
126
|
-
|
|
127
|
-
this.
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
*/
|
|
133
|
-
this.step = 1;
|
|
134
|
-
/** @ignore */
|
|
135
|
-
this._decimals = 0;
|
|
136
|
-
/**
|
|
137
|
-
* Specifies the value that is used to increment or decrement the **Deciaml** part of number
|
|
138
|
-
*/
|
|
139
|
-
this.decimalStep = 'auto';
|
|
140
|
-
/**
|
|
141
|
-
* Specifies whether the Up and Down spin buttons will be rendered or not
|
|
142
|
-
*/
|
|
143
|
-
this.showSpinButtons = true;
|
|
144
|
-
/** @ignore */
|
|
145
|
-
this._minValue = Number.MIN_SAFE_INTEGER;
|
|
146
|
-
/** @ignore */
|
|
147
|
-
this._maxValue = Number.MAX_SAFE_INTEGER;
|
|
148
|
-
/** @ignore */
|
|
149
|
-
this._onWheelFlag = false;
|
|
150
|
-
this.onFocus.subscribe(() => {
|
|
151
|
-
this._onWheelFlag = true;
|
|
152
|
-
this.input.nativeElement.select();
|
|
153
|
-
});
|
|
154
|
-
this.onBlur.subscribe(() => {
|
|
155
|
-
this._onWheelFlag = false;
|
|
18
|
+
super(...arguments);
|
|
19
|
+
this.minValue = input(null, ...(ngDevMode ? [{ debugName: "minValue" }] : []));
|
|
20
|
+
this.maxValue = input(null, ...(ngDevMode ? [{ debugName: "maxValue" }] : []));
|
|
21
|
+
this.showSpinButtons = input(true, ...(ngDevMode ? [{ debugName: "showSpinButtons" }] : []));
|
|
22
|
+
this.thousandsSeparator = model(null, ...(ngDevMode ? [{ debugName: "thousandsSeparator" }] : []));
|
|
23
|
+
this.decimals = input(0, ...(ngDevMode ? [{ debugName: "decimals" }] : []));
|
|
24
|
+
this.changeOnScroll = input(false, ...(ngDevMode ? [{ debugName: "changeOnScroll" }] : []));
|
|
25
|
+
this.step = input(1, ...(ngDevMode ? [{ debugName: "step" }] : []));
|
|
26
|
+
this.mode = signal('digits', ...(ngDevMode ? [{ debugName: "mode" }] : []));
|
|
27
|
+
this.input = viewChild('input', ...(ngDevMode ? [{ debugName: "input" }] : []));
|
|
28
|
+
this.stringValue = '';
|
|
29
|
+
this.#init = afterNextRender(() => {
|
|
30
|
+
this.onFocus.subscribe(() => {
|
|
31
|
+
this.input().nativeElement.select();
|
|
32
|
+
});
|
|
156
33
|
});
|
|
34
|
+
this.#eff = effect(() => {
|
|
35
|
+
if (this.thousandsSeparator() && this.decimals()) {
|
|
36
|
+
this.mode.set('digits');
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
else if (this.thousandsSeparator()) {
|
|
40
|
+
this.mode.set('thousandsSeparator');
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
else if (this.decimals()) {
|
|
44
|
+
this.mode.set('decimal');
|
|
45
|
+
}
|
|
46
|
+
}, ...(ngDevMode ? [{ debugName: "#eff" }] : []));
|
|
157
47
|
}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* Handles internal option changes and updates the mask accordingly.
|
|
164
|
-
*/
|
|
165
|
-
internalOptionChanged() {
|
|
166
|
-
this._updateMask();
|
|
167
|
-
}
|
|
168
|
-
/**
|
|
169
|
-
* Resets the input element to its default state and calls the parent class reset method.
|
|
170
|
-
*/
|
|
171
|
-
reset() {
|
|
172
|
-
this.input.nativeElement.value = null;
|
|
173
|
-
super.reset(true);
|
|
48
|
+
internalValueChanged(value) {
|
|
49
|
+
if (value == null)
|
|
50
|
+
return;
|
|
51
|
+
this.stringValue = String(value);
|
|
174
52
|
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
// || (value == 0 && !this._maskObj.value)
|
|
181
|
-
if (value == null) {
|
|
182
|
-
return this.defaultValue;
|
|
53
|
+
#init;
|
|
54
|
+
#eff;
|
|
55
|
+
plusValue() {
|
|
56
|
+
if (this.disabled || this.readonly) {
|
|
57
|
+
return;
|
|
183
58
|
}
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
/** @ignore */
|
|
192
|
-
_updateMask() {
|
|
193
|
-
if (!this._maskObj) {
|
|
194
|
-
this._maskObj = createMask({
|
|
195
|
-
mask: Number,
|
|
196
|
-
min: this.minValue,
|
|
197
|
-
max: this.maxValue,
|
|
198
|
-
thousandsSeparator: this.thousandsSeparator || '',
|
|
199
|
-
scale: this.decimals,
|
|
200
|
-
radix: '.',
|
|
201
|
-
padFractionalZeros: this.decimals > 0 && this.padDecimalZeros,
|
|
202
|
-
});
|
|
203
|
-
this._maskObj.format = (v, m) => {
|
|
204
|
-
return !isNaN(v)
|
|
205
|
-
? v.toLocaleString('en-US', {
|
|
206
|
-
useGrouping: false,
|
|
207
|
-
maximumFractionDigits: 20,
|
|
208
|
-
})
|
|
209
|
-
: '';
|
|
210
|
-
};
|
|
59
|
+
if (this.mode() === 'thousandsSeparator') {
|
|
60
|
+
const removeSeparator = this.stringValue.split(this.thousandsSeparator()).join('');
|
|
61
|
+
const addStep = +removeSeparator + this.step();
|
|
62
|
+
this.commitValue(addStep, true);
|
|
63
|
+
const addSeparator = addStep.toLocaleString();
|
|
64
|
+
const replaceSeparator = addSeparator.split(',').join(this.thousandsSeparator());
|
|
65
|
+
this.stringValue = replaceSeparator;
|
|
211
66
|
}
|
|
212
67
|
else {
|
|
213
|
-
this.
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
thousandsSeparator: this.thousandsSeparator || '',
|
|
217
|
-
scale: this.decimals,
|
|
218
|
-
radix: '.',
|
|
219
|
-
padFractionalZeros: this.decimals > 0 && this.padDecimalZeros,
|
|
220
|
-
});
|
|
68
|
+
const convert = +this.stringValue + this.step();
|
|
69
|
+
this.commitValue(convert, true);
|
|
70
|
+
this.stringValue = convert.toString();
|
|
221
71
|
}
|
|
222
|
-
this._maskDirective?.maskRef?.updateValue();
|
|
223
|
-
this._maskDirective?.maskRef?.updateControl();
|
|
224
72
|
}
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
73
|
+
minusValue() {
|
|
74
|
+
if (this.disabled || this.readonly) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
if (this.mode() === 'thousandsSeparator') {
|
|
78
|
+
const removeSeparator = this.stringValue.split(this.thousandsSeparator()).join('');
|
|
79
|
+
const addStep = +removeSeparator - this.step();
|
|
80
|
+
this.commitValue(addStep, true);
|
|
81
|
+
const addSeparator = addStep.toLocaleString();
|
|
82
|
+
const replaceSeparator = addSeparator.split(',').join(this.thousandsSeparator());
|
|
83
|
+
this.stringValue = replaceSeparator;
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
const convert = +this.stringValue + this.step() * -1;
|
|
87
|
+
this.commitValue(convert, true);
|
|
88
|
+
this.stringValue = convert.toString();
|
|
229
89
|
}
|
|
230
|
-
this.commitValue(value, true);
|
|
231
90
|
}
|
|
232
|
-
|
|
233
|
-
|
|
91
|
+
handleOnKeydownEvent(e) {
|
|
92
|
+
if (e.key !== 'ArrowUp' && e.key !== 'ArrowDown')
|
|
93
|
+
return;
|
|
234
94
|
if (this.disabled || this.readonly)
|
|
235
95
|
return;
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
const valStr = input.value;
|
|
242
|
-
const decimalPointIndex = valStr.indexOf('.');
|
|
243
|
-
const _cursorPos = input.selectionStart;
|
|
244
|
-
if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
|
|
245
|
-
if (decimalPointIndex > 0 && _cursorPos > decimalPointIndex && this.decimals > 0) {
|
|
246
|
-
e.key === 'ArrowDown' ? this.decimalStepDown(true) : this.decimalStepUp(true);
|
|
247
|
-
}
|
|
248
|
-
else {
|
|
249
|
-
e.key === 'ArrowDown' ? this.stepDown(true) : this.stepUp(true);
|
|
250
|
-
}
|
|
251
|
-
ignore();
|
|
252
|
-
setTimeout(() => {
|
|
253
|
-
input.setSelectionRange(_cursorPos, _cursorPos);
|
|
254
|
-
}, 5);
|
|
96
|
+
if (e.key === 'ArrowUp') {
|
|
97
|
+
this.plusValue();
|
|
98
|
+
}
|
|
99
|
+
else if (e.key === 'ArrowDown') {
|
|
100
|
+
this.minusValue();
|
|
255
101
|
}
|
|
256
|
-
super.emitOnKeydownEvent(e);
|
|
257
102
|
}
|
|
258
|
-
|
|
259
|
-
_handleUpDownClick(v, e) {
|
|
260
|
-
const isUserInteraction = e.isTrusted;
|
|
103
|
+
handleUpClick() {
|
|
261
104
|
if (this.disabled || this.readonly)
|
|
262
105
|
return;
|
|
263
|
-
|
|
106
|
+
this.plusValue();
|
|
264
107
|
}
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
*/
|
|
268
|
-
stepUp(u = false) {
|
|
269
|
-
if (!this.value) {
|
|
270
|
-
this.commitValue(Math.max(this.minValue, 0), u);
|
|
271
|
-
}
|
|
272
|
-
this.commitValue(this.value + toNumber(this.step), u);
|
|
273
|
-
}
|
|
274
|
-
/**
|
|
275
|
-
* Decreases the value by the step amount, ensuring it's at least the minimum value.
|
|
276
|
-
*/
|
|
277
|
-
stepDown(u = false) {
|
|
278
|
-
if (!this.value) {
|
|
279
|
-
this.commitValue(Math.max(this.minValue, 0), u);
|
|
280
|
-
}
|
|
281
|
-
this.commitValue(this.value - toNumber(this.step), u);
|
|
108
|
+
handleDownClick() {
|
|
109
|
+
this.minusValue();
|
|
282
110
|
}
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
if (!this.value) {
|
|
288
|
-
this.commitValue(Math.max(this.minValue, 0), u);
|
|
289
|
-
}
|
|
290
|
-
this.commitValue(this.value + toNumber(this.decimalStep == 'auto' ? 1 / Math.pow(10, this.decimals) : this.decimalStep), u);
|
|
291
|
-
}
|
|
292
|
-
/**
|
|
293
|
-
* Decreases the value by the decimal step amount, using 'auto' or a custom step value.
|
|
294
|
-
*/
|
|
295
|
-
decimalStepDown(u = false) {
|
|
296
|
-
if (!this.value) {
|
|
297
|
-
this.commitValue(Math.max(this.minValue, 0), u);
|
|
111
|
+
handleOnMaskChanged(e) {
|
|
112
|
+
if (!e.unmasked || isNaN(+e.unmasked)) {
|
|
113
|
+
this.commitValue(null, true);
|
|
114
|
+
return;
|
|
298
115
|
}
|
|
299
|
-
this.commitValue(
|
|
116
|
+
this.commitValue(+e.unmasked, true);
|
|
300
117
|
}
|
|
301
118
|
onWheel(event) {
|
|
302
|
-
if (this.changeOnScroll
|
|
119
|
+
if (this.changeOnScroll()) {
|
|
303
120
|
event.preventDefault();
|
|
304
121
|
if (!this.disabled && !this.readonly) {
|
|
305
122
|
if (event.deltaY > 0) {
|
|
306
|
-
this.
|
|
123
|
+
this.minusValue();
|
|
307
124
|
}
|
|
308
125
|
else {
|
|
309
|
-
this.
|
|
126
|
+
this.plusValue();
|
|
310
127
|
}
|
|
311
128
|
}
|
|
312
129
|
}
|
|
@@ -314,8 +131,8 @@ class AXNumberBoxComponent extends classes((MXInputBaseValueComponent), MXLookCo
|
|
|
314
131
|
get __hostName() {
|
|
315
132
|
return this.name;
|
|
316
133
|
}
|
|
317
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
318
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
134
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXNumberBoxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
135
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", type: AXNumberBoxComponent, isStandalone: true, selector: "ax-number-box", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: false, isRequired: false, transformFunction: null }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: false, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: false, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: false, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: false, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: false, isRequired: false, transformFunction: null }, look: { classPropertyName: "look", publicName: "look", isSignal: false, isRequired: false, transformFunction: null }, minValue: { classPropertyName: "minValue", publicName: "minValue", isSignal: true, isRequired: false, transformFunction: null }, maxValue: { classPropertyName: "maxValue", publicName: "maxValue", isSignal: true, isRequired: false, transformFunction: null }, showSpinButtons: { classPropertyName: "showSpinButtons", publicName: "showSpinButtons", isSignal: true, isRequired: false, transformFunction: null }, thousandsSeparator: { classPropertyName: "thousandsSeparator", publicName: "thousandsSeparator", isSignal: true, isRequired: false, transformFunction: null }, decimals: { classPropertyName: "decimals", publicName: "decimals", isSignal: true, isRequired: false, transformFunction: null }, changeOnScroll: { classPropertyName: "changeOnScroll", publicName: "changeOnScroll", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", stateChange: "stateChange", onValueChanged: "onValueChanged", onBlur: "onBlur", onFocus: "onFocus", readonlyChange: "readonlyChange", disabledChange: "disabledChange", onKeyDown: "onKeyDown", onKeyUp: "onKeyUp", onKeyPress: "onKeyPress", thousandsSeparator: "thousandsSeparatorChange" }, host: { properties: { "attr.name": "this.__hostName" } }, providers: [
|
|
319
136
|
{ provide: AXComponent, useExisting: AXNumberBoxComponent },
|
|
320
137
|
{ provide: AXFocusableComponent, useExisting: AXNumberBoxComponent },
|
|
321
138
|
{ provide: AXClearableComponent, useExisting: AXNumberBoxComponent },
|
|
@@ -325,9 +142,9 @@ class AXNumberBoxComponent extends classes((MXInputBaseValueComponent), MXLookCo
|
|
|
325
142
|
useExisting: forwardRef(() => AXNumberBoxComponent),
|
|
326
143
|
multi: true,
|
|
327
144
|
},
|
|
328
|
-
], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true
|
|
145
|
+
], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div\n class=\"ax-editor-container ax-default ax-default {{ look }}\"\n [class.ax-state-disabled]=\"disabled\"\n [class.ax-state-readonly]=\"readonly\"\n>\n <ng-content select=\"ax-prefix\"> </ng-content>\n <input\n #input\n axInputMask\n (onMaskChanged)=\"handleOnMaskChanged($event)\"\n [maskMode]=\"mode()\"\n inputmode=\"numeric\"\n class=\"ax-input\"\n [minValue]=\"minValue()\"\n [maxValue]=\"maxValue()\"\n [separator]=\"thousandsSeparator()\"\n [decimal]=\"decimals()\"\n [id]=\"id\"\n [attr.placeholder]=\"placeholder\"\n [attr.autocomplete]=\"'off'\"\n [class.ax-state-disabled]=\"disabled\"\n [class.ax-state-readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [tabindex]=\"tabIndex\"\n [(ngModel)]=\"stringValue\"\n (keydown)=\"handleOnKeydownEvent($event)\"\n (keyup)=\"emitOnKeyupEvent($event)\"\n (keypress)=\"emitOnKeypressEvent($event)\"\n (focus)=\"emitOnFocusEvent($event)\"\n (blur)=\"emitOnBlurEvent($event)\"\n (wheel)=\"onWheel($event)\"\n />\n @if (input.value && !disabled && !readonly) {\n <ng-content select=\"ax-clear-button\"></ng-content>\n }\n @if (showSpinButtons()) {\n <div class=\"ax-general-button-control\">\n <button\n type=\"button\"\n class=\"ax-general-button-icon\"\n [class.ax-state-disabled]=\"disabled\"\n (click)=\"handleUpClick()\"\n tabindex=\"-1\"\n [disabled]=\"disabled\"\n >\n <span class=\"ax-icon ax-icon-chevron-up ax-arrow-button\"></span>\n </button>\n <button\n type=\"button\"\n class=\"ax-general-button-icon\"\n [class.ax-state-disabled]=\"disabled\"\n (click)=\"handleDownClick()\"\n tabindex=\"-1\"\n [disabled]=\"disabled\"\n >\n <span class=\"ax-icon ax-icon-chevron-down ax-arrow-button\"></span>\n </button>\n </div>\n }\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>\n", styles: ["ax-number-box input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}ax-number-box input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}ax-number-box input[type=number]{-moz-appearance:textfield}ax-number-box .ax-general-button-control{flex-direction:column;width:fit-content;display:flex}ax-number-box .ax-general-button-control .ax-general-button-icon{height:calc(var(--spacing,.25rem)*1)!important;padding:calc(var(--spacing,.25rem)*1.5)!important;font-size:var(--text-xs,.75rem)!important;line-height:var(--tw-leading,var(--text-xs--line-height,calc(1/.75)))!important}\n/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: AXInputMaskDirective, selector: "[axInputMask]", inputs: ["maskMode", "separator", "eager", "minValue", "maxValue", "decimal"], outputs: ["onMaskChanged"], exportAs: ["axInputMask"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "ngmodule", type: AXDecoratorModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
329
146
|
}
|
|
330
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
147
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXNumberBoxComponent, decorators: [{
|
|
331
148
|
type: Component,
|
|
332
149
|
args: [{ selector: 'ax-number-box', inputs: ['disabled', 'readonly', 'tabIndex', 'placeholder', 'value', 'state', 'name', 'id', 'look'], outputs: [
|
|
333
150
|
'valueChange',
|
|
@@ -350,70 +167,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
|
|
|
350
167
|
useExisting: forwardRef(() => AXNumberBoxComponent),
|
|
351
168
|
multi: true,
|
|
352
169
|
},
|
|
353
|
-
], imports: [FormsModule,
|
|
354
|
-
}],
|
|
355
|
-
type: ViewChild,
|
|
356
|
-
args: ['input']
|
|
357
|
-
}], changeOnScroll: [{
|
|
358
|
-
type: Input
|
|
359
|
-
}], allDigits: [{
|
|
360
|
-
type: Input
|
|
361
|
-
}], thousandsSeparator: [{
|
|
362
|
-
type: Input
|
|
363
|
-
}], padDecimalZeros: [{
|
|
364
|
-
type: Input
|
|
365
|
-
}],
|
|
366
|
-
/**
|
|
367
|
-
* Defines the increment step value.
|
|
368
|
-
*/
|
|
369
|
-
step: [{
|
|
370
|
-
type: Input
|
|
371
|
-
}], decimals: [{
|
|
372
|
-
type: Input
|
|
373
|
-
}],
|
|
374
|
-
/**
|
|
375
|
-
* Defines the step size for decimal values.
|
|
376
|
-
* @defaultvalue 'auto'
|
|
377
|
-
*/
|
|
378
|
-
decimalStep: [{
|
|
379
|
-
type: Input
|
|
380
|
-
}],
|
|
381
|
-
/**
|
|
382
|
-
* Indicates whether spin buttons are displayed.
|
|
383
|
-
* @defaultvalue true
|
|
384
|
-
*/
|
|
385
|
-
showSpinButtons: [{
|
|
386
|
-
type: Input
|
|
387
|
-
}], minValue: [{
|
|
388
|
-
type: Input
|
|
389
|
-
}], maxValue: [{
|
|
390
|
-
type: Input
|
|
391
|
-
}],
|
|
392
|
-
/**
|
|
393
|
-
* CSS classes to apply to the component.
|
|
394
|
-
*/
|
|
395
|
-
classNames: [{
|
|
396
|
-
type: Input,
|
|
397
|
-
args: ['class']
|
|
398
|
-
}], _maskDirective: [{
|
|
399
|
-
type: ViewChild,
|
|
400
|
-
args: [IMaskDirective]
|
|
401
|
-
}], onWheel: [{
|
|
402
|
-
type: HostListener,
|
|
403
|
-
args: ['wheel', ['$event']]
|
|
404
|
-
}], __hostName: [{
|
|
170
|
+
], imports: [FormsModule, AXInputMaskDirective, AXButtonModule, AXDecoratorModule], template: "<div\n class=\"ax-editor-container ax-default ax-default {{ look }}\"\n [class.ax-state-disabled]=\"disabled\"\n [class.ax-state-readonly]=\"readonly\"\n>\n <ng-content select=\"ax-prefix\"> </ng-content>\n <input\n #input\n axInputMask\n (onMaskChanged)=\"handleOnMaskChanged($event)\"\n [maskMode]=\"mode()\"\n inputmode=\"numeric\"\n class=\"ax-input\"\n [minValue]=\"minValue()\"\n [maxValue]=\"maxValue()\"\n [separator]=\"thousandsSeparator()\"\n [decimal]=\"decimals()\"\n [id]=\"id\"\n [attr.placeholder]=\"placeholder\"\n [attr.autocomplete]=\"'off'\"\n [class.ax-state-disabled]=\"disabled\"\n [class.ax-state-readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [tabindex]=\"tabIndex\"\n [(ngModel)]=\"stringValue\"\n (keydown)=\"handleOnKeydownEvent($event)\"\n (keyup)=\"emitOnKeyupEvent($event)\"\n (keypress)=\"emitOnKeypressEvent($event)\"\n (focus)=\"emitOnFocusEvent($event)\"\n (blur)=\"emitOnBlurEvent($event)\"\n (wheel)=\"onWheel($event)\"\n />\n @if (input.value && !disabled && !readonly) {\n <ng-content select=\"ax-clear-button\"></ng-content>\n }\n @if (showSpinButtons()) {\n <div class=\"ax-general-button-control\">\n <button\n type=\"button\"\n class=\"ax-general-button-icon\"\n [class.ax-state-disabled]=\"disabled\"\n (click)=\"handleUpClick()\"\n tabindex=\"-1\"\n [disabled]=\"disabled\"\n >\n <span class=\"ax-icon ax-icon-chevron-up ax-arrow-button\"></span>\n </button>\n <button\n type=\"button\"\n class=\"ax-general-button-icon\"\n [class.ax-state-disabled]=\"disabled\"\n (click)=\"handleDownClick()\"\n tabindex=\"-1\"\n [disabled]=\"disabled\"\n >\n <span class=\"ax-icon ax-icon-chevron-down ax-arrow-button\"></span>\n </button>\n </div>\n }\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>\n", styles: ["ax-number-box input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}ax-number-box input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}ax-number-box input[type=number]{-moz-appearance:textfield}ax-number-box .ax-general-button-control{flex-direction:column;width:fit-content;display:flex}ax-number-box .ax-general-button-control .ax-general-button-icon{height:calc(var(--spacing,.25rem)*1)!important;padding:calc(var(--spacing,.25rem)*1.5)!important;font-size:var(--text-xs,.75rem)!important;line-height:var(--tw-leading,var(--text-xs--line-height,calc(1/.75)))!important}\n/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */\n"] }]
|
|
171
|
+
}], propDecorators: { minValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "minValue", required: false }] }], maxValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxValue", required: false }] }], showSpinButtons: [{ type: i0.Input, args: [{ isSignal: true, alias: "showSpinButtons", required: false }] }], thousandsSeparator: [{ type: i0.Input, args: [{ isSignal: true, alias: "thousandsSeparator", required: false }] }, { type: i0.Output, args: ["thousandsSeparatorChange"] }], decimals: [{ type: i0.Input, args: [{ isSignal: true, alias: "decimals", required: false }] }], changeOnScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "changeOnScroll", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], input: [{ type: i0.ViewChild, args: ['input', { isSignal: true }] }], __hostName: [{
|
|
405
172
|
type: HostBinding,
|
|
406
173
|
args: ['attr.name']
|
|
407
174
|
}] } });
|
|
408
175
|
|
|
409
176
|
const COMPONENT = [AXNumberBoxComponent];
|
|
410
|
-
const MODULES = [
|
|
177
|
+
const MODULES = [FormsModule, AXInputMaskDirective, AXButtonModule, AXDecoratorModule];
|
|
411
178
|
class AXNumberBoxModule {
|
|
412
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
413
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
414
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
179
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXNumberBoxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
180
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.12", ngImport: i0, type: AXNumberBoxModule, imports: [FormsModule, AXInputMaskDirective, AXButtonModule, AXDecoratorModule, AXNumberBoxComponent], exports: [AXNumberBoxComponent] }); }
|
|
181
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXNumberBoxModule, imports: [FormsModule, AXButtonModule, AXDecoratorModule, COMPONENT] }); }
|
|
415
182
|
}
|
|
416
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
183
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXNumberBoxModule, decorators: [{
|
|
417
184
|
type: NgModule,
|
|
418
185
|
args: [{
|
|
419
186
|
imports: [...MODULES, ...COMPONENT],
|