@brggroup/share-lib 0.0.23 → 0.0.24

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.
@@ -1894,10 +1894,15 @@ class ExtendInputNumber {
1894
1894
  inputHeight = '';
1895
1895
  borderBottomOnly = false;
1896
1896
  displayInline = false;
1897
+ /** separatorType: 'comma' (,) | 'dot' (.) */
1898
+ separatorType;
1899
+ /** defaultSeparatorType: 'comma' (,) | 'dot' (.) */
1900
+ static defaultSeparatorType = 'dot';
1897
1901
  formData;
1898
1902
  controlName;
1899
1903
  _ngModel = null;
1900
1904
  _ngModelChange = new EventEmitter();
1905
+ inputnumber;
1901
1906
  ngOnInit() { }
1902
1907
  _onNgModelChange() {
1903
1908
  this._ngModelChange.emit(this._ngModel);
@@ -1906,25 +1911,53 @@ class ExtendInputNumber {
1906
1911
  focus() {
1907
1912
  this.inputElement?.nativeElement?.focus();
1908
1913
  }
1909
- formatter = (value) => {
1910
- if (value === null || value === undefined || value === '') {
1914
+ formatterNumber = (value) => {
1915
+ if (value == null || isNaN(value))
1911
1916
  return '';
1912
- }
1913
- const str = value.toString().replace(/\D/g, '');
1914
- return str.replace(/\B(?=(\d{3})+(?!\d))/g, '.');
1917
+ if (!this.getSeparatorType()) {
1918
+ return value.toString();
1919
+ }
1920
+ const parts = `${value}`.split('.');
1921
+ const integerPart = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, this.getSeparatorType() === 'comma' ? ',' : '.');
1922
+ return parts.length > 1
1923
+ ? `${integerPart}${this.getSeparatorType() === 'comma' ? '.' : ','}${parts[1]}`
1924
+ : integerPart;
1915
1925
  };
1916
- parser = (value) => {
1926
+ parserNumber = (value) => {
1917
1927
  if (!value)
1928
+ return 0;
1929
+ if (!this.getSeparatorType()) {
1930
+ return parseFloat(value);
1931
+ }
1932
+ // Bỏ ký tự phân cách hàng nghìn
1933
+ const cleaned = value
1934
+ .replace(new RegExp(`\\${this.getSeparatorType() === 'comma' ? ',' : '.'}`, 'g'), '')
1935
+ .replace(this.getSeparatorType() === 'comma' ? '.' : ',', '.');
1936
+ // Kiểm tra toàn bộ chuỗi có phải là số hợp lệ hay không
1937
+ if (!/^-?\d+(\.\d+)?$/.test(cleaned))
1918
1938
  return NaN;
1919
- const cleaned = (value = value.replace(/\./g, ''));
1920
- return parseFloat(cleaned);
1939
+ const parsed = parseFloat(cleaned);
1940
+ // Ép chạy formatter lại
1941
+ setTimeout(() => {
1942
+ this.inputnumber.writeValue(parsed);
1943
+ });
1944
+ return parsed;
1921
1945
  };
1946
+ getSeparatorType() {
1947
+ if (this.separatorType == 'blank') {
1948
+ return '';
1949
+ }
1950
+ if (this.separatorType) {
1951
+ return this.separatorType;
1952
+ }
1953
+ return ExtendInputNumber.defaultSeparatorType;
1954
+ }
1922
1955
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ExtendInputNumber, deps: [], target: i0.ɵɵFactoryTarget.Component });
1923
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.7", type: ExtendInputNumber, isStandalone: true, selector: "extend-input-number", inputs: { layOutType: "layOutType", label: "label", placeHolder: "placeHolder", labelAlign: "labelAlign", labelSpan: "labelSpan", disabled: "disabled", required: "required", noBottom: "noBottom", size: "size", min: "min", max: "max", precision: "precision", inputWidth: "inputWidth", inputHeight: "inputHeight", borderBottomOnly: "borderBottomOnly", displayInline: "displayInline", formData: "formData", controlName: "controlName", _ngModel: "_ngModel" }, outputs: { _ngModelChange: "_ngModelChange" }, viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["inputElement"], descendants: true }], ngImport: i0, template: "<div class=\"extend-wrapper\" [ngStyle]=\"{ display: displayInline ? 'inline' : null }\">\n @if (controlName) {\n <div [formGroup]=\"formData\">\n <nz-form-item>\n <nz-form-label\n [nzSpan]=\"layOutType == 'horizontal' ? labelSpan : null\"\n [nzLabelAlign]=\"labelAlign\"\n [nzRequired]=\"required\"\n [nzFor]=\"controlName\"\n nzNoColon\n nzLabelWrap\n >\n {{ label }}\n </nz-form-label>\n <nz-form-control\n [nzSpan]=\"layOutType == 'horizontal' ? 24 - labelSpan : null\"\n [ngClass]=\"{ 'full-width': layOutType == 'vertical' }\"\n [nzErrorTip]=\"'REQUIRED_FIELD' | translate\"\n >\n <nz-input-number\n class=\"full-width\"\n [nzSize]=\"size\"\n [nzFormatter]=\"formatter\"\n [nzParser]=\"parser\"\n [nzPrecision]=\"precision\"\n [formControlName]=\"controlName\"\n />\n </nz-form-control>\n </nz-form-item>\n </div>\n } @else {\n @if (label) {\n <nz-form-item>\n <nz-form-label\n [nzSpan]=\"layOutType == 'horizontal' ? labelSpan : null\"\n [nzLabelAlign]=\"labelAlign\"\n [nzRequired]=\"required\"\n [nzFor]=\"controlName\"\n nzNoColon\n nzLabelWrap\n >\n {{ label }}\n </nz-form-label>\n <nz-form-control\n [nzSpan]=\"layOutType == 'horizontal' ? 24 - labelSpan : null\"\n [ngClass]=\"{ 'full-width': layOutType == 'vertical' }\"\n [nzErrorTip]=\"'REQUIRED_FIELD' | translate\"\n >\n @if (min != null && max != null) {\n <nz-input-number\n class=\"full-width\"\n [nzSize]=\"size\"\n [nzMin]=\"min\"\n [nzMax]=\"max\"\n [nzFormatter]=\"formatter\"\n [nzParser]=\"parser\"\n [nzPrecision]=\"precision\"\n [nzDisabled]=\"disabled\"\n [(ngModel)]=\"_ngModel\"\n (ngModelChange)=\"_onNgModelChange()\"\n />\n } @else if (min != null) {\n <nz-input-number\n class=\"full-width\"\n [nzSize]=\"size\"\n [nzMin]=\"min\"\n [nzFormatter]=\"formatter\"\n [nzParser]=\"parser\"\n [nzPrecision]=\"precision\"\n [nzDisabled]=\"disabled\"\n [(ngModel)]=\"_ngModel\"\n (ngModelChange)=\"_onNgModelChange()\"\n />\n } @else if (max != null) {\n <nz-input-number\n class=\"full-width\"\n [nzSize]=\"size\"\n [nzMax]=\"max\"\n [nzFormatter]=\"formatter\"\n [nzParser]=\"parser\"\n [nzPrecision]=\"precision\"\n [nzDisabled]=\"disabled\"\n [(ngModel)]=\"_ngModel\"\n (ngModelChange)=\"_onNgModelChange()\"\n />\n } @else {\n <nz-input-number\n class=\"full-width\"\n [nzSize]=\"size\"\n [nzFormatter]=\"formatter\"\n [nzParser]=\"parser\"\n [nzPrecision]=\"precision\"\n [nzDisabled]=\"disabled\"\n [(ngModel)]=\"_ngModel\"\n (ngModelChange)=\"_onNgModelChange()\"\n />\n }\n </nz-form-control>\n </nz-form-item>\n } @else {\n @if (min != null && max != null) {\n <nz-input-number\n class=\"full-width\"\n [nzSize]=\"size\"\n [nzMin]=\"min\"\n [nzMax]=\"max\"\n [nzFormatter]=\"formatter\"\n [nzParser]=\"parser\"\n [nzPrecision]=\"precision\"\n [nzDisabled]=\"disabled\"\n [(ngModel)]=\"_ngModel\"\n (ngModelChange)=\"_onNgModelChange()\"\n />\n } @else if (min != null) {\n <nz-input-number\n class=\"full-width\"\n [nzSize]=\"size\"\n [nzMin]=\"min\"\n [nzFormatter]=\"formatter\"\n [nzParser]=\"parser\"\n [nzPrecision]=\"precision\"\n [nzDisabled]=\"disabled\"\n [(ngModel)]=\"_ngModel\"\n (ngModelChange)=\"_onNgModelChange()\"\n />\n } @else if (max != null) {\n <nz-input-number\n class=\"full-width\"\n [nzSize]=\"size\"\n [nzMax]=\"max\"\n [nzFormatter]=\"formatter\"\n [nzParser]=\"parser\"\n [nzPrecision]=\"precision\"\n [nzDisabled]=\"disabled\"\n [(ngModel)]=\"_ngModel\"\n (ngModelChange)=\"_onNgModelChange()\"\n />\n } @else {\n <nz-input-number\n class=\"full-width\"\n [nzSize]=\"size\"\n [nzFormatter]=\"formatter\"\n [nzParser]=\"parser\"\n [nzPrecision]=\"precision\"\n [nzDisabled]=\"disabled\"\n [(ngModel)]=\"_ngModel\"\n (ngModelChange)=\"_onNgModelChange()\"\n [ngStyle]=\"{\n width: inputWidth,\n height: inputHeight,\n border: borderBottomOnly ? 'none' : '',\n 'border-bottom': borderBottomOnly ? '1px dashed' : '',\n }\"\n />\n }\n }\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: NzFormModule }, { kind: "directive", type: i4.NzColDirective, selector: "[nz-col],nz-col,nz-form-control,nz-form-label", inputs: ["nzFlex", "nzSpan", "nzOrder", "nzOffset", "nzPush", "nzPull", "nzXs", "nzSm", "nzMd", "nzLg", "nzXl", "nzXXl"], exportAs: ["nzCol"] }, { kind: "directive", type: i4.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "component", type: i5.NzFormItemComponent, selector: "nz-form-item", exportAs: ["nzFormItem"] }, { kind: "component", type: i5.NzFormLabelComponent, selector: "nz-form-label", inputs: ["nzFor", "nzRequired", "nzNoColon", "nzTooltipTitle", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap"], exportAs: ["nzFormLabel"] }, { kind: "component", type: i5.NzFormControlComponent, selector: "nz-form-control", inputs: ["nzSuccessTip", "nzWarningTip", "nzErrorTip", "nzValidatingTip", "nzExtra", "nzAutoTips", "nzDisableAutoTips", "nzHasFeedback", "nzValidateStatus"], exportAs: ["nzFormControl"] }, { kind: "ngmodule", type: NzInputNumberModule }, { kind: "component", type: i6.NzInputNumberComponent, selector: "nz-input-number", inputs: ["nzId", "nzSize", "nzPlaceHolder", "nzStatus", "nzStep", "nzMin", "nzMax", "nzPrecision", "nzParser", "nzFormatter", "nzDisabled", "nzReadOnly", "nzAutoFocus", "nzBordered", "nzKeyboard", "nzControls"], outputs: ["nzOnStep"], exportAs: ["nzInputNumber"] }] });
1956
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.7", type: ExtendInputNumber, isStandalone: true, selector: "extend-input-number", inputs: { layOutType: "layOutType", label: "label", placeHolder: "placeHolder", labelAlign: "labelAlign", labelSpan: "labelSpan", disabled: "disabled", required: "required", noBottom: "noBottom", size: "size", min: "min", max: "max", precision: "precision", inputWidth: "inputWidth", inputHeight: "inputHeight", borderBottomOnly: "borderBottomOnly", displayInline: "displayInline", separatorType: "separatorType", formData: "formData", controlName: "controlName", _ngModel: "_ngModel" }, outputs: { _ngModelChange: "_ngModelChange" }, viewQueries: [{ propertyName: "inputnumber", first: true, predicate: ["inputnumber"], descendants: true }, { propertyName: "inputElement", first: true, predicate: ["inputElement"], descendants: true }], ngImport: i0, template: "<div class=\"extend-wrapper\" [ngStyle]=\"{ display: displayInline ? 'inline' : null }\">\n @if (controlName) {\n <div [formGroup]=\"formData\">\n <nz-form-item>\n <nz-form-label\n [nzSpan]=\"layOutType == 'horizontal' ? labelSpan : null\"\n [nzLabelAlign]=\"labelAlign\"\n [nzRequired]=\"required\"\n [nzFor]=\"controlName\"\n nzNoColon\n nzLabelWrap\n >\n {{ label }}\n </nz-form-label>\n <nz-form-control\n [nzSpan]=\"layOutType == 'horizontal' ? 24 - labelSpan : null\"\n [ngClass]=\"{ 'full-width': layOutType == 'vertical' }\"\n [nzErrorTip]=\"'REQUIRED_FIELD' | translate\"\n >\n <nz-input-number\n #inputnumber\n class=\"full-width\"\n [nzSize]=\"size\"\n [nzFormatter]=\"formatterNumber\"\n [nzParser]=\"parserNumber\"\n [nzPrecision]=\"precision\"\n [formControlName]=\"controlName\"\n />\n </nz-form-control>\n </nz-form-item>\n </div>\n } @else {\n @if (label) {\n <nz-form-item>\n <nz-form-label\n [nzSpan]=\"layOutType == 'horizontal' ? labelSpan : null\"\n [nzLabelAlign]=\"labelAlign\"\n [nzRequired]=\"required\"\n [nzFor]=\"controlName\"\n nzNoColon\n nzLabelWrap\n >\n {{ label }}\n </nz-form-label>\n <nz-form-control\n [nzSpan]=\"layOutType == 'horizontal' ? 24 - labelSpan : null\"\n [ngClass]=\"{ 'full-width': layOutType == 'vertical' }\"\n [nzErrorTip]=\"'REQUIRED_FIELD' | translate\"\n >\n @if (min != null && max != null) {\n <nz-input-number\n #inputnumber\n class=\"full-width\"\n [nzSize]=\"size\"\n [nzMin]=\"min\"\n [nzMax]=\"max\"\n [nzFormatter]=\"formatterNumber\"\n [nzParser]=\"parserNumber\"\n [nzPrecision]=\"precision\"\n [nzDisabled]=\"disabled\"\n [(ngModel)]=\"_ngModel\"\n (ngModelChange)=\"_onNgModelChange()\"\n />\n } @else if (min != null) {\n <nz-input-number\n #inputnumber\n class=\"full-width\"\n [nzSize]=\"size\"\n [nzMin]=\"min\"\n [nzFormatter]=\"formatterNumber\"\n [nzParser]=\"parserNumber\"\n [nzPrecision]=\"precision\"\n [nzDisabled]=\"disabled\"\n [(ngModel)]=\"_ngModel\"\n (ngModelChange)=\"_onNgModelChange()\"\n />\n } @else if (max != null) {\n <nz-input-number\n #inputnumber\n class=\"full-width\"\n [nzSize]=\"size\"\n [nzMax]=\"max\"\n [nzFormatter]=\"formatterNumber\"\n [nzParser]=\"parserNumber\"\n [nzPrecision]=\"precision\"\n [nzDisabled]=\"disabled\"\n [(ngModel)]=\"_ngModel\"\n (ngModelChange)=\"_onNgModelChange()\"\n />\n } @else {\n <nz-input-number\n #inputnumber\n class=\"full-width\"\n [nzSize]=\"size\"\n [nzFormatter]=\"formatterNumber\"\n [nzParser]=\"parserNumber\"\n [nzPrecision]=\"precision\"\n [nzDisabled]=\"disabled\"\n [(ngModel)]=\"_ngModel\"\n (ngModelChange)=\"_onNgModelChange()\"\n />\n }\n </nz-form-control>\n </nz-form-item>\n } @else {\n @if (min != null && max != null) {\n <nz-input-number\n #inputnumber\n class=\"full-width\"\n [nzSize]=\"size\"\n [nzMin]=\"min\"\n [nzMax]=\"max\"\n [nzFormatter]=\"formatterNumber\"\n [nzParser]=\"parserNumber\"\n [nzPrecision]=\"precision\"\n [nzDisabled]=\"disabled\"\n [(ngModel)]=\"_ngModel\"\n (ngModelChange)=\"_onNgModelChange()\"\n />\n } @else if (min != null) {\n <nz-input-number\n #inputnumber\n class=\"full-width\"\n [nzSize]=\"size\"\n [nzMin]=\"min\"\n [nzFormatter]=\"formatterNumber\"\n [nzParser]=\"parserNumber\"\n [nzPrecision]=\"precision\"\n [nzDisabled]=\"disabled\"\n [(ngModel)]=\"_ngModel\"\n (ngModelChange)=\"_onNgModelChange()\"\n />\n } @else if (max != null) {\n <nz-input-number\n #inputnumber\n class=\"full-width\"\n [nzSize]=\"size\"\n [nzMax]=\"max\"\n [nzFormatter]=\"formatterNumber\"\n [nzParser]=\"parserNumber\"\n [nzPrecision]=\"precision\"\n [nzDisabled]=\"disabled\"\n [(ngModel)]=\"_ngModel\"\n (ngModelChange)=\"_onNgModelChange()\"\n />\n } @else {\n <nz-input-number\n #inputnumber\n class=\"full-width\"\n [nzSize]=\"size\"\n [nzFormatter]=\"formatterNumber\"\n [nzParser]=\"parserNumber\"\n [nzPrecision]=\"precision\"\n [nzDisabled]=\"disabled\"\n [(ngModel)]=\"_ngModel\"\n (ngModelChange)=\"_onNgModelChange()\"\n [ngStyle]=\"{\n width: inputWidth,\n height: inputHeight,\n border: borderBottomOnly ? 'none' : '',\n 'border-bottom': borderBottomOnly ? '1px dashed' : '',\n }\"\n />\n }\n }\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: NzFormModule }, { kind: "directive", type: i4.NzColDirective, selector: "[nz-col],nz-col,nz-form-control,nz-form-label", inputs: ["nzFlex", "nzSpan", "nzOrder", "nzOffset", "nzPush", "nzPull", "nzXs", "nzSm", "nzMd", "nzLg", "nzXl", "nzXXl"], exportAs: ["nzCol"] }, { kind: "directive", type: i4.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "component", type: i5.NzFormItemComponent, selector: "nz-form-item", exportAs: ["nzFormItem"] }, { kind: "component", type: i5.NzFormLabelComponent, selector: "nz-form-label", inputs: ["nzFor", "nzRequired", "nzNoColon", "nzTooltipTitle", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap"], exportAs: ["nzFormLabel"] }, { kind: "component", type: i5.NzFormControlComponent, selector: "nz-form-control", inputs: ["nzSuccessTip", "nzWarningTip", "nzErrorTip", "nzValidatingTip", "nzExtra", "nzAutoTips", "nzDisableAutoTips", "nzHasFeedback", "nzValidateStatus"], exportAs: ["nzFormControl"] }, { kind: "ngmodule", type: NzInputNumberModule }, { kind: "component", type: i6.NzInputNumberComponent, selector: "nz-input-number", inputs: ["nzId", "nzSize", "nzPlaceHolder", "nzStatus", "nzStep", "nzMin", "nzMax", "nzPrecision", "nzParser", "nzFormatter", "nzDisabled", "nzReadOnly", "nzAutoFocus", "nzBordered", "nzKeyboard", "nzControls"], outputs: ["nzOnStep"], exportAs: ["nzInputNumber"] }] });
1924
1957
  }
1925
1958
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ExtendInputNumber, decorators: [{
1926
1959
  type: Component,
1927
- args: [{ selector: 'extend-input-number', imports: [CommonModule, FormsModule, ReactiveFormsModule, TranslateModule, NzFormModule, NzInputNumberModule], template: "<div class=\"extend-wrapper\" [ngStyle]=\"{ display: displayInline ? 'inline' : null }\">\n @if (controlName) {\n <div [formGroup]=\"formData\">\n <nz-form-item>\n <nz-form-label\n [nzSpan]=\"layOutType == 'horizontal' ? labelSpan : null\"\n [nzLabelAlign]=\"labelAlign\"\n [nzRequired]=\"required\"\n [nzFor]=\"controlName\"\n nzNoColon\n nzLabelWrap\n >\n {{ label }}\n </nz-form-label>\n <nz-form-control\n [nzSpan]=\"layOutType == 'horizontal' ? 24 - labelSpan : null\"\n [ngClass]=\"{ 'full-width': layOutType == 'vertical' }\"\n [nzErrorTip]=\"'REQUIRED_FIELD' | translate\"\n >\n <nz-input-number\n class=\"full-width\"\n [nzSize]=\"size\"\n [nzFormatter]=\"formatter\"\n [nzParser]=\"parser\"\n [nzPrecision]=\"precision\"\n [formControlName]=\"controlName\"\n />\n </nz-form-control>\n </nz-form-item>\n </div>\n } @else {\n @if (label) {\n <nz-form-item>\n <nz-form-label\n [nzSpan]=\"layOutType == 'horizontal' ? labelSpan : null\"\n [nzLabelAlign]=\"labelAlign\"\n [nzRequired]=\"required\"\n [nzFor]=\"controlName\"\n nzNoColon\n nzLabelWrap\n >\n {{ label }}\n </nz-form-label>\n <nz-form-control\n [nzSpan]=\"layOutType == 'horizontal' ? 24 - labelSpan : null\"\n [ngClass]=\"{ 'full-width': layOutType == 'vertical' }\"\n [nzErrorTip]=\"'REQUIRED_FIELD' | translate\"\n >\n @if (min != null && max != null) {\n <nz-input-number\n class=\"full-width\"\n [nzSize]=\"size\"\n [nzMin]=\"min\"\n [nzMax]=\"max\"\n [nzFormatter]=\"formatter\"\n [nzParser]=\"parser\"\n [nzPrecision]=\"precision\"\n [nzDisabled]=\"disabled\"\n [(ngModel)]=\"_ngModel\"\n (ngModelChange)=\"_onNgModelChange()\"\n />\n } @else if (min != null) {\n <nz-input-number\n class=\"full-width\"\n [nzSize]=\"size\"\n [nzMin]=\"min\"\n [nzFormatter]=\"formatter\"\n [nzParser]=\"parser\"\n [nzPrecision]=\"precision\"\n [nzDisabled]=\"disabled\"\n [(ngModel)]=\"_ngModel\"\n (ngModelChange)=\"_onNgModelChange()\"\n />\n } @else if (max != null) {\n <nz-input-number\n class=\"full-width\"\n [nzSize]=\"size\"\n [nzMax]=\"max\"\n [nzFormatter]=\"formatter\"\n [nzParser]=\"parser\"\n [nzPrecision]=\"precision\"\n [nzDisabled]=\"disabled\"\n [(ngModel)]=\"_ngModel\"\n (ngModelChange)=\"_onNgModelChange()\"\n />\n } @else {\n <nz-input-number\n class=\"full-width\"\n [nzSize]=\"size\"\n [nzFormatter]=\"formatter\"\n [nzParser]=\"parser\"\n [nzPrecision]=\"precision\"\n [nzDisabled]=\"disabled\"\n [(ngModel)]=\"_ngModel\"\n (ngModelChange)=\"_onNgModelChange()\"\n />\n }\n </nz-form-control>\n </nz-form-item>\n } @else {\n @if (min != null && max != null) {\n <nz-input-number\n class=\"full-width\"\n [nzSize]=\"size\"\n [nzMin]=\"min\"\n [nzMax]=\"max\"\n [nzFormatter]=\"formatter\"\n [nzParser]=\"parser\"\n [nzPrecision]=\"precision\"\n [nzDisabled]=\"disabled\"\n [(ngModel)]=\"_ngModel\"\n (ngModelChange)=\"_onNgModelChange()\"\n />\n } @else if (min != null) {\n <nz-input-number\n class=\"full-width\"\n [nzSize]=\"size\"\n [nzMin]=\"min\"\n [nzFormatter]=\"formatter\"\n [nzParser]=\"parser\"\n [nzPrecision]=\"precision\"\n [nzDisabled]=\"disabled\"\n [(ngModel)]=\"_ngModel\"\n (ngModelChange)=\"_onNgModelChange()\"\n />\n } @else if (max != null) {\n <nz-input-number\n class=\"full-width\"\n [nzSize]=\"size\"\n [nzMax]=\"max\"\n [nzFormatter]=\"formatter\"\n [nzParser]=\"parser\"\n [nzPrecision]=\"precision\"\n [nzDisabled]=\"disabled\"\n [(ngModel)]=\"_ngModel\"\n (ngModelChange)=\"_onNgModelChange()\"\n />\n } @else {\n <nz-input-number\n class=\"full-width\"\n [nzSize]=\"size\"\n [nzFormatter]=\"formatter\"\n [nzParser]=\"parser\"\n [nzPrecision]=\"precision\"\n [nzDisabled]=\"disabled\"\n [(ngModel)]=\"_ngModel\"\n (ngModelChange)=\"_onNgModelChange()\"\n [ngStyle]=\"{\n width: inputWidth,\n height: inputHeight,\n border: borderBottomOnly ? 'none' : '',\n 'border-bottom': borderBottomOnly ? '1px dashed' : '',\n }\"\n />\n }\n }\n }\n</div>\n" }]
1960
+ args: [{ selector: 'extend-input-number', imports: [CommonModule, FormsModule, ReactiveFormsModule, TranslateModule, NzFormModule, NzInputNumberModule], template: "<div class=\"extend-wrapper\" [ngStyle]=\"{ display: displayInline ? 'inline' : null }\">\n @if (controlName) {\n <div [formGroup]=\"formData\">\n <nz-form-item>\n <nz-form-label\n [nzSpan]=\"layOutType == 'horizontal' ? labelSpan : null\"\n [nzLabelAlign]=\"labelAlign\"\n [nzRequired]=\"required\"\n [nzFor]=\"controlName\"\n nzNoColon\n nzLabelWrap\n >\n {{ label }}\n </nz-form-label>\n <nz-form-control\n [nzSpan]=\"layOutType == 'horizontal' ? 24 - labelSpan : null\"\n [ngClass]=\"{ 'full-width': layOutType == 'vertical' }\"\n [nzErrorTip]=\"'REQUIRED_FIELD' | translate\"\n >\n <nz-input-number\n #inputnumber\n class=\"full-width\"\n [nzSize]=\"size\"\n [nzFormatter]=\"formatterNumber\"\n [nzParser]=\"parserNumber\"\n [nzPrecision]=\"precision\"\n [formControlName]=\"controlName\"\n />\n </nz-form-control>\n </nz-form-item>\n </div>\n } @else {\n @if (label) {\n <nz-form-item>\n <nz-form-label\n [nzSpan]=\"layOutType == 'horizontal' ? labelSpan : null\"\n [nzLabelAlign]=\"labelAlign\"\n [nzRequired]=\"required\"\n [nzFor]=\"controlName\"\n nzNoColon\n nzLabelWrap\n >\n {{ label }}\n </nz-form-label>\n <nz-form-control\n [nzSpan]=\"layOutType == 'horizontal' ? 24 - labelSpan : null\"\n [ngClass]=\"{ 'full-width': layOutType == 'vertical' }\"\n [nzErrorTip]=\"'REQUIRED_FIELD' | translate\"\n >\n @if (min != null && max != null) {\n <nz-input-number\n #inputnumber\n class=\"full-width\"\n [nzSize]=\"size\"\n [nzMin]=\"min\"\n [nzMax]=\"max\"\n [nzFormatter]=\"formatterNumber\"\n [nzParser]=\"parserNumber\"\n [nzPrecision]=\"precision\"\n [nzDisabled]=\"disabled\"\n [(ngModel)]=\"_ngModel\"\n (ngModelChange)=\"_onNgModelChange()\"\n />\n } @else if (min != null) {\n <nz-input-number\n #inputnumber\n class=\"full-width\"\n [nzSize]=\"size\"\n [nzMin]=\"min\"\n [nzFormatter]=\"formatterNumber\"\n [nzParser]=\"parserNumber\"\n [nzPrecision]=\"precision\"\n [nzDisabled]=\"disabled\"\n [(ngModel)]=\"_ngModel\"\n (ngModelChange)=\"_onNgModelChange()\"\n />\n } @else if (max != null) {\n <nz-input-number\n #inputnumber\n class=\"full-width\"\n [nzSize]=\"size\"\n [nzMax]=\"max\"\n [nzFormatter]=\"formatterNumber\"\n [nzParser]=\"parserNumber\"\n [nzPrecision]=\"precision\"\n [nzDisabled]=\"disabled\"\n [(ngModel)]=\"_ngModel\"\n (ngModelChange)=\"_onNgModelChange()\"\n />\n } @else {\n <nz-input-number\n #inputnumber\n class=\"full-width\"\n [nzSize]=\"size\"\n [nzFormatter]=\"formatterNumber\"\n [nzParser]=\"parserNumber\"\n [nzPrecision]=\"precision\"\n [nzDisabled]=\"disabled\"\n [(ngModel)]=\"_ngModel\"\n (ngModelChange)=\"_onNgModelChange()\"\n />\n }\n </nz-form-control>\n </nz-form-item>\n } @else {\n @if (min != null && max != null) {\n <nz-input-number\n #inputnumber\n class=\"full-width\"\n [nzSize]=\"size\"\n [nzMin]=\"min\"\n [nzMax]=\"max\"\n [nzFormatter]=\"formatterNumber\"\n [nzParser]=\"parserNumber\"\n [nzPrecision]=\"precision\"\n [nzDisabled]=\"disabled\"\n [(ngModel)]=\"_ngModel\"\n (ngModelChange)=\"_onNgModelChange()\"\n />\n } @else if (min != null) {\n <nz-input-number\n #inputnumber\n class=\"full-width\"\n [nzSize]=\"size\"\n [nzMin]=\"min\"\n [nzFormatter]=\"formatterNumber\"\n [nzParser]=\"parserNumber\"\n [nzPrecision]=\"precision\"\n [nzDisabled]=\"disabled\"\n [(ngModel)]=\"_ngModel\"\n (ngModelChange)=\"_onNgModelChange()\"\n />\n } @else if (max != null) {\n <nz-input-number\n #inputnumber\n class=\"full-width\"\n [nzSize]=\"size\"\n [nzMax]=\"max\"\n [nzFormatter]=\"formatterNumber\"\n [nzParser]=\"parserNumber\"\n [nzPrecision]=\"precision\"\n [nzDisabled]=\"disabled\"\n [(ngModel)]=\"_ngModel\"\n (ngModelChange)=\"_onNgModelChange()\"\n />\n } @else {\n <nz-input-number\n #inputnumber\n class=\"full-width\"\n [nzSize]=\"size\"\n [nzFormatter]=\"formatterNumber\"\n [nzParser]=\"parserNumber\"\n [nzPrecision]=\"precision\"\n [nzDisabled]=\"disabled\"\n [(ngModel)]=\"_ngModel\"\n (ngModelChange)=\"_onNgModelChange()\"\n [ngStyle]=\"{\n width: inputWidth,\n height: inputHeight,\n border: borderBottomOnly ? 'none' : '',\n 'border-bottom': borderBottomOnly ? '1px dashed' : '',\n }\"\n />\n }\n }\n }\n</div>\n" }]
1928
1961
  }], propDecorators: { layOutType: [{
1929
1962
  type: Input
1930
1963
  }], label: [{
@@ -1957,6 +1990,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImpor
1957
1990
  type: Input
1958
1991
  }], displayInline: [{
1959
1992
  type: Input
1993
+ }], separatorType: [{
1994
+ type: Input
1960
1995
  }], formData: [{
1961
1996
  type: Input
1962
1997
  }], controlName: [{
@@ -1965,6 +2000,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImpor
1965
2000
  type: Input
1966
2001
  }], _ngModelChange: [{
1967
2002
  type: Output
2003
+ }], inputnumber: [{
2004
+ type: ViewChild,
2005
+ args: ['inputnumber']
1968
2006
  }], inputElement: [{
1969
2007
  type: ViewChild,
1970
2008
  args: ['inputElement']