@ngx-smz/core 21.1.3 → 21.1.5
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 +213 -780
- package/fesm2022/ngx-smz-core.mjs.map +1 -1
- package/package.json +1 -5
- package/resources/assets/images/asset-access.svg +46 -0
- package/resources/assets/images/asset-error.svg +74 -0
- package/types/ngx-smz-core.d.ts +91 -161
- package/fesm2022/ngx-smz-core-src-lib-modules-prime-overlaypanel.mjs +0 -413
- package/fesm2022/ngx-smz-core-src-lib-modules-prime-overlaypanel.mjs.map +0 -1
- package/types/ngx-smz-core-src-lib-modules-prime-overlaypanel.d.ts +0 -80
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { signal, Injectable, InjectionToken, provideAppInitializer, inject, makeEnvironmentProviders, computed, Pipe, Input, Component, DestroyRef, EventEmitter, HostListener, Output, HostBinding, Directive, ChangeDetectionStrategy, ViewEncapsulation, Optional, NgModule, ViewChild,
|
|
2
|
+
import { signal, Injectable, InjectionToken, provideAppInitializer, inject, makeEnvironmentProviders, computed, Pipe, Input, Component, DestroyRef, EventEmitter, HostListener, Output, HostBinding, Directive, ChangeDetectionStrategy, ViewEncapsulation, Optional, NgModule, ViewChild, ElementRef, Renderer2, forwardRef, Inject, ChangeDetectorRef, LOCALE_ID, ContentChildren, Self, ErrorHandler, DEFAULT_CURRENCY_CODE, DOCUMENT, PLATFORM_ID } from '@angular/core';
|
|
3
3
|
import * as i1$1 from '@angular/common';
|
|
4
4
|
import { CommonModule, getCurrencySymbol, getLocaleCurrencyCode, NgStyle, LocationStrategy, registerLocaleData, isPlatformBrowser as isPlatformBrowser$1, formatDate } from '@angular/common';
|
|
5
5
|
import * as i1$3 from '@angular/forms';
|
|
@@ -65,16 +65,14 @@ import * as i3$5 from 'primeng/multiselect';
|
|
|
65
65
|
import { MultiSelectModule } from 'primeng/multiselect';
|
|
66
66
|
import * as i4$3 from 'primeng/radiobutton';
|
|
67
67
|
import { RadioButtonModule } from 'primeng/radiobutton';
|
|
68
|
-
import * as i3$6 from 'primeng/ripple';
|
|
69
|
-
import { RippleModule } from 'primeng/ripple';
|
|
70
|
-
import { DomHandler, ConnectedOverlayScrollHandler } from 'primeng/dom';
|
|
71
|
-
import * as i5$1 from 'primeng/config';
|
|
72
|
-
import { PrimeNG } from 'primeng/config';
|
|
73
68
|
import { FileUploadModule } from 'primeng/fileupload';
|
|
74
69
|
import moment from 'moment';
|
|
75
70
|
import * as i2$5 from 'primeng/dynamicdialog';
|
|
76
71
|
import { DialogService as DialogService$1 } from 'primeng/dynamicdialog';
|
|
77
72
|
import { animation, style, animate, trigger, transition, useAnimation } from '@angular/animations';
|
|
73
|
+
import { DomHandler, ConnectedOverlayScrollHandler } from 'primeng/dom';
|
|
74
|
+
import * as i5$1 from 'primeng/config';
|
|
75
|
+
import { PrimeNG } from 'primeng/config';
|
|
78
76
|
import * as i3$9 from 'primeng/progressbar';
|
|
79
77
|
import { ProgressBarModule } from 'primeng/progressbar';
|
|
80
78
|
import cloneDeep$1 from 'lodash-es/cloneDeep';
|
|
@@ -83,6 +81,8 @@ import * as i19 from 'primeng/skeleton';
|
|
|
83
81
|
import { SkeletonModule } from 'primeng/skeleton';
|
|
84
82
|
import * as i1$9 from '@angular/router';
|
|
85
83
|
import { RouterModule, NavigationEnd, RouteReuseStrategy, Router, RouteConfigLoadStart, RouteConfigLoadEnd } from '@angular/router';
|
|
84
|
+
import * as i3$6 from 'primeng/ripple';
|
|
85
|
+
import { RippleModule } from 'primeng/ripple';
|
|
86
86
|
import { Navigate, RouterState } from '@ngxs/router-plugin';
|
|
87
87
|
import * as i25 from 'primeng/togglebutton';
|
|
88
88
|
import { ToggleButtonModule } from 'primeng/togglebutton';
|
|
@@ -106,8 +106,6 @@ import sortBy$1 from 'lodash-es/sortBy';
|
|
|
106
106
|
import flatten$2 from 'lodash-es/flatten';
|
|
107
107
|
import * as i4$5 from 'primeng/picklist';
|
|
108
108
|
import { PickListModule } from 'primeng/picklist';
|
|
109
|
-
import forIn from 'lodash-es/forIn';
|
|
110
|
-
import startsWith from 'lodash-es/startsWith';
|
|
111
109
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
112
110
|
import localePt from '@angular/common/locales/pt';
|
|
113
111
|
import 'moment/locale/pt-br';
|
|
@@ -120,16 +118,16 @@ import * as i2$6 from 'primeng/dock';
|
|
|
120
118
|
import { DockModule } from 'primeng/dock';
|
|
121
119
|
import * as i2$7 from 'primeng/blockui';
|
|
122
120
|
import { BlockUIModule } from 'primeng/blockui';
|
|
121
|
+
import * as i11 from 'primeng/toast';
|
|
122
|
+
import { ToastModule } from 'primeng/toast';
|
|
123
123
|
import * as i3$8 from 'primeng/drawer';
|
|
124
124
|
import { DrawerModule } from 'primeng/drawer';
|
|
125
125
|
import * as i9 from 'primeng/tree';
|
|
126
126
|
import { Tree, TreeModule } from 'primeng/tree';
|
|
127
127
|
import * as i8$1 from 'primeng/contextmenu';
|
|
128
128
|
import { ContextMenuModule } from 'primeng/contextmenu';
|
|
129
|
-
import * as i11 from 'primeng/menu';
|
|
129
|
+
import * as i11$1 from 'primeng/menu';
|
|
130
130
|
import { MenuModule } from 'primeng/menu';
|
|
131
|
-
import * as i1$b from 'primeng/toast';
|
|
132
|
-
import { ToastModule } from 'primeng/toast';
|
|
133
131
|
import * as i2$9 from 'primeng/dataview';
|
|
134
132
|
import { DataView, DataViewModule } from 'primeng/dataview';
|
|
135
133
|
import * as i5$2 from 'primeng/timeline';
|
|
@@ -5160,401 +5158,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
5160
5158
|
}]
|
|
5161
5159
|
}] });
|
|
5162
5160
|
|
|
5163
|
-
/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-return, @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type, @typescript-eslint/typedef, no-underscore-dangle, no-console, eqeqeq, @typescript-eslint/no-unused-vars, @typescript-eslint/no-useless-constructor, @typescript-eslint/explicit-member-accessibility, max-len, @angular-eslint/component-class-suffix, @angular-eslint/no-output-on-prefix, @typescript-eslint/no-unsafe-function-type */
|
|
5164
|
-
class OverlayPanel {
|
|
5165
|
-
el;
|
|
5166
|
-
renderer;
|
|
5167
|
-
cd;
|
|
5168
|
-
zone;
|
|
5169
|
-
overlayService;
|
|
5170
|
-
config = inject(PrimeNG);
|
|
5171
|
-
dismissable = true;
|
|
5172
|
-
showCloseIcon;
|
|
5173
|
-
style;
|
|
5174
|
-
styleClass;
|
|
5175
|
-
appendTo = 'body';
|
|
5176
|
-
autoZIndex = true;
|
|
5177
|
-
ariaCloseLabel;
|
|
5178
|
-
baseZIndex = 0;
|
|
5179
|
-
focusOnShow = true;
|
|
5180
|
-
mousePosition = true;
|
|
5181
|
-
showTransitionOptions = '0s cubic-bezier(0, 0, 0.2, 1)';
|
|
5182
|
-
hideTransitionOptions = '0s linear';
|
|
5183
|
-
onShow = new EventEmitter();
|
|
5184
|
-
onHide = new EventEmitter();
|
|
5185
|
-
templates;
|
|
5186
|
-
overlayPanelRef;
|
|
5187
|
-
container;
|
|
5188
|
-
overlayVisible = false;
|
|
5189
|
-
render = false;
|
|
5190
|
-
selfClick = false;
|
|
5191
|
-
documentClickListener;
|
|
5192
|
-
target;
|
|
5193
|
-
mouseEvent;
|
|
5194
|
-
willHide;
|
|
5195
|
-
scrollHandler;
|
|
5196
|
-
documentResizeListener;
|
|
5197
|
-
contentTemplate;
|
|
5198
|
-
destroyCallback;
|
|
5199
|
-
overlayEventListener;
|
|
5200
|
-
overlaySubscription;
|
|
5201
|
-
constructor(el, renderer, cd, zone, overlayService) {
|
|
5202
|
-
this.el = el;
|
|
5203
|
-
this.renderer = renderer;
|
|
5204
|
-
this.cd = cd;
|
|
5205
|
-
this.zone = zone;
|
|
5206
|
-
this.overlayService = overlayService;
|
|
5207
|
-
}
|
|
5208
|
-
ngAfterContentInit() {
|
|
5209
|
-
this.templates.forEach((item) => {
|
|
5210
|
-
switch (item.getType()) {
|
|
5211
|
-
case 'content':
|
|
5212
|
-
this.contentTemplate = item.template;
|
|
5213
|
-
break;
|
|
5214
|
-
default:
|
|
5215
|
-
this.contentTemplate = item.template;
|
|
5216
|
-
break;
|
|
5217
|
-
}
|
|
5218
|
-
this.cd.markForCheck();
|
|
5219
|
-
});
|
|
5220
|
-
}
|
|
5221
|
-
bindDocumentClickListener() {
|
|
5222
|
-
if (!this.documentClickListener && this.dismissable) {
|
|
5223
|
-
this.zone.runOutsideAngular(() => {
|
|
5224
|
-
const documentEvent = DomHandler.isIOS() ? 'touchstart' : 'click';
|
|
5225
|
-
const documentTarget = this.el ? this.el.nativeElement.ownerDocument : 'document';
|
|
5226
|
-
this.documentClickListener = this.renderer.listen(documentTarget, documentEvent, (event) => {
|
|
5227
|
-
if (!this.container.contains(event.target) && this.target !== event.target && !this.target.contains(event.target) && !this.selfClick) {
|
|
5228
|
-
this.zone.run(() => {
|
|
5229
|
-
this.hide();
|
|
5230
|
-
});
|
|
5231
|
-
}
|
|
5232
|
-
this.selfClick = false;
|
|
5233
|
-
this.cd.markForCheck();
|
|
5234
|
-
});
|
|
5235
|
-
});
|
|
5236
|
-
}
|
|
5237
|
-
}
|
|
5238
|
-
unbindDocumentClickListener() {
|
|
5239
|
-
if (this.documentClickListener) {
|
|
5240
|
-
this.documentClickListener();
|
|
5241
|
-
this.documentClickListener = null;
|
|
5242
|
-
this.selfClick = false;
|
|
5243
|
-
}
|
|
5244
|
-
}
|
|
5245
|
-
toggle(event, target) {
|
|
5246
|
-
if (this.overlayVisible) {
|
|
5247
|
-
if (this.hasTargetChanged(event, target)) {
|
|
5248
|
-
this.destroyCallback = () => {
|
|
5249
|
-
this.show(null, (target || event.currentTarget || event.target));
|
|
5250
|
-
};
|
|
5251
|
-
}
|
|
5252
|
-
this.hide();
|
|
5253
|
-
}
|
|
5254
|
-
else {
|
|
5255
|
-
this.show(event, target);
|
|
5256
|
-
}
|
|
5257
|
-
}
|
|
5258
|
-
show(event, target) {
|
|
5259
|
-
this.mouseEvent = event;
|
|
5260
|
-
this.target = target || event.currentTarget || event.target;
|
|
5261
|
-
this.overlayVisible = true;
|
|
5262
|
-
this.render = true;
|
|
5263
|
-
this.cd.markForCheck();
|
|
5264
|
-
this.zone.runOutsideAngular(() => {
|
|
5265
|
-
setTimeout(() => this.afterOverlayShown());
|
|
5266
|
-
});
|
|
5267
|
-
}
|
|
5268
|
-
afterOverlayShown() {
|
|
5269
|
-
const el = this.overlayPanelRef?.nativeElement;
|
|
5270
|
-
if (!el) {
|
|
5271
|
-
return;
|
|
5272
|
-
}
|
|
5273
|
-
this.container = el;
|
|
5274
|
-
this.onShow.emit(null);
|
|
5275
|
-
this.appendContainer();
|
|
5276
|
-
this.align();
|
|
5277
|
-
this.bindDocumentClickListener();
|
|
5278
|
-
this.bindDocumentResizeListener();
|
|
5279
|
-
this.bindScrollListener();
|
|
5280
|
-
if (this.focusOnShow) {
|
|
5281
|
-
this.focus();
|
|
5282
|
-
}
|
|
5283
|
-
this.overlayEventListener = (e) => {
|
|
5284
|
-
if (this.container && this.container.contains(e.target)) {
|
|
5285
|
-
this.selfClick = true;
|
|
5286
|
-
}
|
|
5287
|
-
};
|
|
5288
|
-
this.overlaySubscription = this.overlayService.clickObservable.subscribe(this.overlayEventListener);
|
|
5289
|
-
}
|
|
5290
|
-
onOverlayClick(event) {
|
|
5291
|
-
this.overlayService.add({
|
|
5292
|
-
originalEvent: event,
|
|
5293
|
-
target: this.el.nativeElement
|
|
5294
|
-
});
|
|
5295
|
-
this.selfClick = true;
|
|
5296
|
-
}
|
|
5297
|
-
onContentClick() {
|
|
5298
|
-
this.selfClick = true;
|
|
5299
|
-
}
|
|
5300
|
-
hasTargetChanged(event, target) {
|
|
5301
|
-
return this.target != null && this.target !== (target || event.currentTarget || event.target);
|
|
5302
|
-
}
|
|
5303
|
-
appendContainer() {
|
|
5304
|
-
if (this.appendTo) {
|
|
5305
|
-
if (this.appendTo === 'body') {
|
|
5306
|
-
document.body.appendChild(this.container);
|
|
5307
|
-
}
|
|
5308
|
-
else {
|
|
5309
|
-
DomHandler.appendChild(this.container, this.appendTo);
|
|
5310
|
-
}
|
|
5311
|
-
}
|
|
5312
|
-
}
|
|
5313
|
-
restoreAppend() {
|
|
5314
|
-
if (this.container && this.appendTo) {
|
|
5315
|
-
this.el.nativeElement.appendChild(this.container);
|
|
5316
|
-
}
|
|
5317
|
-
}
|
|
5318
|
-
align() {
|
|
5319
|
-
if (this.autoZIndex) {
|
|
5320
|
-
ZIndexUtils.set('overlay', this.container, this.baseZIndex + this.config.zIndex.overlay);
|
|
5321
|
-
}
|
|
5322
|
-
if (this.mousePosition) {
|
|
5323
|
-
this.cursorPosition(this.container, this.mouseEvent);
|
|
5324
|
-
}
|
|
5325
|
-
else {
|
|
5326
|
-
DomHandler.absolutePosition(this.container, this.target);
|
|
5327
|
-
}
|
|
5328
|
-
const containerOffset = DomHandler.getOffset(this.container);
|
|
5329
|
-
const targetOffset = DomHandler.getOffset(this.target);
|
|
5330
|
-
let arrowLeft = 0;
|
|
5331
|
-
if (containerOffset.left < targetOffset.left) {
|
|
5332
|
-
arrowLeft = targetOffset.left - containerOffset.left;
|
|
5333
|
-
}
|
|
5334
|
-
this.container.style.setProperty('--overlayArrowLeft', `${arrowLeft}px`);
|
|
5335
|
-
if (containerOffset.top < targetOffset.top) {
|
|
5336
|
-
DomHandler.addClass(this.container, 'p-overlaypanel-flipped');
|
|
5337
|
-
}
|
|
5338
|
-
}
|
|
5339
|
-
cursorPosition(element, mouseEvent) {
|
|
5340
|
-
const elementOuterHeight = 0;
|
|
5341
|
-
const elementOuterWidth = 30;
|
|
5342
|
-
const targetOuterHeight = 0;
|
|
5343
|
-
const targetOuterWidth = 0;
|
|
5344
|
-
const targetOffset = { top: mouseEvent.clientY, left: mouseEvent.clientX };
|
|
5345
|
-
const windowScrollTop = DomHandler.getWindowScrollTop();
|
|
5346
|
-
const windowScrollLeft = DomHandler.getWindowScrollLeft();
|
|
5347
|
-
const viewport = DomHandler.getViewport();
|
|
5348
|
-
let top, left;
|
|
5349
|
-
if (targetOffset.top + targetOuterHeight + elementOuterHeight > viewport.height) {
|
|
5350
|
-
top = targetOffset.top + windowScrollTop - elementOuterHeight;
|
|
5351
|
-
element.style.transformOrigin = 'bottom';
|
|
5352
|
-
if (top < 0) {
|
|
5353
|
-
top = windowScrollTop;
|
|
5354
|
-
}
|
|
5355
|
-
}
|
|
5356
|
-
else {
|
|
5357
|
-
top = targetOuterHeight + targetOffset.top + windowScrollTop;
|
|
5358
|
-
element.style.transformOrigin = 'top';
|
|
5359
|
-
}
|
|
5360
|
-
if (targetOffset.left + elementOuterWidth > viewport.width) {
|
|
5361
|
-
left = Math.max(0, targetOffset.left + windowScrollLeft + targetOuterWidth - elementOuterWidth);
|
|
5362
|
-
}
|
|
5363
|
-
else {
|
|
5364
|
-
left = targetOffset.left + windowScrollLeft - elementOuterWidth;
|
|
5365
|
-
}
|
|
5366
|
-
element.style.top = top + 'px';
|
|
5367
|
-
element.style.left = left + 'px';
|
|
5368
|
-
}
|
|
5369
|
-
onLeaveDone(event) {
|
|
5370
|
-
const el = event.target;
|
|
5371
|
-
el.classList.add('overlay-leave');
|
|
5372
|
-
const onEnd = () => {
|
|
5373
|
-
el.removeEventListener('animationend', onEnd);
|
|
5374
|
-
event.animationComplete();
|
|
5375
|
-
if (this.destroyCallback) {
|
|
5376
|
-
this.destroyCallback();
|
|
5377
|
-
this.destroyCallback = null;
|
|
5378
|
-
}
|
|
5379
|
-
if (this.overlaySubscription) {
|
|
5380
|
-
this.overlaySubscription.unsubscribe();
|
|
5381
|
-
}
|
|
5382
|
-
if (this.autoZIndex && this.container) {
|
|
5383
|
-
ZIndexUtils.clear(this.container);
|
|
5384
|
-
}
|
|
5385
|
-
this.onContainerDestroy();
|
|
5386
|
-
this.onHide.emit({});
|
|
5387
|
-
this.render = false;
|
|
5388
|
-
this.cd.markForCheck();
|
|
5389
|
-
};
|
|
5390
|
-
el.addEventListener('animationend', onEnd);
|
|
5391
|
-
}
|
|
5392
|
-
focus() {
|
|
5393
|
-
const focusable = DomHandler.findSingle(this.container, '[autofocus]');
|
|
5394
|
-
if (focusable) {
|
|
5395
|
-
this.zone.runOutsideAngular(() => {
|
|
5396
|
-
setTimeout(() => focusable.focus(), 5);
|
|
5397
|
-
});
|
|
5398
|
-
}
|
|
5399
|
-
}
|
|
5400
|
-
hide() {
|
|
5401
|
-
// console.log('hide');
|
|
5402
|
-
this.overlayVisible = false;
|
|
5403
|
-
this.cd.markForCheck();
|
|
5404
|
-
}
|
|
5405
|
-
onCloseClick(event) {
|
|
5406
|
-
this.hide();
|
|
5407
|
-
event.preventDefault();
|
|
5408
|
-
}
|
|
5409
|
-
onWindowResize(event) {
|
|
5410
|
-
this.hide();
|
|
5411
|
-
}
|
|
5412
|
-
bindDocumentResizeListener() {
|
|
5413
|
-
this.documentResizeListener = this.onWindowResize.bind(this);
|
|
5414
|
-
window.addEventListener('resize', this.documentResizeListener);
|
|
5415
|
-
}
|
|
5416
|
-
unbindDocumentResizeListener() {
|
|
5417
|
-
if (this.documentResizeListener) {
|
|
5418
|
-
window.removeEventListener('resize', this.documentResizeListener);
|
|
5419
|
-
this.documentResizeListener = null;
|
|
5420
|
-
}
|
|
5421
|
-
}
|
|
5422
|
-
bindScrollListener() {
|
|
5423
|
-
if (!this.scrollHandler) {
|
|
5424
|
-
this.scrollHandler = new ConnectedOverlayScrollHandler(this.target, () => {
|
|
5425
|
-
if (this.overlayVisible) {
|
|
5426
|
-
this.hide();
|
|
5427
|
-
}
|
|
5428
|
-
});
|
|
5429
|
-
}
|
|
5430
|
-
this.scrollHandler.bindScrollListener();
|
|
5431
|
-
}
|
|
5432
|
-
unbindScrollListener() {
|
|
5433
|
-
if (this.scrollHandler) {
|
|
5434
|
-
this.scrollHandler.unbindScrollListener();
|
|
5435
|
-
}
|
|
5436
|
-
}
|
|
5437
|
-
onContainerDestroy() {
|
|
5438
|
-
if (!this.cd.destroyed) {
|
|
5439
|
-
this.target = null;
|
|
5440
|
-
}
|
|
5441
|
-
this.unbindDocumentClickListener();
|
|
5442
|
-
this.unbindDocumentResizeListener();
|
|
5443
|
-
this.unbindScrollListener();
|
|
5444
|
-
}
|
|
5445
|
-
ngOnDestroy() {
|
|
5446
|
-
if (this.scrollHandler) {
|
|
5447
|
-
this.scrollHandler.destroy();
|
|
5448
|
-
this.scrollHandler = null;
|
|
5449
|
-
}
|
|
5450
|
-
if (this.container && this.autoZIndex) {
|
|
5451
|
-
ZIndexUtils.clear(this.container);
|
|
5452
|
-
}
|
|
5453
|
-
if (!this.cd.destroyed) {
|
|
5454
|
-
this.target = null;
|
|
5455
|
-
}
|
|
5456
|
-
this.destroyCallback = null;
|
|
5457
|
-
if (this.container) {
|
|
5458
|
-
this.restoreAppend();
|
|
5459
|
-
this.onContainerDestroy();
|
|
5460
|
-
}
|
|
5461
|
-
if (this.overlaySubscription) {
|
|
5462
|
-
this.overlaySubscription.unsubscribe();
|
|
5463
|
-
}
|
|
5464
|
-
}
|
|
5465
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: OverlayPanel, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i1$7.OverlayService }], target: i0.ɵɵFactoryTarget.Component });
|
|
5466
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: OverlayPanel, isStandalone: false, selector: "p-overlayPanel", inputs: { dismissable: "dismissable", showCloseIcon: "showCloseIcon", style: "style", styleClass: "styleClass", appendTo: "appendTo", autoZIndex: "autoZIndex", ariaCloseLabel: "ariaCloseLabel", baseZIndex: "baseZIndex", focusOnShow: "focusOnShow", mousePosition: "mousePosition", showTransitionOptions: "showTransitionOptions", hideTransitionOptions: "hideTransitionOptions" }, outputs: { onShow: "onShow", onHide: "onHide" }, host: { classAttribute: "p-element" }, queries: [{ propertyName: "templates", predicate: PrimeTemplate }], viewQueries: [{ propertyName: "overlayPanelRef", first: true, predicate: ["overlayPanel"], descendants: true }], ngImport: i0, template: `
|
|
5467
|
-
@if (render) {
|
|
5468
|
-
@if (overlayVisible) {
|
|
5469
|
-
<div #overlayPanel [ngClass]="'p-overlaypanel p-component'" [ngStyle]="style" [class]="styleClass" (click)="onOverlayClick($event)"
|
|
5470
|
-
[style.--show-transition]="showTransitionOptions" [style.--hide-transition]="hideTransitionOptions"
|
|
5471
|
-
animate.enter="overlay-enter" (animate.leave)="onLeaveDone($event)">
|
|
5472
|
-
<div class="p-overlaypanel-content" (click)="onContentClick()" (mousedown)="onContentClick()">
|
|
5473
|
-
<ng-content></ng-content>
|
|
5474
|
-
<ng-container *ngTemplateOutlet="contentTemplate"></ng-container>
|
|
5475
|
-
</div>
|
|
5476
|
-
@if (showCloseIcon) {
|
|
5477
|
-
<button type="button" class="p-overlaypanel-close p-link" (click)="onCloseClick($event)" (keydown.enter)="hide()" [attr.aria-label]="ariaCloseLabel" pRipple>
|
|
5478
|
-
<span class="p-overlaypanel-close-icon pi pi-times"></span>
|
|
5479
|
-
</button>
|
|
5480
|
-
}
|
|
5481
|
-
</div>
|
|
5482
|
-
}
|
|
5483
|
-
}
|
|
5484
|
-
`, isInline: true, styles: [".p-overlaypanel{position:absolute;margin-top:10px;top:0;left:0}.overlay-enter{animation:overlay-enter-anim var(--show-transition, 0s cubic-bezier(0, 0, .2, 1)) forwards}@keyframes overlay-enter-anim{0%{transform:scaleY(.8);opacity:0}to{transform:translateY(0);opacity:1}}.overlay-leave{animation:overlay-leave-anim var(--hide-transition, 0s linear) forwards}@keyframes overlay-leave-anim{to{opacity:0}}.p-overlaypanel-flipped{margin-top:0;margin-bottom:10px}.p-overlaypanel-close{display:flex;justify-content:center;align-items:center;overflow:hidden;position:relative}.p-overlaypanel:after,.p-overlaypanel:before{bottom:100%;left:calc(var(--overlayArrowLeft, 0) + 1.25rem);content:\" \";height:0;width:0;position:absolute;pointer-events:none}.p-overlaypanel:after{border-width:8px;margin-left:-8px}.p-overlaypanel:before{border-width:10px;margin-left:-10px}.p-overlaypanel-shifted:after,.p-overlaypanel-shifted:before{left:auto;right:1.25em;margin-left:auto}.p-overlaypanel-flipped:after,.p-overlaypanel-flipped:before{bottom:auto;top:100%}.p-overlaypanel.p-overlaypanel-flipped:after{border-bottom-color:transparent}.p-overlaypanel.p-overlaypanel-flipped:before{border-bottom-color:transparent}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i3$6.Ripple, selector: "[pRipple]" }], changeDetection: i0.ChangeDetectionStrategy.Eager, encapsulation: i0.ViewEncapsulation.None });
|
|
5485
|
-
}
|
|
5486
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: OverlayPanel, decorators: [{
|
|
5487
|
-
type: Component,
|
|
5488
|
-
args: [{ selector: 'p-overlayPanel', template: `
|
|
5489
|
-
@if (render) {
|
|
5490
|
-
@if (overlayVisible) {
|
|
5491
|
-
<div #overlayPanel [ngClass]="'p-overlaypanel p-component'" [ngStyle]="style" [class]="styleClass" (click)="onOverlayClick($event)"
|
|
5492
|
-
[style.--show-transition]="showTransitionOptions" [style.--hide-transition]="hideTransitionOptions"
|
|
5493
|
-
animate.enter="overlay-enter" (animate.leave)="onLeaveDone($event)">
|
|
5494
|
-
<div class="p-overlaypanel-content" (click)="onContentClick()" (mousedown)="onContentClick()">
|
|
5495
|
-
<ng-content></ng-content>
|
|
5496
|
-
<ng-container *ngTemplateOutlet="contentTemplate"></ng-container>
|
|
5497
|
-
</div>
|
|
5498
|
-
@if (showCloseIcon) {
|
|
5499
|
-
<button type="button" class="p-overlaypanel-close p-link" (click)="onCloseClick($event)" (keydown.enter)="hide()" [attr.aria-label]="ariaCloseLabel" pRipple>
|
|
5500
|
-
<span class="p-overlaypanel-close-icon pi pi-times"></span>
|
|
5501
|
-
</button>
|
|
5502
|
-
}
|
|
5503
|
-
</div>
|
|
5504
|
-
}
|
|
5505
|
-
}
|
|
5506
|
-
`, changeDetection: ChangeDetectionStrategy.Default, encapsulation: ViewEncapsulation.None, host: {
|
|
5507
|
-
'class': 'p-element'
|
|
5508
|
-
}, standalone: false, styles: [".p-overlaypanel{position:absolute;margin-top:10px;top:0;left:0}.overlay-enter{animation:overlay-enter-anim var(--show-transition, 0s cubic-bezier(0, 0, .2, 1)) forwards}@keyframes overlay-enter-anim{0%{transform:scaleY(.8);opacity:0}to{transform:translateY(0);opacity:1}}.overlay-leave{animation:overlay-leave-anim var(--hide-transition, 0s linear) forwards}@keyframes overlay-leave-anim{to{opacity:0}}.p-overlaypanel-flipped{margin-top:0;margin-bottom:10px}.p-overlaypanel-close{display:flex;justify-content:center;align-items:center;overflow:hidden;position:relative}.p-overlaypanel:after,.p-overlaypanel:before{bottom:100%;left:calc(var(--overlayArrowLeft, 0) + 1.25rem);content:\" \";height:0;width:0;position:absolute;pointer-events:none}.p-overlaypanel:after{border-width:8px;margin-left:-8px}.p-overlaypanel:before{border-width:10px;margin-left:-10px}.p-overlaypanel-shifted:after,.p-overlaypanel-shifted:before{left:auto;right:1.25em;margin-left:auto}.p-overlaypanel-flipped:after,.p-overlaypanel-flipped:before{bottom:auto;top:100%}.p-overlaypanel.p-overlaypanel-flipped:after{border-bottom-color:transparent}.p-overlaypanel.p-overlaypanel-flipped:before{border-bottom-color:transparent}\n"] }]
|
|
5509
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i1$7.OverlayService }], propDecorators: { dismissable: [{
|
|
5510
|
-
type: Input
|
|
5511
|
-
}], showCloseIcon: [{
|
|
5512
|
-
type: Input
|
|
5513
|
-
}], style: [{
|
|
5514
|
-
type: Input
|
|
5515
|
-
}], styleClass: [{
|
|
5516
|
-
type: Input
|
|
5517
|
-
}], appendTo: [{
|
|
5518
|
-
type: Input
|
|
5519
|
-
}], autoZIndex: [{
|
|
5520
|
-
type: Input
|
|
5521
|
-
}], ariaCloseLabel: [{
|
|
5522
|
-
type: Input
|
|
5523
|
-
}], baseZIndex: [{
|
|
5524
|
-
type: Input
|
|
5525
|
-
}], focusOnShow: [{
|
|
5526
|
-
type: Input
|
|
5527
|
-
}], mousePosition: [{
|
|
5528
|
-
type: Input
|
|
5529
|
-
}], showTransitionOptions: [{
|
|
5530
|
-
type: Input
|
|
5531
|
-
}], hideTransitionOptions: [{
|
|
5532
|
-
type: Input
|
|
5533
|
-
}], onShow: [{
|
|
5534
|
-
type: Output
|
|
5535
|
-
}], onHide: [{
|
|
5536
|
-
type: Output
|
|
5537
|
-
}], templates: [{
|
|
5538
|
-
type: ContentChildren,
|
|
5539
|
-
args: [PrimeTemplate]
|
|
5540
|
-
}], overlayPanelRef: [{
|
|
5541
|
-
type: ViewChild,
|
|
5542
|
-
args: ['overlayPanel']
|
|
5543
|
-
}] } });
|
|
5544
|
-
class OverlayPanelModule {
|
|
5545
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: OverlayPanelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
5546
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.1", ngImport: i0, type: OverlayPanelModule, declarations: [OverlayPanel], imports: [CommonModule, RippleModule, SharedModule], exports: [OverlayPanel, SharedModule] });
|
|
5547
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: OverlayPanelModule, imports: [CommonModule, RippleModule, SharedModule, SharedModule] });
|
|
5548
|
-
}
|
|
5549
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: OverlayPanelModule, decorators: [{
|
|
5550
|
-
type: NgModule,
|
|
5551
|
-
args: [{
|
|
5552
|
-
imports: [CommonModule, RippleModule, SharedModule],
|
|
5553
|
-
exports: [OverlayPanel, SharedModule],
|
|
5554
|
-
declarations: [OverlayPanel]
|
|
5555
|
-
}]
|
|
5556
|
-
}] });
|
|
5557
|
-
|
|
5558
5161
|
/* eslint-disable @angular-eslint/component-class-suffix -- SmzInputTagArea is legacy name */
|
|
5559
5162
|
/* eslint-disable @typescript-eslint/no-explicit-any -- overlay/dom types */
|
|
5560
5163
|
/* eslint-disable @typescript-eslint/no-unsafe-assignment -- overlay/dom */
|
|
@@ -5730,34 +5333,30 @@ class SmzInputTagArea {
|
|
|
5730
5333
|
};
|
|
5731
5334
|
};
|
|
5732
5335
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzInputTagArea, deps: [{ token: i1$3.NgModel, optional: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
5733
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: SmzInputTagArea, isStandalone: false, selector: "smz-input-tag-area", inputs: { config: "config", rows: "rows", control: "control" }, viewQueries: [{ propertyName: "overlay", first: true, predicate:
|
|
5336
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: SmzInputTagArea, isStandalone: false, selector: "smz-input-tag-area", inputs: { config: "config", rows: "rows", control: "control" }, viewQueries: [{ propertyName: "overlay", first: true, predicate: Popover, descendants: true }, { propertyName: "inputElement", first: true, predicate: ["inputArea"], descendants: true }, { propertyName: "listboxElement", first: true, predicate: ["listbox"], descendants: true }], ngImport: i0, template: `
|
|
5734
5337
|
<textarea #inputArea id="inputArea" pInputTextarea smzSmartTag [(ngModel)]="ngModel" [formControl]="control" [options]="config?.options" [rows]="rows" (tagTyped)="onTag($event)" class="col-12"></textarea>
|
|
5735
|
-
<p-
|
|
5736
|
-
|
|
5737
|
-
|
|
5738
|
-
|
|
5739
|
-
|
|
5740
|
-
|
|
5741
|
-
</p-overlayPanel>
|
|
5742
|
-
`, isInline: true, styles: [".p-overlaypanel.tag-overlay .p-overlaypanel-content{padding:0}\n", ".tag-dropdown.p-dropdown{width:100%}\n"], dependencies: [{ kind: "directive", type: i1$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$4.Textarea, selector: "[pTextarea], [pInputTextarea]", inputs: ["pTextareaPT", "pTextareaUnstyled", "autoResize", "pSize", "variant", "fluid", "invalid"], outputs: ["onResize"] }, { kind: "directive", type: SmzSmartTag, selector: "[smzSmartTag]", inputs: ["options"], outputs: ["tagTyped"] }, { kind: "component", type: OverlayPanel, selector: "p-overlayPanel", inputs: ["dismissable", "showCloseIcon", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "mousePosition", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { kind: "directive", type: i1$7.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i6.Listbox, selector: "p-listbox, p-listBox, p-list-box", inputs: ["hostName", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "ariaLabel", "selectOnFocus", "searchLocale", "focusOnHover", "filterMessage", "filterFields", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "scrollHeight", "tabindex", "multiple", "styleClass", "listStyle", "listStyleClass", "readonly", "checkbox", "filter", "filterBy", "filterMatchMode", "filterLocale", "metaKeySelection", "dataKey", "showToggleAll", "optionLabel", "optionValue", "optionGroupChildren", "optionGroupLabel", "optionDisabled", "ariaFilterLabel", "filterPlaceHolder", "emptyFilterMessage", "emptyMessage", "group", "options", "filterValue", "selectAll", "striped", "highlightOnSelect", "checkmark", "dragdrop", "dropListData", "fluid"], outputs: ["onChange", "onClick", "onDblClick", "onFilter", "onFocus", "onBlur", "onSelectAllChange", "onLazyLoad", "onDrop"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
5338
|
+
<p-popover #overlay appendTo="body" [style]="{width: '450px'}" (onHide)="onHideOverlay()" styleClass="tag-overlay">
|
|
5339
|
+
@if (currentTag) {
|
|
5340
|
+
<p-listbox #listbox (onClick)="hide($event)" (keyup.enter)="hide($event)" styleClass="tag-dropdown" [options]="currentTag.data" [(ngModel)]="currentTagSelection" optionLabel="key"></p-listbox>
|
|
5341
|
+
}
|
|
5342
|
+
</p-popover>
|
|
5343
|
+
`, isInline: true, styles: [".p-overlaypanel.tag-overlay .p-overlaypanel-content{padding:0}\n", ".tag-dropdown.p-dropdown{width:100%}\n"], dependencies: [{ kind: "directive", type: i1$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$4.Textarea, selector: "[pTextarea], [pInputTextarea]", inputs: ["pTextareaPT", "pTextareaUnstyled", "autoResize", "pSize", "variant", "fluid", "invalid"], outputs: ["onResize"] }, { kind: "directive", type: SmzSmartTag, selector: "[smzSmartTag]", inputs: ["options"], outputs: ["tagTyped"] }, { kind: "component", type: i6.Listbox, selector: "p-listbox, p-listBox, p-list-box", inputs: ["hostName", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "ariaLabel", "selectOnFocus", "searchLocale", "focusOnHover", "filterMessage", "filterFields", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "scrollHeight", "tabindex", "multiple", "styleClass", "listStyle", "listStyleClass", "readonly", "checkbox", "filter", "filterBy", "filterMatchMode", "filterLocale", "metaKeySelection", "dataKey", "showToggleAll", "optionLabel", "optionValue", "optionGroupChildren", "optionGroupLabel", "optionDisabled", "ariaFilterLabel", "filterPlaceHolder", "emptyFilterMessage", "emptyMessage", "group", "options", "filterValue", "selectAll", "striped", "highlightOnSelect", "checkmark", "dragdrop", "dropListData", "fluid"], outputs: ["onChange", "onClick", "onDblClick", "onFilter", "onFocus", "onBlur", "onSelectAllChange", "onLazyLoad", "onDrop"] }, { kind: "component", type: i3.Popover, selector: "p-popover", inputs: ["ariaLabel", "ariaLabelledBy", "dismissable", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions", "motionOptions"], outputs: ["onShow", "onHide"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
5743
5344
|
}
|
|
5744
5345
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzInputTagArea, decorators: [{
|
|
5745
5346
|
type: Component,
|
|
5746
5347
|
args: [{ selector: 'smz-input-tag-area', template: `
|
|
5747
5348
|
<textarea #inputArea id="inputArea" pInputTextarea smzSmartTag [(ngModel)]="ngModel" [formControl]="control" [options]="config?.options" [rows]="rows" (tagTyped)="onTag($event)" class="col-12"></textarea>
|
|
5748
|
-
<p-
|
|
5749
|
-
|
|
5750
|
-
|
|
5751
|
-
|
|
5752
|
-
|
|
5753
|
-
</ng-template>
|
|
5754
|
-
</p-overlayPanel>
|
|
5349
|
+
<p-popover #overlay appendTo="body" [style]="{width: '450px'}" (onHide)="onHideOverlay()" styleClass="tag-overlay">
|
|
5350
|
+
@if (currentTag) {
|
|
5351
|
+
<p-listbox #listbox (onClick)="hide($event)" (keyup.enter)="hide($event)" styleClass="tag-dropdown" [options]="currentTag.data" [(ngModel)]="currentTagSelection" optionLabel="key"></p-listbox>
|
|
5352
|
+
}
|
|
5353
|
+
</p-popover>
|
|
5755
5354
|
`, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: false, styles: [".p-overlaypanel.tag-overlay .p-overlaypanel-content{padding:0}\n", ".tag-dropdown.p-dropdown{width:100%}\n"] }]
|
|
5756
5355
|
}], ctorParameters: () => [{ type: i1$3.NgModel, decorators: [{
|
|
5757
5356
|
type: Optional
|
|
5758
5357
|
}] }, { type: i0.ChangeDetectorRef }], propDecorators: { overlay: [{
|
|
5759
5358
|
type: ViewChild,
|
|
5760
|
-
args: [
|
|
5359
|
+
args: [Popover]
|
|
5761
5360
|
}], inputElement: [{
|
|
5762
5361
|
type: ViewChild,
|
|
5763
5362
|
args: ['inputArea']
|
|
@@ -5778,19 +5377,19 @@ class SmzInputTagAreaModule {
|
|
|
5778
5377
|
ReactiveFormsModule,
|
|
5779
5378
|
TextareaModule,
|
|
5780
5379
|
SmzSmartTagModule,
|
|
5781
|
-
OverlayPanelModule,
|
|
5782
5380
|
SelectModule,
|
|
5783
5381
|
ButtonModule,
|
|
5784
|
-
ListboxModule
|
|
5382
|
+
ListboxModule,
|
|
5383
|
+
PopoverModule], exports: [SmzInputTagArea] });
|
|
5785
5384
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzInputTagAreaModule, imports: [CommonModule,
|
|
5786
5385
|
FormsModule,
|
|
5787
5386
|
ReactiveFormsModule,
|
|
5788
5387
|
TextareaModule,
|
|
5789
5388
|
SmzSmartTagModule,
|
|
5790
|
-
OverlayPanelModule,
|
|
5791
5389
|
SelectModule,
|
|
5792
5390
|
ButtonModule,
|
|
5793
|
-
ListboxModule
|
|
5391
|
+
ListboxModule,
|
|
5392
|
+
PopoverModule] });
|
|
5794
5393
|
}
|
|
5795
5394
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzInputTagAreaModule, decorators: [{
|
|
5796
5395
|
type: NgModule,
|
|
@@ -5801,10 +5400,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
5801
5400
|
ReactiveFormsModule,
|
|
5802
5401
|
TextareaModule,
|
|
5803
5402
|
SmzSmartTagModule,
|
|
5804
|
-
OverlayPanelModule,
|
|
5805
5403
|
SelectModule,
|
|
5806
5404
|
ButtonModule,
|
|
5807
|
-
ListboxModule
|
|
5405
|
+
ListboxModule,
|
|
5406
|
+
PopoverModule
|
|
5808
5407
|
],
|
|
5809
5408
|
exports: [SmzInputTagArea],
|
|
5810
5409
|
declarations: [SmzInputTagArea]
|
|
@@ -17657,11 +17256,11 @@ class SmzTableComponent {
|
|
|
17657
17256
|
this.tableHelper.clear(this.tableKey);
|
|
17658
17257
|
}
|
|
17659
17258
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzTableComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: TableEditableService }, { token: TableFormsService }, { token: TableHelperService }, { token: i1$6.Store }, { token: SmzExcelService }], target: i0.ɵɵFactoryTarget.Component });
|
|
17660
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: SmzTableComponent, isStandalone: false, selector: "smz-ui-table", inputs: { state: "state", items: "items", loading: "loading" }, outputs: { selectionChange: "selectionChange", filterChange: "filterChange", columnVisibilityChange: "columnVisibilityChange", create: "create", update: "update", delete: "delete" }, providers: [TableEditableService, TableFormsService], queries: [{ propertyName: "templates", predicate: PrimeTemplate }], viewQueries: [{ propertyName: "table", first: true, predicate: ["dt"], descendants: true }, { propertyName: "columnMultiselect", first: true, predicate: ["columnMultiselect"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "@if (state | tableContext; as context) {\r\n @if ((context.state.emptyFeedback != null && (context.state.emptyFeedback.extraInfo || context.state.emptyFeedback.image || context.state.emptyFeedback.actionButtons)) && (items != null && items.length === 0) && context.state.emptyFeedback.isFeatured) {\r\n <smz-data-info\r\n [image]=\"context.state.emptyFeedback.image\"\r\n [message]=\"context.state.emptyFeedback.message\"\r\n [callbackInfo]=\"context.state.emptyFeedback.extraInfo\"\r\n [actions]=\"context.state.emptyFeedback.actionButtons\">\r\n <ng-template pTemplate=\"actions\">\r\n <ng-container *ngTemplateOutlet=\"emptyActionsTemplate; context: { $implicit: {} }\"></ng-container>\r\n </ng-template>\r\n </smz-data-info>\r\n } @else {\r\n <ng-container *ngVar=\"state.source?.items$ != null ? (state.source.items$ | async) : null as observableSource\">\r\n <ng-container *ngVar=\"state.source?.signalItems != null ? state.source.signalItems() : null as signalSource\">\r\n @if (((observableSource ?? signalSource ?? items) | cloneTableItems : context: tableKey: context.state.rowExpansion.sincronize); as clonedData) {\r\n <p-table #dt\r\n dataKey=\"id\"\r\n editMode=\"row\"\r\n [stripedRows]=\"context.state.styles.striped\"\r\n [value]=\"clonedData.items\"\r\n [(selection)]=\"selectedItems\"\r\n [tableStyleClass]=\"context.state.styles.tableStyleClass\"\r\n [styleClass]=\"'p-datatable-smz-ui-table' + (context.state.styles.showGrid ? ' p-datatable-gridlines' : '') + (context.state.styles.size === 'extra-small' ? ' p-datatable-xs' : '') + (context.state.styles.size === 'small' ? ' p-datatable-sm' : '') + (context.state.styles.size === 'large' ? ' p-datatable-lg' : '')\"\r\n [rowHover]=\"context.state.actions.rowBehavior.hoverable\"\r\n [rows]=\"context.state.pagination.rows\"\r\n [showCurrentPageReport]=\"context.state.pagination.pageReport.isVisible\"\r\n [rowsPerPageOptions]=\"context.state.pagination.rowsPerPageOptions\"\r\n [loading]=\"loading\"\r\n [paginator]=\"context.state.pagination.isVisible\"\r\n paginatorDropdownAppendTo=\"body\"\r\n [currentPageReportTemplate]=\"context.state.locale.paginator.template\"\r\n [sortField]=\"context.state.sort.field\"\r\n [sortMode]=\"context.state.sort.mode\"\r\n [sortOrder]=\"context.state.sort.order\"\r\n [multiSortMeta]=\"context.state.sort.multiSortMeta\"\r\n [scrollable]=\"context.state.viewport.scrollable\"\r\n [scrollHeight]=\"context.state.viewport.scrollHeight\"\r\n [filterDelay]=\"0\"\r\n [globalFilterFields]=\"context.globalFilter\"\r\n [columns]=\"context.visibleColumns\"\r\n [frozenColumns]=\"context.frozenColumns\"\r\n [frozenWidth]=\"context.state.frozen.isEnabled ? context.state.frozen.width : null\"\r\n [resizableColumns]=\"context.state.viewport.resizableColumns\"\r\n [columnResizeMode]=\"context.state.viewport.columnResizeMode\"\r\n (onPage)=\"onPage($event)\"\r\n (onFilter)=\"onFilter($event)\"\r\n (selectionChange)=\"emitSelection($event)\"\r\n >\r\n @if (context.state.caption.isVisible) {\r\n <ng-template pTemplate=\"caption\">\r\n <div class=\"grid grid-nogutter items-center gap-2\" [ngClass]=\"'justify-' + context.state.caption.toolbarAlignment\">\r\n @if (context.state.caption.title != null) {\r\n <div class=\"col database-title\" [innerHTML]=\"context.state.caption.title\"></div>\r\n }\r\n <ng-container *ngTemplateOutlet=\"captionTemplate; context: { $implicit: dt }\"></ng-container>\r\n <smz-table-caption-buttons [buttons]=\"context.state.caption.buttons\"></smz-table-caption-buttons>\r\n @if (context.state.caption.exportToPdf.isButtonVisible) {\r\n <button pButton [label]=\"context.state.locale.exportToPdf.label\" class=\"p-button-outlined\" icon=\"fa-solid fa-file-pdf\" (click)=\"exportToPdf(context, clonedData.items)\" [disabled]=\"clonedData.showSkeleton\"></button>\r\n }\r\n @if (context.state.caption.exportToExcel.isButtonVisible) {\r\n <button pButton [label]=\"context.state.locale.exportToExcel.label\" class=\"p-button-outlined\" icon=\"fa-solid fa-file-excel\" (click)=\"exportToExcel(table, context, clonedData.items)\" [disabled]=\"clonedData.showSkeleton\"></button>\r\n }\r\n @if (context.state.editable.creation.isButtonVisible) {\r\n <button pButton [label]=\"context.state.editable.creation.buttonLabel\" class=\"p-button-outlined\" icon=\"fa-solid fa-plus\" (click)=\"editableService.onRowCreateInit(table, context.columns)\" [disabled]=\"clonedData.showSkeleton || editableService.isEditing || editableService.isCreating || context.state.editable.creation.isButtonDisabled\"></button>\r\n }\r\n @if (context.state.caption.rowSelection.isButtonVisible) {\r\n <button pButton [label]=\"context.state.locale.rowSelection.label\" class=\"p-button-outlined\" icon=\"fa-solid fa-check-double\" (click)=\"onRowSelection(context)\" [disabled]=\"clonedData.showSkeleton\"></button>\r\n }\r\n @if (context.state.caption.clearFilters.isButtonVisible) {\r\n <button pButton [label]=\"context.state.locale.clearFilters.label\" class=\"p-button-outlined\" icon=\"pi pi-filter-slash\" (click)=\"clear(table, context)\" [disabled]=\"clonedData.showSkeleton\"></button>\r\n }\r\n @if (context.state.caption.columnVisibility.showDropdownSelector) {\r\n <p-multiSelect\r\n #columnMultiselect\r\n class=\"ml-2 col-12 md:col-2\"\r\n styleClass=\"w-full\"\r\n [options]=\"context.hideableColumns\"\r\n [(ngModel)]=\"selectedColumns\"\r\n [placeholder]=\"context.state.locale.columnVisibility.placeholder\"\r\n [selectedItemsLabel]=\"context.state.locale.columnVisibility.selectedItemsLabel\"\r\n optionLabel=\"name\"\r\n dataKey=\"field\"\r\n optionLabel=\"header\"\r\n [filter]=\"true\"\r\n (onPanelHide)=\"updateColumnsVisibility(true)\"\r\n [pTooltip]=\"context.state.locale.columnVisibility.pTooltip\">\r\n </p-multiSelect>\r\n }\r\n @if (context.state.caption.globalFilter.isVisible) {\r\n <p-iconfield class=\"col-12\" [ngClass]=\"{ 'md:col-2': !context.state.caption.globalFilter.expanded }\">\r\n <p-inputicon styleClass=\"pi pi-search\" />\r\n <input #inputGlobal [(ngModel)]=\"globalSearchInput\" pInputText type=\"text\" styleClass=\"database-global-search\" (input)=\"updateGlobalFilter(inputGlobal.value)\" [disabled]=\"clonedData.showSkeleton\" [placeholder]=\"context.state.locale.globalFilter.placeholder\" />\r\n </p-iconfield>\r\n }\r\n </div>\r\n @if (toolbarTemplate != null) {\r\n <div class=\"grid grid-nogutter items-center mt-2\" [ngClass]=\"'justify-' + context.state.caption.toolbarAlignment\">\r\n <ng-container *ngTemplateOutlet=\"toolbarTemplate; context: { $implicit: dt }\"></ng-container>\r\n </div>\r\n }\r\n </ng-template>\r\n }\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr [ngClass]=\"{ 'invisible-header': !context.state.header.isVisible }\">\r\n @if (context.state.caption.rowSelection.isEnabled) {\r\n <th [ngStyle]=\"context.state.caption.rowSelection.ngStyle\">\r\n @if (!context.state.actions.batchActions.isVisible) {\r\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\r\n }\r\n </th>\r\n }\r\n @if (context.state.rowExpansion.isEnabled) {\r\n <th [ngStyle]=\"context.state.rowExpansion.ngStyle\"></th>\r\n }\r\n @for (col of columns; track col) {\r\n @if (context.state.viewport.resizableColumns) {\r\n @if (col.isOrderable) {\r\n <th [pSortableColumn]=\"col.sortField\" pResizableColumn [ngStyle]=\"col.content.ngStyle\" [ngClass]=\"col.headerStyleClass\">\r\n <ng-container *ngTemplateOutlet=\"headerContent\"></ng-container>\r\n </th>\r\n }\r\n @if (!col.isOrderable) {\r\n <th pResizableColumn [ngStyle]=\"col.content.ngStyle\" [ngClass]=\"col.headerStyleClass\">\r\n <ng-container *ngTemplateOutlet=\"headerContent\"></ng-container>\r\n </th>\r\n }\r\n } @else {\r\n @if (col.isOrderable) {\r\n <th [pSortableColumn]=\"col.sortField\" [ngStyle]=\"col.content.ngStyle\" [ngClass]=\"col.headerStyleClass\">\r\n <ng-container *ngTemplateOutlet=\"headerContent\"></ng-container>\r\n </th>\r\n }\r\n @if (!col.isOrderable) {\r\n <th [ngStyle]=\"col.content.ngStyle\" [ngClass]=\"col.headerStyleClass\">\r\n <ng-container *ngTemplateOutlet=\"headerContent\"></ng-container>\r\n </th>\r\n }\r\n }\r\n <ng-template #headerContent>\r\n <div class=\"flex justify-start items-center\">\r\n <span class=\"mr-1\">{{ col.header }}</span>\r\n @if (col.showHeaderActions) {\r\n <smz-table-header-actions clickStopPropagation class=\"ml-1 mt-1\" [col]=\"col\"></smz-table-header-actions>\r\n }\r\n @if (!clonedData.showSkeleton && col.isOrderable) {\r\n <p-sortIcon [field]=\"col.sortField\"></p-sortIcon>\r\n }\r\n @if (!clonedData.showSkeleton) {\r\n @switch (col.filter.type) {\r\n @case (filterTypes.currency) {\r\n <smz-column-filter type=\"numeric\" currency=\"BRL\" [field]=\"col.filterField\"></smz-column-filter>\r\n }\r\n @case (filterTypes.numeric) {\r\n <smz-column-filter type=\"numeric\" [field]=\"col.filterField\"></smz-column-filter>\r\n }\r\n @case (filterTypes.date) {\r\n <smz-column-filter type=\"date\" [field]=\"col.filterField\" [showTime]=\"col.filter.showTime\"></smz-column-filter>\r\n }\r\n @case (filterTypes.text) {\r\n <smz-column-filter type=\"text\" [field]=\"col.filterField\"></smz-column-filter>\r\n }\r\n @case (filterTypes.boolean) {\r\n <smz-column-filter type=\"boolean\" [field]=\"col.filterField\"></smz-column-filter>\r\n }\r\n @case (filterTypes.dropdown) {\r\n @if (col.filterField | filterObject; as filterField) {\r\n <smz-column-filter [field]=\"filterField + '.id'\" matchMode=\"dropdown\" [showMatchModes]=\"false\" [showOperator]=\"false\" [showAddButton]=\"false\">\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"px-3 pt-3 pb-0\">\r\n <span class=\"p-text-bold\">{{ col.header }}</span>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"filter\" let-value let-filter=\"filter\">\r\n <p-select appendTo=\"body\" [ngModel]=\"value\" [options]=\"(clonedData.items != null ? clonedData.items : []) | uniqueFilter : filterField + '.id' : filterField : null : 'name' : false\" [placeholder]=\"context.state.locale.dropdownFilter.placeholder\" (onChange)=\"filter($event.value)\" optionLabel=\"name\" dataKey=\"id\"></p-select>\r\n </ng-template>\r\n </smz-column-filter>\r\n }\r\n }\r\n @case (filterTypes.multiselect) {\r\n @if (col.filterField | filterObject; as filterField) {\r\n <smz-column-filter [field]=\"filterField\" matchMode=\"in\" [showMatchModes]=\"false\" [showOperator]=\"false\" [showAddButton]=\"false\">\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"px-3 pt-3 pb-0\">\r\n <span class=\"p-text-bold\">{{ col.header }}</span>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"filter\" let-value let-filter=\"filter\">\r\n <p-multiSelect [ngModel]=\"value\" [options]=\"(clonedData.items != null ? clonedData.items : []) | uniqueFilter : filterField + '.id' : filterField : null : 'name' : false\" [placeholder]=\"context.state.locale.dropdownFilter.placeholder\" (onChange)=\"filter($event.value)\" optionLabel=\"name\" dataKey=\"id\"></p-multiSelect>\r\n </ng-template>\r\n </smz-column-filter>\r\n }\r\n }\r\n @case (filterTypes.multiselect_array) {\r\n @if (col.filterField | filterObject; as filterField) {\r\n <smz-column-filter [field]=\"filterField\" matchMode=\"array-some\" [showMatchModes]=\"false\" [showOperator]=\"false\" [showAddButton]=\"false\">\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"px-3 pt-3 pb-0\">\r\n <span class=\"p-text-bold\">{{ col.header }}</span>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"filter\" let-value let-filter=\"filter\">\r\n <p-multiSelect [ngModel]=\"value\" [options]=\"(clonedData.items != null ? clonedData.items : []) | uniqueFilter : filterField + '.id' : filterField : null : 'name' : true\" [placeholder]=\"context.state.locale.dropdownFilter.placeholder\" (onChange)=\"filter($event.value)\" optionLabel=\"name\" dataKey=\"id\" [maxSelectedLabels]=\"2\" [selectedItemsLabel]=\"'{0}'\"></p-multiSelect>\r\n </ng-template>\r\n </smz-column-filter>\r\n }\r\n }\r\n @case (filterTypes.multiselect_string) {\r\n @if (col.filterField | filterObject; as filterField) {\r\n <smz-column-filter [field]=\"filterField\" matchMode=\"multiselectByString\" [showMatchModes]=\"false\" [showOperator]=\"false\" [showAddButton]=\"false\">\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"px-3 pt-3 pb-0\">\r\n <span class=\"p-text-bold\">{{ col.header }}</span>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"filter\" let-value let-filter=\"filter\">\r\n <p-multiSelect [ngModel]=\"value\" [options]=\"(clonedData.items != null ? clonedData.items : []) | uniqueFilter : filterField : filterField : null : true : false : false\" [placeholder]=\"context.state.locale.dropdownFilter.placeholder\" (onChange)=\"filter($event.value)\" [maxSelectedLabels]=\"2\" [selectedItemsLabel]=\"'{0}'\"></p-multiSelect>\r\n </ng-template>\r\n </smz-column-filter>\r\n }\r\n }\r\n }\r\n }\r\n @if (context.state.caption.columnVisibility.showColumnHideButton) {\r\n <button pButton type=\"button\" icon=\"fa-solid fa-eye-slash\" class=\"p-button-rounded p-button-text p-button-plain\" (click)=\"hideColumn(col, context)\"></button>\r\n }\r\n </div>\r\n </ng-template>\r\n }\r\n @if (context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible|| context.state.editable.isEditable) {\r\n <th [ngStyle]=\"context.state.editable.isEditable ? context.state.editable.ngStyle : context.state.actions.customActions.ngStyle\"></th>\r\n }\r\n </tr>\r\n @if (context.state.actions.batchActions.isVisible) {\r\n <tr>\r\n <th [attr.colspan]=\"columns.length + ((context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible || context.state.editable.isEditable) ? 1 : 0) + (context.state.caption.rowSelection.isEnabled ? 1 : 0) + (context.state.rowExpansion.isEnabled ? 1 : 0)\"\r\n [ngStyle]=\"context.state.actions.customActions.ngStyle\" class=\"px-0\">\r\n <div class=\"grid grid-nogutter items-center justify-start\">\r\n <p-tableHeaderCheckbox class=\"mr-4\"></p-tableHeaderCheckbox>\r\n @if (selectedItems?.length > 0) {\r\n @for (batchItem of context.state.actions.batchActions.items; track batchItem) {\r\n @if (batchItem.visible) {\r\n <button pButton [label]=\"batchItem.label\" class=\"p-button-rounded p-button-text p-button-plain animate__animated animate__fadeIn\" [ngClass]=\"batchItem.styleClass\" [icon]=\"batchItem.icon\" (click)=\"batchItem.command(selectedItems); selectedItems = [];\" [disabled]=\"batchItem.disabled\" [pTooltip]=\"batchItem.tooltip\"></button>\r\n }\r\n }\r\n }\r\n </div>\r\n </th>\r\n </tr>\r\n }\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-item let-editing=\"editing\" let-rowIndex=\"rowIndex\" let-columns=\"columns\">\r\n <tr #editableRowElement\r\n [pEditableRow]=\"item\"\r\n tableItemAction\r\n [isClickable]=\"context.state.actions.rowBehavior.isClickable\"\r\n [callback]=\"context.state.actions.rowBehavior.clickCallback\"\r\n [expandRowOnClick]=\"context.state.actions.rowBehavior.expandRowOnClick\"\r\n [item]=\"item\"\r\n class=\"p-selectable-row\"\r\n [ngClass]=\"{ 'highlight-row': item?.id === state.actions.rowBehavior.highlights, 'preserve-in-small': state.actions.rowBehavior.preserveLayoutInSmallDevices }\"\r\n >\r\n @if (context.state.caption.rowSelection.isEnabled && !clonedData.showSkeleton) {\r\n <td\r\n clickStopPropagation\r\n class=\"{{ state.actions.rowBehavior.cellStyleClass }}\"\r\n [ngClass]=\"{ 'opacity-50 pointer-events-none': editableService.context[item.id]?.hasErrors || editableService.context[item.id]?.isLoading }\"\r\n [ngStyle]=\"context.state.caption.rowSelection.ngStyle\"\r\n >\r\n <p-tableCheckbox [value]=\"item\"></p-tableCheckbox>\r\n </td>\r\n }\r\n @if (context.state.rowExpansion.isEnabled && !clonedData.showSkeleton) {\r\n <td\r\n clickStopPropagation\r\n class=\"{{ state.actions.rowBehavior.cellStyleClass }}\"\r\n [ngClass]=\"{ 'opacity-50 pointer-events-none': editableService.context[item.id]?.hasErrors || editableService.context[item.id]?.isLoading, 'grid grid-nogutter justify-start items-center gap-2': context.state.rowExpansion.highlightNewItems && item._isNew }\"\r\n [ngStyle]=\"context.state.rowExpansion.ngStyle\"\r\n >\r\n <p-toggleButton [(ngModel)]=\"item._isExpanded\" [onIcon]=\"'fa-solid fa-chevron-down'\" [offIcon]=\"'fa-solid fa-chevron-right'\" (onChange)=\"item._isNew = false\"></p-toggleButton>\r\n @if (context.state.rowExpansion.highlightNewItems && item._isNew) {\r\n <div class=\"rounded bg-cyan-400 text-sm text-white px-2 py-0 smz-table-new-tag\" (click)=\"item._isNew = false\">{{ context.state.rowExpansion.highlightLabel }}</div>\r\n }\r\n </td>\r\n }\r\n @for (col of columns; track col) {\r\n @if (clonedData.showSkeleton) {\r\n <td class=\"{{ state.actions.rowBehavior.cellStyleClass }}\" [ngStyle]=\"col.content.ngStyle\"><p-skeleton width=\"100%\" height=\"1rem\"></p-skeleton></td>\r\n } @else {\r\n <td class=\"{{ state.actions.rowBehavior.cellStyleClass }}\" [ngClass]=\"{ 'opacity-50 pointer-events-none': editableService.context[item.id]?.hasErrors || editableService.context[item.id]?.isLoading }\" [ngStyle]=\"col.content.ngStyle\">\r\n <span class=\"p-column-title\">{{ col.header }}</span>\r\n <p-cellEditor>\r\n <!-- CELULAR COM EDITOR -->\r\n <ng-template pTemplate=\"input\">\r\n @switch (col.editable.type) {\r\n @case (editableTypes.none) {\r\n <smz-table-content class=\"cursor-default\" [ngClass]=\"col.content.contentStyleClass\" [col]=\"col\" [contentTypes]=\"contentTypes\" [item]=\"item\" [rowIndex]=\"rowIndex\" [contentTemplate]=\"contentTemplate\"></smz-table-content>\r\n }\r\n @case (editableTypes.custom) {\r\n <ng-container *ngTemplateOutlet=\"editableTemplate; context: { $implicit: item, col: col }\"></ng-container>\r\n }\r\n <!-- INPUT TEXT -->\r\n @case (editableTypes.text) {\r\n @if (editableService.context[item.id]?.form; as form) {\r\n @if (form.controls[col.editable.property]; as control) {\r\n <div class=\"relative w-full\">\r\n <input pInputText type=\"text\" [formControl]=\"$any(control)\" style=\"width: 100%;\">\r\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\r\n </div>\r\n }\r\n }\r\n }\r\n <!-- INPUT NUMBER -->\r\n @case (editableTypes.number) {\r\n @if (editableService.context[item.id]?.form; as form) {\r\n @if (form.controls[col.editable.property]; as control) {\r\n <div class=\"relative w-full\">\r\n <p-inputNumber\r\n *ngVar=\"col.editable.data as numberData\"\r\n [formControl]=\"$any(control)\"\r\n [mode]=\"numberData.mode\"\r\n [minFractionDigits]=\"numberData.minFractionDigits\"\r\n [maxFractionDigits]=\"numberData.maxFractionDigits\"\r\n [currency]=\"numberData.currency\"\r\n [useGrouping]=\"numberData.useGrouping\"\r\n [allowEmpty]=\"numberData.allowEmpty\"\r\n [showClear]=\"numberData.showClear\"\r\n [showButtons]=\"numberData.showButtons\"\r\n [prefix]=\"numberData.prefix\"\r\n [suffix]=\"numberData.suffix\">\r\n </p-inputNumber>\r\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\r\n </div>\r\n }\r\n }\r\n }\r\n <!-- INPUT SWITCH -->\r\n @case (editableTypes.switch) {\r\n @if (editableService.context[item.id]?.form; as form) {\r\n @if (form.controls[col.editable.property]; as control) {\r\n <div class=\"relative w-full\">\r\n <p-toggleswitch [formControl]=\"$any(control)\"></p-toggleswitch>\r\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\r\n </div>\r\n }\r\n }\r\n }\r\n <!-- INPUT TEXT AREA -->\r\n @case (editableTypes.area) {\r\n @if (editableService.context[item.id]?.form; as form) {\r\n @if (form.controls[col.editable.property]; as control) {\r\n <div class=\"relative w-full\">\r\n <textarea pInputTextarea type=\"text\" [formControl]=\"$any(control)\" [rows]=\"$any(col.editable.data).rows\" required style=\"width: 100%;\"></textarea>\r\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\r\n </div>\r\n }\r\n }\r\n }\r\n <!-- INPUT DROPDOWN -->\r\n @case (editableTypes.dropdown) {\r\n @if (editableService.context[item.id]?.form; as form) {\r\n @if (form.controls[col.editable.property]; as control) {\r\n <div class=\"relative w-full\">\r\n <p-select appendTo=\"body\" [formControl]=\"$any(control)\" styleClass=\"w-full\" [options]=\"col.editable.data | editableSource\" optionLabel=\"name\" dataKey=\"id\" [placeholder]=\"$any(col.editable.data).placeholder\" [showClear]=\"!col.editable.validatorsPreset?.isRequired\" [filter]=\"true\"></p-select>\r\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\r\n </div>\r\n }\r\n }\r\n }\r\n <!-- INPUT CALENDAR -->\r\n @case (editableTypes.calendar) {\r\n @if (editableService.context[item.id]?.form; as form) {\r\n @if (form.controls[col.editable.property]; as control) {\r\n <div class=\"relative w-full\">\r\n <p-datepicker [formControl]=\"$any(control)\" appendTo=\"body\" styleClass=\"w-full\" [ngClass]=\"{ 'pl-5': !control.valid }\"></p-datepicker>\r\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\r\n </div>\r\n }\r\n }\r\n }\r\n }\r\n </ng-template>\r\n <!-- CELULAR COM CONTE\u00DADO -->\r\n <ng-template pTemplate=\"output\">\r\n <smz-table-content\r\n [col]=\"col\"\r\n [pTooltip]=\"col.content.tooltip != null ? col.content.tooltip(item) : null\"\r\n tooltipPosition=\"left\"\r\n [ngClass]=\"col.content.contentStyleClass\" [contentTypes]=\"contentTypes\" [item]=\"item\" [rowIndex]=\"rowIndex\" [contentTemplate]=\"contentTemplate\">\r\n </smz-table-content>\r\n </ng-template>\r\n </p-cellEditor>\r\n </td>\r\n }\r\n }\r\n @if (context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible || context.state.editable.isEditable) {\r\n <td [ngStyle]=\"context.state.actions.customActions.ngStyle\" class=\"px-0\">\r\n <div class=\"grid grid-nogutter items-center justify-center\">\r\n @if (clonedData.showSkeleton) {\r\n <div class=\"w-full\">\r\n <p-skeleton width=\"100%\" height=\"1rem\"></p-skeleton>\r\n </div>\r\n } @else {\r\n <!-- SEM EDITAR -->\r\n @if (!editing) {\r\n @if (context.state.editable.update.isButtonVisible) {\r\n <button pButton type=\"button\" icon=\"pi pi-pencil\" (click)=\"editableService.onRowEditInit(item)\" class=\"p-button-rounded p-button-text mx-1\" [disabled]=\"editableService.isEditing || editableService.isCreating || context.state.editable.update.isButtonDisabled || (!context.state.editable.update.condition(item))\" pInitEditableRow></button>\r\n }\r\n @if (context.state.editable.remove.isButtonVisible) {\r\n <button pButton type=\"button\" icon=\"pi pi-trash\" (click)=\"editableService.onRowRemove($event, table, item)\" class=\"p-button-rounded p-button-text p-button-secondary mx-1\" [disabled]=\"editableService.isEditing || editableService.isCreating || context.state.editable.remove.isButtonDisabled || (!context.state.editable.remove.condition(item))\"></button>\r\n }\r\n }\r\n <!-- EDITANDO -->\r\n @if (editing) {\r\n @if (editableService.context[item.id]; as editableContext) {\r\n <!-- COM LOADING -->\r\n @if (editableContext.isLoading) {\r\n <button pButton type=\"button\" icon=\"fa-solid fa-rotate fa-spin\" [disabled]=\"true\" class=\"p-button-rounded p-button-text p-button-info mr-2\"></button>\r\n }\r\n <!-- SEM LOADING -->\r\n @if (!editableContext.isLoading) {\r\n <!-- EDITANDO -->\r\n @if (!editableContext.hasErrors) {\r\n <!-- CRIANDO -->\r\n @if (item._context?.isCreating) {\r\n <button pButton type=\"button\" icon=\"pi pi-check\" (click)=\"editableService.onRowCreateSave($event, table, editableRowElement, item)\" [disabled]=\"!editableContext.hasChanged || !editableService.context[item.id]?.form.valid\" class=\"p-button-rounded p-button-text p-button-success mr-2\"></button>\r\n <button pButton type=\"button\" icon=\"pi pi-times\" (click)=\"editableService.onRowCreateCancel($event, table, item)\" class=\"p-button-rounded p-button-text p-button-danger\"></button>\r\n }\r\n <!-- ATUALIZANDO -->\r\n @if (item._context?.isUpdating) {\r\n <button pButton type=\"button\" icon=\"pi pi-check\" (click)=\"editableService.onRowEditSave($event, table, editableRowElement, item)\" [disabled]=\"!editableContext.hasChanged || !editableService.context[item.id]?.form.valid\" class=\"p-button-rounded p-button-text p-button-success mr-2\"></button>\r\n <button pButton type=\"button\" icon=\"pi pi-times\" (click)=\"editableService.onRowEditCancel($event, table, item)\" class=\"p-button-rounded p-button-text p-button-danger\"></button>\r\n }\r\n }\r\n <!-- COM ERRORS -->\r\n @if (editableContext.hasErrors) {\r\n <p-overlayPanel #errorsOverlay appendTo=\"body\" [style]=\"{ width: '450px' }\">\r\n <ng-template pTemplate>\r\n <div [innerHtml]=\"editableContext.errors | contentErrors\"></div>\r\n </ng-template>\r\n </p-overlayPanel>\r\n <button pButton type=\"button\" icon=\"fas fa-exclamation-triangle\" [disabled]=\"false\" class=\"p-button-sm p-button-rounded p-button-text p-button-danger mr-2\" (click)=\"errorsOverlay.toggle($event)\"></button>\r\n <!-- CRIANDO -->\r\n @if (item._context?.isCreating) {\r\n <button pButton type=\"button\" icon=\"pi pi-times\" (click)=\"editableService.onRowCreateCancel($event, table, item)\" class=\"p-button-sm p-button-rounded p-button-text p-button-danger\"></button>\r\n }\r\n <!-- ATUALIZANDO -->\r\n @if (item._context?.isUpdating) {\r\n <button pButton type=\"button\" icon=\"pi pi-times\" (click)=\"editableService.onRowEditCancel($event, table, item)\" class=\"p-button-sm p-button-rounded p-button-text p-button-danger\"></button>\r\n }\r\n }\r\n }\r\n }\r\n }\r\n <!-- CUSTOM MENU -->\r\n @if (context.state.actions.customActions.isVisible && !editing) {\r\n <ng-container *ngTemplateOutlet=\"actionsTemplate; context: { $implicit: item }\"></ng-container>\r\n }\r\n <!-- MENU -->\r\n @if (context.state.actions.menu.isVisible && !editing) {\r\n <smz-menu [callback]=\"context.state.actions.menu.callback\" [items]=\"context.state.actions.menu.items\" [data]=\"item\" [behavior]=\"context.state.actions.menu.behavior\" [ngClass]=\"{ 'ml-2': context.state.actions.customActions.isVisible }\" [icon]=\"context.state.actions.menu.styles.icon\" [styleClass]=\"context.state.actions.menu.styles.styleClass\" [buttonClass]=\"context.state.actions.menu.styles.buttonClass\"></smz-menu>\r\n }\r\n }\r\n </div>\r\n </td>\r\n }\r\n </tr>\r\n @if (item?._isExpanded) {\r\n <tr>\r\n <td [attr.colspan]=\"columns.length + ((context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible || context.state.editable.isEditable) ? 1 : 0) + (context.state.caption.rowSelection.isEnabled ? 1 : 0) + (context.state.rowExpansion.isEnabled ? 1 : 0)\">\r\n <ng-container *ngTemplateOutlet=\"rowContentTemplate; context: { $implicit: item }\"></ng-container>\r\n </td>\r\n </tr>\r\n }\r\n </ng-template>\r\n <ng-template pTemplate=\"emptymessage\" let-columns>\r\n <tr>\r\n <td [attr.colspan]=\"columns.length + ((context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible || context.state.editable.isEditable) ? 1 : 0) + (context.state.caption.rowSelection.isEnabled ? 1 : 0) + (context.state.rowExpansion.isEnabled ? 1 : 0)\" [ngStyle]=\"{ 'text-align': 'center' }\">\r\n <div [innerHtml]=\"context.state.emptyFeedback.message\"></div>\r\n @if (context.state.caption.clearFilters.isButtonVisible && hasFilters()) {\r\n <button pButton [label]=\"context.state.locale.clearFilters.label\" class=\"p-button-outlined mt-3\" icon=\"pi pi-filter-slash\" (click)=\"clear(table, context)\"></button>\r\n }\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n }\r\n </ng-container>\r\n </ng-container>\r\n }\r\n} @else {\r\n @if (emptyStateTemplate != null) {\r\n <ng-container *ngTemplateOutlet=\"emptyStateTemplate; context: { $implicit: {} }\"></ng-container>\r\n }\r\n}\r\n\r\n", dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i1$7.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i8.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i8.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "directive", type: i8.ResizableColumn, selector: "[pResizableColumn]", inputs: ["pResizableColumnDisabled"] }, { kind: "component", type: i8.CellEditor, selector: "p-cellEditor" }, { kind: "component", type: i8.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i8.TableCheckbox, selector: "p-tableCheckbox", inputs: ["value", "disabled", "required", "index", "inputId", "name", "ariaLabel"] }, { kind: "component", type: i8.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "directive", type: i8.EditableRow, selector: "[pEditableRow]", inputs: ["pEditableRow", "pEditableRowDisabled"] }, { kind: "directive", type: i8.InitEditableRow, selector: "[pInitEditableRow]" }, { kind: "directive", type: i4.ButtonDirective, selector: "[pButton]", inputs: ["ptButtonDirective", "pButtonPT", "pButtonUnstyled", "hostName", "text", "plain", "raised", "size", "outlined", "rounded", "iconPos", "loadingIcon", "fluid", "label", "icon", "loading", "buttonProps", "severity"] }, { kind: "directive", type: i2.InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "component", type: i3$5.MultiSelect, selector: "p-multiSelect, p-multiselect, p-multi-select", inputs: ["id", "ariaLabel", "styleClass", "panelStyle", "panelStyleClass", "inputId", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "dataKey", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "chipIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "loading", "virtualScrollItemSize", "loadingIcon", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "showClear", "autofocus", "placeholder", "options", "filterValue", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus", "highlightOnSelect", "size", "variant", "fluid", "appendTo", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "component", type: i4$1.Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "component", type: i1$2.DatePicker, selector: "p-datePicker, p-datepicker, p-date-picker", inputs: ["iconDisplay", "styleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "readonlyInput", "shortYearCutoff", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "minDate", "maxDate", "disabledDates", "disabledDays", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "view", "defaultDate", "appendTo", "motionOptions"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "directive", type: i1$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: TableItemActionsDirective, selector: "[tableItemAction]", inputs: ["isClickable", "item", "callback", "expandRowOnClick"] }, { kind: "directive", type: ClickStopPropagationDirective, selector: "[clickStopPropagation]" }, { kind: "component", type: SmzDataInfoComponent, selector: "smz-data-info", inputs: ["image", "message", "actions", "callbackInfo", "callbackLabel"], outputs: ["clicked"] }, { kind: "directive", type: i1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "showOnEllipsis", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }, { kind: "component", type: i19.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "directive", type: i2$4.Textarea, selector: "[pTextarea], [pInputTextarea]", inputs: ["pTextareaPT", "pTextareaUnstyled", "autoResize", "pSize", "variant", "fluid", "invalid"], outputs: ["onResize"] }, { kind: "component", type: OverlayPanel, selector: "p-overlayPanel", inputs: ["dismissable", "showCloseIcon", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "mousePosition", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { kind: "directive", type: i1$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i2$3.ToggleSwitch, selector: "p-toggleswitch, p-toggleSwitch, p-toggle-switch", inputs: ["styleClass", "tabindex", "inputId", "readonly", "trueValue", "falseValue", "ariaLabel", "size", "ariaLabelledBy", "autofocus"], outputs: ["onChange"] }, { kind: "component", type: i3$3.InputNumber, selector: "p-inputNumber, p-inputnumber, p-input-number", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "placeholder", "tabindex", "title", "ariaLabelledBy", "ariaDescribedBy", "ariaLabel", "ariaRequired", "autocomplete", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "component", type: SmzMenuComponent, selector: "smz-menu", inputs: ["items", "callback", "data", "buttonClass", "styleClass", "icon", "behavior"] }, { kind: "component", type: i25.ToggleButton, selector: "p-toggleButton, p-togglebutton, p-toggle-button", inputs: ["onLabel", "offLabel", "onIcon", "offIcon", "ariaLabel", "ariaLabelledBy", "styleClass", "inputId", "tabindex", "iconPos", "autofocus", "size", "allowEmpty", "fluid"], outputs: ["onChange"] }, { kind: "directive", type: NgVar, selector: "[ngVar]", inputs: ["ngVar"] }, { kind: "component", type: i27.IconField, selector: "p-iconfield, p-iconField, p-icon-field", inputs: ["hostName", "iconPosition", "styleClass"] }, { kind: "component", type: i28.InputIcon, selector: "p-inputicon, p-inputIcon", inputs: ["hostName", "styleClass"] }, { kind: "component", type: SmzColumnFilterComponent, selector: "smz-column-filter", inputs: ["currency", "display", "field", "matchMode", "showAddButton", "showMatchModes", "showOperator", "type", "showTime"] }, { kind: "component", type: SmzTableValidationMessagesComponent, selector: "smz-table-validation-messages", inputs: ["errors", "messages", "isFormInvalid", "isFormDirty"] }, { kind: "component", type: SmzTableContentComponent, selector: "smz-table-content", inputs: ["col", "contentTypes", "item", "rowIndex", "contentTemplate"] }, { kind: "component", type: SmzTableCaptionButtonsComponent, selector: "smz-table-caption-buttons", inputs: ["buttons"] }, { kind: "component", type: SmzTableHeaderActionsComponent, selector: "smz-table-header-actions", inputs: ["col"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: UniqueFilterPipe, name: "uniqueFilter" }, { kind: "pipe", type: SmzTableContextPipe, name: "tableContext" }, { kind: "pipe", type: SmzFilterObjectPipe, name: "filterObject" }, { kind: "pipe", type: SmzCloneTableItemsPipe, name: "cloneTableItems" }, { kind: "pipe", type: SmzEditableSourcePipe, name: "editableSource" }, { kind: "pipe", type: SmzContentErrorsPipe, name: "contentErrors" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
17259
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: SmzTableComponent, isStandalone: false, selector: "smz-ui-table", inputs: { state: "state", items: "items", loading: "loading" }, outputs: { selectionChange: "selectionChange", filterChange: "filterChange", columnVisibilityChange: "columnVisibilityChange", create: "create", update: "update", delete: "delete" }, providers: [TableEditableService, TableFormsService], queries: [{ propertyName: "templates", predicate: PrimeTemplate }], viewQueries: [{ propertyName: "table", first: true, predicate: ["dt"], descendants: true }, { propertyName: "columnMultiselect", first: true, predicate: ["columnMultiselect"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "@if (state | tableContext; as context) {\r\n @if ((context.state.emptyFeedback != null && (context.state.emptyFeedback.extraInfo || context.state.emptyFeedback.image || context.state.emptyFeedback.actionButtons)) && (items != null && items.length === 0) && context.state.emptyFeedback.isFeatured) {\r\n <smz-data-info\r\n [image]=\"context.state.emptyFeedback.image\"\r\n [message]=\"context.state.emptyFeedback.message\"\r\n [callbackInfo]=\"context.state.emptyFeedback.extraInfo\"\r\n [actions]=\"context.state.emptyFeedback.actionButtons\">\r\n <ng-template pTemplate=\"actions\">\r\n <ng-container *ngTemplateOutlet=\"emptyActionsTemplate; context: { $implicit: {} }\"></ng-container>\r\n </ng-template>\r\n </smz-data-info>\r\n } @else {\r\n <ng-container *ngVar=\"state.source?.items$ != null ? (state.source.items$ | async) : null as observableSource\">\r\n <ng-container *ngVar=\"state.source?.signalItems != null ? state.source.signalItems() : null as signalSource\">\r\n @if (((observableSource ?? signalSource ?? items) | cloneTableItems : context: tableKey: context.state.rowExpansion.sincronize); as clonedData) {\r\n <p-table #dt\r\n dataKey=\"id\"\r\n editMode=\"row\"\r\n [stripedRows]=\"context.state.styles.striped\"\r\n [value]=\"clonedData.items\"\r\n [(selection)]=\"selectedItems\"\r\n [tableStyleClass]=\"context.state.styles.tableStyleClass\"\r\n [styleClass]=\"'p-datatable-smz-ui-table' + (context.state.styles.showGrid ? ' p-datatable-gridlines' : '') + (context.state.styles.size === 'extra-small' ? ' p-datatable-xs' : '') + (context.state.styles.size === 'small' ? ' p-datatable-sm' : '') + (context.state.styles.size === 'large' ? ' p-datatable-lg' : '')\"\r\n [rowHover]=\"context.state.actions.rowBehavior.hoverable\"\r\n [rows]=\"context.state.pagination.rows\"\r\n [showCurrentPageReport]=\"context.state.pagination.pageReport.isVisible\"\r\n [rowsPerPageOptions]=\"context.state.pagination.rowsPerPageOptions\"\r\n [loading]=\"loading\"\r\n [paginator]=\"context.state.pagination.isVisible\"\r\n paginatorDropdownAppendTo=\"body\"\r\n [currentPageReportTemplate]=\"context.state.locale.paginator.template\"\r\n [sortField]=\"context.state.sort.field\"\r\n [sortMode]=\"context.state.sort.mode\"\r\n [sortOrder]=\"context.state.sort.order\"\r\n [multiSortMeta]=\"context.state.sort.multiSortMeta\"\r\n [scrollable]=\"context.state.viewport.scrollable\"\r\n [scrollHeight]=\"context.state.viewport.scrollHeight\"\r\n [filterDelay]=\"0\"\r\n [globalFilterFields]=\"context.globalFilter\"\r\n [columns]=\"context.visibleColumns\"\r\n [frozenColumns]=\"context.frozenColumns\"\r\n [frozenWidth]=\"context.state.frozen.isEnabled ? context.state.frozen.width : null\"\r\n [resizableColumns]=\"context.state.viewport.resizableColumns\"\r\n [columnResizeMode]=\"context.state.viewport.columnResizeMode\"\r\n (onPage)=\"onPage($event)\"\r\n (onFilter)=\"onFilter($event)\"\r\n (selectionChange)=\"emitSelection($event)\"\r\n >\r\n @if (context.state.caption.isVisible) {\r\n <ng-template pTemplate=\"caption\">\r\n <div class=\"grid grid-nogutter items-center gap-2\" [ngClass]=\"'justify-' + context.state.caption.toolbarAlignment\">\r\n @if (context.state.caption.title != null) {\r\n <div class=\"col database-title\" [innerHTML]=\"context.state.caption.title\"></div>\r\n }\r\n <ng-container *ngTemplateOutlet=\"captionTemplate; context: { $implicit: dt }\"></ng-container>\r\n <smz-table-caption-buttons [buttons]=\"context.state.caption.buttons\"></smz-table-caption-buttons>\r\n @if (context.state.caption.exportToPdf.isButtonVisible) {\r\n <button pButton [label]=\"context.state.locale.exportToPdf.label\" class=\"p-button-outlined\" icon=\"fa-solid fa-file-pdf\" (click)=\"exportToPdf(context, clonedData.items)\" [disabled]=\"clonedData.showSkeleton\"></button>\r\n }\r\n @if (context.state.caption.exportToExcel.isButtonVisible) {\r\n <button pButton [label]=\"context.state.locale.exportToExcel.label\" class=\"p-button-outlined\" icon=\"fa-solid fa-file-excel\" (click)=\"exportToExcel(table, context, clonedData.items)\" [disabled]=\"clonedData.showSkeleton\"></button>\r\n }\r\n @if (context.state.editable.creation.isButtonVisible) {\r\n <button pButton [label]=\"context.state.editable.creation.buttonLabel\" class=\"p-button-outlined\" icon=\"fa-solid fa-plus\" (click)=\"editableService.onRowCreateInit(table, context.columns)\" [disabled]=\"clonedData.showSkeleton || editableService.isEditing || editableService.isCreating || context.state.editable.creation.isButtonDisabled\"></button>\r\n }\r\n @if (context.state.caption.rowSelection.isButtonVisible) {\r\n <button pButton [label]=\"context.state.locale.rowSelection.label\" class=\"p-button-outlined\" icon=\"fa-solid fa-check-double\" (click)=\"onRowSelection(context)\" [disabled]=\"clonedData.showSkeleton\"></button>\r\n }\r\n @if (context.state.caption.clearFilters.isButtonVisible) {\r\n <button pButton [label]=\"context.state.locale.clearFilters.label\" class=\"p-button-outlined\" icon=\"pi pi-filter-slash\" (click)=\"clear(table, context)\" [disabled]=\"clonedData.showSkeleton\"></button>\r\n }\r\n @if (context.state.caption.columnVisibility.showDropdownSelector) {\r\n <p-multiSelect\r\n #columnMultiselect\r\n class=\"ml-2 col-12 md:col-2\"\r\n styleClass=\"w-full\"\r\n [options]=\"context.hideableColumns\"\r\n [(ngModel)]=\"selectedColumns\"\r\n [placeholder]=\"context.state.locale.columnVisibility.placeholder\"\r\n [selectedItemsLabel]=\"context.state.locale.columnVisibility.selectedItemsLabel\"\r\n optionLabel=\"name\"\r\n dataKey=\"field\"\r\n optionLabel=\"header\"\r\n [filter]=\"true\"\r\n (onPanelHide)=\"updateColumnsVisibility(true)\"\r\n [pTooltip]=\"context.state.locale.columnVisibility.pTooltip\">\r\n </p-multiSelect>\r\n }\r\n @if (context.state.caption.globalFilter.isVisible) {\r\n <p-iconfield class=\"col-12\" [ngClass]=\"{ 'md:col-2': !context.state.caption.globalFilter.expanded }\">\r\n <p-inputicon styleClass=\"pi pi-search\" />\r\n <input #inputGlobal [(ngModel)]=\"globalSearchInput\" pInputText type=\"text\" styleClass=\"database-global-search\" (input)=\"updateGlobalFilter(inputGlobal.value)\" [disabled]=\"clonedData.showSkeleton\" [placeholder]=\"context.state.locale.globalFilter.placeholder\" />\r\n </p-iconfield>\r\n }\r\n </div>\r\n @if (toolbarTemplate != null) {\r\n <div class=\"grid grid-nogutter items-center mt-2\" [ngClass]=\"'justify-' + context.state.caption.toolbarAlignment\">\r\n <ng-container *ngTemplateOutlet=\"toolbarTemplate; context: { $implicit: dt }\"></ng-container>\r\n </div>\r\n }\r\n </ng-template>\r\n }\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr [ngClass]=\"{ 'invisible-header': !context.state.header.isVisible }\">\r\n @if (context.state.caption.rowSelection.isEnabled) {\r\n <th [ngStyle]=\"context.state.caption.rowSelection.ngStyle\">\r\n @if (!context.state.actions.batchActions.isVisible) {\r\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\r\n }\r\n </th>\r\n }\r\n @if (context.state.rowExpansion.isEnabled) {\r\n <th [ngStyle]=\"context.state.rowExpansion.ngStyle\"></th>\r\n }\r\n @for (col of columns; track col) {\r\n @if (context.state.viewport.resizableColumns) {\r\n @if (col.isOrderable) {\r\n <th [pSortableColumn]=\"col.sortField\" pResizableColumn [ngStyle]=\"col.content.ngStyle\" [ngClass]=\"col.headerStyleClass\">\r\n <ng-container *ngTemplateOutlet=\"headerContent\"></ng-container>\r\n </th>\r\n }\r\n @if (!col.isOrderable) {\r\n <th pResizableColumn [ngStyle]=\"col.content.ngStyle\" [ngClass]=\"col.headerStyleClass\">\r\n <ng-container *ngTemplateOutlet=\"headerContent\"></ng-container>\r\n </th>\r\n }\r\n } @else {\r\n @if (col.isOrderable) {\r\n <th [pSortableColumn]=\"col.sortField\" [ngStyle]=\"col.content.ngStyle\" [ngClass]=\"col.headerStyleClass\">\r\n <ng-container *ngTemplateOutlet=\"headerContent\"></ng-container>\r\n </th>\r\n }\r\n @if (!col.isOrderable) {\r\n <th [ngStyle]=\"col.content.ngStyle\" [ngClass]=\"col.headerStyleClass\">\r\n <ng-container *ngTemplateOutlet=\"headerContent\"></ng-container>\r\n </th>\r\n }\r\n }\r\n <ng-template #headerContent>\r\n <div class=\"flex justify-start items-center\">\r\n <span class=\"mr-1\">{{ col.header }}</span>\r\n @if (col.showHeaderActions) {\r\n <smz-table-header-actions clickStopPropagation class=\"ml-1 mt-1\" [col]=\"col\"></smz-table-header-actions>\r\n }\r\n @if (!clonedData.showSkeleton && col.isOrderable) {\r\n <p-sortIcon [field]=\"col.sortField\"></p-sortIcon>\r\n }\r\n @if (!clonedData.showSkeleton) {\r\n @switch (col.filter.type) {\r\n @case (filterTypes.currency) {\r\n <smz-column-filter type=\"numeric\" currency=\"BRL\" [field]=\"col.filterField\"></smz-column-filter>\r\n }\r\n @case (filterTypes.numeric) {\r\n <smz-column-filter type=\"numeric\" [field]=\"col.filterField\"></smz-column-filter>\r\n }\r\n @case (filterTypes.date) {\r\n <smz-column-filter type=\"date\" [field]=\"col.filterField\" [showTime]=\"col.filter.showTime\"></smz-column-filter>\r\n }\r\n @case (filterTypes.text) {\r\n <smz-column-filter type=\"text\" [field]=\"col.filterField\"></smz-column-filter>\r\n }\r\n @case (filterTypes.boolean) {\r\n <smz-column-filter type=\"boolean\" [field]=\"col.filterField\"></smz-column-filter>\r\n }\r\n @case (filterTypes.dropdown) {\r\n @if (col.filterField | filterObject; as filterField) {\r\n <smz-column-filter [field]=\"filterField + '.id'\" matchMode=\"dropdown\" [showMatchModes]=\"false\" [showOperator]=\"false\" [showAddButton]=\"false\">\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"px-3 pt-3 pb-0\">\r\n <span class=\"p-text-bold\">{{ col.header }}</span>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"filter\" let-value let-filter=\"filter\">\r\n <p-select appendTo=\"body\" [ngModel]=\"value\" [options]=\"(clonedData.items != null ? clonedData.items : []) | uniqueFilter : filterField + '.id' : filterField : null : 'name' : false\" [placeholder]=\"context.state.locale.dropdownFilter.placeholder\" (onChange)=\"filter($event.value)\" optionLabel=\"name\" dataKey=\"id\"></p-select>\r\n </ng-template>\r\n </smz-column-filter>\r\n }\r\n }\r\n @case (filterTypes.multiselect) {\r\n @if (col.filterField | filterObject; as filterField) {\r\n <smz-column-filter [field]=\"filterField\" matchMode=\"in\" [showMatchModes]=\"false\" [showOperator]=\"false\" [showAddButton]=\"false\">\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"px-3 pt-3 pb-0\">\r\n <span class=\"p-text-bold\">{{ col.header }}</span>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"filter\" let-value let-filter=\"filter\">\r\n <p-multiSelect [ngModel]=\"value\" [options]=\"(clonedData.items != null ? clonedData.items : []) | uniqueFilter : filterField + '.id' : filterField : null : 'name' : false\" [placeholder]=\"context.state.locale.dropdownFilter.placeholder\" (onChange)=\"filter($event.value)\" optionLabel=\"name\" dataKey=\"id\"></p-multiSelect>\r\n </ng-template>\r\n </smz-column-filter>\r\n }\r\n }\r\n @case (filterTypes.multiselect_array) {\r\n @if (col.filterField | filterObject; as filterField) {\r\n <smz-column-filter [field]=\"filterField\" matchMode=\"array-some\" [showMatchModes]=\"false\" [showOperator]=\"false\" [showAddButton]=\"false\">\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"px-3 pt-3 pb-0\">\r\n <span class=\"p-text-bold\">{{ col.header }}</span>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"filter\" let-value let-filter=\"filter\">\r\n <p-multiSelect [ngModel]=\"value\" [options]=\"(clonedData.items != null ? clonedData.items : []) | uniqueFilter : filterField + '.id' : filterField : null : 'name' : true\" [placeholder]=\"context.state.locale.dropdownFilter.placeholder\" (onChange)=\"filter($event.value)\" optionLabel=\"name\" dataKey=\"id\" [maxSelectedLabels]=\"2\" [selectedItemsLabel]=\"'{0}'\"></p-multiSelect>\r\n </ng-template>\r\n </smz-column-filter>\r\n }\r\n }\r\n @case (filterTypes.multiselect_string) {\r\n @if (col.filterField | filterObject; as filterField) {\r\n <smz-column-filter [field]=\"filterField\" matchMode=\"multiselectByString\" [showMatchModes]=\"false\" [showOperator]=\"false\" [showAddButton]=\"false\">\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"px-3 pt-3 pb-0\">\r\n <span class=\"p-text-bold\">{{ col.header }}</span>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"filter\" let-value let-filter=\"filter\">\r\n <p-multiSelect [ngModel]=\"value\" [options]=\"(clonedData.items != null ? clonedData.items : []) | uniqueFilter : filterField : filterField : null : true : false : false\" [placeholder]=\"context.state.locale.dropdownFilter.placeholder\" (onChange)=\"filter($event.value)\" [maxSelectedLabels]=\"2\" [selectedItemsLabel]=\"'{0}'\"></p-multiSelect>\r\n </ng-template>\r\n </smz-column-filter>\r\n }\r\n }\r\n }\r\n }\r\n @if (context.state.caption.columnVisibility.showColumnHideButton) {\r\n <button pButton type=\"button\" icon=\"fa-solid fa-eye-slash\" class=\"p-button-rounded p-button-text p-button-plain\" (click)=\"hideColumn(col, context)\"></button>\r\n }\r\n </div>\r\n </ng-template>\r\n }\r\n @if (context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible|| context.state.editable.isEditable) {\r\n <th [ngStyle]=\"context.state.editable.isEditable ? context.state.editable.ngStyle : context.state.actions.customActions.ngStyle\"></th>\r\n }\r\n </tr>\r\n @if (context.state.actions.batchActions.isVisible) {\r\n <tr>\r\n <th [attr.colspan]=\"columns.length + ((context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible || context.state.editable.isEditable) ? 1 : 0) + (context.state.caption.rowSelection.isEnabled ? 1 : 0) + (context.state.rowExpansion.isEnabled ? 1 : 0)\"\r\n [ngStyle]=\"context.state.actions.customActions.ngStyle\" class=\"px-0\">\r\n <div class=\"grid grid-nogutter items-center justify-start\">\r\n <p-tableHeaderCheckbox class=\"mr-4\"></p-tableHeaderCheckbox>\r\n @if (selectedItems?.length > 0) {\r\n @for (batchItem of context.state.actions.batchActions.items; track batchItem) {\r\n @if (batchItem.visible) {\r\n <button pButton [label]=\"batchItem.label\" class=\"p-button-rounded p-button-text p-button-plain animate__animated animate__fadeIn\" [ngClass]=\"batchItem.styleClass\" [icon]=\"batchItem.icon\" (click)=\"batchItem.command(selectedItems); selectedItems = [];\" [disabled]=\"batchItem.disabled\" [pTooltip]=\"batchItem.tooltip\"></button>\r\n }\r\n }\r\n }\r\n </div>\r\n </th>\r\n </tr>\r\n }\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-item let-editing=\"editing\" let-rowIndex=\"rowIndex\" let-columns=\"columns\">\r\n <tr #editableRowElement\r\n [pEditableRow]=\"item\"\r\n tableItemAction\r\n [isClickable]=\"context.state.actions.rowBehavior.isClickable\"\r\n [callback]=\"context.state.actions.rowBehavior.clickCallback\"\r\n [expandRowOnClick]=\"context.state.actions.rowBehavior.expandRowOnClick\"\r\n [item]=\"item\"\r\n class=\"p-selectable-row\"\r\n [ngClass]=\"{ 'highlight-row': item?.id === state.actions.rowBehavior.highlights, 'preserve-in-small': state.actions.rowBehavior.preserveLayoutInSmallDevices }\"\r\n >\r\n @if (context.state.caption.rowSelection.isEnabled && !clonedData.showSkeleton) {\r\n <td\r\n clickStopPropagation\r\n class=\"{{ state.actions.rowBehavior.cellStyleClass }}\"\r\n [ngClass]=\"{ 'opacity-50 pointer-events-none': editableService.context[item.id]?.hasErrors || editableService.context[item.id]?.isLoading }\"\r\n [ngStyle]=\"context.state.caption.rowSelection.ngStyle\"\r\n >\r\n <p-tableCheckbox [value]=\"item\"></p-tableCheckbox>\r\n </td>\r\n }\r\n @if (context.state.rowExpansion.isEnabled && !clonedData.showSkeleton) {\r\n <td\r\n clickStopPropagation\r\n class=\"{{ state.actions.rowBehavior.cellStyleClass }}\"\r\n [ngClass]=\"{ 'opacity-50 pointer-events-none': editableService.context[item.id]?.hasErrors || editableService.context[item.id]?.isLoading, 'grid grid-nogutter justify-start items-center gap-2': context.state.rowExpansion.highlightNewItems && item._isNew }\"\r\n [ngStyle]=\"context.state.rowExpansion.ngStyle\"\r\n >\r\n <p-toggleButton [(ngModel)]=\"item._isExpanded\" [onIcon]=\"'fa-solid fa-chevron-down'\" [offIcon]=\"'fa-solid fa-chevron-right'\" (onChange)=\"item._isNew = false\"></p-toggleButton>\r\n @if (context.state.rowExpansion.highlightNewItems && item._isNew) {\r\n <div class=\"rounded bg-cyan-400 text-sm text-white px-2 py-0 smz-table-new-tag\" (click)=\"item._isNew = false\">{{ context.state.rowExpansion.highlightLabel }}</div>\r\n }\r\n </td>\r\n }\r\n @for (col of columns; track col) {\r\n @if (clonedData.showSkeleton) {\r\n <td class=\"{{ state.actions.rowBehavior.cellStyleClass }}\" [ngStyle]=\"col.content.ngStyle\"><p-skeleton width=\"100%\" height=\"1rem\"></p-skeleton></td>\r\n } @else {\r\n <td class=\"{{ state.actions.rowBehavior.cellStyleClass }}\" [ngClass]=\"{ 'opacity-50 pointer-events-none': editableService.context[item.id]?.hasErrors || editableService.context[item.id]?.isLoading }\" [ngStyle]=\"col.content.ngStyle\">\r\n <span class=\"p-column-title\">{{ col.header }}</span>\r\n <p-cellEditor>\r\n <!-- CELULAR COM EDITOR -->\r\n <ng-template pTemplate=\"input\">\r\n @switch (col.editable.type) {\r\n @case (editableTypes.none) {\r\n <smz-table-content class=\"cursor-default\" [ngClass]=\"col.content.contentStyleClass\" [col]=\"col\" [contentTypes]=\"contentTypes\" [item]=\"item\" [rowIndex]=\"rowIndex\" [contentTemplate]=\"contentTemplate\"></smz-table-content>\r\n }\r\n @case (editableTypes.custom) {\r\n <ng-container *ngTemplateOutlet=\"editableTemplate; context: { $implicit: item, col: col }\"></ng-container>\r\n }\r\n <!-- INPUT TEXT -->\r\n @case (editableTypes.text) {\r\n @if (editableService.context[item.id]?.form; as form) {\r\n @if (form.controls[col.editable.property]; as control) {\r\n <div class=\"relative w-full\">\r\n <input pInputText type=\"text\" [formControl]=\"$any(control)\" style=\"width: 100%;\">\r\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\r\n </div>\r\n }\r\n }\r\n }\r\n <!-- INPUT NUMBER -->\r\n @case (editableTypes.number) {\r\n @if (editableService.context[item.id]?.form; as form) {\r\n @if (form.controls[col.editable.property]; as control) {\r\n <div class=\"relative w-full\">\r\n <p-inputNumber\r\n *ngVar=\"col.editable.data as numberData\"\r\n [formControl]=\"$any(control)\"\r\n [mode]=\"numberData.mode\"\r\n [minFractionDigits]=\"numberData.minFractionDigits\"\r\n [maxFractionDigits]=\"numberData.maxFractionDigits\"\r\n [currency]=\"numberData.currency\"\r\n [useGrouping]=\"numberData.useGrouping\"\r\n [allowEmpty]=\"numberData.allowEmpty\"\r\n [showClear]=\"numberData.showClear\"\r\n [showButtons]=\"numberData.showButtons\"\r\n [prefix]=\"numberData.prefix\"\r\n [suffix]=\"numberData.suffix\">\r\n </p-inputNumber>\r\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\r\n </div>\r\n }\r\n }\r\n }\r\n <!-- INPUT SWITCH -->\r\n @case (editableTypes.switch) {\r\n @if (editableService.context[item.id]?.form; as form) {\r\n @if (form.controls[col.editable.property]; as control) {\r\n <div class=\"relative w-full\">\r\n <p-toggleswitch [formControl]=\"$any(control)\"></p-toggleswitch>\r\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\r\n </div>\r\n }\r\n }\r\n }\r\n <!-- INPUT TEXT AREA -->\r\n @case (editableTypes.area) {\r\n @if (editableService.context[item.id]?.form; as form) {\r\n @if (form.controls[col.editable.property]; as control) {\r\n <div class=\"relative w-full\">\r\n <textarea pInputTextarea type=\"text\" [formControl]=\"$any(control)\" [rows]=\"$any(col.editable.data).rows\" required style=\"width: 100%;\"></textarea>\r\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\r\n </div>\r\n }\r\n }\r\n }\r\n <!-- INPUT DROPDOWN -->\r\n @case (editableTypes.dropdown) {\r\n @if (editableService.context[item.id]?.form; as form) {\r\n @if (form.controls[col.editable.property]; as control) {\r\n <div class=\"relative w-full\">\r\n <p-select appendTo=\"body\" [formControl]=\"$any(control)\" styleClass=\"w-full\" [options]=\"col.editable.data | editableSource\" optionLabel=\"name\" dataKey=\"id\" [placeholder]=\"$any(col.editable.data).placeholder\" [showClear]=\"!col.editable.validatorsPreset?.isRequired\" [filter]=\"true\"></p-select>\r\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\r\n </div>\r\n }\r\n }\r\n }\r\n <!-- INPUT CALENDAR -->\r\n @case (editableTypes.calendar) {\r\n @if (editableService.context[item.id]?.form; as form) {\r\n @if (form.controls[col.editable.property]; as control) {\r\n <div class=\"relative w-full\">\r\n <p-datepicker [formControl]=\"$any(control)\" appendTo=\"body\" styleClass=\"w-full\" [ngClass]=\"{ 'pl-5': !control.valid }\"></p-datepicker>\r\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\r\n </div>\r\n }\r\n }\r\n }\r\n }\r\n </ng-template>\r\n <!-- CELULAR COM CONTE\u00DADO -->\r\n <ng-template pTemplate=\"output\">\r\n <smz-table-content\r\n [col]=\"col\"\r\n [pTooltip]=\"col.content.tooltip != null ? col.content.tooltip(item) : null\"\r\n tooltipPosition=\"left\"\r\n [ngClass]=\"col.content.contentStyleClass\" [contentTypes]=\"contentTypes\" [item]=\"item\" [rowIndex]=\"rowIndex\" [contentTemplate]=\"contentTemplate\">\r\n </smz-table-content>\r\n </ng-template>\r\n </p-cellEditor>\r\n </td>\r\n }\r\n }\r\n @if (context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible || context.state.editable.isEditable) {\r\n <td [ngStyle]=\"context.state.actions.customActions.ngStyle\" class=\"px-0\">\r\n <div class=\"grid grid-nogutter items-center justify-center\">\r\n @if (clonedData.showSkeleton) {\r\n <div class=\"w-full\">\r\n <p-skeleton width=\"100%\" height=\"1rem\"></p-skeleton>\r\n </div>\r\n } @else {\r\n <!-- SEM EDITAR -->\r\n @if (!editing) {\r\n @if (context.state.editable.update.isButtonVisible) {\r\n <button pButton type=\"button\" icon=\"pi pi-pencil\" (click)=\"editableService.onRowEditInit(item)\" class=\"p-button-rounded p-button-text mx-1\" [disabled]=\"editableService.isEditing || editableService.isCreating || context.state.editable.update.isButtonDisabled || (!context.state.editable.update.condition(item))\" pInitEditableRow></button>\r\n }\r\n @if (context.state.editable.remove.isButtonVisible) {\r\n <button pButton type=\"button\" icon=\"pi pi-trash\" (click)=\"editableService.onRowRemove($event, table, item)\" class=\"p-button-rounded p-button-text p-button-secondary mx-1\" [disabled]=\"editableService.isEditing || editableService.isCreating || context.state.editable.remove.isButtonDisabled || (!context.state.editable.remove.condition(item))\"></button>\r\n }\r\n }\r\n <!-- EDITANDO -->\r\n @if (editing) {\r\n @if (editableService.context[item.id]; as editableContext) {\r\n <!-- COM LOADING -->\r\n @if (editableContext.isLoading) {\r\n <button pButton type=\"button\" icon=\"fa-solid fa-rotate fa-spin\" [disabled]=\"true\" class=\"p-button-rounded p-button-text p-button-info mr-2\"></button>\r\n }\r\n <!-- SEM LOADING -->\r\n @if (!editableContext.isLoading) {\r\n <!-- EDITANDO -->\r\n @if (!editableContext.hasErrors) {\r\n <!-- CRIANDO -->\r\n @if (item._context?.isCreating) {\r\n <button pButton type=\"button\" icon=\"pi pi-check\" (click)=\"editableService.onRowCreateSave($event, table, editableRowElement, item)\" [disabled]=\"!editableContext.hasChanged || !editableService.context[item.id]?.form.valid\" class=\"p-button-rounded p-button-text p-button-success mr-2\"></button>\r\n <button pButton type=\"button\" icon=\"pi pi-times\" (click)=\"editableService.onRowCreateCancel($event, table, item)\" class=\"p-button-rounded p-button-text p-button-danger\"></button>\r\n }\r\n <!-- ATUALIZANDO -->\r\n @if (item._context?.isUpdating) {\r\n <button pButton type=\"button\" icon=\"pi pi-check\" (click)=\"editableService.onRowEditSave($event, table, editableRowElement, item)\" [disabled]=\"!editableContext.hasChanged || !editableService.context[item.id]?.form.valid\" class=\"p-button-rounded p-button-text p-button-success mr-2\"></button>\r\n <button pButton type=\"button\" icon=\"pi pi-times\" (click)=\"editableService.onRowEditCancel($event, table, item)\" class=\"p-button-rounded p-button-text p-button-danger\"></button>\r\n }\r\n }\r\n <!-- COM ERRORS -->\r\n @if (editableContext.hasErrors) {\r\n <p-popover #errorsOverlay appendTo=\"body\" [style]=\"{ width: '450px' }\">\r\n <div [innerHtml]=\"editableContext.errors | contentErrors\"></div>\r\n </p-popover>\r\n <button pButton type=\"button\" icon=\"fas fa-exclamation-triangle\" [disabled]=\"false\" class=\"p-button-sm p-button-rounded p-button-text p-button-danger mr-2\" (click)=\"errorsOverlay.toggle($event)\"></button>\r\n <!-- CRIANDO -->\r\n @if (item._context?.isCreating) {\r\n <button pButton type=\"button\" icon=\"pi pi-times\" (click)=\"editableService.onRowCreateCancel($event, table, item)\" class=\"p-button-sm p-button-rounded p-button-text p-button-danger\"></button>\r\n }\r\n <!-- ATUALIZANDO -->\r\n @if (item._context?.isUpdating) {\r\n <button pButton type=\"button\" icon=\"pi pi-times\" (click)=\"editableService.onRowEditCancel($event, table, item)\" class=\"p-button-sm p-button-rounded p-button-text p-button-danger\"></button>\r\n }\r\n }\r\n }\r\n }\r\n }\r\n <!-- CUSTOM MENU -->\r\n @if (context.state.actions.customActions.isVisible && !editing) {\r\n <ng-container *ngTemplateOutlet=\"actionsTemplate; context: { $implicit: item }\"></ng-container>\r\n }\r\n <!-- MENU -->\r\n @if (context.state.actions.menu.isVisible && !editing) {\r\n <smz-menu [callback]=\"context.state.actions.menu.callback\" [items]=\"context.state.actions.menu.items\" [data]=\"item\" [behavior]=\"context.state.actions.menu.behavior\" [ngClass]=\"{ 'ml-2': context.state.actions.customActions.isVisible }\" [icon]=\"context.state.actions.menu.styles.icon\" [styleClass]=\"context.state.actions.menu.styles.styleClass\" [buttonClass]=\"context.state.actions.menu.styles.buttonClass\"></smz-menu>\r\n }\r\n }\r\n </div>\r\n </td>\r\n }\r\n </tr>\r\n @if (item?._isExpanded) {\r\n <tr>\r\n <td [attr.colspan]=\"columns.length + ((context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible || context.state.editable.isEditable) ? 1 : 0) + (context.state.caption.rowSelection.isEnabled ? 1 : 0) + (context.state.rowExpansion.isEnabled ? 1 : 0)\">\r\n <ng-container *ngTemplateOutlet=\"rowContentTemplate; context: { $implicit: item }\"></ng-container>\r\n </td>\r\n </tr>\r\n }\r\n </ng-template>\r\n <ng-template pTemplate=\"emptymessage\" let-columns>\r\n <tr>\r\n <td [attr.colspan]=\"columns.length + ((context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible || context.state.editable.isEditable) ? 1 : 0) + (context.state.caption.rowSelection.isEnabled ? 1 : 0) + (context.state.rowExpansion.isEnabled ? 1 : 0)\" [ngStyle]=\"{ 'text-align': 'center' }\">\r\n <div [innerHtml]=\"context.state.emptyFeedback.message\"></div>\r\n @if (context.state.caption.clearFilters.isButtonVisible && hasFilters()) {\r\n <button pButton [label]=\"context.state.locale.clearFilters.label\" class=\"p-button-outlined mt-3\" icon=\"pi pi-filter-slash\" (click)=\"clear(table, context)\"></button>\r\n }\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n }\r\n </ng-container>\r\n </ng-container>\r\n }\r\n} @else {\r\n @if (emptyStateTemplate != null) {\r\n <ng-container *ngTemplateOutlet=\"emptyStateTemplate; context: { $implicit: {} }\"></ng-container>\r\n }\r\n}\r\n\r\n", dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i1$7.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i8.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i8.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "directive", type: i8.ResizableColumn, selector: "[pResizableColumn]", inputs: ["pResizableColumnDisabled"] }, { kind: "component", type: i8.CellEditor, selector: "p-cellEditor" }, { kind: "component", type: i8.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i8.TableCheckbox, selector: "p-tableCheckbox", inputs: ["value", "disabled", "required", "index", "inputId", "name", "ariaLabel"] }, { kind: "component", type: i8.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "directive", type: i8.EditableRow, selector: "[pEditableRow]", inputs: ["pEditableRow", "pEditableRowDisabled"] }, { kind: "directive", type: i8.InitEditableRow, selector: "[pInitEditableRow]" }, { kind: "directive", type: i4.ButtonDirective, selector: "[pButton]", inputs: ["ptButtonDirective", "pButtonPT", "pButtonUnstyled", "hostName", "text", "plain", "raised", "size", "outlined", "rounded", "iconPos", "loadingIcon", "fluid", "label", "icon", "loading", "buttonProps", "severity"] }, { kind: "directive", type: i2.InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "component", type: i3$5.MultiSelect, selector: "p-multiSelect, p-multiselect, p-multi-select", inputs: ["id", "ariaLabel", "styleClass", "panelStyle", "panelStyleClass", "inputId", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "dataKey", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "chipIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "loading", "virtualScrollItemSize", "loadingIcon", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "showClear", "autofocus", "placeholder", "options", "filterValue", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus", "highlightOnSelect", "size", "variant", "fluid", "appendTo", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "component", type: i4$1.Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "component", type: i1$2.DatePicker, selector: "p-datePicker, p-datepicker, p-date-picker", inputs: ["iconDisplay", "styleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "readonlyInput", "shortYearCutoff", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "minDate", "maxDate", "disabledDates", "disabledDays", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "view", "defaultDate", "appendTo", "motionOptions"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "directive", type: i1$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: TableItemActionsDirective, selector: "[tableItemAction]", inputs: ["isClickable", "item", "callback", "expandRowOnClick"] }, { kind: "directive", type: ClickStopPropagationDirective, selector: "[clickStopPropagation]" }, { kind: "component", type: SmzDataInfoComponent, selector: "smz-data-info", inputs: ["image", "message", "actions", "callbackInfo", "callbackLabel"], outputs: ["clicked"] }, { kind: "directive", type: i1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "showOnEllipsis", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }, { kind: "component", type: i19.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "directive", type: i2$4.Textarea, selector: "[pTextarea], [pInputTextarea]", inputs: ["pTextareaPT", "pTextareaUnstyled", "autoResize", "pSize", "variant", "fluid", "invalid"], outputs: ["onResize"] }, { kind: "component", type: i3.Popover, selector: "p-popover", inputs: ["ariaLabel", "ariaLabelledBy", "dismissable", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions", "motionOptions"], outputs: ["onShow", "onHide"] }, { kind: "directive", type: i1$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i2$3.ToggleSwitch, selector: "p-toggleswitch, p-toggleSwitch, p-toggle-switch", inputs: ["styleClass", "tabindex", "inputId", "readonly", "trueValue", "falseValue", "ariaLabel", "size", "ariaLabelledBy", "autofocus"], outputs: ["onChange"] }, { kind: "component", type: i3$3.InputNumber, selector: "p-inputNumber, p-inputnumber, p-input-number", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "placeholder", "tabindex", "title", "ariaLabelledBy", "ariaDescribedBy", "ariaLabel", "ariaRequired", "autocomplete", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "component", type: SmzMenuComponent, selector: "smz-menu", inputs: ["items", "callback", "data", "buttonClass", "styleClass", "icon", "behavior"] }, { kind: "component", type: i25.ToggleButton, selector: "p-toggleButton, p-togglebutton, p-toggle-button", inputs: ["onLabel", "offLabel", "onIcon", "offIcon", "ariaLabel", "ariaLabelledBy", "styleClass", "inputId", "tabindex", "iconPos", "autofocus", "size", "allowEmpty", "fluid"], outputs: ["onChange"] }, { kind: "directive", type: NgVar, selector: "[ngVar]", inputs: ["ngVar"] }, { kind: "component", type: i27.IconField, selector: "p-iconfield, p-iconField, p-icon-field", inputs: ["hostName", "iconPosition", "styleClass"] }, { kind: "component", type: i28.InputIcon, selector: "p-inputicon, p-inputIcon", inputs: ["hostName", "styleClass"] }, { kind: "component", type: SmzColumnFilterComponent, selector: "smz-column-filter", inputs: ["currency", "display", "field", "matchMode", "showAddButton", "showMatchModes", "showOperator", "type", "showTime"] }, { kind: "component", type: SmzTableValidationMessagesComponent, selector: "smz-table-validation-messages", inputs: ["errors", "messages", "isFormInvalid", "isFormDirty"] }, { kind: "component", type: SmzTableContentComponent, selector: "smz-table-content", inputs: ["col", "contentTypes", "item", "rowIndex", "contentTemplate"] }, { kind: "component", type: SmzTableCaptionButtonsComponent, selector: "smz-table-caption-buttons", inputs: ["buttons"] }, { kind: "component", type: SmzTableHeaderActionsComponent, selector: "smz-table-header-actions", inputs: ["col"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: UniqueFilterPipe, name: "uniqueFilter" }, { kind: "pipe", type: SmzTableContextPipe, name: "tableContext" }, { kind: "pipe", type: SmzFilterObjectPipe, name: "filterObject" }, { kind: "pipe", type: SmzCloneTableItemsPipe, name: "cloneTableItems" }, { kind: "pipe", type: SmzEditableSourcePipe, name: "editableSource" }, { kind: "pipe", type: SmzContentErrorsPipe, name: "contentErrors" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
17661
17260
|
}
|
|
17662
17261
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzTableComponent, decorators: [{
|
|
17663
17262
|
type: Component,
|
|
17664
|
-
args: [{ selector: 'smz-ui-table', changeDetection: ChangeDetectionStrategy.OnPush, providers: [TableEditableService, TableFormsService], standalone: false, template: "@if (state | tableContext; as context) {\r\n @if ((context.state.emptyFeedback != null && (context.state.emptyFeedback.extraInfo || context.state.emptyFeedback.image || context.state.emptyFeedback.actionButtons)) && (items != null && items.length === 0) && context.state.emptyFeedback.isFeatured) {\r\n <smz-data-info\r\n [image]=\"context.state.emptyFeedback.image\"\r\n [message]=\"context.state.emptyFeedback.message\"\r\n [callbackInfo]=\"context.state.emptyFeedback.extraInfo\"\r\n [actions]=\"context.state.emptyFeedback.actionButtons\">\r\n <ng-template pTemplate=\"actions\">\r\n <ng-container *ngTemplateOutlet=\"emptyActionsTemplate; context: { $implicit: {} }\"></ng-container>\r\n </ng-template>\r\n </smz-data-info>\r\n } @else {\r\n <ng-container *ngVar=\"state.source?.items$ != null ? (state.source.items$ | async) : null as observableSource\">\r\n <ng-container *ngVar=\"state.source?.signalItems != null ? state.source.signalItems() : null as signalSource\">\r\n @if (((observableSource ?? signalSource ?? items) | cloneTableItems : context: tableKey: context.state.rowExpansion.sincronize); as clonedData) {\r\n <p-table #dt\r\n dataKey=\"id\"\r\n editMode=\"row\"\r\n [stripedRows]=\"context.state.styles.striped\"\r\n [value]=\"clonedData.items\"\r\n [(selection)]=\"selectedItems\"\r\n [tableStyleClass]=\"context.state.styles.tableStyleClass\"\r\n [styleClass]=\"'p-datatable-smz-ui-table' + (context.state.styles.showGrid ? ' p-datatable-gridlines' : '') + (context.state.styles.size === 'extra-small' ? ' p-datatable-xs' : '') + (context.state.styles.size === 'small' ? ' p-datatable-sm' : '') + (context.state.styles.size === 'large' ? ' p-datatable-lg' : '')\"\r\n [rowHover]=\"context.state.actions.rowBehavior.hoverable\"\r\n [rows]=\"context.state.pagination.rows\"\r\n [showCurrentPageReport]=\"context.state.pagination.pageReport.isVisible\"\r\n [rowsPerPageOptions]=\"context.state.pagination.rowsPerPageOptions\"\r\n [loading]=\"loading\"\r\n [paginator]=\"context.state.pagination.isVisible\"\r\n paginatorDropdownAppendTo=\"body\"\r\n [currentPageReportTemplate]=\"context.state.locale.paginator.template\"\r\n [sortField]=\"context.state.sort.field\"\r\n [sortMode]=\"context.state.sort.mode\"\r\n [sortOrder]=\"context.state.sort.order\"\r\n [multiSortMeta]=\"context.state.sort.multiSortMeta\"\r\n [scrollable]=\"context.state.viewport.scrollable\"\r\n [scrollHeight]=\"context.state.viewport.scrollHeight\"\r\n [filterDelay]=\"0\"\r\n [globalFilterFields]=\"context.globalFilter\"\r\n [columns]=\"context.visibleColumns\"\r\n [frozenColumns]=\"context.frozenColumns\"\r\n [frozenWidth]=\"context.state.frozen.isEnabled ? context.state.frozen.width : null\"\r\n [resizableColumns]=\"context.state.viewport.resizableColumns\"\r\n [columnResizeMode]=\"context.state.viewport.columnResizeMode\"\r\n (onPage)=\"onPage($event)\"\r\n (onFilter)=\"onFilter($event)\"\r\n (selectionChange)=\"emitSelection($event)\"\r\n >\r\n @if (context.state.caption.isVisible) {\r\n <ng-template pTemplate=\"caption\">\r\n <div class=\"grid grid-nogutter items-center gap-2\" [ngClass]=\"'justify-' + context.state.caption.toolbarAlignment\">\r\n @if (context.state.caption.title != null) {\r\n <div class=\"col database-title\" [innerHTML]=\"context.state.caption.title\"></div>\r\n }\r\n <ng-container *ngTemplateOutlet=\"captionTemplate; context: { $implicit: dt }\"></ng-container>\r\n <smz-table-caption-buttons [buttons]=\"context.state.caption.buttons\"></smz-table-caption-buttons>\r\n @if (context.state.caption.exportToPdf.isButtonVisible) {\r\n <button pButton [label]=\"context.state.locale.exportToPdf.label\" class=\"p-button-outlined\" icon=\"fa-solid fa-file-pdf\" (click)=\"exportToPdf(context, clonedData.items)\" [disabled]=\"clonedData.showSkeleton\"></button>\r\n }\r\n @if (context.state.caption.exportToExcel.isButtonVisible) {\r\n <button pButton [label]=\"context.state.locale.exportToExcel.label\" class=\"p-button-outlined\" icon=\"fa-solid fa-file-excel\" (click)=\"exportToExcel(table, context, clonedData.items)\" [disabled]=\"clonedData.showSkeleton\"></button>\r\n }\r\n @if (context.state.editable.creation.isButtonVisible) {\r\n <button pButton [label]=\"context.state.editable.creation.buttonLabel\" class=\"p-button-outlined\" icon=\"fa-solid fa-plus\" (click)=\"editableService.onRowCreateInit(table, context.columns)\" [disabled]=\"clonedData.showSkeleton || editableService.isEditing || editableService.isCreating || context.state.editable.creation.isButtonDisabled\"></button>\r\n }\r\n @if (context.state.caption.rowSelection.isButtonVisible) {\r\n <button pButton [label]=\"context.state.locale.rowSelection.label\" class=\"p-button-outlined\" icon=\"fa-solid fa-check-double\" (click)=\"onRowSelection(context)\" [disabled]=\"clonedData.showSkeleton\"></button>\r\n }\r\n @if (context.state.caption.clearFilters.isButtonVisible) {\r\n <button pButton [label]=\"context.state.locale.clearFilters.label\" class=\"p-button-outlined\" icon=\"pi pi-filter-slash\" (click)=\"clear(table, context)\" [disabled]=\"clonedData.showSkeleton\"></button>\r\n }\r\n @if (context.state.caption.columnVisibility.showDropdownSelector) {\r\n <p-multiSelect\r\n #columnMultiselect\r\n class=\"ml-2 col-12 md:col-2\"\r\n styleClass=\"w-full\"\r\n [options]=\"context.hideableColumns\"\r\n [(ngModel)]=\"selectedColumns\"\r\n [placeholder]=\"context.state.locale.columnVisibility.placeholder\"\r\n [selectedItemsLabel]=\"context.state.locale.columnVisibility.selectedItemsLabel\"\r\n optionLabel=\"name\"\r\n dataKey=\"field\"\r\n optionLabel=\"header\"\r\n [filter]=\"true\"\r\n (onPanelHide)=\"updateColumnsVisibility(true)\"\r\n [pTooltip]=\"context.state.locale.columnVisibility.pTooltip\">\r\n </p-multiSelect>\r\n }\r\n @if (context.state.caption.globalFilter.isVisible) {\r\n <p-iconfield class=\"col-12\" [ngClass]=\"{ 'md:col-2': !context.state.caption.globalFilter.expanded }\">\r\n <p-inputicon styleClass=\"pi pi-search\" />\r\n <input #inputGlobal [(ngModel)]=\"globalSearchInput\" pInputText type=\"text\" styleClass=\"database-global-search\" (input)=\"updateGlobalFilter(inputGlobal.value)\" [disabled]=\"clonedData.showSkeleton\" [placeholder]=\"context.state.locale.globalFilter.placeholder\" />\r\n </p-iconfield>\r\n }\r\n </div>\r\n @if (toolbarTemplate != null) {\r\n <div class=\"grid grid-nogutter items-center mt-2\" [ngClass]=\"'justify-' + context.state.caption.toolbarAlignment\">\r\n <ng-container *ngTemplateOutlet=\"toolbarTemplate; context: { $implicit: dt }\"></ng-container>\r\n </div>\r\n }\r\n </ng-template>\r\n }\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr [ngClass]=\"{ 'invisible-header': !context.state.header.isVisible }\">\r\n @if (context.state.caption.rowSelection.isEnabled) {\r\n <th [ngStyle]=\"context.state.caption.rowSelection.ngStyle\">\r\n @if (!context.state.actions.batchActions.isVisible) {\r\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\r\n }\r\n </th>\r\n }\r\n @if (context.state.rowExpansion.isEnabled) {\r\n <th [ngStyle]=\"context.state.rowExpansion.ngStyle\"></th>\r\n }\r\n @for (col of columns; track col) {\r\n @if (context.state.viewport.resizableColumns) {\r\n @if (col.isOrderable) {\r\n <th [pSortableColumn]=\"col.sortField\" pResizableColumn [ngStyle]=\"col.content.ngStyle\" [ngClass]=\"col.headerStyleClass\">\r\n <ng-container *ngTemplateOutlet=\"headerContent\"></ng-container>\r\n </th>\r\n }\r\n @if (!col.isOrderable) {\r\n <th pResizableColumn [ngStyle]=\"col.content.ngStyle\" [ngClass]=\"col.headerStyleClass\">\r\n <ng-container *ngTemplateOutlet=\"headerContent\"></ng-container>\r\n </th>\r\n }\r\n } @else {\r\n @if (col.isOrderable) {\r\n <th [pSortableColumn]=\"col.sortField\" [ngStyle]=\"col.content.ngStyle\" [ngClass]=\"col.headerStyleClass\">\r\n <ng-container *ngTemplateOutlet=\"headerContent\"></ng-container>\r\n </th>\r\n }\r\n @if (!col.isOrderable) {\r\n <th [ngStyle]=\"col.content.ngStyle\" [ngClass]=\"col.headerStyleClass\">\r\n <ng-container *ngTemplateOutlet=\"headerContent\"></ng-container>\r\n </th>\r\n }\r\n }\r\n <ng-template #headerContent>\r\n <div class=\"flex justify-start items-center\">\r\n <span class=\"mr-1\">{{ col.header }}</span>\r\n @if (col.showHeaderActions) {\r\n <smz-table-header-actions clickStopPropagation class=\"ml-1 mt-1\" [col]=\"col\"></smz-table-header-actions>\r\n }\r\n @if (!clonedData.showSkeleton && col.isOrderable) {\r\n <p-sortIcon [field]=\"col.sortField\"></p-sortIcon>\r\n }\r\n @if (!clonedData.showSkeleton) {\r\n @switch (col.filter.type) {\r\n @case (filterTypes.currency) {\r\n <smz-column-filter type=\"numeric\" currency=\"BRL\" [field]=\"col.filterField\"></smz-column-filter>\r\n }\r\n @case (filterTypes.numeric) {\r\n <smz-column-filter type=\"numeric\" [field]=\"col.filterField\"></smz-column-filter>\r\n }\r\n @case (filterTypes.date) {\r\n <smz-column-filter type=\"date\" [field]=\"col.filterField\" [showTime]=\"col.filter.showTime\"></smz-column-filter>\r\n }\r\n @case (filterTypes.text) {\r\n <smz-column-filter type=\"text\" [field]=\"col.filterField\"></smz-column-filter>\r\n }\r\n @case (filterTypes.boolean) {\r\n <smz-column-filter type=\"boolean\" [field]=\"col.filterField\"></smz-column-filter>\r\n }\r\n @case (filterTypes.dropdown) {\r\n @if (col.filterField | filterObject; as filterField) {\r\n <smz-column-filter [field]=\"filterField + '.id'\" matchMode=\"dropdown\" [showMatchModes]=\"false\" [showOperator]=\"false\" [showAddButton]=\"false\">\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"px-3 pt-3 pb-0\">\r\n <span class=\"p-text-bold\">{{ col.header }}</span>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"filter\" let-value let-filter=\"filter\">\r\n <p-select appendTo=\"body\" [ngModel]=\"value\" [options]=\"(clonedData.items != null ? clonedData.items : []) | uniqueFilter : filterField + '.id' : filterField : null : 'name' : false\" [placeholder]=\"context.state.locale.dropdownFilter.placeholder\" (onChange)=\"filter($event.value)\" optionLabel=\"name\" dataKey=\"id\"></p-select>\r\n </ng-template>\r\n </smz-column-filter>\r\n }\r\n }\r\n @case (filterTypes.multiselect) {\r\n @if (col.filterField | filterObject; as filterField) {\r\n <smz-column-filter [field]=\"filterField\" matchMode=\"in\" [showMatchModes]=\"false\" [showOperator]=\"false\" [showAddButton]=\"false\">\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"px-3 pt-3 pb-0\">\r\n <span class=\"p-text-bold\">{{ col.header }}</span>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"filter\" let-value let-filter=\"filter\">\r\n <p-multiSelect [ngModel]=\"value\" [options]=\"(clonedData.items != null ? clonedData.items : []) | uniqueFilter : filterField + '.id' : filterField : null : 'name' : false\" [placeholder]=\"context.state.locale.dropdownFilter.placeholder\" (onChange)=\"filter($event.value)\" optionLabel=\"name\" dataKey=\"id\"></p-multiSelect>\r\n </ng-template>\r\n </smz-column-filter>\r\n }\r\n }\r\n @case (filterTypes.multiselect_array) {\r\n @if (col.filterField | filterObject; as filterField) {\r\n <smz-column-filter [field]=\"filterField\" matchMode=\"array-some\" [showMatchModes]=\"false\" [showOperator]=\"false\" [showAddButton]=\"false\">\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"px-3 pt-3 pb-0\">\r\n <span class=\"p-text-bold\">{{ col.header }}</span>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"filter\" let-value let-filter=\"filter\">\r\n <p-multiSelect [ngModel]=\"value\" [options]=\"(clonedData.items != null ? clonedData.items : []) | uniqueFilter : filterField + '.id' : filterField : null : 'name' : true\" [placeholder]=\"context.state.locale.dropdownFilter.placeholder\" (onChange)=\"filter($event.value)\" optionLabel=\"name\" dataKey=\"id\" [maxSelectedLabels]=\"2\" [selectedItemsLabel]=\"'{0}'\"></p-multiSelect>\r\n </ng-template>\r\n </smz-column-filter>\r\n }\r\n }\r\n @case (filterTypes.multiselect_string) {\r\n @if (col.filterField | filterObject; as filterField) {\r\n <smz-column-filter [field]=\"filterField\" matchMode=\"multiselectByString\" [showMatchModes]=\"false\" [showOperator]=\"false\" [showAddButton]=\"false\">\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"px-3 pt-3 pb-0\">\r\n <span class=\"p-text-bold\">{{ col.header }}</span>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"filter\" let-value let-filter=\"filter\">\r\n <p-multiSelect [ngModel]=\"value\" [options]=\"(clonedData.items != null ? clonedData.items : []) | uniqueFilter : filterField : filterField : null : true : false : false\" [placeholder]=\"context.state.locale.dropdownFilter.placeholder\" (onChange)=\"filter($event.value)\" [maxSelectedLabels]=\"2\" [selectedItemsLabel]=\"'{0}'\"></p-multiSelect>\r\n </ng-template>\r\n </smz-column-filter>\r\n }\r\n }\r\n }\r\n }\r\n @if (context.state.caption.columnVisibility.showColumnHideButton) {\r\n <button pButton type=\"button\" icon=\"fa-solid fa-eye-slash\" class=\"p-button-rounded p-button-text p-button-plain\" (click)=\"hideColumn(col, context)\"></button>\r\n }\r\n </div>\r\n </ng-template>\r\n }\r\n @if (context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible|| context.state.editable.isEditable) {\r\n <th [ngStyle]=\"context.state.editable.isEditable ? context.state.editable.ngStyle : context.state.actions.customActions.ngStyle\"></th>\r\n }\r\n </tr>\r\n @if (context.state.actions.batchActions.isVisible) {\r\n <tr>\r\n <th [attr.colspan]=\"columns.length + ((context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible || context.state.editable.isEditable) ? 1 : 0) + (context.state.caption.rowSelection.isEnabled ? 1 : 0) + (context.state.rowExpansion.isEnabled ? 1 : 0)\"\r\n [ngStyle]=\"context.state.actions.customActions.ngStyle\" class=\"px-0\">\r\n <div class=\"grid grid-nogutter items-center justify-start\">\r\n <p-tableHeaderCheckbox class=\"mr-4\"></p-tableHeaderCheckbox>\r\n @if (selectedItems?.length > 0) {\r\n @for (batchItem of context.state.actions.batchActions.items; track batchItem) {\r\n @if (batchItem.visible) {\r\n <button pButton [label]=\"batchItem.label\" class=\"p-button-rounded p-button-text p-button-plain animate__animated animate__fadeIn\" [ngClass]=\"batchItem.styleClass\" [icon]=\"batchItem.icon\" (click)=\"batchItem.command(selectedItems); selectedItems = [];\" [disabled]=\"batchItem.disabled\" [pTooltip]=\"batchItem.tooltip\"></button>\r\n }\r\n }\r\n }\r\n </div>\r\n </th>\r\n </tr>\r\n }\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-item let-editing=\"editing\" let-rowIndex=\"rowIndex\" let-columns=\"columns\">\r\n <tr #editableRowElement\r\n [pEditableRow]=\"item\"\r\n tableItemAction\r\n [isClickable]=\"context.state.actions.rowBehavior.isClickable\"\r\n [callback]=\"context.state.actions.rowBehavior.clickCallback\"\r\n [expandRowOnClick]=\"context.state.actions.rowBehavior.expandRowOnClick\"\r\n [item]=\"item\"\r\n class=\"p-selectable-row\"\r\n [ngClass]=\"{ 'highlight-row': item?.id === state.actions.rowBehavior.highlights, 'preserve-in-small': state.actions.rowBehavior.preserveLayoutInSmallDevices }\"\r\n >\r\n @if (context.state.caption.rowSelection.isEnabled && !clonedData.showSkeleton) {\r\n <td\r\n clickStopPropagation\r\n class=\"{{ state.actions.rowBehavior.cellStyleClass }}\"\r\n [ngClass]=\"{ 'opacity-50 pointer-events-none': editableService.context[item.id]?.hasErrors || editableService.context[item.id]?.isLoading }\"\r\n [ngStyle]=\"context.state.caption.rowSelection.ngStyle\"\r\n >\r\n <p-tableCheckbox [value]=\"item\"></p-tableCheckbox>\r\n </td>\r\n }\r\n @if (context.state.rowExpansion.isEnabled && !clonedData.showSkeleton) {\r\n <td\r\n clickStopPropagation\r\n class=\"{{ state.actions.rowBehavior.cellStyleClass }}\"\r\n [ngClass]=\"{ 'opacity-50 pointer-events-none': editableService.context[item.id]?.hasErrors || editableService.context[item.id]?.isLoading, 'grid grid-nogutter justify-start items-center gap-2': context.state.rowExpansion.highlightNewItems && item._isNew }\"\r\n [ngStyle]=\"context.state.rowExpansion.ngStyle\"\r\n >\r\n <p-toggleButton [(ngModel)]=\"item._isExpanded\" [onIcon]=\"'fa-solid fa-chevron-down'\" [offIcon]=\"'fa-solid fa-chevron-right'\" (onChange)=\"item._isNew = false\"></p-toggleButton>\r\n @if (context.state.rowExpansion.highlightNewItems && item._isNew) {\r\n <div class=\"rounded bg-cyan-400 text-sm text-white px-2 py-0 smz-table-new-tag\" (click)=\"item._isNew = false\">{{ context.state.rowExpansion.highlightLabel }}</div>\r\n }\r\n </td>\r\n }\r\n @for (col of columns; track col) {\r\n @if (clonedData.showSkeleton) {\r\n <td class=\"{{ state.actions.rowBehavior.cellStyleClass }}\" [ngStyle]=\"col.content.ngStyle\"><p-skeleton width=\"100%\" height=\"1rem\"></p-skeleton></td>\r\n } @else {\r\n <td class=\"{{ state.actions.rowBehavior.cellStyleClass }}\" [ngClass]=\"{ 'opacity-50 pointer-events-none': editableService.context[item.id]?.hasErrors || editableService.context[item.id]?.isLoading }\" [ngStyle]=\"col.content.ngStyle\">\r\n <span class=\"p-column-title\">{{ col.header }}</span>\r\n <p-cellEditor>\r\n <!-- CELULAR COM EDITOR -->\r\n <ng-template pTemplate=\"input\">\r\n @switch (col.editable.type) {\r\n @case (editableTypes.none) {\r\n <smz-table-content class=\"cursor-default\" [ngClass]=\"col.content.contentStyleClass\" [col]=\"col\" [contentTypes]=\"contentTypes\" [item]=\"item\" [rowIndex]=\"rowIndex\" [contentTemplate]=\"contentTemplate\"></smz-table-content>\r\n }\r\n @case (editableTypes.custom) {\r\n <ng-container *ngTemplateOutlet=\"editableTemplate; context: { $implicit: item, col: col }\"></ng-container>\r\n }\r\n <!-- INPUT TEXT -->\r\n @case (editableTypes.text) {\r\n @if (editableService.context[item.id]?.form; as form) {\r\n @if (form.controls[col.editable.property]; as control) {\r\n <div class=\"relative w-full\">\r\n <input pInputText type=\"text\" [formControl]=\"$any(control)\" style=\"width: 100%;\">\r\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\r\n </div>\r\n }\r\n }\r\n }\r\n <!-- INPUT NUMBER -->\r\n @case (editableTypes.number) {\r\n @if (editableService.context[item.id]?.form; as form) {\r\n @if (form.controls[col.editable.property]; as control) {\r\n <div class=\"relative w-full\">\r\n <p-inputNumber\r\n *ngVar=\"col.editable.data as numberData\"\r\n [formControl]=\"$any(control)\"\r\n [mode]=\"numberData.mode\"\r\n [minFractionDigits]=\"numberData.minFractionDigits\"\r\n [maxFractionDigits]=\"numberData.maxFractionDigits\"\r\n [currency]=\"numberData.currency\"\r\n [useGrouping]=\"numberData.useGrouping\"\r\n [allowEmpty]=\"numberData.allowEmpty\"\r\n [showClear]=\"numberData.showClear\"\r\n [showButtons]=\"numberData.showButtons\"\r\n [prefix]=\"numberData.prefix\"\r\n [suffix]=\"numberData.suffix\">\r\n </p-inputNumber>\r\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\r\n </div>\r\n }\r\n }\r\n }\r\n <!-- INPUT SWITCH -->\r\n @case (editableTypes.switch) {\r\n @if (editableService.context[item.id]?.form; as form) {\r\n @if (form.controls[col.editable.property]; as control) {\r\n <div class=\"relative w-full\">\r\n <p-toggleswitch [formControl]=\"$any(control)\"></p-toggleswitch>\r\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\r\n </div>\r\n }\r\n }\r\n }\r\n <!-- INPUT TEXT AREA -->\r\n @case (editableTypes.area) {\r\n @if (editableService.context[item.id]?.form; as form) {\r\n @if (form.controls[col.editable.property]; as control) {\r\n <div class=\"relative w-full\">\r\n <textarea pInputTextarea type=\"text\" [formControl]=\"$any(control)\" [rows]=\"$any(col.editable.data).rows\" required style=\"width: 100%;\"></textarea>\r\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\r\n </div>\r\n }\r\n }\r\n }\r\n <!-- INPUT DROPDOWN -->\r\n @case (editableTypes.dropdown) {\r\n @if (editableService.context[item.id]?.form; as form) {\r\n @if (form.controls[col.editable.property]; as control) {\r\n <div class=\"relative w-full\">\r\n <p-select appendTo=\"body\" [formControl]=\"$any(control)\" styleClass=\"w-full\" [options]=\"col.editable.data | editableSource\" optionLabel=\"name\" dataKey=\"id\" [placeholder]=\"$any(col.editable.data).placeholder\" [showClear]=\"!col.editable.validatorsPreset?.isRequired\" [filter]=\"true\"></p-select>\r\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\r\n </div>\r\n }\r\n }\r\n }\r\n <!-- INPUT CALENDAR -->\r\n @case (editableTypes.calendar) {\r\n @if (editableService.context[item.id]?.form; as form) {\r\n @if (form.controls[col.editable.property]; as control) {\r\n <div class=\"relative w-full\">\r\n <p-datepicker [formControl]=\"$any(control)\" appendTo=\"body\" styleClass=\"w-full\" [ngClass]=\"{ 'pl-5': !control.valid }\"></p-datepicker>\r\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\r\n </div>\r\n }\r\n }\r\n }\r\n }\r\n </ng-template>\r\n <!-- CELULAR COM CONTE\u00DADO -->\r\n <ng-template pTemplate=\"output\">\r\n <smz-table-content\r\n [col]=\"col\"\r\n [pTooltip]=\"col.content.tooltip != null ? col.content.tooltip(item) : null\"\r\n tooltipPosition=\"left\"\r\n [ngClass]=\"col.content.contentStyleClass\" [contentTypes]=\"contentTypes\" [item]=\"item\" [rowIndex]=\"rowIndex\" [contentTemplate]=\"contentTemplate\">\r\n </smz-table-content>\r\n </ng-template>\r\n </p-cellEditor>\r\n </td>\r\n }\r\n }\r\n @if (context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible || context.state.editable.isEditable) {\r\n <td [ngStyle]=\"context.state.actions.customActions.ngStyle\" class=\"px-0\">\r\n <div class=\"grid grid-nogutter items-center justify-center\">\r\n @if (clonedData.showSkeleton) {\r\n <div class=\"w-full\">\r\n <p-skeleton width=\"100%\" height=\"1rem\"></p-skeleton>\r\n </div>\r\n } @else {\r\n <!-- SEM EDITAR -->\r\n @if (!editing) {\r\n @if (context.state.editable.update.isButtonVisible) {\r\n <button pButton type=\"button\" icon=\"pi pi-pencil\" (click)=\"editableService.onRowEditInit(item)\" class=\"p-button-rounded p-button-text mx-1\" [disabled]=\"editableService.isEditing || editableService.isCreating || context.state.editable.update.isButtonDisabled || (!context.state.editable.update.condition(item))\" pInitEditableRow></button>\r\n }\r\n @if (context.state.editable.remove.isButtonVisible) {\r\n <button pButton type=\"button\" icon=\"pi pi-trash\" (click)=\"editableService.onRowRemove($event, table, item)\" class=\"p-button-rounded p-button-text p-button-secondary mx-1\" [disabled]=\"editableService.isEditing || editableService.isCreating || context.state.editable.remove.isButtonDisabled || (!context.state.editable.remove.condition(item))\"></button>\r\n }\r\n }\r\n <!-- EDITANDO -->\r\n @if (editing) {\r\n @if (editableService.context[item.id]; as editableContext) {\r\n <!-- COM LOADING -->\r\n @if (editableContext.isLoading) {\r\n <button pButton type=\"button\" icon=\"fa-solid fa-rotate fa-spin\" [disabled]=\"true\" class=\"p-button-rounded p-button-text p-button-info mr-2\"></button>\r\n }\r\n <!-- SEM LOADING -->\r\n @if (!editableContext.isLoading) {\r\n <!-- EDITANDO -->\r\n @if (!editableContext.hasErrors) {\r\n <!-- CRIANDO -->\r\n @if (item._context?.isCreating) {\r\n <button pButton type=\"button\" icon=\"pi pi-check\" (click)=\"editableService.onRowCreateSave($event, table, editableRowElement, item)\" [disabled]=\"!editableContext.hasChanged || !editableService.context[item.id]?.form.valid\" class=\"p-button-rounded p-button-text p-button-success mr-2\"></button>\r\n <button pButton type=\"button\" icon=\"pi pi-times\" (click)=\"editableService.onRowCreateCancel($event, table, item)\" class=\"p-button-rounded p-button-text p-button-danger\"></button>\r\n }\r\n <!-- ATUALIZANDO -->\r\n @if (item._context?.isUpdating) {\r\n <button pButton type=\"button\" icon=\"pi pi-check\" (click)=\"editableService.onRowEditSave($event, table, editableRowElement, item)\" [disabled]=\"!editableContext.hasChanged || !editableService.context[item.id]?.form.valid\" class=\"p-button-rounded p-button-text p-button-success mr-2\"></button>\r\n <button pButton type=\"button\" icon=\"pi pi-times\" (click)=\"editableService.onRowEditCancel($event, table, item)\" class=\"p-button-rounded p-button-text p-button-danger\"></button>\r\n }\r\n }\r\n <!-- COM ERRORS -->\r\n @if (editableContext.hasErrors) {\r\n <p-overlayPanel #errorsOverlay appendTo=\"body\" [style]=\"{ width: '450px' }\">\r\n <ng-template pTemplate>\r\n <div [innerHtml]=\"editableContext.errors | contentErrors\"></div>\r\n </ng-template>\r\n </p-overlayPanel>\r\n <button pButton type=\"button\" icon=\"fas fa-exclamation-triangle\" [disabled]=\"false\" class=\"p-button-sm p-button-rounded p-button-text p-button-danger mr-2\" (click)=\"errorsOverlay.toggle($event)\"></button>\r\n <!-- CRIANDO -->\r\n @if (item._context?.isCreating) {\r\n <button pButton type=\"button\" icon=\"pi pi-times\" (click)=\"editableService.onRowCreateCancel($event, table, item)\" class=\"p-button-sm p-button-rounded p-button-text p-button-danger\"></button>\r\n }\r\n <!-- ATUALIZANDO -->\r\n @if (item._context?.isUpdating) {\r\n <button pButton type=\"button\" icon=\"pi pi-times\" (click)=\"editableService.onRowEditCancel($event, table, item)\" class=\"p-button-sm p-button-rounded p-button-text p-button-danger\"></button>\r\n }\r\n }\r\n }\r\n }\r\n }\r\n <!-- CUSTOM MENU -->\r\n @if (context.state.actions.customActions.isVisible && !editing) {\r\n <ng-container *ngTemplateOutlet=\"actionsTemplate; context: { $implicit: item }\"></ng-container>\r\n }\r\n <!-- MENU -->\r\n @if (context.state.actions.menu.isVisible && !editing) {\r\n <smz-menu [callback]=\"context.state.actions.menu.callback\" [items]=\"context.state.actions.menu.items\" [data]=\"item\" [behavior]=\"context.state.actions.menu.behavior\" [ngClass]=\"{ 'ml-2': context.state.actions.customActions.isVisible }\" [icon]=\"context.state.actions.menu.styles.icon\" [styleClass]=\"context.state.actions.menu.styles.styleClass\" [buttonClass]=\"context.state.actions.menu.styles.buttonClass\"></smz-menu>\r\n }\r\n }\r\n </div>\r\n </td>\r\n }\r\n </tr>\r\n @if (item?._isExpanded) {\r\n <tr>\r\n <td [attr.colspan]=\"columns.length + ((context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible || context.state.editable.isEditable) ? 1 : 0) + (context.state.caption.rowSelection.isEnabled ? 1 : 0) + (context.state.rowExpansion.isEnabled ? 1 : 0)\">\r\n <ng-container *ngTemplateOutlet=\"rowContentTemplate; context: { $implicit: item }\"></ng-container>\r\n </td>\r\n </tr>\r\n }\r\n </ng-template>\r\n <ng-template pTemplate=\"emptymessage\" let-columns>\r\n <tr>\r\n <td [attr.colspan]=\"columns.length + ((context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible || context.state.editable.isEditable) ? 1 : 0) + (context.state.caption.rowSelection.isEnabled ? 1 : 0) + (context.state.rowExpansion.isEnabled ? 1 : 0)\" [ngStyle]=\"{ 'text-align': 'center' }\">\r\n <div [innerHtml]=\"context.state.emptyFeedback.message\"></div>\r\n @if (context.state.caption.clearFilters.isButtonVisible && hasFilters()) {\r\n <button pButton [label]=\"context.state.locale.clearFilters.label\" class=\"p-button-outlined mt-3\" icon=\"pi pi-filter-slash\" (click)=\"clear(table, context)\"></button>\r\n }\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n }\r\n </ng-container>\r\n </ng-container>\r\n }\r\n} @else {\r\n @if (emptyStateTemplate != null) {\r\n <ng-container *ngTemplateOutlet=\"emptyStateTemplate; context: { $implicit: {} }\"></ng-container>\r\n }\r\n}\r\n\r\n" }]
|
|
17263
|
+
args: [{ selector: 'smz-ui-table', changeDetection: ChangeDetectionStrategy.OnPush, providers: [TableEditableService, TableFormsService], standalone: false, template: "@if (state | tableContext; as context) {\r\n @if ((context.state.emptyFeedback != null && (context.state.emptyFeedback.extraInfo || context.state.emptyFeedback.image || context.state.emptyFeedback.actionButtons)) && (items != null && items.length === 0) && context.state.emptyFeedback.isFeatured) {\r\n <smz-data-info\r\n [image]=\"context.state.emptyFeedback.image\"\r\n [message]=\"context.state.emptyFeedback.message\"\r\n [callbackInfo]=\"context.state.emptyFeedback.extraInfo\"\r\n [actions]=\"context.state.emptyFeedback.actionButtons\">\r\n <ng-template pTemplate=\"actions\">\r\n <ng-container *ngTemplateOutlet=\"emptyActionsTemplate; context: { $implicit: {} }\"></ng-container>\r\n </ng-template>\r\n </smz-data-info>\r\n } @else {\r\n <ng-container *ngVar=\"state.source?.items$ != null ? (state.source.items$ | async) : null as observableSource\">\r\n <ng-container *ngVar=\"state.source?.signalItems != null ? state.source.signalItems() : null as signalSource\">\r\n @if (((observableSource ?? signalSource ?? items) | cloneTableItems : context: tableKey: context.state.rowExpansion.sincronize); as clonedData) {\r\n <p-table #dt\r\n dataKey=\"id\"\r\n editMode=\"row\"\r\n [stripedRows]=\"context.state.styles.striped\"\r\n [value]=\"clonedData.items\"\r\n [(selection)]=\"selectedItems\"\r\n [tableStyleClass]=\"context.state.styles.tableStyleClass\"\r\n [styleClass]=\"'p-datatable-smz-ui-table' + (context.state.styles.showGrid ? ' p-datatable-gridlines' : '') + (context.state.styles.size === 'extra-small' ? ' p-datatable-xs' : '') + (context.state.styles.size === 'small' ? ' p-datatable-sm' : '') + (context.state.styles.size === 'large' ? ' p-datatable-lg' : '')\"\r\n [rowHover]=\"context.state.actions.rowBehavior.hoverable\"\r\n [rows]=\"context.state.pagination.rows\"\r\n [showCurrentPageReport]=\"context.state.pagination.pageReport.isVisible\"\r\n [rowsPerPageOptions]=\"context.state.pagination.rowsPerPageOptions\"\r\n [loading]=\"loading\"\r\n [paginator]=\"context.state.pagination.isVisible\"\r\n paginatorDropdownAppendTo=\"body\"\r\n [currentPageReportTemplate]=\"context.state.locale.paginator.template\"\r\n [sortField]=\"context.state.sort.field\"\r\n [sortMode]=\"context.state.sort.mode\"\r\n [sortOrder]=\"context.state.sort.order\"\r\n [multiSortMeta]=\"context.state.sort.multiSortMeta\"\r\n [scrollable]=\"context.state.viewport.scrollable\"\r\n [scrollHeight]=\"context.state.viewport.scrollHeight\"\r\n [filterDelay]=\"0\"\r\n [globalFilterFields]=\"context.globalFilter\"\r\n [columns]=\"context.visibleColumns\"\r\n [frozenColumns]=\"context.frozenColumns\"\r\n [frozenWidth]=\"context.state.frozen.isEnabled ? context.state.frozen.width : null\"\r\n [resizableColumns]=\"context.state.viewport.resizableColumns\"\r\n [columnResizeMode]=\"context.state.viewport.columnResizeMode\"\r\n (onPage)=\"onPage($event)\"\r\n (onFilter)=\"onFilter($event)\"\r\n (selectionChange)=\"emitSelection($event)\"\r\n >\r\n @if (context.state.caption.isVisible) {\r\n <ng-template pTemplate=\"caption\">\r\n <div class=\"grid grid-nogutter items-center gap-2\" [ngClass]=\"'justify-' + context.state.caption.toolbarAlignment\">\r\n @if (context.state.caption.title != null) {\r\n <div class=\"col database-title\" [innerHTML]=\"context.state.caption.title\"></div>\r\n }\r\n <ng-container *ngTemplateOutlet=\"captionTemplate; context: { $implicit: dt }\"></ng-container>\r\n <smz-table-caption-buttons [buttons]=\"context.state.caption.buttons\"></smz-table-caption-buttons>\r\n @if (context.state.caption.exportToPdf.isButtonVisible) {\r\n <button pButton [label]=\"context.state.locale.exportToPdf.label\" class=\"p-button-outlined\" icon=\"fa-solid fa-file-pdf\" (click)=\"exportToPdf(context, clonedData.items)\" [disabled]=\"clonedData.showSkeleton\"></button>\r\n }\r\n @if (context.state.caption.exportToExcel.isButtonVisible) {\r\n <button pButton [label]=\"context.state.locale.exportToExcel.label\" class=\"p-button-outlined\" icon=\"fa-solid fa-file-excel\" (click)=\"exportToExcel(table, context, clonedData.items)\" [disabled]=\"clonedData.showSkeleton\"></button>\r\n }\r\n @if (context.state.editable.creation.isButtonVisible) {\r\n <button pButton [label]=\"context.state.editable.creation.buttonLabel\" class=\"p-button-outlined\" icon=\"fa-solid fa-plus\" (click)=\"editableService.onRowCreateInit(table, context.columns)\" [disabled]=\"clonedData.showSkeleton || editableService.isEditing || editableService.isCreating || context.state.editable.creation.isButtonDisabled\"></button>\r\n }\r\n @if (context.state.caption.rowSelection.isButtonVisible) {\r\n <button pButton [label]=\"context.state.locale.rowSelection.label\" class=\"p-button-outlined\" icon=\"fa-solid fa-check-double\" (click)=\"onRowSelection(context)\" [disabled]=\"clonedData.showSkeleton\"></button>\r\n }\r\n @if (context.state.caption.clearFilters.isButtonVisible) {\r\n <button pButton [label]=\"context.state.locale.clearFilters.label\" class=\"p-button-outlined\" icon=\"pi pi-filter-slash\" (click)=\"clear(table, context)\" [disabled]=\"clonedData.showSkeleton\"></button>\r\n }\r\n @if (context.state.caption.columnVisibility.showDropdownSelector) {\r\n <p-multiSelect\r\n #columnMultiselect\r\n class=\"ml-2 col-12 md:col-2\"\r\n styleClass=\"w-full\"\r\n [options]=\"context.hideableColumns\"\r\n [(ngModel)]=\"selectedColumns\"\r\n [placeholder]=\"context.state.locale.columnVisibility.placeholder\"\r\n [selectedItemsLabel]=\"context.state.locale.columnVisibility.selectedItemsLabel\"\r\n optionLabel=\"name\"\r\n dataKey=\"field\"\r\n optionLabel=\"header\"\r\n [filter]=\"true\"\r\n (onPanelHide)=\"updateColumnsVisibility(true)\"\r\n [pTooltip]=\"context.state.locale.columnVisibility.pTooltip\">\r\n </p-multiSelect>\r\n }\r\n @if (context.state.caption.globalFilter.isVisible) {\r\n <p-iconfield class=\"col-12\" [ngClass]=\"{ 'md:col-2': !context.state.caption.globalFilter.expanded }\">\r\n <p-inputicon styleClass=\"pi pi-search\" />\r\n <input #inputGlobal [(ngModel)]=\"globalSearchInput\" pInputText type=\"text\" styleClass=\"database-global-search\" (input)=\"updateGlobalFilter(inputGlobal.value)\" [disabled]=\"clonedData.showSkeleton\" [placeholder]=\"context.state.locale.globalFilter.placeholder\" />\r\n </p-iconfield>\r\n }\r\n </div>\r\n @if (toolbarTemplate != null) {\r\n <div class=\"grid grid-nogutter items-center mt-2\" [ngClass]=\"'justify-' + context.state.caption.toolbarAlignment\">\r\n <ng-container *ngTemplateOutlet=\"toolbarTemplate; context: { $implicit: dt }\"></ng-container>\r\n </div>\r\n }\r\n </ng-template>\r\n }\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr [ngClass]=\"{ 'invisible-header': !context.state.header.isVisible }\">\r\n @if (context.state.caption.rowSelection.isEnabled) {\r\n <th [ngStyle]=\"context.state.caption.rowSelection.ngStyle\">\r\n @if (!context.state.actions.batchActions.isVisible) {\r\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\r\n }\r\n </th>\r\n }\r\n @if (context.state.rowExpansion.isEnabled) {\r\n <th [ngStyle]=\"context.state.rowExpansion.ngStyle\"></th>\r\n }\r\n @for (col of columns; track col) {\r\n @if (context.state.viewport.resizableColumns) {\r\n @if (col.isOrderable) {\r\n <th [pSortableColumn]=\"col.sortField\" pResizableColumn [ngStyle]=\"col.content.ngStyle\" [ngClass]=\"col.headerStyleClass\">\r\n <ng-container *ngTemplateOutlet=\"headerContent\"></ng-container>\r\n </th>\r\n }\r\n @if (!col.isOrderable) {\r\n <th pResizableColumn [ngStyle]=\"col.content.ngStyle\" [ngClass]=\"col.headerStyleClass\">\r\n <ng-container *ngTemplateOutlet=\"headerContent\"></ng-container>\r\n </th>\r\n }\r\n } @else {\r\n @if (col.isOrderable) {\r\n <th [pSortableColumn]=\"col.sortField\" [ngStyle]=\"col.content.ngStyle\" [ngClass]=\"col.headerStyleClass\">\r\n <ng-container *ngTemplateOutlet=\"headerContent\"></ng-container>\r\n </th>\r\n }\r\n @if (!col.isOrderable) {\r\n <th [ngStyle]=\"col.content.ngStyle\" [ngClass]=\"col.headerStyleClass\">\r\n <ng-container *ngTemplateOutlet=\"headerContent\"></ng-container>\r\n </th>\r\n }\r\n }\r\n <ng-template #headerContent>\r\n <div class=\"flex justify-start items-center\">\r\n <span class=\"mr-1\">{{ col.header }}</span>\r\n @if (col.showHeaderActions) {\r\n <smz-table-header-actions clickStopPropagation class=\"ml-1 mt-1\" [col]=\"col\"></smz-table-header-actions>\r\n }\r\n @if (!clonedData.showSkeleton && col.isOrderable) {\r\n <p-sortIcon [field]=\"col.sortField\"></p-sortIcon>\r\n }\r\n @if (!clonedData.showSkeleton) {\r\n @switch (col.filter.type) {\r\n @case (filterTypes.currency) {\r\n <smz-column-filter type=\"numeric\" currency=\"BRL\" [field]=\"col.filterField\"></smz-column-filter>\r\n }\r\n @case (filterTypes.numeric) {\r\n <smz-column-filter type=\"numeric\" [field]=\"col.filterField\"></smz-column-filter>\r\n }\r\n @case (filterTypes.date) {\r\n <smz-column-filter type=\"date\" [field]=\"col.filterField\" [showTime]=\"col.filter.showTime\"></smz-column-filter>\r\n }\r\n @case (filterTypes.text) {\r\n <smz-column-filter type=\"text\" [field]=\"col.filterField\"></smz-column-filter>\r\n }\r\n @case (filterTypes.boolean) {\r\n <smz-column-filter type=\"boolean\" [field]=\"col.filterField\"></smz-column-filter>\r\n }\r\n @case (filterTypes.dropdown) {\r\n @if (col.filterField | filterObject; as filterField) {\r\n <smz-column-filter [field]=\"filterField + '.id'\" matchMode=\"dropdown\" [showMatchModes]=\"false\" [showOperator]=\"false\" [showAddButton]=\"false\">\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"px-3 pt-3 pb-0\">\r\n <span class=\"p-text-bold\">{{ col.header }}</span>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"filter\" let-value let-filter=\"filter\">\r\n <p-select appendTo=\"body\" [ngModel]=\"value\" [options]=\"(clonedData.items != null ? clonedData.items : []) | uniqueFilter : filterField + '.id' : filterField : null : 'name' : false\" [placeholder]=\"context.state.locale.dropdownFilter.placeholder\" (onChange)=\"filter($event.value)\" optionLabel=\"name\" dataKey=\"id\"></p-select>\r\n </ng-template>\r\n </smz-column-filter>\r\n }\r\n }\r\n @case (filterTypes.multiselect) {\r\n @if (col.filterField | filterObject; as filterField) {\r\n <smz-column-filter [field]=\"filterField\" matchMode=\"in\" [showMatchModes]=\"false\" [showOperator]=\"false\" [showAddButton]=\"false\">\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"px-3 pt-3 pb-0\">\r\n <span class=\"p-text-bold\">{{ col.header }}</span>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"filter\" let-value let-filter=\"filter\">\r\n <p-multiSelect [ngModel]=\"value\" [options]=\"(clonedData.items != null ? clonedData.items : []) | uniqueFilter : filterField + '.id' : filterField : null : 'name' : false\" [placeholder]=\"context.state.locale.dropdownFilter.placeholder\" (onChange)=\"filter($event.value)\" optionLabel=\"name\" dataKey=\"id\"></p-multiSelect>\r\n </ng-template>\r\n </smz-column-filter>\r\n }\r\n }\r\n @case (filterTypes.multiselect_array) {\r\n @if (col.filterField | filterObject; as filterField) {\r\n <smz-column-filter [field]=\"filterField\" matchMode=\"array-some\" [showMatchModes]=\"false\" [showOperator]=\"false\" [showAddButton]=\"false\">\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"px-3 pt-3 pb-0\">\r\n <span class=\"p-text-bold\">{{ col.header }}</span>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"filter\" let-value let-filter=\"filter\">\r\n <p-multiSelect [ngModel]=\"value\" [options]=\"(clonedData.items != null ? clonedData.items : []) | uniqueFilter : filterField + '.id' : filterField : null : 'name' : true\" [placeholder]=\"context.state.locale.dropdownFilter.placeholder\" (onChange)=\"filter($event.value)\" optionLabel=\"name\" dataKey=\"id\" [maxSelectedLabels]=\"2\" [selectedItemsLabel]=\"'{0}'\"></p-multiSelect>\r\n </ng-template>\r\n </smz-column-filter>\r\n }\r\n }\r\n @case (filterTypes.multiselect_string) {\r\n @if (col.filterField | filterObject; as filterField) {\r\n <smz-column-filter [field]=\"filterField\" matchMode=\"multiselectByString\" [showMatchModes]=\"false\" [showOperator]=\"false\" [showAddButton]=\"false\">\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"px-3 pt-3 pb-0\">\r\n <span class=\"p-text-bold\">{{ col.header }}</span>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"filter\" let-value let-filter=\"filter\">\r\n <p-multiSelect [ngModel]=\"value\" [options]=\"(clonedData.items != null ? clonedData.items : []) | uniqueFilter : filterField : filterField : null : true : false : false\" [placeholder]=\"context.state.locale.dropdownFilter.placeholder\" (onChange)=\"filter($event.value)\" [maxSelectedLabels]=\"2\" [selectedItemsLabel]=\"'{0}'\"></p-multiSelect>\r\n </ng-template>\r\n </smz-column-filter>\r\n }\r\n }\r\n }\r\n }\r\n @if (context.state.caption.columnVisibility.showColumnHideButton) {\r\n <button pButton type=\"button\" icon=\"fa-solid fa-eye-slash\" class=\"p-button-rounded p-button-text p-button-plain\" (click)=\"hideColumn(col, context)\"></button>\r\n }\r\n </div>\r\n </ng-template>\r\n }\r\n @if (context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible|| context.state.editable.isEditable) {\r\n <th [ngStyle]=\"context.state.editable.isEditable ? context.state.editable.ngStyle : context.state.actions.customActions.ngStyle\"></th>\r\n }\r\n </tr>\r\n @if (context.state.actions.batchActions.isVisible) {\r\n <tr>\r\n <th [attr.colspan]=\"columns.length + ((context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible || context.state.editable.isEditable) ? 1 : 0) + (context.state.caption.rowSelection.isEnabled ? 1 : 0) + (context.state.rowExpansion.isEnabled ? 1 : 0)\"\r\n [ngStyle]=\"context.state.actions.customActions.ngStyle\" class=\"px-0\">\r\n <div class=\"grid grid-nogutter items-center justify-start\">\r\n <p-tableHeaderCheckbox class=\"mr-4\"></p-tableHeaderCheckbox>\r\n @if (selectedItems?.length > 0) {\r\n @for (batchItem of context.state.actions.batchActions.items; track batchItem) {\r\n @if (batchItem.visible) {\r\n <button pButton [label]=\"batchItem.label\" class=\"p-button-rounded p-button-text p-button-plain animate__animated animate__fadeIn\" [ngClass]=\"batchItem.styleClass\" [icon]=\"batchItem.icon\" (click)=\"batchItem.command(selectedItems); selectedItems = [];\" [disabled]=\"batchItem.disabled\" [pTooltip]=\"batchItem.tooltip\"></button>\r\n }\r\n }\r\n }\r\n </div>\r\n </th>\r\n </tr>\r\n }\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-item let-editing=\"editing\" let-rowIndex=\"rowIndex\" let-columns=\"columns\">\r\n <tr #editableRowElement\r\n [pEditableRow]=\"item\"\r\n tableItemAction\r\n [isClickable]=\"context.state.actions.rowBehavior.isClickable\"\r\n [callback]=\"context.state.actions.rowBehavior.clickCallback\"\r\n [expandRowOnClick]=\"context.state.actions.rowBehavior.expandRowOnClick\"\r\n [item]=\"item\"\r\n class=\"p-selectable-row\"\r\n [ngClass]=\"{ 'highlight-row': item?.id === state.actions.rowBehavior.highlights, 'preserve-in-small': state.actions.rowBehavior.preserveLayoutInSmallDevices }\"\r\n >\r\n @if (context.state.caption.rowSelection.isEnabled && !clonedData.showSkeleton) {\r\n <td\r\n clickStopPropagation\r\n class=\"{{ state.actions.rowBehavior.cellStyleClass }}\"\r\n [ngClass]=\"{ 'opacity-50 pointer-events-none': editableService.context[item.id]?.hasErrors || editableService.context[item.id]?.isLoading }\"\r\n [ngStyle]=\"context.state.caption.rowSelection.ngStyle\"\r\n >\r\n <p-tableCheckbox [value]=\"item\"></p-tableCheckbox>\r\n </td>\r\n }\r\n @if (context.state.rowExpansion.isEnabled && !clonedData.showSkeleton) {\r\n <td\r\n clickStopPropagation\r\n class=\"{{ state.actions.rowBehavior.cellStyleClass }}\"\r\n [ngClass]=\"{ 'opacity-50 pointer-events-none': editableService.context[item.id]?.hasErrors || editableService.context[item.id]?.isLoading, 'grid grid-nogutter justify-start items-center gap-2': context.state.rowExpansion.highlightNewItems && item._isNew }\"\r\n [ngStyle]=\"context.state.rowExpansion.ngStyle\"\r\n >\r\n <p-toggleButton [(ngModel)]=\"item._isExpanded\" [onIcon]=\"'fa-solid fa-chevron-down'\" [offIcon]=\"'fa-solid fa-chevron-right'\" (onChange)=\"item._isNew = false\"></p-toggleButton>\r\n @if (context.state.rowExpansion.highlightNewItems && item._isNew) {\r\n <div class=\"rounded bg-cyan-400 text-sm text-white px-2 py-0 smz-table-new-tag\" (click)=\"item._isNew = false\">{{ context.state.rowExpansion.highlightLabel }}</div>\r\n }\r\n </td>\r\n }\r\n @for (col of columns; track col) {\r\n @if (clonedData.showSkeleton) {\r\n <td class=\"{{ state.actions.rowBehavior.cellStyleClass }}\" [ngStyle]=\"col.content.ngStyle\"><p-skeleton width=\"100%\" height=\"1rem\"></p-skeleton></td>\r\n } @else {\r\n <td class=\"{{ state.actions.rowBehavior.cellStyleClass }}\" [ngClass]=\"{ 'opacity-50 pointer-events-none': editableService.context[item.id]?.hasErrors || editableService.context[item.id]?.isLoading }\" [ngStyle]=\"col.content.ngStyle\">\r\n <span class=\"p-column-title\">{{ col.header }}</span>\r\n <p-cellEditor>\r\n <!-- CELULAR COM EDITOR -->\r\n <ng-template pTemplate=\"input\">\r\n @switch (col.editable.type) {\r\n @case (editableTypes.none) {\r\n <smz-table-content class=\"cursor-default\" [ngClass]=\"col.content.contentStyleClass\" [col]=\"col\" [contentTypes]=\"contentTypes\" [item]=\"item\" [rowIndex]=\"rowIndex\" [contentTemplate]=\"contentTemplate\"></smz-table-content>\r\n }\r\n @case (editableTypes.custom) {\r\n <ng-container *ngTemplateOutlet=\"editableTemplate; context: { $implicit: item, col: col }\"></ng-container>\r\n }\r\n <!-- INPUT TEXT -->\r\n @case (editableTypes.text) {\r\n @if (editableService.context[item.id]?.form; as form) {\r\n @if (form.controls[col.editable.property]; as control) {\r\n <div class=\"relative w-full\">\r\n <input pInputText type=\"text\" [formControl]=\"$any(control)\" style=\"width: 100%;\">\r\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\r\n </div>\r\n }\r\n }\r\n }\r\n <!-- INPUT NUMBER -->\r\n @case (editableTypes.number) {\r\n @if (editableService.context[item.id]?.form; as form) {\r\n @if (form.controls[col.editable.property]; as control) {\r\n <div class=\"relative w-full\">\r\n <p-inputNumber\r\n *ngVar=\"col.editable.data as numberData\"\r\n [formControl]=\"$any(control)\"\r\n [mode]=\"numberData.mode\"\r\n [minFractionDigits]=\"numberData.minFractionDigits\"\r\n [maxFractionDigits]=\"numberData.maxFractionDigits\"\r\n [currency]=\"numberData.currency\"\r\n [useGrouping]=\"numberData.useGrouping\"\r\n [allowEmpty]=\"numberData.allowEmpty\"\r\n [showClear]=\"numberData.showClear\"\r\n [showButtons]=\"numberData.showButtons\"\r\n [prefix]=\"numberData.prefix\"\r\n [suffix]=\"numberData.suffix\">\r\n </p-inputNumber>\r\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\r\n </div>\r\n }\r\n }\r\n }\r\n <!-- INPUT SWITCH -->\r\n @case (editableTypes.switch) {\r\n @if (editableService.context[item.id]?.form; as form) {\r\n @if (form.controls[col.editable.property]; as control) {\r\n <div class=\"relative w-full\">\r\n <p-toggleswitch [formControl]=\"$any(control)\"></p-toggleswitch>\r\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\r\n </div>\r\n }\r\n }\r\n }\r\n <!-- INPUT TEXT AREA -->\r\n @case (editableTypes.area) {\r\n @if (editableService.context[item.id]?.form; as form) {\r\n @if (form.controls[col.editable.property]; as control) {\r\n <div class=\"relative w-full\">\r\n <textarea pInputTextarea type=\"text\" [formControl]=\"$any(control)\" [rows]=\"$any(col.editable.data).rows\" required style=\"width: 100%;\"></textarea>\r\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\r\n </div>\r\n }\r\n }\r\n }\r\n <!-- INPUT DROPDOWN -->\r\n @case (editableTypes.dropdown) {\r\n @if (editableService.context[item.id]?.form; as form) {\r\n @if (form.controls[col.editable.property]; as control) {\r\n <div class=\"relative w-full\">\r\n <p-select appendTo=\"body\" [formControl]=\"$any(control)\" styleClass=\"w-full\" [options]=\"col.editable.data | editableSource\" optionLabel=\"name\" dataKey=\"id\" [placeholder]=\"$any(col.editable.data).placeholder\" [showClear]=\"!col.editable.validatorsPreset?.isRequired\" [filter]=\"true\"></p-select>\r\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\r\n </div>\r\n }\r\n }\r\n }\r\n <!-- INPUT CALENDAR -->\r\n @case (editableTypes.calendar) {\r\n @if (editableService.context[item.id]?.form; as form) {\r\n @if (form.controls[col.editable.property]; as control) {\r\n <div class=\"relative w-full\">\r\n <p-datepicker [formControl]=\"$any(control)\" appendTo=\"body\" styleClass=\"w-full\" [ngClass]=\"{ 'pl-5': !control.valid }\"></p-datepicker>\r\n <smz-table-validation-messages [errors]=\"control.errors\" [messages]=\"uiConfig.dialogs.forms.validationMessages\" [isFormInvalid]=\"form.invalid\" [isFormDirty]=\"form.dirty\"></smz-table-validation-messages>\r\n </div>\r\n }\r\n }\r\n }\r\n }\r\n </ng-template>\r\n <!-- CELULAR COM CONTE\u00DADO -->\r\n <ng-template pTemplate=\"output\">\r\n <smz-table-content\r\n [col]=\"col\"\r\n [pTooltip]=\"col.content.tooltip != null ? col.content.tooltip(item) : null\"\r\n tooltipPosition=\"left\"\r\n [ngClass]=\"col.content.contentStyleClass\" [contentTypes]=\"contentTypes\" [item]=\"item\" [rowIndex]=\"rowIndex\" [contentTemplate]=\"contentTemplate\">\r\n </smz-table-content>\r\n </ng-template>\r\n </p-cellEditor>\r\n </td>\r\n }\r\n }\r\n @if (context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible || context.state.editable.isEditable) {\r\n <td [ngStyle]=\"context.state.actions.customActions.ngStyle\" class=\"px-0\">\r\n <div class=\"grid grid-nogutter items-center justify-center\">\r\n @if (clonedData.showSkeleton) {\r\n <div class=\"w-full\">\r\n <p-skeleton width=\"100%\" height=\"1rem\"></p-skeleton>\r\n </div>\r\n } @else {\r\n <!-- SEM EDITAR -->\r\n @if (!editing) {\r\n @if (context.state.editable.update.isButtonVisible) {\r\n <button pButton type=\"button\" icon=\"pi pi-pencil\" (click)=\"editableService.onRowEditInit(item)\" class=\"p-button-rounded p-button-text mx-1\" [disabled]=\"editableService.isEditing || editableService.isCreating || context.state.editable.update.isButtonDisabled || (!context.state.editable.update.condition(item))\" pInitEditableRow></button>\r\n }\r\n @if (context.state.editable.remove.isButtonVisible) {\r\n <button pButton type=\"button\" icon=\"pi pi-trash\" (click)=\"editableService.onRowRemove($event, table, item)\" class=\"p-button-rounded p-button-text p-button-secondary mx-1\" [disabled]=\"editableService.isEditing || editableService.isCreating || context.state.editable.remove.isButtonDisabled || (!context.state.editable.remove.condition(item))\"></button>\r\n }\r\n }\r\n <!-- EDITANDO -->\r\n @if (editing) {\r\n @if (editableService.context[item.id]; as editableContext) {\r\n <!-- COM LOADING -->\r\n @if (editableContext.isLoading) {\r\n <button pButton type=\"button\" icon=\"fa-solid fa-rotate fa-spin\" [disabled]=\"true\" class=\"p-button-rounded p-button-text p-button-info mr-2\"></button>\r\n }\r\n <!-- SEM LOADING -->\r\n @if (!editableContext.isLoading) {\r\n <!-- EDITANDO -->\r\n @if (!editableContext.hasErrors) {\r\n <!-- CRIANDO -->\r\n @if (item._context?.isCreating) {\r\n <button pButton type=\"button\" icon=\"pi pi-check\" (click)=\"editableService.onRowCreateSave($event, table, editableRowElement, item)\" [disabled]=\"!editableContext.hasChanged || !editableService.context[item.id]?.form.valid\" class=\"p-button-rounded p-button-text p-button-success mr-2\"></button>\r\n <button pButton type=\"button\" icon=\"pi pi-times\" (click)=\"editableService.onRowCreateCancel($event, table, item)\" class=\"p-button-rounded p-button-text p-button-danger\"></button>\r\n }\r\n <!-- ATUALIZANDO -->\r\n @if (item._context?.isUpdating) {\r\n <button pButton type=\"button\" icon=\"pi pi-check\" (click)=\"editableService.onRowEditSave($event, table, editableRowElement, item)\" [disabled]=\"!editableContext.hasChanged || !editableService.context[item.id]?.form.valid\" class=\"p-button-rounded p-button-text p-button-success mr-2\"></button>\r\n <button pButton type=\"button\" icon=\"pi pi-times\" (click)=\"editableService.onRowEditCancel($event, table, item)\" class=\"p-button-rounded p-button-text p-button-danger\"></button>\r\n }\r\n }\r\n <!-- COM ERRORS -->\r\n @if (editableContext.hasErrors) {\r\n <p-popover #errorsOverlay appendTo=\"body\" [style]=\"{ width: '450px' }\">\r\n <div [innerHtml]=\"editableContext.errors | contentErrors\"></div>\r\n </p-popover>\r\n <button pButton type=\"button\" icon=\"fas fa-exclamation-triangle\" [disabled]=\"false\" class=\"p-button-sm p-button-rounded p-button-text p-button-danger mr-2\" (click)=\"errorsOverlay.toggle($event)\"></button>\r\n <!-- CRIANDO -->\r\n @if (item._context?.isCreating) {\r\n <button pButton type=\"button\" icon=\"pi pi-times\" (click)=\"editableService.onRowCreateCancel($event, table, item)\" class=\"p-button-sm p-button-rounded p-button-text p-button-danger\"></button>\r\n }\r\n <!-- ATUALIZANDO -->\r\n @if (item._context?.isUpdating) {\r\n <button pButton type=\"button\" icon=\"pi pi-times\" (click)=\"editableService.onRowEditCancel($event, table, item)\" class=\"p-button-sm p-button-rounded p-button-text p-button-danger\"></button>\r\n }\r\n }\r\n }\r\n }\r\n }\r\n <!-- CUSTOM MENU -->\r\n @if (context.state.actions.customActions.isVisible && !editing) {\r\n <ng-container *ngTemplateOutlet=\"actionsTemplate; context: { $implicit: item }\"></ng-container>\r\n }\r\n <!-- MENU -->\r\n @if (context.state.actions.menu.isVisible && !editing) {\r\n <smz-menu [callback]=\"context.state.actions.menu.callback\" [items]=\"context.state.actions.menu.items\" [data]=\"item\" [behavior]=\"context.state.actions.menu.behavior\" [ngClass]=\"{ 'ml-2': context.state.actions.customActions.isVisible }\" [icon]=\"context.state.actions.menu.styles.icon\" [styleClass]=\"context.state.actions.menu.styles.styleClass\" [buttonClass]=\"context.state.actions.menu.styles.buttonClass\"></smz-menu>\r\n }\r\n }\r\n </div>\r\n </td>\r\n }\r\n </tr>\r\n @if (item?._isExpanded) {\r\n <tr>\r\n <td [attr.colspan]=\"columns.length + ((context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible || context.state.editable.isEditable) ? 1 : 0) + (context.state.caption.rowSelection.isEnabled ? 1 : 0) + (context.state.rowExpansion.isEnabled ? 1 : 0)\">\r\n <ng-container *ngTemplateOutlet=\"rowContentTemplate; context: { $implicit: item }\"></ng-container>\r\n </td>\r\n </tr>\r\n }\r\n </ng-template>\r\n <ng-template pTemplate=\"emptymessage\" let-columns>\r\n <tr>\r\n <td [attr.colspan]=\"columns.length + ((context.state.actions.menu.isVisible || context.state.actions.customActions.isVisible || context.state.editable.isEditable) ? 1 : 0) + (context.state.caption.rowSelection.isEnabled ? 1 : 0) + (context.state.rowExpansion.isEnabled ? 1 : 0)\" [ngStyle]=\"{ 'text-align': 'center' }\">\r\n <div [innerHtml]=\"context.state.emptyFeedback.message\"></div>\r\n @if (context.state.caption.clearFilters.isButtonVisible && hasFilters()) {\r\n <button pButton [label]=\"context.state.locale.clearFilters.label\" class=\"p-button-outlined mt-3\" icon=\"pi pi-filter-slash\" (click)=\"clear(table, context)\"></button>\r\n }\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n }\r\n </ng-container>\r\n </ng-container>\r\n }\r\n} @else {\r\n @if (emptyStateTemplate != null) {\r\n <ng-container *ngTemplateOutlet=\"emptyStateTemplate; context: { $implicit: {} }\"></ng-container>\r\n }\r\n}\r\n\r\n" }]
|
|
17665
17264
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: TableEditableService }, { type: TableFormsService }, { type: TableHelperService }, { type: i1$6.Store }, { type: SmzExcelService }], propDecorators: { templates: [{
|
|
17666
17265
|
type: ContentChildren,
|
|
17667
17266
|
args: [PrimeTemplate]
|
|
@@ -23592,7 +23191,7 @@ class NgxSmzTablesModule {
|
|
|
23592
23191
|
TooltipModule,
|
|
23593
23192
|
SkeletonModule,
|
|
23594
23193
|
TextareaModule,
|
|
23595
|
-
|
|
23194
|
+
PopoverModule,
|
|
23596
23195
|
ReactiveFormsModule,
|
|
23597
23196
|
ToggleSwitchModule,
|
|
23598
23197
|
InputNumberModule,
|
|
@@ -23620,7 +23219,7 @@ class NgxSmzTablesModule {
|
|
|
23620
23219
|
TooltipModule,
|
|
23621
23220
|
SkeletonModule,
|
|
23622
23221
|
TextareaModule,
|
|
23623
|
-
|
|
23222
|
+
PopoverModule,
|
|
23624
23223
|
ReactiveFormsModule,
|
|
23625
23224
|
ToggleSwitchModule,
|
|
23626
23225
|
InputNumberModule,
|
|
@@ -23670,7 +23269,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
23670
23269
|
TooltipModule,
|
|
23671
23270
|
SkeletonModule,
|
|
23672
23271
|
TextareaModule,
|
|
23673
|
-
|
|
23272
|
+
PopoverModule,
|
|
23674
23273
|
ReactiveFormsModule,
|
|
23675
23274
|
ToggleSwitchModule,
|
|
23676
23275
|
InputNumberModule,
|
|
@@ -24405,7 +24004,6 @@ class NgxSmzDocumentsModule {
|
|
|
24405
24004
|
SmzDocumentHiddenBreakComponent], imports: [CommonModule,
|
|
24406
24005
|
FormsModule,
|
|
24407
24006
|
BadgeModule,
|
|
24408
|
-
OverlayPanelModule,
|
|
24409
24007
|
ButtonModule,
|
|
24410
24008
|
NgxSmzTablesModule,
|
|
24411
24009
|
InputTextModule,
|
|
@@ -24420,7 +24018,6 @@ class NgxSmzDocumentsModule {
|
|
|
24420
24018
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: NgxSmzDocumentsModule, imports: [CommonModule,
|
|
24421
24019
|
FormsModule,
|
|
24422
24020
|
BadgeModule,
|
|
24423
|
-
OverlayPanelModule,
|
|
24424
24021
|
ButtonModule,
|
|
24425
24022
|
NgxSmzTablesModule,
|
|
24426
24023
|
InputTextModule,
|
|
@@ -24440,7 +24037,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
24440
24037
|
CommonModule,
|
|
24441
24038
|
FormsModule,
|
|
24442
24039
|
BadgeModule,
|
|
24443
|
-
OverlayPanelModule,
|
|
24444
24040
|
ButtonModule,
|
|
24445
24041
|
NgxSmzTablesModule,
|
|
24446
24042
|
InputTextModule,
|
|
@@ -29164,7 +28760,6 @@ class NgxSmzDialogsModule {
|
|
|
29164
28760
|
ReactiveFormsModule,
|
|
29165
28761
|
DialogModule,
|
|
29166
28762
|
// ngxsModuleForFeatureDialogsState,
|
|
29167
|
-
OverlayPanelModule,
|
|
29168
28763
|
TableModule$1,
|
|
29169
28764
|
ButtonModule,
|
|
29170
28765
|
MessageModule,
|
|
@@ -29185,7 +28780,6 @@ class NgxSmzDialogsModule {
|
|
|
29185
28780
|
ReactiveFormsModule,
|
|
29186
28781
|
DialogModule,
|
|
29187
28782
|
// ngxsModuleForFeatureDialogsState,
|
|
29188
|
-
OverlayPanelModule,
|
|
29189
28783
|
TableModule$1,
|
|
29190
28784
|
ButtonModule,
|
|
29191
28785
|
MessageModule,
|
|
@@ -29223,7 +28817,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
29223
28817
|
ReactiveFormsModule,
|
|
29224
28818
|
DialogModule,
|
|
29225
28819
|
// ngxsModuleForFeatureDialogsState,
|
|
29226
|
-
OverlayPanelModule,
|
|
29227
28820
|
TableModule$1,
|
|
29228
28821
|
ButtonModule,
|
|
29229
28822
|
MessageModule,
|
|
@@ -32370,7 +31963,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
32370
31963
|
args: [{ selector: 'smz-ui-users-page', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "\r\n<ng-container *ngVar=\"(users$ | async) as users\">\r\n\r\n <smz-ui-table #smzdt [items]=\"users\" [state]=\"tableState\" [loading]=\"false\">\r\n\r\n <ng-template pTemplate=\"caption\" let-primeTable>\r\n @for (action of (uiConfig.rbkUtils.authorization.users.pageActions | smzFlattenMenu : null); track action) {\r\n @if (action.visible) {\r\n <button pButton type=\"button\" smzMenuItemAction [item]=\"action\" [label]=\"action.label\" [icon]=\"action.icon\" [ngClass]=\"action.styleClass\" [disabled]=\"action.disabled\"></button>\r\n }\r\n }\r\n\r\n @if (uiConfig.rbkUtils.authorization.users.removalBehavior === 'deactivation') {\r\n <p-selectButton\r\n appendTo=\"body\"\r\n [options]=\"viewOptions\"\r\n [(ngModel)]=\"selectedView\"\r\n (onChange)=\"handleViewOptionChange($event.value)\"\r\n optionLabel=\"label\" optionValue=\"value\">\r\n </p-selectButton>\r\n }\r\n\r\n </ng-template>\r\n\r\n <!-- CONTE\u00DADOS COM OVERRIDE -->\r\n <ng-template pTemplate=\"content\" let-item let-col=\"col\">\r\n\r\n @switch (col.field) {\r\n @case ('displayName') {\r\n <div class=\"grid grid-nogutter items-center gap-3 justify-start\">\r\n <!-- CONTROLE DE ACESSO N\u00C3O ENCONTROU O IDENTIFICADOR DO USU\u00C1RIO -->\r\n @if (item.avatar == null) {\r\n <img\r\n [src]=\"uiConfig.rbkUtils.authorization.users.avatarPlaceholderPath\"\r\n class=\"w-14 align-middle\"\r\n />\r\n }\r\n <!-- USU\u00C1RIO COM AVATAR INFORMADO PELO CONTROLE DE ACESSO -->\r\n @if (item.avatar != null) {\r\n <img\r\n [src]=\"item.avatar\"\r\n (error)=\"handleMissingImage($event, item.name, item.avatar)\"\r\n class=\"w-14 align-middle\"\r\n />\r\n }\r\n <span>{{ item.displayName }}</span>\r\n </div>\r\n }\r\n @case ('role.name') {\r\n {{ item.role?.name }}\r\n }\r\n }\r\n\r\n </ng-template>\r\n\r\n </smz-ui-table>\r\n\r\n</ng-container>" }]
|
|
32371
31964
|
}], ctorParameters: () => [{ type: i1$6.Store }, { type: i0.ChangeDetectorRef }] });
|
|
32372
31965
|
|
|
32373
|
-
const routes$
|
|
31966
|
+
const routes$7 = [
|
|
32374
31967
|
{
|
|
32375
31968
|
path: '',
|
|
32376
31969
|
canActivate: [RbkDatabaseStateGuard],
|
|
@@ -32386,17 +31979,17 @@ const routes$9 = [
|
|
|
32386
31979
|
}
|
|
32387
31980
|
},
|
|
32388
31981
|
];
|
|
32389
|
-
const routerModuleForChildUsersModule = RouterModule.forChild(routes$
|
|
31982
|
+
const routerModuleForChildUsersModule = RouterModule.forChild(routes$7);
|
|
32390
31983
|
class UsersModule {
|
|
32391
31984
|
constructor() {
|
|
32392
31985
|
if (GlobalInjector.config.rbkUtils.authorization.users?.httpBehavior?.authentication)
|
|
32393
|
-
routes$
|
|
31986
|
+
routes$7[0].canActivate.push(RbkAuthGuard);
|
|
32394
31987
|
if (GlobalInjector.config.rbkUtils.authorization.users?.router?.claim)
|
|
32395
|
-
routes$
|
|
31988
|
+
routes$7[0].data['claim'] = GlobalInjector.config.rbkUtils.authorization.users.router.claim;
|
|
32396
31989
|
if (GlobalInjector.config.rbkUtils.authorization.users.title == null) {
|
|
32397
31990
|
throw Error('You need to specify the users title on gedi configuration.');
|
|
32398
31991
|
}
|
|
32399
|
-
routes$
|
|
31992
|
+
routes$7[0].data['title'] = GlobalInjector.config.rbkUtils.authorization.users.title;
|
|
32400
31993
|
}
|
|
32401
31994
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: UsersModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
32402
31995
|
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.1", ngImport: i0, type: UsersModule, declarations: [UsersPageComponent, UserClaimsComponent], imports: [CommonModule, i1$9.RouterModule, FormsModule,
|
|
@@ -32583,7 +32176,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
32583
32176
|
args: [{ selector: 'app-claims-page', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<smz-ui-table [items]=\"claims$ | async\" [state]=\"tableState\">\r\n\r\n <ng-template pTemplate=\"caption\">\r\n <button pButton type=\"button\" class=\"p-button p-button-primary mx-1\" label=\"CRIAR\" (click)=\"showCreationDialog()\"></button>\r\n </ng-template>\r\n\r\n</smz-ui-table>\r\n" }]
|
|
32584
32177
|
}], ctorParameters: () => [{ type: i1$6.Store }, { type: SmzDialogsService }], propDecorators: { showDeleteConfirmation: [] } });
|
|
32585
32178
|
|
|
32586
|
-
const data$
|
|
32179
|
+
const data$5 = {
|
|
32587
32180
|
layout: {
|
|
32588
32181
|
mode: 'full',
|
|
32589
32182
|
contentPadding: '2em'
|
|
@@ -32593,7 +32186,7 @@ const data$7 = {
|
|
|
32593
32186
|
clearReusableRoutes: true,
|
|
32594
32187
|
requiredStates: [CLAIMS_STATE_NAME]
|
|
32595
32188
|
};
|
|
32596
|
-
const routes$
|
|
32189
|
+
const routes$6 = [
|
|
32597
32190
|
{
|
|
32598
32191
|
path: '',
|
|
32599
32192
|
children: [
|
|
@@ -32601,7 +32194,7 @@ const routes$8 = [
|
|
|
32601
32194
|
path: '',
|
|
32602
32195
|
canActivate: [RbkAuthGuard, RbkDatabaseStateGuard],
|
|
32603
32196
|
component: ClaimsPageComponent,
|
|
32604
|
-
data: data$
|
|
32197
|
+
data: data$5
|
|
32605
32198
|
},
|
|
32606
32199
|
]
|
|
32607
32200
|
},
|
|
@@ -32612,7 +32205,7 @@ class ClaimsModule {
|
|
|
32612
32205
|
NgxSmzDataPipesModule,
|
|
32613
32206
|
ButtonModule] });
|
|
32614
32207
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ClaimsModule, imports: [CommonModule,
|
|
32615
|
-
RouterModule.forChild(routes$
|
|
32208
|
+
RouterModule.forChild(routes$6),
|
|
32616
32209
|
NgxSmzTablesModule,
|
|
32617
32210
|
NgxSmzDataPipesModule,
|
|
32618
32211
|
ButtonModule] });
|
|
@@ -32622,7 +32215,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
32622
32215
|
args: [{
|
|
32623
32216
|
imports: [
|
|
32624
32217
|
CommonModule,
|
|
32625
|
-
RouterModule.forChild(routes$
|
|
32218
|
+
RouterModule.forChild(routes$6),
|
|
32626
32219
|
NgxSmzTablesModule,
|
|
32627
32220
|
NgxSmzDataPipesModule,
|
|
32628
32221
|
ButtonModule
|
|
@@ -32854,7 +32447,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
32854
32447
|
args: [{ selector: 'app-roles-page', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<smz-ui-table [items]=\"roles$ | async\" [state]=\"tableState\">\r\n\r\n <ng-template pTemplate=\"caption\">\r\n <button pButton type=\"button\" class=\"p-button p-button-primary mx-1\" label=\"CRIAR\" (click)=\"showCreationDialog()\" [disabled]=\"!(canCreateClaims | rbkCanAccessAny)\"></button>\r\n </ng-template>\r\n\r\n <!-- CONTE\u00DADOS COM OVERRIDE -->\r\n <ng-template pTemplate=\"content\" let-item let-col=\"col\">\r\n\r\n @switch (col.field) {\r\n @case ('claims') {\r\n <div class=\"grid grid-nogutter items-start justify-start flex-col gap-1\">\r\n <ng-container *ngVar=\"(item.claims | smzInitial : 3) as limitedClaims\">\r\n <!-- <div [innerHTML]=\"limitedClaims | prettyjson\"></div> -->\r\n <ul class=\"list-disc\">\r\n @for (claim of limitedClaims; track claim) {\r\n <li class=\"\">{{ $any(claim).name }}</li>\r\n }\r\n @if (item.claims.length > 3) {\r\n <li>(...)</li>\r\n }\r\n </ul>\r\n @if (item.claims.length > 3) {\r\n <button\r\n type=\"button\"\r\n (click)=\"onShowRoleClaimsDialog(item)\"\r\n class=\"block rounded-md bg-amber-400 px-2.5 py-1.5 text-center text-sm font-semibold text-black shadow-sm hover:bg-amber-300 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-amber-500\">\r\n <i class=\"fa-solid fa-circle-info mr-2\"></i>Ver mais\r\n </button>\r\n }\r\n </ng-container>\r\n </div>\r\n }\r\n }\r\n\r\n </ng-template>\r\n\r\n</smz-ui-table>\r\n" }]
|
|
32855
32448
|
}], ctorParameters: () => [{ type: i1$6.Store }, { type: SmzDialogsService }], propDecorators: { showDeleteConfirmation: [] } });
|
|
32856
32449
|
|
|
32857
|
-
const data$
|
|
32450
|
+
const data$4 = {
|
|
32858
32451
|
layout: {
|
|
32859
32452
|
mode: 'full',
|
|
32860
32453
|
contentPadding: '2em'
|
|
@@ -32864,7 +32457,7 @@ const data$6 = {
|
|
|
32864
32457
|
clearReusableRoutes: true,
|
|
32865
32458
|
requiredStates: [ROLES_STATE_NAME, CLAIMS_STATE_NAME]
|
|
32866
32459
|
};
|
|
32867
|
-
const routes$
|
|
32460
|
+
const routes$5 = [
|
|
32868
32461
|
{
|
|
32869
32462
|
path: '',
|
|
32870
32463
|
children: [
|
|
@@ -32872,7 +32465,7 @@ const routes$7 = [
|
|
|
32872
32465
|
path: '',
|
|
32873
32466
|
canActivate: [RbkAuthGuard, RbkDatabaseStateGuard],
|
|
32874
32467
|
component: RolesPageComponent,
|
|
32875
|
-
data: data$
|
|
32468
|
+
data: data$4
|
|
32876
32469
|
},
|
|
32877
32470
|
]
|
|
32878
32471
|
},
|
|
@@ -32885,7 +32478,7 @@ class RolesModule {
|
|
|
32885
32478
|
ButtonModule,
|
|
32886
32479
|
RbkAccessControlModule] });
|
|
32887
32480
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: RolesModule, imports: [CommonModule,
|
|
32888
|
-
RouterModule.forChild(routes$
|
|
32481
|
+
RouterModule.forChild(routes$5),
|
|
32889
32482
|
NgxSmzTablesModule,
|
|
32890
32483
|
NgxSmzDataPipesModule,
|
|
32891
32484
|
NgVarModule,
|
|
@@ -32897,7 +32490,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
32897
32490
|
args: [{
|
|
32898
32491
|
imports: [
|
|
32899
32492
|
CommonModule,
|
|
32900
|
-
RouterModule.forChild(routes$
|
|
32493
|
+
RouterModule.forChild(routes$5),
|
|
32901
32494
|
NgxSmzTablesModule,
|
|
32902
32495
|
NgxSmzDataPipesModule,
|
|
32903
32496
|
NgVarModule,
|
|
@@ -33107,7 +32700,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
33107
32700
|
args: [{ selector: 'app-tenants-page', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<smz-ui-table [items]=\"tenants$ | async\" [state]=\"tableState\">\r\n\r\n <ng-template pTemplate=\"caption\">\r\n <button pButton type=\"button\" class=\"p-button p-button-primary mx-1\" label=\"CRIAR\" (click)=\"showCreationDialog()\"></button>\r\n </ng-template>\r\n\r\n</smz-ui-table>\r\n" }]
|
|
33108
32701
|
}], ctorParameters: () => [{ type: i1$6.Store }, { type: SmzDialogsService }] });
|
|
33109
32702
|
|
|
33110
|
-
const data$
|
|
32703
|
+
const data$3 = {
|
|
33111
32704
|
layout: {
|
|
33112
32705
|
mode: 'full',
|
|
33113
32706
|
contentPadding: '2em'
|
|
@@ -33117,7 +32710,7 @@ const data$5 = {
|
|
|
33117
32710
|
clearReusableRoutes: true,
|
|
33118
32711
|
requiredStates: [TENANTS_STATE_NAME]
|
|
33119
32712
|
};
|
|
33120
|
-
const routes$
|
|
32713
|
+
const routes$4 = [
|
|
33121
32714
|
{
|
|
33122
32715
|
path: '',
|
|
33123
32716
|
children: [
|
|
@@ -33125,7 +32718,7 @@ const routes$6 = [
|
|
|
33125
32718
|
path: '',
|
|
33126
32719
|
canActivate: [RbkAuthGuard, RbkDatabaseStateGuard],
|
|
33127
32720
|
component: TenantsPageComponent,
|
|
33128
|
-
data: data$
|
|
32721
|
+
data: data$3
|
|
33129
32722
|
},
|
|
33130
32723
|
]
|
|
33131
32724
|
},
|
|
@@ -33136,7 +32729,7 @@ class TenantsModule {
|
|
|
33136
32729
|
NgxSmzDataPipesModule,
|
|
33137
32730
|
ButtonModule] });
|
|
33138
32731
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: TenantsModule, imports: [CommonModule,
|
|
33139
|
-
RouterModule.forChild(routes$
|
|
32732
|
+
RouterModule.forChild(routes$4),
|
|
33140
32733
|
NgxSmzTablesModule,
|
|
33141
32734
|
NgxSmzDataPipesModule,
|
|
33142
32735
|
ButtonModule] });
|
|
@@ -33146,7 +32739,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
33146
32739
|
args: [{
|
|
33147
32740
|
imports: [
|
|
33148
32741
|
CommonModule,
|
|
33149
|
-
RouterModule.forChild(routes$
|
|
32742
|
+
RouterModule.forChild(routes$4),
|
|
33150
32743
|
NgxSmzTablesModule,
|
|
33151
32744
|
NgxSmzDataPipesModule,
|
|
33152
32745
|
ButtonModule
|
|
@@ -33458,212 +33051,6 @@ function getRouteRoot(routes) {
|
|
|
33458
33051
|
return null;
|
|
33459
33052
|
}
|
|
33460
33053
|
|
|
33461
|
-
/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-return, @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type, @typescript-eslint/typedef, no-underscore-dangle, no-console, eqeqeq, @typescript-eslint/no-unused-vars, @typescript-eslint/no-useless-constructor, @typescript-eslint/explicit-member-accessibility, max-len, no-prototype-builtins, @typescript-eslint/no-shadow, @typescript-eslint/no-empty-object-type */
|
|
33462
|
-
class RouterDataListenerService {
|
|
33463
|
-
router;
|
|
33464
|
-
activatedRoute;
|
|
33465
|
-
dialogs;
|
|
33466
|
-
store;
|
|
33467
|
-
data = null;
|
|
33468
|
-
constructor(router, activatedRoute, dialogs, store) {
|
|
33469
|
-
this.router = router;
|
|
33470
|
-
this.activatedRoute = activatedRoute;
|
|
33471
|
-
this.dialogs = dialogs;
|
|
33472
|
-
this.store = store;
|
|
33473
|
-
if (GlobalInjector.config.layouts.debugMode)
|
|
33474
|
-
console.log('>> RouterDataListenerService constructor');
|
|
33475
|
-
if (GlobalInjector.config.layouts.debugMode)
|
|
33476
|
-
console.log('>> configuration', GlobalInjector.config);
|
|
33477
|
-
let currentRouteData = null;
|
|
33478
|
-
this.router.events
|
|
33479
|
-
.pipe(filter(event => event instanceof NavigationEnd), tap$1((event) => {
|
|
33480
|
-
if (GlobalInjector.config.layouts.debugMode)
|
|
33481
|
-
console.log('\n##########');
|
|
33482
|
-
if (GlobalInjector.config.layouts.debugMode)
|
|
33483
|
-
console.log('>> NavigationEnd');
|
|
33484
|
-
if (GlobalInjector.config.layouts.applicationActions.registerLogs) {
|
|
33485
|
-
if (GlobalInjector.config.layouts.debugMode)
|
|
33486
|
-
console.log('ApplicationActions.SetLogExtraData > urlAfterRedirects', event.urlAfterRedirects);
|
|
33487
|
-
this.store.dispatch(new ApplicationActions.SetLogExtraData(event.urlAfterRedirects));
|
|
33488
|
-
}
|
|
33489
|
-
if (GlobalInjector.config.layouts._internal?.specificThemeNavigationEndCallback != null) {
|
|
33490
|
-
GlobalInjector.config.layouts._internal.specificThemeNavigationEndCallback();
|
|
33491
|
-
}
|
|
33492
|
-
}), map((event) => {
|
|
33493
|
-
if (GlobalInjector.config.layouts.debugMode) {
|
|
33494
|
-
console.group('router.events > mapping');
|
|
33495
|
-
}
|
|
33496
|
-
let route = this.activatedRoute;
|
|
33497
|
-
while (route.firstChild) {
|
|
33498
|
-
route.firstChild.data.subscribe(r => {
|
|
33499
|
-
const layout = r['layout'];
|
|
33500
|
-
if (currentRouteData == null && layout !== null) {
|
|
33501
|
-
if (GlobalInjector.config.layouts.debugMode) {
|
|
33502
|
-
console.log('> currentRouteData', currentRouteData);
|
|
33503
|
-
console.log(' layout', layout);
|
|
33504
|
-
console.log(' applying', layout);
|
|
33505
|
-
}
|
|
33506
|
-
currentRouteData = layout;
|
|
33507
|
-
}
|
|
33508
|
-
else {
|
|
33509
|
-
currentRouteData = layout == null ? currentRouteData : this.mergeLayoutDatas(currentRouteData, layout);
|
|
33510
|
-
}
|
|
33511
|
-
});
|
|
33512
|
-
route = route.firstChild;
|
|
33513
|
-
}
|
|
33514
|
-
return { event, route };
|
|
33515
|
-
}), filter((event) => event.route.outlet === 'primary'), mergeMap((x) => x.route.data))
|
|
33516
|
-
.subscribe((data) => {
|
|
33517
|
-
this.data = {
|
|
33518
|
-
...data,
|
|
33519
|
-
layout: this.normalizeLayoutData(currentRouteData)
|
|
33520
|
-
};
|
|
33521
|
-
if (GlobalInjector.config.layouts.debugMode) {
|
|
33522
|
-
console.log('all routes layout data merged for this route', currentRouteData);
|
|
33523
|
-
console.log('final router data used', this.data);
|
|
33524
|
-
console.groupEnd();
|
|
33525
|
-
}
|
|
33526
|
-
if (GlobalInjector.config.layouts.applicationActions.registerLogs) {
|
|
33527
|
-
if (GlobalInjector.config.layouts.debugMode)
|
|
33528
|
-
console.log('ApplicationActions.SetLogApplicatinArea > appArea', data.appArea);
|
|
33529
|
-
this.store.dispatch(new ApplicationActions.SetLogApplicatinArea(data.appArea));
|
|
33530
|
-
}
|
|
33531
|
-
if (GlobalInjector.config.layouts.dialogs.closeAllAfterNavigate) {
|
|
33532
|
-
if (GlobalInjector.config.layouts.debugMode)
|
|
33533
|
-
console.log('>> Closing all dialogs');
|
|
33534
|
-
this.dialogs.closeAll();
|
|
33535
|
-
}
|
|
33536
|
-
if (GlobalInjector.config.layouts.debugMode)
|
|
33537
|
-
console.log('\n');
|
|
33538
|
-
this.store.dispatch(new LayoutUiActions.SetTopbarTitle(data.title));
|
|
33539
|
-
});
|
|
33540
|
-
}
|
|
33541
|
-
normalizeLayoutData(data) {
|
|
33542
|
-
return {
|
|
33543
|
-
mode: data?.mode ? data.mode : 'full',
|
|
33544
|
-
hideFooter: data?.hideFooter ?? false,
|
|
33545
|
-
contentPadding: data?.contentPadding ? data.contentPadding : '2em',
|
|
33546
|
-
contentStyleClass: data?.contentStyleClass ?? ''
|
|
33547
|
-
};
|
|
33548
|
-
}
|
|
33549
|
-
mergeLayoutDatas(before, current) {
|
|
33550
|
-
if (GlobalInjector.config.layouts.debugMode) {
|
|
33551
|
-
console.log('> mergeLayoutDatas');
|
|
33552
|
-
console.log(' before', before);
|
|
33553
|
-
console.log(' current', current);
|
|
33554
|
-
console.log(' merging', before, current, mergeClone(before, current));
|
|
33555
|
-
}
|
|
33556
|
-
return mergeClone(before, current);
|
|
33557
|
-
}
|
|
33558
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: RouterDataListenerService, deps: [{ token: i1$9.Router }, { token: i1$9.ActivatedRoute }, { token: SmzDialogsService }, { token: i1$6.Store }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
33559
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: RouterDataListenerService, providedIn: 'root' });
|
|
33560
|
-
}
|
|
33561
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: RouterDataListenerService, decorators: [{
|
|
33562
|
-
type: Injectable,
|
|
33563
|
-
args: [{
|
|
33564
|
-
providedIn: 'root'
|
|
33565
|
-
}]
|
|
33566
|
-
}], ctorParameters: () => [{ type: i1$9.Router }, { type: i1$9.ActivatedRoute }, { type: SmzDialogsService }, { type: i1$6.Store }] });
|
|
33567
|
-
|
|
33568
|
-
/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-return, @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type, @typescript-eslint/typedef, no-underscore-dangle, no-console, eqeqeq, @typescript-eslint/no-unused-vars, @typescript-eslint/no-useless-constructor, @typescript-eslint/explicit-member-accessibility, max-len, no-prototype-builtins, @typescript-eslint/no-shadow, @typescript-eslint/no-empty-object-type */
|
|
33569
|
-
class ErrorComponent {
|
|
33570
|
-
routerListener;
|
|
33571
|
-
store;
|
|
33572
|
-
uiConfig = GlobalInjector.config;
|
|
33573
|
-
constructor(routerListener, store) {
|
|
33574
|
-
this.routerListener = routerListener;
|
|
33575
|
-
this.store = store;
|
|
33576
|
-
}
|
|
33577
|
-
ngOnInit() {
|
|
33578
|
-
if (GlobalInjector.config.rbkUtils.errorsConfig.clearBehaviors.method === 'onError') {
|
|
33579
|
-
this.clear();
|
|
33580
|
-
}
|
|
33581
|
-
}
|
|
33582
|
-
redirect(button) {
|
|
33583
|
-
if (button.callback != null) {
|
|
33584
|
-
button.callback();
|
|
33585
|
-
}
|
|
33586
|
-
else {
|
|
33587
|
-
this.store.dispatch(new Navigate([button.redirectTo]));
|
|
33588
|
-
if (GlobalInjector.config.rbkUtils.errorsConfig.clearBehaviors.method === 'onRedirect') {
|
|
33589
|
-
this.clear();
|
|
33590
|
-
}
|
|
33591
|
-
}
|
|
33592
|
-
}
|
|
33593
|
-
clear() {
|
|
33594
|
-
if (GlobalInjector.config.rbkUtils.errorsConfig.clearBehaviors.globalStates) {
|
|
33595
|
-
this.store.dispatch(new GlobalActions.Clear());
|
|
33596
|
-
}
|
|
33597
|
-
if (GlobalInjector.config.rbkUtils.errorsConfig.clearBehaviors.databaseStates) {
|
|
33598
|
-
this.store.dispatch(new DatabaseActions.Clear());
|
|
33599
|
-
}
|
|
33600
|
-
if (GlobalInjector.config.rbkUtils.errorsConfig.clearBehaviors.featuresStates) {
|
|
33601
|
-
this.store.dispatch(new FeaturesActions.Clear());
|
|
33602
|
-
}
|
|
33603
|
-
switch (GlobalInjector.config.rbkUtils.errorsConfig.clearBehaviors.localStorage) {
|
|
33604
|
-
case 'appPrefix':
|
|
33605
|
-
forIn(window.localStorage, (value, objKey) => {
|
|
33606
|
-
if (true === startsWith(objKey, GlobalInjector.config.rbkUtils.authentication.localStoragePrefix)) {
|
|
33607
|
-
window.localStorage.removeItem(objKey);
|
|
33608
|
-
}
|
|
33609
|
-
});
|
|
33610
|
-
break;
|
|
33611
|
-
case 'none':
|
|
33612
|
-
break;
|
|
33613
|
-
}
|
|
33614
|
-
if (GlobalInjector.config.rbkUtils.errorsConfig.clearBehaviors.navigationHistory) {
|
|
33615
|
-
window.history.pushState('', '', '');
|
|
33616
|
-
}
|
|
33617
|
-
}
|
|
33618
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ErrorComponent, deps: [{ token: RouterDataListenerService }, { token: i1$6.Store }], target: i0.ɵɵFactoryTarget.Component });
|
|
33619
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: ErrorComponent, isStandalone: false, selector: "smz-ui-error", ngImport: i0, template: "\r\n<!-- VERS\u00C3O DESKTOP -->\r\n<div class=\"grid justify-center items-center vertical-container exception-page\">\r\n\r\n <div class=\"grid justify-center items-center col-12 lg:col-6 grid-nogutter h-full bg-surface-ground\">\r\n <div class=\"grid col-8 items-center\">\r\n <div class=\"col-12 exception-label-error\">{{ uiConfig.rbkUtils.errorsConfig.page.title }}</div>\r\n <div class=\"col-4 exception-separator\"></div>\r\n <div class=\"col-12 exception-label-message\">{{ uiConfig.rbkUtils.errorsConfig.page.message }}</div>\r\n <div class=\"grid grid-nogutter items-center justify-start gap-2\">\r\n @for (button of uiConfig.rbkUtils.errorsConfig.page.buttons; track button) {\r\n @if (button.isVisible()) {\r\n <button [ngClass]=\"button.styleClass\" pButton type=\"button\" [label]=\"button.label\" (click)=\"redirect(button)\"></button>\r\n }\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 lg:col-6 exception-image-container\">\r\n <img [src]=\"uiConfig.rbkUtils.errorsConfig.page.imagePath\" alt=\"mirage-layout\" />\r\n </div>\r\n</div>", styles: [".exception-page{overflow:hidden;margin:0;padding:0;height:100vh;width:100vw;position:relative}.exception-image-container{margin:0;padding:0}.exception-image-container img{height:100vh;width:100%;object-fit:cover}.exception-full-image-container{position:absolute;inset:0;margin:0;padding:0;z-index:-1}.exception-full-image-container img{height:100vh;width:100vw;object-fit:cover}.exception-label-error{font-size:5em;color:var(--text-color-secondary);padding:0}.exception-separator{border-bottom:4px #f44336 solid;width:30%;border-radius:4px;margin-bottom:2em;padding:0}.exception-separator.exception-light{border-bottom:4px var(--primary-color) solid}.exception-label-message{font-size:1.4em;color:var(--primary-color);margin-bottom:2em;padding:0}.exception-light{color:var(--primary-color)}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.ButtonDirective, selector: "[pButton]", inputs: ["ptButtonDirective", "pButtonPT", "pButtonUnstyled", "hostName", "text", "plain", "raised", "size", "outlined", "rounded", "iconPos", "loadingIcon", "fluid", "label", "icon", "loading", "buttonProps", "severity"] }] });
|
|
33620
|
-
}
|
|
33621
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ErrorComponent, decorators: [{
|
|
33622
|
-
type: Component,
|
|
33623
|
-
args: [{ selector: 'smz-ui-error', standalone: false, template: "\r\n<!-- VERS\u00C3O DESKTOP -->\r\n<div class=\"grid justify-center items-center vertical-container exception-page\">\r\n\r\n <div class=\"grid justify-center items-center col-12 lg:col-6 grid-nogutter h-full bg-surface-ground\">\r\n <div class=\"grid col-8 items-center\">\r\n <div class=\"col-12 exception-label-error\">{{ uiConfig.rbkUtils.errorsConfig.page.title }}</div>\r\n <div class=\"col-4 exception-separator\"></div>\r\n <div class=\"col-12 exception-label-message\">{{ uiConfig.rbkUtils.errorsConfig.page.message }}</div>\r\n <div class=\"grid grid-nogutter items-center justify-start gap-2\">\r\n @for (button of uiConfig.rbkUtils.errorsConfig.page.buttons; track button) {\r\n @if (button.isVisible()) {\r\n <button [ngClass]=\"button.styleClass\" pButton type=\"button\" [label]=\"button.label\" (click)=\"redirect(button)\"></button>\r\n }\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 lg:col-6 exception-image-container\">\r\n <img [src]=\"uiConfig.rbkUtils.errorsConfig.page.imagePath\" alt=\"mirage-layout\" />\r\n </div>\r\n</div>", styles: [".exception-page{overflow:hidden;margin:0;padding:0;height:100vh;width:100vw;position:relative}.exception-image-container{margin:0;padding:0}.exception-image-container img{height:100vh;width:100%;object-fit:cover}.exception-full-image-container{position:absolute;inset:0;margin:0;padding:0;z-index:-1}.exception-full-image-container img{height:100vh;width:100vw;object-fit:cover}.exception-label-error{font-size:5em;color:var(--text-color-secondary);padding:0}.exception-separator{border-bottom:4px #f44336 solid;width:30%;border-radius:4px;margin-bottom:2em;padding:0}.exception-separator.exception-light{border-bottom:4px var(--primary-color) solid}.exception-label-message{font-size:1.4em;color:var(--primary-color);margin-bottom:2em;padding:0}.exception-light{color:var(--primary-color)}\n"] }]
|
|
33624
|
-
}], ctorParameters: () => [{ type: RouterDataListenerService }, { type: i1$6.Store }] });
|
|
33625
|
-
|
|
33626
|
-
const data$4 = {
|
|
33627
|
-
layout: {
|
|
33628
|
-
mode: 'none'
|
|
33629
|
-
},
|
|
33630
|
-
title: 'Erro',
|
|
33631
|
-
appArea: 'error',
|
|
33632
|
-
clearReusableRoutes: true,
|
|
33633
|
-
requiredStates: []
|
|
33634
|
-
};
|
|
33635
|
-
const routes$5 = [
|
|
33636
|
-
{
|
|
33637
|
-
path: '',
|
|
33638
|
-
canActivate: [],
|
|
33639
|
-
component: ErrorComponent,
|
|
33640
|
-
data: data$4
|
|
33641
|
-
},
|
|
33642
|
-
];
|
|
33643
|
-
const routerModuleForChildErrorModule = RouterModule.forChild(routes$5);
|
|
33644
|
-
class ErrorModule {
|
|
33645
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ErrorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
33646
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.1", ngImport: i0, type: ErrorModule, declarations: [ErrorComponent], imports: [CommonModule, i1$9.RouterModule, ButtonModule,
|
|
33647
|
-
NgxSmzFormsModule] });
|
|
33648
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ErrorModule, imports: [CommonModule,
|
|
33649
|
-
routerModuleForChildErrorModule,
|
|
33650
|
-
ButtonModule,
|
|
33651
|
-
NgxSmzFormsModule] });
|
|
33652
|
-
}
|
|
33653
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ErrorModule, decorators: [{
|
|
33654
|
-
type: NgModule,
|
|
33655
|
-
args: [{
|
|
33656
|
-
declarations: [ErrorComponent],
|
|
33657
|
-
imports: [
|
|
33658
|
-
CommonModule,
|
|
33659
|
-
routerModuleForChildErrorModule,
|
|
33660
|
-
ButtonModule,
|
|
33661
|
-
NgxSmzFormsModule,
|
|
33662
|
-
],
|
|
33663
|
-
exports: []
|
|
33664
|
-
}]
|
|
33665
|
-
}] });
|
|
33666
|
-
|
|
33667
33054
|
var SmzContentTheme;
|
|
33668
33055
|
(function (SmzContentTheme) {
|
|
33669
33056
|
SmzContentTheme["ARYA_BLUE"] = "arya-blue/theme.css";
|
|
@@ -34618,7 +34005,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
34618
34005
|
args: [{ selector: 'smz-ui-login-page', standalone: false, template: "<smz-ui-login [state]=\"state\"></smz-ui-login>" }]
|
|
34619
34006
|
}], ctorParameters: () => [{ type: i1$6.Store }] });
|
|
34620
34007
|
|
|
34621
|
-
const data$
|
|
34008
|
+
const data$2 = {
|
|
34622
34009
|
layout: {
|
|
34623
34010
|
mode: 'none'
|
|
34624
34011
|
},
|
|
@@ -34627,20 +34014,20 @@ const data$3 = {
|
|
|
34627
34014
|
clearReusableRoutes: true,
|
|
34628
34015
|
requiredStates: []
|
|
34629
34016
|
};
|
|
34630
|
-
const routes$
|
|
34017
|
+
const routes$3 = [
|
|
34631
34018
|
{
|
|
34632
34019
|
path: '',
|
|
34633
34020
|
canActivate: [RbkDatabaseStateGuard],
|
|
34634
34021
|
component: LoginComponent,
|
|
34635
|
-
data: data$
|
|
34022
|
+
data: data$2
|
|
34636
34023
|
},
|
|
34637
34024
|
];
|
|
34638
|
-
const routerModuleForChildLoginModule = RouterModule.forChild(routes$
|
|
34025
|
+
const routerModuleForChildLoginModule = RouterModule.forChild(routes$3);
|
|
34639
34026
|
class LoginModule {
|
|
34640
34027
|
constructor() {
|
|
34641
34028
|
const config = GlobalInjector.config;
|
|
34642
34029
|
if (!config.rbkUtils.authentication.useSingleTenantAplication) {
|
|
34643
|
-
data$
|
|
34030
|
+
data$2.requiredStates.push(TENANTS_STATE_NAME);
|
|
34644
34031
|
}
|
|
34645
34032
|
}
|
|
34646
34033
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: LoginModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
@@ -34675,64 +34062,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
34675
34062
|
}]
|
|
34676
34063
|
}], ctorParameters: () => [] });
|
|
34677
34064
|
|
|
34678
|
-
/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-return, @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type, @typescript-eslint/typedef, no-underscore-dangle, no-console, eqeqeq, @typescript-eslint/no-unused-vars, @typescript-eslint/no-useless-constructor, @typescript-eslint/explicit-member-accessibility, max-len, no-prototype-builtins, @typescript-eslint/no-shadow, @typescript-eslint/no-empty-object-type */
|
|
34679
|
-
class NotFoundComponent {
|
|
34680
|
-
uiConfig = GlobalInjector.config;
|
|
34681
|
-
constructor() {
|
|
34682
|
-
}
|
|
34683
|
-
ngOnInit() {
|
|
34684
|
-
}
|
|
34685
|
-
clear() {
|
|
34686
|
-
}
|
|
34687
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: NotFoundComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
34688
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.1", type: NotFoundComponent, isStandalone: false, selector: "smz-ui-not-found", ngImport: i0, template: "<!-- VERS\u00C3O DESKTOP -->\r\n<div class=\"grid justify-center items-center vertical-container exception-page\">\r\n\r\n <div class=\"grid justify-center items-center col-12 lg:col-6 grid-nogutter\">\r\n <div class=\"grid col-8 items-center\">\r\n <div class=\"col-12 exception-label-error\">{{ uiConfig.layouts.pages.notFoundTitle }}</div>\r\n <div class=\"col-4 exception-separator\"></div>\r\n <div class=\"col-12 exception-label-message\">{{ uiConfig.layouts.pages.notFoundMessage }}</div>\r\n <button class=\"col-4 p-button-lg p-button-ghost\" pButton type=\"button\" [routerLink]=\"uiConfig.rbkUtils.authentication.authenticatedRoot\" label=\"Ir para Home\"></button>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 lg:col-6 exception-image-container\">\r\n <img [src]=\"uiConfig.layouts.pages.notFoundImagePath\"/>\r\n </div>\r\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i1$9.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i4.ButtonDirective, selector: "[pButton]", inputs: ["ptButtonDirective", "pButtonPT", "pButtonUnstyled", "hostName", "text", "plain", "raised", "size", "outlined", "rounded", "iconPos", "loadingIcon", "fluid", "label", "icon", "loading", "buttonProps", "severity"] }] });
|
|
34689
|
-
}
|
|
34690
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: NotFoundComponent, decorators: [{
|
|
34691
|
-
type: Component,
|
|
34692
|
-
args: [{ selector: 'smz-ui-not-found', standalone: false, template: "<!-- VERS\u00C3O DESKTOP -->\r\n<div class=\"grid justify-center items-center vertical-container exception-page\">\r\n\r\n <div class=\"grid justify-center items-center col-12 lg:col-6 grid-nogutter\">\r\n <div class=\"grid col-8 items-center\">\r\n <div class=\"col-12 exception-label-error\">{{ uiConfig.layouts.pages.notFoundTitle }}</div>\r\n <div class=\"col-4 exception-separator\"></div>\r\n <div class=\"col-12 exception-label-message\">{{ uiConfig.layouts.pages.notFoundMessage }}</div>\r\n <button class=\"col-4 p-button-lg p-button-ghost\" pButton type=\"button\" [routerLink]=\"uiConfig.rbkUtils.authentication.authenticatedRoot\" label=\"Ir para Home\"></button>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 lg:col-6 exception-image-container\">\r\n <img [src]=\"uiConfig.layouts.pages.notFoundImagePath\"/>\r\n </div>\r\n</div>" }]
|
|
34693
|
-
}], ctorParameters: () => [] });
|
|
34694
|
-
|
|
34695
|
-
const data$2 = {
|
|
34696
|
-
layout: {
|
|
34697
|
-
mode: 'none'
|
|
34698
|
-
},
|
|
34699
|
-
title: 'Rota não encontrada',
|
|
34700
|
-
appArea: 'not-found',
|
|
34701
|
-
clearReusableRoutes: true,
|
|
34702
|
-
requiredStates: []
|
|
34703
|
-
};
|
|
34704
|
-
const routes$3 = [
|
|
34705
|
-
{
|
|
34706
|
-
path: '',
|
|
34707
|
-
canActivate: [],
|
|
34708
|
-
component: NotFoundComponent,
|
|
34709
|
-
data: data$2
|
|
34710
|
-
},
|
|
34711
|
-
];
|
|
34712
|
-
const routerModuleForChildNotFoundModule = RouterModule.forChild(routes$3);
|
|
34713
|
-
class NotFoundModule {
|
|
34714
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: NotFoundModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
34715
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.1", ngImport: i0, type: NotFoundModule, declarations: [NotFoundComponent], imports: [CommonModule, i1$9.RouterModule, ButtonModule,
|
|
34716
|
-
NgxSmzFormsModule] });
|
|
34717
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: NotFoundModule, imports: [CommonModule,
|
|
34718
|
-
routerModuleForChildNotFoundModule,
|
|
34719
|
-
ButtonModule,
|
|
34720
|
-
NgxSmzFormsModule] });
|
|
34721
|
-
}
|
|
34722
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: NotFoundModule, decorators: [{
|
|
34723
|
-
type: NgModule,
|
|
34724
|
-
args: [{
|
|
34725
|
-
declarations: [NotFoundComponent],
|
|
34726
|
-
imports: [
|
|
34727
|
-
CommonModule,
|
|
34728
|
-
routerModuleForChildNotFoundModule,
|
|
34729
|
-
ButtonModule,
|
|
34730
|
-
NgxSmzFormsModule,
|
|
34731
|
-
],
|
|
34732
|
-
exports: []
|
|
34733
|
-
}]
|
|
34734
|
-
}] });
|
|
34735
|
-
|
|
34736
34065
|
/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-return, @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type, @typescript-eslint/typedef, no-underscore-dangle, no-console, eqeqeq, @typescript-eslint/no-unused-vars, @typescript-eslint/no-useless-constructor, @typescript-eslint/explicit-member-accessibility, max-len, no-prototype-builtins, @typescript-eslint/no-shadow, @typescript-eslint/no-empty-object-type */
|
|
34737
34066
|
class SuperuserLoginComponent {
|
|
34738
34067
|
store;
|
|
@@ -35247,13 +34576,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
35247
34576
|
/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-return, @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type, @typescript-eslint/typedef, no-underscore-dangle, no-console, eqeqeq, @typescript-eslint/no-unused-vars, @typescript-eslint/no-useless-constructor, @typescript-eslint/explicit-member-accessibility, max-len, no-prototype-builtins, @typescript-eslint/no-shadow, @typescript-eslint/no-empty-object-type */
|
|
35248
34577
|
function getLoginModule() { return LoginModule; }
|
|
35249
34578
|
function getSuperuserLoginModule() { return SuperuserLoginModule; }
|
|
35250
|
-
function getErrorModule() { return ErrorModule; }
|
|
35251
|
-
function getNotFoundModule() { return NotFoundModule; }
|
|
34579
|
+
// export function getErrorModule() { return ErrorModule; }
|
|
34580
|
+
// export function getNotFoundModule() { return NotFoundModule; }
|
|
35252
34581
|
function getDiagnosticsDataCollectModule() { return DiagnosticsDataCollectModule; }
|
|
35253
34582
|
const routes = [
|
|
35254
|
-
{ path: 'error', loadChildren: getErrorModule },
|
|
35255
34583
|
{ path: 'diagnostics-data-collect', loadChildren: getDiagnosticsDataCollectModule },
|
|
35256
|
-
{ path: 'notfound', loadChildren: getNotFoundModule },
|
|
35257
34584
|
{ path: '**', redirectTo: 'notfound' },
|
|
35258
34585
|
];
|
|
35259
34586
|
const routerModuleForRootNgxSmzLayoutsModule = RouterModule.forRoot(routes, { paramsInheritanceStrategy: 'always' });
|
|
@@ -36497,6 +35824,113 @@ __decorate([
|
|
|
36497
35824
|
Selector([UiHephaestusState])
|
|
36498
35825
|
], UiHephaestusSelectors, "layout", null);
|
|
36499
35826
|
|
|
35827
|
+
/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-return, @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type, @typescript-eslint/typedef, no-underscore-dangle, no-console, eqeqeq, @typescript-eslint/no-unused-vars, @typescript-eslint/no-useless-constructor, @typescript-eslint/explicit-member-accessibility, max-len, no-prototype-builtins, @typescript-eslint/no-shadow, @typescript-eslint/no-empty-object-type */
|
|
35828
|
+
class RouterDataListenerService {
|
|
35829
|
+
router;
|
|
35830
|
+
activatedRoute;
|
|
35831
|
+
dialogs;
|
|
35832
|
+
store;
|
|
35833
|
+
data = null;
|
|
35834
|
+
constructor(router, activatedRoute, dialogs, store) {
|
|
35835
|
+
this.router = router;
|
|
35836
|
+
this.activatedRoute = activatedRoute;
|
|
35837
|
+
this.dialogs = dialogs;
|
|
35838
|
+
this.store = store;
|
|
35839
|
+
if (GlobalInjector.config.layouts.debugMode)
|
|
35840
|
+
console.log('>> RouterDataListenerService constructor');
|
|
35841
|
+
if (GlobalInjector.config.layouts.debugMode)
|
|
35842
|
+
console.log('>> configuration', GlobalInjector.config);
|
|
35843
|
+
let currentRouteData = null;
|
|
35844
|
+
this.router.events
|
|
35845
|
+
.pipe(filter(event => event instanceof NavigationEnd), tap$1((event) => {
|
|
35846
|
+
if (GlobalInjector.config.layouts.debugMode)
|
|
35847
|
+
console.log('\n##########');
|
|
35848
|
+
if (GlobalInjector.config.layouts.debugMode)
|
|
35849
|
+
console.log('>> NavigationEnd');
|
|
35850
|
+
if (GlobalInjector.config.layouts.applicationActions.registerLogs) {
|
|
35851
|
+
if (GlobalInjector.config.layouts.debugMode)
|
|
35852
|
+
console.log('ApplicationActions.SetLogExtraData > urlAfterRedirects', event.urlAfterRedirects);
|
|
35853
|
+
this.store.dispatch(new ApplicationActions.SetLogExtraData(event.urlAfterRedirects));
|
|
35854
|
+
}
|
|
35855
|
+
if (GlobalInjector.config.layouts._internal?.specificThemeNavigationEndCallback != null) {
|
|
35856
|
+
GlobalInjector.config.layouts._internal.specificThemeNavigationEndCallback();
|
|
35857
|
+
}
|
|
35858
|
+
}), map((event) => {
|
|
35859
|
+
if (GlobalInjector.config.layouts.debugMode) {
|
|
35860
|
+
console.group('router.events > mapping');
|
|
35861
|
+
}
|
|
35862
|
+
let route = this.activatedRoute;
|
|
35863
|
+
while (route.firstChild) {
|
|
35864
|
+
route.firstChild.data.subscribe(r => {
|
|
35865
|
+
const layout = r['layout'];
|
|
35866
|
+
if (currentRouteData == null && layout !== null) {
|
|
35867
|
+
if (GlobalInjector.config.layouts.debugMode) {
|
|
35868
|
+
console.log('> currentRouteData', currentRouteData);
|
|
35869
|
+
console.log(' layout', layout);
|
|
35870
|
+
console.log(' applying', layout);
|
|
35871
|
+
}
|
|
35872
|
+
currentRouteData = layout;
|
|
35873
|
+
}
|
|
35874
|
+
else {
|
|
35875
|
+
currentRouteData = layout == null ? currentRouteData : this.mergeLayoutDatas(currentRouteData, layout);
|
|
35876
|
+
}
|
|
35877
|
+
});
|
|
35878
|
+
route = route.firstChild;
|
|
35879
|
+
}
|
|
35880
|
+
return { event, route };
|
|
35881
|
+
}), filter((event) => event.route.outlet === 'primary'), mergeMap((x) => x.route.data))
|
|
35882
|
+
.subscribe((data) => {
|
|
35883
|
+
this.data = {
|
|
35884
|
+
...data,
|
|
35885
|
+
layout: this.normalizeLayoutData(currentRouteData)
|
|
35886
|
+
};
|
|
35887
|
+
if (GlobalInjector.config.layouts.debugMode) {
|
|
35888
|
+
console.log('all routes layout data merged for this route', currentRouteData);
|
|
35889
|
+
console.log('final router data used', this.data);
|
|
35890
|
+
console.groupEnd();
|
|
35891
|
+
}
|
|
35892
|
+
if (GlobalInjector.config.layouts.applicationActions.registerLogs) {
|
|
35893
|
+
if (GlobalInjector.config.layouts.debugMode)
|
|
35894
|
+
console.log('ApplicationActions.SetLogApplicatinArea > appArea', data.appArea);
|
|
35895
|
+
this.store.dispatch(new ApplicationActions.SetLogApplicatinArea(data.appArea));
|
|
35896
|
+
}
|
|
35897
|
+
if (GlobalInjector.config.layouts.dialogs.closeAllAfterNavigate) {
|
|
35898
|
+
if (GlobalInjector.config.layouts.debugMode)
|
|
35899
|
+
console.log('>> Closing all dialogs');
|
|
35900
|
+
this.dialogs.closeAll();
|
|
35901
|
+
}
|
|
35902
|
+
if (GlobalInjector.config.layouts.debugMode)
|
|
35903
|
+
console.log('\n');
|
|
35904
|
+
this.store.dispatch(new LayoutUiActions.SetTopbarTitle(data.title));
|
|
35905
|
+
});
|
|
35906
|
+
}
|
|
35907
|
+
normalizeLayoutData(data) {
|
|
35908
|
+
return {
|
|
35909
|
+
mode: data?.mode ? data.mode : 'full',
|
|
35910
|
+
hideFooter: data?.hideFooter ?? false,
|
|
35911
|
+
contentPadding: data?.contentPadding ? data.contentPadding : '2em',
|
|
35912
|
+
contentStyleClass: data?.contentStyleClass ?? ''
|
|
35913
|
+
};
|
|
35914
|
+
}
|
|
35915
|
+
mergeLayoutDatas(before, current) {
|
|
35916
|
+
if (GlobalInjector.config.layouts.debugMode) {
|
|
35917
|
+
console.log('> mergeLayoutDatas');
|
|
35918
|
+
console.log(' before', before);
|
|
35919
|
+
console.log(' current', current);
|
|
35920
|
+
console.log(' merging', before, current, mergeClone(before, current));
|
|
35921
|
+
}
|
|
35922
|
+
return mergeClone(before, current);
|
|
35923
|
+
}
|
|
35924
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: RouterDataListenerService, deps: [{ token: i1$9.Router }, { token: i1$9.ActivatedRoute }, { token: SmzDialogsService }, { token: i1$6.Store }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
35925
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: RouterDataListenerService, providedIn: 'root' });
|
|
35926
|
+
}
|
|
35927
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: RouterDataListenerService, decorators: [{
|
|
35928
|
+
type: Injectable,
|
|
35929
|
+
args: [{
|
|
35930
|
+
providedIn: 'root'
|
|
35931
|
+
}]
|
|
35932
|
+
}], ctorParameters: () => [{ type: i1$9.Router }, { type: i1$9.ActivatedRoute }, { type: SmzDialogsService }, { type: i1$6.Store }] });
|
|
35933
|
+
|
|
36500
35934
|
class PrimeConfigService {
|
|
36501
35935
|
filterUtils;
|
|
36502
35936
|
primeConfig = inject(PrimeNG);
|
|
@@ -38356,11 +37790,11 @@ class OutletComponent {
|
|
|
38356
37790
|
});
|
|
38357
37791
|
}
|
|
38358
37792
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: OutletComponent, deps: [{ token: RouterDataListenerService }, { token: i1$6.Store }, { token: PrimeConfigService }, { token: i1$a.BreakpointObserver }], target: i0.ɵɵFactoryTarget.Component });
|
|
38359
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: OutletComponent, isStandalone: false, selector: "smz-ui-outlet", inputs: { menu: "menu" }, host: { listeners: { "mouseleave": "onMouseLeave()", "mouseenter": "onBeforeUnload()" } }, queries: [{ propertyName: "templates", predicate: PrimeTemplate }], ngImport: i0, template: "\r\n@switch (routerListener.data?.layout?.mode) {\r\n <!-- LAYOUT SIMPLES -->\r\n @case ('none') {\r\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\r\n }\r\n <!-- LAYOUT COMPLETO -->\r\n @case ('full') {\r\n <ng-container *ngTemplateOutlet=\"layoutTemplate\">\r\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\r\n </ng-container>\r\n }\r\n <!-- LAYOUT APENAS COM MENU LATERAL -->\r\n @case ('menu-only') {\r\n <ng-container *ngTemplateOutlet=\"layoutTemplate\">\r\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\r\n </ng-container>\r\n }\r\n <!-- LAYOUT APENAS COM BARRA SUPERIOR -->\r\n @case ('topbar-only') {\r\n <ng-container *ngTemplateOutlet=\"layoutTemplate\">\r\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\r\n </ng-container>\r\n }\r\n @case ('custom') {\r\n <ng-container *ngTemplateOutlet=\"layoutTemplate\">\r\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\r\n </ng-container>\r\n }\r\n @default {\r\n <!-- Nenhum tipo de layout foi encontrado. -->\r\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\r\n }\r\n}\r\n\r\n<smz-ui-theme-manager></smz-ui-theme-manager>\r\n<smz-ui-global-loader></smz-ui-global-loader>\r\n<smz-ui-dock></smz-ui-dock>\r\n<smz-ui-block></smz-ui-block>\r\n<smz-export-dialog></smz-export-dialog>\r\n
|
|
37793
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: OutletComponent, isStandalone: false, selector: "smz-ui-outlet", inputs: { menu: "menu" }, host: { listeners: { "mouseleave": "onMouseLeave()", "mouseenter": "onBeforeUnload()" } }, queries: [{ propertyName: "templates", predicate: PrimeTemplate }], ngImport: i0, template: "\r\n@switch (routerListener.data?.layout?.mode) {\r\n <!-- LAYOUT SIMPLES -->\r\n @case ('none') {\r\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\r\n }\r\n <!-- LAYOUT COMPLETO -->\r\n @case ('full') {\r\n <ng-container *ngTemplateOutlet=\"layoutTemplate\">\r\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\r\n </ng-container>\r\n }\r\n <!-- LAYOUT APENAS COM MENU LATERAL -->\r\n @case ('menu-only') {\r\n <ng-container *ngTemplateOutlet=\"layoutTemplate\">\r\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\r\n </ng-container>\r\n }\r\n <!-- LAYOUT APENAS COM BARRA SUPERIOR -->\r\n @case ('topbar-only') {\r\n <ng-container *ngTemplateOutlet=\"layoutTemplate\">\r\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\r\n </ng-container>\r\n }\r\n @case ('custom') {\r\n <ng-container *ngTemplateOutlet=\"layoutTemplate\">\r\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\r\n </ng-container>\r\n }\r\n @default {\r\n <!-- Nenhum tipo de layout foi encontrado. -->\r\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\r\n }\r\n}\r\n\r\n<smz-ui-theme-manager></smz-ui-theme-manager>\r\n<smz-ui-global-loader></smz-ui-global-loader>\r\n<smz-ui-dock></smz-ui-dock>\r\n<smz-ui-block></smz-ui-block>\r\n<smz-export-dialog></smz-export-dialog>\r\n<p-toast position=\"bottom-right\"></p-toast>", styles: [""], dependencies: [{ kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ThemeManagerComponent, selector: "smz-ui-theme-manager" }, { kind: "component", type: GlobalLoaderComponent, selector: "smz-ui-global-loader", inputs: ["template"] }, { kind: "component", type: SmzDockComponent, selector: "smz-ui-dock" }, { kind: "component", type: SmzUiBlockComponent, selector: "smz-ui-block" }, { kind: "component", type: SmzExportDialogComponent, selector: "smz-export-dialog" }, { kind: "component", type: i11.Toast, selector: "p-toast", inputs: ["key", "autoZIndex", "baseZIndex", "life", "styleClass", "position", "preventOpenDuplicates", "preventDuplicates", "showTransformOptions", "hideTransformOptions", "showTransitionOptions", "hideTransitionOptions", "motionOptions", "breakpoints"], outputs: ["onClose"] }] });
|
|
38360
37794
|
}
|
|
38361
37795
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: OutletComponent, decorators: [{
|
|
38362
37796
|
type: Component,
|
|
38363
|
-
args: [{ selector: 'smz-ui-outlet', standalone: false, template: "\r\n@switch (routerListener.data?.layout?.mode) {\r\n <!-- LAYOUT SIMPLES -->\r\n @case ('none') {\r\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\r\n }\r\n <!-- LAYOUT COMPLETO -->\r\n @case ('full') {\r\n <ng-container *ngTemplateOutlet=\"layoutTemplate\">\r\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\r\n </ng-container>\r\n }\r\n <!-- LAYOUT APENAS COM MENU LATERAL -->\r\n @case ('menu-only') {\r\n <ng-container *ngTemplateOutlet=\"layoutTemplate\">\r\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\r\n </ng-container>\r\n }\r\n <!-- LAYOUT APENAS COM BARRA SUPERIOR -->\r\n @case ('topbar-only') {\r\n <ng-container *ngTemplateOutlet=\"layoutTemplate\">\r\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\r\n </ng-container>\r\n }\r\n @case ('custom') {\r\n <ng-container *ngTemplateOutlet=\"layoutTemplate\">\r\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\r\n </ng-container>\r\n }\r\n @default {\r\n <!-- Nenhum tipo de layout foi encontrado. -->\r\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\r\n }\r\n}\r\n\r\n<smz-ui-theme-manager></smz-ui-theme-manager>\r\n<smz-ui-global-loader></smz-ui-global-loader>\r\n<smz-ui-dock></smz-ui-dock>\r\n<smz-ui-block></smz-ui-block>\r\n<smz-export-dialog></smz-export-dialog>\r\n
|
|
37797
|
+
args: [{ selector: 'smz-ui-outlet', standalone: false, template: "\r\n@switch (routerListener.data?.layout?.mode) {\r\n <!-- LAYOUT SIMPLES -->\r\n @case ('none') {\r\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\r\n }\r\n <!-- LAYOUT COMPLETO -->\r\n @case ('full') {\r\n <ng-container *ngTemplateOutlet=\"layoutTemplate\">\r\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\r\n </ng-container>\r\n }\r\n <!-- LAYOUT APENAS COM MENU LATERAL -->\r\n @case ('menu-only') {\r\n <ng-container *ngTemplateOutlet=\"layoutTemplate\">\r\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\r\n </ng-container>\r\n }\r\n <!-- LAYOUT APENAS COM BARRA SUPERIOR -->\r\n @case ('topbar-only') {\r\n <ng-container *ngTemplateOutlet=\"layoutTemplate\">\r\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\r\n </ng-container>\r\n }\r\n @case ('custom') {\r\n <ng-container *ngTemplateOutlet=\"layoutTemplate\">\r\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\r\n </ng-container>\r\n }\r\n @default {\r\n <!-- Nenhum tipo de layout foi encontrado. -->\r\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\r\n }\r\n}\r\n\r\n<smz-ui-theme-manager></smz-ui-theme-manager>\r\n<smz-ui-global-loader></smz-ui-global-loader>\r\n<smz-ui-dock></smz-ui-dock>\r\n<smz-ui-block></smz-ui-block>\r\n<smz-export-dialog></smz-export-dialog>\r\n<p-toast position=\"bottom-right\"></p-toast>" }]
|
|
38364
37798
|
}], ctorParameters: () => [{ type: RouterDataListenerService }, { type: i1$6.Store }, { type: PrimeConfigService }, { type: i1$a.BreakpointObserver }], propDecorators: { templates: [{
|
|
38365
37799
|
type: ContentChildren,
|
|
38366
37800
|
args: [PrimeTemplate]
|
|
@@ -38824,17 +38258,17 @@ class SmzTenantSwitchComponent {
|
|
|
38824
38258
|
showSwitchTenantDialog();
|
|
38825
38259
|
}
|
|
38826
38260
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzTenantSwitchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
38827
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: SmzTenantSwitchComponent, isStandalone: true, selector: "smz-tenant-switch", host: { classAttribute: "
|
|
38261
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: SmzTenantSwitchComponent, isStandalone: true, selector: "smz-tenant-switch", host: { classAttribute: "h-full relative" }, ngImport: i0, template: `
|
|
38828
38262
|
@if ((isAuthenticated$ | async) && (isSuperuserLogged$ | async) === false && showTenantSwitch) {
|
|
38829
|
-
<p-select appendTo="body" [options]="userAllowedTenants$ | async" styleClass="smz-tenant-switch-small
|
|
38263
|
+
<p-select appendTo="body" [options]="userAllowedTenants$ | async" styleClass="smz-tenant-switch-small" optionLabel="alias" dataKey="name" [(ngModel)]="selected" (onChange)="onSelectorChange($event)"></p-select>
|
|
38830
38264
|
}
|
|
38831
38265
|
`, isInline: true, styles: [".smz-tenant-switch-small .p-inputtext{padding:.5rem .75rem!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: SelectModule }, { kind: "component", type: i4$1.Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: SharedModule }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.Eager, encapsulation: i0.ViewEncapsulation.None });
|
|
38832
38266
|
}
|
|
38833
38267
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzTenantSwitchComponent, decorators: [{
|
|
38834
38268
|
type: Component,
|
|
38835
|
-
args: [{ selector: 'smz-tenant-switch', imports: [CommonModule, SelectModule, FormsModule, SharedModule], host: { class: '
|
|
38269
|
+
args: [{ selector: 'smz-tenant-switch', imports: [CommonModule, SelectModule, FormsModule, SharedModule], host: { class: 'h-full relative' }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, template: `
|
|
38836
38270
|
@if ((isAuthenticated$ | async) && (isSuperuserLogged$ | async) === false && showTenantSwitch) {
|
|
38837
|
-
<p-select appendTo="body" [options]="userAllowedTenants$ | async" styleClass="smz-tenant-switch-small
|
|
38271
|
+
<p-select appendTo="body" [options]="userAllowedTenants$ | async" styleClass="smz-tenant-switch-small" optionLabel="alias" dataKey="name" [(ngModel)]="selected" (onChange)="onSelectorChange($event)"></p-select>
|
|
38838
38272
|
}
|
|
38839
38273
|
`, styles: [".smz-tenant-switch-small .p-inputtext{padding:.5rem .75rem!important}\n"] }]
|
|
38840
38274
|
}], ctorParameters: () => [] });
|
|
@@ -39559,7 +38993,7 @@ class HephaestusSidebarComponent {
|
|
|
39559
38993
|
templates;
|
|
39560
38994
|
layout$ = inject(Store).select(UiHephaestusSelectors.layout);
|
|
39561
38995
|
appName$ = inject(Store).select(LayoutUiSelectors.appName);
|
|
39562
|
-
currentRoute$ = inject(Store).select(RouterState.state);
|
|
38996
|
+
currentRoute$ = inject(Store).select(RouterState.state());
|
|
39563
38997
|
appLayoutLogo$ = inject(Store).select(LayoutUiSelectors.appDarkLogo);
|
|
39564
38998
|
headerExtrasTemplate;
|
|
39565
38999
|
menu;
|
|
@@ -40086,14 +39520,16 @@ class OutletModule {
|
|
|
40086
39520
|
GlobalLoaderModule,
|
|
40087
39521
|
NgxSmzDockModule,
|
|
40088
39522
|
NgxSmzUiBlockModule,
|
|
40089
|
-
SmzExportDialogModule
|
|
39523
|
+
SmzExportDialogModule,
|
|
39524
|
+
ToastModule], exports: [OutletComponent] });
|
|
40090
39525
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: OutletModule, imports: [CommonModule,
|
|
40091
39526
|
SharedModule,
|
|
40092
39527
|
SmzThemeManagerModule,
|
|
40093
39528
|
GlobalLoaderModule,
|
|
40094
39529
|
NgxSmzDockModule,
|
|
40095
39530
|
NgxSmzUiBlockModule,
|
|
40096
|
-
SmzExportDialogModule
|
|
39531
|
+
SmzExportDialogModule,
|
|
39532
|
+
ToastModule] });
|
|
40097
39533
|
}
|
|
40098
39534
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: OutletModule, decorators: [{
|
|
40099
39535
|
type: NgModule,
|
|
@@ -40106,7 +39542,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
40106
39542
|
GlobalLoaderModule,
|
|
40107
39543
|
NgxSmzDockModule,
|
|
40108
39544
|
NgxSmzUiBlockModule,
|
|
40109
|
-
SmzExportDialogModule
|
|
39545
|
+
SmzExportDialogModule,
|
|
39546
|
+
ToastModule
|
|
40110
39547
|
],
|
|
40111
39548
|
exports: [OutletComponent]
|
|
40112
39549
|
}]
|
|
@@ -41607,11 +41044,11 @@ class SmzNotificationsComponent {
|
|
|
41607
41044
|
showNotificationsDialog();
|
|
41608
41045
|
}
|
|
41609
41046
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzNotificationsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
41610
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: SmzNotificationsComponent, isStandalone: false, selector: "smz-ui-notifications", ngImport: i0, template: "@if (notifications$ | async; as notifications) {\r\n <smz-responsive class=\"col grid grid-nogutter w-full items-center justify-start\">\r\n <!-- LANDSCAPE -->\r\n <ng-template pTemplate=\"landscape\">\r\n <i class=\"pi pi-bell badge-color regular-badge\" pBadge [value]=\"(newCount$ | async).toString()\">\r\n <div class=\"absolute inset-0 notification-container cursor-pointer\" (click)=\"op.toggle($event)\"></div>\r\n </i>\r\n <p-
|
|
41047
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: SmzNotificationsComponent, isStandalone: false, selector: "smz-ui-notifications", ngImport: i0, template: "@if (notifications$ | async; as notifications) {\r\n <smz-responsive class=\"col grid grid-nogutter w-full items-center justify-start\">\r\n <!-- LANDSCAPE -->\r\n <ng-template pTemplate=\"landscape\">\r\n <i class=\"pi pi-bell badge-color regular-badge\" pBadge [value]=\"(newCount$ | async).toString()\">\r\n <div class=\"absolute inset-0 notification-container cursor-pointer\" (click)=\"op.toggle($event)\"></div>\r\n </i>\r\n <p-popover #op [style]=\"{ 'width': uiConfig.rbkUtils.notifications.width, 'z-index': uiConfig.rbkUtils.notifications.zIndex }\" [ngClass]=\"uiConfig.rbkUtils.notifications.styleClass\" appendTo=\"body\" [autoZIndex]=\"false\">\r\n <smz-notifications-list></smz-notifications-list>\r\n </p-popover>\r\n </ng-template>\r\n <!-- PORTRAIT -->\r\n <ng-template pTemplate=\"portrait\">\r\n <i class=\"pi pi-bell badge-color regular-badge\" pBadge [value]=\"(newCount$ | async).toString()\">\r\n <div class=\"absolute inset-0 notification-container cursor-pointer\" (click)=\"showDialog()\"></div>\r\n </i>\r\n </ng-template>\r\n </smz-responsive>\r\n}", styles: ["smz-ui-notifications .notification-container{min-width:40px}smz-ui-notifications .badge-color{color:var(--text-color-secondary)}smz-ui-notifications .p-badge{background:var(--surface-a);color:var(--primary-color)}smz-ui-notifications .regular-badge{font-size:1.6rem;line-height:1.6rem}smz-ui-notifications .regular-badge .p-badge{font-size:.8rem;font-weight:700;min-width:1.1rem;height:1.1rem;line-height:1.1rem}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$8.BadgeDirective, selector: "[pBadge]", inputs: ["ptBadgeDirective", "pBadgePT", "pBadgeUnstyled", "badgeDisabled", "badgeSize", "size", "severity", "value", "badgeStyle", "badgeStyleClass"] }, { kind: "directive", type: i1$7.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i3.Popover, selector: "p-popover", inputs: ["ariaLabel", "ariaLabelledBy", "dismissable", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions", "motionOptions"], outputs: ["onShow", "onHide"] }, { kind: "component", type: SmzResponsiveComponent, selector: "smz-responsive" }, { kind: "component", type: NotificationsListComponent, selector: "smz-notifications-list" }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
41611
41048
|
}
|
|
41612
41049
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzNotificationsComponent, decorators: [{
|
|
41613
41050
|
type: Component,
|
|
41614
|
-
args: [{ selector: 'smz-ui-notifications', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: false, template: "@if (notifications$ | async; as notifications) {\r\n <smz-responsive class=\"col grid grid-nogutter w-full items-center justify-start\">\r\n <!-- LANDSCAPE -->\r\n <ng-template pTemplate=\"landscape\">\r\n <i class=\"pi pi-bell badge-color regular-badge\" pBadge [value]=\"(newCount$ | async).toString()\">\r\n <div class=\"absolute inset-0 notification-container cursor-pointer\" (click)=\"op.toggle($event)\"></div>\r\n </i>\r\n <p-
|
|
41051
|
+
args: [{ selector: 'smz-ui-notifications', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: false, template: "@if (notifications$ | async; as notifications) {\r\n <smz-responsive class=\"col grid grid-nogutter w-full items-center justify-start\">\r\n <!-- LANDSCAPE -->\r\n <ng-template pTemplate=\"landscape\">\r\n <i class=\"pi pi-bell badge-color regular-badge\" pBadge [value]=\"(newCount$ | async).toString()\">\r\n <div class=\"absolute inset-0 notification-container cursor-pointer\" (click)=\"op.toggle($event)\"></div>\r\n </i>\r\n <p-popover #op [style]=\"{ 'width': uiConfig.rbkUtils.notifications.width, 'z-index': uiConfig.rbkUtils.notifications.zIndex }\" [ngClass]=\"uiConfig.rbkUtils.notifications.styleClass\" appendTo=\"body\" [autoZIndex]=\"false\">\r\n <smz-notifications-list></smz-notifications-list>\r\n </p-popover>\r\n </ng-template>\r\n <!-- PORTRAIT -->\r\n <ng-template pTemplate=\"portrait\">\r\n <i class=\"pi pi-bell badge-color regular-badge\" pBadge [value]=\"(newCount$ | async).toString()\">\r\n <div class=\"absolute inset-0 notification-container cursor-pointer\" (click)=\"showDialog()\"></div>\r\n </i>\r\n </ng-template>\r\n </smz-responsive>\r\n}", styles: ["smz-ui-notifications .notification-container{min-width:40px}smz-ui-notifications .badge-color{color:var(--text-color-secondary)}smz-ui-notifications .p-badge{background:var(--surface-a);color:var(--primary-color)}smz-ui-notifications .regular-badge{font-size:1.6rem;line-height:1.6rem}smz-ui-notifications .regular-badge .p-badge{font-size:.8rem;font-weight:700;min-width:1.1rem;height:1.1rem;line-height:1.1rem}\n"] }]
|
|
41615
41052
|
}], ctorParameters: () => [] });
|
|
41616
41053
|
|
|
41617
41054
|
/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-return, @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type, @typescript-eslint/typedef, no-underscore-dangle, no-console, eqeqeq, @typescript-eslint/no-unused-vars, @typescript-eslint/no-useless-constructor, @typescript-eslint/explicit-member-accessibility, max-len, no-prototype-builtins, @typescript-eslint/no-shadow, @typescript-eslint/no-empty-object-type */
|
|
@@ -41999,7 +41436,7 @@ class AthenaHorizontalMenuComponent {
|
|
|
41999
41436
|
appLogo$ = inject(Store).select(LayoutUiSelectors.appContentLogo);
|
|
42000
41437
|
layout$ = inject(Store).select(UiAthenaSelectors$1.layout);
|
|
42001
41438
|
appName$ = inject(Store).select(LayoutUiSelectors.appName);
|
|
42002
|
-
currentRoute$ = inject(Store).select(RouterState.state);
|
|
41439
|
+
currentRoute$ = inject(Store).select(RouterState.state());
|
|
42003
41440
|
menu;
|
|
42004
41441
|
isAnyMenuExpanded = false;
|
|
42005
41442
|
menuType = MenuType;
|
|
@@ -42172,7 +41609,7 @@ class SmzNotificationsModule {
|
|
|
42172
41609
|
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.1", ngImport: i0, type: SmzNotificationsModule, declarations: [SmzNotificationsComponent, NotificationsListComponent, NotificationItemComponent], imports: [CommonModule,
|
|
42173
41610
|
FormsModule,
|
|
42174
41611
|
BadgeModule,
|
|
42175
|
-
|
|
41612
|
+
PopoverModule,
|
|
42176
41613
|
ButtonModule,
|
|
42177
41614
|
NgxSmzTablesModule,
|
|
42178
41615
|
InputTextModule,
|
|
@@ -42188,7 +41625,7 @@ class SmzNotificationsModule {
|
|
|
42188
41625
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzNotificationsModule, imports: [CommonModule,
|
|
42189
41626
|
FormsModule,
|
|
42190
41627
|
BadgeModule,
|
|
42191
|
-
|
|
41628
|
+
PopoverModule,
|
|
42192
41629
|
ButtonModule,
|
|
42193
41630
|
NgxSmzTablesModule,
|
|
42194
41631
|
InputTextModule,
|
|
@@ -42207,7 +41644,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
42207
41644
|
CommonModule,
|
|
42208
41645
|
FormsModule,
|
|
42209
41646
|
BadgeModule,
|
|
42210
|
-
|
|
41647
|
+
PopoverModule,
|
|
42211
41648
|
ButtonModule,
|
|
42212
41649
|
NgxSmzTablesModule,
|
|
42213
41650
|
InputTextModule,
|
|
@@ -43115,12 +42552,12 @@ class AthenaTopbarActionsComponent {
|
|
|
43115
42552
|
|
|
43116
42553
|
<div id="smz-ui-topbar"></div>
|
|
43117
42554
|
|
|
43118
|
-
<smz-responsive class="col grid grid-nogutter w-full items-center justify-start">
|
|
42555
|
+
<smz-responsive class="col grid grid-nogutter w-full items-center justify-start gap-5">
|
|
43119
42556
|
|
|
43120
42557
|
<!-- LANDSCAPE -->
|
|
43121
42558
|
<ng-template pTemplate="landscape">
|
|
43122
42559
|
|
|
43123
|
-
<span class="col extras-container justify-end extras-container
|
|
42560
|
+
<span class="col extras-container justify-end extras-container">
|
|
43124
42561
|
@if (headerExtrasTemplate != null) {
|
|
43125
42562
|
<ng-container *ngTemplateOutlet="headerExtrasTemplate"></ng-container>
|
|
43126
42563
|
}
|
|
@@ -43136,11 +42573,11 @@ class AthenaTopbarActionsComponent {
|
|
|
43136
42573
|
|
|
43137
42574
|
|
|
43138
42575
|
@if (showLocalizationSwitch) {
|
|
43139
|
-
<smz-localization-switch
|
|
42576
|
+
<smz-localization-switch></smz-localization-switch>
|
|
43140
42577
|
}
|
|
43141
42578
|
|
|
43142
42579
|
@if (showTenantSwitch) {
|
|
43143
|
-
<smz-tenant-switch
|
|
42580
|
+
<smz-tenant-switch></smz-tenant-switch>
|
|
43144
42581
|
}
|
|
43145
42582
|
|
|
43146
42583
|
@if (profile != null) {
|
|
@@ -43152,7 +42589,7 @@ class AthenaTopbarActionsComponent {
|
|
|
43152
42589
|
<!-- PORTRAIT -->
|
|
43153
42590
|
<ng-template pTemplate="portrait">
|
|
43154
42591
|
|
|
43155
|
-
<span class="col extras-container justify-end extras-container
|
|
42592
|
+
<span class="col extras-container justify-end extras-container">
|
|
43156
42593
|
@if (headerExtrasTemplate != null) {
|
|
43157
42594
|
<ng-container *ngTemplateOutlet="headerExtrasTemplate"></ng-container>
|
|
43158
42595
|
}
|
|
@@ -43168,7 +42605,7 @@ class AthenaTopbarActionsComponent {
|
|
|
43168
42605
|
|
|
43169
42606
|
|
|
43170
42607
|
@if (showTenantSwitch) {
|
|
43171
|
-
<smz-tenant-switch
|
|
42608
|
+
<smz-tenant-switch></smz-tenant-switch>
|
|
43172
42609
|
}
|
|
43173
42610
|
|
|
43174
42611
|
@if (profile != null) {
|
|
@@ -43188,12 +42625,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
43188
42625
|
|
|
43189
42626
|
<div id="smz-ui-topbar"></div>
|
|
43190
42627
|
|
|
43191
|
-
<smz-responsive class="col grid grid-nogutter w-full items-center justify-start">
|
|
42628
|
+
<smz-responsive class="col grid grid-nogutter w-full items-center justify-start gap-5">
|
|
43192
42629
|
|
|
43193
42630
|
<!-- LANDSCAPE -->
|
|
43194
42631
|
<ng-template pTemplate="landscape">
|
|
43195
42632
|
|
|
43196
|
-
<span class="col extras-container justify-end extras-container
|
|
42633
|
+
<span class="col extras-container justify-end extras-container">
|
|
43197
42634
|
@if (headerExtrasTemplate != null) {
|
|
43198
42635
|
<ng-container *ngTemplateOutlet="headerExtrasTemplate"></ng-container>
|
|
43199
42636
|
}
|
|
@@ -43209,11 +42646,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
43209
42646
|
|
|
43210
42647
|
|
|
43211
42648
|
@if (showLocalizationSwitch) {
|
|
43212
|
-
<smz-localization-switch
|
|
42649
|
+
<smz-localization-switch></smz-localization-switch>
|
|
43213
42650
|
}
|
|
43214
42651
|
|
|
43215
42652
|
@if (showTenantSwitch) {
|
|
43216
|
-
<smz-tenant-switch
|
|
42653
|
+
<smz-tenant-switch></smz-tenant-switch>
|
|
43217
42654
|
}
|
|
43218
42655
|
|
|
43219
42656
|
@if (profile != null) {
|
|
@@ -43225,7 +42662,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
43225
42662
|
<!-- PORTRAIT -->
|
|
43226
42663
|
<ng-template pTemplate="portrait">
|
|
43227
42664
|
|
|
43228
|
-
<span class="col extras-container justify-end extras-container
|
|
42665
|
+
<span class="col extras-container justify-end extras-container">
|
|
43229
42666
|
@if (headerExtrasTemplate != null) {
|
|
43230
42667
|
<ng-container *ngTemplateOutlet="headerExtrasTemplate"></ng-container>
|
|
43231
42668
|
}
|
|
@@ -43241,7 +42678,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
43241
42678
|
|
|
43242
42679
|
|
|
43243
42680
|
@if (showTenantSwitch) {
|
|
43244
|
-
<smz-tenant-switch
|
|
42681
|
+
<smz-tenant-switch></smz-tenant-switch>
|
|
43245
42682
|
}
|
|
43246
42683
|
|
|
43247
42684
|
@if (profile != null) {
|
|
@@ -43557,11 +42994,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
43557
42994
|
class NewAthenaHorizontalMenuComponent {
|
|
43558
42995
|
_eref;
|
|
43559
42996
|
templates;
|
|
43560
|
-
|
|
43561
|
-
|
|
43562
|
-
|
|
43563
|
-
|
|
43564
|
-
|
|
42997
|
+
store = inject(Store);
|
|
42998
|
+
topbarTitle$ = this.store.select(LayoutUiSelectors.topbarTitle);
|
|
42999
|
+
appLogo$ = this.store.select(LayoutUiSelectors.appContentLogo);
|
|
43000
|
+
layout$ = this.store.select(UiAthenaSelectors.layout);
|
|
43001
|
+
appName$ = this.store.select(LayoutUiSelectors.appName);
|
|
43002
|
+
currentRoute$ = this.store.select(RouterState.state());
|
|
43565
43003
|
menu;
|
|
43566
43004
|
isAnyMenuExpanded = false;
|
|
43567
43005
|
menuType = MenuType;
|
|
@@ -43569,8 +43007,6 @@ class NewAthenaHorizontalMenuComponent {
|
|
|
43569
43007
|
constructor(_eref) {
|
|
43570
43008
|
this._eref = _eref;
|
|
43571
43009
|
}
|
|
43572
|
-
ngOnInit() {
|
|
43573
|
-
}
|
|
43574
43010
|
ngAfterContentInit() {
|
|
43575
43011
|
this.templates.forEach((item) => {
|
|
43576
43012
|
switch (item.getType()) {
|
|
@@ -44943,7 +44379,7 @@ class SmzTreeComponent {
|
|
|
44943
44379
|
}
|
|
44944
44380
|
}
|
|
44945
44381
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzTreeComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: TreeHelperService }], target: i0.ɵɵFactoryTarget.Component });
|
|
44946
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: SmzTreeComponent, isStandalone: false, selector: "smz-ui-tree", inputs: { state: "state", items: "items", loading: "loading", styleClass: "styleClass", inlineStyle: "inlineStyle", appendTo: "appendTo", selection: "selection", selectionKey: "selectionKey" }, outputs: { selectedNodes: "selectedNodes", selectionChange: "selectionChange", parentChange: "parentChange", reorder: "reorder", blockedDrop: "blockedDrop", nodeExpanded: "nodeExpanded", nodeCollapsed: "nodeCollapsed", treeExpanded: "treeExpanded", nodeDropped: "nodeDropped" }, providers: [TreeDragDropService], queries: [{ propertyName: "templates", predicate: PrimeTemplate }], viewQueries: [{ propertyName: "dt", first: true, predicate: Tree, descendants: true }], usesOnChanges: true, ngImport: i0, template: "@if (state) {\r\n @if ((state.emptyFeedback?.isFeatured) && (treeItems != null && treeItems.length === 0)) {\r\n <smz-data-info\r\n [image]=\"state.emptyFeedback.image\"\r\n [message]=\"state.emptyFeedback.message\"\r\n [callbackInfo]=\"state.emptyFeedback.extraInfo\"\r\n [callbackLabel]=\"state.emptyFeedback.actionButton?.label\"\r\n (clicked)=\"state.emptyFeedback.actionButton?.callback($event)\">\r\n <ng-template pTemplate=\"actions\">\r\n <ng-container *ngTemplateOutlet=\"emptyActionsTemplate; context: { $implicit: {} }\"></ng-container>\r\n </ng-template>\r\n </smz-data-info>\r\n } @else {\r\n @if (treeItems != null) {\r\n <p-contextMenu #cm [model]=\"menuItems\" [appendTo]=\"appendTo\" [styleClass]=\"menuItems == null || menuItems?.length === 0 ? 'invisible-important' : ''\"></p-contextMenu>\r\n <p-menu #rowMenu [model]=\"menuItems\" [popup]=\"true\" appendTo=\"body\" />\r\n <p-tree #dt [value]=\"treeItems\"\r\n scrollHeight=\"flex\"\r\n [contextMenu]=\"state.menu.behavior === 'context-menu' ? cm : null\"\r\n [selectionMode]=\"state.selection.mode\"\r\n [(selection)]=\"primeSelection\"\r\n layout=\"vertical\"\r\n [style]=\"inlineStyle\"\r\n [styleClass]=\"styleClass\"\r\n [propagateSelectionUp]=\"state.selection.propagateUp\"\r\n [propagateSelectionDown]=\"state.selection.propagateDown\"\r\n [loading]=\"state.loading.isLoading\"\r\n [loadingIcon]=\"state.loading.icon\"\r\n [filter]=\"false\"\r\n [filterMode]=\"state.filter.mode\"\r\n [filterPlaceholder]=\"state.filter.textPlaceholder\"\r\n [draggableNodes]=\"state.dragAndDrop.draggable\"\r\n [droppableNodes]=\"state.dragAndDrop.droppable\"\r\n [validateDrop]=\"state.dragAndDrop.validateDrop\"\r\n (onNodeContextMenuSelect)=\"onContextMenuOpen($event)\"\r\n (onNodeSelect)=\"onSelected($event)\"\r\n (onNodeUnselect)=\"onUnselected($event)\"\r\n (onNodeExpand)=\"onExpanded($event)\"\r\n (onNodeCollapse)=\"onCollapsed($event)\"\r\n (onNodeDrop)=\"onDropped($event)\"\r\n (onFilter)=\"onFiltered($event)\">\r\n @if (state.header.isVisible) {\r\n <ng-template pTemplate=\"header\">\r\n @if (state.header.toolbar; as toolbar) {\r\n @if (headerTemplate != null) {\r\n <div class=\"grid grid-nogutter items-center w-full justify-start\">\r\n <ng-container *ngTemplateOutlet=\"headerTemplate; context: { $implicit: dt }\"></ng-container>\r\n </div>\r\n }\r\n <div class=\"grid grid-nogutter justify-start items-center mb-2 gap-2\">\r\n @if (state.header.title != null) {\r\n <h3 class=\"m-2 col\">{{state.header.title}}</h3>\r\n }\r\n <div class=\"grid grid-nogutter justify-start items-center gap-2\">\r\n @for (button of state.header.toolbar.items; track button; let i = $index) {\r\n <button\r\n pButton\r\n pRipple\r\n type=\"button\"\r\n [ngClass]=\"{ 'p-button-text': toolbar.buttonType.endsWith('borderless'), 'p-button-outlined': toolbar.buttonType.endsWith('outlined'), 'p-button-rounded': toolbar.buttonType.startsWith('rounded'), 'p-button-secondary': button.color === 'secondary', 'p-button-success': button.color === 'success', 'p-button-info': button.color === 'info', 'p-button-warning': button.color === 'warning', 'p-button-help': button.color === 'help', 'p-button-danger': button.color === 'danger' }\"\r\n [label]=\"button.label\"\r\n [icon]=\"button.icon\"\r\n (click)=\"onToolbarButtonClick($event, button, treeItems)\"\r\n [pTooltip]=\"button.tooltip\">\r\n </button>\r\n }\r\n @if (toolbar.nodeExpandButtons.isVisible === true) {\r\n <button\r\n pButton\r\n pRipple\r\n type=\"button\"\r\n [ngClass]=\"{ 'p-button-text': toolbar.buttonType.endsWith('borderless'), 'p-button-outlined': toolbar.buttonType.endsWith('outlined'), 'p-button-rounded': toolbar.buttonType.startsWith('rounded'), 'p-button-secondary': true }\"\r\n [label]=\"toolbar.nodeExpandButtons.expandLabel\"\r\n icon=\"fa-solid fa-angle-down\"\r\n (click)=\"expandNode()\"\r\n [pTooltip]=\"selection != null ? toolbar.nodeExpandButtons.expandTooltip : toolbar.nodeExpandButtons.disabledTooltip\"\r\n [disabled]=\"selection == null\">\r\n </button>\r\n }\r\n @if (toolbar.nodeExpandButtons.isVisible === true) {\r\n <button\r\n pButton\r\n pRipple\r\n type=\"button\"\r\n [ngClass]=\"{ 'p-button-text': toolbar.buttonType.endsWith('borderless'), 'p-button-outlined': toolbar.buttonType.endsWith('outlined'), 'p-button-rounded': toolbar.buttonType.startsWith('rounded'), 'p-button-secondary': true }\"\r\n [label]=\"toolbar.nodeExpandButtons.collapseLabel\"\r\n icon=\"fa-solid fa-angle-up\"\r\n (click)=\"collapseNode()\"\r\n [pTooltip]=\"selection != null ? toolbar.nodeExpandButtons.collapseTooltip : toolbar.nodeExpandButtons.disabledTooltip\"\r\n [disabled]=\"selection == null\">\r\n </button>\r\n }\r\n @if (toolbar.treeExpandButtons.isVisible === true) {\r\n <button\r\n pButton\r\n pRipple\r\n type=\"button\"\r\n [ngClass]=\"{ 'p-button-text': toolbar.buttonType.endsWith('borderless'), 'p-button-outlined': toolbar.buttonType.endsWith('outlined'), 'p-button-rounded': toolbar.buttonType.startsWith('rounded'), 'p-button-secondary': true }\"\r\n [label]=\"toolbar.treeExpandButtons.expandLabel\"\r\n icon=\"fa-solid fa-angles-down\"\r\n (click)=\"expandAll()\"\r\n [pTooltip]=\"\">\r\n </button>\r\n }\r\n @if (toolbar.treeExpandButtons.isVisible === true) {\r\n <button\r\n pButton\r\n pRipple\r\n type=\"button\"\r\n [ngClass]=\"{ 'p-button-text': toolbar.buttonType.endsWith('borderless'), 'p-button-outlined': toolbar.buttonType.endsWith('outlined'), 'p-button-rounded': toolbar.buttonType.startsWith('rounded'), 'p-button-secondary': true }\"\r\n [label]=\"toolbar.treeExpandButtons.collapseLabel\"\r\n icon=\"fa-solid fa-angles-up\"\r\n (click)=\"collapseAll()\"\r\n [pTooltip]=\"\">\r\n </button>\r\n }\r\n @if (actionsTemplate != null) {\r\n <div class=\"grid grid-nogutter items-center justify-start\">\r\n <ng-container *ngTemplateOutlet=\"actionsTemplate; context: { $implicit: dt }\"></ng-container>\r\n </div>\r\n }\r\n </div>\r\n @if (state.filter.show) {\r\n <p-iconfield class=\"col-12\" [ngClass]=\"state.filter.styleClass\">\r\n <p-inputicon styleClass=\"pi pi-search\" />\r\n <input #inputGlobal pInputText type=\"text\" (input)=\"dt._filter(inputGlobal.value)\" [placeholder]=\"state.filter.textPlaceholder\" />\r\n </p-iconfield>\r\n }\r\n </div>\r\n @if (toolbarTemplate != null) {\r\n <div class=\"grid grid-nogutter items-center mt-2\"\r\n [ngClass]=\"'justify-' + state.header.toolbar.alignment\">\r\n <ng-container *ngTemplateOutlet=\"toolbarTemplate; context: { $implicit: dt }\"></ng-container>\r\n </div>\r\n }\r\n }\r\n </ng-template>\r\n }\r\n @if (state.footer.isVisible) {\r\n <ng-template pTemplate=\"footer\">\r\n <div class=\"grid grid-nogutter justify-start items-center\">\r\n <span class=\"col mr-2\">FOOTER</span>\r\n </div>\r\n </ng-template>\r\n }\r\n @for (content of contentTemplates; track content) {\r\n <ng-template let-node [pTemplate]=\"content.type\">\r\n <div class=\"grid grid-nogutter items-center justify-start gap-2\">\r\n @if (content.template != null) {\r\n <ng-container *ngTemplateOutlet=\"content.template; context: { $implicit: node }\"></ng-container>\r\n } @else {\r\n <div>{{ node.label }}</div>\r\n }\r\n @if (state.menu.behavior === 'row-menu') {\r\n <p-button clickStopPropagation (onClick)=\"onRowMenuOpen(node, rowMenu, $event)\" [icon]=\"state.menu.rowMenuIcon\" [rounded]=\"true\" [text]=\"true\" [severity]=\"state.menu.rowMenuIconSeverity\"/>\r\n }\r\n </div>\r\n </ng-template>\r\n }\r\n <ng-template let-node pTemplate=\"Check\">\r\n <div class=\"grid grid-nogutter items-center justify-start gap-2\">\r\n <div>{{ node.label }}</div>\r\n @if (state.menu.behavior === 'row-menu') {\r\n <p-button clickStopPropagation (onClick)=\"onRowMenuOpen(node, rowMenu, $event)\" [icon]=\"state.menu.rowMenuIcon\" [rounded]=\"true\" [text]=\"true\" [severity]=\"state.menu.rowMenuIconSeverity\"/>\r\n }\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"empty\">\r\n @if (!state.emptyFeedback.isFeatured) {\r\n <div>{{ state.emptyFeedback.message }}</div>\r\n }\r\n </ng-template>\r\n </p-tree>\r\n }\r\n }\r\n} @else {\r\n @if (emptyStateTemplate != null) {\r\n <ng-container *ngTemplateOutlet=\"emptyStateTemplate; context: { $implicit: {} }\"></ng-container>\r\n }\r\n}\r\n\r\n", dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$7.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i4.ButtonDirective, selector: "[pButton]", inputs: ["ptButtonDirective", "pButtonPT", "pButtonUnstyled", "hostName", "text", "plain", "raised", "size", "outlined", "rounded", "iconPos", "loadingIcon", "fluid", "label", "icon", "loading", "buttonProps", "severity"] }, { kind: "component", type: i4.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: ClickStopPropagationDirective, selector: "[clickStopPropagation]" }, { kind: "component", type: SmzDataInfoComponent, selector: "smz-data-info", inputs: ["image", "message", "actions", "callbackInfo", "callbackLabel"], outputs: ["clicked"] }, { kind: "directive", type: i1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "showOnEllipsis", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }, { kind: "component", type: i8$1.ContextMenu, selector: "p-contextMenu, p-contextmenu, p-context-menu", inputs: ["model", "triggerEvent", "target", "global", "style", "styleClass", "autoZIndex", "baseZIndex", "id", "breakpoint", "ariaLabel", "ariaLabelledBy", "pressDelay", "appendTo", "motionOptions"], outputs: ["onShow", "onHide"] }, { kind: "component", type: i9.Tree, selector: "p-tree", inputs: ["value", "selectionMode", "loadingMode", "selection", "styleClass", "contextMenu", "contextMenuSelectionMode", "contextMenuSelection", "draggableScope", "droppableScope", "draggableNodes", "droppableNodes", "metaKeySelection", "propagateSelectionUp", "propagateSelectionDown", "loading", "loadingIcon", "emptyMessage", "ariaLabel", "togglerAriaLabel", "ariaLabelledBy", "validateDrop", "filter", "filterInputAutoFocus", "filterBy", "filterMode", "filterOptions", "filterPlaceholder", "filteredNodes", "filterLocale", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "indentation", "_templateMap", "trackBy", "highlightOnSelect"], outputs: ["selectionChange", "contextMenuSelectionChange", "onNodeSelect", "onNodeUnselect", "onNodeExpand", "onNodeCollapse", "onNodeContextMenuSelect", "onNodeDoubleClick", "onNodeDrop", "onLazyLoad", "onScroll", "onScrollIndexChange", "onFilter"] }, { kind: "directive", type: i2.InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "component", type: i11.Menu, selector: "p-menu", inputs: ["model", "popup", "style", "styleClass", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaLabel", "ariaLabelledBy", "id", "tabindex", "appendTo", "motionOptions"], outputs: ["onShow", "onHide", "onBlur", "onFocus"] }, { kind: "component", type: i27.IconField, selector: "p-iconfield, p-iconField, p-icon-field", inputs: ["hostName", "iconPosition", "styleClass"] }, { kind: "component", type: i28.InputIcon, selector: "p-inputicon, p-inputIcon", inputs: ["hostName", "styleClass"] }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
44382
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: SmzTreeComponent, isStandalone: false, selector: "smz-ui-tree", inputs: { state: "state", items: "items", loading: "loading", styleClass: "styleClass", inlineStyle: "inlineStyle", appendTo: "appendTo", selection: "selection", selectionKey: "selectionKey" }, outputs: { selectedNodes: "selectedNodes", selectionChange: "selectionChange", parentChange: "parentChange", reorder: "reorder", blockedDrop: "blockedDrop", nodeExpanded: "nodeExpanded", nodeCollapsed: "nodeCollapsed", treeExpanded: "treeExpanded", nodeDropped: "nodeDropped" }, providers: [TreeDragDropService], queries: [{ propertyName: "templates", predicate: PrimeTemplate }], viewQueries: [{ propertyName: "dt", first: true, predicate: Tree, descendants: true }], usesOnChanges: true, ngImport: i0, template: "@if (state) {\r\n @if ((state.emptyFeedback?.isFeatured) && (treeItems != null && treeItems.length === 0)) {\r\n <smz-data-info\r\n [image]=\"state.emptyFeedback.image\"\r\n [message]=\"state.emptyFeedback.message\"\r\n [callbackInfo]=\"state.emptyFeedback.extraInfo\"\r\n [callbackLabel]=\"state.emptyFeedback.actionButton?.label\"\r\n (clicked)=\"state.emptyFeedback.actionButton?.callback($event)\">\r\n <ng-template pTemplate=\"actions\">\r\n <ng-container *ngTemplateOutlet=\"emptyActionsTemplate; context: { $implicit: {} }\"></ng-container>\r\n </ng-template>\r\n </smz-data-info>\r\n } @else {\r\n @if (treeItems != null) {\r\n <p-contextMenu #cm [model]=\"menuItems\" [appendTo]=\"appendTo\" [styleClass]=\"menuItems == null || menuItems?.length === 0 ? 'invisible-important' : ''\"></p-contextMenu>\r\n <p-menu #rowMenu [model]=\"menuItems\" [popup]=\"true\" appendTo=\"body\" />\r\n <p-tree #dt [value]=\"treeItems\"\r\n scrollHeight=\"flex\"\r\n [contextMenu]=\"state.menu.behavior === 'context-menu' ? cm : null\"\r\n [selectionMode]=\"state.selection.mode\"\r\n [(selection)]=\"primeSelection\"\r\n layout=\"vertical\"\r\n [style]=\"inlineStyle\"\r\n [styleClass]=\"styleClass\"\r\n [propagateSelectionUp]=\"state.selection.propagateUp\"\r\n [propagateSelectionDown]=\"state.selection.propagateDown\"\r\n [loading]=\"state.loading.isLoading\"\r\n [loadingIcon]=\"state.loading.icon\"\r\n [filter]=\"false\"\r\n [filterMode]=\"state.filter.mode\"\r\n [filterPlaceholder]=\"state.filter.textPlaceholder\"\r\n [draggableNodes]=\"state.dragAndDrop.draggable\"\r\n [droppableNodes]=\"state.dragAndDrop.droppable\"\r\n [validateDrop]=\"state.dragAndDrop.validateDrop\"\r\n (onNodeContextMenuSelect)=\"onContextMenuOpen($event)\"\r\n (onNodeSelect)=\"onSelected($event)\"\r\n (onNodeUnselect)=\"onUnselected($event)\"\r\n (onNodeExpand)=\"onExpanded($event)\"\r\n (onNodeCollapse)=\"onCollapsed($event)\"\r\n (onNodeDrop)=\"onDropped($event)\"\r\n (onFilter)=\"onFiltered($event)\">\r\n @if (state.header.isVisible) {\r\n <ng-template pTemplate=\"header\">\r\n @if (state.header.toolbar; as toolbar) {\r\n @if (headerTemplate != null) {\r\n <div class=\"grid grid-nogutter items-center w-full justify-start\">\r\n <ng-container *ngTemplateOutlet=\"headerTemplate; context: { $implicit: dt }\"></ng-container>\r\n </div>\r\n }\r\n <div class=\"grid grid-nogutter justify-start items-center mb-2 gap-2\">\r\n @if (state.header.title != null) {\r\n <h3 class=\"m-2 col\">{{state.header.title}}</h3>\r\n }\r\n <div class=\"grid grid-nogutter justify-start items-center gap-2\">\r\n @for (button of state.header.toolbar.items; track button; let i = $index) {\r\n <button\r\n pButton\r\n pRipple\r\n type=\"button\"\r\n [ngClass]=\"{ 'p-button-text': toolbar.buttonType.endsWith('borderless'), 'p-button-outlined': toolbar.buttonType.endsWith('outlined'), 'p-button-rounded': toolbar.buttonType.startsWith('rounded'), 'p-button-secondary': button.color === 'secondary', 'p-button-success': button.color === 'success', 'p-button-info': button.color === 'info', 'p-button-warning': button.color === 'warning', 'p-button-help': button.color === 'help', 'p-button-danger': button.color === 'danger' }\"\r\n [label]=\"button.label\"\r\n [icon]=\"button.icon\"\r\n (click)=\"onToolbarButtonClick($event, button, treeItems)\"\r\n [pTooltip]=\"button.tooltip\">\r\n </button>\r\n }\r\n @if (toolbar.nodeExpandButtons.isVisible === true) {\r\n <button\r\n pButton\r\n pRipple\r\n type=\"button\"\r\n [ngClass]=\"{ 'p-button-text': toolbar.buttonType.endsWith('borderless'), 'p-button-outlined': toolbar.buttonType.endsWith('outlined'), 'p-button-rounded': toolbar.buttonType.startsWith('rounded'), 'p-button-secondary': true }\"\r\n [label]=\"toolbar.nodeExpandButtons.expandLabel\"\r\n icon=\"fa-solid fa-angle-down\"\r\n (click)=\"expandNode()\"\r\n [pTooltip]=\"selection != null ? toolbar.nodeExpandButtons.expandTooltip : toolbar.nodeExpandButtons.disabledTooltip\"\r\n [disabled]=\"selection == null\">\r\n </button>\r\n }\r\n @if (toolbar.nodeExpandButtons.isVisible === true) {\r\n <button\r\n pButton\r\n pRipple\r\n type=\"button\"\r\n [ngClass]=\"{ 'p-button-text': toolbar.buttonType.endsWith('borderless'), 'p-button-outlined': toolbar.buttonType.endsWith('outlined'), 'p-button-rounded': toolbar.buttonType.startsWith('rounded'), 'p-button-secondary': true }\"\r\n [label]=\"toolbar.nodeExpandButtons.collapseLabel\"\r\n icon=\"fa-solid fa-angle-up\"\r\n (click)=\"collapseNode()\"\r\n [pTooltip]=\"selection != null ? toolbar.nodeExpandButtons.collapseTooltip : toolbar.nodeExpandButtons.disabledTooltip\"\r\n [disabled]=\"selection == null\">\r\n </button>\r\n }\r\n @if (toolbar.treeExpandButtons.isVisible === true) {\r\n <button\r\n pButton\r\n pRipple\r\n type=\"button\"\r\n [ngClass]=\"{ 'p-button-text': toolbar.buttonType.endsWith('borderless'), 'p-button-outlined': toolbar.buttonType.endsWith('outlined'), 'p-button-rounded': toolbar.buttonType.startsWith('rounded'), 'p-button-secondary': true }\"\r\n [label]=\"toolbar.treeExpandButtons.expandLabel\"\r\n icon=\"fa-solid fa-angles-down\"\r\n (click)=\"expandAll()\"\r\n [pTooltip]=\"\">\r\n </button>\r\n }\r\n @if (toolbar.treeExpandButtons.isVisible === true) {\r\n <button\r\n pButton\r\n pRipple\r\n type=\"button\"\r\n [ngClass]=\"{ 'p-button-text': toolbar.buttonType.endsWith('borderless'), 'p-button-outlined': toolbar.buttonType.endsWith('outlined'), 'p-button-rounded': toolbar.buttonType.startsWith('rounded'), 'p-button-secondary': true }\"\r\n [label]=\"toolbar.treeExpandButtons.collapseLabel\"\r\n icon=\"fa-solid fa-angles-up\"\r\n (click)=\"collapseAll()\"\r\n [pTooltip]=\"\">\r\n </button>\r\n }\r\n @if (actionsTemplate != null) {\r\n <div class=\"grid grid-nogutter items-center justify-start\">\r\n <ng-container *ngTemplateOutlet=\"actionsTemplate; context: { $implicit: dt }\"></ng-container>\r\n </div>\r\n }\r\n </div>\r\n @if (state.filter.show) {\r\n <p-iconfield class=\"col-12\" [ngClass]=\"state.filter.styleClass\">\r\n <p-inputicon styleClass=\"pi pi-search\" />\r\n <input #inputGlobal pInputText type=\"text\" (input)=\"dt._filter(inputGlobal.value)\" [placeholder]=\"state.filter.textPlaceholder\" />\r\n </p-iconfield>\r\n }\r\n </div>\r\n @if (toolbarTemplate != null) {\r\n <div class=\"grid grid-nogutter items-center mt-2\"\r\n [ngClass]=\"'justify-' + state.header.toolbar.alignment\">\r\n <ng-container *ngTemplateOutlet=\"toolbarTemplate; context: { $implicit: dt }\"></ng-container>\r\n </div>\r\n }\r\n }\r\n </ng-template>\r\n }\r\n @if (state.footer.isVisible) {\r\n <ng-template pTemplate=\"footer\">\r\n <div class=\"grid grid-nogutter justify-start items-center\">\r\n <span class=\"col mr-2\">FOOTER</span>\r\n </div>\r\n </ng-template>\r\n }\r\n @for (content of contentTemplates; track content) {\r\n <ng-template let-node [pTemplate]=\"content.type\">\r\n <div class=\"grid grid-nogutter items-center justify-start gap-2\">\r\n @if (content.template != null) {\r\n <ng-container *ngTemplateOutlet=\"content.template; context: { $implicit: node }\"></ng-container>\r\n } @else {\r\n <div>{{ node.label }}</div>\r\n }\r\n @if (state.menu.behavior === 'row-menu') {\r\n <p-button clickStopPropagation (onClick)=\"onRowMenuOpen(node, rowMenu, $event)\" [icon]=\"state.menu.rowMenuIcon\" [rounded]=\"true\" [text]=\"true\" [severity]=\"state.menu.rowMenuIconSeverity\"/>\r\n }\r\n </div>\r\n </ng-template>\r\n }\r\n <ng-template let-node pTemplate=\"Check\">\r\n <div class=\"grid grid-nogutter items-center justify-start gap-2\">\r\n <div>{{ node.label }}</div>\r\n @if (state.menu.behavior === 'row-menu') {\r\n <p-button clickStopPropagation (onClick)=\"onRowMenuOpen(node, rowMenu, $event)\" [icon]=\"state.menu.rowMenuIcon\" [rounded]=\"true\" [text]=\"true\" [severity]=\"state.menu.rowMenuIconSeverity\"/>\r\n }\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"empty\">\r\n @if (!state.emptyFeedback.isFeatured) {\r\n <div>{{ state.emptyFeedback.message }}</div>\r\n }\r\n </ng-template>\r\n </p-tree>\r\n }\r\n }\r\n} @else {\r\n @if (emptyStateTemplate != null) {\r\n <ng-container *ngTemplateOutlet=\"emptyStateTemplate; context: { $implicit: {} }\"></ng-container>\r\n }\r\n}\r\n\r\n", dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$7.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i4.ButtonDirective, selector: "[pButton]", inputs: ["ptButtonDirective", "pButtonPT", "pButtonUnstyled", "hostName", "text", "plain", "raised", "size", "outlined", "rounded", "iconPos", "loadingIcon", "fluid", "label", "icon", "loading", "buttonProps", "severity"] }, { kind: "component", type: i4.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: ClickStopPropagationDirective, selector: "[clickStopPropagation]" }, { kind: "component", type: SmzDataInfoComponent, selector: "smz-data-info", inputs: ["image", "message", "actions", "callbackInfo", "callbackLabel"], outputs: ["clicked"] }, { kind: "directive", type: i1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "showOnEllipsis", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }, { kind: "component", type: i8$1.ContextMenu, selector: "p-contextMenu, p-contextmenu, p-context-menu", inputs: ["model", "triggerEvent", "target", "global", "style", "styleClass", "autoZIndex", "baseZIndex", "id", "breakpoint", "ariaLabel", "ariaLabelledBy", "pressDelay", "appendTo", "motionOptions"], outputs: ["onShow", "onHide"] }, { kind: "component", type: i9.Tree, selector: "p-tree", inputs: ["value", "selectionMode", "loadingMode", "selection", "styleClass", "contextMenu", "contextMenuSelectionMode", "contextMenuSelection", "draggableScope", "droppableScope", "draggableNodes", "droppableNodes", "metaKeySelection", "propagateSelectionUp", "propagateSelectionDown", "loading", "loadingIcon", "emptyMessage", "ariaLabel", "togglerAriaLabel", "ariaLabelledBy", "validateDrop", "filter", "filterInputAutoFocus", "filterBy", "filterMode", "filterOptions", "filterPlaceholder", "filteredNodes", "filterLocale", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "indentation", "_templateMap", "trackBy", "highlightOnSelect"], outputs: ["selectionChange", "contextMenuSelectionChange", "onNodeSelect", "onNodeUnselect", "onNodeExpand", "onNodeCollapse", "onNodeContextMenuSelect", "onNodeDoubleClick", "onNodeDrop", "onLazyLoad", "onScroll", "onScrollIndexChange", "onFilter"] }, { kind: "directive", type: i2.InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "component", type: i11$1.Menu, selector: "p-menu", inputs: ["model", "popup", "style", "styleClass", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaLabel", "ariaLabelledBy", "id", "tabindex", "appendTo", "motionOptions"], outputs: ["onShow", "onHide", "onBlur", "onFocus"] }, { kind: "component", type: i27.IconField, selector: "p-iconfield, p-iconField, p-icon-field", inputs: ["hostName", "iconPosition", "styleClass"] }, { kind: "component", type: i28.InputIcon, selector: "p-inputicon, p-inputIcon", inputs: ["hostName", "styleClass"] }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
44947
44383
|
}
|
|
44948
44384
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzTreeComponent, decorators: [{
|
|
44949
44385
|
type: Component,
|
|
@@ -46400,7 +45836,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
46400
45836
|
class CommentsService extends BaseApiService {
|
|
46401
45837
|
http;
|
|
46402
45838
|
environment = inject(SmzEnvironment);
|
|
46403
|
-
endpoint = '
|
|
45839
|
+
endpoint = 'api/comments';
|
|
46404
45840
|
constructor(http) {
|
|
46405
45841
|
super();
|
|
46406
45842
|
this.http = http;
|
|
@@ -46632,7 +46068,6 @@ class NgxSmzCommentsModule {
|
|
|
46632
46068
|
ButtonModule,
|
|
46633
46069
|
FormsModule,
|
|
46634
46070
|
RbkPipesModule,
|
|
46635
|
-
OverlayPanelModule,
|
|
46636
46071
|
NgxSmzFormsModule,
|
|
46637
46072
|
TreeModule,
|
|
46638
46073
|
NgxSmzDataPipesModule,
|
|
@@ -46642,7 +46077,6 @@ class NgxSmzCommentsModule {
|
|
|
46642
46077
|
ButtonModule,
|
|
46643
46078
|
FormsModule,
|
|
46644
46079
|
RbkPipesModule,
|
|
46645
|
-
OverlayPanelModule,
|
|
46646
46080
|
NgxSmzFormsModule,
|
|
46647
46081
|
TreeModule,
|
|
46648
46082
|
NgxSmzDataPipesModule,
|
|
@@ -46657,7 +46091,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
46657
46091
|
ButtonModule,
|
|
46658
46092
|
FormsModule,
|
|
46659
46093
|
RbkPipesModule,
|
|
46660
|
-
OverlayPanelModule,
|
|
46661
46094
|
NgxSmzFormsModule,
|
|
46662
46095
|
TreeModule,
|
|
46663
46096
|
NgxSmzDataPipesModule,
|
|
@@ -47533,7 +46966,7 @@ class SmzToastComponent {
|
|
|
47533
46966
|
</div>
|
|
47534
46967
|
</ng-template>
|
|
47535
46968
|
</p-toast>
|
|
47536
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: ToastModule }, { kind: "component", type:
|
|
46969
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: ToastModule }, { kind: "component", type: i11.Toast, selector: "p-toast", inputs: ["key", "autoZIndex", "baseZIndex", "life", "styleClass", "position", "preventOpenDuplicates", "preventDuplicates", "showTransformOptions", "hideTransformOptions", "showTransitionOptions", "hideTransitionOptions", "motionOptions", "breakpoints"], outputs: ["onClose"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "ngmodule", type: ProgressBarModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
47537
46970
|
}
|
|
47538
46971
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzToastComponent, decorators: [{
|
|
47539
46972
|
type: Component,
|
|
@@ -49447,14 +48880,14 @@ class SmzSvgComponent {
|
|
|
49447
48880
|
this.state.dispatch.setScopes.unsubscribe();
|
|
49448
48881
|
}
|
|
49449
48882
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzSvgComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
49450
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.1", type: SmzSvgComponent, isStandalone: false, selector: "smz-svg", inputs: { state: "state" }, viewQueries: [{ propertyName: "overlayPanel", first: true, predicate:
|
|
48883
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.1", type: SmzSvgComponent, isStandalone: false, selector: "smz-svg", inputs: { state: "state" }, viewQueries: [{ propertyName: "overlayPanel", first: true, predicate: Popover, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div id=\"smz-svg-container\" [ngClass]=\"state?.containerClass\">\r\n <div id=\"smz-svg-map\" [ngClass]=\"{ 'border-2 border-red-800 border-solid': state?.isDebug }\"></div>\r\n</div>\r\n\r\n<p-popover #op appendTo=\"body\">\r\n <div class=\"grid grid-nogutter items-center justify-start gap-2\">\r\n <i class=\"fa-solid fa-map-pin text-blue-200 text-2xl\"></i>\r\n <div>{{ tooltipContent }}</div>\r\n </div>\r\n</p-popover>\r\n", dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i3.Popover, selector: "p-popover", inputs: ["ariaLabel", "ariaLabelledBy", "dismissable", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions", "motionOptions"], outputs: ["onShow", "onHide"] }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
49451
48884
|
}
|
|
49452
48885
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzSvgComponent, decorators: [{
|
|
49453
48886
|
type: Component,
|
|
49454
|
-
args: [{ selector: 'smz-svg', changeDetection: ChangeDetectionStrategy.Default, standalone: false, template: "<div id=\"smz-svg-container\" [ngClass]=\"state?.containerClass\">\r\n <div id=\"smz-svg-map\" [ngClass]=\"{ 'border-2 border-red-800 border-solid': state?.isDebug }\"></div>\r\n</div>\r\n\r\n<p-
|
|
48887
|
+
args: [{ selector: 'smz-svg', changeDetection: ChangeDetectionStrategy.Default, standalone: false, template: "<div id=\"smz-svg-container\" [ngClass]=\"state?.containerClass\">\r\n <div id=\"smz-svg-map\" [ngClass]=\"{ 'border-2 border-red-800 border-solid': state?.isDebug }\"></div>\r\n</div>\r\n\r\n<p-popover #op appendTo=\"body\">\r\n <div class=\"grid grid-nogutter items-center justify-start gap-2\">\r\n <i class=\"fa-solid fa-map-pin text-blue-200 text-2xl\"></i>\r\n <div>{{ tooltipContent }}</div>\r\n </div>\r\n</p-popover>\r\n" }]
|
|
49455
48888
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { overlayPanel: [{
|
|
49456
48889
|
type: ViewChild,
|
|
49457
|
-
args: [
|
|
48890
|
+
args: [Popover]
|
|
49458
48891
|
}], state: [{
|
|
49459
48892
|
type: Input
|
|
49460
48893
|
}] } });
|
|
@@ -49464,11 +48897,11 @@ class SmzSvgModule {
|
|
|
49464
48897
|
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.1", ngImport: i0, type: SmzSvgModule, declarations: [SmzSvgComponent], imports: [CommonModule,
|
|
49465
48898
|
FormsModule,
|
|
49466
48899
|
RbkPipesModule,
|
|
49467
|
-
|
|
48900
|
+
PopoverModule], exports: [SmzSvgComponent] });
|
|
49468
48901
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzSvgModule, imports: [CommonModule,
|
|
49469
48902
|
FormsModule,
|
|
49470
48903
|
RbkPipesModule,
|
|
49471
|
-
|
|
48904
|
+
PopoverModule] });
|
|
49472
48905
|
}
|
|
49473
48906
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzSvgModule, decorators: [{
|
|
49474
48907
|
type: NgModule,
|
|
@@ -49477,7 +48910,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
49477
48910
|
CommonModule,
|
|
49478
48911
|
FormsModule,
|
|
49479
48912
|
RbkPipesModule,
|
|
49480
|
-
|
|
48913
|
+
PopoverModule
|
|
49481
48914
|
],
|
|
49482
48915
|
exports: [
|
|
49483
48916
|
SmzSvgComponent
|