@n-isi-platform/design-system 1.0.39 → 1.0.40
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/fesm2022/n-isi-platform-design-system.mjs +96 -1
- package/fesm2022/n-isi-platform-design-system.mjs.map +1 -1
- package/lib/number-input/number-input.component.d.ts +33 -0
- package/models/enums/number-input/number-input-mode.enum.d.ts +4 -0
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
|
@@ -55,6 +55,8 @@ import * as i2$3 from 'primeng/toggleswitch';
|
|
|
55
55
|
import { ToggleSwitchModule } from 'primeng/toggleswitch';
|
|
56
56
|
import { Tag } from 'primeng/tag';
|
|
57
57
|
import { Divider } from 'primeng/divider';
|
|
58
|
+
import * as i2$5 from 'primeng/inputnumber';
|
|
59
|
+
import { InputNumberModule } from 'primeng/inputnumber';
|
|
58
60
|
import { InputMask } from 'primeng/inputmask';
|
|
59
61
|
import { ProgressSpinner } from 'primeng/progressspinner';
|
|
60
62
|
import { Dialog, DialogModule } from 'primeng/dialog';
|
|
@@ -2966,6 +2968,99 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
2966
2968
|
type: Output
|
|
2967
2969
|
}] } });
|
|
2968
2970
|
|
|
2971
|
+
var NumberInputMode;
|
|
2972
|
+
(function (NumberInputMode) {
|
|
2973
|
+
NumberInputMode["decimal"] = "decimal";
|
|
2974
|
+
NumberInputMode["currency"] = "currency";
|
|
2975
|
+
})(NumberInputMode || (NumberInputMode = {}));
|
|
2976
|
+
|
|
2977
|
+
class NumberInputComponent {
|
|
2978
|
+
_isTooltipVisible;
|
|
2979
|
+
name;
|
|
2980
|
+
mode = NumberInputMode.currency;
|
|
2981
|
+
currency = 'EUR';
|
|
2982
|
+
locale = 'de-DE';
|
|
2983
|
+
label;
|
|
2984
|
+
placeholder;
|
|
2985
|
+
accessibilityText = '';
|
|
2986
|
+
group;
|
|
2987
|
+
controlName;
|
|
2988
|
+
isRequired = true;
|
|
2989
|
+
isLabelVisible = true;
|
|
2990
|
+
tooltipPosition = TooltipPosition.right;
|
|
2991
|
+
tooltipText = '';
|
|
2992
|
+
formStatus;
|
|
2993
|
+
groupError = false;
|
|
2994
|
+
hasGap = true;
|
|
2995
|
+
hasTitle = false;
|
|
2996
|
+
maxLength = null;
|
|
2997
|
+
ngOnInit() {
|
|
2998
|
+
this._isTooltipVisible = !!this.tooltipText;
|
|
2999
|
+
if (this.mode !== NumberInputMode.currency) {
|
|
3000
|
+
this.currency = undefined;
|
|
3001
|
+
this.locale = undefined;
|
|
3002
|
+
}
|
|
3003
|
+
}
|
|
3004
|
+
onNumberKeyDown(event) {
|
|
3005
|
+
const invalidKeys = ['e', 'E', '+', '-', ',', '.'];
|
|
3006
|
+
if (invalidKeys.includes(event.key)) {
|
|
3007
|
+
event.preventDefault();
|
|
3008
|
+
}
|
|
3009
|
+
}
|
|
3010
|
+
TooltipHoverEventEnum = TooltipHoverEventEnum;
|
|
3011
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: NumberInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3012
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: NumberInputComponent, isStandalone: true, selector: "lib-number-input[group][controlName][name]", inputs: { name: "name", mode: "mode", currency: "currency", locale: "locale", label: "label", placeholder: "placeholder", accessibilityText: "accessibilityText", group: "group", controlName: "controlName", isRequired: "isRequired", isLabelVisible: "isLabelVisible", tooltipPosition: "tooltipPosition", tooltipText: "tooltipText", formStatus: "formStatus", groupError: "groupError", hasGap: "hasGap", hasTitle: "hasTitle", maxLength: "maxLength" }, ngImport: i0, template: "<div class=\"flex flex-column\" [formGroup]=\"group\" [ngClass]=\"{ 'gap-1': hasGap }\">\r\n <div class=\"flex\" *ngIf=\"isLabelVisible\">\r\n <label [title]=\"hasTitle ? label : ''\" [for]='name' class=\"mr-2\">\r\n {{label}}<span class=\"required\" aria-label=\"Is required filed\" *ngIf=\"isRequired\">*</span>\r\n </label>\r\n <lib-tooltip\r\n *ngIf=\"_isTooltipVisible\"\r\n [position]=\"tooltipPosition\"\r\n [text]=\"tooltipText!\"\r\n ></lib-tooltip>\r\n </div>\r\n <p-inputnumber \r\n [id]=\"name\"\r\n [placeholder]='placeholder ?? \" \"'\r\n [mode]=\"mode\"\r\n [currency]=\"currency\"\r\n [locale]=\"locale\"\r\n [formControlName]=\"controlName\"\r\n [maxlength]=\"maxLength\" \r\n [attr.aria-label]=\"accessibilityText\"\r\n [ngClass]=\"{ 'ng-dirty ng-invalid': (group.get(controlName)!.errors && (group.get(controlName)!.touched || formStatus!.isSubmitTriggered)) || groupError }\"\r\n [attr.aria-describedby]=\"name + 'Error'\"\r\n [attr.aria-invalid]=\"(group.get(controlName)!.errors && (group.get(controlName)!.touched || formStatus!.isSubmitTriggered)) || groupError\"\r\n [attr.aria-required]=\"isRequired\"\r\n />\r\n</div>\r\n <lib-error\r\n *ngIf=\"(group.get(controlName)!.errors && (group.get(controlName)!.touched) || formStatus!.isSubmitTriggered)\"\r\n [hasError]=\"group.get(controlName)!.errors\"\r\n [isTouched]=\"group.get(controlName)!.touched\"\r\n [isSubmitTriggered]=\"formStatus!.isSubmitTriggered!\"\r\n [hasGroupError]=\"groupError\"\r\n [errorId]=\"name+'Error'\"\r\n ></lib-error>\r\n", styles: ["label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$5.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$5.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: KeyFilterModule }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: TooltipComponent, selector: " lib-tooltip", inputs: ["icon", "htmlParser", "text", "position", "tooltipEvent", "autoHide", "htmlParse"] }, { kind: "ngmodule", type: InputNumberModule }, { kind: "component", type: i2$5.InputNumber, selector: "p-inputNumber, p-inputnumber, p-input-number", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabelledBy", "ariaDescribedBy", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "variant", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus", "disabled", "fluid"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "component", type: ErrorComponent, selector: "lib-error", inputs: ["hasError", "isTouched", "isSubmitTriggered", "isNestedFormSubmit", "isDirty", "isRequired", "hasGroupError", "errorId"] }] });
|
|
3013
|
+
}
|
|
3014
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: NumberInputComponent, decorators: [{
|
|
3015
|
+
type: Component,
|
|
3016
|
+
args: [{ selector: 'lib-number-input[group][controlName][name]', imports: [
|
|
3017
|
+
FormsModule,
|
|
3018
|
+
ReactiveFormsModule,
|
|
3019
|
+
NgClass,
|
|
3020
|
+
KeyFilterModule,
|
|
3021
|
+
NgIf,
|
|
3022
|
+
TooltipComponent,
|
|
3023
|
+
InputNumberModule,
|
|
3024
|
+
ErrorComponent,
|
|
3025
|
+
], template: "<div class=\"flex flex-column\" [formGroup]=\"group\" [ngClass]=\"{ 'gap-1': hasGap }\">\r\n <div class=\"flex\" *ngIf=\"isLabelVisible\">\r\n <label [title]=\"hasTitle ? label : ''\" [for]='name' class=\"mr-2\">\r\n {{label}}<span class=\"required\" aria-label=\"Is required filed\" *ngIf=\"isRequired\">*</span>\r\n </label>\r\n <lib-tooltip\r\n *ngIf=\"_isTooltipVisible\"\r\n [position]=\"tooltipPosition\"\r\n [text]=\"tooltipText!\"\r\n ></lib-tooltip>\r\n </div>\r\n <p-inputnumber \r\n [id]=\"name\"\r\n [placeholder]='placeholder ?? \" \"'\r\n [mode]=\"mode\"\r\n [currency]=\"currency\"\r\n [locale]=\"locale\"\r\n [formControlName]=\"controlName\"\r\n [maxlength]=\"maxLength\" \r\n [attr.aria-label]=\"accessibilityText\"\r\n [ngClass]=\"{ 'ng-dirty ng-invalid': (group.get(controlName)!.errors && (group.get(controlName)!.touched || formStatus!.isSubmitTriggered)) || groupError }\"\r\n [attr.aria-describedby]=\"name + 'Error'\"\r\n [attr.aria-invalid]=\"(group.get(controlName)!.errors && (group.get(controlName)!.touched || formStatus!.isSubmitTriggered)) || groupError\"\r\n [attr.aria-required]=\"isRequired\"\r\n />\r\n</div>\r\n <lib-error\r\n *ngIf=\"(group.get(controlName)!.errors && (group.get(controlName)!.touched) || formStatus!.isSubmitTriggered)\"\r\n [hasError]=\"group.get(controlName)!.errors\"\r\n [isTouched]=\"group.get(controlName)!.touched\"\r\n [isSubmitTriggered]=\"formStatus!.isSubmitTriggered!\"\r\n [hasGroupError]=\"groupError\"\r\n [errorId]=\"name+'Error'\"\r\n ></lib-error>\r\n", styles: ["label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n"] }]
|
|
3026
|
+
}], propDecorators: { name: [{
|
|
3027
|
+
type: Input
|
|
3028
|
+
}], mode: [{
|
|
3029
|
+
type: Input
|
|
3030
|
+
}], currency: [{
|
|
3031
|
+
type: Input
|
|
3032
|
+
}], locale: [{
|
|
3033
|
+
type: Input
|
|
3034
|
+
}], label: [{
|
|
3035
|
+
type: Input
|
|
3036
|
+
}], placeholder: [{
|
|
3037
|
+
type: Input
|
|
3038
|
+
}], accessibilityText: [{
|
|
3039
|
+
type: Input
|
|
3040
|
+
}], group: [{
|
|
3041
|
+
type: Input
|
|
3042
|
+
}], controlName: [{
|
|
3043
|
+
type: Input
|
|
3044
|
+
}], isRequired: [{
|
|
3045
|
+
type: Input
|
|
3046
|
+
}], isLabelVisible: [{
|
|
3047
|
+
type: Input
|
|
3048
|
+
}], tooltipPosition: [{
|
|
3049
|
+
type: Input
|
|
3050
|
+
}], tooltipText: [{
|
|
3051
|
+
type: Input
|
|
3052
|
+
}], formStatus: [{
|
|
3053
|
+
type: Input
|
|
3054
|
+
}], groupError: [{
|
|
3055
|
+
type: Input
|
|
3056
|
+
}], hasGap: [{
|
|
3057
|
+
type: Input
|
|
3058
|
+
}], hasTitle: [{
|
|
3059
|
+
type: Input
|
|
3060
|
+
}], maxLength: [{
|
|
3061
|
+
type: Input
|
|
3062
|
+
}] } });
|
|
3063
|
+
|
|
2969
3064
|
class InputMaskComponent {
|
|
2970
3065
|
TooltipHoverEventEnum = TooltipHoverEventEnum;
|
|
2971
3066
|
_isTooltipVisible;
|
|
@@ -4259,5 +4354,5 @@ function emailListValidator() {
|
|
|
4259
4354
|
* Generated bundle index. Do not edit.
|
|
4260
4355
|
*/
|
|
4261
4356
|
|
|
4262
|
-
export { AccordionComponent, AppConfigService, AutocompleteComponent, BreadcrumbsComponent, ButtonColor, ButtonComponent, ButtonIconPosition, ButtonLinkComponent, ButtonSize, CacheService, CameraUploadComponent, CaptionColor, CardComponent, CheckboxComponent, ConfirmModalComponent, ConfirmModalService, CustomTableComponent, DateInputComponent, DateService, DialogColor, DividerComponent, DropdownComponent, DynamicRouteService, ErrorComponent, ErrorInterceptor, ExpandedTable, ExpandedTableComponent, ExportService, FileUploadComponent, FilterHeaderComponent, FilterHeaderService, FooterComponent, GenericTableComponent, GlobalErrorHandler, IconButtonComponent, InputComponent, InputMaskComponent, InputType, IsNotBlank, IsNotDecimal, LoaderComponent, LocalStorageService, MainMenuComponent, ModalComponent, NoDataFoundComponent, NoInternetService, PicklistComponent, PositionKey, ProgressBarComponent, SelectionMode, SharedAuthService, SharedMessageService, TableColumnSelectComponent, TableColumnsService, TagColor, TagComponent, TextareaComponent, TinymceEditorComponent, ToastSeverity, ToggleSwitchComponent, TooltipComponent, TooltipHoverEventEnum, TooltipPosition, TranslateSanitizerService, TranslationService, TreeSelectComponent, atLeastOneFieldPresentValidator, cleanMobilePhoneNumber, coordinateValidator, dateAndTimeMismatchValidator, dateMismatchValidator, emailListValidator, findUnavailableDates, formatDate, formatDateTime, formatDateToLocalISOString, getTomorrowDate, isEmpty, isFormInvalid, isMultipleOfFiveValidator, isOnePhoneNumberValidator, localFormatDate, mobilePhoneAreaCodeValidator, transformDateTime };
|
|
4357
|
+
export { AccordionComponent, AppConfigService, AutocompleteComponent, BreadcrumbsComponent, ButtonColor, ButtonComponent, ButtonIconPosition, ButtonLinkComponent, ButtonSize, CacheService, CameraUploadComponent, CaptionColor, CardComponent, CheckboxComponent, ConfirmModalComponent, ConfirmModalService, CustomTableComponent, DateInputComponent, DateService, DialogColor, DividerComponent, DropdownComponent, DynamicRouteService, ErrorComponent, ErrorInterceptor, ExpandedTable, ExpandedTableComponent, ExportService, FileUploadComponent, FilterHeaderComponent, FilterHeaderService, FooterComponent, GenericTableComponent, GlobalErrorHandler, IconButtonComponent, InputComponent, InputMaskComponent, InputType, IsNotBlank, IsNotDecimal, LoaderComponent, LocalStorageService, MainMenuComponent, ModalComponent, NoDataFoundComponent, NoInternetService, NumberInputComponent, NumberInputMode, PicklistComponent, PositionKey, ProgressBarComponent, SelectionMode, SharedAuthService, SharedMessageService, TableColumnSelectComponent, TableColumnsService, TagColor, TagComponent, TextareaComponent, TinymceEditorComponent, ToastSeverity, ToggleSwitchComponent, TooltipComponent, TooltipHoverEventEnum, TooltipPosition, TranslateSanitizerService, TranslationService, TreeSelectComponent, atLeastOneFieldPresentValidator, cleanMobilePhoneNumber, coordinateValidator, dateAndTimeMismatchValidator, dateMismatchValidator, emailListValidator, findUnavailableDates, formatDate, formatDateTime, formatDateToLocalISOString, getTomorrowDate, isEmpty, isFormInvalid, isMultipleOfFiveValidator, isOnePhoneNumberValidator, localFormatDate, mobilePhoneAreaCodeValidator, transformDateTime };
|
|
4263
4358
|
//# sourceMappingURL=n-isi-platform-design-system.mjs.map
|