ngx-smz-ui 3.2.3 → 3.2.7

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.
@@ -1654,9 +1654,13 @@ function unique(options) {
1654
1654
 
1655
1655
  class InputNumberComponent {
1656
1656
  constructor() { }
1657
+ onInput(event) {
1658
+ this.control.setValue(event.value);
1659
+ this.control.updateValueAndValidity();
1660
+ }
1657
1661
  }
1658
1662
  InputNumberComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: InputNumberComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1659
- InputNumberComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.5", type: InputNumberComponent, selector: "smz-input-number", inputs: { input: "input", control: "control", behaviors: "behaviors" }, ngImport: i0, template: "<label class=\"smz__input_name\" [innerHTML]=\"input.name\"></label>\n<div class=\"input_inner__wrapper\">\n <p-inputMask\n *ngIf=\"!input.useFraction\"\n class=\"smz__input_value\"\n fxFlex=\"grow\"\n slotChar=\"\"\n [autoClear]=\"false\"\n mask=\"9?9999999999999999999999999999999\"\n characterPattern=\"([0-9])\"\n [id]=\"input.propertyName\"\n [formControl]=\"control\">\n </p-inputMask>\n <p-inputNumber\n *ngIf=\"input.useFraction\"\n class=\"smz__input_value\"\n fxFlex=\"grow\"\n [formControl]=\"control\"\n locale=\"pt-BR\"\n [minFractionDigits]=\"2\"\n inputId=\"value\">\n </p-inputNumber>\n <smz-validation-messages [input]=\"input\" [control]=\"control\" [behaviors]=\"behaviors\"></smz-validation-messages>\n</div>", components: [{ type: i1$4.InputMask, selector: "p-inputMask", inputs: ["type", "slotChar", "autoClear", "style", "inputId", "styleClass", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabel", "ariaRequired", "disabled", "readonly", "unmask", "name", "required", "characterPattern", "autoFocus", "autocomplete", "mask"], outputs: ["onComplete", "onFocus", "onBlur", "onInput", "onKeydown"] }, { type: i2.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown"] }, { type: ValidationMessagesComponent$1, selector: "smz-validation-messages", inputs: ["input", "control", "behaviors"] }], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$3.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
1663
+ InputNumberComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.5", type: InputNumberComponent, selector: "smz-input-number", inputs: { input: "input", control: "control", behaviors: "behaviors" }, ngImport: i0, template: "<label class=\"smz__input_name\" [innerHTML]=\"input.name\"></label>\n<div class=\"input_inner__wrapper\">\n <p-inputMask\n *ngIf=\"!input.useFraction\"\n class=\"smz__input_value\"\n fxFlex=\"grow\"\n slotChar=\"\"\n [autoClear]=\"false\"\n mask=\"9?9999999999999999999999999999999\"\n characterPattern=\"([0-9])\"\n [id]=\"input.propertyName\"\n [formControl]=\"control\">\n </p-inputMask>\n <p-inputNumber\n *ngIf=\"input.useFraction\"\n class=\"smz__input_value\"\n fxFlex=\"grow\"\n [formControl]=\"control\"\n [locale]=\"input.locale\"\n [minFractionDigits]=\"input.minFractionDigits\"\n [maxFractionDigits]=\"input.maxFractionDigits\"\n [id]=\"input.propertyName\"\n (onInput)=\"onInput($event)\">\n </p-inputNumber>\n <smz-validation-messages [input]=\"input\" [control]=\"control\" [behaviors]=\"behaviors\"></smz-validation-messages>\n</div>", components: [{ type: i1$4.InputMask, selector: "p-inputMask", inputs: ["type", "slotChar", "autoClear", "style", "inputId", "styleClass", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabel", "ariaRequired", "disabled", "readonly", "unmask", "name", "required", "characterPattern", "autoFocus", "autocomplete", "mask"], outputs: ["onComplete", "onFocus", "onBlur", "onInput", "onKeydown"] }, { type: i2.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown"] }, { type: ValidationMessagesComponent$1, selector: "smz-validation-messages", inputs: ["input", "control", "behaviors"] }], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$3.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
1660
1664
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: InputNumberComponent, decorators: [{
1661
1665
  type: Component,
1662
1666
  args: [{
@@ -5591,8 +5595,9 @@ class TableEditableService {
5591
5595
  this.cdr.markForCheck();
5592
5596
  // ACTION DE EXCLUIR
5593
5597
  const action = this.state.editable.actions.remove;
5598
+ const override = this.state.editable.remove.overrideActionDataCallback;
5594
5599
  // ACTION INSTANCIADA COM PARAMETROS
5595
- const dispatchData = new action(row.id);
5600
+ const dispatchData = new action(override != null ? override(row) : row.id);
5596
5601
  // PUBLICAR EVENTO DE OUTPUT SAVE DA TABELA
5597
5602
  this.deleteEvent.emit(row.id);
5598
5603
  // INICIAR TRANSAÇÃO PARA SALVAR OS DADOS
@@ -9170,8 +9175,9 @@ class SmzFormNumberBuilder extends SmzFormInputBuilder {
9170
9175
  this._groupBuilder = _groupBuilder;
9171
9176
  this._numberInput = _numberInput;
9172
9177
  }
9173
- setFraction(minFractionDigits) {
9178
+ setFraction(minFractionDigits = 0, maxFractionDigits) {
9174
9179
  this._numberInput.minFractionDigits = minFractionDigits;
9180
+ this._numberInput.maxFractionDigits = maxFractionDigits;
9175
9181
  this._numberInput.useFraction = true;
9176
9182
  return this;
9177
9183
  }
@@ -16007,7 +16013,8 @@ class SmzTableBuilder {
16007
16013
  remove: {
16008
16014
  isButtonVisible: false,
16009
16015
  isButtonDisabled: false,
16010
- accessClaim: null
16016
+ accessClaim: null,
16017
+ overrideActionDataCallback: null
16011
16018
  },
16012
16019
  actions: {
16013
16020
  update: null,
@@ -16382,12 +16389,13 @@ class SmzTableBuilder {
16382
16389
  this._state.editable.isEditable = true;
16383
16390
  return this;
16384
16391
  }
16385
- setRemoveAction(action, claim) {
16392
+ setRemoveAction(action, claim, overrideActionData) {
16386
16393
  if (!this._state.editable.isEditable)
16387
16394
  this._state.actions.customActions.columnWidth += 150;
16388
16395
  this._state.editable.actions.remove = action;
16389
16396
  this._state.editable.remove.isButtonVisible = true;
16390
16397
  this._state.editable.remove.accessClaim = claim;
16398
+ this._state.editable.remove.overrideActionDataCallback = overrideActionData;
16391
16399
  this._state.editable.isEditable = true;
16392
16400
  return this;
16393
16401
  }