@ngx-smz/core 21.10.0-next.17 → 21.10.0-next.19
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 +262 -86
- package/fesm2022/ngx-smz-core.mjs.map +1 -1
- package/package.json +1 -1
- package/types/ngx-smz-core.d.ts +61 -2
|
@@ -2294,20 +2294,115 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImpor
|
|
|
2294
2294
|
class SmzFormsVisibilityService {
|
|
2295
2295
|
dependsOn;
|
|
2296
2296
|
observers;
|
|
2297
|
+
/** Inputs that can be observed (registered by the form setup, even while hidden). */
|
|
2298
|
+
sources = {};
|
|
2299
|
+
/** Current value readers (usually backed by the FormControl). */
|
|
2300
|
+
valueResolvers = {};
|
|
2301
|
+
/** Last value emitted by setValue, used when there is no resolver. */
|
|
2302
|
+
lastValues = {};
|
|
2297
2303
|
constructor() {
|
|
2298
2304
|
this.clear();
|
|
2299
2305
|
}
|
|
2300
2306
|
registryObserver(input, formId) {
|
|
2301
2307
|
// console.log('registryObserver', input);
|
|
2302
|
-
this.observers[formId + input.propertyName] = { input, options: new BehaviorSubject([]) };
|
|
2303
2308
|
const dependsOn = this.getDependsOnKey(input, formId);
|
|
2309
|
+
this.observers[formId + input.propertyName] = { input, options: new BehaviorSubject([]), formId, sourceKey: dependsOn };
|
|
2304
2310
|
const data = this.dependsOn[dependsOn];
|
|
2305
2311
|
if (data == null) {
|
|
2306
2312
|
this.dependsOn[dependsOn] = { observers: [formId + input.propertyName], value: [] };
|
|
2307
2313
|
}
|
|
2308
|
-
else {
|
|
2309
|
-
|
|
2314
|
+
else if (!data.observers.includes(formId + input.propertyName)) {
|
|
2315
|
+
data.observers.push(formId + input.propertyName);
|
|
2316
|
+
}
|
|
2317
|
+
}
|
|
2318
|
+
/** Registers an input as a possible visibility source, even if it is never rendered. */
|
|
2319
|
+
registrySource(input, formId) {
|
|
2320
|
+
this.sources[formId + input.propertyName] = input;
|
|
2321
|
+
}
|
|
2322
|
+
/** Registers a function that returns the current raw value of an input (e.g. its FormControl value). */
|
|
2323
|
+
registryValueResolver(input, formId, resolver) {
|
|
2324
|
+
this.valueResolvers[formId + input.propertyName] = resolver;
|
|
2325
|
+
}
|
|
2326
|
+
/** Normalizes a raw value into the representation compared against the visibility conditions. */
|
|
2327
|
+
normalizeValue(type, value) {
|
|
2328
|
+
switch (type) {
|
|
2329
|
+
case SmzControlType.DROPDOWN:
|
|
2330
|
+
return value != null && typeof value === 'object' ? value.id : value;
|
|
2331
|
+
case SmzControlType.MULTI_SELECT:
|
|
2332
|
+
return Array.isArray(value) ? value.map((x) => (x != null && typeof x === 'object' ? x.id : x)) : [];
|
|
2333
|
+
default:
|
|
2334
|
+
return value;
|
|
2335
|
+
}
|
|
2336
|
+
}
|
|
2337
|
+
/** Evaluates the visibility of an observer for a given (normalized) source value. */
|
|
2338
|
+
evaluateVisibility(sourceType, value, dependsOn) {
|
|
2339
|
+
let stateCondition = false;
|
|
2340
|
+
switch (sourceType) {
|
|
2341
|
+
case SmzControlType.CHECKBOX:
|
|
2342
|
+
stateCondition = value === true;
|
|
2343
|
+
break;
|
|
2344
|
+
case SmzControlType.MULTI_SELECT:
|
|
2345
|
+
if (dependsOn.conditions != null) {
|
|
2346
|
+
stateCondition = dependsOn.conditions.some(c => Array.isArray(value) && value.some(v => v === c));
|
|
2347
|
+
}
|
|
2348
|
+
else {
|
|
2349
|
+
stateCondition = Array.isArray(value) && value.some(x => x === dependsOn.condition);
|
|
2350
|
+
}
|
|
2351
|
+
break;
|
|
2352
|
+
default:
|
|
2353
|
+
if (dependsOn.conditions != null) {
|
|
2354
|
+
stateCondition = dependsOn.conditions.findIndex(c => c === value) !== -1;
|
|
2355
|
+
}
|
|
2356
|
+
else {
|
|
2357
|
+
stateCondition = value === dependsOn.condition;
|
|
2358
|
+
}
|
|
2359
|
+
break;
|
|
2360
|
+
}
|
|
2361
|
+
return dependsOn.reversed ? !stateCondition : stateCondition;
|
|
2362
|
+
}
|
|
2363
|
+
getCurrentValue(key, source) {
|
|
2364
|
+
const resolver = this.valueResolvers[key];
|
|
2365
|
+
if (resolver != null) {
|
|
2366
|
+
return this.normalizeValue(source.type, resolver());
|
|
2367
|
+
}
|
|
2368
|
+
if (key in this.lastValues) {
|
|
2369
|
+
return this.lastValues[key];
|
|
2370
|
+
}
|
|
2371
|
+
return this.normalizeValue(source.type, source.defaultValue);
|
|
2372
|
+
}
|
|
2373
|
+
/**
|
|
2374
|
+
* Re-evaluates the observers of `sourceKey` from the current state of the source
|
|
2375
|
+
* (hidden source => hidden observers; visible source => computed from its current value)
|
|
2376
|
+
* and cascades through every observer whose visibility changed.
|
|
2377
|
+
*/
|
|
2378
|
+
refreshObservers(sourceKey, visited) {
|
|
2379
|
+
if (visited.has(sourceKey)) {
|
|
2380
|
+
return;
|
|
2381
|
+
}
|
|
2382
|
+
visited.add(sourceKey);
|
|
2383
|
+
const source = this.sources[sourceKey];
|
|
2384
|
+
const data = this.dependsOn[sourceKey];
|
|
2385
|
+
if (source == null || data == null) {
|
|
2386
|
+
return;
|
|
2310
2387
|
}
|
|
2388
|
+
const sourceVisible = source.isVisible !== false;
|
|
2389
|
+
const value = sourceVisible ? this.getCurrentValue(sourceKey, source) : null;
|
|
2390
|
+
for (const observerKey of data.observers) {
|
|
2391
|
+
const match = this.observers[observerKey];
|
|
2392
|
+
if (match == null) {
|
|
2393
|
+
continue;
|
|
2394
|
+
}
|
|
2395
|
+
const next = sourceVisible ? this.evaluateVisibility(source.type, value, match.input.visibilityDependsOn) : false;
|
|
2396
|
+
const previous = match.input.isVisible !== false;
|
|
2397
|
+
match.input.isVisible = next;
|
|
2398
|
+
if (previous !== next) {
|
|
2399
|
+
this.refreshObservers(observerKey, visited);
|
|
2400
|
+
}
|
|
2401
|
+
}
|
|
2402
|
+
}
|
|
2403
|
+
/** Must be called whenever the visibility of an input changes outside of the dependency flow. */
|
|
2404
|
+
notifyVisibilityChanged(input, formId) {
|
|
2405
|
+
this.refreshObservers(formId + input.propertyName, new Set());
|
|
2311
2406
|
}
|
|
2312
2407
|
getDependsOnKey(input, formId) {
|
|
2313
2408
|
// console.log('getDependsOnKey input', input);
|
|
@@ -2350,7 +2445,17 @@ class SmzFormsVisibilityService {
|
|
|
2350
2445
|
}
|
|
2351
2446
|
// console.log('this.dependsOn[dependsOn]', this.dependsOn[dependsOn]);
|
|
2352
2447
|
// console.log('event', onChangeDropdownEvent);
|
|
2448
|
+
this.lastValues[dependsOn] = eventValue;
|
|
2449
|
+
this.sources[dependsOn] ??= input;
|
|
2353
2450
|
this.emitToObservers(input, this.dependsOn[dependsOn].observers, eventValue);
|
|
2451
|
+
// Cascade: observers whose visibility changed must re-evaluate their own observers.
|
|
2452
|
+
const visited = new Set([dependsOn]);
|
|
2453
|
+
for (const observer of this.dependsOn[dependsOn].observers) {
|
|
2454
|
+
const match = this.observers[observer];
|
|
2455
|
+
if (match != null) {
|
|
2456
|
+
this.refreshObservers(observer, visited);
|
|
2457
|
+
}
|
|
2458
|
+
}
|
|
2354
2459
|
}
|
|
2355
2460
|
emitToObservers(input, observers, value) {
|
|
2356
2461
|
// console.log('-------');
|
|
@@ -2361,47 +2466,16 @@ class SmzFormsVisibilityService {
|
|
|
2361
2466
|
console.warn('Observer não encontrado.', observer);
|
|
2362
2467
|
}
|
|
2363
2468
|
else {
|
|
2364
|
-
|
|
2365
|
-
let stateCondition = false;
|
|
2366
|
-
switch (input.type) {
|
|
2367
|
-
case SmzControlType.CHECKBOX:
|
|
2368
|
-
stateCondition = value === true;
|
|
2369
|
-
break;
|
|
2370
|
-
case SmzControlType.DROPDOWN:
|
|
2371
|
-
if (match.input.visibilityDependsOn.conditions != null) {
|
|
2372
|
-
stateCondition = match.input.visibilityDependsOn.conditions.findIndex(c => c === value) !== -1;
|
|
2373
|
-
}
|
|
2374
|
-
else {
|
|
2375
|
-
stateCondition = value === match.input.visibilityDependsOn.condition;
|
|
2376
|
-
}
|
|
2377
|
-
break;
|
|
2378
|
-
case SmzControlType.RADIO:
|
|
2379
|
-
if (match.input.visibilityDependsOn.conditions != null) {
|
|
2380
|
-
stateCondition = match.input.visibilityDependsOn.conditions.findIndex(c => c === value) !== -1;
|
|
2381
|
-
}
|
|
2382
|
-
else {
|
|
2383
|
-
stateCondition = value === match.input.visibilityDependsOn.condition;
|
|
2384
|
-
}
|
|
2385
|
-
break;
|
|
2386
|
-
case SmzControlType.MULTI_SELECT:
|
|
2387
|
-
if (match.input.visibilityDependsOn.conditions != null) {
|
|
2388
|
-
stateCondition = match.input.visibilityDependsOn.conditions?.some(c => value.some(v => v === c));
|
|
2389
|
-
}
|
|
2390
|
-
else {
|
|
2391
|
-
stateCondition = value?.some(x => x === match.input.visibilityDependsOn.condition);
|
|
2392
|
-
}
|
|
2393
|
-
break;
|
|
2394
|
-
default:
|
|
2395
|
-
break;
|
|
2396
|
-
}
|
|
2397
|
-
// console.log('stateCondition', stateCondition);
|
|
2398
|
-
match.input.isVisible = !match.input.visibilityDependsOn.reversed && stateCondition || match.input.visibilityDependsOn.reversed && !stateCondition;
|
|
2469
|
+
match.input.isVisible = this.evaluateVisibility(input.type, value, match.input.visibilityDependsOn);
|
|
2399
2470
|
}
|
|
2400
2471
|
}
|
|
2401
2472
|
}
|
|
2402
2473
|
clear() {
|
|
2403
2474
|
this.dependsOn = {};
|
|
2404
2475
|
this.observers = {};
|
|
2476
|
+
this.sources = {};
|
|
2477
|
+
this.valueResolvers = {};
|
|
2478
|
+
this.lastValues = {};
|
|
2405
2479
|
}
|
|
2406
2480
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: SmzFormsVisibilityService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2407
2481
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: SmzFormsVisibilityService, providedIn: 'root' });
|
|
@@ -2526,43 +2600,13 @@ class SmzFormsManagerService {
|
|
|
2526
2600
|
}
|
|
2527
2601
|
}
|
|
2528
2602
|
setupVisibilityServices(inputData, form) {
|
|
2603
|
+
this.service.registrySource(inputData, form.formId);
|
|
2529
2604
|
if (inputData.visibilityDependsOn != null) {
|
|
2530
2605
|
this.service.registryObserver(inputData, form.formId);
|
|
2531
2606
|
if (inputData.visibilityDependsOn.formId == null) {
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
if (input.propertyName === inputData.visibilityDependsOn.propertyName) {
|
|
2536
|
-
let eventValue = null;
|
|
2537
|
-
switch (input.type) {
|
|
2538
|
-
case SmzControlType.CHECKBOX:
|
|
2539
|
-
eventValue = input.defaultValue;
|
|
2540
|
-
break;
|
|
2541
|
-
case SmzControlType.DROPDOWN:
|
|
2542
|
-
if (inputData.visibilityDependsOn.conditions != null) {
|
|
2543
|
-
eventValue = inputData.visibilityDependsOn.conditions.findIndex(c => c === input.defaultValue) !== -1;
|
|
2544
|
-
}
|
|
2545
|
-
else {
|
|
2546
|
-
eventValue = input.defaultValue === inputData.visibilityDependsOn.condition;
|
|
2547
|
-
}
|
|
2548
|
-
break;
|
|
2549
|
-
case SmzControlType.MULTI_SELECT:
|
|
2550
|
-
if (inputData.visibilityDependsOn.conditions != null) {
|
|
2551
|
-
// console.log('inputData.visibilityDependsOn.conditions', inputData.visibilityDependsOn.conditions);
|
|
2552
|
-
eventValue = inputData.visibilityDependsOn.conditions?.some(c => input.defaultValue?.some(v => v === c));
|
|
2553
|
-
}
|
|
2554
|
-
else {
|
|
2555
|
-
eventValue = input.defaultValue.some(x => x === inputData.visibilityDependsOn.condition);
|
|
2556
|
-
}
|
|
2557
|
-
break;
|
|
2558
|
-
default:
|
|
2559
|
-
break;
|
|
2560
|
-
}
|
|
2561
|
-
// console.log('input', input);
|
|
2562
|
-
// console.log('inputData', inputData);
|
|
2563
|
-
inputData.isVisible = !inputData.visibilityDependsOn.reversed && eventValue || inputData.visibilityDependsOn.reversed && !eventValue;
|
|
2564
|
-
}
|
|
2565
|
-
}
|
|
2607
|
+
const visible = this.resolveInitialVisibility(inputData, form, new Set());
|
|
2608
|
+
if (visible != null) {
|
|
2609
|
+
inputData.isVisible = visible;
|
|
2566
2610
|
}
|
|
2567
2611
|
}
|
|
2568
2612
|
else {
|
|
@@ -2570,6 +2614,43 @@ class SmzFormsManagerService {
|
|
|
2570
2614
|
}
|
|
2571
2615
|
}
|
|
2572
2616
|
}
|
|
2617
|
+
/** Registers how to read the current raw value of an input (used when visibility is re-evaluated). */
|
|
2618
|
+
setupVisibilityValueResolver(inputData, form, resolver) {
|
|
2619
|
+
this.service.registryValueResolver(inputData, form.formId, resolver);
|
|
2620
|
+
}
|
|
2621
|
+
/** Re-evaluates (and cascades) the observers of an input whose visibility changed. */
|
|
2622
|
+
notifyVisibilityChanged(inputData, form) {
|
|
2623
|
+
this.service.notifyVisibilityChanged(inputData, form.formId);
|
|
2624
|
+
}
|
|
2625
|
+
/**
|
|
2626
|
+
* Initial visibility from the dependency's default value. A hidden dependency hides its observers;
|
|
2627
|
+
* the chain is resolved recursively (guarded against circular dependencies).
|
|
2628
|
+
*/
|
|
2629
|
+
resolveInitialVisibility(inputData, form, seen) {
|
|
2630
|
+
const dependsOn = inputData.visibilityDependsOn;
|
|
2631
|
+
if (dependsOn == null || dependsOn.formId != null || seen.has(inputData)) {
|
|
2632
|
+
return inputData.isVisible ?? true;
|
|
2633
|
+
}
|
|
2634
|
+
seen.add(inputData);
|
|
2635
|
+
for (const group of form.groups) {
|
|
2636
|
+
for (const input of group.children) {
|
|
2637
|
+
if (input.propertyName === dependsOn.propertyName) {
|
|
2638
|
+
if (input.visibilityDependsOn != null) {
|
|
2639
|
+
const sourceVisible = this.resolveInitialVisibility(input, form, seen);
|
|
2640
|
+
if (sourceVisible === false) {
|
|
2641
|
+
return false;
|
|
2642
|
+
}
|
|
2643
|
+
}
|
|
2644
|
+
else if (input.isVisible === false) {
|
|
2645
|
+
return false;
|
|
2646
|
+
}
|
|
2647
|
+
const value = this.service.normalizeValue(input.type, input.defaultValue);
|
|
2648
|
+
return this.service.evaluateVisibility(input.type, value, dependsOn);
|
|
2649
|
+
}
|
|
2650
|
+
}
|
|
2651
|
+
}
|
|
2652
|
+
return null;
|
|
2653
|
+
}
|
|
2573
2654
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: SmzFormsManagerService, deps: [{ token: SmzFormsDropdownService }, { token: SmzFormsVisibilityService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2574
2655
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: SmzFormsManagerService, providedIn: 'root' });
|
|
2575
2656
|
}
|
|
@@ -4011,7 +4092,11 @@ class InputListComponent {
|
|
|
4011
4092
|
this.editWithDialog(option);
|
|
4012
4093
|
break;
|
|
4013
4094
|
case 'inline':
|
|
4095
|
+
// Monta o estado aqui: nao depende de `onClick` ter rodado antes nem da ordem de eventos do listbox.
|
|
4096
|
+
this.current = option;
|
|
4097
|
+
this.editForm = this.createEditForm(option.name);
|
|
4014
4098
|
this.isInlineEditingEnabled = true;
|
|
4099
|
+
this.cdf.markForCheck();
|
|
4015
4100
|
break;
|
|
4016
4101
|
default:
|
|
4017
4102
|
break;
|
|
@@ -4029,6 +4114,13 @@ class InputListComponent {
|
|
|
4029
4114
|
const value = this.editForm.get('value').value;
|
|
4030
4115
|
this.confirmEdit(option, value);
|
|
4031
4116
|
this.isInlineEditingEnabled = false;
|
|
4117
|
+
this.editForm = null;
|
|
4118
|
+
}
|
|
4119
|
+
onInlineEditorEnter(event, option) {
|
|
4120
|
+
event.preventDefault();
|
|
4121
|
+
if (this.editForm?.valid) {
|
|
4122
|
+
this.onConfirmInlineEditing(option);
|
|
4123
|
+
}
|
|
4032
4124
|
}
|
|
4033
4125
|
confirmEdit(old, newName) {
|
|
4034
4126
|
// add new item
|
|
@@ -4041,6 +4133,7 @@ class InputListComponent {
|
|
|
4041
4133
|
}
|
|
4042
4134
|
cancelEdit() {
|
|
4043
4135
|
this.isInlineEditingEnabled = false;
|
|
4136
|
+
this.editForm = null;
|
|
4044
4137
|
}
|
|
4045
4138
|
onAdd() {
|
|
4046
4139
|
this.actions$.pipe(ofActionDispatched(DialogsActions.ShowInputListCreationCrudDialogSuccess), take(1)).subscribe((event) => {
|
|
@@ -4083,7 +4176,7 @@ class InputListComponent {
|
|
|
4083
4176
|
return form;
|
|
4084
4177
|
}
|
|
4085
4178
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: InputListComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$3.Store }, { token: i1$3.Actions }, { token: i1$1.UntypedFormBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
4086
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: InputListComponent, isStandalone: false, selector: "smz-input-list", inputs: { input: "input", control: "control", behaviors: "behaviors" }, ngImport: i0, template: "<smz-label\n class=\"smz__input_name\"\n [text]=\"input.name\"\n [propertyName]=\"input.propertyName\"\n [showLabel]=\"input.hideName == false && input.hideLabel != true\"\n [warning]=\"input.warning?.()\"\n [help]=\"input.tooltip?.()\"\n [popover]=\"input.popover?.()\">\n</smz-label>\n\n<div class=\"input_inner__wrapper\">\n <ui-listbox [options]=\"input.listBoxOptions\" [metaKeySelection]=\"false\" [checkbox]=\"false\" [filter]=\"input.showFilter\" optionLabel=\"name\" dataKey=\"id\" [listStyle]=\"{'height': input.height ? input.height : '200px'}\" [style]=\"{'width':'100%'}\" [styleClass]=\"input.styleClass\" [disabled]=\"input.isDisabled\" (clicked)=\"onClick($event)\" [readonly]=\"isInlineEditingEnabled\" [emptyMessage]=\"input.emptyMessage\" [(ngModel)]=\"current\">\n\n <ng-template smzTemplate=\"header\">\n <div class=\"smz__list-header\">\n @if (input.showAddButton && !input.allowBatchCreation) {\n <button smzButton type=\"button\" icon=\"fa-solid fa-plus\" clickStopPropagation class=\"p-nocustom\" (click)=\"onAdd()\" [disabled]=\"input.limitCount != null && input.listBoxOptions?.length >= input.limitCount\" smzTooltip=\"Adicionar novo item\" [rounded]=\"true\" variant=\"text\"></button>\n }\n @if (input.showAddButton && input.allowBatchCreation) {\n <button smzButton type=\"button\" icon=\"fa-solid fa-plus\" clickStopPropagation class=\"p-nocustom\" (click)=\"onAddInBatch()\" smzTooltip=\"Adicionar novos itens\" [rounded]=\"true\" variant=\"text\"></button>\n }\n @if (input.showSortButton) {\n <button smzButton type=\"button\" icon=\"fa-solid fa-arrow-down-a-z\" clickStopPropagation class=\"p-nocustom\" (click)=\"onSort()\" smzTooltip=\"Reordenar\" [rounded]=\"true\" variant=\"text\"></button>\n }\n @if (input.showClearButton) {\n <button smzButton type=\"button\" icon=\"fa-solid fa-trash\" clickStopPropagation class=\"p-nocustom\" (click)=\"onClear()\" smzTooltip=\"Limpar a lista\" [rounded]=\"true\" variant=\"text\"></button>\n }\n </div>\n </ng-template>\n\n <ng-template let-item smzTemplate=\"item\">\n <div class=\"flex flex-wrap items-center w-full justify-between\">\n @if (!isInlineEditingEnabled || (isInlineEditingEnabled && current !== item)) {\n @if (input.crud?.inputType === 'float') {\n <div class=\"smz__list_item-title\">{{ item.name | number : input.crud.digitsInfo : input.crud.labelLocale }}</div>\n } @else {\n <div class=\"smz__list_item-title\">{{ item.name }}</div>\n }\n }\n\n @if (isInlineEditingEnabled && current === item) {\n @if (editForm != null) {\n <div class=\"flex-1 flex flex-wrap items-center justify-center py-3 px-0 -m-2\" clickStopPropagation>\n <form #form [formGroup]=\"editForm\" class=\"flex-1 relative p-2\">\n <input type=\"text\" clickStopPropagation smzInputText formControlName=\"value\"/>\n @if (editForm.get('value'); as valueInput) {\n @if (valueInput.touched && valueInput.hasError('required')) {\n <div class=\"text-xs text-red-500 absolute right-3 my-1\">Campo Obrigat\u00F3rio.</div>\n }\n @if (valueInput.touched && valueInput.hasError('unique')) {\n <div class=\"text-xs text-red-500 absolute right-3 my-1\">J\u00E1 existe um item com esse nome.</div>\n }\n }\n </form>\n <button smzButton type=\"button\" icon=\"fa-solid fa-check\" clickStopPropagation [disabled]=\"!editForm.valid\" class=\"p-nocustom inline_action_button p-2\" (click)=\"onConfirmInlineEditing(item)\" [rounded]=\"true\" severity=\"success\" variant=\"text\"></button>\n <button smzButton type=\"button\" icon=\"fa-solid fa-xmark\" clickStopPropagation class=\"p-nocustom inline_action_button p-2\" (click)=\"cancelEdit()\" [rounded]=\"true\" severity=\"danger\" variant=\"text\"></button>\n </div>\n }\n }\n\n @if (current === item && !isInlineEditingEnabled) {\n <div class=\"smz__list_item-actions\" clickStopPropagation>\n @if (input.showEditButton) {\n <button clickStopPropagation smzButton type=\"button\" icon=\"fa-solid fa-pencil\" class=\"p-nocustom\" (click)=\"onEdit(item)\" [rounded]=\"true\" variant=\"text\"></button>\n }\n @if (input.showRemoveButton) {\n <button clickStopPropagation smzButton type=\"button\" icon=\"fa-solid fa-trash\" class=\"p-nocustom\" (click)=\"input.askBeforeRemoveItem ? askBeforeRemove(item) : remove(item)\" [rounded]=\"true\" variant=\"text\"></button>\n }\n @if (input.showMoveButton) {\n <button clickStopPropagation smzButton type=\"button\" icon=\"fa-solid fa-arrow-up\" class=\"p-nocustom\" (click)=\"moveUp(item)\" [rounded]=\"true\" variant=\"text\"></button>\n }\n @if (input.showMoveButton) {\n <button clickStopPropagation smzButton type=\"button\" icon=\"fa-solid fa-arrow-down\" class=\"p-nocustom\" (click)=\"moveDown(item)\" [rounded]=\"true\" variant=\"text\"></button>\n }\n </div>\n }\n\n </div>\n </ng-template>\n\n <ng-template smzTemplate=\"footer\">\n @if (input.listBoxOptions.length === 0 && input.validatorsPreset?.isRequired) {\n <span class=\"w-full flex-none smz__footer-message p-2\">*Campo obrigat\u00F3rio</span>\n }\n @if (input.limitCount != null && input.listBoxOptions?.length === input.limitCount) {\n <span class=\"w-full flex-none smz__footer-message text-blue-300 p-2\">*Limite atingido.</span>\n }\n @if (input.limitCount != null && input.listBoxOptions?.length > input.limitCount) {\n <span class=\"w-full flex-none smz__footer-message p-2\">*Limite ultrapassado</span>\n }\n </ng-template>\n </ui-listbox>\n</div>", dependencies: [{ kind: "directive", type: ClickStopPropagationDirective, selector: "[clickStopPropagation]" }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.SmzInputTextDirective, selector: "input[smzInputText]", inputs: ["size", "invalid"] }, { kind: "component", type: i2.SmzListboxComponent, selector: "ui-listbox", inputs: ["options", "optionLabel", "optionValue", "optionDisabled", "dataKey", "multiple", "checkbox", "filter", "filterBy", "filterMatchMode", "metaKeySelection", "readonly", "emptyMessage", "emptyFilterMessage", "listStyle", "style", "styleClass"], outputs: ["changed", "clicked"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2.SmzTooltipDirective, selector: "[smzTooltip]", inputs: ["smzTooltip", "tooltipPosition", "showDelay", "hideDelay", "tooltipEvent", "escape", "tooltipStyleClass", "tooltipZIndex", "tooltipDisabled", "tooltipOptions", "appendTo"] }, { kind: "component", type: i2.SmzButtonComponent, selector: "button[smzButton], a[smzButton]", inputs: ["label", "icon", "iconPosition", "severity", "variant", "size", "text", "outlined", "rounded", "loading", "styleClass"] }, { kind: "component", type: LabelComponent, selector: "smz-label", inputs: ["text", "propertyName", "showLabel", "warning", "help", "popover"] }, { kind: "pipe", type: i1.DecimalPipe, name: "number" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4179
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: InputListComponent, isStandalone: false, selector: "smz-input-list", inputs: { input: "input", control: "control", behaviors: "behaviors" }, ngImport: i0, template: "<smz-label\n class=\"smz__input_name\"\n [text]=\"input.name\"\n [propertyName]=\"input.propertyName\"\n [showLabel]=\"input.hideName == false && input.hideLabel != true\"\n [warning]=\"input.warning?.()\"\n [help]=\"input.tooltip?.()\"\n [popover]=\"input.popover?.()\">\n</smz-label>\n\n<div class=\"input_inner__wrapper\">\n <ui-listbox [options]=\"input.listBoxOptions\" [metaKeySelection]=\"false\" [checkbox]=\"false\" [filter]=\"input.showFilter\" optionLabel=\"name\" dataKey=\"id\" [listStyle]=\"{'height': input.height ? input.height : '200px'}\" [style]=\"{'width':'100%'}\" [styleClass]=\"input.styleClass\" [disabled]=\"input.isDisabled\" (clicked)=\"onClick($event)\" [readonly]=\"isInlineEditingEnabled\" [emptyMessage]=\"input.emptyMessage\" [(ngModel)]=\"current\">\n\n <ng-template smzTemplate=\"header\">\n <div class=\"smz__list-header\">\n @if (input.showAddButton && !input.allowBatchCreation) {\n <button smzButton type=\"button\" icon=\"fa-solid fa-plus\" clickStopPropagation class=\"p-nocustom\" (click)=\"onAdd()\" [disabled]=\"input.limitCount != null && input.listBoxOptions?.length >= input.limitCount\" smzTooltip=\"Adicionar novo item\" [rounded]=\"true\" variant=\"text\"></button>\n }\n @if (input.showAddButton && input.allowBatchCreation) {\n <button smzButton type=\"button\" icon=\"fa-solid fa-plus\" clickStopPropagation class=\"p-nocustom\" (click)=\"onAddInBatch()\" smzTooltip=\"Adicionar novos itens\" [rounded]=\"true\" variant=\"text\"></button>\n }\n @if (input.showSortButton) {\n <button smzButton type=\"button\" icon=\"fa-solid fa-arrow-down-a-z\" clickStopPropagation class=\"p-nocustom\" (click)=\"onSort()\" smzTooltip=\"Reordenar\" [rounded]=\"true\" variant=\"text\"></button>\n }\n @if (input.showClearButton) {\n <button smzButton type=\"button\" icon=\"fa-solid fa-trash\" clickStopPropagation class=\"p-nocustom\" (click)=\"onClear()\" smzTooltip=\"Limpar a lista\" [rounded]=\"true\" variant=\"text\"></button>\n }\n </div>\n </ng-template>\n\n <ng-template let-item smzTemplate=\"item\">\n <div class=\"flex flex-wrap items-center w-full justify-between\">\n @if (!isInlineEditingEnabled || (isInlineEditingEnabled && current !== item)) {\n @if (input.crud?.inputType === 'float') {\n <div class=\"smz__list_item-title\">{{ item.name | number : input.crud.digitsInfo : input.crud.labelLocale }}</div>\n } @else {\n <div class=\"smz__list_item-title\">{{ item.name }}</div>\n }\n }\n\n @if (isInlineEditingEnabled && current === item) {\n @if (editForm != null) {\n <div class=\"flex-1 flex flex-wrap items-center justify-center py-3 px-0 -m-2\" clickStopPropagation (keydown)=\"$event.stopPropagation()\">\n <form #form [formGroup]=\"editForm\" class=\"flex-1 relative p-2\">\n <input type=\"text\" clickStopPropagation smzInputText formControlName=\"value\" (keydown.enter)=\"onInlineEditorEnter($event, item)\"/>\n @if (editForm.get('value'); as valueInput) {\n @if (valueInput.touched && valueInput.hasError('required')) {\n <div class=\"text-xs text-red-500 absolute right-3 my-1\">Campo Obrigat\u00F3rio.</div>\n }\n @if (valueInput.touched && valueInput.hasError('unique')) {\n <div class=\"text-xs text-red-500 absolute right-3 my-1\">J\u00E1 existe um item com esse nome.</div>\n }\n }\n </form>\n <button smzButton type=\"button\" icon=\"fa-solid fa-check\" clickStopPropagation [disabled]=\"!editForm.valid\" class=\"p-nocustom inline_action_button p-2\" (click)=\"onConfirmInlineEditing(item)\" [rounded]=\"true\" severity=\"success\" variant=\"text\"></button>\n <button smzButton type=\"button\" icon=\"fa-solid fa-xmark\" clickStopPropagation class=\"p-nocustom inline_action_button p-2\" (click)=\"cancelEdit()\" [rounded]=\"true\" severity=\"danger\" variant=\"text\"></button>\n </div>\n }\n }\n\n @if (current === item && !isInlineEditingEnabled) {\n <div class=\"smz__list_item-actions\" clickStopPropagation (keydown)=\"$event.stopPropagation()\">\n @if (input.showEditButton) {\n <button clickStopPropagation smzButton type=\"button\" icon=\"fa-solid fa-pencil\" class=\"p-nocustom\" (click)=\"onEdit(item)\" [rounded]=\"true\" variant=\"text\"></button>\n }\n @if (input.showRemoveButton) {\n <button clickStopPropagation smzButton type=\"button\" icon=\"fa-solid fa-trash\" class=\"p-nocustom\" (click)=\"input.askBeforeRemoveItem ? askBeforeRemove(item) : remove(item)\" [rounded]=\"true\" variant=\"text\"></button>\n }\n @if (input.showMoveButton) {\n <button clickStopPropagation smzButton type=\"button\" icon=\"fa-solid fa-arrow-up\" class=\"p-nocustom\" (click)=\"moveUp(item)\" [rounded]=\"true\" variant=\"text\"></button>\n }\n @if (input.showMoveButton) {\n <button clickStopPropagation smzButton type=\"button\" icon=\"fa-solid fa-arrow-down\" class=\"p-nocustom\" (click)=\"moveDown(item)\" [rounded]=\"true\" variant=\"text\"></button>\n }\n </div>\n }\n\n </div>\n </ng-template>\n\n <ng-template smzTemplate=\"footer\">\n @if (input.listBoxOptions.length === 0 && input.validatorsPreset?.isRequired) {\n <span class=\"w-full flex-none smz__footer-message p-2\">*Campo obrigat\u00F3rio</span>\n }\n @if (input.limitCount != null && input.listBoxOptions?.length === input.limitCount) {\n <span class=\"w-full flex-none smz__footer-message text-blue-300 p-2\">*Limite atingido.</span>\n }\n @if (input.limitCount != null && input.listBoxOptions?.length > input.limitCount) {\n <span class=\"w-full flex-none smz__footer-message p-2\">*Limite ultrapassado</span>\n }\n </ng-template>\n </ui-listbox>\n</div>", dependencies: [{ kind: "directive", type: ClickStopPropagationDirective, selector: "[clickStopPropagation]" }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.SmzInputTextDirective, selector: "input[smzInputText]", inputs: ["size", "invalid"] }, { kind: "component", type: i2.SmzListboxComponent, selector: "ui-listbox", inputs: ["options", "optionLabel", "optionValue", "optionDisabled", "dataKey", "multiple", "checkbox", "filter", "filterBy", "filterMatchMode", "metaKeySelection", "readonly", "emptyMessage", "emptyFilterMessage", "listStyle", "style", "styleClass"], outputs: ["changed", "clicked"] }, { kind: "directive", type: i2.SmzTemplateDirective, selector: "ng-template[smzTemplate]", inputs: ["smzTemplate"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2.SmzTooltipDirective, selector: "[smzTooltip]", inputs: ["smzTooltip", "tooltipPosition", "showDelay", "hideDelay", "tooltipEvent", "escape", "tooltipStyleClass", "tooltipZIndex", "tooltipDisabled", "tooltipOptions", "appendTo"] }, { kind: "component", type: i2.SmzButtonComponent, selector: "button[smzButton], a[smzButton]", inputs: ["label", "icon", "iconPosition", "severity", "variant", "size", "text", "outlined", "rounded", "loading", "styleClass"] }, { kind: "component", type: LabelComponent, selector: "smz-label", inputs: ["text", "propertyName", "showLabel", "warning", "help", "popover"] }, { kind: "pipe", type: i1.DecimalPipe, name: "number" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4087
4180
|
}
|
|
4088
4181
|
__decorate([
|
|
4089
4182
|
Confirmable('Deseja realmente excluir esse item ?', 'Exclusão')
|
|
@@ -4093,7 +4186,7 @@ __decorate([
|
|
|
4093
4186
|
], InputListComponent.prototype, "onClear", null);
|
|
4094
4187
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: InputListComponent, decorators: [{
|
|
4095
4188
|
type: Component,
|
|
4096
|
-
args: [{ selector: 'smz-input-list', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<smz-label\n class=\"smz__input_name\"\n [text]=\"input.name\"\n [propertyName]=\"input.propertyName\"\n [showLabel]=\"input.hideName == false && input.hideLabel != true\"\n [warning]=\"input.warning?.()\"\n [help]=\"input.tooltip?.()\"\n [popover]=\"input.popover?.()\">\n</smz-label>\n\n<div class=\"input_inner__wrapper\">\n <ui-listbox [options]=\"input.listBoxOptions\" [metaKeySelection]=\"false\" [checkbox]=\"false\" [filter]=\"input.showFilter\" optionLabel=\"name\" dataKey=\"id\" [listStyle]=\"{'height': input.height ? input.height : '200px'}\" [style]=\"{'width':'100%'}\" [styleClass]=\"input.styleClass\" [disabled]=\"input.isDisabled\" (clicked)=\"onClick($event)\" [readonly]=\"isInlineEditingEnabled\" [emptyMessage]=\"input.emptyMessage\" [(ngModel)]=\"current\">\n\n <ng-template smzTemplate=\"header\">\n <div class=\"smz__list-header\">\n @if (input.showAddButton && !input.allowBatchCreation) {\n <button smzButton type=\"button\" icon=\"fa-solid fa-plus\" clickStopPropagation class=\"p-nocustom\" (click)=\"onAdd()\" [disabled]=\"input.limitCount != null && input.listBoxOptions?.length >= input.limitCount\" smzTooltip=\"Adicionar novo item\" [rounded]=\"true\" variant=\"text\"></button>\n }\n @if (input.showAddButton && input.allowBatchCreation) {\n <button smzButton type=\"button\" icon=\"fa-solid fa-plus\" clickStopPropagation class=\"p-nocustom\" (click)=\"onAddInBatch()\" smzTooltip=\"Adicionar novos itens\" [rounded]=\"true\" variant=\"text\"></button>\n }\n @if (input.showSortButton) {\n <button smzButton type=\"button\" icon=\"fa-solid fa-arrow-down-a-z\" clickStopPropagation class=\"p-nocustom\" (click)=\"onSort()\" smzTooltip=\"Reordenar\" [rounded]=\"true\" variant=\"text\"></button>\n }\n @if (input.showClearButton) {\n <button smzButton type=\"button\" icon=\"fa-solid fa-trash\" clickStopPropagation class=\"p-nocustom\" (click)=\"onClear()\" smzTooltip=\"Limpar a lista\" [rounded]=\"true\" variant=\"text\"></button>\n }\n </div>\n </ng-template>\n\n <ng-template let-item smzTemplate=\"item\">\n <div class=\"flex flex-wrap items-center w-full justify-between\">\n @if (!isInlineEditingEnabled || (isInlineEditingEnabled && current !== item)) {\n @if (input.crud?.inputType === 'float') {\n <div class=\"smz__list_item-title\">{{ item.name | number : input.crud.digitsInfo : input.crud.labelLocale }}</div>\n } @else {\n <div class=\"smz__list_item-title\">{{ item.name }}</div>\n }\n }\n\n @if (isInlineEditingEnabled && current === item) {\n @if (editForm != null) {\n <div class=\"flex-1 flex flex-wrap items-center justify-center py-3 px-0 -m-2\" clickStopPropagation>\n <form #form [formGroup]=\"editForm\" class=\"flex-1 relative p-2\">\n <input type=\"text\" clickStopPropagation smzInputText formControlName=\"value\"/>\n @if (editForm.get('value'); as valueInput) {\n @if (valueInput.touched && valueInput.hasError('required')) {\n <div class=\"text-xs text-red-500 absolute right-3 my-1\">Campo Obrigat\u00F3rio.</div>\n }\n @if (valueInput.touched && valueInput.hasError('unique')) {\n <div class=\"text-xs text-red-500 absolute right-3 my-1\">J\u00E1 existe um item com esse nome.</div>\n }\n }\n </form>\n <button smzButton type=\"button\" icon=\"fa-solid fa-check\" clickStopPropagation [disabled]=\"!editForm.valid\" class=\"p-nocustom inline_action_button p-2\" (click)=\"onConfirmInlineEditing(item)\" [rounded]=\"true\" severity=\"success\" variant=\"text\"></button>\n <button smzButton type=\"button\" icon=\"fa-solid fa-xmark\" clickStopPropagation class=\"p-nocustom inline_action_button p-2\" (click)=\"cancelEdit()\" [rounded]=\"true\" severity=\"danger\" variant=\"text\"></button>\n </div>\n }\n }\n\n @if (current === item && !isInlineEditingEnabled) {\n <div class=\"smz__list_item-actions\" clickStopPropagation>\n @if (input.showEditButton) {\n <button clickStopPropagation smzButton type=\"button\" icon=\"fa-solid fa-pencil\" class=\"p-nocustom\" (click)=\"onEdit(item)\" [rounded]=\"true\" variant=\"text\"></button>\n }\n @if (input.showRemoveButton) {\n <button clickStopPropagation smzButton type=\"button\" icon=\"fa-solid fa-trash\" class=\"p-nocustom\" (click)=\"input.askBeforeRemoveItem ? askBeforeRemove(item) : remove(item)\" [rounded]=\"true\" variant=\"text\"></button>\n }\n @if (input.showMoveButton) {\n <button clickStopPropagation smzButton type=\"button\" icon=\"fa-solid fa-arrow-up\" class=\"p-nocustom\" (click)=\"moveUp(item)\" [rounded]=\"true\" variant=\"text\"></button>\n }\n @if (input.showMoveButton) {\n <button clickStopPropagation smzButton type=\"button\" icon=\"fa-solid fa-arrow-down\" class=\"p-nocustom\" (click)=\"moveDown(item)\" [rounded]=\"true\" variant=\"text\"></button>\n }\n </div>\n }\n\n </div>\n </ng-template>\n\n <ng-template smzTemplate=\"footer\">\n @if (input.listBoxOptions.length === 0 && input.validatorsPreset?.isRequired) {\n <span class=\"w-full flex-none smz__footer-message p-2\">*Campo obrigat\u00F3rio</span>\n }\n @if (input.limitCount != null && input.listBoxOptions?.length === input.limitCount) {\n <span class=\"w-full flex-none smz__footer-message text-blue-300 p-2\">*Limite atingido.</span>\n }\n @if (input.limitCount != null && input.listBoxOptions?.length > input.limitCount) {\n <span class=\"w-full flex-none smz__footer-message p-2\">*Limite ultrapassado</span>\n }\n </ng-template>\n </ui-listbox>\n</div>" }]
|
|
4189
|
+
args: [{ selector: 'smz-input-list', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<smz-label\n class=\"smz__input_name\"\n [text]=\"input.name\"\n [propertyName]=\"input.propertyName\"\n [showLabel]=\"input.hideName == false && input.hideLabel != true\"\n [warning]=\"input.warning?.()\"\n [help]=\"input.tooltip?.()\"\n [popover]=\"input.popover?.()\">\n</smz-label>\n\n<div class=\"input_inner__wrapper\">\n <ui-listbox [options]=\"input.listBoxOptions\" [metaKeySelection]=\"false\" [checkbox]=\"false\" [filter]=\"input.showFilter\" optionLabel=\"name\" dataKey=\"id\" [listStyle]=\"{'height': input.height ? input.height : '200px'}\" [style]=\"{'width':'100%'}\" [styleClass]=\"input.styleClass\" [disabled]=\"input.isDisabled\" (clicked)=\"onClick($event)\" [readonly]=\"isInlineEditingEnabled\" [emptyMessage]=\"input.emptyMessage\" [(ngModel)]=\"current\">\n\n <ng-template smzTemplate=\"header\">\n <div class=\"smz__list-header\">\n @if (input.showAddButton && !input.allowBatchCreation) {\n <button smzButton type=\"button\" icon=\"fa-solid fa-plus\" clickStopPropagation class=\"p-nocustom\" (click)=\"onAdd()\" [disabled]=\"input.limitCount != null && input.listBoxOptions?.length >= input.limitCount\" smzTooltip=\"Adicionar novo item\" [rounded]=\"true\" variant=\"text\"></button>\n }\n @if (input.showAddButton && input.allowBatchCreation) {\n <button smzButton type=\"button\" icon=\"fa-solid fa-plus\" clickStopPropagation class=\"p-nocustom\" (click)=\"onAddInBatch()\" smzTooltip=\"Adicionar novos itens\" [rounded]=\"true\" variant=\"text\"></button>\n }\n @if (input.showSortButton) {\n <button smzButton type=\"button\" icon=\"fa-solid fa-arrow-down-a-z\" clickStopPropagation class=\"p-nocustom\" (click)=\"onSort()\" smzTooltip=\"Reordenar\" [rounded]=\"true\" variant=\"text\"></button>\n }\n @if (input.showClearButton) {\n <button smzButton type=\"button\" icon=\"fa-solid fa-trash\" clickStopPropagation class=\"p-nocustom\" (click)=\"onClear()\" smzTooltip=\"Limpar a lista\" [rounded]=\"true\" variant=\"text\"></button>\n }\n </div>\n </ng-template>\n\n <ng-template let-item smzTemplate=\"item\">\n <div class=\"flex flex-wrap items-center w-full justify-between\">\n @if (!isInlineEditingEnabled || (isInlineEditingEnabled && current !== item)) {\n @if (input.crud?.inputType === 'float') {\n <div class=\"smz__list_item-title\">{{ item.name | number : input.crud.digitsInfo : input.crud.labelLocale }}</div>\n } @else {\n <div class=\"smz__list_item-title\">{{ item.name }}</div>\n }\n }\n\n @if (isInlineEditingEnabled && current === item) {\n @if (editForm != null) {\n <div class=\"flex-1 flex flex-wrap items-center justify-center py-3 px-0 -m-2\" clickStopPropagation (keydown)=\"$event.stopPropagation()\">\n <form #form [formGroup]=\"editForm\" class=\"flex-1 relative p-2\">\n <input type=\"text\" clickStopPropagation smzInputText formControlName=\"value\" (keydown.enter)=\"onInlineEditorEnter($event, item)\"/>\n @if (editForm.get('value'); as valueInput) {\n @if (valueInput.touched && valueInput.hasError('required')) {\n <div class=\"text-xs text-red-500 absolute right-3 my-1\">Campo Obrigat\u00F3rio.</div>\n }\n @if (valueInput.touched && valueInput.hasError('unique')) {\n <div class=\"text-xs text-red-500 absolute right-3 my-1\">J\u00E1 existe um item com esse nome.</div>\n }\n }\n </form>\n <button smzButton type=\"button\" icon=\"fa-solid fa-check\" clickStopPropagation [disabled]=\"!editForm.valid\" class=\"p-nocustom inline_action_button p-2\" (click)=\"onConfirmInlineEditing(item)\" [rounded]=\"true\" severity=\"success\" variant=\"text\"></button>\n <button smzButton type=\"button\" icon=\"fa-solid fa-xmark\" clickStopPropagation class=\"p-nocustom inline_action_button p-2\" (click)=\"cancelEdit()\" [rounded]=\"true\" severity=\"danger\" variant=\"text\"></button>\n </div>\n }\n }\n\n @if (current === item && !isInlineEditingEnabled) {\n <div class=\"smz__list_item-actions\" clickStopPropagation (keydown)=\"$event.stopPropagation()\">\n @if (input.showEditButton) {\n <button clickStopPropagation smzButton type=\"button\" icon=\"fa-solid fa-pencil\" class=\"p-nocustom\" (click)=\"onEdit(item)\" [rounded]=\"true\" variant=\"text\"></button>\n }\n @if (input.showRemoveButton) {\n <button clickStopPropagation smzButton type=\"button\" icon=\"fa-solid fa-trash\" class=\"p-nocustom\" (click)=\"input.askBeforeRemoveItem ? askBeforeRemove(item) : remove(item)\" [rounded]=\"true\" variant=\"text\"></button>\n }\n @if (input.showMoveButton) {\n <button clickStopPropagation smzButton type=\"button\" icon=\"fa-solid fa-arrow-up\" class=\"p-nocustom\" (click)=\"moveUp(item)\" [rounded]=\"true\" variant=\"text\"></button>\n }\n @if (input.showMoveButton) {\n <button clickStopPropagation smzButton type=\"button\" icon=\"fa-solid fa-arrow-down\" class=\"p-nocustom\" (click)=\"moveDown(item)\" [rounded]=\"true\" variant=\"text\"></button>\n }\n </div>\n }\n\n </div>\n </ng-template>\n\n <ng-template smzTemplate=\"footer\">\n @if (input.listBoxOptions.length === 0 && input.validatorsPreset?.isRequired) {\n <span class=\"w-full flex-none smz__footer-message p-2\">*Campo obrigat\u00F3rio</span>\n }\n @if (input.limitCount != null && input.listBoxOptions?.length === input.limitCount) {\n <span class=\"w-full flex-none smz__footer-message text-blue-300 p-2\">*Limite atingido.</span>\n }\n @if (input.limitCount != null && input.listBoxOptions?.length > input.limitCount) {\n <span class=\"w-full flex-none smz__footer-message p-2\">*Limite ultrapassado</span>\n }\n </ng-template>\n </ui-listbox>\n</div>" }]
|
|
4097
4190
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1$3.Store }, { type: i1$3.Actions }, { type: i1$1.UntypedFormBuilder }], propDecorators: { input: [{
|
|
4098
4191
|
type: Input
|
|
4099
4192
|
}], control: [{
|
|
@@ -4779,7 +4872,7 @@ class InputTreeComponent {
|
|
|
4779
4872
|
}
|
|
4780
4873
|
}
|
|
4781
4874
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: InputTreeComponent, deps: [{ token: SmzFormsDropdownService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4782
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: InputTreeComponent, isStandalone: false, selector: "smz-input-tree", inputs: { input: "input", formId: "formId", control: "control", behaviors: "behaviors" }, ngImport: i0, template: "@if (nodes$ | async; as nodes) {\n <smz-label\n class=\"smz__input_name\"\n [text]=\"input.name\"\n [propertyName]=\"input.propertyName\"\n [showLabel]=\"input.hideLabel != true\"\n [warning]=\"input.warning?.()\"\n [help]=\"input.tooltip?.()\"\n [popover]=\"input.popover?.()\">\n </smz-label>\n <div class=\"input_inner__wrapper flex flex-wrap\">\n <ui-tree-select class=\"w-full m-0 smz__input_value flex-1\" containerStyleClass=\"w-full\" [formControl]=\"control\" [options]=\"nodes\" [placeholder]=\"input.name\" appendTo=\"body\" [filter]=\"input.showFilter ? true : false\" [selectionMode]=\"input.selectionMode\" [filterInputAutoFocus]=\"input.autofocusFilter\" [emptyMessage]=\"input.emptyMessage\" [showClear]=\"input.showClear\" [filterPlaceholder]=\"input.emptyFilterMessage\" [scrollHeight]=\"input.scrollHeight\" [display]=\"input.display\">\n @for (inputType of input.allTypes; track inputType) {\n <ng-template let-node [smzTemplate]=\"inputType\">\n @if (node != null) {\n <div [innerHTML]=\"node.label | safeHtml\" [smzTooltip]=\"node.tooltip\"></div>\n }\n </ng-template>\n }\n </ui-tree-select>\n <smz-validation-messages [input]=\"input\" [control]=\"control\" [behaviors]=\"behaviors\"></smz-validation-messages>\n </div>\n}", dependencies: [{ kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.SmzTooltipDirective, selector: "[smzTooltip]", inputs: ["smzTooltip", "tooltipPosition", "showDelay", "hideDelay", "tooltipEvent", "escape", "tooltipStyleClass", "tooltipZIndex", "tooltipDisabled", "tooltipOptions", "appendTo"] }, { kind: "component", type: i2.SmzTreeSelectComponent, selector: "ui-tree-select", inputs: ["options", "selectionMode", "placeholder", "filter", "filterPlaceholder", "emptyMessage", "showClear", "scrollHeight", "styleClass", "containerStyleClass", "appendTo", "display", "filterInputAutoFocus"] }, { 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"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: SafeHtmlPipe$2, name: "safeHtml" }] });
|
|
4875
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: InputTreeComponent, isStandalone: false, selector: "smz-input-tree", inputs: { input: "input", formId: "formId", control: "control", behaviors: "behaviors" }, ngImport: i0, template: "@if (nodes$ | async; as nodes) {\n <smz-label\n class=\"smz__input_name\"\n [text]=\"input.name\"\n [propertyName]=\"input.propertyName\"\n [showLabel]=\"input.hideLabel != true\"\n [warning]=\"input.warning?.()\"\n [help]=\"input.tooltip?.()\"\n [popover]=\"input.popover?.()\">\n </smz-label>\n <div class=\"input_inner__wrapper flex flex-wrap\">\n <ui-tree-select class=\"w-full m-0 smz__input_value flex-1\" containerStyleClass=\"w-full\" [formControl]=\"control\" [options]=\"nodes\" [placeholder]=\"input.name\" appendTo=\"body\" [filter]=\"input.showFilter ? true : false\" [selectionMode]=\"input.selectionMode\" [filterInputAutoFocus]=\"input.autofocusFilter\" [emptyMessage]=\"input.emptyMessage\" [showClear]=\"input.showClear\" [filterPlaceholder]=\"input.emptyFilterMessage\" [scrollHeight]=\"input.scrollHeight\" [display]=\"input.display\">\n @for (inputType of input.allTypes; track inputType) {\n <ng-template let-node [smzTemplate]=\"inputType\">\n @if (node != null) {\n <div [innerHTML]=\"node.label | safeHtml\" [smzTooltip]=\"node.tooltip\"></div>\n }\n </ng-template>\n }\n </ui-tree-select>\n <smz-validation-messages [input]=\"input\" [control]=\"control\" [behaviors]=\"behaviors\"></smz-validation-messages>\n </div>\n}", dependencies: [{ kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.SmzTemplateDirective, selector: "ng-template[smzTemplate]", inputs: ["smzTemplate"] }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.SmzTooltipDirective, selector: "[smzTooltip]", inputs: ["smzTooltip", "tooltipPosition", "showDelay", "hideDelay", "tooltipEvent", "escape", "tooltipStyleClass", "tooltipZIndex", "tooltipDisabled", "tooltipOptions", "appendTo"] }, { kind: "component", type: i2.SmzTreeSelectComponent, selector: "ui-tree-select", inputs: ["options", "selectionMode", "placeholder", "filter", "filterPlaceholder", "emptyMessage", "showClear", "scrollHeight", "styleClass", "containerStyleClass", "appendTo", "display", "filterInputAutoFocus"] }, { 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"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: SafeHtmlPipe$2, name: "safeHtml" }] });
|
|
4783
4876
|
}
|
|
4784
4877
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: InputTreeComponent, decorators: [{
|
|
4785
4878
|
type: Component,
|
|
@@ -5884,6 +5977,11 @@ class FormGroupComponent {
|
|
|
5884
5977
|
this.config.context.cdf = this.cdf;
|
|
5885
5978
|
}
|
|
5886
5979
|
this.linkInputControls();
|
|
5980
|
+
for (const group of this.config.groups) {
|
|
5981
|
+
for (const input of group.children) {
|
|
5982
|
+
this.manager.setupVisibilityValueResolver(input, this.config, () => this.viewdata?.form?.get(input.propertyName)?.value);
|
|
5983
|
+
}
|
|
5984
|
+
}
|
|
5887
5985
|
setTimeout(() => {
|
|
5888
5986
|
this.viewdata.updateFormValues();
|
|
5889
5987
|
// this.viewdata.isValid = this.viewdata.form.valid;
|
|
@@ -5977,10 +6075,14 @@ class FormGroupComponent {
|
|
|
5977
6075
|
console.log(`UpdateVisibilityDependsOnFormData called for ${input.propertyName} | Before: ${input.isVisible}`);
|
|
5978
6076
|
}
|
|
5979
6077
|
const nextVisible = input.visibilityFunction(formValues);
|
|
5980
|
-
|
|
6078
|
+
const inputChanged = input.isVisible !== nextVisible;
|
|
6079
|
+
if (inputChanged) {
|
|
5981
6080
|
visibilityChanged = true;
|
|
5982
6081
|
}
|
|
5983
6082
|
input.isVisible = nextVisible;
|
|
6083
|
+
if (inputChanged && this.config.formId != null) {
|
|
6084
|
+
this.manager.notifyVisibilityChanged(input, this.config);
|
|
6085
|
+
}
|
|
5984
6086
|
if (this.config.isDebug) {
|
|
5985
6087
|
console.log(`UpdateVisibilityDependsOnFormData called for ${input.propertyName} | After: ${input.isVisible}`);
|
|
5986
6088
|
}
|
|
@@ -7604,6 +7706,7 @@ class NgxSmzFormsModule {
|
|
|
7604
7706
|
SmzTextareaDirective,
|
|
7605
7707
|
SmzInputTextDirective,
|
|
7606
7708
|
SmzListboxComponent,
|
|
7709
|
+
SmzTemplateDirective,
|
|
7607
7710
|
SmzMultiSelectComponent,
|
|
7608
7711
|
NgGroupByPipeModule,
|
|
7609
7712
|
SmzPasswordComponent,
|
|
@@ -7757,6 +7860,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImpor
|
|
|
7757
7860
|
SmzTextareaDirective,
|
|
7758
7861
|
SmzInputTextDirective,
|
|
7759
7862
|
SmzListboxComponent,
|
|
7863
|
+
SmzTemplateDirective,
|
|
7760
7864
|
SmzMultiSelectComponent,
|
|
7761
7865
|
NgGroupByPipeModule,
|
|
7762
7866
|
SmzPasswordComponent,
|
|
@@ -13495,6 +13599,7 @@ class Table {
|
|
|
13495
13599
|
}
|
|
13496
13600
|
}
|
|
13497
13601
|
}
|
|
13602
|
+
const allWordsRowTexts = [];
|
|
13498
13603
|
if (this.filters['global'] && !globalMatch && globalFilterFieldsArray) {
|
|
13499
13604
|
for (let j = 0; j < globalFilterFieldsArray.length; j++) {
|
|
13500
13605
|
const globalFilterField = globalFilterFieldsArray[j].field || globalFilterFieldsArray[j];
|
|
@@ -13531,12 +13636,21 @@ class Table {
|
|
|
13531
13636
|
cellSearchData = resolveFieldData.map(x => SmzObjectUtils.resolveFieldData(x, dataPath)).join(' ');
|
|
13532
13637
|
}
|
|
13533
13638
|
const globalFilterValue = filterGlobal.value;
|
|
13639
|
+
if (matchMode === 'containsAllWords') {
|
|
13640
|
+
// cada palavra pode estar em um campo diferente: acumula os textos da linha e avalia ao final
|
|
13641
|
+
allWordsRowTexts.push(cellSearchData == null ? '' : String(cellSearchData));
|
|
13642
|
+
continue;
|
|
13643
|
+
}
|
|
13534
13644
|
globalMatch = this.filterService.filters[matchMode](cellSearchData, globalFilterValue, this.filterLocale);
|
|
13535
13645
|
if (globalMatch) {
|
|
13536
13646
|
break;
|
|
13537
13647
|
}
|
|
13538
13648
|
}
|
|
13539
13649
|
}
|
|
13650
|
+
if (allWordsRowTexts.length > 0) {
|
|
13651
|
+
const global = this.filters['global'];
|
|
13652
|
+
globalMatch = this.filterService.filters['containsAllWords'](allWordsRowTexts.join(' '), global.value, this.filterLocale);
|
|
13653
|
+
}
|
|
13540
13654
|
let matches;
|
|
13541
13655
|
if (this.filters['global']) {
|
|
13542
13656
|
matches = localFiltered ? localFiltered && localMatch && globalMatch : globalMatch;
|
|
@@ -19674,6 +19788,14 @@ class SmzTextColumnBuilder extends SmzBaseColumnBuilder {
|
|
|
19674
19788
|
this.columnRef.filter.type = type;
|
|
19675
19789
|
return this;
|
|
19676
19790
|
}
|
|
19791
|
+
/**
|
|
19792
|
+
* Text filter only: splits the typed text by spaces and requires every word to appear in the cell, in any order
|
|
19793
|
+
* (accent and case insensitive).
|
|
19794
|
+
*/
|
|
19795
|
+
setFilterAllWords() {
|
|
19796
|
+
this.columnRef.filter.matchMode = 'allWords';
|
|
19797
|
+
return this;
|
|
19798
|
+
}
|
|
19677
19799
|
}
|
|
19678
19800
|
class SmzCustomColumnBuilder extends SmzBaseColumnBuilder {
|
|
19679
19801
|
tableRef;
|
|
@@ -21124,6 +21246,17 @@ class SmzTableBuilder extends SmzBuilderUtilities {
|
|
|
21124
21246
|
this.tableState.caption.globalFilter.isVisible = true;
|
|
21125
21247
|
return this;
|
|
21126
21248
|
}
|
|
21249
|
+
/**
|
|
21250
|
+
* Defines how the global search term is matched. With `allWords` the term is split by spaces and every word must appear
|
|
21251
|
+
* in at least one searchable field, in any order (accent and case insensitive). Default is `contains`.
|
|
21252
|
+
*/
|
|
21253
|
+
setGlobalFilterMode(matchMode) {
|
|
21254
|
+
if (!this.tableState.caption.globalFilter.isVisible) {
|
|
21255
|
+
throw Error('You need to call \'enableGlobalFilter\' before');
|
|
21256
|
+
}
|
|
21257
|
+
this.tableState.caption.globalFilter.matchMode = matchMode;
|
|
21258
|
+
return this;
|
|
21259
|
+
}
|
|
21127
21260
|
expandGlobalFilterInput() {
|
|
21128
21261
|
if (!this.tableState.caption.globalFilter.isVisible) {
|
|
21129
21262
|
throw Error('You need to call \'enableGlobalFilter\' before');
|
|
@@ -22290,7 +22423,7 @@ class SmzTableComponent {
|
|
|
22290
22423
|
this.cdr.markForCheck();
|
|
22291
22424
|
}
|
|
22292
22425
|
updateGlobalFilter(value) {
|
|
22293
|
-
this.table.filterGlobal(value, 'contains');
|
|
22426
|
+
this.table.filterGlobal(value, this.state.caption?.globalFilter?.matchMode === 'allWords' ? 'containsAllWords' : 'contains');
|
|
22294
22427
|
}
|
|
22295
22428
|
updateColumnsVisibility(triggerViewport) {
|
|
22296
22429
|
this.state.columns.forEach(x => {
|
|
@@ -22824,11 +22957,11 @@ class SmzTableComponent {
|
|
|
22824
22957
|
this.tableHelper.clear(this.tableKey);
|
|
22825
22958
|
}
|
|
22826
22959
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: SmzTableComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: TableEditableService }, { token: TableFormsService }, { token: TableHelperService }, { token: i1$3.Store }, { token: SmzExcelService }], target: i0.ɵɵFactoryTarget.Component });
|
|
22827
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: SmzTableComponent, isStandalone: false, selector: "smz-ui-table", inputs: { state: "state", items: "items", loading: "loading" }, outputs: { selectionChange: "selectionChange", validChange: "validChange", filterChange: "filterChange", columnVisibilityChange: "columnVisibilityChange", create: "create", update: "update", delete: "delete" }, host: { properties: { "attr.data-testid": "this.hostTestId" } }, providers: [TableEditableService, TableFormsService], queries: [{ propertyName: "templates", predicate: SmzTemplateDirective }], 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) {\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) {\n <smz-data-info\n [attr.data-testid]=\"buildTableTestId('empty')\"\n [image]=\"context.state.emptyFeedback.image\"\n [message]=\"context.state.emptyFeedback.message\"\n [callbackInfo]=\"context.state.emptyFeedback.extraInfo\"\n [actions]=\"context.state.emptyFeedback.actionButtons\">\n <ng-template smzTemplate=\"actions\">\n <ng-container *ngTemplateOutlet=\"emptyActionsTemplate; context: { $implicit: {} }\"></ng-container>\n </ng-template>\n </smz-data-info>\n } @else {\n <ng-container *ngVar=\"state.source?.items$ != null ? (state.source.items$ | async) : null as observableSource\">\n <ng-container *ngVar=\"state.source?.signalItems != null ? state.source.signalItems() : null as signalSource\">\n @if (((observableSource ?? signalSource ?? items) | cloneTableItems : context: tableKey: context.state.rowExpansion.sincronize); as clonedData) {\n <p-table #dt\n dataKey=\"id\"\n editMode=\"row\"\n [stripedRows]=\"context.state.styles.striped\"\n [value]=\"clonedData.items\"\n [(selection)]=\"selectedItems\"\n [selectionMode]=\"context.state.caption.rowSelection.isEnabled && context.state.caption.rowSelection.mode === 'single' ? 'single' : null\"\n [rowSelectable]=\"rowSelectable\"\n [tableStyleClass]=\"context.state.styles.tableStyleClass\"\n [size]=\"context.state.styles.size === 'extra-small' ? 'small' : context.state.styles.size === 'small' ? 'small' : context.state.styles.size === 'large' ? 'large' : undefined\"\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' : '')\"\n [rowHover]=\"context.state.actions.rowBehavior.hoverable\"\n [rows]=\"context.state.pagination.rows\"\n [first]=\"context.state.pagination.state.first\"\n [showCurrentPageReport]=\"context.state.pagination.pageReport.isVisible\"\n [rowsPerPageOptions]=\"context.state.pagination.rowsPerPageOptions\"\n [loading]=\"loading || isViewportInitializing\"\n [style.visibility]=\"isViewportInitializing ? 'hidden' : null\"\n [paginator]=\"context.state.pagination.isVisible\"\n paginatorDropdownAppendTo=\"body\"\n [currentPageReportTemplate]=\"context.state.locale.paginator.template\"\n [sortField]=\"context.state.sort.field\"\n [sortMode]=\"context.state.sort.mode\"\n [sortOrder]=\"context.state.sort.order\"\n [multiSortMeta]=\"context.state.sort.multiSortMeta\"\n [scrollable]=\"context.state.viewport.scrollable\"\n [scrollHeight]=\"context.state.viewport.scrollHeight\"\n [filterDelay]=\"0\"\n [globalFilterFields]=\"context.globalFilter\"\n [columns]=\"context.visibleColumns\"\n [frozenColumns]=\"context.frozenColumns\"\n [frozenWidth]=\"context.state.frozen.isEnabled ? context.state.frozen.width : null\"\n [resizableColumns]=\"context.state.viewport.resizableColumns\"\n [columnResizeMode]=\"context.state.viewport.columnResizeMode\"\n (onPage)=\"onPage($event)\"\n (onFilter)=\"onFilter($event)\"\n (selectionChange)=\"emitSelection($event)\"\n >\n @if (context.state.caption.isVisible) {\n <ng-template smzTemplate=\"caption\">\n <div class=\"flex flex-wrap items-center gap-2\" [attr.data-testid]=\"buildTableTestId('caption')\" [ngClass]=\"'justify-' + context.state.caption.toolbarAlignment\">\n @if (context.state.caption.title != null) {\n <div class=\"flex-1 database-title\" [attr.data-testid]=\"buildTableTestId('title')\" [innerHTML]=\"context.state.caption.title\"></div>\n }\n <ng-container *ngTemplateOutlet=\"captionTemplate; context: { $implicit: dt }\"></ng-container>\n <smz-table-caption-buttons [buttons]=\"context.state.caption.buttons\" [tableTestId]=\"state.tableTestId\"></smz-table-caption-buttons>\n @if (context.state.caption.exportToPdf.isButtonVisible) {\n <button smzButton [attr.data-testid]=\"buildTableTestId('export-pdf')\" [label]=\"context.state.locale.exportToPdf.label\" icon=\"fa-solid fa-file-pdf\" (click)=\"exportToPdf(context, clonedData.items)\" [disabled]=\"clonedData.showSkeleton\" variant=\"outlined\"></button>\n }\n @if (context.state.caption.exportToExcel.isButtonVisible) {\n <button smzButton [attr.data-testid]=\"buildTableTestId('export-excel')\" [label]=\"context.state.locale.exportToExcel.label\" icon=\"fa-solid fa-file-excel\" (click)=\"exportToExcel(table, context, clonedData.items)\" [disabled]=\"clonedData.showSkeleton\" variant=\"outlined\"></button>\n }\n @if (context.state.editable.creation.isButtonVisible) {\n <button smzButton [attr.data-testid]=\"buildTableTestId('create')\" [label]=\"context.state.editable.creation.buttonLabel\" icon=\"fa-solid fa-plus\" (click)=\"editableService.onRowCreateInit(table, context.columns)\" [disabled]=\"clonedData.showSkeleton || editableService.isEditing || editableService.isCreating || context.state.editable.creation.isButtonDisabled\" variant=\"outlined\"></button>\n }\n @if (context.state.caption.rowSelection.isButtonVisible) {\n <button smzButton [attr.data-testid]=\"buildTableTestId('row-selection')\" [label]=\"context.state.locale.rowSelection.label\" icon=\"fa-solid fa-check-double\" (click)=\"onRowSelection(context)\" [disabled]=\"clonedData.showSkeleton\" variant=\"outlined\"></button>\n }\n @if (context.state.rowExpansion.isButtonVisible) {\n <button smzButton [attr.data-testid]=\"buildTableTestId('row-expansion')\" [label]=\"context.state.rowExpansion.label\" icon=\"fa-solid fa-list\" (click)=\"onRowExpansion(context)\" [disabled]=\"clonedData.showSkeleton\" variant=\"outlined\"></button>\n }\n @if (context.state.caption.clearFilters.isButtonVisible) {\n <button smzButton [attr.data-testid]=\"buildTableTestId('clear-filters')\" [label]=\"context.state.locale.clearFilters.label\" icon=\"fa-solid fa-filter-circle-xmark\" (click)=\"clear(table, context)\" [disabled]=\"clonedData.showSkeleton\" variant=\"outlined\"></button>\n }\n @if (context.state.caption.columnVisibility.showDropdownSelector) {\n <ui-multi-select #columnMultiselect [attr.data-testid]=\"buildTableTestId('column-visibility')\" class=\"ml-2 w-full flex-none md:w-2/12\" styleClass=\"w-full\" appendTo=\"body\" [options]=\"context.hideableColumns\" [(ngModel)]=\"selectedColumns\" [placeholder]=\"context.state.locale.columnVisibility.placeholder\" [selectedItemsLabel]=\"context.state.locale.columnVisibility.selectedItemsLabel\" optionLabel=\"name\" dataKey=\"field\" optionLabel=\"header\" [filter]=\"true\" (panelHide)=\"updateColumnsVisibility(true)\" [smzTooltip]=\"context.state.locale.columnVisibility.pTooltip\">\n </ui-multi-select>\n }\n @if (context.state.caption.globalFilter.isVisible) {\n <ui-icon-field class=\"w-full flex-none\" [ngClass]=\"{ 'md:w-2/12 flex-none': !context.state.caption.globalFilter.expanded }\">\n <ui-input-icon styleClass=\"fa-solid fa-magnifying-glass\"></ui-input-icon>\n <input #inputGlobal [(ngModel)]=\"globalSearchInput\" smzInputText type=\"text\" styleClass=\"database-global-search\" (input)=\"updateGlobalFilter(inputGlobal.value)\" [disabled]=\"clonedData.showSkeleton\" [placeholder]=\"context.state.locale.globalFilter.placeholder\" [attr.data-testid]=\"buildTableTestId('search')\" />\n </ui-icon-field>\n }\n </div>\n @if (toolbarTemplate != null) {\n <div class=\"flex flex-wrap items-center mt-2\" [ngClass]=\"'justify-' + context.state.caption.toolbarAlignment\">\n <ng-container *ngTemplateOutlet=\"toolbarTemplate; context: { $implicit: dt }\"></ng-container>\n </div>\n }\n </ng-template>\n }\n <ng-template smzTemplate=\"header\" let-columns>\n <tr [ngClass]=\"{ 'invisible-header': !context.state.header.isVisible }\">\n @if (context.state.caption.rowSelection.isEnabled) {\n <th [ngStyle]=\"context.state.caption.rowSelection.ngStyle\">\n @if (!context.state.actions.batchActions.isVisible && context.state.caption.rowSelection.mode !== 'single') {\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\n }\n </th>\n }\n @if (context.state.rowExpansion.isEnabled) {\n <th [ngStyle]=\"context.state.rowExpansion.ngStyle\"></th>\n }\n @for (col of columns; track col.field) {\n @if (context.state.viewport.resizableColumns) {\n @if (col.isOrderable) {\n <th [pSortableColumn]=\"col.sortField\" pResizableColumn [attr.data-testid]=\"buildColumnTestId(col.field)\" [ngStyle]=\"col.content.ngStyle\" [ngClass]=\"col.headerStyleClass\">\n <ng-container *ngTemplateOutlet=\"headerContent\"></ng-container>\n </th>\n }\n @if (!col.isOrderable) {\n <th pResizableColumn [attr.data-testid]=\"buildColumnTestId(col.field)\" [ngStyle]=\"col.content.ngStyle\" [ngClass]=\"col.headerStyleClass\">\n <ng-container *ngTemplateOutlet=\"headerContent\"></ng-container>\n </th>\n }\n } @else {\n @if (col.isOrderable) {\n <th [pSortableColumn]=\"col.sortField\" [attr.data-testid]=\"buildColumnTestId(col.field)\" [ngStyle]=\"col.content.ngStyle\" [ngClass]=\"col.headerStyleClass\">\n <ng-container *ngTemplateOutlet=\"headerContent\"></ng-container>\n </th>\n }\n @if (!col.isOrderable) {\n <th [attr.data-testid]=\"buildColumnTestId(col.field)\" [ngStyle]=\"col.content.ngStyle\" [ngClass]=\"col.headerStyleClass\">\n <ng-container *ngTemplateOutlet=\"headerContent\"></ng-container>\n </th>\n }\n }\n <ng-template #headerContent>\n <div class=\"flex justify-start items-center\">\n <span class=\"mr-1\">{{ col.header }}</span>\n @if (col.showHeaderActions) {\n <smz-table-header-actions clickStopPropagation class=\"ml-1 mt-1\" [col]=\"col\"></smz-table-header-actions>\n }\n @if (!clonedData.showSkeleton && col.isOrderable) {\n <p-sortIcon [field]=\"col.sortField\"></p-sortIcon>\n }\n @if (!clonedData.showSkeleton) {\n @switch (col.filter.type) {\n @case (filterTypes.currency) {\n <smz-column-filter type=\"numeric\" currency=\"BRL\" [field]=\"col.filterField\"></smz-column-filter>\n }\n @case (filterTypes.numeric) {\n <smz-column-filter type=\"numeric\" [field]=\"col.filterField\"></smz-column-filter>\n }\n @case (filterTypes.date) {\n <smz-column-filter type=\"date\" [field]=\"col.filterField\" [showTime]=\"col.filter.showTime\"></smz-column-filter>\n }\n @case (filterTypes.text) {\n <smz-column-filter type=\"text\" [field]=\"col.filterField\"></smz-column-filter>\n }\n @case (filterTypes.boolean) {\n <smz-column-filter type=\"boolean\" [field]=\"col.filterField\"></smz-column-filter>\n }\n @case (filterTypes.dropdown) {\n @if (col.filterField | filterObject; as filterField) {\n <smz-column-filter [field]=\"filterField + '.id'\" matchMode=\"dropdown\" [showMatchModes]=\"false\" [showOperator]=\"false\" [showAddButton]=\"false\">\n <ng-template smzTemplate=\"header\">\n <div class=\"px-3 pt-3 pb-0\">\n <span class=\"p-text-bold\">{{ col.header }}</span>\n </div>\n </ng-template>\n <ng-template smzTemplate=\"filter\" let-value let-filter=\"filter\">\n <ui-select appendTo=\"body\" [ngModel]=\"value\" [options]=\"(clonedData.items != null ? clonedData.items : []) | uniqueFilter : filterField + '.id' : filterField : null : 'name' : false\" [placeholder]=\"context.state.locale.dropdownFilter.placeholder\" (changed)=\"filter($event.value)\" optionLabel=\"name\" dataKey=\"id\"></ui-select>\n </ng-template>\n </smz-column-filter>\n }\n }\n @case (filterTypes.multiselect) {\n @if (col.filterField | filterObject; as filterField) {\n <smz-column-filter [field]=\"filterField\" matchMode=\"in\" [showMatchModes]=\"false\" [showOperator]=\"false\" [showAddButton]=\"false\">\n <ng-template smzTemplate=\"header\">\n <div class=\"px-3 pt-3 pb-0\">\n <span class=\"p-text-bold\">{{ col.header }}</span>\n </div>\n </ng-template>\n <ng-template smzTemplate=\"filter\" let-value let-filter=\"filter\">\n <ui-multi-select [ngModel]=\"value\" [options]=\"(clonedData.items != null ? clonedData.items : []) | uniqueFilter : filterField + '.id' : filterField : null : 'name' : false\" [placeholder]=\"context.state.locale.dropdownFilter.placeholder\" (changed)=\"filter($event.value)\" optionLabel=\"name\" dataKey=\"id\"></ui-multi-select>\n </ng-template>\n </smz-column-filter>\n }\n }\n @case (filterTypes.multiselect_array) {\n @if (col.filterField | filterObject; as filterField) {\n <smz-column-filter [field]=\"filterField\" matchMode=\"array-some\" [showMatchModes]=\"false\" [showOperator]=\"false\" [showAddButton]=\"false\">\n <ng-template smzTemplate=\"header\">\n <div class=\"px-3 pt-3 pb-0\">\n <span class=\"p-text-bold\">{{ col.header }}</span>\n </div>\n </ng-template>\n <ng-template smzTemplate=\"filter\" let-value let-filter=\"filter\">\n <ui-multi-select [ngModel]=\"value\" [options]=\"(clonedData.items != null ? clonedData.items : []) | uniqueFilter : filterField + '.id' : filterField : null : 'name' : true\" [placeholder]=\"context.state.locale.dropdownFilter.placeholder\" (changed)=\"filter($event.value)\" optionLabel=\"name\" dataKey=\"id\" [maxSelectedLabels]=\"2\" [selectedItemsLabel]=\"'{0}'\"></ui-multi-select>\n </ng-template>\n </smz-column-filter>\n }\n }\n @case (filterTypes.multiselect_string) {\n @if (col.filterField | filterObject; as filterField) {\n <smz-column-filter [field]=\"filterField\" matchMode=\"multiselectByString\" [showMatchModes]=\"false\" [showOperator]=\"false\" [showAddButton]=\"false\">\n <ng-template smzTemplate=\"header\">\n <div class=\"px-3 pt-3 pb-0\">\n <span class=\"p-text-bold\">{{ col.header }}</span>\n </div>\n </ng-template>\n <ng-template smzTemplate=\"filter\" let-value let-filter=\"filter\">\n <ui-multi-select [ngModel]=\"value\" [options]=\"(clonedData.items != null ? clonedData.items : []) | uniqueFilter : filterField : filterField : null : true : false : false\" [placeholder]=\"context.state.locale.dropdownFilter.placeholder\" (changed)=\"filter($event.value)\" [maxSelectedLabels]=\"2\" [selectedItemsLabel]=\"'{0}'\"></ui-multi-select>\n </ng-template>\n </smz-column-filter>\n }\n }\n }\n }\n @if (context.state.caption.columnVisibility.showColumnHideButton) {\n <button smzButton type=\"button\" icon=\"fa-solid fa-eye-slash\" (click)=\"hideColumn(col, context)\" [rounded]=\"true\" variant=\"text\" styleClass=\"p-button-plain\"></button>\n }\n </div>\n </ng-template>\n }\n @if (context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible|| context.state.editable.isEditable) {\n <th [ngStyle]=\"context.state.editable.isEditable ? context.state.editable.ngStyle : context.state.actions.customActions.ngStyle\"></th>\n }\n </tr>\n @if (context.state.actions.batchActions.isVisible) {\n <tr>\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)\"\n [ngStyle]=\"context.state.actions.customActions.ngStyle\" class=\"px-0\">\n <div class=\"flex flex-wrap items-center justify-start\">\n <p-tableHeaderCheckbox class=\"mr-4\"></p-tableHeaderCheckbox>\n @if (selectedItems?.length > 0) {\n @for (batchItem of context.state.actions.batchActions.items; track batchItem.label) {\n @if (batchItem.visible) {\n <button smzButton [label]=\"batchItem.label\" class=\"animate__animated animate__fadeIn\" [styleClass]=\"'p-button-plain ' + (batchItem.styleClass)\" [icon]=\"batchItem.icon\" (click)=\"batchItem.command(selectedItems); selectedItems = [];\" [disabled]=\"batchItem.disabled\" [smzTooltip]=\"batchItem.tooltip\" [rounded]=\"true\" variant=\"text\"></button>\n }\n }\n }\n </div>\n </th>\n </tr>\n }\n </ng-template>\n <ng-template smzTemplate=\"body\" let-item let-editing=\"editing\" let-rowIndex=\"rowIndex\" let-columns=\"columns\">\n @if (!context.state.footer?.hideBody) {\n <tr #editableRowElement\n [pEditableRow]=\"item\"\n tableItemAction\n [isClickable]=\"context.state.actions.rowBehavior.isClickable\"\n [callback]=\"context.state.actions.rowBehavior.clickCallback\"\n [expandRowOnClick]=\"context.state.actions.rowBehavior.expandRowOnClick\"\n [item]=\"item\"\n class=\"p-selectable-row\"\n [attr.data-testid]=\"buildRowTestId(item, rowIndex)\"\n [ngClass]=\"{ 'highlight-row': item?.id === state.actions.rowBehavior.highlights, 'preserve-in-small': state.actions.rowBehavior.preserveLayoutInSmallDevices }\"\n >\n @if (context.state.caption.rowSelection.isEnabled && !clonedData.showSkeleton) {\n <td\n clickStopPropagation\n class=\"{{ state.actions.rowBehavior.cellStyleClass }}\"\n [ngClass]=\"{ 'opacity-50 pointer-events-none': editableService.context[item.id]?.hasErrors || editableService.context[item.id]?.isLoading }\"\n [ngStyle]=\"context.state.caption.rowSelection.ngStyle\"\n >\n @if (context.state.caption.rowSelection.mode === 'single') {\n <p-tableRadioButton [value]=\"item\" [index]=\"rowIndex\" [disabled]=\"!isRowSelectable(item)\"></p-tableRadioButton>\n } @else {\n <p-tableCheckbox [value]=\"item\" [index]=\"rowIndex\" [disabled]=\"!isRowSelectable(item)\"></p-tableCheckbox>\n }\n </td>\n }\n @if (context.state.rowExpansion.isEnabled && !clonedData.showSkeleton) {\n <td\n clickStopPropagation\n class=\"{{ state.actions.rowBehavior.cellStyleClass }}\"\n [ngClass]=\"{ 'opacity-50 pointer-events-none': editableService.context[item.id]?.hasErrors || editableService.context[item.id]?.isLoading, 'flex flex-wrap justify-start items-center gap-2': context.state.rowExpansion.highlightNewItems && item._isNew }\"\n [ngStyle]=\"context.state.rowExpansion.ngStyle\"\n >\n <button smzButton type=\"button\" class=\"smz-table-row-expansion-toggle\" [icon]=\"item._isExpanded ? 'fa-solid fa-chevron-down' : 'fa-solid fa-chevron-right'\" (click)=\"item._isExpanded = !item._isExpanded; item._isNew = false\" variant=\"text\" [rounded]=\"true\" size=\"sm\"></button>\n @if (context.state.rowExpansion.highlightNewItems && item._isNew) {\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>\n }\n </td>\n }\n @for (col of columns; track col.field) {\n @if (clonedData.showSkeleton) {\n <td class=\"{{ state.actions.rowBehavior.cellStyleClass }}\" [ngStyle]=\"col.content.ngStyle\"><ui-skeleton width=\"100%\" height=\"1rem\"></ui-skeleton></td>\n } @else {\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\">\n <span class=\"p-column-title\">{{ col.header }}</span>\n <p-cellEditor>\n <!-- CELULAR COM EDITOR -->\n <ng-template smzTemplate=\"input\">\n @switch (col.editable.type) {\n @case (editableTypes.none) {\n <smz-table-content class=\"cursor-default\" [ngClass]=\"col.content.contentStyleClass\" [col]=\"col\" [contentTypes]=\"contentTypes\" [item]=\"item\" [rowIndex]=\"rowIndex\" [contentTemplate]=\"contentTemplate\"></smz-table-content>\n }\n @case (editableTypes.custom) {\n <ng-container *ngTemplateOutlet=\"editableTemplate; context: { $implicit: item, col: col }\"></ng-container>\n }\n <!-- INPUT TEXT -->\n @case (editableTypes.text) {\n @if (editableService.context[item.id]?.form; as form) {\n @if (form.controls[col.editable.property]; as control) {\n <div class=\"relative w-full\">\n <input smzInputText type=\"text\" [formControl]=\"$any(control)\" style=\"width: 100%;\">\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\n </div>\n }\n }\n }\n <!-- INPUT NUMBER -->\n @case (editableTypes.number) {\n @if (editableService.context[item.id]?.form; as form) {\n @if (form.controls[col.editable.property]; as control) {\n <div class=\"relative w-full\">\n <ui-input-number *ngVar=\"col.editable.data as numberData\" [formControl]=\"$any(control)\" [mode]=\"numberData.mode\" [minFractionDigits]=\"numberData.minFractionDigits\" [maxFractionDigits]=\"numberData.maxFractionDigits\" [currency]=\"numberData.currency\" [useGrouping]=\"numberData.useGrouping\" [allowEmpty]=\"numberData.allowEmpty\" [showClear]=\"numberData.showClear\" [showButtons]=\"numberData.showButtons\" [prefix]=\"numberData.prefix\" [suffix]=\"numberData.suffix\">\n </ui-input-number>\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\n </div>\n }\n }\n }\n <!-- INPUT SWITCH -->\n @case (editableTypes.switch) {\n @if (editableService.context[item.id]?.form; as form) {\n @if (form.controls[col.editable.property]; as control) {\n <div class=\"relative w-full\">\n <ui-toggle-switch [formControl]=\"$any(control)\"></ui-toggle-switch>\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\n </div>\n }\n }\n }\n <!-- INPUT TEXT AREA -->\n @case (editableTypes.area) {\n @if (editableService.context[item.id]?.form; as form) {\n @if (form.controls[col.editable.property]; as control) {\n <div class=\"relative w-full\">\n <textarea smzTextarea type=\"text\" [formControl]=\"$any(control)\" [rows]=\"$any(col.editable.data).rows\" required style=\"width: 100%;\"></textarea>\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\n </div>\n }\n }\n }\n <!-- INPUT DROPDOWN -->\n @case (editableTypes.dropdown) {\n @if (editableService.context[item.id]?.form; as form) {\n @if (form.controls[col.editable.property]; as control) {\n <div class=\"relative w-full\">\n <ui-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\"></ui-select>\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\n </div>\n }\n }\n }\n <!-- INPUT CALENDAR -->\n @case (editableTypes.calendar) {\n @if (editableService.context[item.id]?.form; as form) {\n @if (form.controls[col.editable.property]; as control) {\n <div class=\"relative w-full\">\n <ui-date-picker [formControl]=\"$any(control)\" appendTo=\"body\" styleClass=\"w-full\" [ngClass]=\"{ 'pl-5': !control.valid }\"></ui-date-picker>\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\n </div>\n }\n }\n }\n }\n </ng-template>\n <!-- CELULAR COM CONTE\u00DADO -->\n <ng-template smzTemplate=\"output\">\n <smz-table-content\n [col]=\"col\"\n [smzTooltip]=\"col.content.tooltip != null ? col.content.tooltip(item) : null\"\n tooltipPosition=\"left\"\n [ngClass]=\"col.content.contentStyleClass\" [contentTypes]=\"contentTypes\" [item]=\"item\" [rowIndex]=\"rowIndex\" [contentTemplate]=\"contentTemplate\">\n </smz-table-content>\n </ng-template>\n </p-cellEditor>\n </td>\n }\n }\n @if (context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible || context.state.editable.isEditable) {\n <td [ngStyle]=\"context.state.actions.customActions.ngStyle\" class=\"px-0\">\n <div class=\"flex flex-wrap items-center justify-center\">\n @if (clonedData.showSkeleton) {\n <div class=\"w-full\">\n <ui-skeleton width=\"100%\" height=\"1rem\"></ui-skeleton>\n </div>\n } @else {\n <!-- SEM EDITAR -->\n @if (!editing) {\n @if (context.state.editable.update.isButtonVisible) {\n <button smzButton type=\"button\" icon=\"fa-solid fa-pencil\" (click)=\"editableService.onRowEditInit(item)\" class=\"mx-1\" [disabled]=\"editableService.isEditing || editableService.isCreating || context.state.editable.update.isButtonDisabled || (!context.state.editable.update.condition(item))\" pInitEditableRow [rounded]=\"true\" variant=\"text\"></button>\n }\n @if (context.state.editable.remove.isButtonVisible) {\n <button smzButton type=\"button\" icon=\"fa-solid fa-trash\" (click)=\"editableService.onRowRemove($event, table, item)\" class=\"mx-1\" [disabled]=\"editableService.isEditing || editableService.isCreating || context.state.editable.remove.isButtonDisabled || (!context.state.editable.remove.condition(item))\" [rounded]=\"true\" variant=\"text\" severity=\"secondary\"></button>\n }\n }\n <!-- EDITANDO -->\n @if (editing) {\n @if (editableService.context[item.id]; as editableContext) {\n <!-- COM LOADING -->\n @if (editableContext.isLoading) {\n <button smzButton type=\"button\" icon=\"fa-solid fa-rotate fa-spin\" [disabled]=\"true\" class=\"mr-2\" [rounded]=\"true\" variant=\"text\" styleClass=\"p-button-info\"></button>\n }\n <!-- SEM LOADING -->\n @if (!editableContext.isLoading) {\n <!-- EDITANDO -->\n @if (!editableContext.hasErrors) {\n <!-- CRIANDO -->\n @if (item._context?.isCreating) {\n <button smzButton type=\"button\" icon=\"fa-solid fa-check\" (click)=\"editableService.onRowCreateSave($event, table, editableRowElement, item)\" [disabled]=\"!editableContext.hasChanged || !editableService.context[item.id]?.form.valid\" class=\"mr-2\" [rounded]=\"true\" variant=\"text\" severity=\"success\"></button>\n <button smzButton type=\"button\" icon=\"fa-solid fa-xmark\" (click)=\"editableService.onRowCreateCancel($event, table, item)\" [rounded]=\"true\" variant=\"text\" severity=\"danger\"></button>\n }\n <!-- ATUALIZANDO -->\n @if (item._context?.isUpdating) {\n <button smzButton type=\"button\" icon=\"fa-solid fa-check\" (click)=\"editableService.onRowEditSave($event, table, editableRowElement, item)\" [disabled]=\"!editableContext.hasChanged || !editableService.context[item.id]?.form.valid\" class=\"mr-2\" [rounded]=\"true\" variant=\"text\" severity=\"success\"></button>\n <button smzButton type=\"button\" icon=\"fa-solid fa-xmark\" (click)=\"editableService.onRowEditCancel($event, table, item)\" [rounded]=\"true\" variant=\"text\" severity=\"danger\"></button>\n }\n }\n <!-- COM ERRORS -->\n @if (editableContext.hasErrors) {\n <ui-popover #errorsOverlay appendTo=\"body\" [style]=\"{ width: '450px' }\">\n <div [innerHtml]=\"editableContext.errors | contentErrors\"></div>\n </ui-popover>\n <button smzButton type=\"button\" icon=\"fas fa-exclamation-triangle\" [disabled]=\"false\" class=\"mr-2\" (click)=\"errorsOverlay.toggle($event)\" size=\"sm\" [rounded]=\"true\" variant=\"text\" severity=\"danger\"></button>\n <!-- CRIANDO -->\n @if (item._context?.isCreating) {\n <button smzButton type=\"button\" icon=\"fa-solid fa-xmark\" (click)=\"editableService.onRowCreateCancel($event, table, item)\" size=\"sm\" [rounded]=\"true\" variant=\"text\" severity=\"danger\"></button>\n }\n <!-- ATUALIZANDO -->\n @if (item._context?.isUpdating) {\n <button smzButton type=\"button\" icon=\"fa-solid fa-xmark\" (click)=\"editableService.onRowEditCancel($event, table, item)\" size=\"sm\" [rounded]=\"true\" variant=\"text\" severity=\"danger\"></button>\n }\n }\n }\n }\n }\n <!-- CUSTOM MENU -->\n @if (context.state.actions.customActions.isVisible && !editing) {\n <ng-container *ngTemplateOutlet=\"actionsTemplate; context: { $implicit: item }\"></ng-container>\n }\n <!-- MENU -->\n @if (context.state.actions.menu.isVisible && !editing) {\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>\n }\n }\n </div>\n </td>\n }\n </tr>\n @if (item?._isExpanded) {\n <tr>\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)\">\n <ng-container *ngTemplateOutlet=\"rowContentTemplate; context: { $implicit: item }\"></ng-container>\n </td>\n </tr>\n }\n }\n </ng-template>\n @if (!context.state.footer?.hideBody) {\n <ng-template smzTemplate=\"emptymessage\" let-columns>\n <tr>\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' }\">\n <div [innerHtml]=\"context.state.emptyFeedback.message\"></div>\n @if (context.state.caption.clearFilters.isButtonVisible && hasFilters()) {\n <button smzButton [label]=\"context.state.locale.clearFilters.label\" class=\"mt-3\" icon=\"fa-solid fa-filter-circle-xmark\" (click)=\"clear(table, context)\" variant=\"outlined\"></button>\n }\n </td>\n </tr>\n </ng-template>\n }\n @if (hasFooter(context.visibleColumns)) {\n <ng-template smzTemplate=\"footer\" let-columns>\n <tr [attr.data-testid]=\"buildTableTestId('footer')\">\n @if (context.state.caption.rowSelection.isEnabled) {\n <td></td>\n }\n @if (context.state.rowExpansion.isEnabled) {\n <td></td>\n }\n @for (col of columns; track col.field) {\n <td [attr.data-testid]=\"buildTableTestId('footer-' + col.field)\" [ngStyle]=\"col.content.ngStyle\">\n <div class=\"font-bold\" [ngClass]=\"col.footer?.styleClass\">{{ col.footer?.isEnabled ? (col | tableFooter : (dt.filteredValue ?? clonedData.items)) : col.footer?.label }}</div>\n </td>\n }\n @if (context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible || context.state.editable.isEditable) {\n <td></td>\n }\n </tr>\n </ng-template>\n }\n </p-table>\n }\n </ng-container>\n </ng-container>\n }\n} @else {\n @if (emptyStateTemplate != null) {\n <ng-container *ngTemplateOutlet=\"emptyStateTemplate; context: { $implicit: {} }\"></ng-container>\n }\n}\n\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.SmzTemplateDirective, selector: "ng-template[smzTemplate]", inputs: ["smzTemplate"] }, { kind: "component", type: Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "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", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "stripedRows", "size", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "virtualRowHeight", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["selectAllChange", "selectionChange", "contextMenuSelectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "directive", type: ResizableColumn, selector: "[pResizableColumn]", inputs: ["pResizableColumnDisabled"] }, { kind: "component", type: CellEditor, selector: "p-cellEditor" }, { kind: "component", type: SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: TableRadioButton, selector: "p-tableRadioButton", inputs: ["disabled", "value", "index", "inputId", "name", "ariaLabel"] }, { kind: "component", type: TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { kind: "component", type: TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "directive", type: EditableRow, selector: "[pEditableRow]", inputs: ["pEditableRow", "pEditableRowDisabled"] }, { kind: "directive", type: InitEditableRow, selector: "[pInitEditableRow]" }, { kind: "component", type: i2.SmzButtonComponent, selector: "button[smzButton], a[smzButton]", inputs: ["label", "icon", "iconPosition", "severity", "variant", "size", "text", "outlined", "rounded", "loading", "styleClass"] }, { kind: "directive", type: i2.SmzInputTextDirective, selector: "input[smzInputText]", inputs: ["size", "invalid"] }, { kind: "component", type: i2.SmzMultiSelectComponent, selector: "ui-multi-select", inputs: ["options", "optionLabel", "optionValue", "optionDisabled", "dataKey", "placeholder", "filter", "filterBy", "filterMatchMode", "filterPlaceholder", "showClear", "showToggleAll", "emptyMessage", "emptyFilterMessage", "maxSelectedLabels", "selectedItemsLabel", "panelStyle", "styleClass", "inputId", "autofocusFilter", "appendTo", "display"], outputs: ["changed", "panelHide", "panelShow"] }, { kind: "component", type: i2.SmzSelectComponent, selector: "ui-select", inputs: ["options", "optionLabel", "optionValue", "optionDisabled", "dataKey", "placeholder", "filter", "filterBy", "filterMatchMode", "filterPlaceholder", "showClear", "emptyMessage", "emptyFilterMessage", "styleClass", "inputId", "ariaLabel", "appendTo"], outputs: ["changed", "showed", "hidden"] }, { kind: "component", type: i2.SmzDatePickerComponent, selector: "ui-date-picker", inputs: ["selectionMode", "dateFormat", "showTime", "timeOnly", "showSeconds", "hourFormat", "minDate", "maxDate", "showButtonBar", "showIcon", "showOnFocus", "keepInvalid", "readonlyInput", "placeholder", "inputId", "styleClass", "appendTo", "touchUI", "focusTrap"], outputs: ["selected", "cleared", "opened", "closed", "blurred"] }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$1.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: i2.SmzTooltipDirective, selector: "[smzTooltip]", inputs: ["smzTooltip", "tooltipPosition", "showDelay", "hideDelay", "tooltipEvent", "escape", "tooltipStyleClass", "tooltipZIndex", "tooltipDisabled", "tooltipOptions", "appendTo"] }, { kind: "component", type: i2.SmzSkeletonComponent, selector: "ui-skeleton", inputs: ["shape", "width", "height"] }, { kind: "directive", type: i2.SmzTextareaDirective, selector: "textarea[smzTextarea]", inputs: ["invalid", "autoResize"] }, { kind: "component", type: i2.SmzPopoverComponent, selector: "ui-popover", inputs: ["style", "styleClass", "dismissable", "autoZIndex", "appendTo"], outputs: ["shown", "hidden"] }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i2.SmzToggleSwitchComponent, selector: "ui-toggle-switch", inputs: ["name"], outputs: ["changed"] }, { kind: "component", type: i2.SmzInputNumberComponent, selector: "ui-input-number", inputs: ["mode", "locale", "localeMatcher", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "min", "max", "step", "prefix", "suffix", "showButtons", "showClear", "allowEmpty", "placeholder", "readonly", "inputId", "name"], outputs: ["inputed", "keyDown", "blurred", "focused"] }, { 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: i2.SmzIconFieldComponent, selector: "ui-icon-field" }, { kind: "component", type: i2.SmzInputIconComponent, selector: "ui-input-icon", inputs: ["styleClass"] }, { kind: "component", type: SmzColumnFilterComponent, selector: "smz-column-filter", inputs: ["currency", "display", "field", "matchMode", "showAddButton", "showMatchModes", "showOperator", "showApplyButton", "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.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: SmzTableFooterPipe, name: "tableFooter" }, { kind: "pipe", type: SmzEditableSourcePipe, name: "editableSource" }, { kind: "pipe", type: SmzContentErrorsPipe, name: "contentErrors" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
22960
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: SmzTableComponent, isStandalone: false, selector: "smz-ui-table", inputs: { state: "state", items: "items", loading: "loading" }, outputs: { selectionChange: "selectionChange", validChange: "validChange", filterChange: "filterChange", columnVisibilityChange: "columnVisibilityChange", create: "create", update: "update", delete: "delete" }, host: { properties: { "attr.data-testid": "this.hostTestId" } }, providers: [TableEditableService, TableFormsService], queries: [{ propertyName: "templates", predicate: SmzTemplateDirective }], 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) {\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) {\n <smz-data-info\n [attr.data-testid]=\"buildTableTestId('empty')\"\n [image]=\"context.state.emptyFeedback.image\"\n [message]=\"context.state.emptyFeedback.message\"\n [callbackInfo]=\"context.state.emptyFeedback.extraInfo\"\n [actions]=\"context.state.emptyFeedback.actionButtons\">\n <ng-template smzTemplate=\"actions\">\n <ng-container *ngTemplateOutlet=\"emptyActionsTemplate; context: { $implicit: {} }\"></ng-container>\n </ng-template>\n </smz-data-info>\n } @else {\n <ng-container *ngVar=\"state.source?.items$ != null ? (state.source.items$ | async) : null as observableSource\">\n <ng-container *ngVar=\"state.source?.signalItems != null ? state.source.signalItems() : null as signalSource\">\n @if (((observableSource ?? signalSource ?? items) | cloneTableItems : context: tableKey: context.state.rowExpansion.sincronize); as clonedData) {\n <p-table #dt\n dataKey=\"id\"\n editMode=\"row\"\n [stripedRows]=\"context.state.styles.striped\"\n [value]=\"clonedData.items\"\n [(selection)]=\"selectedItems\"\n [selectionMode]=\"context.state.caption.rowSelection.isEnabled && context.state.caption.rowSelection.mode === 'single' ? 'single' : null\"\n [rowSelectable]=\"rowSelectable\"\n [tableStyleClass]=\"context.state.styles.tableStyleClass\"\n [size]=\"context.state.styles.size === 'extra-small' ? 'small' : context.state.styles.size === 'small' ? 'small' : context.state.styles.size === 'large' ? 'large' : undefined\"\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' : '')\"\n [rowHover]=\"context.state.actions.rowBehavior.hoverable\"\n [rows]=\"context.state.pagination.rows\"\n [first]=\"context.state.pagination.state.first\"\n [showCurrentPageReport]=\"context.state.pagination.pageReport.isVisible\"\n [rowsPerPageOptions]=\"context.state.pagination.rowsPerPageOptions\"\n [loading]=\"loading || isViewportInitializing\"\n [style.visibility]=\"isViewportInitializing ? 'hidden' : null\"\n [paginator]=\"context.state.pagination.isVisible\"\n paginatorDropdownAppendTo=\"body\"\n [currentPageReportTemplate]=\"context.state.locale.paginator.template\"\n [sortField]=\"context.state.sort.field\"\n [sortMode]=\"context.state.sort.mode\"\n [sortOrder]=\"context.state.sort.order\"\n [multiSortMeta]=\"context.state.sort.multiSortMeta\"\n [scrollable]=\"context.state.viewport.scrollable\"\n [scrollHeight]=\"context.state.viewport.scrollHeight\"\n [filterDelay]=\"0\"\n [globalFilterFields]=\"context.globalFilter\"\n [columns]=\"context.visibleColumns\"\n [frozenColumns]=\"context.frozenColumns\"\n [frozenWidth]=\"context.state.frozen.isEnabled ? context.state.frozen.width : null\"\n [resizableColumns]=\"context.state.viewport.resizableColumns\"\n [columnResizeMode]=\"context.state.viewport.columnResizeMode\"\n (onPage)=\"onPage($event)\"\n (onFilter)=\"onFilter($event)\"\n (selectionChange)=\"emitSelection($event)\"\n >\n @if (context.state.caption.isVisible) {\n <ng-template smzTemplate=\"caption\">\n <div class=\"flex flex-wrap items-center gap-2\" [attr.data-testid]=\"buildTableTestId('caption')\" [ngClass]=\"'justify-' + context.state.caption.toolbarAlignment\">\n @if (context.state.caption.title != null) {\n <div class=\"flex-1 database-title\" [attr.data-testid]=\"buildTableTestId('title')\" [innerHTML]=\"context.state.caption.title\"></div>\n }\n <ng-container *ngTemplateOutlet=\"captionTemplate; context: { $implicit: dt }\"></ng-container>\n <smz-table-caption-buttons [buttons]=\"context.state.caption.buttons\" [tableTestId]=\"state.tableTestId\"></smz-table-caption-buttons>\n @if (context.state.caption.exportToPdf.isButtonVisible) {\n <button smzButton [attr.data-testid]=\"buildTableTestId('export-pdf')\" [label]=\"context.state.locale.exportToPdf.label\" icon=\"fa-solid fa-file-pdf\" (click)=\"exportToPdf(context, clonedData.items)\" [disabled]=\"clonedData.showSkeleton\" variant=\"outlined\"></button>\n }\n @if (context.state.caption.exportToExcel.isButtonVisible) {\n <button smzButton [attr.data-testid]=\"buildTableTestId('export-excel')\" [label]=\"context.state.locale.exportToExcel.label\" icon=\"fa-solid fa-file-excel\" (click)=\"exportToExcel(table, context, clonedData.items)\" [disabled]=\"clonedData.showSkeleton\" variant=\"outlined\"></button>\n }\n @if (context.state.editable.creation.isButtonVisible) {\n <button smzButton [attr.data-testid]=\"buildTableTestId('create')\" [label]=\"context.state.editable.creation.buttonLabel\" icon=\"fa-solid fa-plus\" (click)=\"editableService.onRowCreateInit(table, context.columns)\" [disabled]=\"clonedData.showSkeleton || editableService.isEditing || editableService.isCreating || context.state.editable.creation.isButtonDisabled\" variant=\"outlined\"></button>\n }\n @if (context.state.caption.rowSelection.isButtonVisible) {\n <button smzButton [attr.data-testid]=\"buildTableTestId('row-selection')\" [label]=\"context.state.locale.rowSelection.label\" icon=\"fa-solid fa-check-double\" (click)=\"onRowSelection(context)\" [disabled]=\"clonedData.showSkeleton\" variant=\"outlined\"></button>\n }\n @if (context.state.rowExpansion.isButtonVisible) {\n <button smzButton [attr.data-testid]=\"buildTableTestId('row-expansion')\" [label]=\"context.state.rowExpansion.label\" icon=\"fa-solid fa-list\" (click)=\"onRowExpansion(context)\" [disabled]=\"clonedData.showSkeleton\" variant=\"outlined\"></button>\n }\n @if (context.state.caption.clearFilters.isButtonVisible) {\n <button smzButton [attr.data-testid]=\"buildTableTestId('clear-filters')\" [label]=\"context.state.locale.clearFilters.label\" icon=\"fa-solid fa-filter-circle-xmark\" (click)=\"clear(table, context)\" [disabled]=\"clonedData.showSkeleton\" variant=\"outlined\"></button>\n }\n @if (context.state.caption.columnVisibility.showDropdownSelector) {\n <ui-multi-select #columnMultiselect [attr.data-testid]=\"buildTableTestId('column-visibility')\" class=\"ml-2 w-full flex-none md:w-2/12\" styleClass=\"w-full\" appendTo=\"body\" [options]=\"context.hideableColumns\" [(ngModel)]=\"selectedColumns\" [placeholder]=\"context.state.locale.columnVisibility.placeholder\" [selectedItemsLabel]=\"context.state.locale.columnVisibility.selectedItemsLabel\" optionLabel=\"name\" dataKey=\"field\" optionLabel=\"header\" [filter]=\"true\" (panelHide)=\"updateColumnsVisibility(true)\" [smzTooltip]=\"context.state.locale.columnVisibility.pTooltip\">\n </ui-multi-select>\n }\n @if (context.state.caption.globalFilter.isVisible) {\n <ui-icon-field class=\"w-full flex-none\" [ngClass]=\"{ 'md:w-2/12 flex-none': !context.state.caption.globalFilter.expanded }\">\n <ui-input-icon styleClass=\"fa-solid fa-magnifying-glass\"></ui-input-icon>\n <input #inputGlobal [(ngModel)]=\"globalSearchInput\" smzInputText type=\"text\" styleClass=\"database-global-search\" (input)=\"updateGlobalFilter(inputGlobal.value)\" [disabled]=\"clonedData.showSkeleton\" [placeholder]=\"context.state.locale.globalFilter.placeholder\" [attr.data-testid]=\"buildTableTestId('search')\" />\n </ui-icon-field>\n }\n </div>\n @if (toolbarTemplate != null) {\n <div class=\"flex flex-wrap items-center mt-2\" [ngClass]=\"'justify-' + context.state.caption.toolbarAlignment\">\n <ng-container *ngTemplateOutlet=\"toolbarTemplate; context: { $implicit: dt }\"></ng-container>\n </div>\n }\n </ng-template>\n }\n <ng-template smzTemplate=\"header\" let-columns>\n <tr [ngClass]=\"{ 'invisible-header': !context.state.header.isVisible }\">\n @if (context.state.caption.rowSelection.isEnabled) {\n <th [ngStyle]=\"context.state.caption.rowSelection.ngStyle\">\n @if (!context.state.actions.batchActions.isVisible && context.state.caption.rowSelection.mode !== 'single') {\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\n }\n </th>\n }\n @if (context.state.rowExpansion.isEnabled) {\n <th [ngStyle]=\"context.state.rowExpansion.ngStyle\"></th>\n }\n @for (col of columns; track col.field) {\n @if (context.state.viewport.resizableColumns) {\n @if (col.isOrderable) {\n <th [pSortableColumn]=\"col.sortField\" pResizableColumn [attr.data-testid]=\"buildColumnTestId(col.field)\" [ngStyle]=\"col.content.ngStyle\" [ngClass]=\"col.headerStyleClass\">\n <ng-container *ngTemplateOutlet=\"headerContent\"></ng-container>\n </th>\n }\n @if (!col.isOrderable) {\n <th pResizableColumn [attr.data-testid]=\"buildColumnTestId(col.field)\" [ngStyle]=\"col.content.ngStyle\" [ngClass]=\"col.headerStyleClass\">\n <ng-container *ngTemplateOutlet=\"headerContent\"></ng-container>\n </th>\n }\n } @else {\n @if (col.isOrderable) {\n <th [pSortableColumn]=\"col.sortField\" [attr.data-testid]=\"buildColumnTestId(col.field)\" [ngStyle]=\"col.content.ngStyle\" [ngClass]=\"col.headerStyleClass\">\n <ng-container *ngTemplateOutlet=\"headerContent\"></ng-container>\n </th>\n }\n @if (!col.isOrderable) {\n <th [attr.data-testid]=\"buildColumnTestId(col.field)\" [ngStyle]=\"col.content.ngStyle\" [ngClass]=\"col.headerStyleClass\">\n <ng-container *ngTemplateOutlet=\"headerContent\"></ng-container>\n </th>\n }\n }\n <ng-template #headerContent>\n <div class=\"flex justify-start items-center\">\n <span class=\"mr-1\">{{ col.header }}</span>\n @if (col.showHeaderActions) {\n <smz-table-header-actions clickStopPropagation class=\"ml-1 mt-1\" [col]=\"col\"></smz-table-header-actions>\n }\n @if (!clonedData.showSkeleton && col.isOrderable) {\n <p-sortIcon [field]=\"col.sortField\"></p-sortIcon>\n }\n @if (!clonedData.showSkeleton) {\n @switch (col.filter.type) {\n @case (filterTypes.currency) {\n <smz-column-filter type=\"numeric\" currency=\"BRL\" [field]=\"col.filterField\"></smz-column-filter>\n }\n @case (filterTypes.numeric) {\n <smz-column-filter type=\"numeric\" [field]=\"col.filterField\"></smz-column-filter>\n }\n @case (filterTypes.date) {\n <smz-column-filter type=\"date\" [field]=\"col.filterField\" [showTime]=\"col.filter.showTime\"></smz-column-filter>\n }\n @case (filterTypes.text) {\n <smz-column-filter type=\"text\" [field]=\"col.filterField\" [matchMode]=\"col.filter.matchMode === 'allWords' ? 'containsAllWords' : undefined\" [showMatchModes]=\"col.filter.matchMode !== 'allWords'\"></smz-column-filter>\n }\n @case (filterTypes.boolean) {\n <smz-column-filter type=\"boolean\" [field]=\"col.filterField\"></smz-column-filter>\n }\n @case (filterTypes.dropdown) {\n @if (col.filterField | filterObject; as filterField) {\n <smz-column-filter [field]=\"filterField + '.id'\" matchMode=\"dropdown\" [showMatchModes]=\"false\" [showOperator]=\"false\" [showAddButton]=\"false\">\n <ng-template smzTemplate=\"header\">\n <div class=\"px-3 pt-3 pb-0\">\n <span class=\"p-text-bold\">{{ col.header }}</span>\n </div>\n </ng-template>\n <ng-template smzTemplate=\"filter\" let-value let-filter=\"filter\">\n <ui-select appendTo=\"body\" [ngModel]=\"value\" [options]=\"(clonedData.items != null ? clonedData.items : []) | uniqueFilter : filterField + '.id' : filterField : null : 'name' : false\" [placeholder]=\"context.state.locale.dropdownFilter.placeholder\" (changed)=\"filter($event.value)\" optionLabel=\"name\" dataKey=\"id\"></ui-select>\n </ng-template>\n </smz-column-filter>\n }\n }\n @case (filterTypes.multiselect) {\n @if (col.filterField | filterObject; as filterField) {\n <smz-column-filter [field]=\"filterField\" matchMode=\"in\" [showMatchModes]=\"false\" [showOperator]=\"false\" [showAddButton]=\"false\">\n <ng-template smzTemplate=\"header\">\n <div class=\"px-3 pt-3 pb-0\">\n <span class=\"p-text-bold\">{{ col.header }}</span>\n </div>\n </ng-template>\n <ng-template smzTemplate=\"filter\" let-value let-filter=\"filter\">\n <ui-multi-select [ngModel]=\"value\" [options]=\"(clonedData.items != null ? clonedData.items : []) | uniqueFilter : filterField + '.id' : filterField : null : 'name' : false\" [placeholder]=\"context.state.locale.dropdownFilter.placeholder\" (changed)=\"filter($event.value)\" optionLabel=\"name\" dataKey=\"id\"></ui-multi-select>\n </ng-template>\n </smz-column-filter>\n }\n }\n @case (filterTypes.multiselect_array) {\n @if (col.filterField | filterObject; as filterField) {\n <smz-column-filter [field]=\"filterField\" matchMode=\"array-some\" [showMatchModes]=\"false\" [showOperator]=\"false\" [showAddButton]=\"false\">\n <ng-template smzTemplate=\"header\">\n <div class=\"px-3 pt-3 pb-0\">\n <span class=\"p-text-bold\">{{ col.header }}</span>\n </div>\n </ng-template>\n <ng-template smzTemplate=\"filter\" let-value let-filter=\"filter\">\n <ui-multi-select [ngModel]=\"value\" [options]=\"(clonedData.items != null ? clonedData.items : []) | uniqueFilter : filterField + '.id' : filterField : null : 'name' : true\" [placeholder]=\"context.state.locale.dropdownFilter.placeholder\" (changed)=\"filter($event.value)\" optionLabel=\"name\" dataKey=\"id\" [maxSelectedLabels]=\"2\" [selectedItemsLabel]=\"'{0}'\"></ui-multi-select>\n </ng-template>\n </smz-column-filter>\n }\n }\n @case (filterTypes.multiselect_string) {\n @if (col.filterField | filterObject; as filterField) {\n <smz-column-filter [field]=\"filterField\" matchMode=\"multiselectByString\" [showMatchModes]=\"false\" [showOperator]=\"false\" [showAddButton]=\"false\">\n <ng-template smzTemplate=\"header\">\n <div class=\"px-3 pt-3 pb-0\">\n <span class=\"p-text-bold\">{{ col.header }}</span>\n </div>\n </ng-template>\n <ng-template smzTemplate=\"filter\" let-value let-filter=\"filter\">\n <ui-multi-select [ngModel]=\"value\" [options]=\"(clonedData.items != null ? clonedData.items : []) | uniqueFilter : filterField : filterField : null : true : false : false\" [placeholder]=\"context.state.locale.dropdownFilter.placeholder\" (changed)=\"filter($event.value)\" [maxSelectedLabels]=\"2\" [selectedItemsLabel]=\"'{0}'\"></ui-multi-select>\n </ng-template>\n </smz-column-filter>\n }\n }\n }\n }\n @if (context.state.caption.columnVisibility.showColumnHideButton) {\n <button smzButton type=\"button\" icon=\"fa-solid fa-eye-slash\" (click)=\"hideColumn(col, context)\" [rounded]=\"true\" variant=\"text\" styleClass=\"p-button-plain\"></button>\n }\n </div>\n </ng-template>\n }\n @if (context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible|| context.state.editable.isEditable) {\n <th [ngStyle]=\"context.state.editable.isEditable ? context.state.editable.ngStyle : context.state.actions.customActions.ngStyle\"></th>\n }\n </tr>\n @if (context.state.actions.batchActions.isVisible) {\n <tr>\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)\"\n [ngStyle]=\"context.state.actions.customActions.ngStyle\" class=\"px-0\">\n <div class=\"flex flex-wrap items-center justify-start\">\n <p-tableHeaderCheckbox class=\"mr-4\"></p-tableHeaderCheckbox>\n @if (selectedItems?.length > 0) {\n @for (batchItem of context.state.actions.batchActions.items; track batchItem.label) {\n @if (batchItem.visible) {\n <button smzButton [label]=\"batchItem.label\" class=\"animate__animated animate__fadeIn\" [styleClass]=\"'p-button-plain ' + (batchItem.styleClass)\" [icon]=\"batchItem.icon\" (click)=\"batchItem.command(selectedItems); selectedItems = [];\" [disabled]=\"batchItem.disabled\" [smzTooltip]=\"batchItem.tooltip\" [rounded]=\"true\" variant=\"text\"></button>\n }\n }\n }\n </div>\n </th>\n </tr>\n }\n </ng-template>\n <ng-template smzTemplate=\"body\" let-item let-editing=\"editing\" let-rowIndex=\"rowIndex\" let-columns=\"columns\">\n @if (!context.state.footer?.hideBody) {\n <tr #editableRowElement\n [pEditableRow]=\"item\"\n tableItemAction\n [isClickable]=\"context.state.actions.rowBehavior.isClickable\"\n [callback]=\"context.state.actions.rowBehavior.clickCallback\"\n [expandRowOnClick]=\"context.state.actions.rowBehavior.expandRowOnClick\"\n [item]=\"item\"\n class=\"p-selectable-row\"\n [attr.data-testid]=\"buildRowTestId(item, rowIndex)\"\n [ngClass]=\"{ 'highlight-row': item?.id === state.actions.rowBehavior.highlights, 'preserve-in-small': state.actions.rowBehavior.preserveLayoutInSmallDevices }\"\n >\n @if (context.state.caption.rowSelection.isEnabled && !clonedData.showSkeleton) {\n <td\n clickStopPropagation\n class=\"{{ state.actions.rowBehavior.cellStyleClass }}\"\n [ngClass]=\"{ 'opacity-50 pointer-events-none': editableService.context[item.id]?.hasErrors || editableService.context[item.id]?.isLoading }\"\n [ngStyle]=\"context.state.caption.rowSelection.ngStyle\"\n >\n @if (context.state.caption.rowSelection.mode === 'single') {\n <p-tableRadioButton [value]=\"item\" [index]=\"rowIndex\" [disabled]=\"!isRowSelectable(item)\"></p-tableRadioButton>\n } @else {\n <p-tableCheckbox [value]=\"item\" [index]=\"rowIndex\" [disabled]=\"!isRowSelectable(item)\"></p-tableCheckbox>\n }\n </td>\n }\n @if (context.state.rowExpansion.isEnabled && !clonedData.showSkeleton) {\n <td\n clickStopPropagation\n class=\"{{ state.actions.rowBehavior.cellStyleClass }}\"\n [ngClass]=\"{ 'opacity-50 pointer-events-none': editableService.context[item.id]?.hasErrors || editableService.context[item.id]?.isLoading, 'flex flex-wrap justify-start items-center gap-2': context.state.rowExpansion.highlightNewItems && item._isNew }\"\n [ngStyle]=\"context.state.rowExpansion.ngStyle\"\n >\n <button smzButton type=\"button\" class=\"smz-table-row-expansion-toggle\" [icon]=\"item._isExpanded ? 'fa-solid fa-chevron-down' : 'fa-solid fa-chevron-right'\" (click)=\"item._isExpanded = !item._isExpanded; item._isNew = false\" variant=\"text\" [rounded]=\"true\" size=\"sm\"></button>\n @if (context.state.rowExpansion.highlightNewItems && item._isNew) {\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>\n }\n </td>\n }\n @for (col of columns; track col.field) {\n @if (clonedData.showSkeleton) {\n <td class=\"{{ state.actions.rowBehavior.cellStyleClass }}\" [ngStyle]=\"col.content.ngStyle\"><ui-skeleton width=\"100%\" height=\"1rem\"></ui-skeleton></td>\n } @else {\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\">\n <span class=\"p-column-title\">{{ col.header }}</span>\n <p-cellEditor>\n <!-- CELULAR COM EDITOR -->\n <ng-template smzTemplate=\"input\">\n @switch (col.editable.type) {\n @case (editableTypes.none) {\n <smz-table-content class=\"cursor-default\" [ngClass]=\"col.content.contentStyleClass\" [col]=\"col\" [contentTypes]=\"contentTypes\" [item]=\"item\" [rowIndex]=\"rowIndex\" [contentTemplate]=\"contentTemplate\"></smz-table-content>\n }\n @case (editableTypes.custom) {\n <ng-container *ngTemplateOutlet=\"editableTemplate; context: { $implicit: item, col: col }\"></ng-container>\n }\n <!-- INPUT TEXT -->\n @case (editableTypes.text) {\n @if (editableService.context[item.id]?.form; as form) {\n @if (form.controls[col.editable.property]; as control) {\n <div class=\"relative w-full\">\n <input smzInputText type=\"text\" [formControl]=\"$any(control)\" style=\"width: 100%;\">\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\n </div>\n }\n }\n }\n <!-- INPUT NUMBER -->\n @case (editableTypes.number) {\n @if (editableService.context[item.id]?.form; as form) {\n @if (form.controls[col.editable.property]; as control) {\n <div class=\"relative w-full\">\n <ui-input-number *ngVar=\"col.editable.data as numberData\" [formControl]=\"$any(control)\" [mode]=\"numberData.mode\" [minFractionDigits]=\"numberData.minFractionDigits\" [maxFractionDigits]=\"numberData.maxFractionDigits\" [currency]=\"numberData.currency\" [useGrouping]=\"numberData.useGrouping\" [allowEmpty]=\"numberData.allowEmpty\" [showClear]=\"numberData.showClear\" [showButtons]=\"numberData.showButtons\" [prefix]=\"numberData.prefix\" [suffix]=\"numberData.suffix\">\n </ui-input-number>\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\n </div>\n }\n }\n }\n <!-- INPUT SWITCH -->\n @case (editableTypes.switch) {\n @if (editableService.context[item.id]?.form; as form) {\n @if (form.controls[col.editable.property]; as control) {\n <div class=\"relative w-full\">\n <ui-toggle-switch [formControl]=\"$any(control)\"></ui-toggle-switch>\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\n </div>\n }\n }\n }\n <!-- INPUT TEXT AREA -->\n @case (editableTypes.area) {\n @if (editableService.context[item.id]?.form; as form) {\n @if (form.controls[col.editable.property]; as control) {\n <div class=\"relative w-full\">\n <textarea smzTextarea type=\"text\" [formControl]=\"$any(control)\" [rows]=\"$any(col.editable.data).rows\" required style=\"width: 100%;\"></textarea>\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\n </div>\n }\n }\n }\n <!-- INPUT DROPDOWN -->\n @case (editableTypes.dropdown) {\n @if (editableService.context[item.id]?.form; as form) {\n @if (form.controls[col.editable.property]; as control) {\n <div class=\"relative w-full\">\n <ui-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\"></ui-select>\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\n </div>\n }\n }\n }\n <!-- INPUT CALENDAR -->\n @case (editableTypes.calendar) {\n @if (editableService.context[item.id]?.form; as form) {\n @if (form.controls[col.editable.property]; as control) {\n <div class=\"relative w-full\">\n <ui-date-picker [formControl]=\"$any(control)\" appendTo=\"body\" styleClass=\"w-full\" [ngClass]=\"{ 'pl-5': !control.valid }\"></ui-date-picker>\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\n </div>\n }\n }\n }\n }\n </ng-template>\n <!-- CELULAR COM CONTE\u00DADO -->\n <ng-template smzTemplate=\"output\">\n <smz-table-content\n [col]=\"col\"\n [smzTooltip]=\"col.content.tooltip != null ? col.content.tooltip(item) : null\"\n tooltipPosition=\"left\"\n [ngClass]=\"col.content.contentStyleClass\" [contentTypes]=\"contentTypes\" [item]=\"item\" [rowIndex]=\"rowIndex\" [contentTemplate]=\"contentTemplate\">\n </smz-table-content>\n </ng-template>\n </p-cellEditor>\n </td>\n }\n }\n @if (context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible || context.state.editable.isEditable) {\n <td [ngStyle]=\"context.state.actions.customActions.ngStyle\" class=\"px-0\">\n <div class=\"flex flex-wrap items-center justify-center\">\n @if (clonedData.showSkeleton) {\n <div class=\"w-full\">\n <ui-skeleton width=\"100%\" height=\"1rem\"></ui-skeleton>\n </div>\n } @else {\n <!-- SEM EDITAR -->\n @if (!editing) {\n @if (context.state.editable.update.isButtonVisible) {\n <button smzButton type=\"button\" icon=\"fa-solid fa-pencil\" (click)=\"editableService.onRowEditInit(item)\" class=\"mx-1\" [disabled]=\"editableService.isEditing || editableService.isCreating || context.state.editable.update.isButtonDisabled || (!context.state.editable.update.condition(item))\" pInitEditableRow [rounded]=\"true\" variant=\"text\"></button>\n }\n @if (context.state.editable.remove.isButtonVisible) {\n <button smzButton type=\"button\" icon=\"fa-solid fa-trash\" (click)=\"editableService.onRowRemove($event, table, item)\" class=\"mx-1\" [disabled]=\"editableService.isEditing || editableService.isCreating || context.state.editable.remove.isButtonDisabled || (!context.state.editable.remove.condition(item))\" [rounded]=\"true\" variant=\"text\" severity=\"secondary\"></button>\n }\n }\n <!-- EDITANDO -->\n @if (editing) {\n @if (editableService.context[item.id]; as editableContext) {\n <!-- COM LOADING -->\n @if (editableContext.isLoading) {\n <button smzButton type=\"button\" icon=\"fa-solid fa-rotate fa-spin\" [disabled]=\"true\" class=\"mr-2\" [rounded]=\"true\" variant=\"text\" styleClass=\"p-button-info\"></button>\n }\n <!-- SEM LOADING -->\n @if (!editableContext.isLoading) {\n <!-- EDITANDO -->\n @if (!editableContext.hasErrors) {\n <!-- CRIANDO -->\n @if (item._context?.isCreating) {\n <button smzButton type=\"button\" icon=\"fa-solid fa-check\" (click)=\"editableService.onRowCreateSave($event, table, editableRowElement, item)\" [disabled]=\"!editableContext.hasChanged || !editableService.context[item.id]?.form.valid\" class=\"mr-2\" [rounded]=\"true\" variant=\"text\" severity=\"success\"></button>\n <button smzButton type=\"button\" icon=\"fa-solid fa-xmark\" (click)=\"editableService.onRowCreateCancel($event, table, item)\" [rounded]=\"true\" variant=\"text\" severity=\"danger\"></button>\n }\n <!-- ATUALIZANDO -->\n @if (item._context?.isUpdating) {\n <button smzButton type=\"button\" icon=\"fa-solid fa-check\" (click)=\"editableService.onRowEditSave($event, table, editableRowElement, item)\" [disabled]=\"!editableContext.hasChanged || !editableService.context[item.id]?.form.valid\" class=\"mr-2\" [rounded]=\"true\" variant=\"text\" severity=\"success\"></button>\n <button smzButton type=\"button\" icon=\"fa-solid fa-xmark\" (click)=\"editableService.onRowEditCancel($event, table, item)\" [rounded]=\"true\" variant=\"text\" severity=\"danger\"></button>\n }\n }\n <!-- COM ERRORS -->\n @if (editableContext.hasErrors) {\n <ui-popover #errorsOverlay appendTo=\"body\" [style]=\"{ width: '450px' }\">\n <div [innerHtml]=\"editableContext.errors | contentErrors\"></div>\n </ui-popover>\n <button smzButton type=\"button\" icon=\"fas fa-exclamation-triangle\" [disabled]=\"false\" class=\"mr-2\" (click)=\"errorsOverlay.toggle($event)\" size=\"sm\" [rounded]=\"true\" variant=\"text\" severity=\"danger\"></button>\n <!-- CRIANDO -->\n @if (item._context?.isCreating) {\n <button smzButton type=\"button\" icon=\"fa-solid fa-xmark\" (click)=\"editableService.onRowCreateCancel($event, table, item)\" size=\"sm\" [rounded]=\"true\" variant=\"text\" severity=\"danger\"></button>\n }\n <!-- ATUALIZANDO -->\n @if (item._context?.isUpdating) {\n <button smzButton type=\"button\" icon=\"fa-solid fa-xmark\" (click)=\"editableService.onRowEditCancel($event, table, item)\" size=\"sm\" [rounded]=\"true\" variant=\"text\" severity=\"danger\"></button>\n }\n }\n }\n }\n }\n <!-- CUSTOM MENU -->\n @if (context.state.actions.customActions.isVisible && !editing) {\n <ng-container *ngTemplateOutlet=\"actionsTemplate; context: { $implicit: item }\"></ng-container>\n }\n <!-- MENU -->\n @if (context.state.actions.menu.isVisible && !editing) {\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>\n }\n }\n </div>\n </td>\n }\n </tr>\n @if (item?._isExpanded) {\n <tr>\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)\">\n <ng-container *ngTemplateOutlet=\"rowContentTemplate; context: { $implicit: item }\"></ng-container>\n </td>\n </tr>\n }\n }\n </ng-template>\n @if (!context.state.footer?.hideBody) {\n <ng-template smzTemplate=\"emptymessage\" let-columns>\n <tr>\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' }\">\n <div [innerHtml]=\"context.state.emptyFeedback.message\"></div>\n @if (context.state.caption.clearFilters.isButtonVisible && hasFilters()) {\n <button smzButton [label]=\"context.state.locale.clearFilters.label\" class=\"mt-3\" icon=\"fa-solid fa-filter-circle-xmark\" (click)=\"clear(table, context)\" variant=\"outlined\"></button>\n }\n </td>\n </tr>\n </ng-template>\n }\n @if (hasFooter(context.visibleColumns)) {\n <ng-template smzTemplate=\"footer\" let-columns>\n <tr [attr.data-testid]=\"buildTableTestId('footer')\">\n @if (context.state.caption.rowSelection.isEnabled) {\n <td></td>\n }\n @if (context.state.rowExpansion.isEnabled) {\n <td></td>\n }\n @for (col of columns; track col.field) {\n <td [attr.data-testid]=\"buildTableTestId('footer-' + col.field)\" [ngStyle]=\"col.content.ngStyle\">\n <div class=\"font-bold\" [ngClass]=\"col.footer?.styleClass\">{{ col.footer?.isEnabled ? (col | tableFooter : (dt.filteredValue ?? clonedData.items)) : col.footer?.label }}</div>\n </td>\n }\n @if (context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible || context.state.editable.isEditable) {\n <td></td>\n }\n </tr>\n </ng-template>\n }\n </p-table>\n }\n </ng-container>\n </ng-container>\n }\n} @else {\n @if (emptyStateTemplate != null) {\n <ng-container *ngTemplateOutlet=\"emptyStateTemplate; context: { $implicit: {} }\"></ng-container>\n }\n}\n\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.SmzTemplateDirective, selector: "ng-template[smzTemplate]", inputs: ["smzTemplate"] }, { kind: "component", type: Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "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", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "stripedRows", "size", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "virtualRowHeight", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["selectAllChange", "selectionChange", "contextMenuSelectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "directive", type: ResizableColumn, selector: "[pResizableColumn]", inputs: ["pResizableColumnDisabled"] }, { kind: "component", type: CellEditor, selector: "p-cellEditor" }, { kind: "component", type: SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: TableRadioButton, selector: "p-tableRadioButton", inputs: ["disabled", "value", "index", "inputId", "name", "ariaLabel"] }, { kind: "component", type: TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { kind: "component", type: TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "directive", type: EditableRow, selector: "[pEditableRow]", inputs: ["pEditableRow", "pEditableRowDisabled"] }, { kind: "directive", type: InitEditableRow, selector: "[pInitEditableRow]" }, { kind: "component", type: i2.SmzButtonComponent, selector: "button[smzButton], a[smzButton]", inputs: ["label", "icon", "iconPosition", "severity", "variant", "size", "text", "outlined", "rounded", "loading", "styleClass"] }, { kind: "directive", type: i2.SmzInputTextDirective, selector: "input[smzInputText]", inputs: ["size", "invalid"] }, { kind: "component", type: i2.SmzMultiSelectComponent, selector: "ui-multi-select", inputs: ["options", "optionLabel", "optionValue", "optionDisabled", "dataKey", "placeholder", "filter", "filterBy", "filterMatchMode", "filterPlaceholder", "showClear", "showToggleAll", "emptyMessage", "emptyFilterMessage", "maxSelectedLabels", "selectedItemsLabel", "panelStyle", "styleClass", "inputId", "autofocusFilter", "appendTo", "display"], outputs: ["changed", "panelHide", "panelShow"] }, { kind: "component", type: i2.SmzSelectComponent, selector: "ui-select", inputs: ["options", "optionLabel", "optionValue", "optionDisabled", "dataKey", "placeholder", "filter", "filterBy", "filterMatchMode", "filterPlaceholder", "showClear", "emptyMessage", "emptyFilterMessage", "styleClass", "inputId", "ariaLabel", "appendTo"], outputs: ["changed", "showed", "hidden"] }, { kind: "component", type: i2.SmzDatePickerComponent, selector: "ui-date-picker", inputs: ["selectionMode", "dateFormat", "showTime", "timeOnly", "showSeconds", "hourFormat", "minDate", "maxDate", "showButtonBar", "showIcon", "showOnFocus", "keepInvalid", "readonlyInput", "placeholder", "inputId", "styleClass", "appendTo", "touchUI", "focusTrap"], outputs: ["selected", "cleared", "opened", "closed", "blurred"] }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$1.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: i2.SmzTooltipDirective, selector: "[smzTooltip]", inputs: ["smzTooltip", "tooltipPosition", "showDelay", "hideDelay", "tooltipEvent", "escape", "tooltipStyleClass", "tooltipZIndex", "tooltipDisabled", "tooltipOptions", "appendTo"] }, { kind: "component", type: i2.SmzSkeletonComponent, selector: "ui-skeleton", inputs: ["shape", "width", "height"] }, { kind: "directive", type: i2.SmzTextareaDirective, selector: "textarea[smzTextarea]", inputs: ["invalid", "autoResize"] }, { kind: "component", type: i2.SmzPopoverComponent, selector: "ui-popover", inputs: ["style", "styleClass", "dismissable", "autoZIndex", "appendTo"], outputs: ["shown", "hidden"] }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i2.SmzToggleSwitchComponent, selector: "ui-toggle-switch", inputs: ["name"], outputs: ["changed"] }, { kind: "component", type: i2.SmzInputNumberComponent, selector: "ui-input-number", inputs: ["mode", "locale", "localeMatcher", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "min", "max", "step", "prefix", "suffix", "showButtons", "showClear", "allowEmpty", "placeholder", "readonly", "inputId", "name"], outputs: ["inputed", "keyDown", "blurred", "focused"] }, { 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: i2.SmzIconFieldComponent, selector: "ui-icon-field" }, { kind: "component", type: i2.SmzInputIconComponent, selector: "ui-input-icon", inputs: ["styleClass"] }, { kind: "component", type: SmzColumnFilterComponent, selector: "smz-column-filter", inputs: ["currency", "display", "field", "matchMode", "showAddButton", "showMatchModes", "showOperator", "showApplyButton", "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.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: SmzTableFooterPipe, name: "tableFooter" }, { kind: "pipe", type: SmzEditableSourcePipe, name: "editableSource" }, { kind: "pipe", type: SmzContentErrorsPipe, name: "contentErrors" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
22828
22961
|
}
|
|
22829
22962
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: SmzTableComponent, decorators: [{
|
|
22830
22963
|
type: Component,
|
|
22831
|
-
args: [{ selector: 'smz-ui-table', changeDetection: ChangeDetectionStrategy.OnPush, providers: [TableEditableService, TableFormsService], standalone: false, template: "@if (state | tableContext; as context) {\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) {\n <smz-data-info\n [attr.data-testid]=\"buildTableTestId('empty')\"\n [image]=\"context.state.emptyFeedback.image\"\n [message]=\"context.state.emptyFeedback.message\"\n [callbackInfo]=\"context.state.emptyFeedback.extraInfo\"\n [actions]=\"context.state.emptyFeedback.actionButtons\">\n <ng-template smzTemplate=\"actions\">\n <ng-container *ngTemplateOutlet=\"emptyActionsTemplate; context: { $implicit: {} }\"></ng-container>\n </ng-template>\n </smz-data-info>\n } @else {\n <ng-container *ngVar=\"state.source?.items$ != null ? (state.source.items$ | async) : null as observableSource\">\n <ng-container *ngVar=\"state.source?.signalItems != null ? state.source.signalItems() : null as signalSource\">\n @if (((observableSource ?? signalSource ?? items) | cloneTableItems : context: tableKey: context.state.rowExpansion.sincronize); as clonedData) {\n <p-table #dt\n dataKey=\"id\"\n editMode=\"row\"\n [stripedRows]=\"context.state.styles.striped\"\n [value]=\"clonedData.items\"\n [(selection)]=\"selectedItems\"\n [selectionMode]=\"context.state.caption.rowSelection.isEnabled && context.state.caption.rowSelection.mode === 'single' ? 'single' : null\"\n [rowSelectable]=\"rowSelectable\"\n [tableStyleClass]=\"context.state.styles.tableStyleClass\"\n [size]=\"context.state.styles.size === 'extra-small' ? 'small' : context.state.styles.size === 'small' ? 'small' : context.state.styles.size === 'large' ? 'large' : undefined\"\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' : '')\"\n [rowHover]=\"context.state.actions.rowBehavior.hoverable\"\n [rows]=\"context.state.pagination.rows\"\n [first]=\"context.state.pagination.state.first\"\n [showCurrentPageReport]=\"context.state.pagination.pageReport.isVisible\"\n [rowsPerPageOptions]=\"context.state.pagination.rowsPerPageOptions\"\n [loading]=\"loading || isViewportInitializing\"\n [style.visibility]=\"isViewportInitializing ? 'hidden' : null\"\n [paginator]=\"context.state.pagination.isVisible\"\n paginatorDropdownAppendTo=\"body\"\n [currentPageReportTemplate]=\"context.state.locale.paginator.template\"\n [sortField]=\"context.state.sort.field\"\n [sortMode]=\"context.state.sort.mode\"\n [sortOrder]=\"context.state.sort.order\"\n [multiSortMeta]=\"context.state.sort.multiSortMeta\"\n [scrollable]=\"context.state.viewport.scrollable\"\n [scrollHeight]=\"context.state.viewport.scrollHeight\"\n [filterDelay]=\"0\"\n [globalFilterFields]=\"context.globalFilter\"\n [columns]=\"context.visibleColumns\"\n [frozenColumns]=\"context.frozenColumns\"\n [frozenWidth]=\"context.state.frozen.isEnabled ? context.state.frozen.width : null\"\n [resizableColumns]=\"context.state.viewport.resizableColumns\"\n [columnResizeMode]=\"context.state.viewport.columnResizeMode\"\n (onPage)=\"onPage($event)\"\n (onFilter)=\"onFilter($event)\"\n (selectionChange)=\"emitSelection($event)\"\n >\n @if (context.state.caption.isVisible) {\n <ng-template smzTemplate=\"caption\">\n <div class=\"flex flex-wrap items-center gap-2\" [attr.data-testid]=\"buildTableTestId('caption')\" [ngClass]=\"'justify-' + context.state.caption.toolbarAlignment\">\n @if (context.state.caption.title != null) {\n <div class=\"flex-1 database-title\" [attr.data-testid]=\"buildTableTestId('title')\" [innerHTML]=\"context.state.caption.title\"></div>\n }\n <ng-container *ngTemplateOutlet=\"captionTemplate; context: { $implicit: dt }\"></ng-container>\n <smz-table-caption-buttons [buttons]=\"context.state.caption.buttons\" [tableTestId]=\"state.tableTestId\"></smz-table-caption-buttons>\n @if (context.state.caption.exportToPdf.isButtonVisible) {\n <button smzButton [attr.data-testid]=\"buildTableTestId('export-pdf')\" [label]=\"context.state.locale.exportToPdf.label\" icon=\"fa-solid fa-file-pdf\" (click)=\"exportToPdf(context, clonedData.items)\" [disabled]=\"clonedData.showSkeleton\" variant=\"outlined\"></button>\n }\n @if (context.state.caption.exportToExcel.isButtonVisible) {\n <button smzButton [attr.data-testid]=\"buildTableTestId('export-excel')\" [label]=\"context.state.locale.exportToExcel.label\" icon=\"fa-solid fa-file-excel\" (click)=\"exportToExcel(table, context, clonedData.items)\" [disabled]=\"clonedData.showSkeleton\" variant=\"outlined\"></button>\n }\n @if (context.state.editable.creation.isButtonVisible) {\n <button smzButton [attr.data-testid]=\"buildTableTestId('create')\" [label]=\"context.state.editable.creation.buttonLabel\" icon=\"fa-solid fa-plus\" (click)=\"editableService.onRowCreateInit(table, context.columns)\" [disabled]=\"clonedData.showSkeleton || editableService.isEditing || editableService.isCreating || context.state.editable.creation.isButtonDisabled\" variant=\"outlined\"></button>\n }\n @if (context.state.caption.rowSelection.isButtonVisible) {\n <button smzButton [attr.data-testid]=\"buildTableTestId('row-selection')\" [label]=\"context.state.locale.rowSelection.label\" icon=\"fa-solid fa-check-double\" (click)=\"onRowSelection(context)\" [disabled]=\"clonedData.showSkeleton\" variant=\"outlined\"></button>\n }\n @if (context.state.rowExpansion.isButtonVisible) {\n <button smzButton [attr.data-testid]=\"buildTableTestId('row-expansion')\" [label]=\"context.state.rowExpansion.label\" icon=\"fa-solid fa-list\" (click)=\"onRowExpansion(context)\" [disabled]=\"clonedData.showSkeleton\" variant=\"outlined\"></button>\n }\n @if (context.state.caption.clearFilters.isButtonVisible) {\n <button smzButton [attr.data-testid]=\"buildTableTestId('clear-filters')\" [label]=\"context.state.locale.clearFilters.label\" icon=\"fa-solid fa-filter-circle-xmark\" (click)=\"clear(table, context)\" [disabled]=\"clonedData.showSkeleton\" variant=\"outlined\"></button>\n }\n @if (context.state.caption.columnVisibility.showDropdownSelector) {\n <ui-multi-select #columnMultiselect [attr.data-testid]=\"buildTableTestId('column-visibility')\" class=\"ml-2 w-full flex-none md:w-2/12\" styleClass=\"w-full\" appendTo=\"body\" [options]=\"context.hideableColumns\" [(ngModel)]=\"selectedColumns\" [placeholder]=\"context.state.locale.columnVisibility.placeholder\" [selectedItemsLabel]=\"context.state.locale.columnVisibility.selectedItemsLabel\" optionLabel=\"name\" dataKey=\"field\" optionLabel=\"header\" [filter]=\"true\" (panelHide)=\"updateColumnsVisibility(true)\" [smzTooltip]=\"context.state.locale.columnVisibility.pTooltip\">\n </ui-multi-select>\n }\n @if (context.state.caption.globalFilter.isVisible) {\n <ui-icon-field class=\"w-full flex-none\" [ngClass]=\"{ 'md:w-2/12 flex-none': !context.state.caption.globalFilter.expanded }\">\n <ui-input-icon styleClass=\"fa-solid fa-magnifying-glass\"></ui-input-icon>\n <input #inputGlobal [(ngModel)]=\"globalSearchInput\" smzInputText type=\"text\" styleClass=\"database-global-search\" (input)=\"updateGlobalFilter(inputGlobal.value)\" [disabled]=\"clonedData.showSkeleton\" [placeholder]=\"context.state.locale.globalFilter.placeholder\" [attr.data-testid]=\"buildTableTestId('search')\" />\n </ui-icon-field>\n }\n </div>\n @if (toolbarTemplate != null) {\n <div class=\"flex flex-wrap items-center mt-2\" [ngClass]=\"'justify-' + context.state.caption.toolbarAlignment\">\n <ng-container *ngTemplateOutlet=\"toolbarTemplate; context: { $implicit: dt }\"></ng-container>\n </div>\n }\n </ng-template>\n }\n <ng-template smzTemplate=\"header\" let-columns>\n <tr [ngClass]=\"{ 'invisible-header': !context.state.header.isVisible }\">\n @if (context.state.caption.rowSelection.isEnabled) {\n <th [ngStyle]=\"context.state.caption.rowSelection.ngStyle\">\n @if (!context.state.actions.batchActions.isVisible && context.state.caption.rowSelection.mode !== 'single') {\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\n }\n </th>\n }\n @if (context.state.rowExpansion.isEnabled) {\n <th [ngStyle]=\"context.state.rowExpansion.ngStyle\"></th>\n }\n @for (col of columns; track col.field) {\n @if (context.state.viewport.resizableColumns) {\n @if (col.isOrderable) {\n <th [pSortableColumn]=\"col.sortField\" pResizableColumn [attr.data-testid]=\"buildColumnTestId(col.field)\" [ngStyle]=\"col.content.ngStyle\" [ngClass]=\"col.headerStyleClass\">\n <ng-container *ngTemplateOutlet=\"headerContent\"></ng-container>\n </th>\n }\n @if (!col.isOrderable) {\n <th pResizableColumn [attr.data-testid]=\"buildColumnTestId(col.field)\" [ngStyle]=\"col.content.ngStyle\" [ngClass]=\"col.headerStyleClass\">\n <ng-container *ngTemplateOutlet=\"headerContent\"></ng-container>\n </th>\n }\n } @else {\n @if (col.isOrderable) {\n <th [pSortableColumn]=\"col.sortField\" [attr.data-testid]=\"buildColumnTestId(col.field)\" [ngStyle]=\"col.content.ngStyle\" [ngClass]=\"col.headerStyleClass\">\n <ng-container *ngTemplateOutlet=\"headerContent\"></ng-container>\n </th>\n }\n @if (!col.isOrderable) {\n <th [attr.data-testid]=\"buildColumnTestId(col.field)\" [ngStyle]=\"col.content.ngStyle\" [ngClass]=\"col.headerStyleClass\">\n <ng-container *ngTemplateOutlet=\"headerContent\"></ng-container>\n </th>\n }\n }\n <ng-template #headerContent>\n <div class=\"flex justify-start items-center\">\n <span class=\"mr-1\">{{ col.header }}</span>\n @if (col.showHeaderActions) {\n <smz-table-header-actions clickStopPropagation class=\"ml-1 mt-1\" [col]=\"col\"></smz-table-header-actions>\n }\n @if (!clonedData.showSkeleton && col.isOrderable) {\n <p-sortIcon [field]=\"col.sortField\"></p-sortIcon>\n }\n @if (!clonedData.showSkeleton) {\n @switch (col.filter.type) {\n @case (filterTypes.currency) {\n <smz-column-filter type=\"numeric\" currency=\"BRL\" [field]=\"col.filterField\"></smz-column-filter>\n }\n @case (filterTypes.numeric) {\n <smz-column-filter type=\"numeric\" [field]=\"col.filterField\"></smz-column-filter>\n }\n @case (filterTypes.date) {\n <smz-column-filter type=\"date\" [field]=\"col.filterField\" [showTime]=\"col.filter.showTime\"></smz-column-filter>\n }\n @case (filterTypes.text) {\n <smz-column-filter type=\"text\" [field]=\"col.filterField\"></smz-column-filter>\n }\n @case (filterTypes.boolean) {\n <smz-column-filter type=\"boolean\" [field]=\"col.filterField\"></smz-column-filter>\n }\n @case (filterTypes.dropdown) {\n @if (col.filterField | filterObject; as filterField) {\n <smz-column-filter [field]=\"filterField + '.id'\" matchMode=\"dropdown\" [showMatchModes]=\"false\" [showOperator]=\"false\" [showAddButton]=\"false\">\n <ng-template smzTemplate=\"header\">\n <div class=\"px-3 pt-3 pb-0\">\n <span class=\"p-text-bold\">{{ col.header }}</span>\n </div>\n </ng-template>\n <ng-template smzTemplate=\"filter\" let-value let-filter=\"filter\">\n <ui-select appendTo=\"body\" [ngModel]=\"value\" [options]=\"(clonedData.items != null ? clonedData.items : []) | uniqueFilter : filterField + '.id' : filterField : null : 'name' : false\" [placeholder]=\"context.state.locale.dropdownFilter.placeholder\" (changed)=\"filter($event.value)\" optionLabel=\"name\" dataKey=\"id\"></ui-select>\n </ng-template>\n </smz-column-filter>\n }\n }\n @case (filterTypes.multiselect) {\n @if (col.filterField | filterObject; as filterField) {\n <smz-column-filter [field]=\"filterField\" matchMode=\"in\" [showMatchModes]=\"false\" [showOperator]=\"false\" [showAddButton]=\"false\">\n <ng-template smzTemplate=\"header\">\n <div class=\"px-3 pt-3 pb-0\">\n <span class=\"p-text-bold\">{{ col.header }}</span>\n </div>\n </ng-template>\n <ng-template smzTemplate=\"filter\" let-value let-filter=\"filter\">\n <ui-multi-select [ngModel]=\"value\" [options]=\"(clonedData.items != null ? clonedData.items : []) | uniqueFilter : filterField + '.id' : filterField : null : 'name' : false\" [placeholder]=\"context.state.locale.dropdownFilter.placeholder\" (changed)=\"filter($event.value)\" optionLabel=\"name\" dataKey=\"id\"></ui-multi-select>\n </ng-template>\n </smz-column-filter>\n }\n }\n @case (filterTypes.multiselect_array) {\n @if (col.filterField | filterObject; as filterField) {\n <smz-column-filter [field]=\"filterField\" matchMode=\"array-some\" [showMatchModes]=\"false\" [showOperator]=\"false\" [showAddButton]=\"false\">\n <ng-template smzTemplate=\"header\">\n <div class=\"px-3 pt-3 pb-0\">\n <span class=\"p-text-bold\">{{ col.header }}</span>\n </div>\n </ng-template>\n <ng-template smzTemplate=\"filter\" let-value let-filter=\"filter\">\n <ui-multi-select [ngModel]=\"value\" [options]=\"(clonedData.items != null ? clonedData.items : []) | uniqueFilter : filterField + '.id' : filterField : null : 'name' : true\" [placeholder]=\"context.state.locale.dropdownFilter.placeholder\" (changed)=\"filter($event.value)\" optionLabel=\"name\" dataKey=\"id\" [maxSelectedLabels]=\"2\" [selectedItemsLabel]=\"'{0}'\"></ui-multi-select>\n </ng-template>\n </smz-column-filter>\n }\n }\n @case (filterTypes.multiselect_string) {\n @if (col.filterField | filterObject; as filterField) {\n <smz-column-filter [field]=\"filterField\" matchMode=\"multiselectByString\" [showMatchModes]=\"false\" [showOperator]=\"false\" [showAddButton]=\"false\">\n <ng-template smzTemplate=\"header\">\n <div class=\"px-3 pt-3 pb-0\">\n <span class=\"p-text-bold\">{{ col.header }}</span>\n </div>\n </ng-template>\n <ng-template smzTemplate=\"filter\" let-value let-filter=\"filter\">\n <ui-multi-select [ngModel]=\"value\" [options]=\"(clonedData.items != null ? clonedData.items : []) | uniqueFilter : filterField : filterField : null : true : false : false\" [placeholder]=\"context.state.locale.dropdownFilter.placeholder\" (changed)=\"filter($event.value)\" [maxSelectedLabels]=\"2\" [selectedItemsLabel]=\"'{0}'\"></ui-multi-select>\n </ng-template>\n </smz-column-filter>\n }\n }\n }\n }\n @if (context.state.caption.columnVisibility.showColumnHideButton) {\n <button smzButton type=\"button\" icon=\"fa-solid fa-eye-slash\" (click)=\"hideColumn(col, context)\" [rounded]=\"true\" variant=\"text\" styleClass=\"p-button-plain\"></button>\n }\n </div>\n </ng-template>\n }\n @if (context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible|| context.state.editable.isEditable) {\n <th [ngStyle]=\"context.state.editable.isEditable ? context.state.editable.ngStyle : context.state.actions.customActions.ngStyle\"></th>\n }\n </tr>\n @if (context.state.actions.batchActions.isVisible) {\n <tr>\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)\"\n [ngStyle]=\"context.state.actions.customActions.ngStyle\" class=\"px-0\">\n <div class=\"flex flex-wrap items-center justify-start\">\n <p-tableHeaderCheckbox class=\"mr-4\"></p-tableHeaderCheckbox>\n @if (selectedItems?.length > 0) {\n @for (batchItem of context.state.actions.batchActions.items; track batchItem.label) {\n @if (batchItem.visible) {\n <button smzButton [label]=\"batchItem.label\" class=\"animate__animated animate__fadeIn\" [styleClass]=\"'p-button-plain ' + (batchItem.styleClass)\" [icon]=\"batchItem.icon\" (click)=\"batchItem.command(selectedItems); selectedItems = [];\" [disabled]=\"batchItem.disabled\" [smzTooltip]=\"batchItem.tooltip\" [rounded]=\"true\" variant=\"text\"></button>\n }\n }\n }\n </div>\n </th>\n </tr>\n }\n </ng-template>\n <ng-template smzTemplate=\"body\" let-item let-editing=\"editing\" let-rowIndex=\"rowIndex\" let-columns=\"columns\">\n @if (!context.state.footer?.hideBody) {\n <tr #editableRowElement\n [pEditableRow]=\"item\"\n tableItemAction\n [isClickable]=\"context.state.actions.rowBehavior.isClickable\"\n [callback]=\"context.state.actions.rowBehavior.clickCallback\"\n [expandRowOnClick]=\"context.state.actions.rowBehavior.expandRowOnClick\"\n [item]=\"item\"\n class=\"p-selectable-row\"\n [attr.data-testid]=\"buildRowTestId(item, rowIndex)\"\n [ngClass]=\"{ 'highlight-row': item?.id === state.actions.rowBehavior.highlights, 'preserve-in-small': state.actions.rowBehavior.preserveLayoutInSmallDevices }\"\n >\n @if (context.state.caption.rowSelection.isEnabled && !clonedData.showSkeleton) {\n <td\n clickStopPropagation\n class=\"{{ state.actions.rowBehavior.cellStyleClass }}\"\n [ngClass]=\"{ 'opacity-50 pointer-events-none': editableService.context[item.id]?.hasErrors || editableService.context[item.id]?.isLoading }\"\n [ngStyle]=\"context.state.caption.rowSelection.ngStyle\"\n >\n @if (context.state.caption.rowSelection.mode === 'single') {\n <p-tableRadioButton [value]=\"item\" [index]=\"rowIndex\" [disabled]=\"!isRowSelectable(item)\"></p-tableRadioButton>\n } @else {\n <p-tableCheckbox [value]=\"item\" [index]=\"rowIndex\" [disabled]=\"!isRowSelectable(item)\"></p-tableCheckbox>\n }\n </td>\n }\n @if (context.state.rowExpansion.isEnabled && !clonedData.showSkeleton) {\n <td\n clickStopPropagation\n class=\"{{ state.actions.rowBehavior.cellStyleClass }}\"\n [ngClass]=\"{ 'opacity-50 pointer-events-none': editableService.context[item.id]?.hasErrors || editableService.context[item.id]?.isLoading, 'flex flex-wrap justify-start items-center gap-2': context.state.rowExpansion.highlightNewItems && item._isNew }\"\n [ngStyle]=\"context.state.rowExpansion.ngStyle\"\n >\n <button smzButton type=\"button\" class=\"smz-table-row-expansion-toggle\" [icon]=\"item._isExpanded ? 'fa-solid fa-chevron-down' : 'fa-solid fa-chevron-right'\" (click)=\"item._isExpanded = !item._isExpanded; item._isNew = false\" variant=\"text\" [rounded]=\"true\" size=\"sm\"></button>\n @if (context.state.rowExpansion.highlightNewItems && item._isNew) {\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>\n }\n </td>\n }\n @for (col of columns; track col.field) {\n @if (clonedData.showSkeleton) {\n <td class=\"{{ state.actions.rowBehavior.cellStyleClass }}\" [ngStyle]=\"col.content.ngStyle\"><ui-skeleton width=\"100%\" height=\"1rem\"></ui-skeleton></td>\n } @else {\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\">\n <span class=\"p-column-title\">{{ col.header }}</span>\n <p-cellEditor>\n <!-- CELULAR COM EDITOR -->\n <ng-template smzTemplate=\"input\">\n @switch (col.editable.type) {\n @case (editableTypes.none) {\n <smz-table-content class=\"cursor-default\" [ngClass]=\"col.content.contentStyleClass\" [col]=\"col\" [contentTypes]=\"contentTypes\" [item]=\"item\" [rowIndex]=\"rowIndex\" [contentTemplate]=\"contentTemplate\"></smz-table-content>\n }\n @case (editableTypes.custom) {\n <ng-container *ngTemplateOutlet=\"editableTemplate; context: { $implicit: item, col: col }\"></ng-container>\n }\n <!-- INPUT TEXT -->\n @case (editableTypes.text) {\n @if (editableService.context[item.id]?.form; as form) {\n @if (form.controls[col.editable.property]; as control) {\n <div class=\"relative w-full\">\n <input smzInputText type=\"text\" [formControl]=\"$any(control)\" style=\"width: 100%;\">\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\n </div>\n }\n }\n }\n <!-- INPUT NUMBER -->\n @case (editableTypes.number) {\n @if (editableService.context[item.id]?.form; as form) {\n @if (form.controls[col.editable.property]; as control) {\n <div class=\"relative w-full\">\n <ui-input-number *ngVar=\"col.editable.data as numberData\" [formControl]=\"$any(control)\" [mode]=\"numberData.mode\" [minFractionDigits]=\"numberData.minFractionDigits\" [maxFractionDigits]=\"numberData.maxFractionDigits\" [currency]=\"numberData.currency\" [useGrouping]=\"numberData.useGrouping\" [allowEmpty]=\"numberData.allowEmpty\" [showClear]=\"numberData.showClear\" [showButtons]=\"numberData.showButtons\" [prefix]=\"numberData.prefix\" [suffix]=\"numberData.suffix\">\n </ui-input-number>\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\n </div>\n }\n }\n }\n <!-- INPUT SWITCH -->\n @case (editableTypes.switch) {\n @if (editableService.context[item.id]?.form; as form) {\n @if (form.controls[col.editable.property]; as control) {\n <div class=\"relative w-full\">\n <ui-toggle-switch [formControl]=\"$any(control)\"></ui-toggle-switch>\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\n </div>\n }\n }\n }\n <!-- INPUT TEXT AREA -->\n @case (editableTypes.area) {\n @if (editableService.context[item.id]?.form; as form) {\n @if (form.controls[col.editable.property]; as control) {\n <div class=\"relative w-full\">\n <textarea smzTextarea type=\"text\" [formControl]=\"$any(control)\" [rows]=\"$any(col.editable.data).rows\" required style=\"width: 100%;\"></textarea>\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\n </div>\n }\n }\n }\n <!-- INPUT DROPDOWN -->\n @case (editableTypes.dropdown) {\n @if (editableService.context[item.id]?.form; as form) {\n @if (form.controls[col.editable.property]; as control) {\n <div class=\"relative w-full\">\n <ui-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\"></ui-select>\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\n </div>\n }\n }\n }\n <!-- INPUT CALENDAR -->\n @case (editableTypes.calendar) {\n @if (editableService.context[item.id]?.form; as form) {\n @if (form.controls[col.editable.property]; as control) {\n <div class=\"relative w-full\">\n <ui-date-picker [formControl]=\"$any(control)\" appendTo=\"body\" styleClass=\"w-full\" [ngClass]=\"{ 'pl-5': !control.valid }\"></ui-date-picker>\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\n </div>\n }\n }\n }\n }\n </ng-template>\n <!-- CELULAR COM CONTE\u00DADO -->\n <ng-template smzTemplate=\"output\">\n <smz-table-content\n [col]=\"col\"\n [smzTooltip]=\"col.content.tooltip != null ? col.content.tooltip(item) : null\"\n tooltipPosition=\"left\"\n [ngClass]=\"col.content.contentStyleClass\" [contentTypes]=\"contentTypes\" [item]=\"item\" [rowIndex]=\"rowIndex\" [contentTemplate]=\"contentTemplate\">\n </smz-table-content>\n </ng-template>\n </p-cellEditor>\n </td>\n }\n }\n @if (context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible || context.state.editable.isEditable) {\n <td [ngStyle]=\"context.state.actions.customActions.ngStyle\" class=\"px-0\">\n <div class=\"flex flex-wrap items-center justify-center\">\n @if (clonedData.showSkeleton) {\n <div class=\"w-full\">\n <ui-skeleton width=\"100%\" height=\"1rem\"></ui-skeleton>\n </div>\n } @else {\n <!-- SEM EDITAR -->\n @if (!editing) {\n @if (context.state.editable.update.isButtonVisible) {\n <button smzButton type=\"button\" icon=\"fa-solid fa-pencil\" (click)=\"editableService.onRowEditInit(item)\" class=\"mx-1\" [disabled]=\"editableService.isEditing || editableService.isCreating || context.state.editable.update.isButtonDisabled || (!context.state.editable.update.condition(item))\" pInitEditableRow [rounded]=\"true\" variant=\"text\"></button>\n }\n @if (context.state.editable.remove.isButtonVisible) {\n <button smzButton type=\"button\" icon=\"fa-solid fa-trash\" (click)=\"editableService.onRowRemove($event, table, item)\" class=\"mx-1\" [disabled]=\"editableService.isEditing || editableService.isCreating || context.state.editable.remove.isButtonDisabled || (!context.state.editable.remove.condition(item))\" [rounded]=\"true\" variant=\"text\" severity=\"secondary\"></button>\n }\n }\n <!-- EDITANDO -->\n @if (editing) {\n @if (editableService.context[item.id]; as editableContext) {\n <!-- COM LOADING -->\n @if (editableContext.isLoading) {\n <button smzButton type=\"button\" icon=\"fa-solid fa-rotate fa-spin\" [disabled]=\"true\" class=\"mr-2\" [rounded]=\"true\" variant=\"text\" styleClass=\"p-button-info\"></button>\n }\n <!-- SEM LOADING -->\n @if (!editableContext.isLoading) {\n <!-- EDITANDO -->\n @if (!editableContext.hasErrors) {\n <!-- CRIANDO -->\n @if (item._context?.isCreating) {\n <button smzButton type=\"button\" icon=\"fa-solid fa-check\" (click)=\"editableService.onRowCreateSave($event, table, editableRowElement, item)\" [disabled]=\"!editableContext.hasChanged || !editableService.context[item.id]?.form.valid\" class=\"mr-2\" [rounded]=\"true\" variant=\"text\" severity=\"success\"></button>\n <button smzButton type=\"button\" icon=\"fa-solid fa-xmark\" (click)=\"editableService.onRowCreateCancel($event, table, item)\" [rounded]=\"true\" variant=\"text\" severity=\"danger\"></button>\n }\n <!-- ATUALIZANDO -->\n @if (item._context?.isUpdating) {\n <button smzButton type=\"button\" icon=\"fa-solid fa-check\" (click)=\"editableService.onRowEditSave($event, table, editableRowElement, item)\" [disabled]=\"!editableContext.hasChanged || !editableService.context[item.id]?.form.valid\" class=\"mr-2\" [rounded]=\"true\" variant=\"text\" severity=\"success\"></button>\n <button smzButton type=\"button\" icon=\"fa-solid fa-xmark\" (click)=\"editableService.onRowEditCancel($event, table, item)\" [rounded]=\"true\" variant=\"text\" severity=\"danger\"></button>\n }\n }\n <!-- COM ERRORS -->\n @if (editableContext.hasErrors) {\n <ui-popover #errorsOverlay appendTo=\"body\" [style]=\"{ width: '450px' }\">\n <div [innerHtml]=\"editableContext.errors | contentErrors\"></div>\n </ui-popover>\n <button smzButton type=\"button\" icon=\"fas fa-exclamation-triangle\" [disabled]=\"false\" class=\"mr-2\" (click)=\"errorsOverlay.toggle($event)\" size=\"sm\" [rounded]=\"true\" variant=\"text\" severity=\"danger\"></button>\n <!-- CRIANDO -->\n @if (item._context?.isCreating) {\n <button smzButton type=\"button\" icon=\"fa-solid fa-xmark\" (click)=\"editableService.onRowCreateCancel($event, table, item)\" size=\"sm\" [rounded]=\"true\" variant=\"text\" severity=\"danger\"></button>\n }\n <!-- ATUALIZANDO -->\n @if (item._context?.isUpdating) {\n <button smzButton type=\"button\" icon=\"fa-solid fa-xmark\" (click)=\"editableService.onRowEditCancel($event, table, item)\" size=\"sm\" [rounded]=\"true\" variant=\"text\" severity=\"danger\"></button>\n }\n }\n }\n }\n }\n <!-- CUSTOM MENU -->\n @if (context.state.actions.customActions.isVisible && !editing) {\n <ng-container *ngTemplateOutlet=\"actionsTemplate; context: { $implicit: item }\"></ng-container>\n }\n <!-- MENU -->\n @if (context.state.actions.menu.isVisible && !editing) {\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>\n }\n }\n </div>\n </td>\n }\n </tr>\n @if (item?._isExpanded) {\n <tr>\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)\">\n <ng-container *ngTemplateOutlet=\"rowContentTemplate; context: { $implicit: item }\"></ng-container>\n </td>\n </tr>\n }\n }\n </ng-template>\n @if (!context.state.footer?.hideBody) {\n <ng-template smzTemplate=\"emptymessage\" let-columns>\n <tr>\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' }\">\n <div [innerHtml]=\"context.state.emptyFeedback.message\"></div>\n @if (context.state.caption.clearFilters.isButtonVisible && hasFilters()) {\n <button smzButton [label]=\"context.state.locale.clearFilters.label\" class=\"mt-3\" icon=\"fa-solid fa-filter-circle-xmark\" (click)=\"clear(table, context)\" variant=\"outlined\"></button>\n }\n </td>\n </tr>\n </ng-template>\n }\n @if (hasFooter(context.visibleColumns)) {\n <ng-template smzTemplate=\"footer\" let-columns>\n <tr [attr.data-testid]=\"buildTableTestId('footer')\">\n @if (context.state.caption.rowSelection.isEnabled) {\n <td></td>\n }\n @if (context.state.rowExpansion.isEnabled) {\n <td></td>\n }\n @for (col of columns; track col.field) {\n <td [attr.data-testid]=\"buildTableTestId('footer-' + col.field)\" [ngStyle]=\"col.content.ngStyle\">\n <div class=\"font-bold\" [ngClass]=\"col.footer?.styleClass\">{{ col.footer?.isEnabled ? (col | tableFooter : (dt.filteredValue ?? clonedData.items)) : col.footer?.label }}</div>\n </td>\n }\n @if (context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible || context.state.editable.isEditable) {\n <td></td>\n }\n </tr>\n </ng-template>\n }\n </p-table>\n }\n </ng-container>\n </ng-container>\n }\n} @else {\n @if (emptyStateTemplate != null) {\n <ng-container *ngTemplateOutlet=\"emptyStateTemplate; context: { $implicit: {} }\"></ng-container>\n }\n}\n\n" }]
|
|
22964
|
+
args: [{ selector: 'smz-ui-table', changeDetection: ChangeDetectionStrategy.OnPush, providers: [TableEditableService, TableFormsService], standalone: false, template: "@if (state | tableContext; as context) {\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) {\n <smz-data-info\n [attr.data-testid]=\"buildTableTestId('empty')\"\n [image]=\"context.state.emptyFeedback.image\"\n [message]=\"context.state.emptyFeedback.message\"\n [callbackInfo]=\"context.state.emptyFeedback.extraInfo\"\n [actions]=\"context.state.emptyFeedback.actionButtons\">\n <ng-template smzTemplate=\"actions\">\n <ng-container *ngTemplateOutlet=\"emptyActionsTemplate; context: { $implicit: {} }\"></ng-container>\n </ng-template>\n </smz-data-info>\n } @else {\n <ng-container *ngVar=\"state.source?.items$ != null ? (state.source.items$ | async) : null as observableSource\">\n <ng-container *ngVar=\"state.source?.signalItems != null ? state.source.signalItems() : null as signalSource\">\n @if (((observableSource ?? signalSource ?? items) | cloneTableItems : context: tableKey: context.state.rowExpansion.sincronize); as clonedData) {\n <p-table #dt\n dataKey=\"id\"\n editMode=\"row\"\n [stripedRows]=\"context.state.styles.striped\"\n [value]=\"clonedData.items\"\n [(selection)]=\"selectedItems\"\n [selectionMode]=\"context.state.caption.rowSelection.isEnabled && context.state.caption.rowSelection.mode === 'single' ? 'single' : null\"\n [rowSelectable]=\"rowSelectable\"\n [tableStyleClass]=\"context.state.styles.tableStyleClass\"\n [size]=\"context.state.styles.size === 'extra-small' ? 'small' : context.state.styles.size === 'small' ? 'small' : context.state.styles.size === 'large' ? 'large' : undefined\"\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' : '')\"\n [rowHover]=\"context.state.actions.rowBehavior.hoverable\"\n [rows]=\"context.state.pagination.rows\"\n [first]=\"context.state.pagination.state.first\"\n [showCurrentPageReport]=\"context.state.pagination.pageReport.isVisible\"\n [rowsPerPageOptions]=\"context.state.pagination.rowsPerPageOptions\"\n [loading]=\"loading || isViewportInitializing\"\n [style.visibility]=\"isViewportInitializing ? 'hidden' : null\"\n [paginator]=\"context.state.pagination.isVisible\"\n paginatorDropdownAppendTo=\"body\"\n [currentPageReportTemplate]=\"context.state.locale.paginator.template\"\n [sortField]=\"context.state.sort.field\"\n [sortMode]=\"context.state.sort.mode\"\n [sortOrder]=\"context.state.sort.order\"\n [multiSortMeta]=\"context.state.sort.multiSortMeta\"\n [scrollable]=\"context.state.viewport.scrollable\"\n [scrollHeight]=\"context.state.viewport.scrollHeight\"\n [filterDelay]=\"0\"\n [globalFilterFields]=\"context.globalFilter\"\n [columns]=\"context.visibleColumns\"\n [frozenColumns]=\"context.frozenColumns\"\n [frozenWidth]=\"context.state.frozen.isEnabled ? context.state.frozen.width : null\"\n [resizableColumns]=\"context.state.viewport.resizableColumns\"\n [columnResizeMode]=\"context.state.viewport.columnResizeMode\"\n (onPage)=\"onPage($event)\"\n (onFilter)=\"onFilter($event)\"\n (selectionChange)=\"emitSelection($event)\"\n >\n @if (context.state.caption.isVisible) {\n <ng-template smzTemplate=\"caption\">\n <div class=\"flex flex-wrap items-center gap-2\" [attr.data-testid]=\"buildTableTestId('caption')\" [ngClass]=\"'justify-' + context.state.caption.toolbarAlignment\">\n @if (context.state.caption.title != null) {\n <div class=\"flex-1 database-title\" [attr.data-testid]=\"buildTableTestId('title')\" [innerHTML]=\"context.state.caption.title\"></div>\n }\n <ng-container *ngTemplateOutlet=\"captionTemplate; context: { $implicit: dt }\"></ng-container>\n <smz-table-caption-buttons [buttons]=\"context.state.caption.buttons\" [tableTestId]=\"state.tableTestId\"></smz-table-caption-buttons>\n @if (context.state.caption.exportToPdf.isButtonVisible) {\n <button smzButton [attr.data-testid]=\"buildTableTestId('export-pdf')\" [label]=\"context.state.locale.exportToPdf.label\" icon=\"fa-solid fa-file-pdf\" (click)=\"exportToPdf(context, clonedData.items)\" [disabled]=\"clonedData.showSkeleton\" variant=\"outlined\"></button>\n }\n @if (context.state.caption.exportToExcel.isButtonVisible) {\n <button smzButton [attr.data-testid]=\"buildTableTestId('export-excel')\" [label]=\"context.state.locale.exportToExcel.label\" icon=\"fa-solid fa-file-excel\" (click)=\"exportToExcel(table, context, clonedData.items)\" [disabled]=\"clonedData.showSkeleton\" variant=\"outlined\"></button>\n }\n @if (context.state.editable.creation.isButtonVisible) {\n <button smzButton [attr.data-testid]=\"buildTableTestId('create')\" [label]=\"context.state.editable.creation.buttonLabel\" icon=\"fa-solid fa-plus\" (click)=\"editableService.onRowCreateInit(table, context.columns)\" [disabled]=\"clonedData.showSkeleton || editableService.isEditing || editableService.isCreating || context.state.editable.creation.isButtonDisabled\" variant=\"outlined\"></button>\n }\n @if (context.state.caption.rowSelection.isButtonVisible) {\n <button smzButton [attr.data-testid]=\"buildTableTestId('row-selection')\" [label]=\"context.state.locale.rowSelection.label\" icon=\"fa-solid fa-check-double\" (click)=\"onRowSelection(context)\" [disabled]=\"clonedData.showSkeleton\" variant=\"outlined\"></button>\n }\n @if (context.state.rowExpansion.isButtonVisible) {\n <button smzButton [attr.data-testid]=\"buildTableTestId('row-expansion')\" [label]=\"context.state.rowExpansion.label\" icon=\"fa-solid fa-list\" (click)=\"onRowExpansion(context)\" [disabled]=\"clonedData.showSkeleton\" variant=\"outlined\"></button>\n }\n @if (context.state.caption.clearFilters.isButtonVisible) {\n <button smzButton [attr.data-testid]=\"buildTableTestId('clear-filters')\" [label]=\"context.state.locale.clearFilters.label\" icon=\"fa-solid fa-filter-circle-xmark\" (click)=\"clear(table, context)\" [disabled]=\"clonedData.showSkeleton\" variant=\"outlined\"></button>\n }\n @if (context.state.caption.columnVisibility.showDropdownSelector) {\n <ui-multi-select #columnMultiselect [attr.data-testid]=\"buildTableTestId('column-visibility')\" class=\"ml-2 w-full flex-none md:w-2/12\" styleClass=\"w-full\" appendTo=\"body\" [options]=\"context.hideableColumns\" [(ngModel)]=\"selectedColumns\" [placeholder]=\"context.state.locale.columnVisibility.placeholder\" [selectedItemsLabel]=\"context.state.locale.columnVisibility.selectedItemsLabel\" optionLabel=\"name\" dataKey=\"field\" optionLabel=\"header\" [filter]=\"true\" (panelHide)=\"updateColumnsVisibility(true)\" [smzTooltip]=\"context.state.locale.columnVisibility.pTooltip\">\n </ui-multi-select>\n }\n @if (context.state.caption.globalFilter.isVisible) {\n <ui-icon-field class=\"w-full flex-none\" [ngClass]=\"{ 'md:w-2/12 flex-none': !context.state.caption.globalFilter.expanded }\">\n <ui-input-icon styleClass=\"fa-solid fa-magnifying-glass\"></ui-input-icon>\n <input #inputGlobal [(ngModel)]=\"globalSearchInput\" smzInputText type=\"text\" styleClass=\"database-global-search\" (input)=\"updateGlobalFilter(inputGlobal.value)\" [disabled]=\"clonedData.showSkeleton\" [placeholder]=\"context.state.locale.globalFilter.placeholder\" [attr.data-testid]=\"buildTableTestId('search')\" />\n </ui-icon-field>\n }\n </div>\n @if (toolbarTemplate != null) {\n <div class=\"flex flex-wrap items-center mt-2\" [ngClass]=\"'justify-' + context.state.caption.toolbarAlignment\">\n <ng-container *ngTemplateOutlet=\"toolbarTemplate; context: { $implicit: dt }\"></ng-container>\n </div>\n }\n </ng-template>\n }\n <ng-template smzTemplate=\"header\" let-columns>\n <tr [ngClass]=\"{ 'invisible-header': !context.state.header.isVisible }\">\n @if (context.state.caption.rowSelection.isEnabled) {\n <th [ngStyle]=\"context.state.caption.rowSelection.ngStyle\">\n @if (!context.state.actions.batchActions.isVisible && context.state.caption.rowSelection.mode !== 'single') {\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\n }\n </th>\n }\n @if (context.state.rowExpansion.isEnabled) {\n <th [ngStyle]=\"context.state.rowExpansion.ngStyle\"></th>\n }\n @for (col of columns; track col.field) {\n @if (context.state.viewport.resizableColumns) {\n @if (col.isOrderable) {\n <th [pSortableColumn]=\"col.sortField\" pResizableColumn [attr.data-testid]=\"buildColumnTestId(col.field)\" [ngStyle]=\"col.content.ngStyle\" [ngClass]=\"col.headerStyleClass\">\n <ng-container *ngTemplateOutlet=\"headerContent\"></ng-container>\n </th>\n }\n @if (!col.isOrderable) {\n <th pResizableColumn [attr.data-testid]=\"buildColumnTestId(col.field)\" [ngStyle]=\"col.content.ngStyle\" [ngClass]=\"col.headerStyleClass\">\n <ng-container *ngTemplateOutlet=\"headerContent\"></ng-container>\n </th>\n }\n } @else {\n @if (col.isOrderable) {\n <th [pSortableColumn]=\"col.sortField\" [attr.data-testid]=\"buildColumnTestId(col.field)\" [ngStyle]=\"col.content.ngStyle\" [ngClass]=\"col.headerStyleClass\">\n <ng-container *ngTemplateOutlet=\"headerContent\"></ng-container>\n </th>\n }\n @if (!col.isOrderable) {\n <th [attr.data-testid]=\"buildColumnTestId(col.field)\" [ngStyle]=\"col.content.ngStyle\" [ngClass]=\"col.headerStyleClass\">\n <ng-container *ngTemplateOutlet=\"headerContent\"></ng-container>\n </th>\n }\n }\n <ng-template #headerContent>\n <div class=\"flex justify-start items-center\">\n <span class=\"mr-1\">{{ col.header }}</span>\n @if (col.showHeaderActions) {\n <smz-table-header-actions clickStopPropagation class=\"ml-1 mt-1\" [col]=\"col\"></smz-table-header-actions>\n }\n @if (!clonedData.showSkeleton && col.isOrderable) {\n <p-sortIcon [field]=\"col.sortField\"></p-sortIcon>\n }\n @if (!clonedData.showSkeleton) {\n @switch (col.filter.type) {\n @case (filterTypes.currency) {\n <smz-column-filter type=\"numeric\" currency=\"BRL\" [field]=\"col.filterField\"></smz-column-filter>\n }\n @case (filterTypes.numeric) {\n <smz-column-filter type=\"numeric\" [field]=\"col.filterField\"></smz-column-filter>\n }\n @case (filterTypes.date) {\n <smz-column-filter type=\"date\" [field]=\"col.filterField\" [showTime]=\"col.filter.showTime\"></smz-column-filter>\n }\n @case (filterTypes.text) {\n <smz-column-filter type=\"text\" [field]=\"col.filterField\" [matchMode]=\"col.filter.matchMode === 'allWords' ? 'containsAllWords' : undefined\" [showMatchModes]=\"col.filter.matchMode !== 'allWords'\"></smz-column-filter>\n }\n @case (filterTypes.boolean) {\n <smz-column-filter type=\"boolean\" [field]=\"col.filterField\"></smz-column-filter>\n }\n @case (filterTypes.dropdown) {\n @if (col.filterField | filterObject; as filterField) {\n <smz-column-filter [field]=\"filterField + '.id'\" matchMode=\"dropdown\" [showMatchModes]=\"false\" [showOperator]=\"false\" [showAddButton]=\"false\">\n <ng-template smzTemplate=\"header\">\n <div class=\"px-3 pt-3 pb-0\">\n <span class=\"p-text-bold\">{{ col.header }}</span>\n </div>\n </ng-template>\n <ng-template smzTemplate=\"filter\" let-value let-filter=\"filter\">\n <ui-select appendTo=\"body\" [ngModel]=\"value\" [options]=\"(clonedData.items != null ? clonedData.items : []) | uniqueFilter : filterField + '.id' : filterField : null : 'name' : false\" [placeholder]=\"context.state.locale.dropdownFilter.placeholder\" (changed)=\"filter($event.value)\" optionLabel=\"name\" dataKey=\"id\"></ui-select>\n </ng-template>\n </smz-column-filter>\n }\n }\n @case (filterTypes.multiselect) {\n @if (col.filterField | filterObject; as filterField) {\n <smz-column-filter [field]=\"filterField\" matchMode=\"in\" [showMatchModes]=\"false\" [showOperator]=\"false\" [showAddButton]=\"false\">\n <ng-template smzTemplate=\"header\">\n <div class=\"px-3 pt-3 pb-0\">\n <span class=\"p-text-bold\">{{ col.header }}</span>\n </div>\n </ng-template>\n <ng-template smzTemplate=\"filter\" let-value let-filter=\"filter\">\n <ui-multi-select [ngModel]=\"value\" [options]=\"(clonedData.items != null ? clonedData.items : []) | uniqueFilter : filterField + '.id' : filterField : null : 'name' : false\" [placeholder]=\"context.state.locale.dropdownFilter.placeholder\" (changed)=\"filter($event.value)\" optionLabel=\"name\" dataKey=\"id\"></ui-multi-select>\n </ng-template>\n </smz-column-filter>\n }\n }\n @case (filterTypes.multiselect_array) {\n @if (col.filterField | filterObject; as filterField) {\n <smz-column-filter [field]=\"filterField\" matchMode=\"array-some\" [showMatchModes]=\"false\" [showOperator]=\"false\" [showAddButton]=\"false\">\n <ng-template smzTemplate=\"header\">\n <div class=\"px-3 pt-3 pb-0\">\n <span class=\"p-text-bold\">{{ col.header }}</span>\n </div>\n </ng-template>\n <ng-template smzTemplate=\"filter\" let-value let-filter=\"filter\">\n <ui-multi-select [ngModel]=\"value\" [options]=\"(clonedData.items != null ? clonedData.items : []) | uniqueFilter : filterField + '.id' : filterField : null : 'name' : true\" [placeholder]=\"context.state.locale.dropdownFilter.placeholder\" (changed)=\"filter($event.value)\" optionLabel=\"name\" dataKey=\"id\" [maxSelectedLabels]=\"2\" [selectedItemsLabel]=\"'{0}'\"></ui-multi-select>\n </ng-template>\n </smz-column-filter>\n }\n }\n @case (filterTypes.multiselect_string) {\n @if (col.filterField | filterObject; as filterField) {\n <smz-column-filter [field]=\"filterField\" matchMode=\"multiselectByString\" [showMatchModes]=\"false\" [showOperator]=\"false\" [showAddButton]=\"false\">\n <ng-template smzTemplate=\"header\">\n <div class=\"px-3 pt-3 pb-0\">\n <span class=\"p-text-bold\">{{ col.header }}</span>\n </div>\n </ng-template>\n <ng-template smzTemplate=\"filter\" let-value let-filter=\"filter\">\n <ui-multi-select [ngModel]=\"value\" [options]=\"(clonedData.items != null ? clonedData.items : []) | uniqueFilter : filterField : filterField : null : true : false : false\" [placeholder]=\"context.state.locale.dropdownFilter.placeholder\" (changed)=\"filter($event.value)\" [maxSelectedLabels]=\"2\" [selectedItemsLabel]=\"'{0}'\"></ui-multi-select>\n </ng-template>\n </smz-column-filter>\n }\n }\n }\n }\n @if (context.state.caption.columnVisibility.showColumnHideButton) {\n <button smzButton type=\"button\" icon=\"fa-solid fa-eye-slash\" (click)=\"hideColumn(col, context)\" [rounded]=\"true\" variant=\"text\" styleClass=\"p-button-plain\"></button>\n }\n </div>\n </ng-template>\n }\n @if (context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible|| context.state.editable.isEditable) {\n <th [ngStyle]=\"context.state.editable.isEditable ? context.state.editable.ngStyle : context.state.actions.customActions.ngStyle\"></th>\n }\n </tr>\n @if (context.state.actions.batchActions.isVisible) {\n <tr>\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)\"\n [ngStyle]=\"context.state.actions.customActions.ngStyle\" class=\"px-0\">\n <div class=\"flex flex-wrap items-center justify-start\">\n <p-tableHeaderCheckbox class=\"mr-4\"></p-tableHeaderCheckbox>\n @if (selectedItems?.length > 0) {\n @for (batchItem of context.state.actions.batchActions.items; track batchItem.label) {\n @if (batchItem.visible) {\n <button smzButton [label]=\"batchItem.label\" class=\"animate__animated animate__fadeIn\" [styleClass]=\"'p-button-plain ' + (batchItem.styleClass)\" [icon]=\"batchItem.icon\" (click)=\"batchItem.command(selectedItems); selectedItems = [];\" [disabled]=\"batchItem.disabled\" [smzTooltip]=\"batchItem.tooltip\" [rounded]=\"true\" variant=\"text\"></button>\n }\n }\n }\n </div>\n </th>\n </tr>\n }\n </ng-template>\n <ng-template smzTemplate=\"body\" let-item let-editing=\"editing\" let-rowIndex=\"rowIndex\" let-columns=\"columns\">\n @if (!context.state.footer?.hideBody) {\n <tr #editableRowElement\n [pEditableRow]=\"item\"\n tableItemAction\n [isClickable]=\"context.state.actions.rowBehavior.isClickable\"\n [callback]=\"context.state.actions.rowBehavior.clickCallback\"\n [expandRowOnClick]=\"context.state.actions.rowBehavior.expandRowOnClick\"\n [item]=\"item\"\n class=\"p-selectable-row\"\n [attr.data-testid]=\"buildRowTestId(item, rowIndex)\"\n [ngClass]=\"{ 'highlight-row': item?.id === state.actions.rowBehavior.highlights, 'preserve-in-small': state.actions.rowBehavior.preserveLayoutInSmallDevices }\"\n >\n @if (context.state.caption.rowSelection.isEnabled && !clonedData.showSkeleton) {\n <td\n clickStopPropagation\n class=\"{{ state.actions.rowBehavior.cellStyleClass }}\"\n [ngClass]=\"{ 'opacity-50 pointer-events-none': editableService.context[item.id]?.hasErrors || editableService.context[item.id]?.isLoading }\"\n [ngStyle]=\"context.state.caption.rowSelection.ngStyle\"\n >\n @if (context.state.caption.rowSelection.mode === 'single') {\n <p-tableRadioButton [value]=\"item\" [index]=\"rowIndex\" [disabled]=\"!isRowSelectable(item)\"></p-tableRadioButton>\n } @else {\n <p-tableCheckbox [value]=\"item\" [index]=\"rowIndex\" [disabled]=\"!isRowSelectable(item)\"></p-tableCheckbox>\n }\n </td>\n }\n @if (context.state.rowExpansion.isEnabled && !clonedData.showSkeleton) {\n <td\n clickStopPropagation\n class=\"{{ state.actions.rowBehavior.cellStyleClass }}\"\n [ngClass]=\"{ 'opacity-50 pointer-events-none': editableService.context[item.id]?.hasErrors || editableService.context[item.id]?.isLoading, 'flex flex-wrap justify-start items-center gap-2': context.state.rowExpansion.highlightNewItems && item._isNew }\"\n [ngStyle]=\"context.state.rowExpansion.ngStyle\"\n >\n <button smzButton type=\"button\" class=\"smz-table-row-expansion-toggle\" [icon]=\"item._isExpanded ? 'fa-solid fa-chevron-down' : 'fa-solid fa-chevron-right'\" (click)=\"item._isExpanded = !item._isExpanded; item._isNew = false\" variant=\"text\" [rounded]=\"true\" size=\"sm\"></button>\n @if (context.state.rowExpansion.highlightNewItems && item._isNew) {\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>\n }\n </td>\n }\n @for (col of columns; track col.field) {\n @if (clonedData.showSkeleton) {\n <td class=\"{{ state.actions.rowBehavior.cellStyleClass }}\" [ngStyle]=\"col.content.ngStyle\"><ui-skeleton width=\"100%\" height=\"1rem\"></ui-skeleton></td>\n } @else {\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\">\n <span class=\"p-column-title\">{{ col.header }}</span>\n <p-cellEditor>\n <!-- CELULAR COM EDITOR -->\n <ng-template smzTemplate=\"input\">\n @switch (col.editable.type) {\n @case (editableTypes.none) {\n <smz-table-content class=\"cursor-default\" [ngClass]=\"col.content.contentStyleClass\" [col]=\"col\" [contentTypes]=\"contentTypes\" [item]=\"item\" [rowIndex]=\"rowIndex\" [contentTemplate]=\"contentTemplate\"></smz-table-content>\n }\n @case (editableTypes.custom) {\n <ng-container *ngTemplateOutlet=\"editableTemplate; context: { $implicit: item, col: col }\"></ng-container>\n }\n <!-- INPUT TEXT -->\n @case (editableTypes.text) {\n @if (editableService.context[item.id]?.form; as form) {\n @if (form.controls[col.editable.property]; as control) {\n <div class=\"relative w-full\">\n <input smzInputText type=\"text\" [formControl]=\"$any(control)\" style=\"width: 100%;\">\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\n </div>\n }\n }\n }\n <!-- INPUT NUMBER -->\n @case (editableTypes.number) {\n @if (editableService.context[item.id]?.form; as form) {\n @if (form.controls[col.editable.property]; as control) {\n <div class=\"relative w-full\">\n <ui-input-number *ngVar=\"col.editable.data as numberData\" [formControl]=\"$any(control)\" [mode]=\"numberData.mode\" [minFractionDigits]=\"numberData.minFractionDigits\" [maxFractionDigits]=\"numberData.maxFractionDigits\" [currency]=\"numberData.currency\" [useGrouping]=\"numberData.useGrouping\" [allowEmpty]=\"numberData.allowEmpty\" [showClear]=\"numberData.showClear\" [showButtons]=\"numberData.showButtons\" [prefix]=\"numberData.prefix\" [suffix]=\"numberData.suffix\">\n </ui-input-number>\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\n </div>\n }\n }\n }\n <!-- INPUT SWITCH -->\n @case (editableTypes.switch) {\n @if (editableService.context[item.id]?.form; as form) {\n @if (form.controls[col.editable.property]; as control) {\n <div class=\"relative w-full\">\n <ui-toggle-switch [formControl]=\"$any(control)\"></ui-toggle-switch>\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\n </div>\n }\n }\n }\n <!-- INPUT TEXT AREA -->\n @case (editableTypes.area) {\n @if (editableService.context[item.id]?.form; as form) {\n @if (form.controls[col.editable.property]; as control) {\n <div class=\"relative w-full\">\n <textarea smzTextarea type=\"text\" [formControl]=\"$any(control)\" [rows]=\"$any(col.editable.data).rows\" required style=\"width: 100%;\"></textarea>\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\n </div>\n }\n }\n }\n <!-- INPUT DROPDOWN -->\n @case (editableTypes.dropdown) {\n @if (editableService.context[item.id]?.form; as form) {\n @if (form.controls[col.editable.property]; as control) {\n <div class=\"relative w-full\">\n <ui-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\"></ui-select>\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\n </div>\n }\n }\n }\n <!-- INPUT CALENDAR -->\n @case (editableTypes.calendar) {\n @if (editableService.context[item.id]?.form; as form) {\n @if (form.controls[col.editable.property]; as control) {\n <div class=\"relative w-full\">\n <ui-date-picker [formControl]=\"$any(control)\" appendTo=\"body\" styleClass=\"w-full\" [ngClass]=\"{ 'pl-5': !control.valid }\"></ui-date-picker>\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\n </div>\n }\n }\n }\n }\n </ng-template>\n <!-- CELULAR COM CONTE\u00DADO -->\n <ng-template smzTemplate=\"output\">\n <smz-table-content\n [col]=\"col\"\n [smzTooltip]=\"col.content.tooltip != null ? col.content.tooltip(item) : null\"\n tooltipPosition=\"left\"\n [ngClass]=\"col.content.contentStyleClass\" [contentTypes]=\"contentTypes\" [item]=\"item\" [rowIndex]=\"rowIndex\" [contentTemplate]=\"contentTemplate\">\n </smz-table-content>\n </ng-template>\n </p-cellEditor>\n </td>\n }\n }\n @if (context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible || context.state.editable.isEditable) {\n <td [ngStyle]=\"context.state.actions.customActions.ngStyle\" class=\"px-0\">\n <div class=\"flex flex-wrap items-center justify-center\">\n @if (clonedData.showSkeleton) {\n <div class=\"w-full\">\n <ui-skeleton width=\"100%\" height=\"1rem\"></ui-skeleton>\n </div>\n } @else {\n <!-- SEM EDITAR -->\n @if (!editing) {\n @if (context.state.editable.update.isButtonVisible) {\n <button smzButton type=\"button\" icon=\"fa-solid fa-pencil\" (click)=\"editableService.onRowEditInit(item)\" class=\"mx-1\" [disabled]=\"editableService.isEditing || editableService.isCreating || context.state.editable.update.isButtonDisabled || (!context.state.editable.update.condition(item))\" pInitEditableRow [rounded]=\"true\" variant=\"text\"></button>\n }\n @if (context.state.editable.remove.isButtonVisible) {\n <button smzButton type=\"button\" icon=\"fa-solid fa-trash\" (click)=\"editableService.onRowRemove($event, table, item)\" class=\"mx-1\" [disabled]=\"editableService.isEditing || editableService.isCreating || context.state.editable.remove.isButtonDisabled || (!context.state.editable.remove.condition(item))\" [rounded]=\"true\" variant=\"text\" severity=\"secondary\"></button>\n }\n }\n <!-- EDITANDO -->\n @if (editing) {\n @if (editableService.context[item.id]; as editableContext) {\n <!-- COM LOADING -->\n @if (editableContext.isLoading) {\n <button smzButton type=\"button\" icon=\"fa-solid fa-rotate fa-spin\" [disabled]=\"true\" class=\"mr-2\" [rounded]=\"true\" variant=\"text\" styleClass=\"p-button-info\"></button>\n }\n <!-- SEM LOADING -->\n @if (!editableContext.isLoading) {\n <!-- EDITANDO -->\n @if (!editableContext.hasErrors) {\n <!-- CRIANDO -->\n @if (item._context?.isCreating) {\n <button smzButton type=\"button\" icon=\"fa-solid fa-check\" (click)=\"editableService.onRowCreateSave($event, table, editableRowElement, item)\" [disabled]=\"!editableContext.hasChanged || !editableService.context[item.id]?.form.valid\" class=\"mr-2\" [rounded]=\"true\" variant=\"text\" severity=\"success\"></button>\n <button smzButton type=\"button\" icon=\"fa-solid fa-xmark\" (click)=\"editableService.onRowCreateCancel($event, table, item)\" [rounded]=\"true\" variant=\"text\" severity=\"danger\"></button>\n }\n <!-- ATUALIZANDO -->\n @if (item._context?.isUpdating) {\n <button smzButton type=\"button\" icon=\"fa-solid fa-check\" (click)=\"editableService.onRowEditSave($event, table, editableRowElement, item)\" [disabled]=\"!editableContext.hasChanged || !editableService.context[item.id]?.form.valid\" class=\"mr-2\" [rounded]=\"true\" variant=\"text\" severity=\"success\"></button>\n <button smzButton type=\"button\" icon=\"fa-solid fa-xmark\" (click)=\"editableService.onRowEditCancel($event, table, item)\" [rounded]=\"true\" variant=\"text\" severity=\"danger\"></button>\n }\n }\n <!-- COM ERRORS -->\n @if (editableContext.hasErrors) {\n <ui-popover #errorsOverlay appendTo=\"body\" [style]=\"{ width: '450px' }\">\n <div [innerHtml]=\"editableContext.errors | contentErrors\"></div>\n </ui-popover>\n <button smzButton type=\"button\" icon=\"fas fa-exclamation-triangle\" [disabled]=\"false\" class=\"mr-2\" (click)=\"errorsOverlay.toggle($event)\" size=\"sm\" [rounded]=\"true\" variant=\"text\" severity=\"danger\"></button>\n <!-- CRIANDO -->\n @if (item._context?.isCreating) {\n <button smzButton type=\"button\" icon=\"fa-solid fa-xmark\" (click)=\"editableService.onRowCreateCancel($event, table, item)\" size=\"sm\" [rounded]=\"true\" variant=\"text\" severity=\"danger\"></button>\n }\n <!-- ATUALIZANDO -->\n @if (item._context?.isUpdating) {\n <button smzButton type=\"button\" icon=\"fa-solid fa-xmark\" (click)=\"editableService.onRowEditCancel($event, table, item)\" size=\"sm\" [rounded]=\"true\" variant=\"text\" severity=\"danger\"></button>\n }\n }\n }\n }\n }\n <!-- CUSTOM MENU -->\n @if (context.state.actions.customActions.isVisible && !editing) {\n <ng-container *ngTemplateOutlet=\"actionsTemplate; context: { $implicit: item }\"></ng-container>\n }\n <!-- MENU -->\n @if (context.state.actions.menu.isVisible && !editing) {\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>\n }\n }\n </div>\n </td>\n }\n </tr>\n @if (item?._isExpanded) {\n <tr>\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)\">\n <ng-container *ngTemplateOutlet=\"rowContentTemplate; context: { $implicit: item }\"></ng-container>\n </td>\n </tr>\n }\n }\n </ng-template>\n @if (!context.state.footer?.hideBody) {\n <ng-template smzTemplate=\"emptymessage\" let-columns>\n <tr>\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' }\">\n <div [innerHtml]=\"context.state.emptyFeedback.message\"></div>\n @if (context.state.caption.clearFilters.isButtonVisible && hasFilters()) {\n <button smzButton [label]=\"context.state.locale.clearFilters.label\" class=\"mt-3\" icon=\"fa-solid fa-filter-circle-xmark\" (click)=\"clear(table, context)\" variant=\"outlined\"></button>\n }\n </td>\n </tr>\n </ng-template>\n }\n @if (hasFooter(context.visibleColumns)) {\n <ng-template smzTemplate=\"footer\" let-columns>\n <tr [attr.data-testid]=\"buildTableTestId('footer')\">\n @if (context.state.caption.rowSelection.isEnabled) {\n <td></td>\n }\n @if (context.state.rowExpansion.isEnabled) {\n <td></td>\n }\n @for (col of columns; track col.field) {\n <td [attr.data-testid]=\"buildTableTestId('footer-' + col.field)\" [ngStyle]=\"col.content.ngStyle\">\n <div class=\"font-bold\" [ngClass]=\"col.footer?.styleClass\">{{ col.footer?.isEnabled ? (col | tableFooter : (dt.filteredValue ?? clonedData.items)) : col.footer?.label }}</div>\n </td>\n }\n @if (context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible || context.state.editable.isEditable) {\n <td></td>\n }\n </tr>\n </ng-template>\n }\n </p-table>\n }\n </ng-container>\n </ng-container>\n }\n} @else {\n @if (emptyStateTemplate != null) {\n <ng-container *ngTemplateOutlet=\"emptyStateTemplate; context: { $implicit: {} }\"></ng-container>\n }\n}\n\n" }]
|
|
22832
22965
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: TableEditableService }, { type: TableFormsService }, { type: TableHelperService }, { type: i1$3.Store }, { type: SmzExcelService }], propDecorators: { templates: [{
|
|
22833
22966
|
type: ContentChildren,
|
|
22834
22967
|
args: [SmzTemplateDirective]
|
|
@@ -36516,6 +36649,18 @@ class PrimeConfigService {
|
|
|
36516
36649
|
}
|
|
36517
36650
|
return value == null ? false : !moment(value)?.isSame(filter);
|
|
36518
36651
|
});
|
|
36652
|
+
// todas as palavras (separadas por espaco) precisam existir no valor, em qualquer ordem; sem acento e sem diferenciar maiusculas
|
|
36653
|
+
this.filterUtils.register('containsAllWords', (value, filter, locale) => {
|
|
36654
|
+
if (filter == null || String(filter).trim() === '') {
|
|
36655
|
+
return true;
|
|
36656
|
+
}
|
|
36657
|
+
if (value == null) {
|
|
36658
|
+
return false;
|
|
36659
|
+
}
|
|
36660
|
+
const normalize = (text) => SmzObjectUtils.removeAccents(text).toLocaleLowerCase(locale);
|
|
36661
|
+
const subject = normalize(String(value));
|
|
36662
|
+
return normalize(String(filter)).split(/\s+/).filter(word => word !== '').every(word => subject.includes(word));
|
|
36663
|
+
});
|
|
36519
36664
|
this.filterUtils.register('multiselectById', (value, filter) => filter?.findIndex(x => x.id === value) > -1);
|
|
36520
36665
|
this.filterUtils.register('multiselectByValue', (value, filter) => filter?.findIndex(x => x.value === value) > -1);
|
|
36521
36666
|
this.filterUtils.register('multiselectByString', (value, filter) => (filter == null || filter?.length === 0 ? true : filter?.findIndex(x => x === value) > -1));
|
|
@@ -47319,6 +47464,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImpor
|
|
|
47319
47464
|
}]
|
|
47320
47465
|
}] });
|
|
47321
47466
|
|
|
47467
|
+
function hasCardsGlobalFilterPaths(filterBy) {
|
|
47468
|
+
return filterBy != null && filterBy.trim() !== '';
|
|
47469
|
+
}
|
|
47470
|
+
|
|
47322
47471
|
var SmzCardsView;
|
|
47323
47472
|
(function (SmzCardsView) {
|
|
47324
47473
|
SmzCardsView[SmzCardsView["LIST"] = 0] = "LIST";
|
|
@@ -47856,12 +48005,18 @@ class SmzCardsComponent {
|
|
|
47856
48005
|
this.state.items$ = event.value.items$;
|
|
47857
48006
|
this.cdr.markForCheck();
|
|
47858
48007
|
}
|
|
48008
|
+
filterGlobally(value) {
|
|
48009
|
+
if (!hasCardsGlobalFilterPaths(this.state?.view?.filterBy)) {
|
|
48010
|
+
return;
|
|
48011
|
+
}
|
|
48012
|
+
this.dataView.filter(value);
|
|
48013
|
+
}
|
|
47859
48014
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: SmzCardsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
47860
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: SmzCardsComponent, isStandalone: false, selector: "smz-ui-cards", inputs: { state: "state" }, queries: [{ propertyName: "templates", predicate: SmzTemplateDirective }], viewQueries: [{ propertyName: "dataView", first: true, predicate: SmzDataViewComponent, descendants: true }], ngImport: i0, template: "@if (state != null) {\n <ng-container *ngVar=\"state.items$ | async as items\">\n <ng-container *ngVar=\"items | resetContext : state.template._context\">\n <ui-data-view #dataView [styleClass]=\"state.view.dataViewStyleClass\" [gridStyleClass]=\"state.view.gridStyleClass\" [value]=\"items ?? []\" [paginator]=\"state.view.paginator\" [rows]=\"state.view.rowsPerPage\" [filterBy]=\"state.view.filterBy\" [layout]=\"state.view.layout\">\n @if (state.view.showHeader) {\n <ng-template #header>\n <div class=\"flex flex-wrap lg:flex-row xl:flex-row md:flex-col sm:flex-col items-center justify-between gap-2\">\n <div class=\"flex flex-wrap items-center justify-start gap-2\">\n @if (state.title.isVisible) {\n <div class=\"text-lg\" [innerHtml]=\"state.title.getText() | safeHtml\"></div>\n }\n </div>\n <div class=\"flex flex-wrap items-center justify-end gap-3\">\n @if (headerTemplate != null) {\n <ng-container *ngTemplateOutlet=\"headerTemplate; context: { $implicit: state }\"></ng-container>\n }\n <ui-icon-field class=\"p-input-icon-left mb-2 md:mb-0\">\n
|
|
48015
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: SmzCardsComponent, isStandalone: false, selector: "smz-ui-cards", inputs: { state: "state" }, queries: [{ propertyName: "templates", predicate: SmzTemplateDirective }], viewQueries: [{ propertyName: "dataView", first: true, predicate: SmzDataViewComponent, descendants: true }], ngImport: i0, template: "@if (state != null) {\n <ng-container *ngVar=\"state.items$ | async as items\">\n <ng-container *ngVar=\"items | resetContext : state.template._context\">\n <ui-data-view #dataView [styleClass]=\"state.view.dataViewStyleClass\" [gridStyleClass]=\"state.view.gridStyleClass\" [value]=\"items ?? []\" [paginator]=\"state.view.paginator\" [rows]=\"state.view.rowsPerPage\" [filterBy]=\"state.view.filterBy\" [layout]=\"state.view.layout\">\n @if (state.view.showHeader) {\n <ng-template #header>\n <div class=\"flex flex-wrap lg:flex-row xl:flex-row md:flex-col sm:flex-col items-center justify-between gap-2\">\n <div class=\"flex flex-wrap items-center justify-start gap-2\">\n @if (state.title.isVisible) {\n <div class=\"text-lg\" [innerHtml]=\"state.title.getText() | safeHtml\"></div>\n }\n </div>\n <div class=\"flex flex-wrap items-center justify-end gap-3\">\n @if (headerTemplate != null) {\n <ng-container *ngTemplateOutlet=\"headerTemplate; context: { $implicit: state }\"></ng-container>\n }\n @if (state.view.showGlobalFilter) {\n <ui-icon-field class=\"p-input-icon-left mb-2 md:mb-0\">\n <ui-input-icon styleClass=\"fa-solid fa-magnifying-glass\"></ui-input-icon>\n <input type=\"search\" smzInputText [placeholder]=\"state.locale.globalSearch.placeholder\" (input)=\"filterGlobally($any($event.target).value)\">\n </ui-icon-field>\n }\n @if (state.sources.length > 0) {\n <ui-select appendTo=\"body\" [options]=\"state.sources\" dataKey=\"key\" [(ngModel)]=\"state.selectedSource\" optionLabel=\"label\" (changed)=\"updateMainSource($event)\"></ui-select>\n }\n <!-- FIXME: Implementar -->\n <!-- <p-dataViewLayoutOptions *ngIf=\"state.view.showLayoutOptions\"></p-dataViewLayoutOptions> -->\n </div>\n </div>\n </ng-template>\n }\n <ng-template let-items #list>\n @if (state.template != null) {\n <div class=\"flex flex-wrap\" [ngClass]=\"state.view.gridStyleClass\">\n @for (item of items; track item) {\n <smz-list-item [isDebug]=\"state.isDebug\" [template]=\"state.template\" [data]=\"item\" [menu]=\"state.menu\" [buttons]=\"state.buttons\" [ngClass]=\"state.list.styleClass.all\"></smz-list-item>\n }\n </div>\n }\n </ng-template>\n <ng-template let-items #grid>\n @if (state.template != null) {\n <div class=\"flex flex-wrap\" [ngClass]=\"state.view.gridStyleClass\">\n @for (item of items; track item) {\n @if (state.template != null) {\n <smz-grid-item [isDebug]=\"state.isDebug\" [template]=\"state.template\" [data]=\"item\" [menu]=\"state.menu\" [buttons]=\"state.buttons\" [ngClass]=\"state.grid.styleClass.all\"></smz-grid-item>\n }\n }\n </div>\n }\n </ng-template>\n <ng-template #empty>\n @if (state.view.emptyMessageType === 'html') {\n <div [innerHTML]=\"state.locale.emptyMessage | safeHtml\" class=\"w-full h-full\"></div>\n }\n @if (state.view.emptyMessageType === 'component') {\n <ng-template [smzInjectDataPathComponent]=\"state.view.emptyMessageComponent\" [data]=\"items\" [state]=\"state\"></ng-template>\n }\n </ng-template>\n </ui-data-view>\n </ng-container>\n </ng-container>\n}", styles: [""], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.SmzDataViewComponent, selector: "ui-data-view", inputs: ["value", "layout", "paginator", "rows", "first", "filterBy", "styleClass", "gridStyleClass"], outputs: ["firstChange"] }, { kind: "directive", type: i2.SmzInputTextDirective, selector: "input[smzInputText]", inputs: ["size", "invalid"] }, { kind: "component", type: i2.SmzSelectComponent, selector: "ui-select", inputs: ["options", "optionLabel", "optionValue", "optionDisabled", "dataKey", "placeholder", "filter", "filterBy", "filterMatchMode", "filterPlaceholder", "showClear", "emptyMessage", "emptyFilterMessage", "styleClass", "inputId", "ariaLabel", "appendTo"], outputs: ["changed", "showed", "hidden"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgVar, selector: "[ngVar]", inputs: ["ngVar"] }, { kind: "component", type: i2.SmzIconFieldComponent, selector: "ui-icon-field" }, { kind: "component", type: i2.SmzInputIconComponent, selector: "ui-input-icon", inputs: ["styleClass"] }, { kind: "component", type: SmzListItemComponent, selector: "smz-list-item", inputs: ["isDebug", "template", "buttons", "menu", "data"] }, { kind: "component", type: SmzGridItemComponent, selector: "smz-grid-item", inputs: ["isDebug", "template", "buttons", "menu", "data"] }, { kind: "directive", type: SmzInjectDataPathComponent, selector: "[smzInjectDataPathComponent]", inputs: ["smzInjectDataPathComponent", "data", "state"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: SafeHtmlPipe$2, name: "safeHtml" }, { kind: "pipe", type: SmzCardsResetContextPipe, name: "resetContext" }], changeDetection: i0.ChangeDetectionStrategy.Eager, encapsulation: i0.ViewEncapsulation.None });
|
|
47861
48016
|
}
|
|
47862
48017
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: SmzCardsComponent, decorators: [{
|
|
47863
48018
|
type: Component,
|
|
47864
|
-
args: [{ selector: 'smz-ui-cards', changeDetection: ChangeDetectionStrategy.Default, encapsulation: ViewEncapsulation.None, standalone: false, template: "@if (state != null) {\n <ng-container *ngVar=\"state.items$ | async as items\">\n <ng-container *ngVar=\"items | resetContext : state.template._context\">\n <ui-data-view #dataView [styleClass]=\"state.view.dataViewStyleClass\" [gridStyleClass]=\"state.view.gridStyleClass\" [value]=\"items ?? []\" [paginator]=\"state.view.paginator\" [rows]=\"state.view.rowsPerPage\" [filterBy]=\"state.view.filterBy\" [layout]=\"state.view.layout\">\n @if (state.view.showHeader) {\n <ng-template #header>\n <div class=\"flex flex-wrap lg:flex-row xl:flex-row md:flex-col sm:flex-col items-center justify-between gap-2\">\n <div class=\"flex flex-wrap items-center justify-start gap-2\">\n @if (state.title.isVisible) {\n <div class=\"text-lg\" [innerHtml]=\"state.title.getText() | safeHtml\"></div>\n }\n </div>\n <div class=\"flex flex-wrap items-center justify-end gap-3\">\n @if (headerTemplate != null) {\n <ng-container *ngTemplateOutlet=\"headerTemplate; context: { $implicit: state }\"></ng-container>\n }\n <ui-icon-field class=\"p-input-icon-left mb-2 md:mb-0\">\n
|
|
48019
|
+
args: [{ selector: 'smz-ui-cards', changeDetection: ChangeDetectionStrategy.Default, encapsulation: ViewEncapsulation.None, standalone: false, template: "@if (state != null) {\n <ng-container *ngVar=\"state.items$ | async as items\">\n <ng-container *ngVar=\"items | resetContext : state.template._context\">\n <ui-data-view #dataView [styleClass]=\"state.view.dataViewStyleClass\" [gridStyleClass]=\"state.view.gridStyleClass\" [value]=\"items ?? []\" [paginator]=\"state.view.paginator\" [rows]=\"state.view.rowsPerPage\" [filterBy]=\"state.view.filterBy\" [layout]=\"state.view.layout\">\n @if (state.view.showHeader) {\n <ng-template #header>\n <div class=\"flex flex-wrap lg:flex-row xl:flex-row md:flex-col sm:flex-col items-center justify-between gap-2\">\n <div class=\"flex flex-wrap items-center justify-start gap-2\">\n @if (state.title.isVisible) {\n <div class=\"text-lg\" [innerHtml]=\"state.title.getText() | safeHtml\"></div>\n }\n </div>\n <div class=\"flex flex-wrap items-center justify-end gap-3\">\n @if (headerTemplate != null) {\n <ng-container *ngTemplateOutlet=\"headerTemplate; context: { $implicit: state }\"></ng-container>\n }\n @if (state.view.showGlobalFilter) {\n <ui-icon-field class=\"p-input-icon-left mb-2 md:mb-0\">\n <ui-input-icon styleClass=\"fa-solid fa-magnifying-glass\"></ui-input-icon>\n <input type=\"search\" smzInputText [placeholder]=\"state.locale.globalSearch.placeholder\" (input)=\"filterGlobally($any($event.target).value)\">\n </ui-icon-field>\n }\n @if (state.sources.length > 0) {\n <ui-select appendTo=\"body\" [options]=\"state.sources\" dataKey=\"key\" [(ngModel)]=\"state.selectedSource\" optionLabel=\"label\" (changed)=\"updateMainSource($event)\"></ui-select>\n }\n <!-- FIXME: Implementar -->\n <!-- <p-dataViewLayoutOptions *ngIf=\"state.view.showLayoutOptions\"></p-dataViewLayoutOptions> -->\n </div>\n </div>\n </ng-template>\n }\n <ng-template let-items #list>\n @if (state.template != null) {\n <div class=\"flex flex-wrap\" [ngClass]=\"state.view.gridStyleClass\">\n @for (item of items; track item) {\n <smz-list-item [isDebug]=\"state.isDebug\" [template]=\"state.template\" [data]=\"item\" [menu]=\"state.menu\" [buttons]=\"state.buttons\" [ngClass]=\"state.list.styleClass.all\"></smz-list-item>\n }\n </div>\n }\n </ng-template>\n <ng-template let-items #grid>\n @if (state.template != null) {\n <div class=\"flex flex-wrap\" [ngClass]=\"state.view.gridStyleClass\">\n @for (item of items; track item) {\n @if (state.template != null) {\n <smz-grid-item [isDebug]=\"state.isDebug\" [template]=\"state.template\" [data]=\"item\" [menu]=\"state.menu\" [buttons]=\"state.buttons\" [ngClass]=\"state.grid.styleClass.all\"></smz-grid-item>\n }\n }\n </div>\n }\n </ng-template>\n <ng-template #empty>\n @if (state.view.emptyMessageType === 'html') {\n <div [innerHTML]=\"state.locale.emptyMessage | safeHtml\" class=\"w-full h-full\"></div>\n }\n @if (state.view.emptyMessageType === 'component') {\n <ng-template [smzInjectDataPathComponent]=\"state.view.emptyMessageComponent\" [data]=\"items\" [state]=\"state\"></ng-template>\n }\n </ng-template>\n </ui-data-view>\n </ng-container>\n </ng-container>\n}" }]
|
|
47865
48020
|
}], propDecorators: { dataView: [{
|
|
47866
48021
|
type: ViewChild,
|
|
47867
48022
|
args: [SmzDataViewComponent]
|
|
@@ -55612,6 +55767,7 @@ class SmzCardsSourceBuilder {
|
|
|
55612
55767
|
}
|
|
55613
55768
|
|
|
55614
55769
|
class SmzCardsBuilder {
|
|
55770
|
+
isGlobalFilterHidden = false;
|
|
55615
55771
|
cardsState = {
|
|
55616
55772
|
items$: null,
|
|
55617
55773
|
sources: [],
|
|
@@ -55779,6 +55935,23 @@ class SmzCardsBuilder {
|
|
|
55779
55935
|
this.cardsState.view.showLayoutOptions = false;
|
|
55780
55936
|
return this;
|
|
55781
55937
|
}
|
|
55938
|
+
setGlobalFilterProperties(...properties) {
|
|
55939
|
+
for (const property of properties) {
|
|
55940
|
+
const path = property?.trim();
|
|
55941
|
+
if (path == null || path === '') {
|
|
55942
|
+
continue;
|
|
55943
|
+
}
|
|
55944
|
+
if (!this.cardsState.template.globalFilterProperties.includes(path)) {
|
|
55945
|
+
this.cardsState.template.globalFilterProperties.push(path);
|
|
55946
|
+
}
|
|
55947
|
+
}
|
|
55948
|
+
return this;
|
|
55949
|
+
}
|
|
55950
|
+
hideGlobalFilter() {
|
|
55951
|
+
this.isGlobalFilterHidden = true;
|
|
55952
|
+
this.cardsState.view.showGlobalFilter = false;
|
|
55953
|
+
return this;
|
|
55954
|
+
}
|
|
55782
55955
|
setEmptyMessage(message) {
|
|
55783
55956
|
this.cardsState.locale.emptyMessage = message;
|
|
55784
55957
|
this.cardsState.view.emptyMessageType = 'html';
|
|
@@ -55813,10 +55986,13 @@ class SmzCardsBuilder {
|
|
|
55813
55986
|
if (this.cardsState.template.type === null || this.cardsState.template.type === undefined) {
|
|
55814
55987
|
throw Error('[Smz Cards] You need to set a template.');
|
|
55815
55988
|
}
|
|
55816
|
-
|
|
55817
|
-
|
|
55818
|
-
|
|
55819
|
-
|
|
55989
|
+
const uniqueProperties = this.cardsState.template.globalFilterProperties
|
|
55990
|
+
.map(property => property?.trim())
|
|
55991
|
+
.filter((property) => property != null && property !== '')
|
|
55992
|
+
.filter((property, index, all) => all.indexOf(property) === index);
|
|
55993
|
+
this.cardsState.template.globalFilterProperties.splice(0, this.cardsState.template.globalFilterProperties.length, ...uniqueProperties);
|
|
55994
|
+
this.cardsState.view.filterBy = uniqueProperties.join(',');
|
|
55995
|
+
this.cardsState.view.showGlobalFilter = !this.isGlobalFilterHidden;
|
|
55820
55996
|
if (this.cardsState.sources.length > 0) {
|
|
55821
55997
|
const defaultSource = this.cardsState.sources.some(x => x.isDefault) ? this.cardsState.sources.find(x => x.isDefault) : this.cardsState.sources[0];
|
|
55822
55998
|
this.cardsState.selectedSource = defaultSource;
|
|
@@ -57439,5 +57615,5 @@ __decorate([
|
|
|
57439
57615
|
* Generated bundle index. Do not edit.
|
|
57440
57616
|
*/
|
|
57441
57617
|
|
|
57442
|
-
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, CancelEditableRow, CellEditor, ChartType, CheckBoxComponent, CheckBoxGroupComponent, ClaimAccessType, ClaimAccessTypeDescription, ClaimAccessTypeValues, ClaimsActions, ClaimsModule, ClaimsSelectors, ClaimsState, ClickStopPropagationDirective, ClickStopPropagationModule, ClonePipe, ColorPallete, ColorPickerComponent, ColumnFilter, ColumnFilterFormElement, Confirmable, ContextMenuRow, 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, EditableColumn, EditableRow, ExcelsUiActions, FEATURE_STATES, FeaturesActions, FeaturesSelectors, FeaturesState, FileUploadComponent, FilterContains, FirstOrDefaultPipe, FormGroupComponent, FormSubmitComponent, FrozenColumn, GenericInjectComponentDirective, GetElementById, GetElementsByParentId, GlobalActions, GlobalFilter, GlobalInjector, GlobalLoaderComponent, GlobalLoaderModule, GlobalState, GroupingType, HephaestusLayout, HephaestusLayoutComponent, HephaestusLayoutModule, HephaestusProviderModule, HostElement, HttpErrorHandler, IGNORE_ERROR_HANDLING, InViewportMetadata, InitEditableRow, 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, ReorderableColumn, ReorderableRow, ReorderableRowHandle, RepositoryForm, ResizableColumn, RoleMode, RoleModeDescription, RoleModeValues, RoleSource, RoleSourceDescription, RoleSourceValues, RolesActions, RolesModule, RolesSelectors, RolesState, RouterParamsActions, RouterParamsSelectors, RowGroupHeader, RowToggler, SMZ_CORE_LOGGING_CONFIG, SMZ_UI_ENVIRONMENT_CONFIG, SafeHtmlPipe$2 as SafeHtmlPipe, SafeImageDirective, SafeUrlPipe$1 as SafeUrlPipe, SaveEditableRow, SelectableRow, SelectableRowDblClick, 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, SmzTableSelectionHandle, SmzTablesConfig, SmzTagMessage, SmzTailPipe, SmzTemplatesPipeModule, SmzTenantSwitchComponent, SmzTextColumnBuilder, SmzTextEditableBuilder, SmzTextPattern, SmzTimelineBuilder, SmzTimelineComponent, SmzToastComponent, SmzTooltipTouchSupportModule, SmzTreeBuilder, SmzTreeComponent, SmzTreeDragAndDropBuilder, SmzTreeDropBuilder, SmzTreeDynamicMenuBuilder, SmzTreeDynamicMenuItemBuilder, SmzTreeEmptyFeedbackBuilder, SmzTreeMenuBuilder, SmzTreeMenuItemBuilder, SmzTreeToolbarBuilder, SmzTreeToolbarButtonBuilder, SmzTreeToolbarButtonCollectionBuilder, SmzTreeWithDetailsBuilder, SmzTreeWithDetailsComponent, SmzUiBlockComponent, SmzUiBlockDirective, SmzUiBlockService, SmzUiBuilder, SmzUiEnvironment, SmzUiGuidesBuilder, SmzUiGuidesService, SmzViewportDirective, SmzViewportService, SortIcon, SortableColumn, StandaloneInjectComponentDirective, StateBuilderPipe, TENANTS_PAGE_ROUTE, TENANTS_PATH, TENANTS_STATE_NAME, Table, TableBody, TableCheckbox, TableClearExtensionDirective, TableHeaderCheckbox, TableHelperService, TableModule, TableOverlayService, TableRadioButton, TableService, TenantAuthenticationSelectors, TenantsActions, TenantsModule, TenantsSelectors, TenantsState, ThemeManagerService, TitleService, ToastActions, 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, aggregateNumbers, 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, computeFooterValue, consumeAttemptedRoute, convertFormCreationFeature, convertFormFeature, convertFormFeatureFromInputData, convertFormUpdateFeature, count, createObjectFromString, createRound, createSubjectOnTheInstance, dataURLtoFile, databaseSmzAccessStates, debounce, deepClone, deepEqual, deepIndexOf, deepMerge, defaultFormsModuleConfig, defaultState, downloadBase64File, downloadFromServerUrl, downloadFromUrl, empty, every, executeSmzMenuItem, executeTextPattern, featureSmzAccessStates, fixDate$1 as fixDate, fixDateProperties, fixDates, flatten, flattenObject, formatFooterValue, getAuthenticationInitialState, getCleanApplicationState, getFirst, getFirstElement, getFirstElements, getFormInputFromDialog, getGlobalInitialState, getInitialApplicationState, getInitialDatabaseStoreState, getInitialState$8 as getInitialState, getLastElements, getPreset, getProperty, getSymbol, getTreeNodeFromKey, getUiDefinitionsInitialState, getUiLocalizationInitialState, getUsersInitialState, getValidatorsForInput, handleBase64, hasFooter, isArray, isConvertibleToNumber, isDeepObject, isEmpty$1 as isEmpty, isFunction$1 as isFunction, isInsideCdkOverlay, 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 };
|
|
57618
|
+
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, CancelEditableRow, CellEditor, ChartType, CheckBoxComponent, CheckBoxGroupComponent, ClaimAccessType, ClaimAccessTypeDescription, ClaimAccessTypeValues, ClaimsActions, ClaimsModule, ClaimsSelectors, ClaimsState, ClickStopPropagationDirective, ClickStopPropagationModule, ClonePipe, ColorPallete, ColorPickerComponent, ColumnFilter, ColumnFilterFormElement, Confirmable, ContextMenuRow, 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, EditableColumn, EditableRow, ExcelsUiActions, FEATURE_STATES, FeaturesActions, FeaturesSelectors, FeaturesState, FileUploadComponent, FilterContains, FirstOrDefaultPipe, FormGroupComponent, FormSubmitComponent, FrozenColumn, GenericInjectComponentDirective, GetElementById, GetElementsByParentId, GlobalActions, GlobalFilter, GlobalInjector, GlobalLoaderComponent, GlobalLoaderModule, GlobalState, GroupingType, HephaestusLayout, HephaestusLayoutComponent, HephaestusLayoutModule, HephaestusProviderModule, HostElement, HttpErrorHandler, IGNORE_ERROR_HANDLING, InViewportMetadata, InitEditableRow, 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, ReorderableColumn, ReorderableRow, ReorderableRowHandle, RepositoryForm, ResizableColumn, RoleMode, RoleModeDescription, RoleModeValues, RoleSource, RoleSourceDescription, RoleSourceValues, RolesActions, RolesModule, RolesSelectors, RolesState, RouterParamsActions, RouterParamsSelectors, RowGroupHeader, RowToggler, SMZ_CORE_LOGGING_CONFIG, SMZ_UI_ENVIRONMENT_CONFIG, SafeHtmlPipe$2 as SafeHtmlPipe, SafeImageDirective, SafeUrlPipe$1 as SafeUrlPipe, SaveEditableRow, SelectableRow, SelectableRowDblClick, 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, SmzTableSelectionHandle, SmzTablesConfig, SmzTagMessage, SmzTailPipe, SmzTemplatesPipeModule, SmzTenantSwitchComponent, SmzTextColumnBuilder, SmzTextEditableBuilder, SmzTextPattern, SmzTimelineBuilder, SmzTimelineComponent, SmzToastComponent, SmzTooltipTouchSupportModule, SmzTreeBuilder, SmzTreeComponent, SmzTreeDragAndDropBuilder, SmzTreeDropBuilder, SmzTreeDynamicMenuBuilder, SmzTreeDynamicMenuItemBuilder, SmzTreeEmptyFeedbackBuilder, SmzTreeMenuBuilder, SmzTreeMenuItemBuilder, SmzTreeToolbarBuilder, SmzTreeToolbarButtonBuilder, SmzTreeToolbarButtonCollectionBuilder, SmzTreeWithDetailsBuilder, SmzTreeWithDetailsComponent, SmzUiBlockComponent, SmzUiBlockDirective, SmzUiBlockService, SmzUiBuilder, SmzUiEnvironment, SmzUiGuidesBuilder, SmzUiGuidesService, SmzViewportDirective, SmzViewportService, SortIcon, SortableColumn, StandaloneInjectComponentDirective, StateBuilderPipe, TENANTS_PAGE_ROUTE, TENANTS_PATH, TENANTS_STATE_NAME, Table, TableBody, TableCheckbox, TableClearExtensionDirective, TableHeaderCheckbox, TableHelperService, TableModule, TableOverlayService, TableRadioButton, TableService, TenantAuthenticationSelectors, TenantsActions, TenantsModule, TenantsSelectors, TenantsState, ThemeManagerService, TitleService, ToastActions, 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, aggregateNumbers, 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, computeFooterValue, consumeAttemptedRoute, convertFormCreationFeature, convertFormFeature, convertFormFeatureFromInputData, convertFormUpdateFeature, count, createObjectFromString, createRound, createSubjectOnTheInstance, dataURLtoFile, databaseSmzAccessStates, debounce, deepClone, deepEqual, deepIndexOf, deepMerge, defaultFormsModuleConfig, defaultState, downloadBase64File, downloadFromServerUrl, downloadFromUrl, empty, every, executeSmzMenuItem, executeTextPattern, featureSmzAccessStates, fixDate$1 as fixDate, fixDateProperties, fixDates, flatten, flattenObject, formatFooterValue, getAuthenticationInitialState, getCleanApplicationState, getFirst, getFirstElement, getFirstElements, getFormInputFromDialog, getGlobalInitialState, getInitialApplicationState, getInitialDatabaseStoreState, getInitialState$8 as getInitialState, getLastElements, getPreset, getProperty, getSymbol, getTreeNodeFromKey, getUiDefinitionsInitialState, getUiLocalizationInitialState, getUsersInitialState, getValidatorsForInput, handleBase64, hasCardsGlobalFilterPaths, hasFooter, isArray, isConvertibleToNumber, isDeepObject, isEmpty$1 as isEmpty, isFunction$1 as isFunction, isInsideCdkOverlay, 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 };
|
|
57443
57619
|
//# sourceMappingURL=ngx-smz-core.mjs.map
|