@ngx-smz/core 21.6.1 → 21.7.1
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/ngx-smz-core.mjs +250 -18
- package/fesm2022/ngx-smz-core.mjs.map +1 -1
- package/package.json +1 -1
- package/types/ngx-smz-core.d.ts +81 -13
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { signal, Injectable, InjectionToken, provideAppInitializer, inject, makeEnvironmentProviders, computed, Pipe, Input, Component, DestroyRef, EventEmitter, HostListener, Output, HostBinding, Directive, ChangeDetectionStrategy, ViewEncapsulation, Optional, NgModule, ViewChild, ElementRef, Renderer2, forwardRef, Inject,
|
|
2
|
+
import { signal, Injectable, InjectionToken, provideAppInitializer, inject, makeEnvironmentProviders, computed, Pipe, Input, Component, ChangeDetectorRef, effect, DestroyRef, EventEmitter, HostListener, Output, HostBinding, Directive, ChangeDetectionStrategy, ViewEncapsulation, Optional, NgModule, ViewChild, ElementRef, Renderer2, forwardRef, Inject, LOCALE_ID, ContentChildren, Self, ErrorHandler, DEFAULT_CURRENCY_CODE, DOCUMENT, PLATFORM_ID } from '@angular/core';
|
|
3
3
|
import * as i1$1 from '@angular/common';
|
|
4
4
|
import { CommonModule, getCurrencySymbol, getLocaleCurrencyCode, NgStyle, LocationStrategy, registerLocaleData, isPlatformBrowser as isPlatformBrowser$1, formatDate } from '@angular/common';
|
|
5
5
|
import * as i1$3 from '@angular/forms';
|
|
@@ -21,7 +21,7 @@ import { ObjectUtils, ZIndexUtils, UniqueComponentId } from 'primeng/utils';
|
|
|
21
21
|
import * as i1$8 from '@angular/common/http';
|
|
22
22
|
import { HttpClient, provideHttpClient, withInterceptorsFromDi, HttpErrorResponse, HttpHeaders, HTTP_INTERCEPTORS } from '@angular/common/http';
|
|
23
23
|
import { cloneDeep, uniqBy, flatten as flatten$1, sortBy, isBoolean as isBoolean$1, isEmpty as isEmpty$2, isEqual } from 'lodash-es';
|
|
24
|
-
import { Subscription, BehaviorSubject, firstValueFrom, debounceTime, tap, of, take as take$1, Subject, throwError, map as map$1, throttleTime, switchMap, Observable, takeUntil as takeUntil$2,
|
|
24
|
+
import { Subscription, BehaviorSubject, merge, firstValueFrom, debounceTime, tap, of, take as take$1, Subject, throwError, map as map$1, throttleTime, switchMap, Observable, takeUntil as takeUntil$2, filter as filter$1 } from 'rxjs';
|
|
25
25
|
import * as i1$2 from 'primeng/datepicker';
|
|
26
26
|
import { DatePickerModule } from 'primeng/datepicker';
|
|
27
27
|
import * as i1 from 'primeng/tooltip';
|
|
@@ -2184,7 +2184,9 @@ class SmzFormValidationMessagesService {
|
|
|
2184
2184
|
validationMessagesByPropertyName = new Map();
|
|
2185
2185
|
messagesByPropertyNameSignal = signal({}, ...(ngDevMode ? [{ debugName: "messagesByPropertyNameSignal" }] : []));
|
|
2186
2186
|
controlMessagesSignals = new WeakMap();
|
|
2187
|
+
viewRefreshSignal = signal(0, ...(ngDevMode ? [{ debugName: "viewRefreshSignal" }] : []));
|
|
2187
2188
|
messagesByPropertyName = this.messagesByPropertyNameSignal.asReadonly();
|
|
2189
|
+
viewRefreshTick = this.viewRefreshSignal.asReadonly();
|
|
2188
2190
|
initialize(config, form) {
|
|
2189
2191
|
this.resetState();
|
|
2190
2192
|
this.form = form;
|
|
@@ -2202,6 +2204,12 @@ class SmzFormValidationMessagesService {
|
|
|
2202
2204
|
this.subscriptions.add(this.form.statusChanges.subscribe(() => {
|
|
2203
2205
|
this.refreshAllMessages();
|
|
2204
2206
|
}));
|
|
2207
|
+
this.subscriptions.add(this.form.valueChanges.subscribe(() => {
|
|
2208
|
+
this.refreshAllMessages();
|
|
2209
|
+
}));
|
|
2210
|
+
}
|
|
2211
|
+
notifyViewRefresh() {
|
|
2212
|
+
this.viewRefreshSignal.update(value => value + 1);
|
|
2205
2213
|
}
|
|
2206
2214
|
getMessagesSignalByControl(control) {
|
|
2207
2215
|
if (control == null) {
|
|
@@ -2255,6 +2263,7 @@ class SmzFormValidationMessagesService {
|
|
|
2255
2263
|
this.subscriptions = new Subscription();
|
|
2256
2264
|
this.validationMessagesByPropertyName.clear();
|
|
2257
2265
|
this.messagesByPropertyNameSignal.set({});
|
|
2266
|
+
this.viewRefreshSignal.set(0);
|
|
2258
2267
|
this.form = null;
|
|
2259
2268
|
}
|
|
2260
2269
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzFormValidationMessagesService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
@@ -2854,11 +2863,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
2854
2863
|
|
|
2855
2864
|
class ValidationMessagesComponent {
|
|
2856
2865
|
validationMessagesService = inject(SmzFormValidationMessagesService);
|
|
2866
|
+
changeDetectorRef = inject(ChangeDetectorRef);
|
|
2867
|
+
controlSubscription;
|
|
2857
2868
|
formControl;
|
|
2858
2869
|
input;
|
|
2859
2870
|
set control(value) {
|
|
2871
|
+
this.controlSubscription?.unsubscribe();
|
|
2860
2872
|
this.formControl = value;
|
|
2861
2873
|
this.controlMessages = this.validationMessagesService.getMessagesSignalByControl(value);
|
|
2874
|
+
if (value != null) {
|
|
2875
|
+
this.controlSubscription = merge(value.statusChanges, value.valueChanges).subscribe(() => {
|
|
2876
|
+
this.changeDetectorRef.markForCheck();
|
|
2877
|
+
});
|
|
2878
|
+
}
|
|
2862
2879
|
}
|
|
2863
2880
|
get control() {
|
|
2864
2881
|
return this.formControl;
|
|
@@ -2867,13 +2884,22 @@ class ValidationMessagesComponent {
|
|
|
2867
2884
|
extraMessages = [];
|
|
2868
2885
|
controlMessages = signal([], ...(ngDevMode ? [{ debugName: "controlMessages" }] : []));
|
|
2869
2886
|
uiConfig = GlobalInjector.config;
|
|
2887
|
+
constructor() {
|
|
2888
|
+
effect(() => {
|
|
2889
|
+
this.validationMessagesService.viewRefreshTick();
|
|
2890
|
+
this.changeDetectorRef.markForCheck();
|
|
2891
|
+
});
|
|
2892
|
+
}
|
|
2893
|
+
ngOnDestroy() {
|
|
2894
|
+
this.controlSubscription?.unsubscribe();
|
|
2895
|
+
}
|
|
2870
2896
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ValidationMessagesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2871
2897
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: ValidationMessagesComponent, isStandalone: false, selector: "smz-validation-messages", inputs: { input: "input", control: "control", behaviors: "behaviors", extraMessages: "extraMessages" }, ngImport: i0, template: "@if (behaviors?.showErrorsMethod != null ? control[behaviors.showErrorsMethod] : control[uiConfig.dialogs.forms.behaviors.showErrorsMethod]) {\r\n @if (controlMessages() | join : extraMessages; as messages) {\r\n @if (messages.length === 1) {\r\n @for (message of messages; track message) {\r\n <span class=\"col-12 error-message\">{{ message }}</span>\r\n }\r\n }\r\n\r\n @if (messages.length > 1) {\r\n @if (behaviors.showMultipleErrorMessages) {\r\n <span class=\"col-12 error-message asterisk\">{{ messages | describeArray }}</span>\r\n }\r\n\r\n @if (!behaviors.showMultipleErrorMessages) {\r\n <span class=\"col-12 error-message asterisk\" [pTooltip]=\"messages | describeArray\">{{ uiConfig.dialogs.forms.multipleErrorMessagesLabel }} *</span>\r\n }\r\n }\r\n }\r\n}", dependencies: [{ kind: "directive", type: i1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "showOnEllipsis", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }, { kind: "pipe", type: DescribeArrayPipe, name: "describeArray" }, { kind: "pipe", type: JoinPipe, name: "join" }] });
|
|
2872
2898
|
}
|
|
2873
2899
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ValidationMessagesComponent, decorators: [{
|
|
2874
2900
|
type: Component,
|
|
2875
2901
|
args: [{ selector: 'smz-validation-messages', standalone: false, template: "@if (behaviors?.showErrorsMethod != null ? control[behaviors.showErrorsMethod] : control[uiConfig.dialogs.forms.behaviors.showErrorsMethod]) {\r\n @if (controlMessages() | join : extraMessages; as messages) {\r\n @if (messages.length === 1) {\r\n @for (message of messages; track message) {\r\n <span class=\"col-12 error-message\">{{ message }}</span>\r\n }\r\n }\r\n\r\n @if (messages.length > 1) {\r\n @if (behaviors.showMultipleErrorMessages) {\r\n <span class=\"col-12 error-message asterisk\">{{ messages | describeArray }}</span>\r\n }\r\n\r\n @if (!behaviors.showMultipleErrorMessages) {\r\n <span class=\"col-12 error-message asterisk\" [pTooltip]=\"messages | describeArray\">{{ uiConfig.dialogs.forms.multipleErrorMessagesLabel }} *</span>\r\n }\r\n }\r\n }\r\n}" }]
|
|
2876
|
-
}], propDecorators: { input: [{
|
|
2902
|
+
}], ctorParameters: () => [], propDecorators: { input: [{
|
|
2877
2903
|
type: Input
|
|
2878
2904
|
}], control: [{
|
|
2879
2905
|
type: Input
|
|
@@ -4203,6 +4229,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
4203
4229
|
}] } });
|
|
4204
4230
|
|
|
4205
4231
|
class InputNumberComponent {
|
|
4232
|
+
validationMessagesService = inject(SmzFormValidationMessagesService);
|
|
4206
4233
|
input;
|
|
4207
4234
|
control;
|
|
4208
4235
|
behaviors;
|
|
@@ -4213,12 +4240,22 @@ class InputNumberComponent {
|
|
|
4213
4240
|
this.control.updateValueAndValidity();
|
|
4214
4241
|
}
|
|
4215
4242
|
}
|
|
4243
|
+
onInputMaskBlur() {
|
|
4244
|
+
this.control.markAsTouched();
|
|
4245
|
+
this.control.updateValueAndValidity();
|
|
4246
|
+
this.validationMessagesService.notifyViewRefresh();
|
|
4247
|
+
}
|
|
4248
|
+
onInputMaskInput() {
|
|
4249
|
+
if (this.form.updateOn !== 'blur') {
|
|
4250
|
+
this.control.updateValueAndValidity();
|
|
4251
|
+
}
|
|
4252
|
+
}
|
|
4216
4253
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: InputNumberComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4217
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: InputNumberComponent, isStandalone: false, selector: "smz-input-number", inputs: { input: "input", control: "control", behaviors: "behaviors", form: "form" }, ngImport: i0, template: "<smz-label\r\n class=\"smz__input_name\"\r\n [text]=\"input.name\"\r\n [propertyName]=\"input.propertyName\"\r\n [showLabel]=\"input.hideLabel != true\"\r\n [warning]=\"input.warning?.()\"\r\n [help]=\"input.tooltip?.()\"\r\n [popover]=\"input.popover?.()\">\r\n</smz-label>\r\n\r\n<div class=\"input_inner__wrapper\">\r\n @if (!input.useFraction) {\r\n <p-inputMask\r\n class=\"smz__input_value flex-1\"\r\n slotChar=\"\"\r\n [autoClear]=\"false\"\r\n mask=\"9?9999999999999999999999999999999\"\r\n characterPattern=\"([0-9])\"\r\n [id]=\"input.propertyName\"\r\n [pAutoFocus]=\"input.autoFocus\"\r\n [formControl]=\"control\">\r\n </p-inputMask>\r\n }\r\n @if (input.useFraction) {\r\n <p-inputNumber\r\n class=\"smz__input_value flex-1\"\r\n [formControl]=\"control\"\r\n [locale]=\"input.locale\"\r\n [minFractionDigits]=\"input.minFractionDigits\"\r\n [maxFractionDigits]=\"input.maxFractionDigits\"\r\n [useGrouping]=\"input.useGrouping\"\r\n [id]=\"input.propertyName\"\r\n [pAutoFocus]=\"input.autoFocus\"\r\n (onInput)=\"onInput($event)\">\r\n </p-inputNumber>\r\n }\r\n <smz-validation-messages [input]=\"input\" [control]=\"control\" [behaviors]=\"behaviors\"></smz-validation-messages>\r\n</div>", dependencies: [{ kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "component", type: i2$1.InputMask, selector: "p-inputmask, p-inputMask, p-input-mask", inputs: ["type", "slotChar", "autoClear", "showClear", "style", "inputId", "styleClass", "placeholder", "tabindex", "title", "ariaLabel", "ariaLabelledBy", "ariaRequired", "readonly", "unmask", "characterPattern", "autofocus", "autocomplete", "keepBuffer", "mask"], outputs: ["onComplete", "onFocus", "onBlur", "onInput", "onKeydown", "onClear"] }, { kind: "component", type: i3$3.InputNumber, selector: "p-inputNumber, p-inputnumber, p-input-number", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "placeholder", "tabindex", "title", "ariaLabelledBy", "ariaDescribedBy", "ariaLabel", "ariaRequired", "autocomplete", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "directive", type: i1$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i4$2.AutoFocus, selector: "[pAutoFocus]", inputs: ["pAutoFocus"] }, { kind: "component", type: LabelComponent, selector: "smz-label", inputs: ["text", "propertyName", "showLabel", "warning", "help", "popover"] }, { kind: "component", type: ValidationMessagesComponent, selector: "smz-validation-messages", inputs: ["input", "control", "behaviors", "extraMessages"] }] });
|
|
4254
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: InputNumberComponent, isStandalone: false, selector: "smz-input-number", inputs: { input: "input", control: "control", behaviors: "behaviors", form: "form" }, ngImport: i0, template: "<smz-label\r\n class=\"smz__input_name\"\r\n [text]=\"input.name\"\r\n [propertyName]=\"input.propertyName\"\r\n [showLabel]=\"input.hideLabel != true\"\r\n [warning]=\"input.warning?.()\"\r\n [help]=\"input.tooltip?.()\"\r\n [popover]=\"input.popover?.()\">\r\n</smz-label>\r\n\r\n<div class=\"input_inner__wrapper\">\r\n @if (!input.useFraction) {\r\n <p-inputMask\r\n class=\"smz__input_value flex-1\"\r\n slotChar=\"\"\r\n [autoClear]=\"false\"\r\n mask=\"9?9999999999999999999999999999999\"\r\n characterPattern=\"([0-9])\"\r\n [id]=\"input.propertyName\"\r\n [pAutoFocus]=\"input.autoFocus\"\r\n [formControl]=\"control\"\r\n (onBlur)=\"onInputMaskBlur()\"\r\n (onInput)=\"onInputMaskInput()\">\r\n </p-inputMask>\r\n }\r\n @if (input.useFraction) {\r\n <p-inputNumber\r\n class=\"smz__input_value flex-1\"\r\n [formControl]=\"control\"\r\n [locale]=\"input.locale\"\r\n [minFractionDigits]=\"input.minFractionDigits\"\r\n [maxFractionDigits]=\"input.maxFractionDigits\"\r\n [useGrouping]=\"input.useGrouping\"\r\n [id]=\"input.propertyName\"\r\n [pAutoFocus]=\"input.autoFocus\"\r\n (onInput)=\"onInput($event)\">\r\n </p-inputNumber>\r\n }\r\n <smz-validation-messages [input]=\"input\" [control]=\"control\" [behaviors]=\"behaviors\"></smz-validation-messages>\r\n</div>", dependencies: [{ kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "component", type: i2$1.InputMask, selector: "p-inputmask, p-inputMask, p-input-mask", inputs: ["type", "slotChar", "autoClear", "showClear", "style", "inputId", "styleClass", "placeholder", "tabindex", "title", "ariaLabel", "ariaLabelledBy", "ariaRequired", "readonly", "unmask", "characterPattern", "autofocus", "autocomplete", "keepBuffer", "mask"], outputs: ["onComplete", "onFocus", "onBlur", "onInput", "onKeydown", "onClear"] }, { kind: "component", type: i3$3.InputNumber, selector: "p-inputNumber, p-inputnumber, p-input-number", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "placeholder", "tabindex", "title", "ariaLabelledBy", "ariaDescribedBy", "ariaLabel", "ariaRequired", "autocomplete", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "directive", type: i1$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i4$2.AutoFocus, selector: "[pAutoFocus]", inputs: ["pAutoFocus"] }, { kind: "component", type: LabelComponent, selector: "smz-label", inputs: ["text", "propertyName", "showLabel", "warning", "help", "popover"] }, { kind: "component", type: ValidationMessagesComponent, selector: "smz-validation-messages", inputs: ["input", "control", "behaviors", "extraMessages"] }] });
|
|
4218
4255
|
}
|
|
4219
4256
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: InputNumberComponent, decorators: [{
|
|
4220
4257
|
type: Component,
|
|
4221
|
-
args: [{ selector: 'smz-input-number', standalone: false, template: "<smz-label\r\n class=\"smz__input_name\"\r\n [text]=\"input.name\"\r\n [propertyName]=\"input.propertyName\"\r\n [showLabel]=\"input.hideLabel != true\"\r\n [warning]=\"input.warning?.()\"\r\n [help]=\"input.tooltip?.()\"\r\n [popover]=\"input.popover?.()\">\r\n</smz-label>\r\n\r\n<div class=\"input_inner__wrapper\">\r\n @if (!input.useFraction) {\r\n <p-inputMask\r\n class=\"smz__input_value flex-1\"\r\n slotChar=\"\"\r\n [autoClear]=\"false\"\r\n mask=\"9?9999999999999999999999999999999\"\r\n characterPattern=\"([0-9])\"\r\n [id]=\"input.propertyName\"\r\n [pAutoFocus]=\"input.autoFocus\"\r\n [formControl]=\"control\">\r\n </p-inputMask>\r\n }\r\n @if (input.useFraction) {\r\n <p-inputNumber\r\n class=\"smz__input_value flex-1\"\r\n [formControl]=\"control\"\r\n [locale]=\"input.locale\"\r\n [minFractionDigits]=\"input.minFractionDigits\"\r\n [maxFractionDigits]=\"input.maxFractionDigits\"\r\n [useGrouping]=\"input.useGrouping\"\r\n [id]=\"input.propertyName\"\r\n [pAutoFocus]=\"input.autoFocus\"\r\n (onInput)=\"onInput($event)\">\r\n </p-inputNumber>\r\n }\r\n <smz-validation-messages [input]=\"input\" [control]=\"control\" [behaviors]=\"behaviors\"></smz-validation-messages>\r\n</div>" }]
|
|
4258
|
+
args: [{ selector: 'smz-input-number', standalone: false, template: "<smz-label\r\n class=\"smz__input_name\"\r\n [text]=\"input.name\"\r\n [propertyName]=\"input.propertyName\"\r\n [showLabel]=\"input.hideLabel != true\"\r\n [warning]=\"input.warning?.()\"\r\n [help]=\"input.tooltip?.()\"\r\n [popover]=\"input.popover?.()\">\r\n</smz-label>\r\n\r\n<div class=\"input_inner__wrapper\">\r\n @if (!input.useFraction) {\r\n <p-inputMask\r\n class=\"smz__input_value flex-1\"\r\n slotChar=\"\"\r\n [autoClear]=\"false\"\r\n mask=\"9?9999999999999999999999999999999\"\r\n characterPattern=\"([0-9])\"\r\n [id]=\"input.propertyName\"\r\n [pAutoFocus]=\"input.autoFocus\"\r\n [formControl]=\"control\"\r\n (onBlur)=\"onInputMaskBlur()\"\r\n (onInput)=\"onInputMaskInput()\">\r\n </p-inputMask>\r\n }\r\n @if (input.useFraction) {\r\n <p-inputNumber\r\n class=\"smz__input_value flex-1\"\r\n [formControl]=\"control\"\r\n [locale]=\"input.locale\"\r\n [minFractionDigits]=\"input.minFractionDigits\"\r\n [maxFractionDigits]=\"input.maxFractionDigits\"\r\n [useGrouping]=\"input.useGrouping\"\r\n [id]=\"input.propertyName\"\r\n [pAutoFocus]=\"input.autoFocus\"\r\n (onInput)=\"onInput($event)\">\r\n </p-inputNumber>\r\n }\r\n <smz-validation-messages [input]=\"input\" [control]=\"control\" [behaviors]=\"behaviors\"></smz-validation-messages>\r\n</div>" }]
|
|
4222
4259
|
}], propDecorators: { input: [{
|
|
4223
4260
|
type: Input
|
|
4224
4261
|
}], control: [{
|
|
@@ -7375,7 +7412,7 @@ class InputListBatchCrudComponent {
|
|
|
7375
7412
|
this.dialogCrudService.ref.close({ names: event.data.names.split('\n') });
|
|
7376
7413
|
}
|
|
7377
7414
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: InputListBatchCrudComponent, deps: [{ token: DialogCrudStateService }, { token: i2$5.DynamicDialogConfig }], target: i0.ɵɵFactoryTarget.Component });
|
|
7378
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: InputListBatchCrudComponent, isStandalone: false, selector: "smz-input-list-
|
|
7415
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: InputListBatchCrudComponent, isStandalone: false, selector: "smz-input-list-batch-crud", viewQueries: [{ propertyName: "formComponent", first: true, predicate: ["formComponent"], descendants: true }], ngImport: i0, template: `
|
|
7379
7416
|
@if (form != null) {
|
|
7380
7417
|
<div class="grid grid-nogutter items-start justify-start">
|
|
7381
7418
|
<smz-form-group class="col" #formComponent [config]="form" clickStopPropagation></smz-form-group>
|
|
@@ -7389,7 +7426,7 @@ class InputListBatchCrudComponent {
|
|
|
7389
7426
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: InputListBatchCrudComponent, decorators: [{
|
|
7390
7427
|
type: Component,
|
|
7391
7428
|
args: [{
|
|
7392
|
-
selector: 'smz-input-list-
|
|
7429
|
+
selector: 'smz-input-list-batch-crud',
|
|
7393
7430
|
template: `
|
|
7394
7431
|
@if (form != null) {
|
|
7395
7432
|
<div class="grid grid-nogutter items-start justify-start">
|
|
@@ -14083,6 +14120,7 @@ class SmzDropdownEditableBuilder extends SmzBaseEditableBuilder {
|
|
|
14083
14120
|
data.sourceData = options;
|
|
14084
14121
|
return this;
|
|
14085
14122
|
}
|
|
14123
|
+
/** NGXS selector (or any selector function) used to load dropdown options. */
|
|
14086
14124
|
setSelector(selector) {
|
|
14087
14125
|
const data = this.editableRef.data;
|
|
14088
14126
|
data.sourceType = 'selector';
|
|
@@ -17550,11 +17588,11 @@ class SmzTableComponent {
|
|
|
17550
17588
|
this.tableHelper.clear(this.tableKey);
|
|
17551
17589
|
}
|
|
17552
17590
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzTableComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: TableEditableService }, { token: TableFormsService }, { token: TableHelperService }, { token: i1$6.Store }, { token: SmzExcelService }], target: i0.ɵɵFactoryTarget.Component });
|
|
17553
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: SmzTableComponent, isStandalone: false, selector: "smz-ui-table", inputs: { state: "state", items: "items", loading: "loading" }, outputs: { selectionChange: "selectionChange", filterChange: "filterChange", columnVisibilityChange: "columnVisibilityChange", create: "create", update: "update", delete: "delete" }, host: { properties: { "attr.data-testid": "this.hostTestId" } }, providers: [TableEditableService, TableFormsService], queries: [{ propertyName: "templates", predicate: PrimeTemplate }], viewQueries: [{ propertyName: "table", first: true, predicate: ["dt"], descendants: true }, { propertyName: "columnMultiselect", first: true, predicate: ["columnMultiselect"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "@if (state | tableContext; as context) {\r\n @if ((context.state.emptyFeedback != null && (context.state.emptyFeedback.extraInfo || context.state.emptyFeedback.image || context.state.emptyFeedback.actionButtons)) && (items != null && items.length === 0) && context.state.emptyFeedback.isFeatured) {\r\n <smz-data-info\r\n [attr.data-testid]=\"buildTableTestId('empty')\"\r\n [image]=\"context.state.emptyFeedback.image\"\r\n [message]=\"context.state.emptyFeedback.message\"\r\n [callbackInfo]=\"context.state.emptyFeedback.extraInfo\"\r\n [actions]=\"context.state.emptyFeedback.actionButtons\">\r\n <ng-template pTemplate=\"actions\">\r\n <ng-container *ngTemplateOutlet=\"emptyActionsTemplate; context: { $implicit: {} }\"></ng-container>\r\n </ng-template>\r\n </smz-data-info>\r\n } @else {\r\n <ng-container *ngVar=\"state.source?.items$ != null ? (state.source.items$ | async) : null as observableSource\">\r\n <ng-container *ngVar=\"state.source?.signalItems != null ? state.source.signalItems() : null as signalSource\">\r\n @if (((observableSource ?? signalSource ?? items) | cloneTableItems : context: tableKey: context.state.rowExpansion.sincronize); as clonedData) {\r\n <p-table #dt\r\n dataKey=\"id\"\r\n editMode=\"row\"\r\n [stripedRows]=\"context.state.styles.striped\"\r\n [value]=\"clonedData.items\"\r\n [(selection)]=\"selectedItems\"\r\n [tableStyleClass]=\"context.state.styles.tableStyleClass\"\r\n [size]=\"context.state.styles.size === 'extra-small' ? 'small' : context.state.styles.size === 'small' ? 'small' : context.state.styles.size === 'large' ? 'large' : undefined\"\r\n [class]=\"'p-datatable-smz-ui-table' + (context.state.styles.showGrid ? ' p-datatable-gridlines' : '') + (context.state.styles.size === 'extra-small' ? ' p-datatable-xs' : '') + (context.state.styles.size === 'small' ? ' p-datatable-sm' : '') + (context.state.styles.size === 'large' ? ' p-datatable-lg' : '')\"\r\n [rowHover]=\"context.state.actions.rowBehavior.hoverable\"\r\n [rows]=\"context.state.pagination.rows\"\r\n [first]=\"context.state.pagination.state.first\"\r\n [showCurrentPageReport]=\"context.state.pagination.pageReport.isVisible\"\r\n [rowsPerPageOptions]=\"context.state.pagination.rowsPerPageOptions\"\r\n [loading]=\"loading || isViewportInitializing\"\r\n [style.visibility]=\"isViewportInitializing ? 'hidden' : null\"\r\n [paginator]=\"context.state.pagination.isVisible\"\r\n paginatorDropdownAppendTo=\"body\"\r\n [currentPageReportTemplate]=\"context.state.locale.paginator.template\"\r\n [sortField]=\"context.state.sort.field\"\r\n [sortMode]=\"context.state.sort.mode\"\r\n [sortOrder]=\"context.state.sort.order\"\r\n [multiSortMeta]=\"context.state.sort.multiSortMeta\"\r\n [scrollable]=\"context.state.viewport.scrollable\"\r\n [scrollHeight]=\"context.state.viewport.scrollHeight\"\r\n [filterDelay]=\"0\"\r\n [globalFilterFields]=\"context.globalFilter\"\r\n [columns]=\"context.visibleColumns\"\r\n [frozenColumns]=\"context.frozenColumns\"\r\n [frozenWidth]=\"context.state.frozen.isEnabled ? context.state.frozen.width : null\"\r\n [resizableColumns]=\"context.state.viewport.resizableColumns\"\r\n [columnResizeMode]=\"context.state.viewport.columnResizeMode\"\r\n (onPage)=\"onPage($event)\"\r\n (onFilter)=\"onFilter($event)\"\r\n (selectionChange)=\"emitSelection($event)\"\r\n >\r\n @if (context.state.caption.isVisible) {\r\n <ng-template pTemplate=\"caption\">\r\n <div class=\"grid grid-nogutter items-center gap-2\" [attr.data-testid]=\"buildTableTestId('caption')\" [ngClass]=\"'justify-' + context.state.caption.toolbarAlignment\">\r\n @if (context.state.caption.title != null) {\r\n <div class=\"col database-title\" [attr.data-testid]=\"buildTableTestId('title')\" [innerHTML]=\"context.state.caption.title\"></div>\r\n }\r\n <ng-container *ngTemplateOutlet=\"captionTemplate; context: { $implicit: dt }\"></ng-container>\r\n <smz-table-caption-buttons [buttons]=\"context.state.caption.buttons\" [tableTestId]=\"state.tableTestId\"></smz-table-caption-buttons>\r\n @if (context.state.caption.exportToPdf.isButtonVisible) {\r\n <button pButton [attr.data-testid]=\"buildTableTestId('export-pdf')\" [label]=\"context.state.locale.exportToPdf.label\" class=\"p-button-outlined\" icon=\"fa-solid fa-file-pdf\" (click)=\"exportToPdf(context, clonedData.items)\" [disabled]=\"clonedData.showSkeleton\"></button>\r\n }\r\n @if (context.state.caption.exportToExcel.isButtonVisible) {\r\n <button pButton [attr.data-testid]=\"buildTableTestId('export-excel')\" [label]=\"context.state.locale.exportToExcel.label\" class=\"p-button-outlined\" icon=\"fa-solid fa-file-excel\" (click)=\"exportToExcel(table, context, clonedData.items)\" [disabled]=\"clonedData.showSkeleton\"></button>\r\n }\r\n @if (context.state.editable.creation.isButtonVisible) {\r\n <button pButton [attr.data-testid]=\"buildTableTestId('create')\" [label]=\"context.state.editable.creation.buttonLabel\" class=\"p-button-outlined\" icon=\"fa-solid fa-plus\" (click)=\"editableService.onRowCreateInit(table, context.columns)\" [disabled]=\"clonedData.showSkeleton || editableService.isEditing || editableService.isCreating || context.state.editable.creation.isButtonDisabled\"></button>\r\n }\r\n @if (context.state.caption.rowSelection.isButtonVisible) {\r\n <button pButton [attr.data-testid]=\"buildTableTestId('row-selection')\" [label]=\"context.state.locale.rowSelection.label\" class=\"p-button-outlined\" icon=\"fa-solid fa-check-double\" (click)=\"onRowSelection(context)\" [disabled]=\"clonedData.showSkeleton\"></button>\r\n }\r\n @if (context.state.rowExpansion.isButtonVisible) {\r\n <button pButton [attr.data-testid]=\"buildTableTestId('row-expansion')\" [label]=\"context.state.rowExpansion.label\" class=\"p-button-outlined\" icon=\"fa-solid fa-list\" (click)=\"onRowExpansion(context)\" [disabled]=\"clonedData.showSkeleton\"></button>\r\n }\r\n @if (context.state.caption.clearFilters.isButtonVisible) {\r\n <button pButton [attr.data-testid]=\"buildTableTestId('clear-filters')\" [label]=\"context.state.locale.clearFilters.label\" class=\"p-button-outlined\" icon=\"pi pi-filter-slash\" (click)=\"clear(table, context)\" [disabled]=\"clonedData.showSkeleton\"></button>\r\n }\r\n @if (context.state.caption.columnVisibility.showDropdownSelector) {\r\n <p-multiSelect\r\n #columnMultiselect\r\n [attr.data-testid]=\"buildTableTestId('column-visibility')\"\r\n class=\"ml-2 col-12 md:col-2\"\r\n styleClass=\"w-full\"\r\n [options]=\"context.hideableColumns\"\r\n [(ngModel)]=\"selectedColumns\"\r\n [placeholder]=\"context.state.locale.columnVisibility.placeholder\"\r\n [selectedItemsLabel]=\"context.state.locale.columnVisibility.selectedItemsLabel\"\r\n optionLabel=\"name\"\r\n dataKey=\"field\"\r\n optionLabel=\"header\"\r\n [filter]=\"true\"\r\n (onPanelHide)=\"updateColumnsVisibility(true)\"\r\n [pTooltip]=\"context.state.locale.columnVisibility.pTooltip\">\r\n </p-multiSelect>\r\n }\r\n @if (context.state.caption.globalFilter.isVisible) {\r\n <p-iconfield class=\"col-12\" [ngClass]=\"{ 'md:col-2': !context.state.caption.globalFilter.expanded }\">\r\n <p-inputicon styleClass=\"pi pi-search\" />\r\n <input #inputGlobal [(ngModel)]=\"globalSearchInput\" pInputText type=\"text\" styleClass=\"database-global-search\" (input)=\"updateGlobalFilter(inputGlobal.value)\" [disabled]=\"clonedData.showSkeleton\" [placeholder]=\"context.state.locale.globalFilter.placeholder\" [attr.data-testid]=\"buildTableTestId('search')\" />\r\n </p-iconfield>\r\n }\r\n </div>\r\n @if (toolbarTemplate != null) {\r\n <div class=\"grid grid-nogutter items-center mt-2\" [ngClass]=\"'justify-' + context.state.caption.toolbarAlignment\">\r\n <ng-container *ngTemplateOutlet=\"toolbarTemplate; context: { $implicit: dt }\"></ng-container>\r\n </div>\r\n }\r\n </ng-template>\r\n }\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr [ngClass]=\"{ 'invisible-header': !context.state.header.isVisible }\">\r\n @if (context.state.caption.rowSelection.isEnabled) {\r\n <th [ngStyle]=\"context.state.caption.rowSelection.ngStyle\">\r\n @if (!context.state.actions.batchActions.isVisible) {\r\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\r\n }\r\n </th>\r\n }\r\n @if (context.state.rowExpansion.isEnabled) {\r\n <th [ngStyle]=\"context.state.rowExpansion.ngStyle\"></th>\r\n }\r\n @for (col of columns; track col.field) {\r\n @if (context.state.viewport.resizableColumns) {\r\n @if (col.isOrderable) {\r\n <th [pSortableColumn]=\"col.sortField\" pResizableColumn [attr.data-testid]=\"buildColumnTestId(col.field)\" [ngStyle]=\"col.content.ngStyle\" [ngClass]=\"col.headerStyleClass\">\r\n <ng-container *ngTemplateOutlet=\"headerContent\"></ng-container>\r\n </th>\r\n }\r\n @if (!col.isOrderable) {\r\n <th pResizableColumn [attr.data-testid]=\"buildColumnTestId(col.field)\" [ngStyle]=\"col.content.ngStyle\" [ngClass]=\"col.headerStyleClass\">\r\n <ng-container *ngTemplateOutlet=\"headerContent\"></ng-container>\r\n </th>\r\n }\r\n } @else {\r\n @if (col.isOrderable) {\r\n <th [pSortableColumn]=\"col.sortField\" [attr.data-testid]=\"buildColumnTestId(col.field)\" [ngStyle]=\"col.content.ngStyle\" [ngClass]=\"col.headerStyleClass\">\r\n <ng-container *ngTemplateOutlet=\"headerContent\"></ng-container>\r\n </th>\r\n }\r\n @if (!col.isOrderable) {\r\n <th [attr.data-testid]=\"buildColumnTestId(col.field)\" [ngStyle]=\"col.content.ngStyle\" [ngClass]=\"col.headerStyleClass\">\r\n <ng-container *ngTemplateOutlet=\"headerContent\"></ng-container>\r\n </th>\r\n }\r\n }\r\n <ng-template #headerContent>\r\n <div class=\"flex justify-start items-center\">\r\n <span class=\"mr-1\">{{ col.header }}</span>\r\n @if (col.showHeaderActions) {\r\n <smz-table-header-actions clickStopPropagation class=\"ml-1 mt-1\" [col]=\"col\"></smz-table-header-actions>\r\n }\r\n @if (!clonedData.showSkeleton && col.isOrderable) {\r\n <p-sortIcon [field]=\"col.sortField\"></p-sortIcon>\r\n }\r\n @if (!clonedData.showSkeleton) {\r\n @switch (col.filter.type) {\r\n @case (filterTypes.currency) {\r\n <smz-column-filter type=\"numeric\" currency=\"BRL\" [field]=\"col.filterField\"></smz-column-filter>\r\n }\r\n @case (filterTypes.numeric) {\r\n <smz-column-filter type=\"numeric\" [field]=\"col.filterField\"></smz-column-filter>\r\n }\r\n @case (filterTypes.date) {\r\n <smz-column-filter type=\"date\" [field]=\"col.filterField\" [showTime]=\"col.filter.showTime\"></smz-column-filter>\r\n }\r\n @case (filterTypes.text) {\r\n <smz-column-filter type=\"text\" [field]=\"col.filterField\"></smz-column-filter>\r\n }\r\n @case (filterTypes.boolean) {\r\n <smz-column-filter type=\"boolean\" [field]=\"col.filterField\"></smz-column-filter>\r\n }\r\n @case (filterTypes.dropdown) {\r\n @if (col.filterField | filterObject; as filterField) {\r\n <smz-column-filter [field]=\"filterField + '.id'\" matchMode=\"dropdown\" [showMatchModes]=\"false\" [showOperator]=\"false\" [showAddButton]=\"false\">\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"px-3 pt-3 pb-0\">\r\n <span class=\"p-text-bold\">{{ col.header }}</span>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"filter\" let-value let-filter=\"filter\">\r\n <p-select appendTo=\"body\" [ngModel]=\"value\" [options]=\"(clonedData.items != null ? clonedData.items : []) | uniqueFilter : filterField + '.id' : filterField : null : 'name' : false\" [placeholder]=\"context.state.locale.dropdownFilter.placeholder\" (onChange)=\"filter($event.value)\" optionLabel=\"name\" dataKey=\"id\"></p-select>\r\n </ng-template>\r\n </smz-column-filter>\r\n }\r\n }\r\n @case (filterTypes.multiselect) {\r\n @if (col.filterField | filterObject; as filterField) {\r\n <smz-column-filter [field]=\"filterField\" matchMode=\"in\" [showMatchModes]=\"false\" [showOperator]=\"false\" [showAddButton]=\"false\">\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"px-3 pt-3 pb-0\">\r\n <span class=\"p-text-bold\">{{ col.header }}</span>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"filter\" let-value let-filter=\"filter\">\r\n <p-multiSelect [ngModel]=\"value\" [options]=\"(clonedData.items != null ? clonedData.items : []) | uniqueFilter : filterField + '.id' : filterField : null : 'name' : false\" [placeholder]=\"context.state.locale.dropdownFilter.placeholder\" (onChange)=\"filter($event.value)\" optionLabel=\"name\" dataKey=\"id\"></p-multiSelect>\r\n </ng-template>\r\n </smz-column-filter>\r\n }\r\n }\r\n @case (filterTypes.multiselect_array) {\r\n @if (col.filterField | filterObject; as filterField) {\r\n <smz-column-filter [field]=\"filterField\" matchMode=\"array-some\" [showMatchModes]=\"false\" [showOperator]=\"false\" [showAddButton]=\"false\">\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"px-3 pt-3 pb-0\">\r\n <span class=\"p-text-bold\">{{ col.header }}</span>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"filter\" let-value let-filter=\"filter\">\r\n <p-multiSelect [ngModel]=\"value\" [options]=\"(clonedData.items != null ? clonedData.items : []) | uniqueFilter : filterField + '.id' : filterField : null : 'name' : true\" [placeholder]=\"context.state.locale.dropdownFilter.placeholder\" (onChange)=\"filter($event.value)\" optionLabel=\"name\" dataKey=\"id\" [maxSelectedLabels]=\"2\" [selectedItemsLabel]=\"'{0}'\"></p-multiSelect>\r\n </ng-template>\r\n </smz-column-filter>\r\n }\r\n }\r\n @case (filterTypes.multiselect_string) {\r\n @if (col.filterField | filterObject; as filterField) {\r\n <smz-column-filter [field]=\"filterField\" matchMode=\"multiselectByString\" [showMatchModes]=\"false\" [showOperator]=\"false\" [showAddButton]=\"false\">\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"px-3 pt-3 pb-0\">\r\n <span class=\"p-text-bold\">{{ col.header }}</span>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"filter\" let-value let-filter=\"filter\">\r\n <p-multiSelect [ngModel]=\"value\" [options]=\"(clonedData.items != null ? clonedData.items : []) | uniqueFilter : filterField : filterField : null : true : false : false\" [placeholder]=\"context.state.locale.dropdownFilter.placeholder\" (onChange)=\"filter($event.value)\" [maxSelectedLabels]=\"2\" [selectedItemsLabel]=\"'{0}'\"></p-multiSelect>\r\n </ng-template>\r\n </smz-column-filter>\r\n }\r\n }\r\n }\r\n }\r\n @if (context.state.caption.columnVisibility.showColumnHideButton) {\r\n <button pButton type=\"button\" icon=\"fa-solid fa-eye-slash\" class=\"p-button-rounded p-button-text p-button-plain\" (click)=\"hideColumn(col, context)\"></button>\r\n }\r\n </div>\r\n </ng-template>\r\n }\r\n @if (context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible|| context.state.editable.isEditable) {\r\n <th [ngStyle]=\"context.state.editable.isEditable ? context.state.editable.ngStyle : context.state.actions.customActions.ngStyle\"></th>\r\n }\r\n </tr>\r\n @if (context.state.actions.batchActions.isVisible) {\r\n <tr>\r\n <th [attr.colspan]=\"columns.length + ((context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible || context.state.editable.isEditable) ? 1 : 0) + (context.state.caption.rowSelection.isEnabled ? 1 : 0) + (context.state.rowExpansion.isEnabled ? 1 : 0)\"\r\n [ngStyle]=\"context.state.actions.customActions.ngStyle\" class=\"px-0\">\r\n <div class=\"grid grid-nogutter items-center justify-start\">\r\n <p-tableHeaderCheckbox class=\"mr-4\"></p-tableHeaderCheckbox>\r\n @if (selectedItems?.length > 0) {\r\n @for (batchItem of context.state.actions.batchActions.items; track batchItem.label) {\r\n @if (batchItem.visible) {\r\n <button pButton [label]=\"batchItem.label\" class=\"p-button-rounded p-button-text p-button-plain animate__animated animate__fadeIn\" [ngClass]=\"batchItem.styleClass\" [icon]=\"batchItem.icon\" (click)=\"batchItem.command(selectedItems); selectedItems = [];\" [disabled]=\"batchItem.disabled\" [pTooltip]=\"batchItem.tooltip\"></button>\r\n }\r\n }\r\n }\r\n </div>\r\n </th>\r\n </tr>\r\n }\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-item let-editing=\"editing\" let-rowIndex=\"rowIndex\" let-columns=\"columns\">\r\n <tr #editableRowElement\r\n [pEditableRow]=\"item\"\r\n tableItemAction\r\n [isClickable]=\"context.state.actions.rowBehavior.isClickable\"\r\n [callback]=\"context.state.actions.rowBehavior.clickCallback\"\r\n [expandRowOnClick]=\"context.state.actions.rowBehavior.expandRowOnClick\"\r\n [item]=\"item\"\r\n class=\"p-selectable-row\"\r\n [attr.data-testid]=\"buildRowTestId(item, rowIndex)\"\r\n [ngClass]=\"{ 'highlight-row': item?.id === state.actions.rowBehavior.highlights, 'preserve-in-small': state.actions.rowBehavior.preserveLayoutInSmallDevices }\"\r\n >\r\n @if (context.state.caption.rowSelection.isEnabled && !clonedData.showSkeleton) {\r\n <td\r\n clickStopPropagation\r\n class=\"{{ state.actions.rowBehavior.cellStyleClass }}\"\r\n [ngClass]=\"{ 'opacity-50 pointer-events-none': editableService.context[item.id]?.hasErrors || editableService.context[item.id]?.isLoading }\"\r\n [ngStyle]=\"context.state.caption.rowSelection.ngStyle\"\r\n >\r\n <p-tableCheckbox [value]=\"item\"></p-tableCheckbox>\r\n </td>\r\n }\r\n @if (context.state.rowExpansion.isEnabled && !clonedData.showSkeleton) {\r\n <td\r\n clickStopPropagation\r\n class=\"{{ state.actions.rowBehavior.cellStyleClass }}\"\r\n [ngClass]=\"{ 'opacity-50 pointer-events-none': editableService.context[item.id]?.hasErrors || editableService.context[item.id]?.isLoading, 'grid grid-nogutter justify-start items-center gap-2': context.state.rowExpansion.highlightNewItems && item._isNew }\"\r\n [ngStyle]=\"context.state.rowExpansion.ngStyle\"\r\n >\r\n <button\r\n pButton\r\n type=\"button\"\r\n class=\"p-button-text p-button-rounded p-button-sm smz-table-row-expansion-toggle\"\r\n [icon]=\"item._isExpanded ? 'fa-solid fa-chevron-down' : 'fa-solid fa-chevron-right'\"\r\n (click)=\"item._isExpanded = !item._isExpanded; item._isNew = false\"\r\n ></button>\r\n @if (context.state.rowExpansion.highlightNewItems && item._isNew) {\r\n <div class=\"rounded bg-cyan-400 text-sm text-white px-2 py-0 smz-table-new-tag\" (click)=\"item._isNew = false\">{{ context.state.rowExpansion.highlightLabel }}</div>\r\n }\r\n </td>\r\n }\r\n @for (col of columns; track col.field) {\r\n @if (clonedData.showSkeleton) {\r\n <td class=\"{{ state.actions.rowBehavior.cellStyleClass }}\" [ngStyle]=\"col.content.ngStyle\"><p-skeleton width=\"100%\" height=\"1rem\"></p-skeleton></td>\r\n } @else {\r\n <td class=\"{{ state.actions.rowBehavior.cellStyleClass }}\" [attr.data-testid]=\"buildCellTestId(item, rowIndex, col.field)\" [ngClass]=\"{ 'opacity-50 pointer-events-none': editableService.context[item.id]?.hasErrors || editableService.context[item.id]?.isLoading }\" [ngStyle]=\"col.content.ngStyle\">\r\n <span class=\"p-column-title\">{{ col.header }}</span>\r\n <p-cellEditor>\r\n <!-- CELULAR COM EDITOR -->\r\n <ng-template pTemplate=\"input\">\r\n @switch (col.editable.type) {\r\n @case (editableTypes.none) {\r\n <smz-table-content class=\"cursor-default\" [ngClass]=\"col.content.contentStyleClass\" [col]=\"col\" [contentTypes]=\"contentTypes\" [item]=\"item\" [rowIndex]=\"rowIndex\" [contentTemplate]=\"contentTemplate\"></smz-table-content>\r\n }\r\n @case (editableTypes.custom) {\r\n <ng-container *ngTemplateOutlet=\"editableTemplate; context: { $implicit: item, col: col }\"></ng-container>\r\n }\r\n <!-- INPUT TEXT -->\r\n @case (editableTypes.text) {\r\n @if (editableService.context[item.id]?.form; as form) {\r\n @if (form.controls[col.editable.property]; as control) {\r\n <div class=\"relative w-full\">\r\n <input pInputText type=\"text\" [formControl]=\"$any(control)\" style=\"width: 100%;\">\r\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\r\n </div>\r\n }\r\n }\r\n }\r\n <!-- INPUT NUMBER -->\r\n @case (editableTypes.number) {\r\n @if (editableService.context[item.id]?.form; as form) {\r\n @if (form.controls[col.editable.property]; as control) {\r\n <div class=\"relative w-full\">\r\n <p-inputNumber\r\n *ngVar=\"col.editable.data as numberData\"\r\n [formControl]=\"$any(control)\"\r\n [mode]=\"numberData.mode\"\r\n [minFractionDigits]=\"numberData.minFractionDigits\"\r\n [maxFractionDigits]=\"numberData.maxFractionDigits\"\r\n [currency]=\"numberData.currency\"\r\n [useGrouping]=\"numberData.useGrouping\"\r\n [allowEmpty]=\"numberData.allowEmpty\"\r\n [showClear]=\"numberData.showClear\"\r\n [showButtons]=\"numberData.showButtons\"\r\n [prefix]=\"numberData.prefix\"\r\n [suffix]=\"numberData.suffix\">\r\n </p-inputNumber>\r\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\r\n </div>\r\n }\r\n }\r\n }\r\n <!-- INPUT SWITCH -->\r\n @case (editableTypes.switch) {\r\n @if (editableService.context[item.id]?.form; as form) {\r\n @if (form.controls[col.editable.property]; as control) {\r\n <div class=\"relative w-full\">\r\n <p-toggleswitch [formControl]=\"$any(control)\"></p-toggleswitch>\r\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\r\n </div>\r\n }\r\n }\r\n }\r\n <!-- INPUT TEXT AREA -->\r\n @case (editableTypes.area) {\r\n @if (editableService.context[item.id]?.form; as form) {\r\n @if (form.controls[col.editable.property]; as control) {\r\n <div class=\"relative w-full\">\r\n <textarea pInputTextarea type=\"text\" [formControl]=\"$any(control)\" [rows]=\"$any(col.editable.data).rows\" required style=\"width: 100%;\"></textarea>\r\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\r\n </div>\r\n }\r\n }\r\n }\r\n <!-- INPUT DROPDOWN -->\r\n @case (editableTypes.dropdown) {\r\n @if (editableService.context[item.id]?.form; as form) {\r\n @if (form.controls[col.editable.property]; as control) {\r\n <div class=\"relative w-full\">\r\n <p-select appendTo=\"body\" [formControl]=\"$any(control)\" styleClass=\"w-full\" [options]=\"col.editable.data | editableSource\" optionLabel=\"name\" dataKey=\"id\" [placeholder]=\"$any(col.editable.data).placeholder\" [showClear]=\"!col.editable.validatorsPreset?.isRequired\" [filter]=\"true\"></p-select>\r\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\r\n </div>\r\n }\r\n }\r\n }\r\n <!-- INPUT CALENDAR -->\r\n @case (editableTypes.calendar) {\r\n @if (editableService.context[item.id]?.form; as form) {\r\n @if (form.controls[col.editable.property]; as control) {\r\n <div class=\"relative w-full\">\r\n <p-datepicker [formControl]=\"$any(control)\" appendTo=\"body\" styleClass=\"w-full\" [ngClass]=\"{ 'pl-5': !control.valid }\"></p-datepicker>\r\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\r\n </div>\r\n }\r\n }\r\n }\r\n }\r\n </ng-template>\r\n <!-- CELULAR COM CONTE\u00DADO -->\r\n <ng-template pTemplate=\"output\">\r\n <smz-table-content\r\n [col]=\"col\"\r\n [pTooltip]=\"col.content.tooltip != null ? col.content.tooltip(item) : null\"\r\n tooltipPosition=\"left\"\r\n [ngClass]=\"col.content.contentStyleClass\" [contentTypes]=\"contentTypes\" [item]=\"item\" [rowIndex]=\"rowIndex\" [contentTemplate]=\"contentTemplate\">\r\n </smz-table-content>\r\n </ng-template>\r\n </p-cellEditor>\r\n </td>\r\n }\r\n }\r\n @if (context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible || context.state.editable.isEditable) {\r\n <td [ngStyle]=\"context.state.actions.customActions.ngStyle\" class=\"px-0\">\r\n <div class=\"grid grid-nogutter items-center justify-center\">\r\n @if (clonedData.showSkeleton) {\r\n <div class=\"w-full\">\r\n <p-skeleton width=\"100%\" height=\"1rem\"></p-skeleton>\r\n </div>\r\n } @else {\r\n <!-- SEM EDITAR -->\r\n @if (!editing) {\r\n @if (context.state.editable.update.isButtonVisible) {\r\n <button pButton type=\"button\" icon=\"pi pi-pencil\" (click)=\"editableService.onRowEditInit(item)\" class=\"p-button-rounded p-button-text mx-1\" [disabled]=\"editableService.isEditing || editableService.isCreating || context.state.editable.update.isButtonDisabled || (!context.state.editable.update.condition(item))\" pInitEditableRow></button>\r\n }\r\n @if (context.state.editable.remove.isButtonVisible) {\r\n <button pButton type=\"button\" icon=\"pi pi-trash\" (click)=\"editableService.onRowRemove($event, table, item)\" class=\"p-button-rounded p-button-text p-button-secondary mx-1\" [disabled]=\"editableService.isEditing || editableService.isCreating || context.state.editable.remove.isButtonDisabled || (!context.state.editable.remove.condition(item))\"></button>\r\n }\r\n }\r\n <!-- EDITANDO -->\r\n @if (editing) {\r\n @if (editableService.context[item.id]; as editableContext) {\r\n <!-- COM LOADING -->\r\n @if (editableContext.isLoading) {\r\n <button pButton type=\"button\" icon=\"fa-solid fa-rotate fa-spin\" [disabled]=\"true\" class=\"p-button-rounded p-button-text p-button-info mr-2\"></button>\r\n }\r\n <!-- SEM LOADING -->\r\n @if (!editableContext.isLoading) {\r\n <!-- EDITANDO -->\r\n @if (!editableContext.hasErrors) {\r\n <!-- CRIANDO -->\r\n @if (item._context?.isCreating) {\r\n <button pButton type=\"button\" icon=\"pi pi-check\" (click)=\"editableService.onRowCreateSave($event, table, editableRowElement, item)\" [disabled]=\"!editableContext.hasChanged || !editableService.context[item.id]?.form.valid\" class=\"p-button-rounded p-button-text p-button-success mr-2\"></button>\r\n <button pButton type=\"button\" icon=\"pi pi-times\" (click)=\"editableService.onRowCreateCancel($event, table, item)\" class=\"p-button-rounded p-button-text p-button-danger\"></button>\r\n }\r\n <!-- ATUALIZANDO -->\r\n @if (item._context?.isUpdating) {\r\n <button pButton type=\"button\" icon=\"pi pi-check\" (click)=\"editableService.onRowEditSave($event, table, editableRowElement, item)\" [disabled]=\"!editableContext.hasChanged || !editableService.context[item.id]?.form.valid\" class=\"p-button-rounded p-button-text p-button-success mr-2\"></button>\r\n <button pButton type=\"button\" icon=\"pi pi-times\" (click)=\"editableService.onRowEditCancel($event, table, item)\" class=\"p-button-rounded p-button-text p-button-danger\"></button>\r\n }\r\n }\r\n <!-- COM ERRORS -->\r\n @if (editableContext.hasErrors) {\r\n <p-popover #errorsOverlay appendTo=\"body\" [style]=\"{ width: '450px' }\">\r\n <div [innerHtml]=\"editableContext.errors | contentErrors\"></div>\r\n </p-popover>\r\n <button pButton type=\"button\" icon=\"fas fa-exclamation-triangle\" [disabled]=\"false\" class=\"p-button-sm p-button-rounded p-button-text p-button-danger mr-2\" (click)=\"errorsOverlay.toggle($event)\"></button>\r\n <!-- CRIANDO -->\r\n @if (item._context?.isCreating) {\r\n <button pButton type=\"button\" icon=\"pi pi-times\" (click)=\"editableService.onRowCreateCancel($event, table, item)\" class=\"p-button-sm p-button-rounded p-button-text p-button-danger\"></button>\r\n }\r\n <!-- ATUALIZANDO -->\r\n @if (item._context?.isUpdating) {\r\n <button pButton type=\"button\" icon=\"pi pi-times\" (click)=\"editableService.onRowEditCancel($event, table, item)\" class=\"p-button-sm p-button-rounded p-button-text p-button-danger\"></button>\r\n }\r\n }\r\n }\r\n }\r\n }\r\n <!-- CUSTOM MENU -->\r\n @if (context.state.actions.customActions.isVisible && !editing) {\r\n <ng-container *ngTemplateOutlet=\"actionsTemplate; context: { $implicit: item }\"></ng-container>\r\n }\r\n <!-- MENU -->\r\n @if (context.state.actions.menu.isVisible && !editing) {\r\n <smz-menu [callback]=\"context.state.actions.menu.callback\" [items]=\"context.state.actions.menu.items\" [data]=\"item\" [behavior]=\"context.state.actions.menu.behavior\" [ngClass]=\"{ 'ml-2': context.state.actions.customActions.isVisible }\" [icon]=\"context.state.actions.menu.styles.icon\" [styleClass]=\"context.state.actions.menu.styles.styleClass\" [buttonClass]=\"context.state.actions.menu.styles.buttonClass\" [testId]=\"buildRowMenuTestId(item, rowIndex)\"></smz-menu>\r\n }\r\n }\r\n </div>\r\n </td>\r\n }\r\n </tr>\r\n @if (item?._isExpanded) {\r\n <tr>\r\n <td [attr.colspan]=\"columns.length + ((context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible || context.state.editable.isEditable) ? 1 : 0) + (context.state.caption.rowSelection.isEnabled ? 1 : 0) + (context.state.rowExpansion.isEnabled ? 1 : 0)\">\r\n <ng-container *ngTemplateOutlet=\"rowContentTemplate; context: { $implicit: item }\"></ng-container>\r\n </td>\r\n </tr>\r\n }\r\n </ng-template>\r\n <ng-template pTemplate=\"emptymessage\" let-columns>\r\n <tr>\r\n <td [attr.colspan]=\"columns.length + ((context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible || context.state.editable.isEditable) ? 1 : 0) + (context.state.caption.rowSelection.isEnabled ? 1 : 0) + (context.state.rowExpansion.isEnabled ? 1 : 0)\" [ngStyle]=\"{ 'text-align': 'center' }\">\r\n <div [innerHtml]=\"context.state.emptyFeedback.message\"></div>\r\n @if (context.state.caption.clearFilters.isButtonVisible && hasFilters()) {\r\n <button pButton [label]=\"context.state.locale.clearFilters.label\" class=\"p-button-outlined mt-3\" icon=\"pi pi-filter-slash\" (click)=\"clear(table, context)\"></button>\r\n }\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n }\r\n </ng-container>\r\n </ng-container>\r\n }\r\n} @else {\r\n @if (emptyStateTemplate != null) {\r\n <ng-container *ngTemplateOutlet=\"emptyStateTemplate; context: { $implicit: {} }\"></ng-container>\r\n }\r\n}\r\n\r\n", dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i1$7.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i8.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i8.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "directive", type: i8.ResizableColumn, selector: "[pResizableColumn]", inputs: ["pResizableColumnDisabled"] }, { kind: "component", type: i8.CellEditor, selector: "p-cellEditor" }, { kind: "component", type: i8.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i8.TableCheckbox, selector: "p-tableCheckbox", inputs: ["value", "disabled", "required", "index", "inputId", "name", "ariaLabel"] }, { kind: "component", type: i8.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "directive", type: i8.EditableRow, selector: "[pEditableRow]", inputs: ["pEditableRow", "pEditableRowDisabled"] }, { kind: "directive", type: i8.InitEditableRow, selector: "[pInitEditableRow]" }, { kind: "directive", type: i4.ButtonDirective, selector: "[pButton]", inputs: ["ptButtonDirective", "pButtonPT", "pButtonUnstyled", "hostName", "text", "plain", "raised", "size", "outlined", "rounded", "iconPos", "loadingIcon", "fluid", "label", "icon", "loading", "buttonProps", "severity"] }, { kind: "directive", type: i2.InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "component", type: i3$5.MultiSelect, selector: "p-multiSelect, p-multiselect, p-multi-select", inputs: ["id", "ariaLabel", "styleClass", "panelStyle", "panelStyleClass", "inputId", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "dataKey", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "chipIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "loading", "virtualScrollItemSize", "loadingIcon", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "showClear", "autofocus", "placeholder", "options", "filterValue", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus", "highlightOnSelect", "size", "variant", "fluid", "appendTo", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "component", type: i4$1.Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "component", type: i1$2.DatePicker, selector: "p-datePicker, p-datepicker, p-date-picker", inputs: ["iconDisplay", "styleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "readonlyInput", "shortYearCutoff", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "minDate", "maxDate", "disabledDates", "disabledDays", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "view", "defaultDate", "appendTo", "motionOptions"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "directive", type: i1$3.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$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: TableItemActionsDirective, selector: "[tableItemAction]", inputs: ["isClickable", "item", "callback", "expandRowOnClick"] }, { kind: "directive", type: ClickStopPropagationDirective, selector: "[clickStopPropagation]" }, { kind: "component", type: SmzDataInfoComponent, selector: "smz-data-info", inputs: ["image", "message", "actions", "callbackInfo", "callbackLabel"], outputs: ["clicked"] }, { kind: "directive", type: i1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "showOnEllipsis", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }, { kind: "component", type: i19.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "directive", type: i2$4.Textarea, selector: "[pTextarea], [pInputTextarea]", inputs: ["pTextareaPT", "pTextareaUnstyled", "autoResize", "pSize", "variant", "fluid", "invalid"], outputs: ["onResize"] }, { kind: "component", type: i3.Popover, selector: "p-popover", inputs: ["ariaLabel", "ariaLabelledBy", "dismissable", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions", "motionOptions"], outputs: ["onShow", "onHide"] }, { kind: "directive", type: i1$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i2$3.ToggleSwitch, selector: "p-toggleswitch, p-toggleSwitch, p-toggle-switch", inputs: ["styleClass", "tabindex", "inputId", "readonly", "trueValue", "falseValue", "ariaLabel", "size", "ariaLabelledBy", "autofocus"], outputs: ["onChange"] }, { kind: "component", type: i3$3.InputNumber, selector: "p-inputNumber, p-inputnumber, p-input-number", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "placeholder", "tabindex", "title", "ariaLabelledBy", "ariaDescribedBy", "ariaLabel", "ariaRequired", "autocomplete", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "component", type: SmzMenuComponent, selector: "smz-menu", inputs: ["items", "callback", "data", "buttonClass", "styleClass", "icon", "behavior", "testId"] }, { kind: "directive", type: NgVar, selector: "[ngVar]", inputs: ["ngVar"] }, { kind: "component", type: i26.IconField, selector: "p-iconfield, p-iconField, p-icon-field", inputs: ["hostName", "iconPosition", "styleClass"] }, { kind: "component", type: i27.InputIcon, selector: "p-inputicon, p-inputIcon", inputs: ["hostName", "styleClass"] }, { kind: "component", type: SmzColumnFilterComponent, selector: "smz-column-filter", inputs: ["currency", "display", "field", "matchMode", "showAddButton", "showMatchModes", "showOperator", "type", "showTime"] }, { kind: "component", type: SmzTableValidationMessagesComponent, selector: "smz-table-validation-messages", inputs: ["errors", "messages", "isFormInvalid", "isFormDirty"] }, { kind: "component", type: SmzTableContentComponent, selector: "smz-table-content", inputs: ["col", "contentTypes", "item", "rowIndex", "contentTemplate"] }, { kind: "component", type: SmzTableCaptionButtonsComponent, selector: "smz-table-caption-buttons", inputs: ["buttons", "tableTestId"] }, { kind: "component", type: SmzTableHeaderActionsComponent, selector: "smz-table-header-actions", inputs: ["col"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: UniqueFilterPipe, name: "uniqueFilter" }, { kind: "pipe", type: SmzTableContextPipe, name: "tableContext" }, { kind: "pipe", type: SmzFilterObjectPipe, name: "filterObject" }, { kind: "pipe", type: SmzCloneTableItemsPipe, name: "cloneTableItems" }, { kind: "pipe", type: SmzEditableSourcePipe, name: "editableSource" }, { kind: "pipe", type: SmzContentErrorsPipe, name: "contentErrors" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
17591
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: SmzTableComponent, isStandalone: false, selector: "smz-ui-table", inputs: { state: "state", items: "items", loading: "loading" }, outputs: { selectionChange: "selectionChange", filterChange: "filterChange", columnVisibilityChange: "columnVisibilityChange", create: "create", update: "update", delete: "delete" }, host: { properties: { "attr.data-testid": "this.hostTestId" } }, providers: [TableEditableService, TableFormsService], queries: [{ propertyName: "templates", predicate: PrimeTemplate }], viewQueries: [{ propertyName: "table", first: true, predicate: ["dt"], descendants: true }, { propertyName: "columnMultiselect", first: true, predicate: ["columnMultiselect"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "@if (state | tableContext; as context) {\r\n @if ((context.state.emptyFeedback != null && (context.state.emptyFeedback.extraInfo || context.state.emptyFeedback.image || context.state.emptyFeedback.actionButtons)) && (items != null && items.length === 0) && context.state.emptyFeedback.isFeatured) {\r\n <smz-data-info\r\n [attr.data-testid]=\"buildTableTestId('empty')\"\r\n [image]=\"context.state.emptyFeedback.image\"\r\n [message]=\"context.state.emptyFeedback.message\"\r\n [callbackInfo]=\"context.state.emptyFeedback.extraInfo\"\r\n [actions]=\"context.state.emptyFeedback.actionButtons\">\r\n <ng-template pTemplate=\"actions\">\r\n <ng-container *ngTemplateOutlet=\"emptyActionsTemplate; context: { $implicit: {} }\"></ng-container>\r\n </ng-template>\r\n </smz-data-info>\r\n } @else {\r\n <ng-container *ngVar=\"state.source?.items$ != null ? (state.source.items$ | async) : null as observableSource\">\r\n <ng-container *ngVar=\"state.source?.signalItems != null ? state.source.signalItems() : null as signalSource\">\r\n @if (((observableSource ?? signalSource ?? items) | cloneTableItems : context: tableKey: context.state.rowExpansion.sincronize); as clonedData) {\r\n <p-table #dt\r\n dataKey=\"id\"\r\n editMode=\"row\"\r\n [stripedRows]=\"context.state.styles.striped\"\r\n [value]=\"clonedData.items\"\r\n [(selection)]=\"selectedItems\"\r\n [tableStyleClass]=\"context.state.styles.tableStyleClass\"\r\n [size]=\"context.state.styles.size === 'extra-small' ? 'small' : context.state.styles.size === 'small' ? 'small' : context.state.styles.size === 'large' ? 'large' : undefined\"\r\n [class]=\"'p-datatable-smz-ui-table' + (context.state.styles.showGrid ? ' p-datatable-gridlines' : '') + (context.state.styles.size === 'extra-small' ? ' p-datatable-xs' : '') + (context.state.styles.size === 'small' ? ' p-datatable-sm' : '') + (context.state.styles.size === 'large' ? ' p-datatable-lg' : '')\"\r\n [rowHover]=\"context.state.actions.rowBehavior.hoverable\"\r\n [rows]=\"context.state.pagination.rows\"\r\n [first]=\"context.state.pagination.state.first\"\r\n [showCurrentPageReport]=\"context.state.pagination.pageReport.isVisible\"\r\n [rowsPerPageOptions]=\"context.state.pagination.rowsPerPageOptions\"\r\n [loading]=\"loading || isViewportInitializing\"\r\n [style.visibility]=\"isViewportInitializing ? 'hidden' : null\"\r\n [paginator]=\"context.state.pagination.isVisible\"\r\n paginatorDropdownAppendTo=\"body\"\r\n [currentPageReportTemplate]=\"context.state.locale.paginator.template\"\r\n [sortField]=\"context.state.sort.field\"\r\n [sortMode]=\"context.state.sort.mode\"\r\n [sortOrder]=\"context.state.sort.order\"\r\n [multiSortMeta]=\"context.state.sort.multiSortMeta\"\r\n [scrollable]=\"context.state.viewport.scrollable\"\r\n [scrollHeight]=\"context.state.viewport.scrollHeight\"\r\n [filterDelay]=\"0\"\r\n [globalFilterFields]=\"context.globalFilter\"\r\n [columns]=\"context.visibleColumns\"\r\n [frozenColumns]=\"context.frozenColumns\"\r\n [frozenWidth]=\"context.state.frozen.isEnabled ? context.state.frozen.width : null\"\r\n [resizableColumns]=\"context.state.viewport.resizableColumns\"\r\n [columnResizeMode]=\"context.state.viewport.columnResizeMode\"\r\n (onPage)=\"onPage($event)\"\r\n (onFilter)=\"onFilter($event)\"\r\n (selectionChange)=\"emitSelection($event)\"\r\n >\r\n @if (context.state.caption.isVisible) {\r\n <ng-template pTemplate=\"caption\">\r\n <div class=\"grid grid-nogutter items-center gap-2\" [attr.data-testid]=\"buildTableTestId('caption')\" [ngClass]=\"'justify-' + context.state.caption.toolbarAlignment\">\r\n @if (context.state.caption.title != null) {\r\n <div class=\"col database-title\" [attr.data-testid]=\"buildTableTestId('title')\" [innerHTML]=\"context.state.caption.title\"></div>\r\n }\r\n <ng-container *ngTemplateOutlet=\"captionTemplate; context: { $implicit: dt }\"></ng-container>\r\n <smz-table-caption-buttons [buttons]=\"context.state.caption.buttons\" [tableTestId]=\"state.tableTestId\"></smz-table-caption-buttons>\r\n @if (context.state.caption.exportToPdf.isButtonVisible) {\r\n <button pButton [attr.data-testid]=\"buildTableTestId('export-pdf')\" [label]=\"context.state.locale.exportToPdf.label\" class=\"p-button-outlined\" icon=\"fa-solid fa-file-pdf\" (click)=\"exportToPdf(context, clonedData.items)\" [disabled]=\"clonedData.showSkeleton\"></button>\r\n }\r\n @if (context.state.caption.exportToExcel.isButtonVisible) {\r\n <button pButton [attr.data-testid]=\"buildTableTestId('export-excel')\" [label]=\"context.state.locale.exportToExcel.label\" class=\"p-button-outlined\" icon=\"fa-solid fa-file-excel\" (click)=\"exportToExcel(table, context, clonedData.items)\" [disabled]=\"clonedData.showSkeleton\"></button>\r\n }\r\n @if (context.state.editable.creation.isButtonVisible) {\r\n <button pButton [attr.data-testid]=\"buildTableTestId('create')\" [label]=\"context.state.editable.creation.buttonLabel\" class=\"p-button-outlined\" icon=\"fa-solid fa-plus\" (click)=\"editableService.onRowCreateInit(table, context.columns)\" [disabled]=\"clonedData.showSkeleton || editableService.isEditing || editableService.isCreating || context.state.editable.creation.isButtonDisabled\"></button>\r\n }\r\n @if (context.state.caption.rowSelection.isButtonVisible) {\r\n <button pButton [attr.data-testid]=\"buildTableTestId('row-selection')\" [label]=\"context.state.locale.rowSelection.label\" class=\"p-button-outlined\" icon=\"fa-solid fa-check-double\" (click)=\"onRowSelection(context)\" [disabled]=\"clonedData.showSkeleton\"></button>\r\n }\r\n @if (context.state.rowExpansion.isButtonVisible) {\r\n <button pButton [attr.data-testid]=\"buildTableTestId('row-expansion')\" [label]=\"context.state.rowExpansion.label\" class=\"p-button-outlined\" icon=\"fa-solid fa-list\" (click)=\"onRowExpansion(context)\" [disabled]=\"clonedData.showSkeleton\"></button>\r\n }\r\n @if (context.state.caption.clearFilters.isButtonVisible) {\r\n <button pButton [attr.data-testid]=\"buildTableTestId('clear-filters')\" [label]=\"context.state.locale.clearFilters.label\" class=\"p-button-outlined\" icon=\"pi pi-filter-slash\" (click)=\"clear(table, context)\" [disabled]=\"clonedData.showSkeleton\"></button>\r\n }\r\n @if (context.state.caption.columnVisibility.showDropdownSelector) {\r\n <p-multiSelect\r\n #columnMultiselect\r\n [attr.data-testid]=\"buildTableTestId('column-visibility')\"\r\n class=\"ml-2 col-12 md:col-2\"\r\n styleClass=\"w-full\"\r\n appendTo=\"body\"\r\n [options]=\"context.hideableColumns\"\r\n [(ngModel)]=\"selectedColumns\"\r\n [placeholder]=\"context.state.locale.columnVisibility.placeholder\"\r\n [selectedItemsLabel]=\"context.state.locale.columnVisibility.selectedItemsLabel\"\r\n optionLabel=\"name\"\r\n dataKey=\"field\"\r\n optionLabel=\"header\"\r\n [filter]=\"true\"\r\n (onPanelHide)=\"updateColumnsVisibility(true)\"\r\n [pTooltip]=\"context.state.locale.columnVisibility.pTooltip\">\r\n </p-multiSelect>\r\n }\r\n @if (context.state.caption.globalFilter.isVisible) {\r\n <p-iconfield class=\"col-12\" [ngClass]=\"{ 'md:col-2': !context.state.caption.globalFilter.expanded }\">\r\n <p-inputicon styleClass=\"pi pi-search\" />\r\n <input #inputGlobal [(ngModel)]=\"globalSearchInput\" pInputText type=\"text\" styleClass=\"database-global-search\" (input)=\"updateGlobalFilter(inputGlobal.value)\" [disabled]=\"clonedData.showSkeleton\" [placeholder]=\"context.state.locale.globalFilter.placeholder\" [attr.data-testid]=\"buildTableTestId('search')\" />\r\n </p-iconfield>\r\n }\r\n </div>\r\n @if (toolbarTemplate != null) {\r\n <div class=\"grid grid-nogutter items-center mt-2\" [ngClass]=\"'justify-' + context.state.caption.toolbarAlignment\">\r\n <ng-container *ngTemplateOutlet=\"toolbarTemplate; context: { $implicit: dt }\"></ng-container>\r\n </div>\r\n }\r\n </ng-template>\r\n }\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr [ngClass]=\"{ 'invisible-header': !context.state.header.isVisible }\">\r\n @if (context.state.caption.rowSelection.isEnabled) {\r\n <th [ngStyle]=\"context.state.caption.rowSelection.ngStyle\">\r\n @if (!context.state.actions.batchActions.isVisible) {\r\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\r\n }\r\n </th>\r\n }\r\n @if (context.state.rowExpansion.isEnabled) {\r\n <th [ngStyle]=\"context.state.rowExpansion.ngStyle\"></th>\r\n }\r\n @for (col of columns; track col.field) {\r\n @if (context.state.viewport.resizableColumns) {\r\n @if (col.isOrderable) {\r\n <th [pSortableColumn]=\"col.sortField\" pResizableColumn [attr.data-testid]=\"buildColumnTestId(col.field)\" [ngStyle]=\"col.content.ngStyle\" [ngClass]=\"col.headerStyleClass\">\r\n <ng-container *ngTemplateOutlet=\"headerContent\"></ng-container>\r\n </th>\r\n }\r\n @if (!col.isOrderable) {\r\n <th pResizableColumn [attr.data-testid]=\"buildColumnTestId(col.field)\" [ngStyle]=\"col.content.ngStyle\" [ngClass]=\"col.headerStyleClass\">\r\n <ng-container *ngTemplateOutlet=\"headerContent\"></ng-container>\r\n </th>\r\n }\r\n } @else {\r\n @if (col.isOrderable) {\r\n <th [pSortableColumn]=\"col.sortField\" [attr.data-testid]=\"buildColumnTestId(col.field)\" [ngStyle]=\"col.content.ngStyle\" [ngClass]=\"col.headerStyleClass\">\r\n <ng-container *ngTemplateOutlet=\"headerContent\"></ng-container>\r\n </th>\r\n }\r\n @if (!col.isOrderable) {\r\n <th [attr.data-testid]=\"buildColumnTestId(col.field)\" [ngStyle]=\"col.content.ngStyle\" [ngClass]=\"col.headerStyleClass\">\r\n <ng-container *ngTemplateOutlet=\"headerContent\"></ng-container>\r\n </th>\r\n }\r\n }\r\n <ng-template #headerContent>\r\n <div class=\"flex justify-start items-center\">\r\n <span class=\"mr-1\">{{ col.header }}</span>\r\n @if (col.showHeaderActions) {\r\n <smz-table-header-actions clickStopPropagation class=\"ml-1 mt-1\" [col]=\"col\"></smz-table-header-actions>\r\n }\r\n @if (!clonedData.showSkeleton && col.isOrderable) {\r\n <p-sortIcon [field]=\"col.sortField\"></p-sortIcon>\r\n }\r\n @if (!clonedData.showSkeleton) {\r\n @switch (col.filter.type) {\r\n @case (filterTypes.currency) {\r\n <smz-column-filter type=\"numeric\" currency=\"BRL\" [field]=\"col.filterField\"></smz-column-filter>\r\n }\r\n @case (filterTypes.numeric) {\r\n <smz-column-filter type=\"numeric\" [field]=\"col.filterField\"></smz-column-filter>\r\n }\r\n @case (filterTypes.date) {\r\n <smz-column-filter type=\"date\" [field]=\"col.filterField\" [showTime]=\"col.filter.showTime\"></smz-column-filter>\r\n }\r\n @case (filterTypes.text) {\r\n <smz-column-filter type=\"text\" [field]=\"col.filterField\"></smz-column-filter>\r\n }\r\n @case (filterTypes.boolean) {\r\n <smz-column-filter type=\"boolean\" [field]=\"col.filterField\"></smz-column-filter>\r\n }\r\n @case (filterTypes.dropdown) {\r\n @if (col.filterField | filterObject; as filterField) {\r\n <smz-column-filter [field]=\"filterField + '.id'\" matchMode=\"dropdown\" [showMatchModes]=\"false\" [showOperator]=\"false\" [showAddButton]=\"false\">\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"px-3 pt-3 pb-0\">\r\n <span class=\"p-text-bold\">{{ col.header }}</span>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"filter\" let-value let-filter=\"filter\">\r\n <p-select appendTo=\"body\" [ngModel]=\"value\" [options]=\"(clonedData.items != null ? clonedData.items : []) | uniqueFilter : filterField + '.id' : filterField : null : 'name' : false\" [placeholder]=\"context.state.locale.dropdownFilter.placeholder\" (onChange)=\"filter($event.value)\" optionLabel=\"name\" dataKey=\"id\"></p-select>\r\n </ng-template>\r\n </smz-column-filter>\r\n }\r\n }\r\n @case (filterTypes.multiselect) {\r\n @if (col.filterField | filterObject; as filterField) {\r\n <smz-column-filter [field]=\"filterField\" matchMode=\"in\" [showMatchModes]=\"false\" [showOperator]=\"false\" [showAddButton]=\"false\">\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"px-3 pt-3 pb-0\">\r\n <span class=\"p-text-bold\">{{ col.header }}</span>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"filter\" let-value let-filter=\"filter\">\r\n <p-multiSelect [ngModel]=\"value\" [options]=\"(clonedData.items != null ? clonedData.items : []) | uniqueFilter : filterField + '.id' : filterField : null : 'name' : false\" [placeholder]=\"context.state.locale.dropdownFilter.placeholder\" (onChange)=\"filter($event.value)\" optionLabel=\"name\" dataKey=\"id\"></p-multiSelect>\r\n </ng-template>\r\n </smz-column-filter>\r\n }\r\n }\r\n @case (filterTypes.multiselect_array) {\r\n @if (col.filterField | filterObject; as filterField) {\r\n <smz-column-filter [field]=\"filterField\" matchMode=\"array-some\" [showMatchModes]=\"false\" [showOperator]=\"false\" [showAddButton]=\"false\">\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"px-3 pt-3 pb-0\">\r\n <span class=\"p-text-bold\">{{ col.header }}</span>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"filter\" let-value let-filter=\"filter\">\r\n <p-multiSelect [ngModel]=\"value\" [options]=\"(clonedData.items != null ? clonedData.items : []) | uniqueFilter : filterField + '.id' : filterField : null : 'name' : true\" [placeholder]=\"context.state.locale.dropdownFilter.placeholder\" (onChange)=\"filter($event.value)\" optionLabel=\"name\" dataKey=\"id\" [maxSelectedLabels]=\"2\" [selectedItemsLabel]=\"'{0}'\"></p-multiSelect>\r\n </ng-template>\r\n </smz-column-filter>\r\n }\r\n }\r\n @case (filterTypes.multiselect_string) {\r\n @if (col.filterField | filterObject; as filterField) {\r\n <smz-column-filter [field]=\"filterField\" matchMode=\"multiselectByString\" [showMatchModes]=\"false\" [showOperator]=\"false\" [showAddButton]=\"false\">\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"px-3 pt-3 pb-0\">\r\n <span class=\"p-text-bold\">{{ col.header }}</span>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"filter\" let-value let-filter=\"filter\">\r\n <p-multiSelect [ngModel]=\"value\" [options]=\"(clonedData.items != null ? clonedData.items : []) | uniqueFilter : filterField : filterField : null : true : false : false\" [placeholder]=\"context.state.locale.dropdownFilter.placeholder\" (onChange)=\"filter($event.value)\" [maxSelectedLabels]=\"2\" [selectedItemsLabel]=\"'{0}'\"></p-multiSelect>\r\n </ng-template>\r\n </smz-column-filter>\r\n }\r\n }\r\n }\r\n }\r\n @if (context.state.caption.columnVisibility.showColumnHideButton) {\r\n <button pButton type=\"button\" icon=\"fa-solid fa-eye-slash\" class=\"p-button-rounded p-button-text p-button-plain\" (click)=\"hideColumn(col, context)\"></button>\r\n }\r\n </div>\r\n </ng-template>\r\n }\r\n @if (context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible|| context.state.editable.isEditable) {\r\n <th [ngStyle]=\"context.state.editable.isEditable ? context.state.editable.ngStyle : context.state.actions.customActions.ngStyle\"></th>\r\n }\r\n </tr>\r\n @if (context.state.actions.batchActions.isVisible) {\r\n <tr>\r\n <th [attr.colspan]=\"columns.length + ((context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible || context.state.editable.isEditable) ? 1 : 0) + (context.state.caption.rowSelection.isEnabled ? 1 : 0) + (context.state.rowExpansion.isEnabled ? 1 : 0)\"\r\n [ngStyle]=\"context.state.actions.customActions.ngStyle\" class=\"px-0\">\r\n <div class=\"grid grid-nogutter items-center justify-start\">\r\n <p-tableHeaderCheckbox class=\"mr-4\"></p-tableHeaderCheckbox>\r\n @if (selectedItems?.length > 0) {\r\n @for (batchItem of context.state.actions.batchActions.items; track batchItem.label) {\r\n @if (batchItem.visible) {\r\n <button pButton [label]=\"batchItem.label\" class=\"p-button-rounded p-button-text p-button-plain animate__animated animate__fadeIn\" [ngClass]=\"batchItem.styleClass\" [icon]=\"batchItem.icon\" (click)=\"batchItem.command(selectedItems); selectedItems = [];\" [disabled]=\"batchItem.disabled\" [pTooltip]=\"batchItem.tooltip\"></button>\r\n }\r\n }\r\n }\r\n </div>\r\n </th>\r\n </tr>\r\n }\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-item let-editing=\"editing\" let-rowIndex=\"rowIndex\" let-columns=\"columns\">\r\n <tr #editableRowElement\r\n [pEditableRow]=\"item\"\r\n tableItemAction\r\n [isClickable]=\"context.state.actions.rowBehavior.isClickable\"\r\n [callback]=\"context.state.actions.rowBehavior.clickCallback\"\r\n [expandRowOnClick]=\"context.state.actions.rowBehavior.expandRowOnClick\"\r\n [item]=\"item\"\r\n class=\"p-selectable-row\"\r\n [attr.data-testid]=\"buildRowTestId(item, rowIndex)\"\r\n [ngClass]=\"{ 'highlight-row': item?.id === state.actions.rowBehavior.highlights, 'preserve-in-small': state.actions.rowBehavior.preserveLayoutInSmallDevices }\"\r\n >\r\n @if (context.state.caption.rowSelection.isEnabled && !clonedData.showSkeleton) {\r\n <td\r\n clickStopPropagation\r\n class=\"{{ state.actions.rowBehavior.cellStyleClass }}\"\r\n [ngClass]=\"{ 'opacity-50 pointer-events-none': editableService.context[item.id]?.hasErrors || editableService.context[item.id]?.isLoading }\"\r\n [ngStyle]=\"context.state.caption.rowSelection.ngStyle\"\r\n >\r\n <p-tableCheckbox [value]=\"item\"></p-tableCheckbox>\r\n </td>\r\n }\r\n @if (context.state.rowExpansion.isEnabled && !clonedData.showSkeleton) {\r\n <td\r\n clickStopPropagation\r\n class=\"{{ state.actions.rowBehavior.cellStyleClass }}\"\r\n [ngClass]=\"{ 'opacity-50 pointer-events-none': editableService.context[item.id]?.hasErrors || editableService.context[item.id]?.isLoading, 'grid grid-nogutter justify-start items-center gap-2': context.state.rowExpansion.highlightNewItems && item._isNew }\"\r\n [ngStyle]=\"context.state.rowExpansion.ngStyle\"\r\n >\r\n <button\r\n pButton\r\n type=\"button\"\r\n class=\"p-button-text p-button-rounded p-button-sm smz-table-row-expansion-toggle\"\r\n [icon]=\"item._isExpanded ? 'fa-solid fa-chevron-down' : 'fa-solid fa-chevron-right'\"\r\n (click)=\"item._isExpanded = !item._isExpanded; item._isNew = false\"\r\n ></button>\r\n @if (context.state.rowExpansion.highlightNewItems && item._isNew) {\r\n <div class=\"rounded bg-cyan-400 text-sm text-white px-2 py-0 smz-table-new-tag\" (click)=\"item._isNew = false\">{{ context.state.rowExpansion.highlightLabel }}</div>\r\n }\r\n </td>\r\n }\r\n @for (col of columns; track col.field) {\r\n @if (clonedData.showSkeleton) {\r\n <td class=\"{{ state.actions.rowBehavior.cellStyleClass }}\" [ngStyle]=\"col.content.ngStyle\"><p-skeleton width=\"100%\" height=\"1rem\"></p-skeleton></td>\r\n } @else {\r\n <td class=\"{{ state.actions.rowBehavior.cellStyleClass }}\" [attr.data-testid]=\"buildCellTestId(item, rowIndex, col.field)\" [ngClass]=\"{ 'opacity-50 pointer-events-none': editableService.context[item.id]?.hasErrors || editableService.context[item.id]?.isLoading }\" [ngStyle]=\"col.content.ngStyle\">\r\n <span class=\"p-column-title\">{{ col.header }}</span>\r\n <p-cellEditor>\r\n <!-- CELULAR COM EDITOR -->\r\n <ng-template pTemplate=\"input\">\r\n @switch (col.editable.type) {\r\n @case (editableTypes.none) {\r\n <smz-table-content class=\"cursor-default\" [ngClass]=\"col.content.contentStyleClass\" [col]=\"col\" [contentTypes]=\"contentTypes\" [item]=\"item\" [rowIndex]=\"rowIndex\" [contentTemplate]=\"contentTemplate\"></smz-table-content>\r\n }\r\n @case (editableTypes.custom) {\r\n <ng-container *ngTemplateOutlet=\"editableTemplate; context: { $implicit: item, col: col }\"></ng-container>\r\n }\r\n <!-- INPUT TEXT -->\r\n @case (editableTypes.text) {\r\n @if (editableService.context[item.id]?.form; as form) {\r\n @if (form.controls[col.editable.property]; as control) {\r\n <div class=\"relative w-full\">\r\n <input pInputText type=\"text\" [formControl]=\"$any(control)\" style=\"width: 100%;\">\r\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\r\n </div>\r\n }\r\n }\r\n }\r\n <!-- INPUT NUMBER -->\r\n @case (editableTypes.number) {\r\n @if (editableService.context[item.id]?.form; as form) {\r\n @if (form.controls[col.editable.property]; as control) {\r\n <div class=\"relative w-full\">\r\n <p-inputNumber\r\n *ngVar=\"col.editable.data as numberData\"\r\n [formControl]=\"$any(control)\"\r\n [mode]=\"numberData.mode\"\r\n [minFractionDigits]=\"numberData.minFractionDigits\"\r\n [maxFractionDigits]=\"numberData.maxFractionDigits\"\r\n [currency]=\"numberData.currency\"\r\n [useGrouping]=\"numberData.useGrouping\"\r\n [allowEmpty]=\"numberData.allowEmpty\"\r\n [showClear]=\"numberData.showClear\"\r\n [showButtons]=\"numberData.showButtons\"\r\n [prefix]=\"numberData.prefix\"\r\n [suffix]=\"numberData.suffix\">\r\n </p-inputNumber>\r\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\r\n </div>\r\n }\r\n }\r\n }\r\n <!-- INPUT SWITCH -->\r\n @case (editableTypes.switch) {\r\n @if (editableService.context[item.id]?.form; as form) {\r\n @if (form.controls[col.editable.property]; as control) {\r\n <div class=\"relative w-full\">\r\n <p-toggleswitch [formControl]=\"$any(control)\"></p-toggleswitch>\r\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\r\n </div>\r\n }\r\n }\r\n }\r\n <!-- INPUT TEXT AREA -->\r\n @case (editableTypes.area) {\r\n @if (editableService.context[item.id]?.form; as form) {\r\n @if (form.controls[col.editable.property]; as control) {\r\n <div class=\"relative w-full\">\r\n <textarea pInputTextarea type=\"text\" [formControl]=\"$any(control)\" [rows]=\"$any(col.editable.data).rows\" required style=\"width: 100%;\"></textarea>\r\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\r\n </div>\r\n }\r\n }\r\n }\r\n <!-- INPUT DROPDOWN -->\r\n @case (editableTypes.dropdown) {\r\n @if (editableService.context[item.id]?.form; as form) {\r\n @if (form.controls[col.editable.property]; as control) {\r\n <div class=\"relative w-full\">\r\n <p-select appendTo=\"body\" [formControl]=\"$any(control)\" styleClass=\"w-full\" [options]=\"col.editable.data | editableSource\" optionLabel=\"name\" dataKey=\"id\" [placeholder]=\"$any(col.editable.data).placeholder\" [showClear]=\"!col.editable.validatorsPreset?.isRequired\" [filter]=\"true\"></p-select>\r\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\r\n </div>\r\n }\r\n }\r\n }\r\n <!-- INPUT CALENDAR -->\r\n @case (editableTypes.calendar) {\r\n @if (editableService.context[item.id]?.form; as form) {\r\n @if (form.controls[col.editable.property]; as control) {\r\n <div class=\"relative w-full\">\r\n <p-datepicker [formControl]=\"$any(control)\" appendTo=\"body\" styleClass=\"w-full\" [ngClass]=\"{ 'pl-5': !control.valid }\"></p-datepicker>\r\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\r\n </div>\r\n }\r\n }\r\n }\r\n }\r\n </ng-template>\r\n <!-- CELULAR COM CONTE\u00DADO -->\r\n <ng-template pTemplate=\"output\">\r\n <smz-table-content\r\n [col]=\"col\"\r\n [pTooltip]=\"col.content.tooltip != null ? col.content.tooltip(item) : null\"\r\n tooltipPosition=\"left\"\r\n [ngClass]=\"col.content.contentStyleClass\" [contentTypes]=\"contentTypes\" [item]=\"item\" [rowIndex]=\"rowIndex\" [contentTemplate]=\"contentTemplate\">\r\n </smz-table-content>\r\n </ng-template>\r\n </p-cellEditor>\r\n </td>\r\n }\r\n }\r\n @if (context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible || context.state.editable.isEditable) {\r\n <td [ngStyle]=\"context.state.actions.customActions.ngStyle\" class=\"px-0\">\r\n <div class=\"grid grid-nogutter items-center justify-center\">\r\n @if (clonedData.showSkeleton) {\r\n <div class=\"w-full\">\r\n <p-skeleton width=\"100%\" height=\"1rem\"></p-skeleton>\r\n </div>\r\n } @else {\r\n <!-- SEM EDITAR -->\r\n @if (!editing) {\r\n @if (context.state.editable.update.isButtonVisible) {\r\n <button pButton type=\"button\" icon=\"pi pi-pencil\" (click)=\"editableService.onRowEditInit(item)\" class=\"p-button-rounded p-button-text mx-1\" [disabled]=\"editableService.isEditing || editableService.isCreating || context.state.editable.update.isButtonDisabled || (!context.state.editable.update.condition(item))\" pInitEditableRow></button>\r\n }\r\n @if (context.state.editable.remove.isButtonVisible) {\r\n <button pButton type=\"button\" icon=\"pi pi-trash\" (click)=\"editableService.onRowRemove($event, table, item)\" class=\"p-button-rounded p-button-text p-button-secondary mx-1\" [disabled]=\"editableService.isEditing || editableService.isCreating || context.state.editable.remove.isButtonDisabled || (!context.state.editable.remove.condition(item))\"></button>\r\n }\r\n }\r\n <!-- EDITANDO -->\r\n @if (editing) {\r\n @if (editableService.context[item.id]; as editableContext) {\r\n <!-- COM LOADING -->\r\n @if (editableContext.isLoading) {\r\n <button pButton type=\"button\" icon=\"fa-solid fa-rotate fa-spin\" [disabled]=\"true\" class=\"p-button-rounded p-button-text p-button-info mr-2\"></button>\r\n }\r\n <!-- SEM LOADING -->\r\n @if (!editableContext.isLoading) {\r\n <!-- EDITANDO -->\r\n @if (!editableContext.hasErrors) {\r\n <!-- CRIANDO -->\r\n @if (item._context?.isCreating) {\r\n <button pButton type=\"button\" icon=\"pi pi-check\" (click)=\"editableService.onRowCreateSave($event, table, editableRowElement, item)\" [disabled]=\"!editableContext.hasChanged || !editableService.context[item.id]?.form.valid\" class=\"p-button-rounded p-button-text p-button-success mr-2\"></button>\r\n <button pButton type=\"button\" icon=\"pi pi-times\" (click)=\"editableService.onRowCreateCancel($event, table, item)\" class=\"p-button-rounded p-button-text p-button-danger\"></button>\r\n }\r\n <!-- ATUALIZANDO -->\r\n @if (item._context?.isUpdating) {\r\n <button pButton type=\"button\" icon=\"pi pi-check\" (click)=\"editableService.onRowEditSave($event, table, editableRowElement, item)\" [disabled]=\"!editableContext.hasChanged || !editableService.context[item.id]?.form.valid\" class=\"p-button-rounded p-button-text p-button-success mr-2\"></button>\r\n <button pButton type=\"button\" icon=\"pi pi-times\" (click)=\"editableService.onRowEditCancel($event, table, item)\" class=\"p-button-rounded p-button-text p-button-danger\"></button>\r\n }\r\n }\r\n <!-- COM ERRORS -->\r\n @if (editableContext.hasErrors) {\r\n <p-popover #errorsOverlay appendTo=\"body\" [style]=\"{ width: '450px' }\">\r\n <div [innerHtml]=\"editableContext.errors | contentErrors\"></div>\r\n </p-popover>\r\n <button pButton type=\"button\" icon=\"fas fa-exclamation-triangle\" [disabled]=\"false\" class=\"p-button-sm p-button-rounded p-button-text p-button-danger mr-2\" (click)=\"errorsOverlay.toggle($event)\"></button>\r\n <!-- CRIANDO -->\r\n @if (item._context?.isCreating) {\r\n <button pButton type=\"button\" icon=\"pi pi-times\" (click)=\"editableService.onRowCreateCancel($event, table, item)\" class=\"p-button-sm p-button-rounded p-button-text p-button-danger\"></button>\r\n }\r\n <!-- ATUALIZANDO -->\r\n @if (item._context?.isUpdating) {\r\n <button pButton type=\"button\" icon=\"pi pi-times\" (click)=\"editableService.onRowEditCancel($event, table, item)\" class=\"p-button-sm p-button-rounded p-button-text p-button-danger\"></button>\r\n }\r\n }\r\n }\r\n }\r\n }\r\n <!-- CUSTOM MENU -->\r\n @if (context.state.actions.customActions.isVisible && !editing) {\r\n <ng-container *ngTemplateOutlet=\"actionsTemplate; context: { $implicit: item }\"></ng-container>\r\n }\r\n <!-- MENU -->\r\n @if (context.state.actions.menu.isVisible && !editing) {\r\n <smz-menu [callback]=\"context.state.actions.menu.callback\" [items]=\"context.state.actions.menu.items\" [data]=\"item\" [behavior]=\"context.state.actions.menu.behavior\" [ngClass]=\"{ 'ml-2': context.state.actions.customActions.isVisible }\" [icon]=\"context.state.actions.menu.styles.icon\" [styleClass]=\"context.state.actions.menu.styles.styleClass\" [buttonClass]=\"context.state.actions.menu.styles.buttonClass\" [testId]=\"buildRowMenuTestId(item, rowIndex)\"></smz-menu>\r\n }\r\n }\r\n </div>\r\n </td>\r\n }\r\n </tr>\r\n @if (item?._isExpanded) {\r\n <tr>\r\n <td [attr.colspan]=\"columns.length + ((context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible || context.state.editable.isEditable) ? 1 : 0) + (context.state.caption.rowSelection.isEnabled ? 1 : 0) + (context.state.rowExpansion.isEnabled ? 1 : 0)\">\r\n <ng-container *ngTemplateOutlet=\"rowContentTemplate; context: { $implicit: item }\"></ng-container>\r\n </td>\r\n </tr>\r\n }\r\n </ng-template>\r\n <ng-template pTemplate=\"emptymessage\" let-columns>\r\n <tr>\r\n <td [attr.colspan]=\"columns.length + ((context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible || context.state.editable.isEditable) ? 1 : 0) + (context.state.caption.rowSelection.isEnabled ? 1 : 0) + (context.state.rowExpansion.isEnabled ? 1 : 0)\" [ngStyle]=\"{ 'text-align': 'center' }\">\r\n <div [innerHtml]=\"context.state.emptyFeedback.message\"></div>\r\n @if (context.state.caption.clearFilters.isButtonVisible && hasFilters()) {\r\n <button pButton [label]=\"context.state.locale.clearFilters.label\" class=\"p-button-outlined mt-3\" icon=\"pi pi-filter-slash\" (click)=\"clear(table, context)\"></button>\r\n }\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n }\r\n </ng-container>\r\n </ng-container>\r\n }\r\n} @else {\r\n @if (emptyStateTemplate != null) {\r\n <ng-container *ngTemplateOutlet=\"emptyStateTemplate; context: { $implicit: {} }\"></ng-container>\r\n }\r\n}\r\n\r\n", dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i1$7.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i8.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i8.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "directive", type: i8.ResizableColumn, selector: "[pResizableColumn]", inputs: ["pResizableColumnDisabled"] }, { kind: "component", type: i8.CellEditor, selector: "p-cellEditor" }, { kind: "component", type: i8.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i8.TableCheckbox, selector: "p-tableCheckbox", inputs: ["value", "disabled", "required", "index", "inputId", "name", "ariaLabel"] }, { kind: "component", type: i8.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "directive", type: i8.EditableRow, selector: "[pEditableRow]", inputs: ["pEditableRow", "pEditableRowDisabled"] }, { kind: "directive", type: i8.InitEditableRow, selector: "[pInitEditableRow]" }, { kind: "directive", type: i4.ButtonDirective, selector: "[pButton]", inputs: ["ptButtonDirective", "pButtonPT", "pButtonUnstyled", "hostName", "text", "plain", "raised", "size", "outlined", "rounded", "iconPos", "loadingIcon", "fluid", "label", "icon", "loading", "buttonProps", "severity"] }, { kind: "directive", type: i2.InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "component", type: i3$5.MultiSelect, selector: "p-multiSelect, p-multiselect, p-multi-select", inputs: ["id", "ariaLabel", "styleClass", "panelStyle", "panelStyleClass", "inputId", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "dataKey", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "chipIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "loading", "virtualScrollItemSize", "loadingIcon", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "showClear", "autofocus", "placeholder", "options", "filterValue", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus", "highlightOnSelect", "size", "variant", "fluid", "appendTo", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "component", type: i4$1.Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "component", type: i1$2.DatePicker, selector: "p-datePicker, p-datepicker, p-date-picker", inputs: ["iconDisplay", "styleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "readonlyInput", "shortYearCutoff", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "minDate", "maxDate", "disabledDates", "disabledDays", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "view", "defaultDate", "appendTo", "motionOptions"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "directive", type: i1$3.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$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: TableItemActionsDirective, selector: "[tableItemAction]", inputs: ["isClickable", "item", "callback", "expandRowOnClick"] }, { kind: "directive", type: ClickStopPropagationDirective, selector: "[clickStopPropagation]" }, { kind: "component", type: SmzDataInfoComponent, selector: "smz-data-info", inputs: ["image", "message", "actions", "callbackInfo", "callbackLabel"], outputs: ["clicked"] }, { kind: "directive", type: i1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "showOnEllipsis", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }, { kind: "component", type: i19.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "directive", type: i2$4.Textarea, selector: "[pTextarea], [pInputTextarea]", inputs: ["pTextareaPT", "pTextareaUnstyled", "autoResize", "pSize", "variant", "fluid", "invalid"], outputs: ["onResize"] }, { kind: "component", type: i3.Popover, selector: "p-popover", inputs: ["ariaLabel", "ariaLabelledBy", "dismissable", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions", "motionOptions"], outputs: ["onShow", "onHide"] }, { kind: "directive", type: i1$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i2$3.ToggleSwitch, selector: "p-toggleswitch, p-toggleSwitch, p-toggle-switch", inputs: ["styleClass", "tabindex", "inputId", "readonly", "trueValue", "falseValue", "ariaLabel", "size", "ariaLabelledBy", "autofocus"], outputs: ["onChange"] }, { kind: "component", type: i3$3.InputNumber, selector: "p-inputNumber, p-inputnumber, p-input-number", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "placeholder", "tabindex", "title", "ariaLabelledBy", "ariaDescribedBy", "ariaLabel", "ariaRequired", "autocomplete", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "component", type: SmzMenuComponent, selector: "smz-menu", inputs: ["items", "callback", "data", "buttonClass", "styleClass", "icon", "behavior", "testId"] }, { kind: "directive", type: NgVar, selector: "[ngVar]", inputs: ["ngVar"] }, { kind: "component", type: i26.IconField, selector: "p-iconfield, p-iconField, p-icon-field", inputs: ["hostName", "iconPosition", "styleClass"] }, { kind: "component", type: i27.InputIcon, selector: "p-inputicon, p-inputIcon", inputs: ["hostName", "styleClass"] }, { kind: "component", type: SmzColumnFilterComponent, selector: "smz-column-filter", inputs: ["currency", "display", "field", "matchMode", "showAddButton", "showMatchModes", "showOperator", "type", "showTime"] }, { kind: "component", type: SmzTableValidationMessagesComponent, selector: "smz-table-validation-messages", inputs: ["errors", "messages", "isFormInvalid", "isFormDirty"] }, { kind: "component", type: SmzTableContentComponent, selector: "smz-table-content", inputs: ["col", "contentTypes", "item", "rowIndex", "contentTemplate"] }, { kind: "component", type: SmzTableCaptionButtonsComponent, selector: "smz-table-caption-buttons", inputs: ["buttons", "tableTestId"] }, { kind: "component", type: SmzTableHeaderActionsComponent, selector: "smz-table-header-actions", inputs: ["col"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: UniqueFilterPipe, name: "uniqueFilter" }, { kind: "pipe", type: SmzTableContextPipe, name: "tableContext" }, { kind: "pipe", type: SmzFilterObjectPipe, name: "filterObject" }, { kind: "pipe", type: SmzCloneTableItemsPipe, name: "cloneTableItems" }, { kind: "pipe", type: SmzEditableSourcePipe, name: "editableSource" }, { kind: "pipe", type: SmzContentErrorsPipe, name: "contentErrors" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
17554
17592
|
}
|
|
17555
17593
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzTableComponent, decorators: [{
|
|
17556
17594
|
type: Component,
|
|
17557
|
-
args: [{ selector: 'smz-ui-table', changeDetection: ChangeDetectionStrategy.OnPush, providers: [TableEditableService, TableFormsService], standalone: false, template: "@if (state | tableContext; as context) {\r\n @if ((context.state.emptyFeedback != null && (context.state.emptyFeedback.extraInfo || context.state.emptyFeedback.image || context.state.emptyFeedback.actionButtons)) && (items != null && items.length === 0) && context.state.emptyFeedback.isFeatured) {\r\n <smz-data-info\r\n [attr.data-testid]=\"buildTableTestId('empty')\"\r\n [image]=\"context.state.emptyFeedback.image\"\r\n [message]=\"context.state.emptyFeedback.message\"\r\n [callbackInfo]=\"context.state.emptyFeedback.extraInfo\"\r\n [actions]=\"context.state.emptyFeedback.actionButtons\">\r\n <ng-template pTemplate=\"actions\">\r\n <ng-container *ngTemplateOutlet=\"emptyActionsTemplate; context: { $implicit: {} }\"></ng-container>\r\n </ng-template>\r\n </smz-data-info>\r\n } @else {\r\n <ng-container *ngVar=\"state.source?.items$ != null ? (state.source.items$ | async) : null as observableSource\">\r\n <ng-container *ngVar=\"state.source?.signalItems != null ? state.source.signalItems() : null as signalSource\">\r\n @if (((observableSource ?? signalSource ?? items) | cloneTableItems : context: tableKey: context.state.rowExpansion.sincronize); as clonedData) {\r\n <p-table #dt\r\n dataKey=\"id\"\r\n editMode=\"row\"\r\n [stripedRows]=\"context.state.styles.striped\"\r\n [value]=\"clonedData.items\"\r\n [(selection)]=\"selectedItems\"\r\n [tableStyleClass]=\"context.state.styles.tableStyleClass\"\r\n [size]=\"context.state.styles.size === 'extra-small' ? 'small' : context.state.styles.size === 'small' ? 'small' : context.state.styles.size === 'large' ? 'large' : undefined\"\r\n [class]=\"'p-datatable-smz-ui-table' + (context.state.styles.showGrid ? ' p-datatable-gridlines' : '') + (context.state.styles.size === 'extra-small' ? ' p-datatable-xs' : '') + (context.state.styles.size === 'small' ? ' p-datatable-sm' : '') + (context.state.styles.size === 'large' ? ' p-datatable-lg' : '')\"\r\n [rowHover]=\"context.state.actions.rowBehavior.hoverable\"\r\n [rows]=\"context.state.pagination.rows\"\r\n [first]=\"context.state.pagination.state.first\"\r\n [showCurrentPageReport]=\"context.state.pagination.pageReport.isVisible\"\r\n [rowsPerPageOptions]=\"context.state.pagination.rowsPerPageOptions\"\r\n [loading]=\"loading || isViewportInitializing\"\r\n [style.visibility]=\"isViewportInitializing ? 'hidden' : null\"\r\n [paginator]=\"context.state.pagination.isVisible\"\r\n paginatorDropdownAppendTo=\"body\"\r\n [currentPageReportTemplate]=\"context.state.locale.paginator.template\"\r\n [sortField]=\"context.state.sort.field\"\r\n [sortMode]=\"context.state.sort.mode\"\r\n [sortOrder]=\"context.state.sort.order\"\r\n [multiSortMeta]=\"context.state.sort.multiSortMeta\"\r\n [scrollable]=\"context.state.viewport.scrollable\"\r\n [scrollHeight]=\"context.state.viewport.scrollHeight\"\r\n [filterDelay]=\"0\"\r\n [globalFilterFields]=\"context.globalFilter\"\r\n [columns]=\"context.visibleColumns\"\r\n [frozenColumns]=\"context.frozenColumns\"\r\n [frozenWidth]=\"context.state.frozen.isEnabled ? context.state.frozen.width : null\"\r\n [resizableColumns]=\"context.state.viewport.resizableColumns\"\r\n [columnResizeMode]=\"context.state.viewport.columnResizeMode\"\r\n (onPage)=\"onPage($event)\"\r\n (onFilter)=\"onFilter($event)\"\r\n (selectionChange)=\"emitSelection($event)\"\r\n >\r\n @if (context.state.caption.isVisible) {\r\n <ng-template pTemplate=\"caption\">\r\n <div class=\"grid grid-nogutter items-center gap-2\" [attr.data-testid]=\"buildTableTestId('caption')\" [ngClass]=\"'justify-' + context.state.caption.toolbarAlignment\">\r\n @if (context.state.caption.title != null) {\r\n <div class=\"col database-title\" [attr.data-testid]=\"buildTableTestId('title')\" [innerHTML]=\"context.state.caption.title\"></div>\r\n }\r\n <ng-container *ngTemplateOutlet=\"captionTemplate; context: { $implicit: dt }\"></ng-container>\r\n <smz-table-caption-buttons [buttons]=\"context.state.caption.buttons\" [tableTestId]=\"state.tableTestId\"></smz-table-caption-buttons>\r\n @if (context.state.caption.exportToPdf.isButtonVisible) {\r\n <button pButton [attr.data-testid]=\"buildTableTestId('export-pdf')\" [label]=\"context.state.locale.exportToPdf.label\" class=\"p-button-outlined\" icon=\"fa-solid fa-file-pdf\" (click)=\"exportToPdf(context, clonedData.items)\" [disabled]=\"clonedData.showSkeleton\"></button>\r\n }\r\n @if (context.state.caption.exportToExcel.isButtonVisible) {\r\n <button pButton [attr.data-testid]=\"buildTableTestId('export-excel')\" [label]=\"context.state.locale.exportToExcel.label\" class=\"p-button-outlined\" icon=\"fa-solid fa-file-excel\" (click)=\"exportToExcel(table, context, clonedData.items)\" [disabled]=\"clonedData.showSkeleton\"></button>\r\n }\r\n @if (context.state.editable.creation.isButtonVisible) {\r\n <button pButton [attr.data-testid]=\"buildTableTestId('create')\" [label]=\"context.state.editable.creation.buttonLabel\" class=\"p-button-outlined\" icon=\"fa-solid fa-plus\" (click)=\"editableService.onRowCreateInit(table, context.columns)\" [disabled]=\"clonedData.showSkeleton || editableService.isEditing || editableService.isCreating || context.state.editable.creation.isButtonDisabled\"></button>\r\n }\r\n @if (context.state.caption.rowSelection.isButtonVisible) {\r\n <button pButton [attr.data-testid]=\"buildTableTestId('row-selection')\" [label]=\"context.state.locale.rowSelection.label\" class=\"p-button-outlined\" icon=\"fa-solid fa-check-double\" (click)=\"onRowSelection(context)\" [disabled]=\"clonedData.showSkeleton\"></button>\r\n }\r\n @if (context.state.rowExpansion.isButtonVisible) {\r\n <button pButton [attr.data-testid]=\"buildTableTestId('row-expansion')\" [label]=\"context.state.rowExpansion.label\" class=\"p-button-outlined\" icon=\"fa-solid fa-list\" (click)=\"onRowExpansion(context)\" [disabled]=\"clonedData.showSkeleton\"></button>\r\n }\r\n @if (context.state.caption.clearFilters.isButtonVisible) {\r\n <button pButton [attr.data-testid]=\"buildTableTestId('clear-filters')\" [label]=\"context.state.locale.clearFilters.label\" class=\"p-button-outlined\" icon=\"pi pi-filter-slash\" (click)=\"clear(table, context)\" [disabled]=\"clonedData.showSkeleton\"></button>\r\n }\r\n @if (context.state.caption.columnVisibility.showDropdownSelector) {\r\n <p-multiSelect\r\n #columnMultiselect\r\n [attr.data-testid]=\"buildTableTestId('column-visibility')\"\r\n class=\"ml-2 col-12 md:col-2\"\r\n styleClass=\"w-full\"\r\n [options]=\"context.hideableColumns\"\r\n [(ngModel)]=\"selectedColumns\"\r\n [placeholder]=\"context.state.locale.columnVisibility.placeholder\"\r\n [selectedItemsLabel]=\"context.state.locale.columnVisibility.selectedItemsLabel\"\r\n optionLabel=\"name\"\r\n dataKey=\"field\"\r\n optionLabel=\"header\"\r\n [filter]=\"true\"\r\n (onPanelHide)=\"updateColumnsVisibility(true)\"\r\n [pTooltip]=\"context.state.locale.columnVisibility.pTooltip\">\r\n </p-multiSelect>\r\n }\r\n @if (context.state.caption.globalFilter.isVisible) {\r\n <p-iconfield class=\"col-12\" [ngClass]=\"{ 'md:col-2': !context.state.caption.globalFilter.expanded }\">\r\n <p-inputicon styleClass=\"pi pi-search\" />\r\n <input #inputGlobal [(ngModel)]=\"globalSearchInput\" pInputText type=\"text\" styleClass=\"database-global-search\" (input)=\"updateGlobalFilter(inputGlobal.value)\" [disabled]=\"clonedData.showSkeleton\" [placeholder]=\"context.state.locale.globalFilter.placeholder\" [attr.data-testid]=\"buildTableTestId('search')\" />\r\n </p-iconfield>\r\n }\r\n </div>\r\n @if (toolbarTemplate != null) {\r\n <div class=\"grid grid-nogutter items-center mt-2\" [ngClass]=\"'justify-' + context.state.caption.toolbarAlignment\">\r\n <ng-container *ngTemplateOutlet=\"toolbarTemplate; context: { $implicit: dt }\"></ng-container>\r\n </div>\r\n }\r\n </ng-template>\r\n }\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr [ngClass]=\"{ 'invisible-header': !context.state.header.isVisible }\">\r\n @if (context.state.caption.rowSelection.isEnabled) {\r\n <th [ngStyle]=\"context.state.caption.rowSelection.ngStyle\">\r\n @if (!context.state.actions.batchActions.isVisible) {\r\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\r\n }\r\n </th>\r\n }\r\n @if (context.state.rowExpansion.isEnabled) {\r\n <th [ngStyle]=\"context.state.rowExpansion.ngStyle\"></th>\r\n }\r\n @for (col of columns; track col.field) {\r\n @if (context.state.viewport.resizableColumns) {\r\n @if (col.isOrderable) {\r\n <th [pSortableColumn]=\"col.sortField\" pResizableColumn [attr.data-testid]=\"buildColumnTestId(col.field)\" [ngStyle]=\"col.content.ngStyle\" [ngClass]=\"col.headerStyleClass\">\r\n <ng-container *ngTemplateOutlet=\"headerContent\"></ng-container>\r\n </th>\r\n }\r\n @if (!col.isOrderable) {\r\n <th pResizableColumn [attr.data-testid]=\"buildColumnTestId(col.field)\" [ngStyle]=\"col.content.ngStyle\" [ngClass]=\"col.headerStyleClass\">\r\n <ng-container *ngTemplateOutlet=\"headerContent\"></ng-container>\r\n </th>\r\n }\r\n } @else {\r\n @if (col.isOrderable) {\r\n <th [pSortableColumn]=\"col.sortField\" [attr.data-testid]=\"buildColumnTestId(col.field)\" [ngStyle]=\"col.content.ngStyle\" [ngClass]=\"col.headerStyleClass\">\r\n <ng-container *ngTemplateOutlet=\"headerContent\"></ng-container>\r\n </th>\r\n }\r\n @if (!col.isOrderable) {\r\n <th [attr.data-testid]=\"buildColumnTestId(col.field)\" [ngStyle]=\"col.content.ngStyle\" [ngClass]=\"col.headerStyleClass\">\r\n <ng-container *ngTemplateOutlet=\"headerContent\"></ng-container>\r\n </th>\r\n }\r\n }\r\n <ng-template #headerContent>\r\n <div class=\"flex justify-start items-center\">\r\n <span class=\"mr-1\">{{ col.header }}</span>\r\n @if (col.showHeaderActions) {\r\n <smz-table-header-actions clickStopPropagation class=\"ml-1 mt-1\" [col]=\"col\"></smz-table-header-actions>\r\n }\r\n @if (!clonedData.showSkeleton && col.isOrderable) {\r\n <p-sortIcon [field]=\"col.sortField\"></p-sortIcon>\r\n }\r\n @if (!clonedData.showSkeleton) {\r\n @switch (col.filter.type) {\r\n @case (filterTypes.currency) {\r\n <smz-column-filter type=\"numeric\" currency=\"BRL\" [field]=\"col.filterField\"></smz-column-filter>\r\n }\r\n @case (filterTypes.numeric) {\r\n <smz-column-filter type=\"numeric\" [field]=\"col.filterField\"></smz-column-filter>\r\n }\r\n @case (filterTypes.date) {\r\n <smz-column-filter type=\"date\" [field]=\"col.filterField\" [showTime]=\"col.filter.showTime\"></smz-column-filter>\r\n }\r\n @case (filterTypes.text) {\r\n <smz-column-filter type=\"text\" [field]=\"col.filterField\"></smz-column-filter>\r\n }\r\n @case (filterTypes.boolean) {\r\n <smz-column-filter type=\"boolean\" [field]=\"col.filterField\"></smz-column-filter>\r\n }\r\n @case (filterTypes.dropdown) {\r\n @if (col.filterField | filterObject; as filterField) {\r\n <smz-column-filter [field]=\"filterField + '.id'\" matchMode=\"dropdown\" [showMatchModes]=\"false\" [showOperator]=\"false\" [showAddButton]=\"false\">\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"px-3 pt-3 pb-0\">\r\n <span class=\"p-text-bold\">{{ col.header }}</span>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"filter\" let-value let-filter=\"filter\">\r\n <p-select appendTo=\"body\" [ngModel]=\"value\" [options]=\"(clonedData.items != null ? clonedData.items : []) | uniqueFilter : filterField + '.id' : filterField : null : 'name' : false\" [placeholder]=\"context.state.locale.dropdownFilter.placeholder\" (onChange)=\"filter($event.value)\" optionLabel=\"name\" dataKey=\"id\"></p-select>\r\n </ng-template>\r\n </smz-column-filter>\r\n }\r\n }\r\n @case (filterTypes.multiselect) {\r\n @if (col.filterField | filterObject; as filterField) {\r\n <smz-column-filter [field]=\"filterField\" matchMode=\"in\" [showMatchModes]=\"false\" [showOperator]=\"false\" [showAddButton]=\"false\">\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"px-3 pt-3 pb-0\">\r\n <span class=\"p-text-bold\">{{ col.header }}</span>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"filter\" let-value let-filter=\"filter\">\r\n <p-multiSelect [ngModel]=\"value\" [options]=\"(clonedData.items != null ? clonedData.items : []) | uniqueFilter : filterField + '.id' : filterField : null : 'name' : false\" [placeholder]=\"context.state.locale.dropdownFilter.placeholder\" (onChange)=\"filter($event.value)\" optionLabel=\"name\" dataKey=\"id\"></p-multiSelect>\r\n </ng-template>\r\n </smz-column-filter>\r\n }\r\n }\r\n @case (filterTypes.multiselect_array) {\r\n @if (col.filterField | filterObject; as filterField) {\r\n <smz-column-filter [field]=\"filterField\" matchMode=\"array-some\" [showMatchModes]=\"false\" [showOperator]=\"false\" [showAddButton]=\"false\">\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"px-3 pt-3 pb-0\">\r\n <span class=\"p-text-bold\">{{ col.header }}</span>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"filter\" let-value let-filter=\"filter\">\r\n <p-multiSelect [ngModel]=\"value\" [options]=\"(clonedData.items != null ? clonedData.items : []) | uniqueFilter : filterField + '.id' : filterField : null : 'name' : true\" [placeholder]=\"context.state.locale.dropdownFilter.placeholder\" (onChange)=\"filter($event.value)\" optionLabel=\"name\" dataKey=\"id\" [maxSelectedLabels]=\"2\" [selectedItemsLabel]=\"'{0}'\"></p-multiSelect>\r\n </ng-template>\r\n </smz-column-filter>\r\n }\r\n }\r\n @case (filterTypes.multiselect_string) {\r\n @if (col.filterField | filterObject; as filterField) {\r\n <smz-column-filter [field]=\"filterField\" matchMode=\"multiselectByString\" [showMatchModes]=\"false\" [showOperator]=\"false\" [showAddButton]=\"false\">\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"px-3 pt-3 pb-0\">\r\n <span class=\"p-text-bold\">{{ col.header }}</span>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"filter\" let-value let-filter=\"filter\">\r\n <p-multiSelect [ngModel]=\"value\" [options]=\"(clonedData.items != null ? clonedData.items : []) | uniqueFilter : filterField : filterField : null : true : false : false\" [placeholder]=\"context.state.locale.dropdownFilter.placeholder\" (onChange)=\"filter($event.value)\" [maxSelectedLabels]=\"2\" [selectedItemsLabel]=\"'{0}'\"></p-multiSelect>\r\n </ng-template>\r\n </smz-column-filter>\r\n }\r\n }\r\n }\r\n }\r\n @if (context.state.caption.columnVisibility.showColumnHideButton) {\r\n <button pButton type=\"button\" icon=\"fa-solid fa-eye-slash\" class=\"p-button-rounded p-button-text p-button-plain\" (click)=\"hideColumn(col, context)\"></button>\r\n }\r\n </div>\r\n </ng-template>\r\n }\r\n @if (context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible|| context.state.editable.isEditable) {\r\n <th [ngStyle]=\"context.state.editable.isEditable ? context.state.editable.ngStyle : context.state.actions.customActions.ngStyle\"></th>\r\n }\r\n </tr>\r\n @if (context.state.actions.batchActions.isVisible) {\r\n <tr>\r\n <th [attr.colspan]=\"columns.length + ((context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible || context.state.editable.isEditable) ? 1 : 0) + (context.state.caption.rowSelection.isEnabled ? 1 : 0) + (context.state.rowExpansion.isEnabled ? 1 : 0)\"\r\n [ngStyle]=\"context.state.actions.customActions.ngStyle\" class=\"px-0\">\r\n <div class=\"grid grid-nogutter items-center justify-start\">\r\n <p-tableHeaderCheckbox class=\"mr-4\"></p-tableHeaderCheckbox>\r\n @if (selectedItems?.length > 0) {\r\n @for (batchItem of context.state.actions.batchActions.items; track batchItem.label) {\r\n @if (batchItem.visible) {\r\n <button pButton [label]=\"batchItem.label\" class=\"p-button-rounded p-button-text p-button-plain animate__animated animate__fadeIn\" [ngClass]=\"batchItem.styleClass\" [icon]=\"batchItem.icon\" (click)=\"batchItem.command(selectedItems); selectedItems = [];\" [disabled]=\"batchItem.disabled\" [pTooltip]=\"batchItem.tooltip\"></button>\r\n }\r\n }\r\n }\r\n </div>\r\n </th>\r\n </tr>\r\n }\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-item let-editing=\"editing\" let-rowIndex=\"rowIndex\" let-columns=\"columns\">\r\n <tr #editableRowElement\r\n [pEditableRow]=\"item\"\r\n tableItemAction\r\n [isClickable]=\"context.state.actions.rowBehavior.isClickable\"\r\n [callback]=\"context.state.actions.rowBehavior.clickCallback\"\r\n [expandRowOnClick]=\"context.state.actions.rowBehavior.expandRowOnClick\"\r\n [item]=\"item\"\r\n class=\"p-selectable-row\"\r\n [attr.data-testid]=\"buildRowTestId(item, rowIndex)\"\r\n [ngClass]=\"{ 'highlight-row': item?.id === state.actions.rowBehavior.highlights, 'preserve-in-small': state.actions.rowBehavior.preserveLayoutInSmallDevices }\"\r\n >\r\n @if (context.state.caption.rowSelection.isEnabled && !clonedData.showSkeleton) {\r\n <td\r\n clickStopPropagation\r\n class=\"{{ state.actions.rowBehavior.cellStyleClass }}\"\r\n [ngClass]=\"{ 'opacity-50 pointer-events-none': editableService.context[item.id]?.hasErrors || editableService.context[item.id]?.isLoading }\"\r\n [ngStyle]=\"context.state.caption.rowSelection.ngStyle\"\r\n >\r\n <p-tableCheckbox [value]=\"item\"></p-tableCheckbox>\r\n </td>\r\n }\r\n @if (context.state.rowExpansion.isEnabled && !clonedData.showSkeleton) {\r\n <td\r\n clickStopPropagation\r\n class=\"{{ state.actions.rowBehavior.cellStyleClass }}\"\r\n [ngClass]=\"{ 'opacity-50 pointer-events-none': editableService.context[item.id]?.hasErrors || editableService.context[item.id]?.isLoading, 'grid grid-nogutter justify-start items-center gap-2': context.state.rowExpansion.highlightNewItems && item._isNew }\"\r\n [ngStyle]=\"context.state.rowExpansion.ngStyle\"\r\n >\r\n <button\r\n pButton\r\n type=\"button\"\r\n class=\"p-button-text p-button-rounded p-button-sm smz-table-row-expansion-toggle\"\r\n [icon]=\"item._isExpanded ? 'fa-solid fa-chevron-down' : 'fa-solid fa-chevron-right'\"\r\n (click)=\"item._isExpanded = !item._isExpanded; item._isNew = false\"\r\n ></button>\r\n @if (context.state.rowExpansion.highlightNewItems && item._isNew) {\r\n <div class=\"rounded bg-cyan-400 text-sm text-white px-2 py-0 smz-table-new-tag\" (click)=\"item._isNew = false\">{{ context.state.rowExpansion.highlightLabel }}</div>\r\n }\r\n </td>\r\n }\r\n @for (col of columns; track col.field) {\r\n @if (clonedData.showSkeleton) {\r\n <td class=\"{{ state.actions.rowBehavior.cellStyleClass }}\" [ngStyle]=\"col.content.ngStyle\"><p-skeleton width=\"100%\" height=\"1rem\"></p-skeleton></td>\r\n } @else {\r\n <td class=\"{{ state.actions.rowBehavior.cellStyleClass }}\" [attr.data-testid]=\"buildCellTestId(item, rowIndex, col.field)\" [ngClass]=\"{ 'opacity-50 pointer-events-none': editableService.context[item.id]?.hasErrors || editableService.context[item.id]?.isLoading }\" [ngStyle]=\"col.content.ngStyle\">\r\n <span class=\"p-column-title\">{{ col.header }}</span>\r\n <p-cellEditor>\r\n <!-- CELULAR COM EDITOR -->\r\n <ng-template pTemplate=\"input\">\r\n @switch (col.editable.type) {\r\n @case (editableTypes.none) {\r\n <smz-table-content class=\"cursor-default\" [ngClass]=\"col.content.contentStyleClass\" [col]=\"col\" [contentTypes]=\"contentTypes\" [item]=\"item\" [rowIndex]=\"rowIndex\" [contentTemplate]=\"contentTemplate\"></smz-table-content>\r\n }\r\n @case (editableTypes.custom) {\r\n <ng-container *ngTemplateOutlet=\"editableTemplate; context: { $implicit: item, col: col }\"></ng-container>\r\n }\r\n <!-- INPUT TEXT -->\r\n @case (editableTypes.text) {\r\n @if (editableService.context[item.id]?.form; as form) {\r\n @if (form.controls[col.editable.property]; as control) {\r\n <div class=\"relative w-full\">\r\n <input pInputText type=\"text\" [formControl]=\"$any(control)\" style=\"width: 100%;\">\r\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\r\n </div>\r\n }\r\n }\r\n }\r\n <!-- INPUT NUMBER -->\r\n @case (editableTypes.number) {\r\n @if (editableService.context[item.id]?.form; as form) {\r\n @if (form.controls[col.editable.property]; as control) {\r\n <div class=\"relative w-full\">\r\n <p-inputNumber\r\n *ngVar=\"col.editable.data as numberData\"\r\n [formControl]=\"$any(control)\"\r\n [mode]=\"numberData.mode\"\r\n [minFractionDigits]=\"numberData.minFractionDigits\"\r\n [maxFractionDigits]=\"numberData.maxFractionDigits\"\r\n [currency]=\"numberData.currency\"\r\n [useGrouping]=\"numberData.useGrouping\"\r\n [allowEmpty]=\"numberData.allowEmpty\"\r\n [showClear]=\"numberData.showClear\"\r\n [showButtons]=\"numberData.showButtons\"\r\n [prefix]=\"numberData.prefix\"\r\n [suffix]=\"numberData.suffix\">\r\n </p-inputNumber>\r\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\r\n </div>\r\n }\r\n }\r\n }\r\n <!-- INPUT SWITCH -->\r\n @case (editableTypes.switch) {\r\n @if (editableService.context[item.id]?.form; as form) {\r\n @if (form.controls[col.editable.property]; as control) {\r\n <div class=\"relative w-full\">\r\n <p-toggleswitch [formControl]=\"$any(control)\"></p-toggleswitch>\r\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\r\n </div>\r\n }\r\n }\r\n }\r\n <!-- INPUT TEXT AREA -->\r\n @case (editableTypes.area) {\r\n @if (editableService.context[item.id]?.form; as form) {\r\n @if (form.controls[col.editable.property]; as control) {\r\n <div class=\"relative w-full\">\r\n <textarea pInputTextarea type=\"text\" [formControl]=\"$any(control)\" [rows]=\"$any(col.editable.data).rows\" required style=\"width: 100%;\"></textarea>\r\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\r\n </div>\r\n }\r\n }\r\n }\r\n <!-- INPUT DROPDOWN -->\r\n @case (editableTypes.dropdown) {\r\n @if (editableService.context[item.id]?.form; as form) {\r\n @if (form.controls[col.editable.property]; as control) {\r\n <div class=\"relative w-full\">\r\n <p-select appendTo=\"body\" [formControl]=\"$any(control)\" styleClass=\"w-full\" [options]=\"col.editable.data | editableSource\" optionLabel=\"name\" dataKey=\"id\" [placeholder]=\"$any(col.editable.data).placeholder\" [showClear]=\"!col.editable.validatorsPreset?.isRequired\" [filter]=\"true\"></p-select>\r\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\r\n </div>\r\n }\r\n }\r\n }\r\n <!-- INPUT CALENDAR -->\r\n @case (editableTypes.calendar) {\r\n @if (editableService.context[item.id]?.form; as form) {\r\n @if (form.controls[col.editable.property]; as control) {\r\n <div class=\"relative w-full\">\r\n <p-datepicker [formControl]=\"$any(control)\" appendTo=\"body\" styleClass=\"w-full\" [ngClass]=\"{ 'pl-5': !control.valid }\"></p-datepicker>\r\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\r\n </div>\r\n }\r\n }\r\n }\r\n }\r\n </ng-template>\r\n <!-- CELULAR COM CONTE\u00DADO -->\r\n <ng-template pTemplate=\"output\">\r\n <smz-table-content\r\n [col]=\"col\"\r\n [pTooltip]=\"col.content.tooltip != null ? col.content.tooltip(item) : null\"\r\n tooltipPosition=\"left\"\r\n [ngClass]=\"col.content.contentStyleClass\" [contentTypes]=\"contentTypes\" [item]=\"item\" [rowIndex]=\"rowIndex\" [contentTemplate]=\"contentTemplate\">\r\n </smz-table-content>\r\n </ng-template>\r\n </p-cellEditor>\r\n </td>\r\n }\r\n }\r\n @if (context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible || context.state.editable.isEditable) {\r\n <td [ngStyle]=\"context.state.actions.customActions.ngStyle\" class=\"px-0\">\r\n <div class=\"grid grid-nogutter items-center justify-center\">\r\n @if (clonedData.showSkeleton) {\r\n <div class=\"w-full\">\r\n <p-skeleton width=\"100%\" height=\"1rem\"></p-skeleton>\r\n </div>\r\n } @else {\r\n <!-- SEM EDITAR -->\r\n @if (!editing) {\r\n @if (context.state.editable.update.isButtonVisible) {\r\n <button pButton type=\"button\" icon=\"pi pi-pencil\" (click)=\"editableService.onRowEditInit(item)\" class=\"p-button-rounded p-button-text mx-1\" [disabled]=\"editableService.isEditing || editableService.isCreating || context.state.editable.update.isButtonDisabled || (!context.state.editable.update.condition(item))\" pInitEditableRow></button>\r\n }\r\n @if (context.state.editable.remove.isButtonVisible) {\r\n <button pButton type=\"button\" icon=\"pi pi-trash\" (click)=\"editableService.onRowRemove($event, table, item)\" class=\"p-button-rounded p-button-text p-button-secondary mx-1\" [disabled]=\"editableService.isEditing || editableService.isCreating || context.state.editable.remove.isButtonDisabled || (!context.state.editable.remove.condition(item))\"></button>\r\n }\r\n }\r\n <!-- EDITANDO -->\r\n @if (editing) {\r\n @if (editableService.context[item.id]; as editableContext) {\r\n <!-- COM LOADING -->\r\n @if (editableContext.isLoading) {\r\n <button pButton type=\"button\" icon=\"fa-solid fa-rotate fa-spin\" [disabled]=\"true\" class=\"p-button-rounded p-button-text p-button-info mr-2\"></button>\r\n }\r\n <!-- SEM LOADING -->\r\n @if (!editableContext.isLoading) {\r\n <!-- EDITANDO -->\r\n @if (!editableContext.hasErrors) {\r\n <!-- CRIANDO -->\r\n @if (item._context?.isCreating) {\r\n <button pButton type=\"button\" icon=\"pi pi-check\" (click)=\"editableService.onRowCreateSave($event, table, editableRowElement, item)\" [disabled]=\"!editableContext.hasChanged || !editableService.context[item.id]?.form.valid\" class=\"p-button-rounded p-button-text p-button-success mr-2\"></button>\r\n <button pButton type=\"button\" icon=\"pi pi-times\" (click)=\"editableService.onRowCreateCancel($event, table, item)\" class=\"p-button-rounded p-button-text p-button-danger\"></button>\r\n }\r\n <!-- ATUALIZANDO -->\r\n @if (item._context?.isUpdating) {\r\n <button pButton type=\"button\" icon=\"pi pi-check\" (click)=\"editableService.onRowEditSave($event, table, editableRowElement, item)\" [disabled]=\"!editableContext.hasChanged || !editableService.context[item.id]?.form.valid\" class=\"p-button-rounded p-button-text p-button-success mr-2\"></button>\r\n <button pButton type=\"button\" icon=\"pi pi-times\" (click)=\"editableService.onRowEditCancel($event, table, item)\" class=\"p-button-rounded p-button-text p-button-danger\"></button>\r\n }\r\n }\r\n <!-- COM ERRORS -->\r\n @if (editableContext.hasErrors) {\r\n <p-popover #errorsOverlay appendTo=\"body\" [style]=\"{ width: '450px' }\">\r\n <div [innerHtml]=\"editableContext.errors | contentErrors\"></div>\r\n </p-popover>\r\n <button pButton type=\"button\" icon=\"fas fa-exclamation-triangle\" [disabled]=\"false\" class=\"p-button-sm p-button-rounded p-button-text p-button-danger mr-2\" (click)=\"errorsOverlay.toggle($event)\"></button>\r\n <!-- CRIANDO -->\r\n @if (item._context?.isCreating) {\r\n <button pButton type=\"button\" icon=\"pi pi-times\" (click)=\"editableService.onRowCreateCancel($event, table, item)\" class=\"p-button-sm p-button-rounded p-button-text p-button-danger\"></button>\r\n }\r\n <!-- ATUALIZANDO -->\r\n @if (item._context?.isUpdating) {\r\n <button pButton type=\"button\" icon=\"pi pi-times\" (click)=\"editableService.onRowEditCancel($event, table, item)\" class=\"p-button-sm p-button-rounded p-button-text p-button-danger\"></button>\r\n }\r\n }\r\n }\r\n }\r\n }\r\n <!-- CUSTOM MENU -->\r\n @if (context.state.actions.customActions.isVisible && !editing) {\r\n <ng-container *ngTemplateOutlet=\"actionsTemplate; context: { $implicit: item }\"></ng-container>\r\n }\r\n <!-- MENU -->\r\n @if (context.state.actions.menu.isVisible && !editing) {\r\n <smz-menu [callback]=\"context.state.actions.menu.callback\" [items]=\"context.state.actions.menu.items\" [data]=\"item\" [behavior]=\"context.state.actions.menu.behavior\" [ngClass]=\"{ 'ml-2': context.state.actions.customActions.isVisible }\" [icon]=\"context.state.actions.menu.styles.icon\" [styleClass]=\"context.state.actions.menu.styles.styleClass\" [buttonClass]=\"context.state.actions.menu.styles.buttonClass\" [testId]=\"buildRowMenuTestId(item, rowIndex)\"></smz-menu>\r\n }\r\n }\r\n </div>\r\n </td>\r\n }\r\n </tr>\r\n @if (item?._isExpanded) {\r\n <tr>\r\n <td [attr.colspan]=\"columns.length + ((context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible || context.state.editable.isEditable) ? 1 : 0) + (context.state.caption.rowSelection.isEnabled ? 1 : 0) + (context.state.rowExpansion.isEnabled ? 1 : 0)\">\r\n <ng-container *ngTemplateOutlet=\"rowContentTemplate; context: { $implicit: item }\"></ng-container>\r\n </td>\r\n </tr>\r\n }\r\n </ng-template>\r\n <ng-template pTemplate=\"emptymessage\" let-columns>\r\n <tr>\r\n <td [attr.colspan]=\"columns.length + ((context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible || context.state.editable.isEditable) ? 1 : 0) + (context.state.caption.rowSelection.isEnabled ? 1 : 0) + (context.state.rowExpansion.isEnabled ? 1 : 0)\" [ngStyle]=\"{ 'text-align': 'center' }\">\r\n <div [innerHtml]=\"context.state.emptyFeedback.message\"></div>\r\n @if (context.state.caption.clearFilters.isButtonVisible && hasFilters()) {\r\n <button pButton [label]=\"context.state.locale.clearFilters.label\" class=\"p-button-outlined mt-3\" icon=\"pi pi-filter-slash\" (click)=\"clear(table, context)\"></button>\r\n }\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n }\r\n </ng-container>\r\n </ng-container>\r\n }\r\n} @else {\r\n @if (emptyStateTemplate != null) {\r\n <ng-container *ngTemplateOutlet=\"emptyStateTemplate; context: { $implicit: {} }\"></ng-container>\r\n }\r\n}\r\n\r\n" }]
|
|
17595
|
+
args: [{ selector: 'smz-ui-table', changeDetection: ChangeDetectionStrategy.OnPush, providers: [TableEditableService, TableFormsService], standalone: false, template: "@if (state | tableContext; as context) {\r\n @if ((context.state.emptyFeedback != null && (context.state.emptyFeedback.extraInfo || context.state.emptyFeedback.image || context.state.emptyFeedback.actionButtons)) && (items != null && items.length === 0) && context.state.emptyFeedback.isFeatured) {\r\n <smz-data-info\r\n [attr.data-testid]=\"buildTableTestId('empty')\"\r\n [image]=\"context.state.emptyFeedback.image\"\r\n [message]=\"context.state.emptyFeedback.message\"\r\n [callbackInfo]=\"context.state.emptyFeedback.extraInfo\"\r\n [actions]=\"context.state.emptyFeedback.actionButtons\">\r\n <ng-template pTemplate=\"actions\">\r\n <ng-container *ngTemplateOutlet=\"emptyActionsTemplate; context: { $implicit: {} }\"></ng-container>\r\n </ng-template>\r\n </smz-data-info>\r\n } @else {\r\n <ng-container *ngVar=\"state.source?.items$ != null ? (state.source.items$ | async) : null as observableSource\">\r\n <ng-container *ngVar=\"state.source?.signalItems != null ? state.source.signalItems() : null as signalSource\">\r\n @if (((observableSource ?? signalSource ?? items) | cloneTableItems : context: tableKey: context.state.rowExpansion.sincronize); as clonedData) {\r\n <p-table #dt\r\n dataKey=\"id\"\r\n editMode=\"row\"\r\n [stripedRows]=\"context.state.styles.striped\"\r\n [value]=\"clonedData.items\"\r\n [(selection)]=\"selectedItems\"\r\n [tableStyleClass]=\"context.state.styles.tableStyleClass\"\r\n [size]=\"context.state.styles.size === 'extra-small' ? 'small' : context.state.styles.size === 'small' ? 'small' : context.state.styles.size === 'large' ? 'large' : undefined\"\r\n [class]=\"'p-datatable-smz-ui-table' + (context.state.styles.showGrid ? ' p-datatable-gridlines' : '') + (context.state.styles.size === 'extra-small' ? ' p-datatable-xs' : '') + (context.state.styles.size === 'small' ? ' p-datatable-sm' : '') + (context.state.styles.size === 'large' ? ' p-datatable-lg' : '')\"\r\n [rowHover]=\"context.state.actions.rowBehavior.hoverable\"\r\n [rows]=\"context.state.pagination.rows\"\r\n [first]=\"context.state.pagination.state.first\"\r\n [showCurrentPageReport]=\"context.state.pagination.pageReport.isVisible\"\r\n [rowsPerPageOptions]=\"context.state.pagination.rowsPerPageOptions\"\r\n [loading]=\"loading || isViewportInitializing\"\r\n [style.visibility]=\"isViewportInitializing ? 'hidden' : null\"\r\n [paginator]=\"context.state.pagination.isVisible\"\r\n paginatorDropdownAppendTo=\"body\"\r\n [currentPageReportTemplate]=\"context.state.locale.paginator.template\"\r\n [sortField]=\"context.state.sort.field\"\r\n [sortMode]=\"context.state.sort.mode\"\r\n [sortOrder]=\"context.state.sort.order\"\r\n [multiSortMeta]=\"context.state.sort.multiSortMeta\"\r\n [scrollable]=\"context.state.viewport.scrollable\"\r\n [scrollHeight]=\"context.state.viewport.scrollHeight\"\r\n [filterDelay]=\"0\"\r\n [globalFilterFields]=\"context.globalFilter\"\r\n [columns]=\"context.visibleColumns\"\r\n [frozenColumns]=\"context.frozenColumns\"\r\n [frozenWidth]=\"context.state.frozen.isEnabled ? context.state.frozen.width : null\"\r\n [resizableColumns]=\"context.state.viewport.resizableColumns\"\r\n [columnResizeMode]=\"context.state.viewport.columnResizeMode\"\r\n (onPage)=\"onPage($event)\"\r\n (onFilter)=\"onFilter($event)\"\r\n (selectionChange)=\"emitSelection($event)\"\r\n >\r\n @if (context.state.caption.isVisible) {\r\n <ng-template pTemplate=\"caption\">\r\n <div class=\"grid grid-nogutter items-center gap-2\" [attr.data-testid]=\"buildTableTestId('caption')\" [ngClass]=\"'justify-' + context.state.caption.toolbarAlignment\">\r\n @if (context.state.caption.title != null) {\r\n <div class=\"col database-title\" [attr.data-testid]=\"buildTableTestId('title')\" [innerHTML]=\"context.state.caption.title\"></div>\r\n }\r\n <ng-container *ngTemplateOutlet=\"captionTemplate; context: { $implicit: dt }\"></ng-container>\r\n <smz-table-caption-buttons [buttons]=\"context.state.caption.buttons\" [tableTestId]=\"state.tableTestId\"></smz-table-caption-buttons>\r\n @if (context.state.caption.exportToPdf.isButtonVisible) {\r\n <button pButton [attr.data-testid]=\"buildTableTestId('export-pdf')\" [label]=\"context.state.locale.exportToPdf.label\" class=\"p-button-outlined\" icon=\"fa-solid fa-file-pdf\" (click)=\"exportToPdf(context, clonedData.items)\" [disabled]=\"clonedData.showSkeleton\"></button>\r\n }\r\n @if (context.state.caption.exportToExcel.isButtonVisible) {\r\n <button pButton [attr.data-testid]=\"buildTableTestId('export-excel')\" [label]=\"context.state.locale.exportToExcel.label\" class=\"p-button-outlined\" icon=\"fa-solid fa-file-excel\" (click)=\"exportToExcel(table, context, clonedData.items)\" [disabled]=\"clonedData.showSkeleton\"></button>\r\n }\r\n @if (context.state.editable.creation.isButtonVisible) {\r\n <button pButton [attr.data-testid]=\"buildTableTestId('create')\" [label]=\"context.state.editable.creation.buttonLabel\" class=\"p-button-outlined\" icon=\"fa-solid fa-plus\" (click)=\"editableService.onRowCreateInit(table, context.columns)\" [disabled]=\"clonedData.showSkeleton || editableService.isEditing || editableService.isCreating || context.state.editable.creation.isButtonDisabled\"></button>\r\n }\r\n @if (context.state.caption.rowSelection.isButtonVisible) {\r\n <button pButton [attr.data-testid]=\"buildTableTestId('row-selection')\" [label]=\"context.state.locale.rowSelection.label\" class=\"p-button-outlined\" icon=\"fa-solid fa-check-double\" (click)=\"onRowSelection(context)\" [disabled]=\"clonedData.showSkeleton\"></button>\r\n }\r\n @if (context.state.rowExpansion.isButtonVisible) {\r\n <button pButton [attr.data-testid]=\"buildTableTestId('row-expansion')\" [label]=\"context.state.rowExpansion.label\" class=\"p-button-outlined\" icon=\"fa-solid fa-list\" (click)=\"onRowExpansion(context)\" [disabled]=\"clonedData.showSkeleton\"></button>\r\n }\r\n @if (context.state.caption.clearFilters.isButtonVisible) {\r\n <button pButton [attr.data-testid]=\"buildTableTestId('clear-filters')\" [label]=\"context.state.locale.clearFilters.label\" class=\"p-button-outlined\" icon=\"pi pi-filter-slash\" (click)=\"clear(table, context)\" [disabled]=\"clonedData.showSkeleton\"></button>\r\n }\r\n @if (context.state.caption.columnVisibility.showDropdownSelector) {\r\n <p-multiSelect\r\n #columnMultiselect\r\n [attr.data-testid]=\"buildTableTestId('column-visibility')\"\r\n class=\"ml-2 col-12 md:col-2\"\r\n styleClass=\"w-full\"\r\n appendTo=\"body\"\r\n [options]=\"context.hideableColumns\"\r\n [(ngModel)]=\"selectedColumns\"\r\n [placeholder]=\"context.state.locale.columnVisibility.placeholder\"\r\n [selectedItemsLabel]=\"context.state.locale.columnVisibility.selectedItemsLabel\"\r\n optionLabel=\"name\"\r\n dataKey=\"field\"\r\n optionLabel=\"header\"\r\n [filter]=\"true\"\r\n (onPanelHide)=\"updateColumnsVisibility(true)\"\r\n [pTooltip]=\"context.state.locale.columnVisibility.pTooltip\">\r\n </p-multiSelect>\r\n }\r\n @if (context.state.caption.globalFilter.isVisible) {\r\n <p-iconfield class=\"col-12\" [ngClass]=\"{ 'md:col-2': !context.state.caption.globalFilter.expanded }\">\r\n <p-inputicon styleClass=\"pi pi-search\" />\r\n <input #inputGlobal [(ngModel)]=\"globalSearchInput\" pInputText type=\"text\" styleClass=\"database-global-search\" (input)=\"updateGlobalFilter(inputGlobal.value)\" [disabled]=\"clonedData.showSkeleton\" [placeholder]=\"context.state.locale.globalFilter.placeholder\" [attr.data-testid]=\"buildTableTestId('search')\" />\r\n </p-iconfield>\r\n }\r\n </div>\r\n @if (toolbarTemplate != null) {\r\n <div class=\"grid grid-nogutter items-center mt-2\" [ngClass]=\"'justify-' + context.state.caption.toolbarAlignment\">\r\n <ng-container *ngTemplateOutlet=\"toolbarTemplate; context: { $implicit: dt }\"></ng-container>\r\n </div>\r\n }\r\n </ng-template>\r\n }\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr [ngClass]=\"{ 'invisible-header': !context.state.header.isVisible }\">\r\n @if (context.state.caption.rowSelection.isEnabled) {\r\n <th [ngStyle]=\"context.state.caption.rowSelection.ngStyle\">\r\n @if (!context.state.actions.batchActions.isVisible) {\r\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\r\n }\r\n </th>\r\n }\r\n @if (context.state.rowExpansion.isEnabled) {\r\n <th [ngStyle]=\"context.state.rowExpansion.ngStyle\"></th>\r\n }\r\n @for (col of columns; track col.field) {\r\n @if (context.state.viewport.resizableColumns) {\r\n @if (col.isOrderable) {\r\n <th [pSortableColumn]=\"col.sortField\" pResizableColumn [attr.data-testid]=\"buildColumnTestId(col.field)\" [ngStyle]=\"col.content.ngStyle\" [ngClass]=\"col.headerStyleClass\">\r\n <ng-container *ngTemplateOutlet=\"headerContent\"></ng-container>\r\n </th>\r\n }\r\n @if (!col.isOrderable) {\r\n <th pResizableColumn [attr.data-testid]=\"buildColumnTestId(col.field)\" [ngStyle]=\"col.content.ngStyle\" [ngClass]=\"col.headerStyleClass\">\r\n <ng-container *ngTemplateOutlet=\"headerContent\"></ng-container>\r\n </th>\r\n }\r\n } @else {\r\n @if (col.isOrderable) {\r\n <th [pSortableColumn]=\"col.sortField\" [attr.data-testid]=\"buildColumnTestId(col.field)\" [ngStyle]=\"col.content.ngStyle\" [ngClass]=\"col.headerStyleClass\">\r\n <ng-container *ngTemplateOutlet=\"headerContent\"></ng-container>\r\n </th>\r\n }\r\n @if (!col.isOrderable) {\r\n <th [attr.data-testid]=\"buildColumnTestId(col.field)\" [ngStyle]=\"col.content.ngStyle\" [ngClass]=\"col.headerStyleClass\">\r\n <ng-container *ngTemplateOutlet=\"headerContent\"></ng-container>\r\n </th>\r\n }\r\n }\r\n <ng-template #headerContent>\r\n <div class=\"flex justify-start items-center\">\r\n <span class=\"mr-1\">{{ col.header }}</span>\r\n @if (col.showHeaderActions) {\r\n <smz-table-header-actions clickStopPropagation class=\"ml-1 mt-1\" [col]=\"col\"></smz-table-header-actions>\r\n }\r\n @if (!clonedData.showSkeleton && col.isOrderable) {\r\n <p-sortIcon [field]=\"col.sortField\"></p-sortIcon>\r\n }\r\n @if (!clonedData.showSkeleton) {\r\n @switch (col.filter.type) {\r\n @case (filterTypes.currency) {\r\n <smz-column-filter type=\"numeric\" currency=\"BRL\" [field]=\"col.filterField\"></smz-column-filter>\r\n }\r\n @case (filterTypes.numeric) {\r\n <smz-column-filter type=\"numeric\" [field]=\"col.filterField\"></smz-column-filter>\r\n }\r\n @case (filterTypes.date) {\r\n <smz-column-filter type=\"date\" [field]=\"col.filterField\" [showTime]=\"col.filter.showTime\"></smz-column-filter>\r\n }\r\n @case (filterTypes.text) {\r\n <smz-column-filter type=\"text\" [field]=\"col.filterField\"></smz-column-filter>\r\n }\r\n @case (filterTypes.boolean) {\r\n <smz-column-filter type=\"boolean\" [field]=\"col.filterField\"></smz-column-filter>\r\n }\r\n @case (filterTypes.dropdown) {\r\n @if (col.filterField | filterObject; as filterField) {\r\n <smz-column-filter [field]=\"filterField + '.id'\" matchMode=\"dropdown\" [showMatchModes]=\"false\" [showOperator]=\"false\" [showAddButton]=\"false\">\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"px-3 pt-3 pb-0\">\r\n <span class=\"p-text-bold\">{{ col.header }}</span>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"filter\" let-value let-filter=\"filter\">\r\n <p-select appendTo=\"body\" [ngModel]=\"value\" [options]=\"(clonedData.items != null ? clonedData.items : []) | uniqueFilter : filterField + '.id' : filterField : null : 'name' : false\" [placeholder]=\"context.state.locale.dropdownFilter.placeholder\" (onChange)=\"filter($event.value)\" optionLabel=\"name\" dataKey=\"id\"></p-select>\r\n </ng-template>\r\n </smz-column-filter>\r\n }\r\n }\r\n @case (filterTypes.multiselect) {\r\n @if (col.filterField | filterObject; as filterField) {\r\n <smz-column-filter [field]=\"filterField\" matchMode=\"in\" [showMatchModes]=\"false\" [showOperator]=\"false\" [showAddButton]=\"false\">\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"px-3 pt-3 pb-0\">\r\n <span class=\"p-text-bold\">{{ col.header }}</span>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"filter\" let-value let-filter=\"filter\">\r\n <p-multiSelect [ngModel]=\"value\" [options]=\"(clonedData.items != null ? clonedData.items : []) | uniqueFilter : filterField + '.id' : filterField : null : 'name' : false\" [placeholder]=\"context.state.locale.dropdownFilter.placeholder\" (onChange)=\"filter($event.value)\" optionLabel=\"name\" dataKey=\"id\"></p-multiSelect>\r\n </ng-template>\r\n </smz-column-filter>\r\n }\r\n }\r\n @case (filterTypes.multiselect_array) {\r\n @if (col.filterField | filterObject; as filterField) {\r\n <smz-column-filter [field]=\"filterField\" matchMode=\"array-some\" [showMatchModes]=\"false\" [showOperator]=\"false\" [showAddButton]=\"false\">\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"px-3 pt-3 pb-0\">\r\n <span class=\"p-text-bold\">{{ col.header }}</span>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"filter\" let-value let-filter=\"filter\">\r\n <p-multiSelect [ngModel]=\"value\" [options]=\"(clonedData.items != null ? clonedData.items : []) | uniqueFilter : filterField + '.id' : filterField : null : 'name' : true\" [placeholder]=\"context.state.locale.dropdownFilter.placeholder\" (onChange)=\"filter($event.value)\" optionLabel=\"name\" dataKey=\"id\" [maxSelectedLabels]=\"2\" [selectedItemsLabel]=\"'{0}'\"></p-multiSelect>\r\n </ng-template>\r\n </smz-column-filter>\r\n }\r\n }\r\n @case (filterTypes.multiselect_string) {\r\n @if (col.filterField | filterObject; as filterField) {\r\n <smz-column-filter [field]=\"filterField\" matchMode=\"multiselectByString\" [showMatchModes]=\"false\" [showOperator]=\"false\" [showAddButton]=\"false\">\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"px-3 pt-3 pb-0\">\r\n <span class=\"p-text-bold\">{{ col.header }}</span>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"filter\" let-value let-filter=\"filter\">\r\n <p-multiSelect [ngModel]=\"value\" [options]=\"(clonedData.items != null ? clonedData.items : []) | uniqueFilter : filterField : filterField : null : true : false : false\" [placeholder]=\"context.state.locale.dropdownFilter.placeholder\" (onChange)=\"filter($event.value)\" [maxSelectedLabels]=\"2\" [selectedItemsLabel]=\"'{0}'\"></p-multiSelect>\r\n </ng-template>\r\n </smz-column-filter>\r\n }\r\n }\r\n }\r\n }\r\n @if (context.state.caption.columnVisibility.showColumnHideButton) {\r\n <button pButton type=\"button\" icon=\"fa-solid fa-eye-slash\" class=\"p-button-rounded p-button-text p-button-plain\" (click)=\"hideColumn(col, context)\"></button>\r\n }\r\n </div>\r\n </ng-template>\r\n }\r\n @if (context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible|| context.state.editable.isEditable) {\r\n <th [ngStyle]=\"context.state.editable.isEditable ? context.state.editable.ngStyle : context.state.actions.customActions.ngStyle\"></th>\r\n }\r\n </tr>\r\n @if (context.state.actions.batchActions.isVisible) {\r\n <tr>\r\n <th [attr.colspan]=\"columns.length + ((context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible || context.state.editable.isEditable) ? 1 : 0) + (context.state.caption.rowSelection.isEnabled ? 1 : 0) + (context.state.rowExpansion.isEnabled ? 1 : 0)\"\r\n [ngStyle]=\"context.state.actions.customActions.ngStyle\" class=\"px-0\">\r\n <div class=\"grid grid-nogutter items-center justify-start\">\r\n <p-tableHeaderCheckbox class=\"mr-4\"></p-tableHeaderCheckbox>\r\n @if (selectedItems?.length > 0) {\r\n @for (batchItem of context.state.actions.batchActions.items; track batchItem.label) {\r\n @if (batchItem.visible) {\r\n <button pButton [label]=\"batchItem.label\" class=\"p-button-rounded p-button-text p-button-plain animate__animated animate__fadeIn\" [ngClass]=\"batchItem.styleClass\" [icon]=\"batchItem.icon\" (click)=\"batchItem.command(selectedItems); selectedItems = [];\" [disabled]=\"batchItem.disabled\" [pTooltip]=\"batchItem.tooltip\"></button>\r\n }\r\n }\r\n }\r\n </div>\r\n </th>\r\n </tr>\r\n }\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-item let-editing=\"editing\" let-rowIndex=\"rowIndex\" let-columns=\"columns\">\r\n <tr #editableRowElement\r\n [pEditableRow]=\"item\"\r\n tableItemAction\r\n [isClickable]=\"context.state.actions.rowBehavior.isClickable\"\r\n [callback]=\"context.state.actions.rowBehavior.clickCallback\"\r\n [expandRowOnClick]=\"context.state.actions.rowBehavior.expandRowOnClick\"\r\n [item]=\"item\"\r\n class=\"p-selectable-row\"\r\n [attr.data-testid]=\"buildRowTestId(item, rowIndex)\"\r\n [ngClass]=\"{ 'highlight-row': item?.id === state.actions.rowBehavior.highlights, 'preserve-in-small': state.actions.rowBehavior.preserveLayoutInSmallDevices }\"\r\n >\r\n @if (context.state.caption.rowSelection.isEnabled && !clonedData.showSkeleton) {\r\n <td\r\n clickStopPropagation\r\n class=\"{{ state.actions.rowBehavior.cellStyleClass }}\"\r\n [ngClass]=\"{ 'opacity-50 pointer-events-none': editableService.context[item.id]?.hasErrors || editableService.context[item.id]?.isLoading }\"\r\n [ngStyle]=\"context.state.caption.rowSelection.ngStyle\"\r\n >\r\n <p-tableCheckbox [value]=\"item\"></p-tableCheckbox>\r\n </td>\r\n }\r\n @if (context.state.rowExpansion.isEnabled && !clonedData.showSkeleton) {\r\n <td\r\n clickStopPropagation\r\n class=\"{{ state.actions.rowBehavior.cellStyleClass }}\"\r\n [ngClass]=\"{ 'opacity-50 pointer-events-none': editableService.context[item.id]?.hasErrors || editableService.context[item.id]?.isLoading, 'grid grid-nogutter justify-start items-center gap-2': context.state.rowExpansion.highlightNewItems && item._isNew }\"\r\n [ngStyle]=\"context.state.rowExpansion.ngStyle\"\r\n >\r\n <button\r\n pButton\r\n type=\"button\"\r\n class=\"p-button-text p-button-rounded p-button-sm smz-table-row-expansion-toggle\"\r\n [icon]=\"item._isExpanded ? 'fa-solid fa-chevron-down' : 'fa-solid fa-chevron-right'\"\r\n (click)=\"item._isExpanded = !item._isExpanded; item._isNew = false\"\r\n ></button>\r\n @if (context.state.rowExpansion.highlightNewItems && item._isNew) {\r\n <div class=\"rounded bg-cyan-400 text-sm text-white px-2 py-0 smz-table-new-tag\" (click)=\"item._isNew = false\">{{ context.state.rowExpansion.highlightLabel }}</div>\r\n }\r\n </td>\r\n }\r\n @for (col of columns; track col.field) {\r\n @if (clonedData.showSkeleton) {\r\n <td class=\"{{ state.actions.rowBehavior.cellStyleClass }}\" [ngStyle]=\"col.content.ngStyle\"><p-skeleton width=\"100%\" height=\"1rem\"></p-skeleton></td>\r\n } @else {\r\n <td class=\"{{ state.actions.rowBehavior.cellStyleClass }}\" [attr.data-testid]=\"buildCellTestId(item, rowIndex, col.field)\" [ngClass]=\"{ 'opacity-50 pointer-events-none': editableService.context[item.id]?.hasErrors || editableService.context[item.id]?.isLoading }\" [ngStyle]=\"col.content.ngStyle\">\r\n <span class=\"p-column-title\">{{ col.header }}</span>\r\n <p-cellEditor>\r\n <!-- CELULAR COM EDITOR -->\r\n <ng-template pTemplate=\"input\">\r\n @switch (col.editable.type) {\r\n @case (editableTypes.none) {\r\n <smz-table-content class=\"cursor-default\" [ngClass]=\"col.content.contentStyleClass\" [col]=\"col\" [contentTypes]=\"contentTypes\" [item]=\"item\" [rowIndex]=\"rowIndex\" [contentTemplate]=\"contentTemplate\"></smz-table-content>\r\n }\r\n @case (editableTypes.custom) {\r\n <ng-container *ngTemplateOutlet=\"editableTemplate; context: { $implicit: item, col: col }\"></ng-container>\r\n }\r\n <!-- INPUT TEXT -->\r\n @case (editableTypes.text) {\r\n @if (editableService.context[item.id]?.form; as form) {\r\n @if (form.controls[col.editable.property]; as control) {\r\n <div class=\"relative w-full\">\r\n <input pInputText type=\"text\" [formControl]=\"$any(control)\" style=\"width: 100%;\">\r\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\r\n </div>\r\n }\r\n }\r\n }\r\n <!-- INPUT NUMBER -->\r\n @case (editableTypes.number) {\r\n @if (editableService.context[item.id]?.form; as form) {\r\n @if (form.controls[col.editable.property]; as control) {\r\n <div class=\"relative w-full\">\r\n <p-inputNumber\r\n *ngVar=\"col.editable.data as numberData\"\r\n [formControl]=\"$any(control)\"\r\n [mode]=\"numberData.mode\"\r\n [minFractionDigits]=\"numberData.minFractionDigits\"\r\n [maxFractionDigits]=\"numberData.maxFractionDigits\"\r\n [currency]=\"numberData.currency\"\r\n [useGrouping]=\"numberData.useGrouping\"\r\n [allowEmpty]=\"numberData.allowEmpty\"\r\n [showClear]=\"numberData.showClear\"\r\n [showButtons]=\"numberData.showButtons\"\r\n [prefix]=\"numberData.prefix\"\r\n [suffix]=\"numberData.suffix\">\r\n </p-inputNumber>\r\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\r\n </div>\r\n }\r\n }\r\n }\r\n <!-- INPUT SWITCH -->\r\n @case (editableTypes.switch) {\r\n @if (editableService.context[item.id]?.form; as form) {\r\n @if (form.controls[col.editable.property]; as control) {\r\n <div class=\"relative w-full\">\r\n <p-toggleswitch [formControl]=\"$any(control)\"></p-toggleswitch>\r\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\r\n </div>\r\n }\r\n }\r\n }\r\n <!-- INPUT TEXT AREA -->\r\n @case (editableTypes.area) {\r\n @if (editableService.context[item.id]?.form; as form) {\r\n @if (form.controls[col.editable.property]; as control) {\r\n <div class=\"relative w-full\">\r\n <textarea pInputTextarea type=\"text\" [formControl]=\"$any(control)\" [rows]=\"$any(col.editable.data).rows\" required style=\"width: 100%;\"></textarea>\r\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\r\n </div>\r\n }\r\n }\r\n }\r\n <!-- INPUT DROPDOWN -->\r\n @case (editableTypes.dropdown) {\r\n @if (editableService.context[item.id]?.form; as form) {\r\n @if (form.controls[col.editable.property]; as control) {\r\n <div class=\"relative w-full\">\r\n <p-select appendTo=\"body\" [formControl]=\"$any(control)\" styleClass=\"w-full\" [options]=\"col.editable.data | editableSource\" optionLabel=\"name\" dataKey=\"id\" [placeholder]=\"$any(col.editable.data).placeholder\" [showClear]=\"!col.editable.validatorsPreset?.isRequired\" [filter]=\"true\"></p-select>\r\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\r\n </div>\r\n }\r\n }\r\n }\r\n <!-- INPUT CALENDAR -->\r\n @case (editableTypes.calendar) {\r\n @if (editableService.context[item.id]?.form; as form) {\r\n @if (form.controls[col.editable.property]; as control) {\r\n <div class=\"relative w-full\">\r\n <p-datepicker [formControl]=\"$any(control)\" appendTo=\"body\" styleClass=\"w-full\" [ngClass]=\"{ 'pl-5': !control.valid }\"></p-datepicker>\r\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\r\n </div>\r\n }\r\n }\r\n }\r\n }\r\n </ng-template>\r\n <!-- CELULAR COM CONTE\u00DADO -->\r\n <ng-template pTemplate=\"output\">\r\n <smz-table-content\r\n [col]=\"col\"\r\n [pTooltip]=\"col.content.tooltip != null ? col.content.tooltip(item) : null\"\r\n tooltipPosition=\"left\"\r\n [ngClass]=\"col.content.contentStyleClass\" [contentTypes]=\"contentTypes\" [item]=\"item\" [rowIndex]=\"rowIndex\" [contentTemplate]=\"contentTemplate\">\r\n </smz-table-content>\r\n </ng-template>\r\n </p-cellEditor>\r\n </td>\r\n }\r\n }\r\n @if (context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible || context.state.editable.isEditable) {\r\n <td [ngStyle]=\"context.state.actions.customActions.ngStyle\" class=\"px-0\">\r\n <div class=\"grid grid-nogutter items-center justify-center\">\r\n @if (clonedData.showSkeleton) {\r\n <div class=\"w-full\">\r\n <p-skeleton width=\"100%\" height=\"1rem\"></p-skeleton>\r\n </div>\r\n } @else {\r\n <!-- SEM EDITAR -->\r\n @if (!editing) {\r\n @if (context.state.editable.update.isButtonVisible) {\r\n <button pButton type=\"button\" icon=\"pi pi-pencil\" (click)=\"editableService.onRowEditInit(item)\" class=\"p-button-rounded p-button-text mx-1\" [disabled]=\"editableService.isEditing || editableService.isCreating || context.state.editable.update.isButtonDisabled || (!context.state.editable.update.condition(item))\" pInitEditableRow></button>\r\n }\r\n @if (context.state.editable.remove.isButtonVisible) {\r\n <button pButton type=\"button\" icon=\"pi pi-trash\" (click)=\"editableService.onRowRemove($event, table, item)\" class=\"p-button-rounded p-button-text p-button-secondary mx-1\" [disabled]=\"editableService.isEditing || editableService.isCreating || context.state.editable.remove.isButtonDisabled || (!context.state.editable.remove.condition(item))\"></button>\r\n }\r\n }\r\n <!-- EDITANDO -->\r\n @if (editing) {\r\n @if (editableService.context[item.id]; as editableContext) {\r\n <!-- COM LOADING -->\r\n @if (editableContext.isLoading) {\r\n <button pButton type=\"button\" icon=\"fa-solid fa-rotate fa-spin\" [disabled]=\"true\" class=\"p-button-rounded p-button-text p-button-info mr-2\"></button>\r\n }\r\n <!-- SEM LOADING -->\r\n @if (!editableContext.isLoading) {\r\n <!-- EDITANDO -->\r\n @if (!editableContext.hasErrors) {\r\n <!-- CRIANDO -->\r\n @if (item._context?.isCreating) {\r\n <button pButton type=\"button\" icon=\"pi pi-check\" (click)=\"editableService.onRowCreateSave($event, table, editableRowElement, item)\" [disabled]=\"!editableContext.hasChanged || !editableService.context[item.id]?.form.valid\" class=\"p-button-rounded p-button-text p-button-success mr-2\"></button>\r\n <button pButton type=\"button\" icon=\"pi pi-times\" (click)=\"editableService.onRowCreateCancel($event, table, item)\" class=\"p-button-rounded p-button-text p-button-danger\"></button>\r\n }\r\n <!-- ATUALIZANDO -->\r\n @if (item._context?.isUpdating) {\r\n <button pButton type=\"button\" icon=\"pi pi-check\" (click)=\"editableService.onRowEditSave($event, table, editableRowElement, item)\" [disabled]=\"!editableContext.hasChanged || !editableService.context[item.id]?.form.valid\" class=\"p-button-rounded p-button-text p-button-success mr-2\"></button>\r\n <button pButton type=\"button\" icon=\"pi pi-times\" (click)=\"editableService.onRowEditCancel($event, table, item)\" class=\"p-button-rounded p-button-text p-button-danger\"></button>\r\n }\r\n }\r\n <!-- COM ERRORS -->\r\n @if (editableContext.hasErrors) {\r\n <p-popover #errorsOverlay appendTo=\"body\" [style]=\"{ width: '450px' }\">\r\n <div [innerHtml]=\"editableContext.errors | contentErrors\"></div>\r\n </p-popover>\r\n <button pButton type=\"button\" icon=\"fas fa-exclamation-triangle\" [disabled]=\"false\" class=\"p-button-sm p-button-rounded p-button-text p-button-danger mr-2\" (click)=\"errorsOverlay.toggle($event)\"></button>\r\n <!-- CRIANDO -->\r\n @if (item._context?.isCreating) {\r\n <button pButton type=\"button\" icon=\"pi pi-times\" (click)=\"editableService.onRowCreateCancel($event, table, item)\" class=\"p-button-sm p-button-rounded p-button-text p-button-danger\"></button>\r\n }\r\n <!-- ATUALIZANDO -->\r\n @if (item._context?.isUpdating) {\r\n <button pButton type=\"button\" icon=\"pi pi-times\" (click)=\"editableService.onRowEditCancel($event, table, item)\" class=\"p-button-sm p-button-rounded p-button-text p-button-danger\"></button>\r\n }\r\n }\r\n }\r\n }\r\n }\r\n <!-- CUSTOM MENU -->\r\n @if (context.state.actions.customActions.isVisible && !editing) {\r\n <ng-container *ngTemplateOutlet=\"actionsTemplate; context: { $implicit: item }\"></ng-container>\r\n }\r\n <!-- MENU -->\r\n @if (context.state.actions.menu.isVisible && !editing) {\r\n <smz-menu [callback]=\"context.state.actions.menu.callback\" [items]=\"context.state.actions.menu.items\" [data]=\"item\" [behavior]=\"context.state.actions.menu.behavior\" [ngClass]=\"{ 'ml-2': context.state.actions.customActions.isVisible }\" [icon]=\"context.state.actions.menu.styles.icon\" [styleClass]=\"context.state.actions.menu.styles.styleClass\" [buttonClass]=\"context.state.actions.menu.styles.buttonClass\" [testId]=\"buildRowMenuTestId(item, rowIndex)\"></smz-menu>\r\n }\r\n }\r\n </div>\r\n </td>\r\n }\r\n </tr>\r\n @if (item?._isExpanded) {\r\n <tr>\r\n <td [attr.colspan]=\"columns.length + ((context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible || context.state.editable.isEditable) ? 1 : 0) + (context.state.caption.rowSelection.isEnabled ? 1 : 0) + (context.state.rowExpansion.isEnabled ? 1 : 0)\">\r\n <ng-container *ngTemplateOutlet=\"rowContentTemplate; context: { $implicit: item }\"></ng-container>\r\n </td>\r\n </tr>\r\n }\r\n </ng-template>\r\n <ng-template pTemplate=\"emptymessage\" let-columns>\r\n <tr>\r\n <td [attr.colspan]=\"columns.length + ((context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible || context.state.editable.isEditable) ? 1 : 0) + (context.state.caption.rowSelection.isEnabled ? 1 : 0) + (context.state.rowExpansion.isEnabled ? 1 : 0)\" [ngStyle]=\"{ 'text-align': 'center' }\">\r\n <div [innerHtml]=\"context.state.emptyFeedback.message\"></div>\r\n @if (context.state.caption.clearFilters.isButtonVisible && hasFilters()) {\r\n <button pButton [label]=\"context.state.locale.clearFilters.label\" class=\"p-button-outlined mt-3\" icon=\"pi pi-filter-slash\" (click)=\"clear(table, context)\"></button>\r\n }\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n }\r\n </ng-container>\r\n </ng-container>\r\n }\r\n} @else {\r\n @if (emptyStateTemplate != null) {\r\n <ng-container *ngTemplateOutlet=\"emptyStateTemplate; context: { $implicit: {} }\"></ng-container>\r\n }\r\n}\r\n\r\n" }]
|
|
17558
17596
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: TableEditableService }, { type: TableFormsService }, { type: TableHelperService }, { type: i1$6.Store }, { type: SmzExcelService }], propDecorators: { templates: [{
|
|
17559
17597
|
type: ContentChildren,
|
|
17560
17598
|
args: [PrimeTemplate]
|
|
@@ -28343,6 +28381,10 @@ class SmzDialogCustomButtonBuilder {
|
|
|
28343
28381
|
}
|
|
28344
28382
|
return this;
|
|
28345
28383
|
}
|
|
28384
|
+
/**
|
|
28385
|
+
* NGXS action types listened via `ofActionSuccessful` / `ofActionErrored` while the button blocks the UI.
|
|
28386
|
+
* Pass action classes (constructors), not plain callbacks.
|
|
28387
|
+
*/
|
|
28346
28388
|
blockUi(successAction, erroredAction) {
|
|
28347
28389
|
this.button.blockUi = { successAction, erroredAction };
|
|
28348
28390
|
return this;
|
|
@@ -31164,13 +31206,180 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
31164
31206
|
args: [{ providedIn: 'root' }]
|
|
31165
31207
|
}], ctorParameters: () => [{ type: i1$6.Store }] });
|
|
31166
31208
|
|
|
31209
|
+
const ATTEMPTED_ROUTE_STORAGE_SUFFIX = '_attempted_route';
|
|
31210
|
+
function getAttemptedRouteStorageKey(localStoragePrefix) {
|
|
31211
|
+
return `${localStoragePrefix}${ATTEMPTED_ROUTE_STORAGE_SUFFIX}`;
|
|
31212
|
+
}
|
|
31213
|
+
function normalizePathname(path) {
|
|
31214
|
+
if (path == null || path.trim() === '') {
|
|
31215
|
+
return '/';
|
|
31216
|
+
}
|
|
31217
|
+
const withoutHash = path.split('#')[0];
|
|
31218
|
+
const withoutQuery = withoutHash.split('?')[0].trim();
|
|
31219
|
+
const withLeadingSlash = withoutQuery.startsWith('/') ? withoutQuery : `/${withoutQuery}`;
|
|
31220
|
+
if (withLeadingSlash.length > 1 && withLeadingSlash.endsWith('/')) {
|
|
31221
|
+
return withLeadingSlash.slice(0, -1);
|
|
31222
|
+
}
|
|
31223
|
+
return withLeadingSlash;
|
|
31224
|
+
}
|
|
31225
|
+
function pathnamesAreEqual(left, right) {
|
|
31226
|
+
return normalizePathname(left) === normalizePathname(right);
|
|
31227
|
+
}
|
|
31228
|
+
function isRelativeInternalPath(url) {
|
|
31229
|
+
if (url == null) {
|
|
31230
|
+
return false;
|
|
31231
|
+
}
|
|
31232
|
+
const trimmedUrl = url.trim();
|
|
31233
|
+
if (trimmedUrl === '') {
|
|
31234
|
+
return false;
|
|
31235
|
+
}
|
|
31236
|
+
if (!trimmedUrl.startsWith('/')) {
|
|
31237
|
+
return false;
|
|
31238
|
+
}
|
|
31239
|
+
if (trimmedUrl.startsWith('//')) {
|
|
31240
|
+
return false;
|
|
31241
|
+
}
|
|
31242
|
+
if (trimmedUrl.includes('\\')) {
|
|
31243
|
+
return false;
|
|
31244
|
+
}
|
|
31245
|
+
const pathname = normalizePathname(trimmedUrl);
|
|
31246
|
+
if (pathname.includes(':')) {
|
|
31247
|
+
return false;
|
|
31248
|
+
}
|
|
31249
|
+
return true;
|
|
31250
|
+
}
|
|
31251
|
+
function isLoginOrNonAuthenticatedPath(url, config) {
|
|
31252
|
+
const pathname = normalizePathname(url);
|
|
31253
|
+
const matchesNonAuthenticatedRoot = pathnamesAreEqual(pathname, config.nonAuthenticatedRoot);
|
|
31254
|
+
const matchesLoginRoute = pathnamesAreEqual(pathname, config.loginRoute);
|
|
31255
|
+
return matchesNonAuthenticatedRoot || matchesLoginRoute;
|
|
31256
|
+
}
|
|
31257
|
+
/**
|
|
31258
|
+
* Returns true when `url` is a same-app relative path and is not the login page.
|
|
31259
|
+
*/
|
|
31260
|
+
function isValidAttemptedRoute(url, config) {
|
|
31261
|
+
if (!isRelativeInternalPath(url)) {
|
|
31262
|
+
return false;
|
|
31263
|
+
}
|
|
31264
|
+
if (isLoginOrNonAuthenticatedPath(url, config)) {
|
|
31265
|
+
return false;
|
|
31266
|
+
}
|
|
31267
|
+
return true;
|
|
31268
|
+
}
|
|
31269
|
+
/**
|
|
31270
|
+
* Joins the router state URL with a fragment when the URL does not already include one.
|
|
31271
|
+
*/
|
|
31272
|
+
function composeAttemptedRoute(routerStateUrl, fragment) {
|
|
31273
|
+
if (fragment == null || fragment === '') {
|
|
31274
|
+
return routerStateUrl;
|
|
31275
|
+
}
|
|
31276
|
+
if (routerStateUrl.includes('#')) {
|
|
31277
|
+
return routerStateUrl;
|
|
31278
|
+
}
|
|
31279
|
+
return `${routerStateUrl}#${fragment}`;
|
|
31280
|
+
}
|
|
31281
|
+
function captureAttemptedRoute$1(url, config) {
|
|
31282
|
+
if (!isValidAttemptedRoute(url, config)) {
|
|
31283
|
+
return;
|
|
31284
|
+
}
|
|
31285
|
+
sessionStorage.setItem(getAttemptedRouteStorageKey(config.localStoragePrefix), url);
|
|
31286
|
+
}
|
|
31287
|
+
function peekAttemptedRoute$1(config) {
|
|
31288
|
+
const storedUrl = sessionStorage.getItem(getAttemptedRouteStorageKey(config.localStoragePrefix));
|
|
31289
|
+
if (storedUrl == null || !isValidAttemptedRoute(storedUrl, config)) {
|
|
31290
|
+
return null;
|
|
31291
|
+
}
|
|
31292
|
+
return storedUrl;
|
|
31293
|
+
}
|
|
31294
|
+
function consumeAttemptedRoute$1(config) {
|
|
31295
|
+
const storageKey = getAttemptedRouteStorageKey(config.localStoragePrefix);
|
|
31296
|
+
const storedUrl = sessionStorage.getItem(storageKey);
|
|
31297
|
+
sessionStorage.removeItem(storageKey);
|
|
31298
|
+
if (storedUrl == null || !isValidAttemptedRoute(storedUrl, config)) {
|
|
31299
|
+
return null;
|
|
31300
|
+
}
|
|
31301
|
+
return storedUrl;
|
|
31302
|
+
}
|
|
31303
|
+
function clearAttemptedRoute$1(config) {
|
|
31304
|
+
sessionStorage.removeItem(getAttemptedRouteStorageKey(config.localStoragePrefix));
|
|
31305
|
+
}
|
|
31306
|
+
function resolvePostLoginUrl$1(config) {
|
|
31307
|
+
const attemptedRoute = consumeAttemptedRoute$1(config);
|
|
31308
|
+
if (attemptedRoute != null) {
|
|
31309
|
+
return attemptedRoute;
|
|
31310
|
+
}
|
|
31311
|
+
return config.authenticatedRoot;
|
|
31312
|
+
}
|
|
31313
|
+
function buildLoginPageUrlWithOrigin(origin, nonAuthenticatedRoot, extraQuery) {
|
|
31314
|
+
const pathname = normalizePathname(nonAuthenticatedRoot);
|
|
31315
|
+
const loginUrl = new URL(pathname, origin);
|
|
31316
|
+
if (extraQuery != null) {
|
|
31317
|
+
for (const [name, value] of Object.entries(extraQuery)) {
|
|
31318
|
+
if (value == null || value === '') {
|
|
31319
|
+
continue;
|
|
31320
|
+
}
|
|
31321
|
+
loginUrl.searchParams.set(name, value);
|
|
31322
|
+
}
|
|
31323
|
+
}
|
|
31324
|
+
return loginUrl.toString();
|
|
31325
|
+
}
|
|
31326
|
+
|
|
31327
|
+
function readAttemptedRouteConfig() {
|
|
31328
|
+
const authentication = GlobalInjector.config.rbkUtils.authentication;
|
|
31329
|
+
return {
|
|
31330
|
+
localStoragePrefix: authentication.localStoragePrefix,
|
|
31331
|
+
authenticatedRoot: authentication.authenticatedRoot,
|
|
31332
|
+
nonAuthenticatedRoot: authentication.nonAuthenticatedRoot,
|
|
31333
|
+
loginRoute: authentication.login.route,
|
|
31334
|
+
};
|
|
31335
|
+
}
|
|
31336
|
+
/**
|
|
31337
|
+
* Stores the route the auth guard intercepted so a later successful login can restore it.
|
|
31338
|
+
* Invalid or login-page URLs are ignored.
|
|
31339
|
+
*/
|
|
31340
|
+
function captureAttemptedRoute(url) {
|
|
31341
|
+
captureAttemptedRoute$1(url, readAttemptedRouteConfig());
|
|
31342
|
+
}
|
|
31343
|
+
/**
|
|
31344
|
+
* Returns the stored attempted route without removing it.
|
|
31345
|
+
*/
|
|
31346
|
+
function peekAttemptedRoute() {
|
|
31347
|
+
return peekAttemptedRoute$1(readAttemptedRouteConfig());
|
|
31348
|
+
}
|
|
31349
|
+
/**
|
|
31350
|
+
* Returns and removes the stored attempted route, or `null` when none is valid.
|
|
31351
|
+
*/
|
|
31352
|
+
function consumeAttemptedRoute() {
|
|
31353
|
+
return consumeAttemptedRoute$1(readAttemptedRouteConfig());
|
|
31354
|
+
}
|
|
31355
|
+
/**
|
|
31356
|
+
* Removes any stored attempted route.
|
|
31357
|
+
*/
|
|
31358
|
+
function clearAttemptedRoute() {
|
|
31359
|
+
clearAttemptedRoute$1(readAttemptedRouteConfig());
|
|
31360
|
+
}
|
|
31361
|
+
/**
|
|
31362
|
+
* Returns the stored attempted route, or `authenticatedRoot` when none is valid.
|
|
31363
|
+
* Consumes the stored value.
|
|
31364
|
+
*/
|
|
31365
|
+
function resolvePostLoginUrl() {
|
|
31366
|
+
return resolvePostLoginUrl$1(readAttemptedRouteConfig());
|
|
31367
|
+
}
|
|
31368
|
+
/**
|
|
31369
|
+
* Builds an absolute URL pointing at the configured login page.
|
|
31370
|
+
* Use this as the SSO `successfulUrl` so the identity provider returns to the login page, not the deep link.
|
|
31371
|
+
*/
|
|
31372
|
+
function buildLoginPageUrl(extraQuery) {
|
|
31373
|
+
return buildLoginPageUrlWithOrigin(window.location.origin, GlobalInjector.config.rbkUtils.authentication.nonAuthenticatedRoot, extraQuery);
|
|
31374
|
+
}
|
|
31375
|
+
|
|
31167
31376
|
/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-return, @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type, @typescript-eslint/typedef, no-underscore-dangle, no-console, eqeqeq, @typescript-eslint/no-unused-vars, @typescript-eslint/no-useless-constructor, @typescript-eslint/explicit-member-accessibility, max-len, no-prototype-builtins, @typescript-eslint/no-shadow, @typescript-eslint/no-empty-object-type */
|
|
31168
31377
|
class RbkAuthGuard {
|
|
31169
31378
|
store;
|
|
31170
31379
|
constructor(store) {
|
|
31171
31380
|
this.store = store;
|
|
31172
31381
|
}
|
|
31173
|
-
async canActivate(snapshot) {
|
|
31382
|
+
async canActivate(snapshot, state) {
|
|
31174
31383
|
if (GlobalInjector.config.debugMode)
|
|
31175
31384
|
console.groupCollapsed(`RbkAuthGuard on route /${snapshot.routeConfig.path}`);
|
|
31176
31385
|
let isAuthenticated = this.store.selectSnapshot(AuthenticationSelectors.isAuthenticated);
|
|
@@ -31211,6 +31420,10 @@ class RbkAuthGuard {
|
|
|
31211
31420
|
if (!isAuthenticated) {
|
|
31212
31421
|
if (GlobalInjector.config.debugMode)
|
|
31213
31422
|
console.log('[RbkAuthGuard] Could not login locally using localstorage, redirecting user to landing page');
|
|
31423
|
+
if (GlobalInjector.config.rbkUtils.authentication.returnToAttemptedRoute === true) {
|
|
31424
|
+
const attemptedRoute = composeAttemptedRoute(state.url, snapshot.fragment);
|
|
31425
|
+
captureAttemptedRoute(attemptedRoute);
|
|
31426
|
+
}
|
|
31214
31427
|
this.store.dispatch(new Navigate([GlobalInjector.config.rbkUtils.authentication.nonAuthenticatedRoot]));
|
|
31215
31428
|
// this.store.dispatch(new ToastActions.Error('Usuário não autenticado, redirecionando para ' + GlobalInjector.config.authentication.nonAuthenticatedRoot));
|
|
31216
31429
|
}
|
|
@@ -31295,13 +31508,15 @@ class BoilerplateService {
|
|
|
31295
31508
|
titleService;
|
|
31296
31509
|
store;
|
|
31297
31510
|
actions$;
|
|
31511
|
+
router;
|
|
31298
31512
|
subs1;
|
|
31299
31513
|
subs2;
|
|
31300
31514
|
subs3;
|
|
31301
|
-
constructor(titleService, store, actions
|
|
31515
|
+
constructor(titleService, store, actions$, router) {
|
|
31302
31516
|
this.titleService = titleService;
|
|
31303
31517
|
this.store = store;
|
|
31304
31518
|
this.actions$ = actions$;
|
|
31519
|
+
this.router = router;
|
|
31305
31520
|
}
|
|
31306
31521
|
init(callback) {
|
|
31307
31522
|
if (callback != null) {
|
|
@@ -31312,12 +31527,11 @@ class BoilerplateService {
|
|
|
31312
31527
|
if (GlobalInjector.config.rbkUtils.useTitleService === true) {
|
|
31313
31528
|
this.titleService.init();
|
|
31314
31529
|
}
|
|
31315
|
-
this.subs1 = this.actions$.subscribe(
|
|
31316
|
-
|
|
31317
|
-
this.store.dispatch(new Navigate([GlobalInjector.config.rbkUtils.authentication.authenticatedRoot]));
|
|
31318
|
-
}
|
|
31530
|
+
this.subs1 = this.actions$.pipe(ofActionSuccessful(AuthenticationActions.RemoteLoginSuccess)).subscribe(() => {
|
|
31531
|
+
this.navigateAfterRemoteLoginSuccess();
|
|
31319
31532
|
});
|
|
31320
31533
|
this.subs3 = this.actions$.pipe(ofActionDispatched(AuthenticationActions.Logout)).subscribe((event) => {
|
|
31534
|
+
clearAttemptedRoute();
|
|
31321
31535
|
this.store.dispatch(new Navigate([event.redirectTo ?? GlobalInjector.config.rbkUtils.authentication.login.route]));
|
|
31322
31536
|
this.store.dispatch(new DatabaseActions.Clear());
|
|
31323
31537
|
this.store.dispatch(new FeaturesActions.Clear());
|
|
@@ -31325,6 +31539,14 @@ class BoilerplateService {
|
|
|
31325
31539
|
});
|
|
31326
31540
|
this.store.dispatch(new AuthenticationActions.LocalLogin());
|
|
31327
31541
|
}
|
|
31542
|
+
navigateAfterRemoteLoginSuccess() {
|
|
31543
|
+
const shouldReturnToAttemptedRoute = GlobalInjector.config.rbkUtils.authentication.returnToAttemptedRoute === true;
|
|
31544
|
+
if (shouldReturnToAttemptedRoute) {
|
|
31545
|
+
this.router.navigateByUrl(resolvePostLoginUrl());
|
|
31546
|
+
return;
|
|
31547
|
+
}
|
|
31548
|
+
this.store.dispatch(new Navigate([GlobalInjector.config.rbkUtils.authentication.authenticatedRoot]));
|
|
31549
|
+
}
|
|
31328
31550
|
killSubscriptions() {
|
|
31329
31551
|
if (GlobalInjector.config.debugMode)
|
|
31330
31552
|
console.log('[Boilerplate Service] Killing subscriptions, if any');
|
|
@@ -31335,13 +31557,13 @@ class BoilerplateService {
|
|
|
31335
31557
|
if (this.subs3 != null)
|
|
31336
31558
|
this.subs3.unsubscribe();
|
|
31337
31559
|
}
|
|
31338
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: BoilerplateService, deps: [{ token: TitleService }, { token: i1$6.Store }, { token: i1$6.Actions }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
31560
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: BoilerplateService, deps: [{ token: TitleService }, { token: i1$6.Store }, { token: i1$6.Actions }, { token: i1$9.Router }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
31339
31561
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: BoilerplateService, providedIn: 'root' });
|
|
31340
31562
|
}
|
|
31341
31563
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: BoilerplateService, decorators: [{
|
|
31342
31564
|
type: Injectable,
|
|
31343
31565
|
args: [{ providedIn: 'root' }]
|
|
31344
|
-
}], ctorParameters: () => [{ type: TitleService }, { type: i1$6.Store }, { type: i1$6.Actions }] });
|
|
31566
|
+
}], ctorParameters: () => [{ type: TitleService }, { type: i1$6.Store }, { type: i1$6.Actions }, { type: i1$9.Router }] });
|
|
31345
31567
|
|
|
31346
31568
|
/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-return, @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type, @typescript-eslint/typedef, no-underscore-dangle, no-console, eqeqeq, @typescript-eslint/no-unused-vars, @typescript-eslint/no-useless-constructor, @typescript-eslint/explicit-member-accessibility, max-len, no-prototype-builtins, @typescript-eslint/no-shadow, @typescript-eslint/no-empty-object-type, @angular-eslint/directive-selector */
|
|
31347
31569
|
class InputClearExtensionDirective {
|
|
@@ -50553,6 +50775,15 @@ class SmzUiAuthenticationBuilder extends SmzBuilderUtilities {
|
|
|
50553
50775
|
this._builder._state.rbkUtils.authentication.login.page.useSmzLoginModule = false;
|
|
50554
50776
|
return this.that;
|
|
50555
50777
|
}
|
|
50778
|
+
/**
|
|
50779
|
+
* After a successful remote login, navigate back to the route the auth guard intercepted
|
|
50780
|
+
* (including query parameters) instead of always using `authenticatedRoot`.
|
|
50781
|
+
* `authenticatedRoot` remains the fallback when no attempted route was stored.
|
|
50782
|
+
*/
|
|
50783
|
+
returnToAttemptedRoute() {
|
|
50784
|
+
this._builder._state.rbkUtils.authentication.returnToAttemptedRoute = true;
|
|
50785
|
+
return this.that;
|
|
50786
|
+
}
|
|
50556
50787
|
mapAccessTokenData(from, to, type) {
|
|
50557
50788
|
this._builder._state.rbkUtils.authentication.accessTokenClaims.push({ claimName: from, propertyName: to, type });
|
|
50558
50789
|
return this.that;
|
|
@@ -51603,6 +51834,7 @@ class SmzUiBuilder extends SmzBuilderUtilities {
|
|
|
51603
51834
|
localStoragePrefix: 'ui-demo',
|
|
51604
51835
|
authenticatedRoot: '/home',
|
|
51605
51836
|
nonAuthenticatedRoot: '/login',
|
|
51837
|
+
returnToAttemptedRoute: false,
|
|
51606
51838
|
allowSuperuser: false,
|
|
51607
51839
|
useSingleTenantAplication: false,
|
|
51608
51840
|
allowTenantSwitching: false,
|
|
@@ -57995,5 +58227,5 @@ __decorate([
|
|
|
57995
58227
|
* Generated bundle index. Do not edit.
|
|
57996
58228
|
*/
|
|
57997
58229
|
|
|
57998
|
-
export { AUTHORIZATION_HEADER, AccessControlService, ActionDispatchDirective, ApplicationActions, ApplicationSelectors, ApplicationState, AsPipe, AthenaLayout, AthenaLayoutComponent, AthenaLayoutModule, AuthClaimDefinitions, AuthHandler, AuthService, AuthenticationActions, AuthenticationSelectors, AuthenticationService, AuthenticationState, AuthorizationService, AxisOverflowDirection, AxisOverflowType, AxisPosition, BaseApiService, BoilerplateService, BreadcrumbService, CLAIMS_PAGE_ROUTE, CLAIMS_PATH, CLAIMS_STATE_NAME, CONTENT_ENCODING_HEADER, CachedRouteReuseStrategy, CalendarComponent, CalendarPipe, CanAccess, ChartType, CheckBoxComponent, CheckBoxGroupComponent, ClaimAccessType, ClaimAccessTypeDescription, ClaimAccessTypeValues, ClaimsActions, ClaimsModule, ClaimsSelectors, ClaimsState, ClickStopPropagationDirective, ClickStopPropagationModule, ClonePipe, ColorPallete, ColorPickerComponent, Confirmable, CreateLinearChart, CreateRadialChart, CustomError, CustomNgForDirective, CustomNgForModule, DATABASE_REQUIRED_ACTIONS, DATABASE_STATES, DECORATOR_APPLIED, DEFAULT_AUTHENTICATION_ENDPOINTS_ROUTES, DEFAULT_AUTHORIZATION_ENDPOINTS_ROUTES, DatabaseActions, DatabaseSelectors, DatabaseState, DatasetType, DeepWrapper, DescribeAnyPipe, DescribeArrayPipe, DescribeSimpleNamedPipe, DialogContentManagerComponent, DialogService, DropdownComponent, DynamicDialogComponent, DynamicDialogConfig, DynamicDialogInjector, DynamicDialogModule, DynamicDialogRef, ERROR_HANDLING_TYPE_HEADER, ExcelsUiActions, FEATURE_STATES, FeaturesActions, FeaturesSelectors, FeaturesState, FileUploadComponent, FilterContains, FirstOrDefaultPipe, FormGroupComponent, FormSubmitComponent, GenericInjectComponentDirective, GetElementById, GetElementsByParentId, GlobalActions, GlobalFilter, GlobalInjector, GlobalLoaderComponent, GlobalLoaderModule, GlobalState, GroupingType, HephaestusLayout, HephaestusLayoutComponent, HephaestusLayoutModule, HephaestusProviderModule, HostElement, HttpErrorHandler, IGNORE_ERROR_HANDLING, InViewportMetadata, InjectComponentDirective, InjectComponentService, InjectContentAppModule, InjectContentDirective, InjectContentService, InputBlurDetectionModule, InputChangeDetectionDirective, InputClearExtensionDirective, InputCurrencyComponent, InputListComponent, InputMaskComponent, InputNumberComponent, InputPasswordComponent, InputSwitchComponent, InputTagAreaComponent, InputTextAreaComponent, InputTextComponent, InputTreeComponent, IsVisiblePipe, IsVisiblePipeModule, JoinPipe, LOADING_BEHAVIOR_HEADER, LOCAL_LOADING_TAG_HEADER, LayoutUiActions, LayoutUiSelectors, LayoutUiState, LegacyAuthenticationSelectors, LinearChartBuilder, LinkedDropdownComponent, LinkedMultiSelectComponent, LoggingScope, LoggingService, MAIN_LAYOUT_PATH, MentionableTextareaComponent, MenuHelperService, MenuType, MergeClonePipe, MergeClonePipeModule, MultiSelectComponent, NG_ON_INIT, NewAthenaLayout, NewAthenaLayoutComponent, NewAthenaLayoutModule, NewAthenaProviderModule, NgCloneDirective, NgCloneModule, NgIfLandscapeDirective, NgIfLandscapeDirectiveModule, NgIfPortraitDirective, NgIfPortraitDirectiveModule, NgVar, NgVarContext, NgVarModule, NgxRbkUtilsConfig, NgxRbkUtilsModule, NgxSmzCardsModule, NgxSmzCommentsModule, NgxSmzDataInfoModule, NgxSmzDataPipesModule, NgxSmzDialogsModule, NgxSmzDockModule, NgxSmzDocumentsModule, NgxSmzFaqsModule, NgxSmzFormsModule, NgxSmzLayoutsModule, NgxSmzMenuModule, NgxSmzMultiTablesModule, NgxSmzRouterParamsModule, NgxSmzSafeImageModule, NgxSmzServerImageModule, NgxSmzServerImageToBase64Module, NgxSmzSideContentModule, NgxSmzTablesModule, NgxSmzTreeWithDetailsModule, NgxSmzTreesModule, NgxSmzUiBlockModule, NgxSmzUiComponent, NgxSmzUiConfig, NgxSmzUiGuidesModule, NgxSmzUiModule, NgxSmzViewportModule, NotificationFolder, NotificationFolderStatus, NotificationStatus, NotificationType, NotificationTypeClass, NotificationsUiActions, NotificationsUiSelectors, PrettyJsonPipe$1 as PrettyJsonPipe, PrettyJsonPipeModule, PrimeConfigService, REFRESH_TOKEN_BEHAVIOR_HEADER, RESTORE_STATE_ON_ERROR_HEADER, ROLES_PAGE_ROUTE, ROLES_PATH, ROLES_STATE_NAME, RadialChartBuilder, RadioButtonComponent, RbkAccessControlModule, RbkAuthGuard, RbkCanAccessAnyPipe, RbkCanAccessPipe, RbkClaimGuardDirective, RbkDatabaseStateGuard, RbkFeatureStateGuard, RbkPipesModule, RbkTableFilterClearDirectivesModule, RegistrySmzUiConfiguration, RepositoryForm, RoleMode, RoleModeDescription, RoleModeValues, RoleSource, RoleSourceDescription, RoleSourceValues, RolesActions, RolesModule, RolesSelectors, RolesState, RouterParamsActions, RouterParamsSelectors, SMZ_CORE_LOGGING_CONFIG, SMZ_UI_ENVIRONMENT_CONFIG, SafeHtmlPipe$2 as SafeHtmlPipe, SafeImageDirective, SafeUrlPipe$1 as SafeUrlPipe, SelectorPipe, ServerImageDirective, ServerImageToBase64Directive, ServerPathPipe, SetTemplateClasses, SetTemplateClassesPipe, SidebarState, SimpleCalendarPipe, SmzActionDispatchModule, SmzAuthorizationDeactivatedUsersTableBuilder, SmzAuthorizationUsersTableBuilder, SmzBaseColumnBuilder, SmzBaseEditableBuilder, SmzBreakpoints, SmzBuilderUtilities, SmzCardsBuilder, SmzCardsComponent, SmzCardsContentType, SmzCardsInjectableComponentBuilder, SmzCardsTemplate, SmzCardsView, SmzChartComponent, SmzChartModule, SmzClipboardService, SmzColumnCollectionBuilder, SmzCommentsBuilder, SmzCommentsComponent, SmzCommentsSectionComponent, SmzContentTheme, SmzContentThemes, SmzContentType, SmzControlType, SmzCoreLogging, SmzCurrencyColumnBuilder, SmzCustomColumnBuilder, SmzDataInfoComponent, SmzDataTransformColumnBuilder, SmzDataTransformTreePipe, SmzDateColumnBuilder, SmzDialogBuilder, SmzDialogComponentBuilder, SmzDialogFormBuilder, SmzDialogTableBuilder, SmzDialogsConfig, SmzDialogsPresets, SmzDialogsService, SmzDockComponent, SmzDockService, SmzDocumentBaseCellBuilder, SmzDocumentBuilder, SmzDocumentComponent, SmzDocumentsService, SmzDragDropModule, SmzDraggable, SmzDropdownEditableBuilder, SmzDroppable, SmzDynamicDialogConfig, SmzEasyBaseColumnBuilder, SmzEasyColumnCollectionBuilder, SmzEasyCustomColumnBuilder, SmzEasyDataTransformColumnBuilder, SmzEasyDateColumnBuilder, SmzEasyMenuTableBuilder, SmzEasyTableBuilder, SmzEasyTableComponent, SmzEasyTableContentType, SmzEasyTableModule, SmzEasyTextColumnBuilder, SmzEditableCollectionBuilder, SmzEditableTableBuilder, SmzEditableType, SmzEnvironment, SmzExcelColorDefinitions, SmzExcelDataDefinitions, SmzExcelFontDefinitions, SmzExcelService, SmzExcelSortOrderDefinitions, SmzExcelThemeDefinitions, SmzExcelTypeDefinitions, SmzExcelsBuilder, SmzExportDialogComponent, SmzExportDialogModule, SmzExportDialogService, SmzExportableContentSource, SmzExportableContentType, SmzFaqsComponent, SmzFaqsConfig, SmzFilterType, SmzFlattenMenuPipe, SmzFlipCardContext, SmzFormBuilder, SmzFormViewdata, SmzFormsConfig, SmzFormsPresets, SmzFormsRepositoryService, SmzGaugeBuilder, SmzGaugeComponent, SmzGaugeThresholdBuilder, SmzGetDataPipe, SmzGridItemComponent, SmzHelpDialogService, SmzHtmlViewerComponent, SmzHtmlViewerModule, SmzIconColumnBuilder, SmzIconMessageComponent, SmzInfoDateComponent, SmzInfoDateModule, SmzInitialPipe, SmzInputAutocompleteTagArea, SmzInputTextModule, SmzInputTextPipe, SmzLayoutsConfig, SmzLoader, SmzLoaders, SmzLoginBuilder, SmzLoginComponent, SmzLoginModule, SmzMenuBuilder, SmzMenuComponent, SmzMenuCreationBuilder, SmzMenuCreationItemBuilder, SmzMenuItemActionsDirective, SmzMenuItemBuilder, SmzMenuItemEasyTableBuilder, SmzMenuItemTableBuilder, SmzMenuTableBuilder, SmzMessagesModule, SmzMultiTablesBuilder, SmzMultiTablesComponent, SmzNotificationsComponent, SmzNotificationsModule, SmzNumberEditableBuilder, SmzPresets, SmzProxyStore, SmzResponsiveBreakpointsDirective, SmzResponsiveBreakpointsDirectiveModule, SmzResponsiveComponent, SmzRouteDatas, SmzRouteParams, SmzRouteQueryParams, SmzSideContentComponent, SmzSideContentDefault, SmzSincronizeTablePipe, SmzSmartTag, SmzSmartTagModule, SmzSubmitComponent, SmzSvgBuilder, SmzSvgComponent, SmzSvgFeatureBuilder, SmzSvgModule, SmzSvgPinBuilder, SmzSvgRootBuilder, SmzSvgWorldCoordinates, SmzSwitchEditableBuilder, SmzTableBuilder, SmzTableComponent, SmzTablesConfig, SmzTagMessage, SmzTailPipe, SmzTemplatesPipeModule, SmzTenantSwitchComponent, SmzTextColumnBuilder, SmzTextEditableBuilder, SmzTextPattern, SmzTimelineBuilder, SmzTimelineComponent, SmzToastComponent, SmzToastModule, SmzTooltipTouchSupportModule, SmzTreeBuilder, SmzTreeComponent, SmzTreeDragAndDropBuilder, SmzTreeDropBuilder, SmzTreeDynamicMenuBuilder, SmzTreeDynamicMenuItemBuilder, SmzTreeEmptyFeedbackBuilder, SmzTreeMenuBuilder, SmzTreeMenuItemBuilder, SmzTreeToolbarBuilder, SmzTreeToolbarButtonBuilder, SmzTreeToolbarButtonCollectionBuilder, SmzTreeWithDetailsBuilder, SmzTreeWithDetailsComponent, SmzUiBlockComponent, SmzUiBlockDirective, SmzUiBlockService, SmzUiBuilder, SmzUiEnvironment, SmzUiGuidesBuilder, SmzUiGuidesService, SmzViewportDirective, SmzViewportService, StandaloneInjectComponentDirective, StateBuilderPipe, TENANTS_PAGE_ROUTE, TENANTS_PATH, TENANTS_STATE_NAME, TableClearExtensionDirective, TableHelperService, TenantAuthenticationSelectors, TenantsActions, TenantsModule, TenantsSelectors, TenantsState, ThemeManagerService, TitleService, Toast, ToastActions, ToastItem, ToastService, TooltipTouchSupportDirective, TreeHelperService, TreeHelpers, Tunnel, UI_DEFINITIONS_STATE_NAME, UI_LOCALIZATION_STATE_NAME, USERS_PAGE_ROUTE, USERS_PATH, USERS_STATE_NAME, USER_ID_HEADER, LayoutUiActions as UiActions, UiDefinitionsDbActions, UiDefinitionsDbSelectors, UiDefinitionsDbState, UiDefinitionsService, UiLocalizationDbActions, UiLocalizationDbSelectors, UiLocalizationDbState, UiLocalizationService, LayoutUiSelectors as UiSelectors, UniqueFilterPipe, UrlCheckerPipe, UrlCheckerPipeModule, UsersActions, UsersModule, UsersSelectors, UsersState, WINDOWS_AUTHENTICATION_HEADER, Wait, applyTableContentNgStyle, b64toBlob, base64ToFile, breakLinesForHtml, buildAuthenticationEndpointsRoutes, buildAuthenticationUrl, buildAuthorizationEndpointsRoutes, buildServerApiUrl, buildSmzDialogCustomButtonTestId, buildSmzDialogTestId, buildSmzDialogTopbarButtonTestId, buildSmzTableTestId, buildState, capitalizeFirstLetter, capitalizeWithSlash, clearArray, clone, cloneAndRemoveProperties, cloneAndRemoveProperty, compare, compareInsensitive, completeSubjectOnTheInstance, convertFormCreationFeature, convertFormFeature, convertFormFeatureFromInputData, convertFormUpdateFeature, count, createObjectFromString, createRound, createSubjectOnTheInstance, dataURLtoFile, databaseSmzAccessStates, debounce, deepClone, deepEqual, deepIndexOf, deepMerge, defaultFormsModuleConfig, defaultState, downloadBase64File, downloadFromServerUrl, downloadFromUrl, empty, every, executeTextPattern, featureSmzAccessStates, fixDate$1 as fixDate, fixDateProperties, fixDates, flatten, flattenObject, getAuthenticationInitialState, getCleanApplicationState, getFirst, getFirstElement, getFirstElements, getFormInputFromDialog, getGlobalInitialState, getInitialApplicationState, getInitialDatabaseStoreState, getInitialState$8 as getInitialState, getLastElements, getPreset, getProperty, getSymbol, getTreeNodeFromKey, getUiDefinitionsInitialState, getUiLocalizationInitialState, getUsersInitialState, getValidatorsForInput, handleBase64, isArray, isConvertibleToNumber, isDeepObject, isEmpty$1 as isEmpty, isFunction$1 as isFunction, isInteger, isNil, isNull$1 as isNull, isNullOrEmptyString, isNumber$1 as isNumber, isNumberFinite$1 as isNumberFinite, isNumeric, isObject$2 as isObject, isObjectHelper, isPositive, isSimpleNamedEntity, isString$1 as isString, isUndefined$1 as isUndefined, isWithinTime, leftPad, longestStringInArray, mapParamsToObject, markAsDecorated, mergeClone, mergeDeep, nameof, namesof, ngxsModuleForFeatureFaqsDbState, ngxsModuleForFeatureUiAthenaLayoutState, ngxsModuleForFeatureUiHephaestusLayoutState, ngxsModuleForFeatureUiNewAthenaLayoutState, normalizeDateToUtc, orderArrayByProperty, pad, provideSmzCoreLogging, provideSmzEnvironment, rbkSafeHtmlPipe, removeElementFromArray, replaceAll, replaceArrayItem, replaceArrayPartialItem, replaceItem, replaceNgOnInit, resolveSmzTableRowId, rightPad, routerModuleForChildUsersModule, routerParamsDispatch, routerParamsListener, setNestedObject, shorten, showConfirmation, showDialog, showMarkdownDialog, showMessage, showObjectDialog, showPersistentDialog, shuffle, slugSmzDialogTestIdKey, slugSmzTableTestIdKey, sortArray, sortArrayOfObjects, sortArrayOfStrings, sortMenuItemsByLabel, sum, synchronizeNodes, synchronizeRow, synchronizeTable, synchronizeTrees, takeUntil, takeWhile, toDecimal, toSimpleNamedEntity, toString, unwrapDeep, upperFirst, uuidv4, wrapDeep };
|
|
58230
|
+
export { AUTHORIZATION_HEADER, AccessControlService, ActionDispatchDirective, ApplicationActions, ApplicationSelectors, ApplicationState, AsPipe, AthenaLayout, AthenaLayoutComponent, AthenaLayoutModule, AuthClaimDefinitions, AuthHandler, AuthService, AuthenticationActions, AuthenticationSelectors, AuthenticationService, AuthenticationState, AuthorizationService, AxisOverflowDirection, AxisOverflowType, AxisPosition, BaseApiService, BoilerplateService, BreadcrumbService, CLAIMS_PAGE_ROUTE, CLAIMS_PATH, CLAIMS_STATE_NAME, CONTENT_ENCODING_HEADER, CachedRouteReuseStrategy, CalendarComponent, CalendarPipe, CanAccess, ChartType, CheckBoxComponent, CheckBoxGroupComponent, ClaimAccessType, ClaimAccessTypeDescription, ClaimAccessTypeValues, ClaimsActions, ClaimsModule, ClaimsSelectors, ClaimsState, ClickStopPropagationDirective, ClickStopPropagationModule, ClonePipe, ColorPallete, ColorPickerComponent, Confirmable, CreateLinearChart, CreateRadialChart, CustomError, CustomNgForDirective, CustomNgForModule, DATABASE_REQUIRED_ACTIONS, DATABASE_STATES, DECORATOR_APPLIED, DEFAULT_AUTHENTICATION_ENDPOINTS_ROUTES, DEFAULT_AUTHORIZATION_ENDPOINTS_ROUTES, DatabaseActions, DatabaseSelectors, DatabaseState, DatasetType, DeepWrapper, DescribeAnyPipe, DescribeArrayPipe, DescribeSimpleNamedPipe, DialogContentManagerComponent, DialogService, DropdownComponent, DynamicDialogComponent, DynamicDialogConfig, DynamicDialogInjector, DynamicDialogModule, DynamicDialogRef, ERROR_HANDLING_TYPE_HEADER, ExcelsUiActions, FEATURE_STATES, FeaturesActions, FeaturesSelectors, FeaturesState, FileUploadComponent, FilterContains, FirstOrDefaultPipe, FormGroupComponent, FormSubmitComponent, GenericInjectComponentDirective, GetElementById, GetElementsByParentId, GlobalActions, GlobalFilter, GlobalInjector, GlobalLoaderComponent, GlobalLoaderModule, GlobalState, GroupingType, HephaestusLayout, HephaestusLayoutComponent, HephaestusLayoutModule, HephaestusProviderModule, HostElement, HttpErrorHandler, IGNORE_ERROR_HANDLING, InViewportMetadata, InjectComponentDirective, InjectComponentService, InjectContentAppModule, InjectContentDirective, InjectContentService, InputBlurDetectionModule, InputChangeDetectionDirective, InputClearExtensionDirective, InputCurrencyComponent, InputListComponent, InputMaskComponent, InputNumberComponent, InputPasswordComponent, InputSwitchComponent, InputTagAreaComponent, InputTextAreaComponent, InputTextComponent, InputTreeComponent, IsVisiblePipe, IsVisiblePipeModule, JoinPipe, LOADING_BEHAVIOR_HEADER, LOCAL_LOADING_TAG_HEADER, LayoutUiActions, LayoutUiSelectors, LayoutUiState, LegacyAuthenticationSelectors, LinearChartBuilder, LinkedDropdownComponent, LinkedMultiSelectComponent, LoggingScope, LoggingService, MAIN_LAYOUT_PATH, MentionableTextareaComponent, MenuHelperService, MenuType, MergeClonePipe, MergeClonePipeModule, MultiSelectComponent, NG_ON_INIT, NewAthenaLayout, NewAthenaLayoutComponent, NewAthenaLayoutModule, NewAthenaProviderModule, NgCloneDirective, NgCloneModule, NgIfLandscapeDirective, NgIfLandscapeDirectiveModule, NgIfPortraitDirective, NgIfPortraitDirectiveModule, NgVar, NgVarContext, NgVarModule, NgxRbkUtilsConfig, NgxRbkUtilsModule, NgxSmzCardsModule, NgxSmzCommentsModule, NgxSmzDataInfoModule, NgxSmzDataPipesModule, NgxSmzDialogsModule, NgxSmzDockModule, NgxSmzDocumentsModule, NgxSmzFaqsModule, NgxSmzFormsModule, NgxSmzLayoutsModule, NgxSmzMenuModule, NgxSmzMultiTablesModule, NgxSmzRouterParamsModule, NgxSmzSafeImageModule, NgxSmzServerImageModule, NgxSmzServerImageToBase64Module, NgxSmzSideContentModule, NgxSmzTablesModule, NgxSmzTreeWithDetailsModule, NgxSmzTreesModule, NgxSmzUiBlockModule, NgxSmzUiComponent, NgxSmzUiConfig, NgxSmzUiGuidesModule, NgxSmzUiModule, NgxSmzViewportModule, NotificationFolder, NotificationFolderStatus, NotificationStatus, NotificationType, NotificationTypeClass, NotificationsUiActions, NotificationsUiSelectors, PrettyJsonPipe$1 as PrettyJsonPipe, PrettyJsonPipeModule, PrimeConfigService, REFRESH_TOKEN_BEHAVIOR_HEADER, RESTORE_STATE_ON_ERROR_HEADER, ROLES_PAGE_ROUTE, ROLES_PATH, ROLES_STATE_NAME, RadialChartBuilder, RadioButtonComponent, RbkAccessControlModule, RbkAuthGuard, RbkCanAccessAnyPipe, RbkCanAccessPipe, RbkClaimGuardDirective, RbkDatabaseStateGuard, RbkFeatureStateGuard, RbkPipesModule, RbkTableFilterClearDirectivesModule, RegistrySmzUiConfiguration, RepositoryForm, RoleMode, RoleModeDescription, RoleModeValues, RoleSource, RoleSourceDescription, RoleSourceValues, RolesActions, RolesModule, RolesSelectors, RolesState, RouterParamsActions, RouterParamsSelectors, SMZ_CORE_LOGGING_CONFIG, SMZ_UI_ENVIRONMENT_CONFIG, SafeHtmlPipe$2 as SafeHtmlPipe, SafeImageDirective, SafeUrlPipe$1 as SafeUrlPipe, SelectorPipe, ServerImageDirective, ServerImageToBase64Directive, ServerPathPipe, SetTemplateClasses, SetTemplateClassesPipe, SidebarState, SimpleCalendarPipe, SmzActionDispatchModule, SmzAuthorizationDeactivatedUsersTableBuilder, SmzAuthorizationUsersTableBuilder, SmzBaseColumnBuilder, SmzBaseEditableBuilder, SmzBreakpoints, SmzBuilderUtilities, SmzCardsBuilder, SmzCardsComponent, SmzCardsContentType, SmzCardsInjectableComponentBuilder, SmzCardsTemplate, SmzCardsView, SmzChartComponent, SmzChartModule, SmzClipboardService, SmzColumnCollectionBuilder, SmzCommentsBuilder, SmzCommentsComponent, SmzCommentsSectionComponent, SmzContentTheme, SmzContentThemes, SmzContentType, SmzControlType, SmzCoreLogging, SmzCurrencyColumnBuilder, SmzCustomColumnBuilder, SmzDataInfoComponent, SmzDataTransformColumnBuilder, SmzDataTransformTreePipe, SmzDateColumnBuilder, SmzDialogBuilder, SmzDialogComponentBuilder, SmzDialogFormBuilder, SmzDialogTableBuilder, SmzDialogsConfig, SmzDialogsPresets, SmzDialogsService, SmzDockComponent, SmzDockService, SmzDocumentBaseCellBuilder, SmzDocumentBuilder, SmzDocumentComponent, SmzDocumentsService, SmzDragDropModule, SmzDraggable, SmzDropdownEditableBuilder, SmzDroppable, SmzDynamicDialogConfig, SmzEasyBaseColumnBuilder, SmzEasyColumnCollectionBuilder, SmzEasyCustomColumnBuilder, SmzEasyDataTransformColumnBuilder, SmzEasyDateColumnBuilder, SmzEasyMenuTableBuilder, SmzEasyTableBuilder, SmzEasyTableComponent, SmzEasyTableContentType, SmzEasyTableModule, SmzEasyTextColumnBuilder, SmzEditableCollectionBuilder, SmzEditableTableBuilder, SmzEditableType, SmzEnvironment, SmzExcelColorDefinitions, SmzExcelDataDefinitions, SmzExcelFontDefinitions, SmzExcelService, SmzExcelSortOrderDefinitions, SmzExcelThemeDefinitions, SmzExcelTypeDefinitions, SmzExcelsBuilder, SmzExportDialogComponent, SmzExportDialogModule, SmzExportDialogService, SmzExportableContentSource, SmzExportableContentType, SmzFaqsComponent, SmzFaqsConfig, SmzFilterType, SmzFlattenMenuPipe, SmzFlipCardContext, SmzFormBuilder, SmzFormViewdata, SmzFormsConfig, SmzFormsPresets, SmzFormsRepositoryService, SmzGaugeBuilder, SmzGaugeComponent, SmzGaugeThresholdBuilder, SmzGetDataPipe, SmzGridItemComponent, SmzHelpDialogService, SmzHtmlViewerComponent, SmzHtmlViewerModule, SmzIconColumnBuilder, SmzIconMessageComponent, SmzInfoDateComponent, SmzInfoDateModule, SmzInitialPipe, SmzInputAutocompleteTagArea, SmzInputTextModule, SmzInputTextPipe, SmzLayoutsConfig, SmzLoader, SmzLoaders, SmzLoginBuilder, SmzLoginComponent, SmzLoginModule, SmzMenuBuilder, SmzMenuComponent, SmzMenuCreationBuilder, SmzMenuCreationItemBuilder, SmzMenuItemActionsDirective, SmzMenuItemBuilder, SmzMenuItemEasyTableBuilder, SmzMenuItemTableBuilder, SmzMenuTableBuilder, SmzMessagesModule, SmzMultiTablesBuilder, SmzMultiTablesComponent, SmzNotificationsComponent, SmzNotificationsModule, SmzNumberEditableBuilder, SmzPresets, SmzProxyStore, SmzResponsiveBreakpointsDirective, SmzResponsiveBreakpointsDirectiveModule, SmzResponsiveComponent, SmzRouteDatas, SmzRouteParams, SmzRouteQueryParams, SmzSideContentComponent, SmzSideContentDefault, SmzSincronizeTablePipe, SmzSmartTag, SmzSmartTagModule, SmzSubmitComponent, SmzSvgBuilder, SmzSvgComponent, SmzSvgFeatureBuilder, SmzSvgModule, SmzSvgPinBuilder, SmzSvgRootBuilder, SmzSvgWorldCoordinates, SmzSwitchEditableBuilder, SmzTableBuilder, SmzTableComponent, SmzTablesConfig, SmzTagMessage, SmzTailPipe, SmzTemplatesPipeModule, SmzTenantSwitchComponent, SmzTextColumnBuilder, SmzTextEditableBuilder, SmzTextPattern, SmzTimelineBuilder, SmzTimelineComponent, SmzToastComponent, SmzToastModule, SmzTooltipTouchSupportModule, SmzTreeBuilder, SmzTreeComponent, SmzTreeDragAndDropBuilder, SmzTreeDropBuilder, SmzTreeDynamicMenuBuilder, SmzTreeDynamicMenuItemBuilder, SmzTreeEmptyFeedbackBuilder, SmzTreeMenuBuilder, SmzTreeMenuItemBuilder, SmzTreeToolbarBuilder, SmzTreeToolbarButtonBuilder, SmzTreeToolbarButtonCollectionBuilder, SmzTreeWithDetailsBuilder, SmzTreeWithDetailsComponent, SmzUiBlockComponent, SmzUiBlockDirective, SmzUiBlockService, SmzUiBuilder, SmzUiEnvironment, SmzUiGuidesBuilder, SmzUiGuidesService, SmzViewportDirective, SmzViewportService, StandaloneInjectComponentDirective, StateBuilderPipe, TENANTS_PAGE_ROUTE, TENANTS_PATH, TENANTS_STATE_NAME, TableClearExtensionDirective, TableHelperService, TenantAuthenticationSelectors, TenantsActions, TenantsModule, TenantsSelectors, TenantsState, ThemeManagerService, TitleService, Toast, ToastActions, ToastItem, ToastService, TooltipTouchSupportDirective, TreeHelperService, TreeHelpers, Tunnel, UI_DEFINITIONS_STATE_NAME, UI_LOCALIZATION_STATE_NAME, USERS_PAGE_ROUTE, USERS_PATH, USERS_STATE_NAME, USER_ID_HEADER, LayoutUiActions as UiActions, UiDefinitionsDbActions, UiDefinitionsDbSelectors, UiDefinitionsDbState, UiDefinitionsService, UiLocalizationDbActions, UiLocalizationDbSelectors, UiLocalizationDbState, UiLocalizationService, LayoutUiSelectors as UiSelectors, UniqueFilterPipe, UrlCheckerPipe, UrlCheckerPipeModule, UsersActions, UsersModule, UsersSelectors, UsersState, WINDOWS_AUTHENTICATION_HEADER, Wait, applyTableContentNgStyle, b64toBlob, base64ToFile, breakLinesForHtml, buildAuthenticationEndpointsRoutes, buildAuthenticationUrl, buildAuthorizationEndpointsRoutes, buildLoginPageUrl, buildServerApiUrl, buildSmzDialogCustomButtonTestId, buildSmzDialogTestId, buildSmzDialogTopbarButtonTestId, buildSmzTableTestId, buildState, capitalizeFirstLetter, capitalizeWithSlash, captureAttemptedRoute, clearArray, clearAttemptedRoute, clone, cloneAndRemoveProperties, cloneAndRemoveProperty, compare, compareInsensitive, completeSubjectOnTheInstance, composeAttemptedRoute, consumeAttemptedRoute, convertFormCreationFeature, convertFormFeature, convertFormFeatureFromInputData, convertFormUpdateFeature, count, createObjectFromString, createRound, createSubjectOnTheInstance, dataURLtoFile, databaseSmzAccessStates, debounce, deepClone, deepEqual, deepIndexOf, deepMerge, defaultFormsModuleConfig, defaultState, downloadBase64File, downloadFromServerUrl, downloadFromUrl, empty, every, executeTextPattern, featureSmzAccessStates, fixDate$1 as fixDate, fixDateProperties, fixDates, flatten, flattenObject, getAuthenticationInitialState, getCleanApplicationState, getFirst, getFirstElement, getFirstElements, getFormInputFromDialog, getGlobalInitialState, getInitialApplicationState, getInitialDatabaseStoreState, getInitialState$8 as getInitialState, getLastElements, getPreset, getProperty, getSymbol, getTreeNodeFromKey, getUiDefinitionsInitialState, getUiLocalizationInitialState, getUsersInitialState, getValidatorsForInput, handleBase64, isArray, isConvertibleToNumber, isDeepObject, isEmpty$1 as isEmpty, isFunction$1 as isFunction, isInteger, isNil, isNull$1 as isNull, isNullOrEmptyString, isNumber$1 as isNumber, isNumberFinite$1 as isNumberFinite, isNumeric, isObject$2 as isObject, isObjectHelper, isPositive, isSimpleNamedEntity, isString$1 as isString, isUndefined$1 as isUndefined, isValidAttemptedRoute, isWithinTime, leftPad, longestStringInArray, mapParamsToObject, markAsDecorated, mergeClone, mergeDeep, nameof, namesof, ngxsModuleForFeatureFaqsDbState, ngxsModuleForFeatureUiAthenaLayoutState, ngxsModuleForFeatureUiHephaestusLayoutState, ngxsModuleForFeatureUiNewAthenaLayoutState, normalizeDateToUtc, orderArrayByProperty, pad, peekAttemptedRoute, provideSmzCoreLogging, provideSmzEnvironment, rbkSafeHtmlPipe, removeElementFromArray, replaceAll, replaceArrayItem, replaceArrayPartialItem, replaceItem, replaceNgOnInit, resolvePostLoginUrl, resolveSmzTableRowId, rightPad, routerModuleForChildUsersModule, routerParamsDispatch, routerParamsListener, setNestedObject, shorten, showConfirmation, showDialog, showMarkdownDialog, showMessage, showObjectDialog, showPersistentDialog, shuffle, slugSmzDialogTestIdKey, slugSmzTableTestIdKey, sortArray, sortArrayOfObjects, sortArrayOfStrings, sortMenuItemsByLabel, sum, synchronizeNodes, synchronizeRow, synchronizeTable, synchronizeTrees, takeUntil, takeWhile, toDecimal, toSimpleNamedEntity, toString, unwrapDeep, upperFirst, uuidv4, wrapDeep };
|
|
57999
58231
|
//# sourceMappingURL=ngx-smz-core.mjs.map
|