@seniorsistemas/data-seniorx-core 1.7.0 → 1.9.0
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/core/types/card.type.d.ts +1 -15
- package/core/types/filters.type.d.ts +9 -6
- package/core/types/row-card.type.d.ts +1 -7
- package/core/types/select-button.type.d.ts +5 -0
- package/core/types/sidebar.type.d.ts +6 -0
- package/core/utils/array.util.d.ts +1 -0
- package/esm2022/core/config/card.type.config.mjs +3 -3
- package/esm2022/core/config/row-card.type.config.mjs +2 -1
- package/esm2022/core/handlers/sqlFormatter.mjs +2 -2
- package/esm2022/core/types/card.type.mjs +2 -39
- package/esm2022/core/types/filters.type.mjs +1 -1
- package/esm2022/core/types/row-card.type.mjs +1 -1
- package/esm2022/core/types/select-button.type.mjs +2 -0
- package/esm2022/core/types/sidebar.type.mjs +2 -0
- package/esm2022/core/types/table.type.mjs +28 -0
- package/esm2022/core/utils/array.util.mjs +4 -0
- package/esm2022/features/button/button.component.mjs +5 -5
- package/esm2022/features/card-list/card/card.component.mjs +5 -5
- package/esm2022/features/card-list/card-list.component.mjs +8 -8
- package/esm2022/features/checkbox/checkbox.component.mjs +3 -3
- package/esm2022/features/code-editor/code-editor.component.mjs +216 -0
- package/esm2022/features/combobox/combobox.component.mjs +10 -7
- package/esm2022/features/confirm/confirm.component.mjs +3 -3
- package/esm2022/features/filters/filters.component.mjs +35 -9
- package/esm2022/features/hyperlink/hyperlink.component.mjs +3 -3
- package/esm2022/features/inputs.mjs +3 -3
- package/esm2022/features/list/list.component.mjs +3 -3
- package/esm2022/features/modal/modal.component.mjs +3 -3
- package/esm2022/features/modalc/modalc.component.mjs +4 -4
- package/esm2022/features/paginator/paginator.component.mjs +81 -33
- package/esm2022/features/panel/panel.component.mjs +26 -16
- package/esm2022/features/row-card-list/row-card/row-card.component.mjs +29 -18
- package/esm2022/features/row-card-list/row-card-list.component.mjs +10 -10
- package/esm2022/features/scaffold/scaffold.component.mjs +43 -14
- package/esm2022/features/searchbox/searchbox.component.mjs +4 -4
- package/esm2022/features/select-button/select-button.component.mjs +118 -0
- package/esm2022/features/sidebar/sidebar.component.mjs +3 -3
- package/esm2022/features/spinner/spinner.component.mjs +3 -3
- package/esm2022/features/spinner/spinner.service.mjs +3 -3
- package/esm2022/features/tab/tab-item.component.mjs +4 -4
- package/esm2022/features/tab/tab.component.mjs +31 -14
- package/esm2022/features/table/table.component.mjs +6 -6
- package/esm2022/features/textbox/textbox.component.mjs +3 -3
- package/esm2022/features/toast/toast.component.mjs +4 -4
- package/esm2022/features/toast/toast.service.mjs +4 -4
- package/esm2022/providers/services.provider.mjs +3 -3
- package/esm2022/providers/styles.provider.mjs +32 -0
- package/esm2022/providers/translate.provider.mjs +48 -26
- package/esm2022/public-api.mjs +31 -7
- package/features/button/button.component.d.ts +1 -1
- package/features/card-list/card/card.component.d.ts +2 -2
- package/features/card-list/card-list.component.d.ts +1 -1
- package/features/code-editor/code-editor.component.d.ts +57 -0
- package/features/combobox/combobox.component.d.ts +3 -2
- package/features/filters/filters.component.d.ts +5 -2
- package/features/modalc/modalc.component.d.ts +1 -1
- package/features/paginator/paginator.component.d.ts +29 -8
- package/features/panel/panel.component.d.ts +8 -2
- package/features/row-card-list/row-card/row-card.component.d.ts +7 -4
- package/features/row-card-list/row-card-list.component.d.ts +3 -3
- package/features/scaffold/scaffold.component.d.ts +12 -4
- package/features/searchbox/searchbox.component.d.ts +1 -1
- package/features/select-button/select-button.component.d.ts +30 -0
- package/features/tab/tab.component.d.ts +4 -1
- package/features/table/table.component.d.ts +2 -2
- package/features/toast/toast.component.d.ts +1 -1
- package/features/toast/toast.service.d.ts +1 -1
- package/fesm2022/seniorsistemas-data-seniorx-core.mjs +884 -363
- package/fesm2022/seniorsistemas-data-seniorx-core.mjs.map +1 -1
- package/package.json +20 -15
- package/providers/services.provider.d.ts +2 -2
- package/providers/styles.provider.d.ts +2 -0
- package/providers/translate.provider.d.ts +2 -7
- package/public-api.d.ts +23 -6
- package/src/locales/en.json +15 -0
- package/src/locales/es-CO.json +15 -0
- package/src/locales/pt.json +15 -0
- package/styles/domain-filter.scss +10 -0
- package/styles/fields.scss +17 -0
- package/styles/hyperlink.scss +11 -0
- package/styles/sdc-card.scss +34 -0
- package/styles/sdc-global-variables.scss +73 -0
- package/styles.css +20161 -6
- package/styles.scss +5 -0
- package/webfonts/fa-brands-400.eot +0 -0
- package/webfonts/fa-brands-400.svg +3717 -0
- package/webfonts/fa-brands-400.ttf +0 -0
- package/webfonts/fa-brands-400.woff +0 -0
- package/webfonts/fa-brands-400.woff2 +0 -0
- package/webfonts/fa-duotone-900.eot +0 -0
- package/webfonts/fa-duotone-900.svg +15328 -0
- package/webfonts/fa-duotone-900.ttf +0 -0
- package/webfonts/fa-duotone-900.woff +0 -0
- package/webfonts/fa-duotone-900.woff2 +0 -0
- package/webfonts/fa-light-300.eot +0 -0
- package/webfonts/fa-light-300.svg +12423 -0
- package/webfonts/fa-light-300.ttf +0 -0
- package/webfonts/fa-light-300.woff +0 -0
- package/webfonts/fa-light-300.woff2 +0 -0
- package/webfonts/fa-regular-400.eot +0 -0
- package/webfonts/fa-regular-400.svg +11323 -0
- package/webfonts/fa-regular-400.ttf +0 -0
- package/webfonts/fa-regular-400.woff +0 -0
- package/webfonts/fa-regular-400.woff2 +0 -0
- package/webfonts/fa-solid-900.eot +0 -0
- package/webfonts/fa-solid-900.svg +9653 -0
- package/webfonts/fa-solid-900.ttf +0 -0
- package/webfonts/fa-solid-900.woff +0 -0
- package/webfonts/fa-solid-900.woff2 +0 -0
- package/esm2022/core/types/table.types.mjs +0 -28
- package/esm2022/features/sql-editor/sql-editor.component.mjs +0 -125
- package/features/sql-editor/sql-editor.component.d.ts +0 -27
- package/styles.css.map +0 -1
- /package/core/types/{table.types.d.ts → table.type.d.ts} +0 -0
|
@@ -1,76 +1,74 @@
|
|
|
1
|
-
import * as i2
|
|
1
|
+
import * as i2 from 'primeng/api';
|
|
2
2
|
import { MessageService } from 'primeng/api';
|
|
3
3
|
export { MessageService } from 'primeng/api';
|
|
4
|
+
import * as i1$5 from '@ngx-translate/core';
|
|
5
|
+
import { TranslateModule, TranslateStore, TranslateLoader, TranslateService } from '@ngx-translate/core';
|
|
6
|
+
export { TranslateDirective, TranslateModule, TranslatePipe } from '@ngx-translate/core';
|
|
4
7
|
import { definePreset } from '@primeng/themes';
|
|
5
8
|
import * as i0 from '@angular/core';
|
|
6
|
-
import { makeEnvironmentProviders, APP_INITIALIZER, EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, Output, TemplateRef, ContentChild, Directive, forwardRef, ViewChild,
|
|
9
|
+
import { makeEnvironmentProviders, ENVIRONMENT_INITIALIZER, inject, APP_INITIALIZER, EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, Output, TemplateRef, ContentChild, Directive, forwardRef, ViewChild, input, signal, effect, computed, ElementRef, NgZone, ChangeDetectorRef, numberAttribute, booleanAttribute, Injectable, HostBinding, HostListener } from '@angular/core';
|
|
7
10
|
import { provideAnimationsAsync } from '@angular/platform-browser/animations/async';
|
|
8
11
|
import { providePrimeNG } from 'primeng/config';
|
|
9
12
|
import Aura from '@primeng/themes/aura';
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { BehaviorSubject } from 'rxjs';
|
|
13
|
-
import * as i1$1 from '@angular/common';
|
|
13
|
+
import { of, Subject, BehaviorSubject } from 'rxjs';
|
|
14
|
+
import * as i1$2 from '@angular/common';
|
|
14
15
|
import { CommonModule, NgClass, NgIf, NgTemplateOutlet } from '@angular/common';
|
|
15
|
-
import { first } from 'rxjs/operators';
|
|
16
|
+
import { takeUntil, filter, first } from 'rxjs/operators';
|
|
16
17
|
import { ViewPlugin, Decoration, keymap, EditorView } from '@codemirror/view';
|
|
17
18
|
import { RangeSetBuilder, Prec, StateEffect } from '@codemirror/state';
|
|
18
19
|
import { format } from 'sql-formatter';
|
|
19
20
|
import * as i1 from '@seniorsistemas/angular-components/button';
|
|
20
21
|
import { ButtonModule } from '@seniorsistemas/angular-components/button';
|
|
21
|
-
import * as
|
|
22
|
+
import * as i1$1 from '@angular/router';
|
|
23
|
+
import { NavigationEnd, RouterOutlet } from '@angular/router';
|
|
24
|
+
import * as i3 from '@seniorsistemas/angular-components/product-header';
|
|
22
25
|
import { ProductHeaderModule } from '@seniorsistemas/angular-components/product-header';
|
|
23
|
-
import * as
|
|
26
|
+
import * as i4 from '@seniorsistemas/angular-components/breadcrumb';
|
|
24
27
|
import { BreadcrumbModule } from '@seniorsistemas/angular-components/breadcrumb';
|
|
25
|
-
import * as i1$
|
|
28
|
+
import * as i1$3 from 'primeng/autocomplete';
|
|
26
29
|
import { AutoCompleteModule } from 'primeng/autocomplete';
|
|
27
30
|
import * as i3$1 from 'primeng/multiselect';
|
|
28
31
|
import { MultiSelectModule } from 'primeng/multiselect';
|
|
29
32
|
import * as i5 from '@angular/forms';
|
|
30
33
|
import { NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
31
|
-
import
|
|
32
|
-
import * as i1$3 from 'primeng/button';
|
|
34
|
+
import * as i1$4 from 'primeng/button';
|
|
33
35
|
import { ButtonModule as ButtonModule$1 } from 'primeng/button';
|
|
34
|
-
import * as i2$
|
|
36
|
+
import * as i2$1 from 'primeng/dialog';
|
|
35
37
|
import { DialogModule } from 'primeng/dialog';
|
|
36
38
|
import * as i3$2 from '@seniorsistemas/angular-components/empty-state';
|
|
37
39
|
import { EmptyStateModule } from '@seniorsistemas/angular-components/empty-state';
|
|
38
|
-
import * as i2$
|
|
40
|
+
import * as i2$2 from '@seniorsistemas/angular-components/loading-state';
|
|
39
41
|
import { LoadingStateModule } from '@seniorsistemas/angular-components/loading-state';
|
|
40
|
-
import
|
|
41
|
-
import * as i4 from 'primeng/inputgroupaddon';
|
|
42
|
+
import * as i4$1 from 'primeng/inputgroupaddon';
|
|
42
43
|
import { InputGroupAddonModule } from 'primeng/inputgroupaddon';
|
|
43
44
|
import * as i5$1 from 'primeng/inputgroup';
|
|
44
45
|
import { InputGroupModule } from 'primeng/inputgroup';
|
|
45
46
|
import * as i6 from 'primeng/inputtext';
|
|
46
47
|
import { InputTextModule } from 'primeng/inputtext';
|
|
47
|
-
import * as i2$
|
|
48
|
-
import { PaginatorModule } from 'primeng/paginator';
|
|
49
|
-
import { DEFAULT_TABLE_OPTIONS } from 'lib/src/core/types/table.types';
|
|
50
|
-
import * as i2$5 from '@seniorsistemas/angular-components/sidebar';
|
|
48
|
+
import * as i2$3 from '@seniorsistemas/angular-components/sidebar';
|
|
51
49
|
import { SidebarModule } from '@seniorsistemas/angular-components/sidebar';
|
|
52
50
|
import { StructureModule } from '@seniorsistemas/angular-components/structure';
|
|
53
|
-
import
|
|
54
|
-
import
|
|
55
|
-
import {
|
|
51
|
+
import * as i1$6 from '@seniorsistemas/angular-components/panel';
|
|
52
|
+
import { PanelModule } from '@seniorsistemas/angular-components/panel';
|
|
53
|
+
import { EnumSeverity } from '@seniorsistemas/angular-components/shared';
|
|
56
54
|
import { BlockUIModule } from 'primeng/blockui';
|
|
57
55
|
import { ProgressSpinnerModule } from 'primeng/progressspinner';
|
|
56
|
+
import { basicSetup } from 'codemirror';
|
|
58
57
|
import { autocompletion } from '@codemirror/autocomplete';
|
|
59
58
|
import { ayuLight } from 'thememirror';
|
|
60
|
-
import { basicSetup } from 'codemirror';
|
|
61
59
|
import { sql, PostgreSQL } from '@codemirror/lang-sql';
|
|
60
|
+
import { javascript } from '@codemirror/lang-javascript';
|
|
61
|
+
import { json } from '@codemirror/lang-json';
|
|
62
|
+
import { html } from '@codemirror/lang-html';
|
|
62
63
|
import * as i3$3 from 'primeng/keyfilter';
|
|
63
64
|
import { KeyFilterModule } from 'primeng/keyfilter';
|
|
64
|
-
import * as i4$
|
|
65
|
+
import * as i4$2 from 'primeng/tooltip';
|
|
65
66
|
import { TooltipModule } from 'primeng/tooltip';
|
|
66
67
|
import { CardModule } from 'primeng/card';
|
|
67
68
|
import { TagModule } from 'primeng/tag';
|
|
68
69
|
import { AvatarModule } from 'primeng/avatar';
|
|
69
70
|
import { AvatarGroupModule } from 'primeng/avatargroup';
|
|
70
71
|
import { CheckboxModule } from 'primeng/checkbox';
|
|
71
|
-
import { DEFAULT_CARD_LIST_OPTIONS } from 'lib/src/core/config/card.type.config';
|
|
72
|
-
import { ButtonComponent as ButtonComponent$1 } from 'lib/src/public-api';
|
|
73
|
-
import { DEFAULT_ROW_CARD_LIST_OPTIONS } from 'lib/src/core/config/row-card.type.config';
|
|
74
72
|
import { FloatLabelModule } from 'primeng/floatlabel';
|
|
75
73
|
|
|
76
74
|
function customButton(theme) {
|
|
@@ -368,7 +366,7 @@ function provideDataCoreLib() {
|
|
|
368
366
|
}
|
|
369
367
|
|
|
370
368
|
function serviceProviders() {
|
|
371
|
-
return [MessageService, SpinnerService, ToastService,
|
|
369
|
+
return [MessageService, SpinnerService, ToastService, TranslateModule];
|
|
372
370
|
}
|
|
373
371
|
|
|
374
372
|
var en = {
|
|
@@ -419,33 +417,85 @@ var pt = {
|
|
|
419
417
|
"platform.datacore.empty_message": "Tente ajustar os filtros ou refine sua busca para encontrar os dados desejados."
|
|
420
418
|
};
|
|
421
419
|
|
|
422
|
-
const
|
|
420
|
+
const DEFAULT_LOCALE = 'pt';
|
|
421
|
+
class InlineTranslateLoader {
|
|
422
|
+
getTranslation(lang) {
|
|
423
|
+
switch (lang) {
|
|
424
|
+
case 'en':
|
|
425
|
+
case 'en-US':
|
|
426
|
+
return of(en);
|
|
427
|
+
case 'es':
|
|
428
|
+
case 'es-CO':
|
|
429
|
+
return of(es);
|
|
430
|
+
default:
|
|
431
|
+
return of(pt);
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
}
|
|
423
435
|
function provideTranslations() {
|
|
436
|
+
return makeEnvironmentProviders([
|
|
437
|
+
TranslateStore,
|
|
438
|
+
{ provide: TranslateLoader, useClass: InlineTranslateLoader },
|
|
439
|
+
TranslateService,
|
|
440
|
+
{
|
|
441
|
+
provide: ENVIRONMENT_INITIALIZER,
|
|
442
|
+
multi: true,
|
|
443
|
+
useValue: () => {
|
|
444
|
+
const translate = inject(TranslateService);
|
|
445
|
+
translate.addLangs(['en', 'es', 'pt']);
|
|
446
|
+
translate.setDefaultLang(DEFAULT_LOCALE);
|
|
447
|
+
const seniorLocale = safeGetSeniorLocale('com.senior.token') ?? DEFAULT_LOCALE;
|
|
448
|
+
translate.use(seniorLocale);
|
|
449
|
+
},
|
|
450
|
+
},
|
|
451
|
+
]);
|
|
452
|
+
}
|
|
453
|
+
function safeGetSeniorLocale(name) {
|
|
454
|
+
try {
|
|
455
|
+
if (typeof document === 'undefined')
|
|
456
|
+
return null;
|
|
457
|
+
const cookies = document.cookie?.split('; ') ?? [];
|
|
458
|
+
const raw = cookies.find(c => c.startsWith(name + '='))?.split('=')[1];
|
|
459
|
+
if (!raw)
|
|
460
|
+
return null;
|
|
461
|
+
const json = JSON.parse(decodeURIComponent(raw));
|
|
462
|
+
return json?.locale ?? null;
|
|
463
|
+
}
|
|
464
|
+
catch {
|
|
465
|
+
return null;
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
function resolveStylesHref() {
|
|
470
|
+
try {
|
|
471
|
+
return new URL('../styles.css', import.meta.url).toString();
|
|
472
|
+
}
|
|
473
|
+
catch {
|
|
474
|
+
return undefined;
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
function injectGlobalStyles() {
|
|
478
|
+
return () => {
|
|
479
|
+
const id = 'sds-global-styles';
|
|
480
|
+
if (document.getElementById(id))
|
|
481
|
+
return;
|
|
482
|
+
const href = resolveStylesHref();
|
|
483
|
+
if (!href)
|
|
484
|
+
return;
|
|
485
|
+
const link = document.createElement('link');
|
|
486
|
+
link.id = id;
|
|
487
|
+
link.rel = 'stylesheet';
|
|
488
|
+
link.href = href;
|
|
489
|
+
document.head.appendChild(link);
|
|
490
|
+
};
|
|
491
|
+
}
|
|
492
|
+
function provideGlobalStyles() {
|
|
424
493
|
return {
|
|
425
494
|
provide: APP_INITIALIZER,
|
|
426
495
|
multi: true,
|
|
427
|
-
|
|
428
|
-
useFactory: (translate) => {
|
|
429
|
-
return () => {
|
|
430
|
-
translate.addLangs(['en', 'es', 'pt']);
|
|
431
|
-
translate.setTranslation('en-US', en);
|
|
432
|
-
translate.setTranslation('en', en);
|
|
433
|
-
translate.setTranslation('es-CO', es);
|
|
434
|
-
translate.setTranslation('es', es);
|
|
435
|
-
translate.setTranslation('pt-BR', pt);
|
|
436
|
-
translate.setTranslation('pt', pt);
|
|
437
|
-
translate.setDefaultLang(defaultLocale);
|
|
438
|
-
translate.use(getSeniorLocale('com.senior.token'));
|
|
439
|
-
};
|
|
440
|
-
}
|
|
496
|
+
useFactory: injectGlobalStyles,
|
|
441
497
|
};
|
|
442
498
|
}
|
|
443
|
-
function getSeniorLocale(name) {
|
|
444
|
-
const cookies = document.cookie.split('; ');
|
|
445
|
-
const cookie = cookies.find(c => c.startsWith(name + '='));
|
|
446
|
-
const json = JSON.parse(cookie ? decodeURIComponent(cookie.split('=')[1]) : '{}');
|
|
447
|
-
return json.locale ?? defaultLocale;
|
|
448
|
-
}
|
|
449
499
|
|
|
450
500
|
const CONSTANTS = {
|
|
451
501
|
EMPTY: '',
|
|
@@ -627,7 +677,7 @@ function sqlFormatterHandler() {
|
|
|
627
677
|
formatted = SQL_HELPER.format(maskedText);
|
|
628
678
|
dfTokens.forEach((original, i) => {
|
|
629
679
|
const placeholder = SQL_HELPER.formatPlaceholder(i);
|
|
630
|
-
formatted = formatted.
|
|
680
|
+
formatted = formatted.split(placeholder).join(original);
|
|
631
681
|
});
|
|
632
682
|
view.dispatch({
|
|
633
683
|
changes: {
|
|
@@ -674,6 +724,45 @@ function getWordBeforeCursor(state, pos) {
|
|
|
674
724
|
return words.length ? words[words.length - 1] : CONSTANTS.EMPTY;
|
|
675
725
|
}
|
|
676
726
|
|
|
727
|
+
const DEFAULT_CARD_LIST_OPTIONS = {
|
|
728
|
+
enablePagination: true,
|
|
729
|
+
enableSideButtons: false,
|
|
730
|
+
totalRecordsLabel: "platform.datacore.total_records",
|
|
731
|
+
customCard: {
|
|
732
|
+
buttonLabel: "platform.datacore.see",
|
|
733
|
+
buttonPriority: "primary",
|
|
734
|
+
descriptionMaxLength: 100,
|
|
735
|
+
icon: "fas fa-trophy",
|
|
736
|
+
backgroundIcon: "#428bca",
|
|
737
|
+
iconColor: "#ffffff",
|
|
738
|
+
},
|
|
739
|
+
empty: {
|
|
740
|
+
title: "platform.datacore.empty_title",
|
|
741
|
+
message: "platform.datacore.empty_message"
|
|
742
|
+
}
|
|
743
|
+
};
|
|
744
|
+
|
|
745
|
+
const DEFAULT_ROW_CARD_LIST_OPTIONS = {
|
|
746
|
+
enablePagination: true,
|
|
747
|
+
totalRecordsLabel: "platform.datacore.total_records",
|
|
748
|
+
initialRows: 5,
|
|
749
|
+
rowsPerPageOptions: [5, 10, 15],
|
|
750
|
+
customCard: {
|
|
751
|
+
expandable: false,
|
|
752
|
+
buttonLabel: "platform.datacore.open",
|
|
753
|
+
buttonPriority: "primary",
|
|
754
|
+
buttonIcon: "fas fa-rocket",
|
|
755
|
+
leftTitleColor: "text-900",
|
|
756
|
+
leftSubtitleColor: "text-color-secondary",
|
|
757
|
+
rightTitleColor: "text-primary",
|
|
758
|
+
rightSubtitleColor: "text-color-secondary"
|
|
759
|
+
},
|
|
760
|
+
empty: {
|
|
761
|
+
title: "platform.datacore.empty_title",
|
|
762
|
+
message: "platform.datacore.empty_message"
|
|
763
|
+
}
|
|
764
|
+
};
|
|
765
|
+
|
|
677
766
|
function getDimensionStyles(type, value) {
|
|
678
767
|
if (value === null || value === undefined || typeof value === 'boolean')
|
|
679
768
|
return {};
|
|
@@ -692,6 +781,107 @@ const dimensionFormat = (value) => {
|
|
|
692
781
|
return raw;
|
|
693
782
|
};
|
|
694
783
|
|
|
784
|
+
const mockRowCardList = [
|
|
785
|
+
{
|
|
786
|
+
id: '1',
|
|
787
|
+
left_title: 'TITULO 1',
|
|
788
|
+
left_subtitle: 'Descrição 1',
|
|
789
|
+
right_subtitle: 'right_subtitle',
|
|
790
|
+
right_title: 'right_title'
|
|
791
|
+
},
|
|
792
|
+
{
|
|
793
|
+
id: '2',
|
|
794
|
+
left_title: 'TITULO 2',
|
|
795
|
+
left_subtitle: 'Descrição 2',
|
|
796
|
+
right_subtitle: 'right_subtitle',
|
|
797
|
+
right_title: 'right_title'
|
|
798
|
+
},
|
|
799
|
+
{
|
|
800
|
+
id: '3',
|
|
801
|
+
left_title: 'TITULO 3',
|
|
802
|
+
left_subtitle: 'Descrição 3',
|
|
803
|
+
right_subtitle: 'right_subtitle',
|
|
804
|
+
right_title: 'right_title',
|
|
805
|
+
},
|
|
806
|
+
{
|
|
807
|
+
id: '4',
|
|
808
|
+
left_title: 'TITULO 4',
|
|
809
|
+
left_subtitle: 'Descrição 4',
|
|
810
|
+
right_subtitle: 'right_subtitle',
|
|
811
|
+
right_title: 'right_title'
|
|
812
|
+
},
|
|
813
|
+
{
|
|
814
|
+
id: '5',
|
|
815
|
+
left_title: 'TITULO 5',
|
|
816
|
+
left_subtitle: 'Descrição 5',
|
|
817
|
+
right_subtitle: 'right_subtitle',
|
|
818
|
+
right_title: 'right_title'
|
|
819
|
+
},
|
|
820
|
+
{
|
|
821
|
+
id: '6',
|
|
822
|
+
left_title: 'TITULO 6',
|
|
823
|
+
left_subtitle: 'Descrição 6',
|
|
824
|
+
right_subtitle: 'right_subtitle',
|
|
825
|
+
right_title: 'right_title'
|
|
826
|
+
},
|
|
827
|
+
{
|
|
828
|
+
id: '7',
|
|
829
|
+
left_title: 'TITULO 7',
|
|
830
|
+
left_subtitle: 'Descrição 7',
|
|
831
|
+
right_subtitle: 'right_subtitle',
|
|
832
|
+
right_title: 'right_title'
|
|
833
|
+
},
|
|
834
|
+
{
|
|
835
|
+
id: '8',
|
|
836
|
+
left_title: 'TITULO 8',
|
|
837
|
+
left_subtitle: 'Descrição 8',
|
|
838
|
+
right_subtitle: 'right_subtitle',
|
|
839
|
+
right_title: 'right_title'
|
|
840
|
+
},
|
|
841
|
+
];
|
|
842
|
+
|
|
843
|
+
const DEFAULT_TABLE_OPTIONS = {
|
|
844
|
+
search: { type: 'auto', show: true, placeholder: 'Buscar...' },
|
|
845
|
+
table: {
|
|
846
|
+
totalRecordsLabel: 'Total de Registros',
|
|
847
|
+
},
|
|
848
|
+
empty: { show: true, title: 'Sem dados', text: 'Nada por aqui.' },
|
|
849
|
+
pagination: { show: true, rowsPerPage: 10, rowsPerPageOptions: [5, 10, 25] },
|
|
850
|
+
cells: {
|
|
851
|
+
tag: {
|
|
852
|
+
color: '#fff',
|
|
853
|
+
backgroundColor: 'rgb(155 213 255);',
|
|
854
|
+
maxItems: 3,
|
|
855
|
+
tooltip: 'Teste Tooltip',
|
|
856
|
+
icon: 'fas fa-eye'
|
|
857
|
+
},
|
|
858
|
+
button: {
|
|
859
|
+
priority: 'primary',
|
|
860
|
+
tooltip: 'Teste Tooltip',
|
|
861
|
+
icon: 'fas fa-eye',
|
|
862
|
+
label: 'TESTE LABEL',
|
|
863
|
+
disabled: true,
|
|
864
|
+
},
|
|
865
|
+
checkbox: {
|
|
866
|
+
selectAll: true,
|
|
867
|
+
}
|
|
868
|
+
}
|
|
869
|
+
};
|
|
870
|
+
|
|
871
|
+
function range(n) {
|
|
872
|
+
return Array.from({ length: n }, (_, i) => i);
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
function isMobile() {
|
|
876
|
+
return window.innerWidth <= 768;
|
|
877
|
+
}
|
|
878
|
+
function isTablet() {
|
|
879
|
+
return window.innerWidth > 768 && window.innerWidth <= 1024;
|
|
880
|
+
}
|
|
881
|
+
function isDesktop() {
|
|
882
|
+
return window.innerWidth > 1024;
|
|
883
|
+
}
|
|
884
|
+
|
|
695
885
|
class ButtonComponent {
|
|
696
886
|
disabled = false;
|
|
697
887
|
width = '10rem';
|
|
@@ -702,12 +892,12 @@ class ButtonComponent {
|
|
|
702
892
|
size = 'default';
|
|
703
893
|
type = 'button';
|
|
704
894
|
onClick = new EventEmitter();
|
|
705
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
706
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.
|
|
895
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
896
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ButtonComponent, isStandalone: true, selector: "sdc-button", inputs: { disabled: "disabled", width: "width", icon: "icon", id: "id", label: "label", priority: "priority", size: "size", type: "type" }, outputs: { onClick: "onClick" }, ngImport: i0, template: "<div [style.width]=\"width\">\n <s-button\n class=\"sdc-button-el\"\n (clicked)=\"onClick.emit($event)\"\n [disabled]=\"disabled\"\n [id]=\"id\"\n [size]=\"size\"\n [type]=\"type\"\n [priority]=\"priority\"\n [iconClass]=\"icon\"\n [label]=\"label\">\n </s-button>\n</div>\n", styles: ["::ng-deep .s-button-priority-primary .s-button-icon{color:#fff!important}::ng-deep s-button button:disabled{pointer-events:none;cursor:not-allowed}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i1.ButtonComponent, selector: "s-button", inputs: ["id", "label", "tooltip", "tooltipPosition", "iconClass", "rightIconClass", "caret", "styleClass", "baseZIndex", "disabled", "auxiliary", "type", "priority", "menuOptions", "size", "slide", "animation", "badge", "iconColor"], outputs: ["clicked"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
707
897
|
}
|
|
708
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
898
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
709
899
|
type: Component,
|
|
710
|
-
args: [{ imports: [CommonModule, ButtonModule], standalone: true, selector: 'sdc-button', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, template: "<div [style.width]=\"width\">\n <s-button\n class=\"sdc-button-el\"\n (clicked)=\"onClick.emit($event)\"\n [disabled]=\"disabled\"\n [id]=\"id\"\n [size]=\"size\"\n [type]=\"type\"\n [priority]=\"priority\"\n [iconClass]=\"icon\"\n [label]=\"label\">\n </s-button>\n</div>\n", styles: ["::ng-deep .s-button-priority-primary .s-button-icon{color:#fff!important}::ng-deep s-button button:disabled{pointer-events:none;cursor:not-allowed}
|
|
900
|
+
args: [{ imports: [CommonModule, ButtonModule], standalone: true, selector: 'sdc-button', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, template: "<div [style.width]=\"width\">\n <s-button\n class=\"sdc-button-el\"\n (clicked)=\"onClick.emit($event)\"\n [disabled]=\"disabled\"\n [id]=\"id\"\n [size]=\"size\"\n [type]=\"type\"\n [priority]=\"priority\"\n [iconClass]=\"icon\"\n [label]=\"label\">\n </s-button>\n</div>\n", styles: ["::ng-deep .s-button-priority-primary .s-button-icon{color:#fff!important}::ng-deep s-button button:disabled{pointer-events:none;cursor:not-allowed}\n"] }]
|
|
711
901
|
}], propDecorators: { disabled: [{
|
|
712
902
|
type: Input
|
|
713
903
|
}], width: [{
|
|
@@ -729,20 +919,45 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
729
919
|
}] } });
|
|
730
920
|
|
|
731
921
|
class ScaffoldComponent {
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
922
|
+
route;
|
|
923
|
+
router;
|
|
924
|
+
header = 'Data Platform';
|
|
925
|
+
homeUrl = '/data-platform/catalog/masterdatas';
|
|
926
|
+
currentTitle = '';
|
|
735
927
|
headerTpl;
|
|
736
928
|
footerTpl;
|
|
737
|
-
|
|
738
|
-
|
|
929
|
+
destroyed$ = new Subject();
|
|
930
|
+
constructor(route, router) {
|
|
931
|
+
this.route = route;
|
|
932
|
+
this.router = router;
|
|
933
|
+
}
|
|
934
|
+
ngOnInit() {
|
|
935
|
+
// lê header/homeUrl do PRÓPRIO shell (opcional)
|
|
936
|
+
const d = this.route.snapshot.data ?? {};
|
|
937
|
+
this.header = d['header'] ?? this.header;
|
|
938
|
+
this.homeUrl = d['homeUrl'] ?? this.homeUrl;
|
|
939
|
+
const update = () => {
|
|
940
|
+
const deepest = this.getDeepest(this.route);
|
|
941
|
+
const data = deepest?.snapshot?.data ?? {};
|
|
942
|
+
this.currentTitle = data['pageTitle'] ?? data['routeTitle'] ?? '';
|
|
943
|
+
};
|
|
944
|
+
update();
|
|
945
|
+
this.router.events.pipe(takeUntil(this.destroyed$), filter(e => e instanceof NavigationEnd)).subscribe(update);
|
|
946
|
+
}
|
|
947
|
+
ngOnDestroy() { this.destroyed$.next(); this.destroyed$.complete(); }
|
|
948
|
+
getDeepest(r) {
|
|
949
|
+
let cur = r;
|
|
950
|
+
while (cur.firstChild)
|
|
951
|
+
cur = cur.firstChild;
|
|
952
|
+
return cur;
|
|
953
|
+
}
|
|
954
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ScaffoldComponent, deps: [{ token: i1$1.ActivatedRoute }, { token: i1$1.Router }], target: i0.ɵɵFactoryTarget.Component });
|
|
955
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ScaffoldComponent, isStandalone: true, selector: "sdc-scaffold", inputs: { header: "header", homeUrl: "homeUrl" }, queries: [{ propertyName: "headerTpl", first: true, predicate: ["scaffoldHeader"], descendants: true, read: TemplateRef }, { propertyName: "footerTpl", first: true, predicate: ["scaffoldFooter"], descendants: true, read: TemplateRef }], ngImport: i0, template: "<s-product-header [header]=\"header\">\n <ng-container *ngIf=\"headerTpl\" [ngTemplateOutlet]=\"headerTpl\"></ng-container>\n</s-product-header>\n\n<div class=\"sdc-scaffold\">\n <div class=\"sdc-scaffold-title\">{{ currentTitle }}</div>\n\n <s-breadcrumb [homeUrl]=\"homeUrl\"></s-breadcrumb>\n <br />\n <div class=\"sdc-scaffold-content\">\n <router-outlet></router-outlet>\n </div>\n</div>\n\n<footer class=\"sdc-scaffold-footer\" *ngIf=\"footerTpl\">\n <ng-container [ngTemplateOutlet]=\"footerTpl\"></ng-container>\n</footer>\n", styles: ["::ng-deep .sds-container{padding:20px;background-color:#f1f1f1!important}::ng-deep .sdc-scaffold .p-breadcrumb{font-size:12px;padding:10px 0 0!important;background:transparent}::ng-deep .sdc-scaffold .sds-page-title{display:none}.sdc-scaffold-title{padding:5px 0 0;font-family:Open Sans,sans-serif;font-size:20px;font-weight:400;line-height:1em;color:#333}@media (min-width: 750px){.sdc-scaffold{padding:5px}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: ProductHeaderModule }, { kind: "component", type: i3.ProductHeaderComponent, selector: "s-product-header", inputs: ["id", "header", "baseZIndex", "isHeaderFrame"] }, { kind: "ngmodule", type: BreadcrumbModule }, { kind: "component", type: i4.BreadcrumbComponent, selector: "s-breadcrumb", inputs: ["homeUrl", "targetHomeUrl"] }, { kind: "directive", type: i1$1.RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
739
956
|
}
|
|
740
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
957
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ScaffoldComponent, decorators: [{
|
|
741
958
|
type: Component,
|
|
742
|
-
args: [{ selector: 'sdc-scaffold', standalone: true, imports: [CommonModule, ProductHeaderModule, BreadcrumbModule], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, template: "<s-product-header [header]=\"header\">\n <ng-container *ngIf=\"headerTpl\" [ngTemplateOutlet]=\"headerTpl\"></ng-container>\n</s-product-header>\n\n<div class=\"sdc-scaffold\">\n <div class=\"sdc-scaffold-title\">{{
|
|
743
|
-
}], propDecorators: { header: [{
|
|
744
|
-
type: Input
|
|
745
|
-
}], title: [{
|
|
959
|
+
args: [{ selector: 'sdc-scaffold', standalone: true, imports: [CommonModule, ProductHeaderModule, BreadcrumbModule, RouterOutlet], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, template: "<s-product-header [header]=\"header\">\n <ng-container *ngIf=\"headerTpl\" [ngTemplateOutlet]=\"headerTpl\"></ng-container>\n</s-product-header>\n\n<div class=\"sdc-scaffold\">\n <div class=\"sdc-scaffold-title\">{{ currentTitle }}</div>\n\n <s-breadcrumb [homeUrl]=\"homeUrl\"></s-breadcrumb>\n <br />\n <div class=\"sdc-scaffold-content\">\n <router-outlet></router-outlet>\n </div>\n</div>\n\n<footer class=\"sdc-scaffold-footer\" *ngIf=\"footerTpl\">\n <ng-container [ngTemplateOutlet]=\"footerTpl\"></ng-container>\n</footer>\n", styles: ["::ng-deep .sds-container{padding:20px;background-color:#f1f1f1!important}::ng-deep .sdc-scaffold .p-breadcrumb{font-size:12px;padding:10px 0 0!important;background:transparent}::ng-deep .sdc-scaffold .sds-page-title{display:none}.sdc-scaffold-title{padding:5px 0 0;font-family:Open Sans,sans-serif;font-size:20px;font-weight:400;line-height:1em;color:#333}@media (min-width: 750px){.sdc-scaffold{padding:5px}}\n"] }]
|
|
960
|
+
}], ctorParameters: () => [{ type: i1$1.ActivatedRoute }, { type: i1$1.Router }], propDecorators: { header: [{
|
|
746
961
|
type: Input
|
|
747
962
|
}], homeUrl: [{
|
|
748
963
|
type: Input
|
|
@@ -818,10 +1033,10 @@ class InputsComponent {
|
|
|
818
1033
|
invalid: this.invalid
|
|
819
1034
|
};
|
|
820
1035
|
}
|
|
821
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
822
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.
|
|
1036
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: InputsComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1037
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: InputsComponent, inputs: { disabled: "disabled", identity: "identity", invalid: "invalid", label: "label", message: "message", placeholder: "placeholder", required: "required", size: "size", value: "value", width: "width", keyFilter: "keyFilter", maxlength: "maxlength", infoIcon: "infoIcon", tooltipIcon: "tooltipIcon" }, outputs: { valueChange: "valueChange" }, ngImport: i0 });
|
|
823
1038
|
}
|
|
824
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
1039
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: InputsComponent, decorators: [{
|
|
825
1040
|
type: Directive
|
|
826
1041
|
}], propDecorators: { disabled: [{
|
|
827
1042
|
type: Input
|
|
@@ -862,6 +1077,7 @@ class ComboboxComponent extends InputsComponent {
|
|
|
862
1077
|
options = [];
|
|
863
1078
|
overrideChipMessage;
|
|
864
1079
|
maxSelectedLabels = 2;
|
|
1080
|
+
showClear = true;
|
|
865
1081
|
selectedValueEvent = new EventEmitter();
|
|
866
1082
|
autocomplete;
|
|
867
1083
|
multiselect;
|
|
@@ -870,7 +1086,7 @@ class ComboboxComponent extends InputsComponent {
|
|
|
870
1086
|
displayMode = 'chip';
|
|
871
1087
|
ngAfterViewInit() {
|
|
872
1088
|
if (!this.multiple && this.autocomplete) {
|
|
873
|
-
fixComboBoxOverlay
|
|
1089
|
+
fixComboBoxOverlay(this.autocomplete, this.zIndex);
|
|
874
1090
|
}
|
|
875
1091
|
this.updateDisplayMode();
|
|
876
1092
|
}
|
|
@@ -943,16 +1159,16 @@ class ComboboxComponent extends InputsComponent {
|
|
|
943
1159
|
super.onInput(syntheticEvt);
|
|
944
1160
|
this.updateDisplayMode();
|
|
945
1161
|
}
|
|
946
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
947
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.
|
|
1162
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ComboboxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1163
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ComboboxComponent, isStandalone: true, selector: "sdc-combobox", inputs: { multiple: "multiple", appendTo: "appendTo", zIndex: "zIndex", options: "options", overrideChipMessage: "overrideChipMessage", maxSelectedLabels: "maxSelectedLabels", showClear: "showClear" }, outputs: { selectedValueEvent: "onSelectedItem" }, providers: [
|
|
948
1164
|
{
|
|
949
1165
|
provide: NG_VALUE_ACCESSOR,
|
|
950
1166
|
useExisting: forwardRef(() => ComboboxComponent),
|
|
951
1167
|
multi: true
|
|
952
1168
|
}
|
|
953
|
-
], viewQueries: [{ propertyName: "autocomplete", first: true, predicate: ["autocomplete"], descendants: true }, { propertyName: "multiselect", first: true, predicate: ["multiselect"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"sdc-combobox\">\n <label *ngIf=\"label\" [for]=\"identity.id\">\n <span>{{ label }}</span>\n <span class=\"required-field\" *ngIf=\"required\"> •</span>\n </label>\n\n <!-- SINGLE: p-autocomplete -->\n <ng-container *ngIf=\"!multiple; else multipleTpl\">\n <p-autocomplete #autocomplete dropdownIcon=\"fas fa-caret-down\" (completeMethod)=\"onSearch($event)\"\n (ngModelChange)=\"onInput($event)\" [(ngModel)]=\"value\" [autoHighlight]=\"true\" [disabled]=\"disabled\"\n [dropdown]=\"true\" [forceSelection]=\"true\" [id]=\"identity.id\" [name]=\"identity.name ?? ''\"\n [ngClass]=\"getInvalidClass()\" [placeholder]=\"placeholder\" [required]=\"required\" [showClear]=\"true\"\n [style]=\"getInputStyle()\" [suggestions]=\"filteredItems\" optionLabel=\"text\" optionValue=\"value\"\n [appendTo]=\"appendTo\">\n\n <ng-template pTemplate=\"item\" let-opt>\n <div class=\"flex align-items-center gap-2\">\n <i *ngIf=\"opt?.icon\" [class]=\"opt.icon\"></i>\n <span>{{ opt?.text }}</span>\n </div>\n </ng-template>\n\n <ng-template pTemplate=\"selectedItem\" let-opt>\n <div class=\"flex align-items-center gap-2\">\n <i *ngIf=\"opt?.icon\" [class]=\"opt.icon\"></i>\n <span>{{ opt?.text }}</span>\n </div>\n </ng-template>\n </p-autocomplete>\n </ng-container>\n\n <!-- MULTIPLE: p-multiselect -->\n <ng-template #multipleTpl>\n <p-multiselect chipIcon=\"fas fa-times\" #multiselect (ngModelChange)=\"onMultiModelChange($event)\" [options]=\"normalizedOptions\"\n optionLabel=\"text\" optionValue=\"value\" [filter]=\"true\" [display]=\"displayMode\" dropdownIcon=\"fas fa-caret-down\"\n [disabled]=\"disabled\" [appendTo]=\"appendTo\" [placeholder]=\"placeholder\" [showClear]=\"true\"\n [style]=\"getInputStyle()\" [ngClass]=\"getInvalidClass()\" [id]=\"identity.id\" [name]=\"identity.name ?? ''\"\n [required]=\"required\" (onChange)=\"onMultiChange($event)\" [(ngModel)]=\"value\"\n [maxSelectedLabels]=\"maxSelectedLabels\" [selectedItemsLabel]=\"selectedItemsLabel\"><ng-template pTemplate=\"item\"\n let-opt>\n <div class=\"flex align-items-center gap-2\">\n <i *ngIf=\"opt?.icon\" [class]=\"opt.icon\"></i>\n <span>{{ opt?.text }}</span>\n </div>\n </ng-template>\n\n <ng-template pTemplate=\"chip\" let-opt>\n <div class=\"flex align-items-center gap-2\">\n <i *ngIf=\"opt?.icon\" [class]=\"opt.icon\"></i>\n <span class=\"text-sm\">{{ opt?.text }}</span>\n </div>\n </ng-template>\n </p-multiselect>\n </ng-template>\n\n <small *ngIf=\"message\" [ngClass]=\"getInvalidMessageClass()\">{{ message }}</small>\n</div>\n", styles: [".sdc-combobox label{display:inline-flex;align-items:center;margin-bottom:0;line-height:1;padding-top:7px;padding-bottom:7px}.sdc-combobox .required-field{margin-left:.25rem}.sdc-combobox ::ng-deep .p-inputtext{border:1px solid var(--sdc-formfield-default-border)!important;min-height:var(--sdc-formfield-default-height)!important;height:var(--sdc-formfield-default-height)!important;max-height:var(--sdc-formfield-default-height)!important;line-height:var(--sdc-formfield-default-line-height)!important}.sdc-combobox ::ng-deep .p-inputtext:disabled{background-color:var(--sdc-formfield-disabled-bg)!important}.sdc-combobox ::ng-deep .p-autocomplete-dropdown{border-start-end-radius:var(--sdc-formfield-border-radius)!important;border-end-end-radius:var(--sdc-formfield-border-radius)!important;background-color:var(--sdc-formfield-default-bg)!important;border:1px solid var(--sdc-formfield-default-border)!important;border-left:0!important;color:var(--sdc-button-icon-default)!important}.sdc-combobox ::ng-deep .p-autocomplete-dropdown .p-button-icon{color:var(--sdc-button-icon-default)!important}.sdc-combobox ::ng-deep .p-autocomplete-dropdown:hover{transition:var(--sdc-button-bg-hover-transition)!important;background-color:var(--sdc-button-bg-hover)!important}.sdc-combobox ::ng-deep .p-autocomplete input{border-start-start-radius:var(--sdc-formfield-border-radius)!important;border-end-start-radius:var(--sdc-formfield-border-radius)!important}.sdc-combobox ::ng-deep .p-autocomplete .p-autocomplete-clear-icon{color:var(--sdc-button-icon-default)!important}.sdc-combobox ::ng-deep .p-multiselect{display:flex!important;align-items:center!important;min-height:var(--sdc-formfield-default-height)!important;height:var(--sdc-formfield-default-height)!important;max-height:var(--sdc-formfield-default-height)!important;border:1px solid var(--sdc-formfield-default-border)!important;border-radius:var(--sdc-formfield-border-radius)!important}.sdc-combobox ::ng-deep .p-multiselect .p-multiselect-label-container{height:100%!important;display:flex!important;align-items:center!important;overflow:hidden!important}.sdc-combobox ::ng-deep .p-multiselect .p-multiselect-label{height:100%!important;display:flex!important;align-items:center!important;padding:0 .75rem!important;line-height:var(--sdc-formfield-default-line-height)!important}.sdc-combobox ::ng-deep .p-multiselect .p-multiselect-trigger,.sdc-combobox ::ng-deep .p-multiselect-dropdown{height:100%!important;display:flex!important;align-items:center!important;justify-content:center!important;border-left:1px solid var(--sdc-formfield-default-border)!important;background-color:var(--sdc-formfield-default-bg)!important;border-start-end-radius:var(--sdc-formfield-border-radius)!important;border-end-end-radius:var(--sdc-formfield-border-radius)!important}.sdc-combobox ::ng-deep .p-multiselect .p-multiselect-trigger span,.sdc-combobox ::ng-deep .p-multiselect-dropdown span{color:var(--sdc-button-icon-default)!important}.sdc-combobox ::ng-deep .p-multiselect .p-multiselect-trigger:hover,.sdc-combobox ::ng-deep .p-multiselect-dropdown:hover{background-color:var(--sdc-button-bg-hover)!important;transition:var(--sdc-button-bg-hover-transition)!important}.sdc-combobox ::ng-deep .p-multiselect .p-multiselect-trigger-icon,.sdc-combobox ::ng-deep .p-multiselect-dropdown .p-button-icon{color:var(--sdc-button-icon-default)!important}.sdc-combobox ::ng-deep .p-multiselect-token{margin-block:0!important}.sdc-combobox ::ng-deep .p-chip{background:var(--sdc-formfield-default-bg)!important;font-weight:500;border:1px solid var(--sdc-formfield-default-border)!important}.sdc-combobox ::ng-deep .p-multiselect:not(.p-disabled):hover{border-color:var(--sdc-formfield-default-border)!important}.sdc-combobox ::ng-deep .p-multiselect-clear-icon{color:var(--sdc-button-icon-default)!important;padding:10px!important}.sdc-combobox ::ng-deep .p-multiselect input{border-start-start-radius:var(--sdc-formfield-border-radius)!important;border-end-start-radius:var(--sdc-formfield-border-radius)!important}.sdc-combobox ::ng-deep .p-autocomplete-dropdown:disabled,.sdc-combobox ::ng-deep .p-multiselect.p-disabled .p-multiselect-trigger,.sdc-combobox ::ng-deep .p-multiselect.p-disabled .p-multiselect-dropdown{background-color:var(--sdc-formfield-disabled-bg)!important;color:var(--sdc-button-icon-default)!important;opacity:.6;cursor:not-allowed!important}.sdc-combobox ::ng-deep .p-autocomplete-dropdown:disabled:hover,.sdc-combobox ::ng-deep .p-multiselect.p-disabled .p-multiselect-trigger:hover,.sdc-combobox ::ng-deep .p-multiselect.p-disabled .p-multiselect-dropdown:hover{background-color:var(--sdc-formfield-disabled-bg)!important}\n"], dependencies: [{ kind: "ngmodule", type: AutoCompleteModule }, { kind: "component", type: i1$2.AutoComplete, selector: "p-autoComplete, p-autocomplete, p-auto-complete", inputs: ["minLength", "delay", "style", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "disabled", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "maxlength", "name", "required", "size", "appendTo", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "showClear", "field", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "overlayOptions", "suggestions", "itemSize", "optionLabel", "optionValue", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "selectOnFocus", "searchLocale", "optionDisabled", "focusOnHover", "typeahead", "variant", "fluid"], outputs: ["completeMethod", "onSelect", "onUnselect", "onFocus", "onBlur", "onDropdownClick", "onClear", "onKeyUp", "onShow", "onHide", "onLazyLoad"] }, { kind: "directive", type: i2$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: MultiSelectModule }, { kind: "component", type: i3$1.MultiSelect, selector: "p-multiSelect, p-multiselect, p-multi-select", inputs: ["id", "ariaLabel", "style", "styleClass", "panelStyle", "panelStyleClass", "inputId", "disabled", "fluid", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "variant", "appendTo", "dataKey", "name", "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", "size", "showClear", "autofocus", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "defaultLabel", "placeholder", "options", "filterValue", "itemSize", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1169
|
+
], viewQueries: [{ propertyName: "autocomplete", first: true, predicate: ["autocomplete"], descendants: true }, { propertyName: "multiselect", first: true, predicate: ["multiselect"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"sdc-combobox\">\n <label *ngIf=\"label\" [for]=\"identity.id\">\n <span>{{ label }}</span>\n <span class=\"required-field\" *ngIf=\"required\"> •</span>\n </label>\n\n <ng-container *ngIf=\"!multiple; else multipleTpl\">\n <p-autocomplete\n #autocomplete\n dropdownIcon=\"fas fa-caret-down\"\n (completeMethod)=\"onSearch($event)\"\n (ngModelChange)=\"onInput($event)\"\n [(ngModel)]=\"value\"\n [autoHighlight]=\"true\"\n [disabled]=\"disabled\"\n [dropdown]=\"true\"\n [forceSelection]=\"true\"\n [id]=\"identity.id\"\n [name]=\"identity.name ?? ''\"\n [ngClass]=\"getInvalidClass()\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n [showClear]=\"showClear\"\n [style]=\"getInputStyle()\"\n [suggestions]=\"filteredItems\"\n optionLabel=\"text\"\n optionValue=\"value\"\n [appendTo]=\"appendTo\"\n >\n <ng-template pTemplate=\"item\" let-opt>\n <div class=\"flex align-items-center gap-2\">\n <i *ngIf=\"opt?.icon\" [class]=\"opt.icon\"></i>\n <span>{{ opt?.text }}</span>\n </div>\n </ng-template>\n <ng-template pTemplate=\"selectedItem\" let-opt>\n <div class=\"flex align-items-center gap-2\">\n <i *ngIf=\"opt?.icon\" [class]=\"opt.icon\"></i>\n <span>{{ opt?.text }}</span>\n </div>\n </ng-template>\n </p-autocomplete>\n </ng-container>\n\n <ng-template #multipleTpl>\n <p-multiselect\n chipIcon=\"fas fa-times\"\n #multiselect\n (ngModelChange)=\"onMultiModelChange($event)\"\n [options]=\"normalizedOptions\"\n optionLabel=\"text\"\n optionValue=\"value\"\n [filter]=\"true\"\n [display]=\"displayMode\"\n dropdownIcon=\"fas fa-caret-down\"\n [disabled]=\"disabled\"\n [appendTo]=\"appendTo\"\n [placeholder]=\"placeholder\"\n [showClear]=\"showClear\"\n [style]=\"getInputStyle()\"\n [ngClass]=\"getInvalidClass()\"\n [id]=\"identity.id\"\n [name]=\"identity.name ?? ''\"\n [required]=\"required\"\n (onChange)=\"onMultiChange($event)\"\n [(ngModel)]=\"value\"\n [maxSelectedLabels]=\"maxSelectedLabels\"\n [selectedItemsLabel]=\"selectedItemsLabel\"\n >\n <ng-template pTemplate=\"item\" let-opt>\n <div class=\"flex align-items-center gap-2\">\n <i *ngIf=\"opt?.icon\" [class]=\"opt.icon\"></i>\n <span>{{ opt?.text }}</span>\n </div>\n </ng-template>\n <ng-template pTemplate=\"chip\" let-opt>\n <div class=\"flex align-items-center gap-2\">\n <i *ngIf=\"opt?.icon\" [class]=\"opt.icon\"></i>\n <span class=\"text-sm\">{{ opt?.text }}</span>\n </div>\n </ng-template>\n </p-multiselect>\n </ng-template>\n\n <small *ngIf=\"message\" [ngClass]=\"getInvalidMessageClass()\">{{ message }}</small>\n</div>\n", styles: [".sdc-combobox label{display:inline-flex;align-items:center;margin-bottom:0;line-height:1;padding-top:7px;padding-bottom:7px}.sdc-combobox .required-field{margin-left:.25rem}.sdc-combobox ::ng-deep .p-inputtext{border:1px solid var(--sdc-formfield-default-border)!important;min-height:var(--sdc-formfield-default-height)!important;height:var(--sdc-formfield-default-height)!important;max-height:var(--sdc-formfield-default-height)!important;line-height:var(--sdc-formfield-default-line-height)!important}.sdc-combobox ::ng-deep .p-inputtext:disabled{background-color:var(--sdc-formfield-disabled-bg)!important}.sdc-combobox ::ng-deep .p-autocomplete-dropdown{border-start-end-radius:var(--sdc-formfield-border-radius)!important;border-end-end-radius:var(--sdc-formfield-border-radius)!important;background-color:var(--sdc-formfield-default-bg)!important;border:1px solid var(--sdc-formfield-default-border)!important;border-left:0!important;color:var(--sdc-button-icon-default)!important}.sdc-combobox ::ng-deep .p-autocomplete-dropdown .p-button-icon{color:var(--sdc-button-icon-default)!important}.sdc-combobox ::ng-deep .p-autocomplete-dropdown:hover{transition:var(--sdc-button-bg-hover-transition)!important;background-color:var(--sdc-button-bg-hover)!important}.sdc-combobox ::ng-deep .p-autocomplete input{border-start-start-radius:var(--sdc-formfield-border-radius)!important;border-end-start-radius:var(--sdc-formfield-border-radius)!important}.sdc-combobox ::ng-deep .p-autocomplete .p-autocomplete-clear-icon{color:var(--sdc-button-icon-default)!important}.sdc-combobox ::ng-deep .p-multiselect{display:flex!important;align-items:center!important;min-height:var(--sdc-formfield-default-height)!important;height:var(--sdc-formfield-default-height)!important;max-height:var(--sdc-formfield-default-height)!important;border:1px solid var(--sdc-formfield-default-border)!important;border-radius:var(--sdc-formfield-border-radius)!important}.sdc-combobox ::ng-deep .p-multiselect .p-multiselect-label-container{height:100%!important;display:flex!important;align-items:center!important;overflow:hidden!important}.sdc-combobox ::ng-deep .p-multiselect .p-multiselect-label{height:100%!important;display:flex!important;align-items:center!important;padding:0 .75rem!important;line-height:var(--sdc-formfield-default-line-height)!important}.sdc-combobox ::ng-deep .p-multiselect .p-multiselect-trigger,.sdc-combobox ::ng-deep .p-multiselect-dropdown{height:100%!important;display:flex!important;align-items:center!important;justify-content:center!important;border-left:1px solid var(--sdc-formfield-default-border)!important;background-color:var(--sdc-formfield-default-bg)!important;border-start-end-radius:var(--sdc-formfield-border-radius)!important;border-end-end-radius:var(--sdc-formfield-border-radius)!important}.sdc-combobox ::ng-deep .p-multiselect .p-multiselect-trigger span,.sdc-combobox ::ng-deep .p-multiselect-dropdown span{color:var(--sdc-button-icon-default)!important}.sdc-combobox ::ng-deep .p-multiselect .p-multiselect-trigger:hover,.sdc-combobox ::ng-deep .p-multiselect-dropdown:hover{background-color:var(--sdc-button-bg-hover)!important;transition:var(--sdc-button-bg-hover-transition)!important}.sdc-combobox ::ng-deep .p-multiselect .p-multiselect-trigger-icon,.sdc-combobox ::ng-deep .p-multiselect-dropdown .p-button-icon{color:var(--sdc-button-icon-default)!important}.sdc-combobox ::ng-deep .p-multiselect-token{margin-block:0!important}.sdc-combobox ::ng-deep .p-chip{background:#f5f5f5!important;border:1px solid var(--sdc-formfield-default-border)!important;height:22px;font-weight:500}.sdc-combobox ::ng-deep .p-multiselect:not(.p-disabled):hover{border-color:var(--sdc-formfield-default-border)!important}.sdc-combobox ::ng-deep .p-multiselect-clear-icon{color:var(--sdc-button-icon-default)!important;padding:10px!important}.sdc-combobox ::ng-deep .p-multiselect input{border-start-start-radius:var(--sdc-formfield-border-radius)!important;border-end-start-radius:var(--sdc-formfield-border-radius)!important}.sdc-combobox ::ng-deep .p-autocomplete-dropdown:disabled,.sdc-combobox ::ng-deep .p-multiselect.p-disabled .p-multiselect-trigger,.sdc-combobox ::ng-deep .p-multiselect.p-disabled .p-multiselect-dropdown{background-color:var(--sdc-formfield-disabled-bg)!important;color:var(--sdc-button-icon-default)!important;opacity:.6;cursor:not-allowed!important}.sdc-combobox ::ng-deep .p-autocomplete-dropdown:disabled:hover,.sdc-combobox ::ng-deep .p-multiselect.p-disabled .p-multiselect-trigger:hover,.sdc-combobox ::ng-deep .p-multiselect.p-disabled .p-multiselect-dropdown:hover{background-color:var(--sdc-formfield-disabled-bg)!important}\n"], dependencies: [{ kind: "ngmodule", type: AutoCompleteModule }, { kind: "component", type: i1$3.AutoComplete, selector: "p-autoComplete, p-autocomplete, p-auto-complete", inputs: ["minLength", "delay", "style", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "disabled", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "maxlength", "name", "required", "size", "appendTo", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "showClear", "field", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "overlayOptions", "suggestions", "itemSize", "optionLabel", "optionValue", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "selectOnFocus", "searchLocale", "optionDisabled", "focusOnHover", "typeahead", "variant", "fluid"], outputs: ["completeMethod", "onSelect", "onUnselect", "onFocus", "onBlur", "onDropdownClick", "onClear", "onKeyUp", "onShow", "onHide", "onLazyLoad"] }, { kind: "directive", type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: MultiSelectModule }, { kind: "component", type: i3$1.MultiSelect, selector: "p-multiSelect, p-multiselect, p-multi-select", inputs: ["id", "ariaLabel", "style", "styleClass", "panelStyle", "panelStyleClass", "inputId", "disabled", "fluid", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "variant", "appendTo", "dataKey", "name", "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", "size", "showClear", "autofocus", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "defaultLabel", "placeholder", "options", "filterValue", "itemSize", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
954
1170
|
}
|
|
955
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
1171
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ComboboxComponent, decorators: [{
|
|
956
1172
|
type: Component,
|
|
957
1173
|
args: [{ imports: [AutoCompleteModule, MultiSelectModule, CommonModule, FormsModule, ReactiveFormsModule], standalone: true, selector: 'sdc-combobox', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, providers: [
|
|
958
1174
|
{
|
|
@@ -960,7 +1176,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
960
1176
|
useExisting: forwardRef(() => ComboboxComponent),
|
|
961
1177
|
multi: true
|
|
962
1178
|
}
|
|
963
|
-
], template: "<div class=\"sdc-combobox\">\n <label *ngIf=\"label\" [for]=\"identity.id\">\n <span>{{ label }}</span>\n <span class=\"required-field\" *ngIf=\"required\"> •</span>\n </label>\n\n
|
|
1179
|
+
], template: "<div class=\"sdc-combobox\">\n <label *ngIf=\"label\" [for]=\"identity.id\">\n <span>{{ label }}</span>\n <span class=\"required-field\" *ngIf=\"required\"> •</span>\n </label>\n\n <ng-container *ngIf=\"!multiple; else multipleTpl\">\n <p-autocomplete\n #autocomplete\n dropdownIcon=\"fas fa-caret-down\"\n (completeMethod)=\"onSearch($event)\"\n (ngModelChange)=\"onInput($event)\"\n [(ngModel)]=\"value\"\n [autoHighlight]=\"true\"\n [disabled]=\"disabled\"\n [dropdown]=\"true\"\n [forceSelection]=\"true\"\n [id]=\"identity.id\"\n [name]=\"identity.name ?? ''\"\n [ngClass]=\"getInvalidClass()\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n [showClear]=\"showClear\"\n [style]=\"getInputStyle()\"\n [suggestions]=\"filteredItems\"\n optionLabel=\"text\"\n optionValue=\"value\"\n [appendTo]=\"appendTo\"\n >\n <ng-template pTemplate=\"item\" let-opt>\n <div class=\"flex align-items-center gap-2\">\n <i *ngIf=\"opt?.icon\" [class]=\"opt.icon\"></i>\n <span>{{ opt?.text }}</span>\n </div>\n </ng-template>\n <ng-template pTemplate=\"selectedItem\" let-opt>\n <div class=\"flex align-items-center gap-2\">\n <i *ngIf=\"opt?.icon\" [class]=\"opt.icon\"></i>\n <span>{{ opt?.text }}</span>\n </div>\n </ng-template>\n </p-autocomplete>\n </ng-container>\n\n <ng-template #multipleTpl>\n <p-multiselect\n chipIcon=\"fas fa-times\"\n #multiselect\n (ngModelChange)=\"onMultiModelChange($event)\"\n [options]=\"normalizedOptions\"\n optionLabel=\"text\"\n optionValue=\"value\"\n [filter]=\"true\"\n [display]=\"displayMode\"\n dropdownIcon=\"fas fa-caret-down\"\n [disabled]=\"disabled\"\n [appendTo]=\"appendTo\"\n [placeholder]=\"placeholder\"\n [showClear]=\"showClear\"\n [style]=\"getInputStyle()\"\n [ngClass]=\"getInvalidClass()\"\n [id]=\"identity.id\"\n [name]=\"identity.name ?? ''\"\n [required]=\"required\"\n (onChange)=\"onMultiChange($event)\"\n [(ngModel)]=\"value\"\n [maxSelectedLabels]=\"maxSelectedLabels\"\n [selectedItemsLabel]=\"selectedItemsLabel\"\n >\n <ng-template pTemplate=\"item\" let-opt>\n <div class=\"flex align-items-center gap-2\">\n <i *ngIf=\"opt?.icon\" [class]=\"opt.icon\"></i>\n <span>{{ opt?.text }}</span>\n </div>\n </ng-template>\n <ng-template pTemplate=\"chip\" let-opt>\n <div class=\"flex align-items-center gap-2\">\n <i *ngIf=\"opt?.icon\" [class]=\"opt.icon\"></i>\n <span class=\"text-sm\">{{ opt?.text }}</span>\n </div>\n </ng-template>\n </p-multiselect>\n </ng-template>\n\n <small *ngIf=\"message\" [ngClass]=\"getInvalidMessageClass()\">{{ message }}</small>\n</div>\n", styles: [".sdc-combobox label{display:inline-flex;align-items:center;margin-bottom:0;line-height:1;padding-top:7px;padding-bottom:7px}.sdc-combobox .required-field{margin-left:.25rem}.sdc-combobox ::ng-deep .p-inputtext{border:1px solid var(--sdc-formfield-default-border)!important;min-height:var(--sdc-formfield-default-height)!important;height:var(--sdc-formfield-default-height)!important;max-height:var(--sdc-formfield-default-height)!important;line-height:var(--sdc-formfield-default-line-height)!important}.sdc-combobox ::ng-deep .p-inputtext:disabled{background-color:var(--sdc-formfield-disabled-bg)!important}.sdc-combobox ::ng-deep .p-autocomplete-dropdown{border-start-end-radius:var(--sdc-formfield-border-radius)!important;border-end-end-radius:var(--sdc-formfield-border-radius)!important;background-color:var(--sdc-formfield-default-bg)!important;border:1px solid var(--sdc-formfield-default-border)!important;border-left:0!important;color:var(--sdc-button-icon-default)!important}.sdc-combobox ::ng-deep .p-autocomplete-dropdown .p-button-icon{color:var(--sdc-button-icon-default)!important}.sdc-combobox ::ng-deep .p-autocomplete-dropdown:hover{transition:var(--sdc-button-bg-hover-transition)!important;background-color:var(--sdc-button-bg-hover)!important}.sdc-combobox ::ng-deep .p-autocomplete input{border-start-start-radius:var(--sdc-formfield-border-radius)!important;border-end-start-radius:var(--sdc-formfield-border-radius)!important}.sdc-combobox ::ng-deep .p-autocomplete .p-autocomplete-clear-icon{color:var(--sdc-button-icon-default)!important}.sdc-combobox ::ng-deep .p-multiselect{display:flex!important;align-items:center!important;min-height:var(--sdc-formfield-default-height)!important;height:var(--sdc-formfield-default-height)!important;max-height:var(--sdc-formfield-default-height)!important;border:1px solid var(--sdc-formfield-default-border)!important;border-radius:var(--sdc-formfield-border-radius)!important}.sdc-combobox ::ng-deep .p-multiselect .p-multiselect-label-container{height:100%!important;display:flex!important;align-items:center!important;overflow:hidden!important}.sdc-combobox ::ng-deep .p-multiselect .p-multiselect-label{height:100%!important;display:flex!important;align-items:center!important;padding:0 .75rem!important;line-height:var(--sdc-formfield-default-line-height)!important}.sdc-combobox ::ng-deep .p-multiselect .p-multiselect-trigger,.sdc-combobox ::ng-deep .p-multiselect-dropdown{height:100%!important;display:flex!important;align-items:center!important;justify-content:center!important;border-left:1px solid var(--sdc-formfield-default-border)!important;background-color:var(--sdc-formfield-default-bg)!important;border-start-end-radius:var(--sdc-formfield-border-radius)!important;border-end-end-radius:var(--sdc-formfield-border-radius)!important}.sdc-combobox ::ng-deep .p-multiselect .p-multiselect-trigger span,.sdc-combobox ::ng-deep .p-multiselect-dropdown span{color:var(--sdc-button-icon-default)!important}.sdc-combobox ::ng-deep .p-multiselect .p-multiselect-trigger:hover,.sdc-combobox ::ng-deep .p-multiselect-dropdown:hover{background-color:var(--sdc-button-bg-hover)!important;transition:var(--sdc-button-bg-hover-transition)!important}.sdc-combobox ::ng-deep .p-multiselect .p-multiselect-trigger-icon,.sdc-combobox ::ng-deep .p-multiselect-dropdown .p-button-icon{color:var(--sdc-button-icon-default)!important}.sdc-combobox ::ng-deep .p-multiselect-token{margin-block:0!important}.sdc-combobox ::ng-deep .p-chip{background:#f5f5f5!important;border:1px solid var(--sdc-formfield-default-border)!important;height:22px;font-weight:500}.sdc-combobox ::ng-deep .p-multiselect:not(.p-disabled):hover{border-color:var(--sdc-formfield-default-border)!important}.sdc-combobox ::ng-deep .p-multiselect-clear-icon{color:var(--sdc-button-icon-default)!important;padding:10px!important}.sdc-combobox ::ng-deep .p-multiselect input{border-start-start-radius:var(--sdc-formfield-border-radius)!important;border-end-start-radius:var(--sdc-formfield-border-radius)!important}.sdc-combobox ::ng-deep .p-autocomplete-dropdown:disabled,.sdc-combobox ::ng-deep .p-multiselect.p-disabled .p-multiselect-trigger,.sdc-combobox ::ng-deep .p-multiselect.p-disabled .p-multiselect-dropdown{background-color:var(--sdc-formfield-disabled-bg)!important;color:var(--sdc-button-icon-default)!important;opacity:.6;cursor:not-allowed!important}.sdc-combobox ::ng-deep .p-autocomplete-dropdown:disabled:hover,.sdc-combobox ::ng-deep .p-multiselect.p-disabled .p-multiselect-trigger:hover,.sdc-combobox ::ng-deep .p-multiselect.p-disabled .p-multiselect-dropdown:hover{background-color:var(--sdc-formfield-disabled-bg)!important}\n"] }]
|
|
964
1180
|
}], propDecorators: { multiple: [{
|
|
965
1181
|
type: Input
|
|
966
1182
|
}], appendTo: [{
|
|
@@ -973,6 +1189,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
973
1189
|
type: Input
|
|
974
1190
|
}], maxSelectedLabels: [{
|
|
975
1191
|
type: Input
|
|
1192
|
+
}], showClear: [{
|
|
1193
|
+
type: Input
|
|
976
1194
|
}], selectedValueEvent: [{
|
|
977
1195
|
type: Output,
|
|
978
1196
|
args: ['onSelectedItem']
|
|
@@ -1028,10 +1246,10 @@ class ConfirmComponent {
|
|
|
1028
1246
|
this.config.reject();
|
|
1029
1247
|
this.visible = false;
|
|
1030
1248
|
}
|
|
1031
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
1032
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.
|
|
1249
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ConfirmComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1250
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ConfirmComponent, isStandalone: true, selector: "sdc-confirm", inputs: { zIndex: "zIndex", visible: "visible", confirm: "confirm" }, outputs: { visibleChange: "visibleChange" }, viewQueries: [{ propertyName: "modal", first: true, predicate: ["modal"], descendants: true }], ngImport: i0, template: "<p-dialog\n #modal\n [(visible)]=\"visible\"\n [closable]=\"false\"\n [draggable]=\"false\"\n [header]=\"config.title | translate\"\n [modal]=\"true\"\n [responsive]=\"true\"\n [showHeader]=\"true\"\n position=\"top\"\n>\n <div class=\"content-sizing\">{{ config.message | translate }}</div>\n <ng-template #footer>\n <p-button [label]=\"getLabel('deny') | translate\" severity=\"secondary\" (onClick)=\"onDeny()\" />\n <p-button [label]=\"getLabel('confirm') | translate\" [severity]=\"getSeverity()\" (onClick)=\"onConfirm()\" />\n </ng-template>\n</p-dialog>\n", styles: [".content-sizing{max-width:480px}\n"], dependencies: [{ kind: "ngmodule", type: ButtonModule$1 }, { kind: "component", type: i1$4.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "fluid", "buttonProps"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i2$1.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "closeButtonProps", "maximizeButtonProps", "visible", "style", "position", "role", "content", "contentTemplate", "footerTemplate", "closeIconTemplate", "maximizeIconTemplate", "minimizeIconTemplate", "headlessTemplate"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$5.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1033
1251
|
}
|
|
1034
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
1252
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ConfirmComponent, decorators: [{
|
|
1035
1253
|
type: Component,
|
|
1036
1254
|
args: [{ imports: [ButtonModule$1, DialogModule, TranslateModule], standalone: true, selector: 'sdc-confirm', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, template: "<p-dialog\n #modal\n [(visible)]=\"visible\"\n [closable]=\"false\"\n [draggable]=\"false\"\n [header]=\"config.title | translate\"\n [modal]=\"true\"\n [responsive]=\"true\"\n [showHeader]=\"true\"\n position=\"top\"\n>\n <div class=\"content-sizing\">{{ config.message | translate }}</div>\n <ng-template #footer>\n <p-button [label]=\"getLabel('deny') | translate\" severity=\"secondary\" (onClick)=\"onDeny()\" />\n <p-button [label]=\"getLabel('confirm') | translate\" [severity]=\"getSeverity()\" (onClick)=\"onConfirm()\" />\n </ng-template>\n</p-dialog>\n", styles: [".content-sizing{max-width:480px}\n"] }]
|
|
1037
1255
|
}], propDecorators: { zIndex: [{
|
|
@@ -1070,10 +1288,10 @@ class HyperlinkComponent {
|
|
|
1070
1288
|
this.domainFilterClickEvent.emit(this.domainFilterToken);
|
|
1071
1289
|
}
|
|
1072
1290
|
}
|
|
1073
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
1074
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.
|
|
1291
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: HyperlinkComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1292
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: HyperlinkComponent, isStandalone: true, selector: "sdc-hyperlink", inputs: { href: "href", text: "text", domainFilterToken: "domainFilterToken" }, outputs: { clickEvent: "onClick", domainFilterClickEvent: "onDomainFilter" }, ngImport: i0, template: "<span *ngIf=\"!href\" class=\"hyperlink\" (click)=\"dispatchClickEvent($event)\">\n {{ textContent }}\n</span>\n\n<a *ngIf=\"href\" [href]=\"href\" class=\"hyperlink\" (click)=\"dispatchClickEvent($event)\">\n {{ textContent }}\n</a>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1075
1293
|
}
|
|
1076
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
1294
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: HyperlinkComponent, decorators: [{
|
|
1077
1295
|
type: Component,
|
|
1078
1296
|
args: [{ imports: [CommonModule], standalone: true, selector: 'sdc-hyperlink', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, template: "<span *ngIf=\"!href\" class=\"hyperlink\" (click)=\"dispatchClickEvent($event)\">\n {{ textContent }}\n</span>\n\n<a *ngIf=\"href\" [href]=\"href\" class=\"hyperlink\" (click)=\"dispatchClickEvent($event)\">\n {{ textContent }}\n</a>\n" }]
|
|
1079
1297
|
}], ctorParameters: () => [], propDecorators: { href: [{
|
|
@@ -1150,10 +1368,10 @@ class ListComponent {
|
|
|
1150
1368
|
}
|
|
1151
1369
|
return [];
|
|
1152
1370
|
}
|
|
1153
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
1154
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.
|
|
1371
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1372
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ListComponent, isStandalone: true, selector: "sdc-list", inputs: { loading: "loading", items: "items", actions: "actions" }, outputs: { action: "action" }, ngImport: i0, template: "<div class=\"sdc-list\">\n <div *ngIf=\"!loading && !(!dataItems || dataItems.length === 0)\">\n <div class=\"sdc-list-item\" *ngFor=\"let item of dataItems\">\n <div class=\"sdc-list-content\">\n <div class=\"sdc-list-title\">{{ item.title }}</div>\n <div class=\"sdc-list-subtitle\">{{ item.subtitle }}</div>\n </div>\n <div class=\"sdc-list-actions\" *ngIf=\"dataActions && dataActions.length > 0\">\n <ng-container *ngFor=\"let action of dataActions\">\n <ng-container *ngFor=\"let __k of [actionKey(action)]\">\n <sdc-button\n (onClick)=\"onActionClick(action, item)\"\n [disabled]=\"!!action.disabled\"\n [icon]=\"action.icon || $any(action).iconClass || $any(action).leftIcon\"\n [label]=\"action.label ?? $any(action).text\"\n [priority]=\"action.priority || 'default'\"\n [attr.disabled]=\"action.disabled ? '' : null\"\n [attr.icon]=\"action.icon || $any(action).iconClass || $any(action).leftIcon\"\n [attr.label]=\"action.label ?? $any(action).text\"\n [attr.priority]=\"action.priority || 'default'\"\n [attr.severity]=\"action.priority || 'default'\"\n [attr.data-key]=\"__k\"\n >\n </sdc-button>\n </ng-container>\n </ng-container>\n </div>\n </div>\n </div>\n\n <div *ngIf=\"!loading && (!dataItems || dataItems.length === 0)\" class=\"sdc-list-hidden\" aria-live=\"polite\">\n <s-empty-state\n id=\"my-empty-state\"\n iconClass=\"fa fa-inbox\"\n title=\"Nenhum registro encontrado\"\n description=\"Nenhum cadastro foi encontrado.\"\n >\n </s-empty-state>\n </div>\n\n <div *ngIf=\"loading\" class=\"sdc-list-hidden\">\n <s-loading-state [loading]=\"loading\" [blockWindow]=\"false\"></s-loading-state>\n </div>\n</div>\n", styles: [":host{display:block}.sdc-list{background:#fff;border:1px solid var(--sdc-formfield-default-border);overflow:hidden}.sdc-list-hidden{min-height:21rem;padding-top:6rem;padding-bottom:6rem}.sdc-list-item{display:flex;align-items:center;justify-content:space-between;padding:16px;border-bottom:1px solid var(--sdc-formfield-default-border)}.sdc-list-item:last-child{border-bottom:0}.sdc-list-content{flex:1 1 auto;min-width:0}.sdc-list-title{font-weight:600;font-size:16px;line-height:1.25;color:#1f2937;margin:0 0 4px}.sdc-list-subtitle{font-size:12px;color:#6b7280;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sdc-list-actions{display:flex;align-items:center;gap:8px;margin-left:24px;flex-shrink:0}ul.sdc-list,.sdc-list ul,.sdc-list li{list-style:none;margin:0;padding:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ButtonComponent, selector: "sdc-button", inputs: ["disabled", "width", "icon", "id", "label", "priority", "size", "type"], outputs: ["onClick"] }, { kind: "ngmodule", type: EmptyStateModule }, { kind: "component", type: i3$2.EmptyStateComponent, selector: "s-empty-state", inputs: ["id", "title", "iconClass", "description", "showPrimaryAction", "showSecondaryAction", "primaryActionLabel", "secondaryActionLabel", "primaryModel"], outputs: ["primaryAction", "secondaryAction"] }, { kind: "ngmodule", type: LoadingStateModule }, { kind: "component", type: i2$2.LoadingStateComponent, selector: "s-loading-state", inputs: ["indicator", "id", "blockWindow", "loading"] }] });
|
|
1155
1373
|
}
|
|
1156
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
1374
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ListComponent, decorators: [{
|
|
1157
1375
|
type: Component,
|
|
1158
1376
|
args: [{ standalone: true, selector: 'sdc-list', imports: [CommonModule, ButtonComponent, EmptyStateModule, LoadingStateModule], encapsulation: ViewEncapsulation.Emulated, template: "<div class=\"sdc-list\">\n <div *ngIf=\"!loading && !(!dataItems || dataItems.length === 0)\">\n <div class=\"sdc-list-item\" *ngFor=\"let item of dataItems\">\n <div class=\"sdc-list-content\">\n <div class=\"sdc-list-title\">{{ item.title }}</div>\n <div class=\"sdc-list-subtitle\">{{ item.subtitle }}</div>\n </div>\n <div class=\"sdc-list-actions\" *ngIf=\"dataActions && dataActions.length > 0\">\n <ng-container *ngFor=\"let action of dataActions\">\n <ng-container *ngFor=\"let __k of [actionKey(action)]\">\n <sdc-button\n (onClick)=\"onActionClick(action, item)\"\n [disabled]=\"!!action.disabled\"\n [icon]=\"action.icon || $any(action).iconClass || $any(action).leftIcon\"\n [label]=\"action.label ?? $any(action).text\"\n [priority]=\"action.priority || 'default'\"\n [attr.disabled]=\"action.disabled ? '' : null\"\n [attr.icon]=\"action.icon || $any(action).iconClass || $any(action).leftIcon\"\n [attr.label]=\"action.label ?? $any(action).text\"\n [attr.priority]=\"action.priority || 'default'\"\n [attr.severity]=\"action.priority || 'default'\"\n [attr.data-key]=\"__k\"\n >\n </sdc-button>\n </ng-container>\n </ng-container>\n </div>\n </div>\n </div>\n\n <div *ngIf=\"!loading && (!dataItems || dataItems.length === 0)\" class=\"sdc-list-hidden\" aria-live=\"polite\">\n <s-empty-state\n id=\"my-empty-state\"\n iconClass=\"fa fa-inbox\"\n title=\"Nenhum registro encontrado\"\n description=\"Nenhum cadastro foi encontrado.\"\n >\n </s-empty-state>\n </div>\n\n <div *ngIf=\"loading\" class=\"sdc-list-hidden\">\n <s-loading-state [loading]=\"loading\" [blockWindow]=\"false\"></s-loading-state>\n </div>\n</div>\n", styles: [":host{display:block}.sdc-list{background:#fff;border:1px solid var(--sdc-formfield-default-border);overflow:hidden}.sdc-list-hidden{min-height:21rem;padding-top:6rem;padding-bottom:6rem}.sdc-list-item{display:flex;align-items:center;justify-content:space-between;padding:16px;border-bottom:1px solid var(--sdc-formfield-default-border)}.sdc-list-item:last-child{border-bottom:0}.sdc-list-content{flex:1 1 auto;min-width:0}.sdc-list-title{font-weight:600;font-size:16px;line-height:1.25;color:#1f2937;margin:0 0 4px}.sdc-list-subtitle{font-size:12px;color:#6b7280;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sdc-list-actions{display:flex;align-items:center;gap:8px;margin-left:24px;flex-shrink:0}ul.sdc-list,.sdc-list ul,.sdc-list li{list-style:none;margin:0;padding:0}\n"] }]
|
|
1159
1377
|
}], propDecorators: { loading: [{
|
|
@@ -1194,10 +1412,10 @@ class SearchboxComponent extends InputsComponent {
|
|
|
1194
1412
|
this.searchEvent.emit(this.value);
|
|
1195
1413
|
}
|
|
1196
1414
|
}
|
|
1197
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
1198
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.
|
|
1415
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SearchboxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1416
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: SearchboxComponent, isStandalone: true, selector: "sdc-searchbox", inputs: { triggerMode: "triggerMode" }, outputs: { searchEvent: "onSearch", clearEvent: "onClear" }, usesInheritance: true, ngImport: i0, template: "<div class=\"sdc-searchbox\">\n <label *ngIf=\"label\" [for]=\"identity.id\">\n <span>{{ label }}</span>\n <span class=\"required-field\" *ngIf=\"required\"> •</span>\n </label>\n <p-inputgroup [ngStyle]=\"getStyles()\">\n <p-inputgroup-addon *ngIf=\"triggerMode === 'submit'\">\n <s-button priority=\"link\" class=\"height-100\" [disabled]=\"disabled\" (click)=\"onSearch()\">\n <i class=\"fas fa-search\"></i>\n </s-button>\n </p-inputgroup-addon>\n \n <input [ngClass]=\"getInvalidClass()\" pInputText type=\"text\" [(ngModel)]=\"value\" [disabled]=\"disabled\"\n [placeholder]=\"placeholder || ('platform.datacore.search' | translate)\" (input)=\"onInput($event)\"\n (keyup.enter)=\"onSearch()\" (keyup.esc)=\"onClear()\" />\n\n <p-inputgroup-addon>\n <s-button priority=\"link\" class=\"height-100\" [disabled]=\"disabled\" (click)=\"onClear()\">\n <i class=\"fas fa-times\"></i>\n </s-button>\n </p-inputgroup-addon>\n\n\n </p-inputgroup>\n <small *ngIf=\"message\" [ngClass]=\"getInvalidMessageClass()\">{{ message }}</small>\n</div>", styles: [".sdc-searchbox ::ng-deep .p-inputgroup{display:flex;align-items:stretch;height:var(--sdc-formfield-default-height)!important;box-sizing:border-box!important;border:1px solid var(--sdc-formfield-default-border)!important;border-radius:var(--sdc-formfield-border-radius)!important;overflow:hidden;background:transparent}.sdc-searchbox ::ng-deep .p-inputgroup .p-inputtext,.sdc-searchbox ::ng-deep .p-inputgroupaddon{height:100%!important;min-height:0!important;max-height:none!important;box-sizing:border-box!important}.sdc-searchbox ::ng-deep .p-inputtext{background:var(--sdc-formfield-default-bg)!important;border:0!important;box-shadow:none!important;outline:0!important;line-height:var(--sdc-formfield-default-line-height)!important}.sdc-searchbox ::ng-deep .p-inputtext:disabled{background-color:var(--sdc-formfield-disabled-bg)!important}.sdc-searchbox ::ng-deep .p-inputgroupaddon{display:flex;align-items:stretch;justify-content:center;padding:0!important;border:0!important;line-height:var(--sdc-formfield-default-line-height)!important;background-color:var(--sdc-formfield-default-bg)!important}.sdc-searchbox ::ng-deep .p-inputgroupaddon:hover{background-color:var(--sdc-button-bg-hover)!important;transition:var(--sdc-button-bg-hover-transition)!important}.sdc-searchbox ::ng-deep .p-inputgroupaddon:has(button:disabled),.sdc-searchbox ::ng-deep .p-inputgroupaddon:has(button:disabled):hover{background-color:var(--sdc-formfield-disabled-bg)!important;cursor:not-allowed!important}.sdc-searchbox ::ng-deep .p-inputgroupaddon:first-child{border-right:1px solid var(--sdc-formfield-default-border)!important}.sdc-searchbox ::ng-deep .p-inputgroupaddon:last-child{border-left:1px solid var(--sdc-formfield-default-border)!important}.sdc-searchbox ::ng-deep .p-inputgroupaddon>*{width:100%!important;height:100%!important}.sdc-searchbox ::ng-deep .p-inputgroupaddon s-button{display:flex!important;background:transparent!important;color:var(--sdc-button-icon-default)!important;width:100%!important;height:100%!important}.sdc-searchbox ::ng-deep .p-inputgroupaddon s-button button{display:flex!important;align-items:center!important;justify-content:center!important;width:100%!important;height:100%!important;margin:0!important;padding:0 .75rem!important;background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;line-height:var(--sdc-formfield-default-line-height)!important}.sdc-searchbox ::ng-deep .p-inputgroupaddon s-button button:disabled{background-color:var(--sdc-formfield-disabled-bg)!important;color:var(--sdc-button-icon-default)!important;opacity:.6;cursor:not-allowed!important}.sdc-searchbox ::ng-deep .p-inputgroupaddon s-button i{color:var(--sdc-button-icon-default)!important}.sdc-searchbox label{display:inline-flex;align-items:center;margin-bottom:0;line-height:1;padding-top:7px;padding-bottom:7px}.sdc-searchbox .required-field{margin-left:.25rem}.sdc-searchbox ::ng-deep .p-inputgroupaddon:last-child{border-start-end-radius:0;border-end-end-radius:0}.sdc-searchbox ::ng-deep .p-inputgroupaddon:first-child{border-start-start-radius:0;border-end-start-radius:0}\n"], dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i1.ButtonComponent, selector: "s-button", inputs: ["id", "label", "tooltip", "tooltipPosition", "iconClass", "rightIconClass", "caret", "styleClass", "baseZIndex", "disabled", "auxiliary", "type", "priority", "menuOptions", "size", "slide", "animation", "badge", "iconColor"], outputs: ["clicked"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i5.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: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: InputGroupAddonModule }, { kind: "component", type: i4$1.InputGroupAddon, selector: "p-inputgroup-addon, p-inputGroupAddon", inputs: ["style", "styleClass"] }, { kind: "ngmodule", type: InputGroupModule }, { kind: "component", type: i5$1.InputGroup, selector: "p-inputgroup, p-inputGroup, p-input-group", inputs: ["style", "styleClass"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i6.InputText, selector: "[pInputText]", inputs: ["variant", "fluid", "pSize"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$5.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1199
1417
|
}
|
|
1200
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
1418
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SearchboxComponent, decorators: [{
|
|
1201
1419
|
type: Component,
|
|
1202
1420
|
args: [{ selector: 'sdc-searchbox', standalone: true, imports: [
|
|
1203
1421
|
ButtonModule,
|
|
@@ -1220,38 +1438,86 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
1220
1438
|
}] } });
|
|
1221
1439
|
|
|
1222
1440
|
class PaginatorComponent {
|
|
1223
|
-
first =
|
|
1224
|
-
rows =
|
|
1225
|
-
totalRecords =
|
|
1226
|
-
rowsPerPageOptions;
|
|
1227
|
-
isMobile = false;
|
|
1228
|
-
totalRecordsLabel = '';
|
|
1441
|
+
first = input.required();
|
|
1442
|
+
rows = input.required();
|
|
1443
|
+
totalRecords = input.required();
|
|
1444
|
+
rowsPerPageOptions = input(undefined);
|
|
1445
|
+
isMobile = input(false);
|
|
1446
|
+
totalRecordsLabel = input('');
|
|
1229
1447
|
pageChange = new EventEmitter();
|
|
1230
|
-
|
|
1231
|
-
|
|
1448
|
+
selectedRows = signal('0');
|
|
1449
|
+
constructor() {
|
|
1450
|
+
effect(() => {
|
|
1451
|
+
this.selectedRows.set(String(this.rows()));
|
|
1452
|
+
});
|
|
1232
1453
|
}
|
|
1233
|
-
|
|
1234
|
-
|
|
1454
|
+
rowOptions = computed(() => {
|
|
1455
|
+
const opts = (this.rowsPerPageOptions() ?? []).map(v => ({
|
|
1456
|
+
text: String(v),
|
|
1457
|
+
value: String(v)
|
|
1458
|
+
}));
|
|
1459
|
+
const cur = String(this.rows());
|
|
1460
|
+
if (!opts.some(o => o.value === cur)) {
|
|
1461
|
+
opts.unshift({ text: cur, value: cur });
|
|
1462
|
+
}
|
|
1463
|
+
return opts;
|
|
1464
|
+
});
|
|
1465
|
+
pageCount = computed(() => {
|
|
1466
|
+
const r = this.rows();
|
|
1467
|
+
const t = this.totalRecords();
|
|
1468
|
+
return r > 0 ? Math.max(1, Math.ceil(t / r)) : 1;
|
|
1469
|
+
});
|
|
1470
|
+
currentPage = computed(() => Math.floor(this.first() / Math.max(1, this.rows())));
|
|
1471
|
+
pages = computed(() => {
|
|
1472
|
+
const count = this.pageCount();
|
|
1473
|
+
const current = this.currentPage();
|
|
1474
|
+
const win = this.isMobile() ? 3 : 7;
|
|
1475
|
+
if (count <= win)
|
|
1476
|
+
return Array.from({ length: count }, (_, i) => i);
|
|
1477
|
+
const near = Math.floor((win - 3) / 2);
|
|
1478
|
+
const start = Math.max(1, current - near);
|
|
1479
|
+
const end = Math.min(count - 2, current + near);
|
|
1480
|
+
const list = [0];
|
|
1481
|
+
if (start > 1)
|
|
1482
|
+
list.push('…');
|
|
1483
|
+
for (let p = start; p <= end; p++)
|
|
1484
|
+
list.push(p);
|
|
1485
|
+
if (end < count - 2)
|
|
1486
|
+
list.push('…');
|
|
1487
|
+
list.push(count - 1);
|
|
1488
|
+
return list;
|
|
1489
|
+
});
|
|
1490
|
+
emitChange(first, rows = this.rows()) {
|
|
1491
|
+
const page = Math.floor(first / Math.max(1, rows));
|
|
1492
|
+
this.pageChange.emit({ first, rows, page, pageCount: this.pageCount() });
|
|
1493
|
+
}
|
|
1494
|
+
gotoPage(index) {
|
|
1495
|
+
const safe = Math.min(Math.max(index, 0), this.pageCount() - 1);
|
|
1496
|
+
this.emitChange(safe * this.rows());
|
|
1497
|
+
}
|
|
1498
|
+
firstPage() { this.gotoPage(0); }
|
|
1499
|
+
prevPage() { this.gotoPage(this.currentPage() - 1); }
|
|
1500
|
+
nextPage() { this.gotoPage(this.currentPage() + 1); }
|
|
1501
|
+
lastPage() { this.gotoPage(this.pageCount() - 1); }
|
|
1502
|
+
onRowsChange(rows) {
|
|
1503
|
+
this.selectedRows.set(String(rows));
|
|
1504
|
+
this.emitChange(0, rows);
|
|
1505
|
+
}
|
|
1506
|
+
onRowsComboModel(val) {
|
|
1507
|
+
const raw = Array.isArray(val) ? val[0] : val;
|
|
1508
|
+
const n = Number(raw);
|
|
1509
|
+
if (!Number.isNaN(n))
|
|
1510
|
+
this.onRowsChange(n);
|
|
1511
|
+
}
|
|
1512
|
+
isCurrent(p) { return p === this.currentPage(); }
|
|
1513
|
+
asNumber(p) { return typeof p === 'number'; }
|
|
1514
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PaginatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1515
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.14", type: PaginatorComponent, isStandalone: true, selector: "sdc-paginator", inputs: { first: { classPropertyName: "first", publicName: "first", isSignal: true, isRequired: true, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: true, transformFunction: null }, totalRecords: { classPropertyName: "totalRecords", publicName: "totalRecords", isSignal: true, isRequired: true, transformFunction: null }, rowsPerPageOptions: { classPropertyName: "rowsPerPageOptions", publicName: "rowsPerPageOptions", isSignal: true, isRequired: false, transformFunction: null }, isMobile: { classPropertyName: "isMobile", publicName: "isMobile", isSignal: true, isRequired: false, transformFunction: null }, totalRecordsLabel: { classPropertyName: "totalRecordsLabel", publicName: "totalRecordsLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pageChange: "pageChange" }, ngImport: i0, template: "<div class=\"sdc-paginator\" role=\"navigation\" aria-label=\"Pagination\">\n <div class=\"sdc-paginator-left\">\n <!-- bot\u00F5es e p\u00E1ginas (inalterado) -->\n <button\n type=\"button\"\n class=\"sdc-page sdc-edge\"\n [disabled]=\"currentPage() === 0\"\n (click)=\"firstPage()\"\n aria-label=\"Primeira p\u00E1gina\"\n >\n <i class=\"fas fa-step-forward fa-rotate-180\" aria-hidden=\"true\"></i>\n </button>\n <button\n type=\"button\"\n class=\"sdc-page sdc-edge\"\n [disabled]=\"currentPage() === 0\"\n (click)=\"prevPage()\"\n aria-label=\"P\u00E1gina anterior\"\n >\n <i class=\"fas fa-caret-left\" aria-hidden=\"true\"></i>\n </button>\n\n <ng-container *ngFor=\"let p of pages()\">\n <button\n *ngIf=\"asNumber(p)\"\n type=\"button\"\n class=\"sdc-page\"\n [class.is-active]=\"isCurrent(p)\"\n [attr.aria-current]=\"isCurrent(p) ? 'page' : null\"\n (click)=\"gotoPage(p)\"\n >\n {{ p + 1 }}\n </button>\n <span *ngIf=\"!asNumber(p)\" class=\"sdc-ellipsis\" aria-hidden=\"true\">\u2026</span>\n </ng-container>\n\n <button\n type=\"button\"\n class=\"sdc-page sdc-edge\"\n [disabled]=\"currentPage() >= pageCount() - 1\"\n (click)=\"nextPage()\"\n aria-label=\"Pr\u00F3xima p\u00E1gina\"\n >\n <i class=\"fas fa-caret-right\" aria-hidden=\"true\"></i>\n </button>\n <button\n type=\"button\"\n class=\"sdc-page sdc-edge\"\n [disabled]=\"currentPage() >= pageCount() - 1\"\n (click)=\"lastPage()\"\n aria-label=\"\u00DAltima p\u00E1gina\"\n >\n <i class=\"fas fa-step-forward\" aria-hidden=\"true\"></i>\n </button>\n <sdc-combobox\n class=\"sdc-rows-combobox\"\n [multiple]=\"false\"\n [options]=\"rowOptions()\"\n [appendTo]=\"'body'\"\n [showClear]=\"false\"\n [ngModel]=\"selectedRows()\"\n (onSelectedItem)=\"onRowsComboModel($event)\"\n >\n </sdc-combobox>\n </div>\n <span class=\"sdc-total\" *ngIf=\"totalRecordsLabel()\"> {{ totalRecordsLabel() }}: {{ totalRecords() }} </span>\n</div>\n", styles: [":host{--sdc-paginator-page-size: var(--sdc-table-paginator-size, 34px);--sdc-paginator-border: #cccccc;--sdc-paginator-primary: #428bca;--sdc-paginator-primary-hover: #6aa3d5;display:block}.sdc-paginator{display:flex;align-items:center;justify-content:space-between;gap:1rem;width:100%;box-sizing:border-box;padding:10px 10px 10px 0}.sdc-paginator .sdc-paginator-left{display:inline-flex;align-items:center;gap:0}.sdc-paginator .sdc-paginator-left ::ng-deep .sdc-combobox{width:6.5rem!important;padding-left:1rem!important}.sdc-paginator .sdc-page{min-width:var(--sdc-paginator-page-size);height:var(--sdc-paginator-page-size);padding:.4em .25em;margin:0;border:1px solid var(--sdc-paginator-border);border-right-width:0;background:transparent;color:var(--sdc-paginator-primary);cursor:pointer;transition:background-color .2s ease-out;text-align:center}.sdc-paginator .sdc-page:first-child{border-radius:4px 0 0 4px}.sdc-paginator .sdc-page:last-of-type{border-right-width:1px;border-radius:0 4px 4px 0}.sdc-paginator .sdc-page:hover{background-color:#f7f7f7}.sdc-paginator .sdc-page.is-active{background:var(--sdc-paginator-primary);color:#fff;border-color:var(--sdc-paginator-primary)}.sdc-paginator .sdc-page.is-active:hover{background:var(--sdc-paginator-primary-hover);border-color:var(--sdc-paginator-primary-hover)}.sdc-paginator .sdc-page:disabled{opacity:.5;cursor:not-allowed}.sdc-paginator .sdc-ellipsis{display:inline-flex;align-items:center;justify-content:center;min-width:var(--sdc-paginator-page-size);height:var(--sdc-paginator-page-size);border:1px solid var(--sdc-paginator-border);border-right-width:0}.sdc-paginator .sdc-rows-combobox{width:max-content;min-width:88px}.sdc-paginator .sdc-total{white-space:nowrap}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ComboboxComponent, selector: "sdc-combobox", inputs: ["multiple", "appendTo", "zIndex", "options", "overrideChipMessage", "maxSelectedLabels", "showClear"], outputs: ["onSelectedItem"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1235
1516
|
}
|
|
1236
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
1517
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PaginatorComponent, decorators: [{
|
|
1237
1518
|
type: Component,
|
|
1238
|
-
args: [{ selector: 'sdc-paginator', standalone: true, imports: [CommonModule,
|
|
1239
|
-
}], propDecorators: {
|
|
1240
|
-
type: Input,
|
|
1241
|
-
args: [{ required: true }]
|
|
1242
|
-
}], rows: [{
|
|
1243
|
-
type: Input,
|
|
1244
|
-
args: [{ required: true }]
|
|
1245
|
-
}], totalRecords: [{
|
|
1246
|
-
type: Input,
|
|
1247
|
-
args: [{ required: true }]
|
|
1248
|
-
}], rowsPerPageOptions: [{
|
|
1249
|
-
type: Input
|
|
1250
|
-
}], isMobile: [{
|
|
1251
|
-
type: Input
|
|
1252
|
-
}], totalRecordsLabel: [{
|
|
1253
|
-
type: Input
|
|
1254
|
-
}], pageChange: [{
|
|
1519
|
+
args: [{ selector: 'sdc-paginator', standalone: true, imports: [CommonModule, FormsModule, ComboboxComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"sdc-paginator\" role=\"navigation\" aria-label=\"Pagination\">\n <div class=\"sdc-paginator-left\">\n <!-- bot\u00F5es e p\u00E1ginas (inalterado) -->\n <button\n type=\"button\"\n class=\"sdc-page sdc-edge\"\n [disabled]=\"currentPage() === 0\"\n (click)=\"firstPage()\"\n aria-label=\"Primeira p\u00E1gina\"\n >\n <i class=\"fas fa-step-forward fa-rotate-180\" aria-hidden=\"true\"></i>\n </button>\n <button\n type=\"button\"\n class=\"sdc-page sdc-edge\"\n [disabled]=\"currentPage() === 0\"\n (click)=\"prevPage()\"\n aria-label=\"P\u00E1gina anterior\"\n >\n <i class=\"fas fa-caret-left\" aria-hidden=\"true\"></i>\n </button>\n\n <ng-container *ngFor=\"let p of pages()\">\n <button\n *ngIf=\"asNumber(p)\"\n type=\"button\"\n class=\"sdc-page\"\n [class.is-active]=\"isCurrent(p)\"\n [attr.aria-current]=\"isCurrent(p) ? 'page' : null\"\n (click)=\"gotoPage(p)\"\n >\n {{ p + 1 }}\n </button>\n <span *ngIf=\"!asNumber(p)\" class=\"sdc-ellipsis\" aria-hidden=\"true\">\u2026</span>\n </ng-container>\n\n <button\n type=\"button\"\n class=\"sdc-page sdc-edge\"\n [disabled]=\"currentPage() >= pageCount() - 1\"\n (click)=\"nextPage()\"\n aria-label=\"Pr\u00F3xima p\u00E1gina\"\n >\n <i class=\"fas fa-caret-right\" aria-hidden=\"true\"></i>\n </button>\n <button\n type=\"button\"\n class=\"sdc-page sdc-edge\"\n [disabled]=\"currentPage() >= pageCount() - 1\"\n (click)=\"lastPage()\"\n aria-label=\"\u00DAltima p\u00E1gina\"\n >\n <i class=\"fas fa-step-forward\" aria-hidden=\"true\"></i>\n </button>\n <sdc-combobox\n class=\"sdc-rows-combobox\"\n [multiple]=\"false\"\n [options]=\"rowOptions()\"\n [appendTo]=\"'body'\"\n [showClear]=\"false\"\n [ngModel]=\"selectedRows()\"\n (onSelectedItem)=\"onRowsComboModel($event)\"\n >\n </sdc-combobox>\n </div>\n <span class=\"sdc-total\" *ngIf=\"totalRecordsLabel()\"> {{ totalRecordsLabel() }}: {{ totalRecords() }} </span>\n</div>\n", styles: [":host{--sdc-paginator-page-size: var(--sdc-table-paginator-size, 34px);--sdc-paginator-border: #cccccc;--sdc-paginator-primary: #428bca;--sdc-paginator-primary-hover: #6aa3d5;display:block}.sdc-paginator{display:flex;align-items:center;justify-content:space-between;gap:1rem;width:100%;box-sizing:border-box;padding:10px 10px 10px 0}.sdc-paginator .sdc-paginator-left{display:inline-flex;align-items:center;gap:0}.sdc-paginator .sdc-paginator-left ::ng-deep .sdc-combobox{width:6.5rem!important;padding-left:1rem!important}.sdc-paginator .sdc-page{min-width:var(--sdc-paginator-page-size);height:var(--sdc-paginator-page-size);padding:.4em .25em;margin:0;border:1px solid var(--sdc-paginator-border);border-right-width:0;background:transparent;color:var(--sdc-paginator-primary);cursor:pointer;transition:background-color .2s ease-out;text-align:center}.sdc-paginator .sdc-page:first-child{border-radius:4px 0 0 4px}.sdc-paginator .sdc-page:last-of-type{border-right-width:1px;border-radius:0 4px 4px 0}.sdc-paginator .sdc-page:hover{background-color:#f7f7f7}.sdc-paginator .sdc-page.is-active{background:var(--sdc-paginator-primary);color:#fff;border-color:var(--sdc-paginator-primary)}.sdc-paginator .sdc-page.is-active:hover{background:var(--sdc-paginator-primary-hover);border-color:var(--sdc-paginator-primary-hover)}.sdc-paginator .sdc-page:disabled{opacity:.5;cursor:not-allowed}.sdc-paginator .sdc-ellipsis{display:inline-flex;align-items:center;justify-content:center;min-width:var(--sdc-paginator-page-size);height:var(--sdc-paginator-page-size);border:1px solid var(--sdc-paginator-border);border-right-width:0}.sdc-paginator .sdc-rows-combobox{width:max-content;min-width:88px}.sdc-paginator .sdc-total{white-space:nowrap}\n"] }]
|
|
1520
|
+
}], ctorParameters: () => [], propDecorators: { pageChange: [{
|
|
1255
1521
|
type: Output
|
|
1256
1522
|
}] } });
|
|
1257
1523
|
|
|
@@ -1261,7 +1527,7 @@ class TableComponent {
|
|
|
1261
1527
|
loading = false;
|
|
1262
1528
|
config = DEFAULT_TABLE_OPTIONS;
|
|
1263
1529
|
action = new EventEmitter();
|
|
1264
|
-
isMobile = isMobile
|
|
1530
|
+
isMobile = isMobile();
|
|
1265
1531
|
showSearch = computed(() => this.options().search?.show ?? false);
|
|
1266
1532
|
showPaginator = computed(() => this.options().pagination?.show ?? false);
|
|
1267
1533
|
rowsPerPageOptions = computed(() => this.options().pagination?.rowsPerPageOptions ?? []);
|
|
@@ -1488,10 +1754,10 @@ class TableComponent {
|
|
|
1488
1754
|
const actVal = actKey ? String(this._(row, actKey) ?? '') : '';
|
|
1489
1755
|
return [String(opt?.label ?? ''), String(opt?.icon ?? ''), String(opt?.priority ?? ''), String(opt?.size ?? ''), String(opt?.tooltip ?? ''), actVal].join('|');
|
|
1490
1756
|
}
|
|
1491
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
1492
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: TableComponent, isStandalone: true, selector: "sdc-table", inputs: { cols: "cols", data: "data", loading: "loading", config: "config" }, outputs: { action: "action" }, usesOnChanges: true, ngImport: i0, template: "<div\n class=\"sdc-table\"\n [class.sdc-table-stack]=\"isMobile ? 'stack' : 'grid'\"\n [class.sdc-table-filtered]=\"!!globalFilter().trim()\"\n>\n <div class=\"sdc-table-caption\" *ngIf=\"showSearch()\">\n <div [style.width]=\"isMobile ? '100%' : '20%'\">\n <sdc-searchbox\n [disabled]=\"loading\"\n [placeholder]=\"searchPlaceholder()\"\n [triggerMode]=\"triggerMode()\"\n (onSearch)=\"onSearchTerm($event)\"\n (onClear)=\"onClearSearch()\"\n />\n </div>\n </div>\n\n <table class=\"sdc-table-grid\">\n <thead>\n <tr>\n @for (col of cols; let i = $index; track i) {\n <th\n [class.sdc-table-th-checkbox]=\"col.type === 'checkbox-selection'\"\n (click)=\"toggleSort(col.field!, col.sortable !== false)\"\n [class.sdc-table-sortable]=\"col.sortable !== false\"\n [class.sdc-table-is-selected]=\"sortField() === col.field\"\n >\n <div class=\"sdc-table-th-inner\" [class.sdc-table-sortable]=\"col.sortable !== false\">\n @switch (col.type) { @case ('checkbox-selection') {\n <span class=\"sdc-table-th-label\">{{ col.header }}</span>\n } @default {\n <span class=\"sdc-table-th-label\">{{ col.header }}</span>\n <span class=\"sdc-table-sort-icons sdc-table-sort-overlay\" *ngIf=\"col.sortable !== false\">\n <ng-container [ngTemplateOutlet]=\"sortIconsTpl\" [ngTemplateOutletContext]=\"{ col: col }\"></ng-container>\n </span>\n } }\n </div>\n <span\n class=\"sdc-table-th-center\"\n *ngIf=\"col.type === 'checkbox-selection' && (cellCfg('checkbox').selectAll ?? true)\"\n >\n <input\n type=\"checkbox\"\n [checked]=\"isPageFullySelected()\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"toggleSelectPage(getCheckedValue($event))\"\n />\n </span>\n </th>\n }\n </tr>\n </thead>\n\n <tbody>\n @if (loading) { } @else { @for (row of pageData(); let r = $index; track r) {\n <tr>\n @for (col of cols; let c = $index; track c) {\n <ng-container *ngIf=\"isMobile; else desktopContent\">\n <div class=\"sdc-table-td-mobile\">\n <ng-container [ngTemplateOutlet]=\"sortIconsTpl\" [ngTemplateOutletContext]=\"{ col: col }\"></ng-container>\n <td\n class=\"sdc-table-td sdc-table-tdc sdc-table-mobile-td\"\n [class.sdc-table-td-checkbox]=\"col.type === 'checkbox-selection'\"\n [class.sdc-table-is-selected]=\"sortField() === col.field\"\n [attr.data-title]=\"col.header\"\n (click)=\"toggleSort(col.field!, col.sortable !== false)\"\n >\n <div class=\"sdc-table-td-val\">\n <ng-container\n [ngTemplateOutlet]=\"cellTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row, col: col }\"\n ></ng-container>\n </div>\n </td>\n </div>\n </ng-container>\n <ng-template #desktopContent>\n <td\n class=\"sdc-table-td sdc-table-tdc\"\n [class.sdc-table-td-checkbox]=\"col.type === 'checkbox-selection'\"\n [class.sdc-table-is-selected]=\"sortField() === col.field\"\n [attr.data-title]=\"col.header\"\n >\n <div class=\"sdc-table-td-val\">\n <ng-container\n [ngTemplateOutlet]=\"cellTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row, col: col }\"\n ></ng-container>\n </div>\n </td>\n </ng-template>\n }\n </tr>\n } }\n </tbody>\n </table>\n\n <s-empty-state\n *ngIf=\"!loading && options().empty?.show !== false && totalRecords() === 0\"\n id=\"my-empty-state\"\n iconClass=\"fa fa-inbox\"\n [title]=\"emptyTitle()\"\n [description]=\"emptyText()\"\n class=\"sdc-table-empty-state\"\n >\n </s-empty-state>\n\n <s-loading-state *ngIf=\"loading\" [loading]=\"loading\" [blockWindow]=\"false\" class=\"sdc-table-loading-state\">\n </s-loading-state>\n\n <div class=\"sdc-table-paginator\" *ngIf=\"showPaginator()\">\n <sdc-paginator\n [first]=\"first()\"\n [rows]=\"rows()\"\n [totalRecords]=\"totalRecords()\"\n [rowsPerPageOptions]=\"isMobile ? undefined : rowsPerPageOptions()\"\n [isMobile]=\"isMobile\"\n [totalRecordsLabel]=\"totalRecordsLabel()\"\n (pageChange)=\"onPageChange($event)\"\n ></sdc-paginator>\n </div>\n\n <ng-template #cellTpl let-row let-col=\"col\">\n @switch (col.type) { @case ('checkbox-selection') {\n <ng-container *ngIf=\"cellCfg('checkbox') as checkboxOptions\">\n <div class=\"sdc-table-checkbox\">\n <input type=\"checkbox\" [checked]=\"isRowSelected(row)\" (change)=\"onToggleRow(row, getCheckedValue($event))\" />\n <label>{{ _(row, col.field) }}</label>\n </div>\n </ng-container>\n } @case ('date') {\n {{ formatDate(_(row, col.field), col.format || 'shortDate') }}\n } @case ('strong') {\n <div class=\"sdc-table-strong-label\">{{ _(row, col.field) }}</div>\n } @case ('code') {\n <code class=\"sdc-table-code-label\">{{ _(row, col.field) }}</code>\n } @case ('currency') {\n {{ formatCurrency(_(row, col.field), col.format || 'BRL') }}\n } @case ('tag') {\n <ng-container *ngIf=\"cellCfg('tag') as tagOptions\">\n <div class=\"sdc-table-tags\">\n @for (tag of tagsOf(row, col); let t = $index; track t) {\n <span\n class=\"sdc-table-tag\"\n [style.background]=\"tagOptions.backgroundColor || null\"\n [style.color]=\"tagOptions.color || null\"\n [attr.title]=\"tagOptions.tooltip\"\n >\n <i *ngIf=\"tagOptions.icon\" [class]=\"tagOptions.icon\"></i>\n {{ tag }}\n </span>\n }\n </div>\n </ng-container>\n } @case ('button') {\n <ng-container *ngIf=\"cellCfg('button') as buttonOptions\">\n <ng-container *ngFor=\"let __k of [buttonKey(row, col, buttonOptions)]\">\n <div class=\"sdc-table-button\">\n <sdc-button\n style=\"max-width: 70%\"\n [size]=\"buttonOptions.size\"\n [priority]=\"buttonOptions.priority || 'primary'\"\n [icon]=\"buttonOptions.icon\"\n [label]=\"buttonOptions.label\"\n [disabled]=\"buttonOptions.disabled\"\n [title]=\"buttonOptions.tooltip\"\n [attr.size]=\"buttonOptions.size\"\n [attr.priority]=\"buttonOptions.priority || 'primary'\"\n [attr.severity]=\"buttonOptions.priority || 'primary'\"\n [attr.icon]=\"buttonOptions.icon\"\n [attr.label]=\"buttonOptions.label\"\n [attr.disabled]=\"buttonOptions.disabled ? '' : null\"\n [attr.title]=\"buttonOptions.tooltip || null\"\n [attr.data-key]=\"__k\"\n (click)=\"buttonOptions.disabled ? null : onButtonClick(row, col)\"\n ></sdc-button>\n </div>\n </ng-container>\n </ng-container>\n } @default { {{ _(row, col.field) }} } }\n </ng-template>\n</div>\n\n<ng-template #sortIconsTpl let-col=\"col\">\n <span *ngIf=\"col.sortable !== false && col.type !== 'checkbox-selection'\" class=\"sdc-table-sort-indicator\">\n <i *ngIf=\"sortField() !== col.field\" class=\"fas fa-sort-alt sdc-table-sort-neutral\"></i>\n <i\n *ngIf=\"sortField() === col.field && sortOrder() === 1\"\n class=\"fas fa-sort-amount-up-alt sdc-table-sort-active\"\n ></i>\n <i\n *ngIf=\"sortField() === col.field && sortOrder() === -1\"\n class=\"fas fa-sort-amount-down sdc-table-sort-active\"\n ></i>\n </span>\n <span\n *ngIf=\"col.sortable === false || col.type === 'checkbox-selection'\"\n class=\"sdc-table-sort-indicator sdc-table-sort-indicator-placeholder\"\n ></span>\n</ng-template>\n", styles: [":host{display:block;width:100%;box-sizing:border-box}@media (max-width: 750px){.sdc-table-tag{font-size:.7rem;padding:.6rem .8rem}.sdc-table-sort-indicator-placeholder{display:none!important;width:0!important;height:0!important;min-width:0!important}.sdc-table-paginator{justify-content:center!important}.sdc-table-sort-indicator{gap:.15rem;min-width:1.2rem;position:absolute;left:21px}.sdc-table-sort-indicator i{font-size:.75rem;width:.65rem}.sdc-table-td-val{background:none!important;height:100%;padding:1rem;justify-content:end;border-left:1px solid var(--sdc-formfield-default-border);display:flex;overflow-wrap:anywhere;word-break:break-word;white-space:normal}.sdc-table-td-mobile{border-top:1px solid var(--sdc-formfield-default-border);display:flex;align-items:center;padding-left:10px}.sdc-table.sdc-table-stack thead{display:none}.sdc-table.sdc-table-stack .sdc-table-grid,.sdc-table.sdc-table-stack .sdc-table-grid tbody,.sdc-table.sdc-table-stack .sdc-table-grid tr,.sdc-table.sdc-table-stack .sdc-table-grid td{display:block;width:100%;box-sizing:border-box}.sdc-table.sdc-table-stack .sdc-table-grid tr{border-top:1px solid var(--sdc-formfield-default-border);background:var(--sdc-table-bg-card)}.sdc-table.sdc-table-stack .sdc-table-td{position:relative;padding:0;border-bottom:1px solid var(--sdc-table-border-gray);display:grid!important;grid-template-columns:45% 55%;align-items:center;gap:var(--sdc-table-gap-th-inner)}.sdc-table.sdc-table-stack .sdc-table-td:before{content:attr(data-title);font-weight:600;padding:var(--sdc-table-padding-cell) .5rem var(--sdc-table-padding-cell) var(--sdc-table-padding-cell);border-right:0px solid var(--sdc-formfield-default-border);word-break:break-word}.sdc-table.sdc-table-stack .sdc-table-td>*{grid-column:2;min-width:0}.sdc-table.sdc-table-stack .sdc-table-grid tr .sdc-table-td:last-child{border-bottom:0}.sdc-table.sdc-table-stack .sdc-table-sort-icons{flex-direction:column;line-height:.8}.sdc-table-paginator{border-top:1px solid var(--sdc-table-border-gray)}::ng-deep .p-paginator .p-paginator-next{border-width:1px 1px 1px 1px!important}}@media (min-width: 750px){.sdc-table-tag{font-size:.8rem;padding:.6rem 1.7rem}.sdc-table-sort-indicator-placeholder{width:1.4rem;height:1rem;display:inline-block}.sdc-table-grid thead th+th{border-left:1px solid var(--sdc-formfield-default-border)}}.sdc-table{width:100%;box-sizing:border-box;overflow:hidden;background:var(--sdc-table-bg-card)}.sdc-table .sdc-table-strong-label{font-weight:500;overflow-wrap:anywhere;word-break:break-word;white-space:normal}.sdc-table .sdc-table-code-label{color:var(--sdc-tab-primary);overflow-wrap:anywhere;word-break:break-word;white-space:normal;max-width:100%;display:inline-block}.sdc-table-caption{width:100%;justify-content:end;display:flex;padding:.75rem 0}.sdc-table-grid{width:100%;border-collapse:collapse;table-layout:fixed}thead th{padding:var(--sdc-table-padding-cell);background:var(--sdc-table-bg-card);border-bottom:1px solid var(--sdc-formfield-default-border);-webkit-user-select:none;user-select:none;transition:background var(--sdc-table-transition-fast),border var(--sdc-table-transition-fast)}thead th.sdc-table-sortable{cursor:pointer}thead th.sdc-table-sortable:hover{background:var(--sdc-table-th-hover-bg)}thead th.sdc-table-is-selected{background:var(--sdc-table-th-selected-bg)!important}.sdc-table-sort-neutral{color:var(--sdc-table-sort-neutral)}.sdc-table-sort-active{color:var(--sdc-table-sort-active)}.sdc-table-th-inner{display:flex;align-items:center;gap:var(--sdc-table-gap-th-inner)}.sdc-table-sort-icons i{font-size:inherit;transition:color var(--sdc-table-transition-fast),transform var(--sdc-table-transition-fast),opacity var(--sdc-table-transition-fast)}tbody td{padding:var(--sdc-table-padding-cell);border-bottom:1px solid var(--sdc-table-border-gray);vertical-align:middle}.sdc-table-tags{display:flex;flex-wrap:wrap;gap:var(--sdc-table-gap-tags)}.sdc-table-tag{display:inline-flex;align-items:center;gap:.25rem;border-radius:6px;background:var(--sdc-table-tag-bg)}.sdc-table-sort-indicator{display:inline-flex;align-items:center;justify-content:center;gap:.25rem;min-width:1.7rem}.sdc-table-sort-indicator i{width:.75rem;text-align:center}.sdc-table-sort-overlay{position:relative}.sdc-table-paginator{padding:.5rem 0}.sdc-table-button,.sdc-table-checkbox{display:flex;align-items:center;justify-content:center}.sdc-table-empty-state{display:block;padding:12rem}.sdc-table-loading-state{background:var(--sdc-table-bg-loading);display:block;border-bottom:1px solid var(--sdc-formfield-default-border);min-width:10rem;padding:18.8rem 0rem}thead th.sdc-table-th-checkbox{position:relative}thead th.sdc-table-th-checkbox .sdc-table-th-center{position:absolute;inset:0;display:grid;place-items:center;pointer-events:none}thead th.sdc-table-th-checkbox .sdc-table-th-center input{pointer-events:auto}thead th.sdc-table-th-checkbox .sdc-table-th-inner{padding-right:.5rem}thead th.sdc-table-th-checkbox .sdc-table-th-label,thead .sdc-table-th-label{color:#333!important;white-space:nowrap}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SearchboxComponent, selector: "sdc-searchbox", inputs: ["triggerMode"], outputs: ["onSearch", "onClear"] }, { kind: "component", type: PaginatorComponent, selector: "sdc-paginator", inputs: ["first", "rows", "totalRecords", "rowsPerPageOptions", "isMobile", "totalRecordsLabel"], outputs: ["pageChange"] }, { kind: "component", type: ButtonComponent, selector: "sdc-button", inputs: ["disabled", "width", "icon", "id", "label", "priority", "size", "type"], outputs: ["onClick"] }, { kind: "ngmodule", type: LoadingStateModule }, { kind: "component", type: i2$3.LoadingStateComponent, selector: "s-loading-state", inputs: ["indicator", "id", "blockWindow", "loading"] }, { kind: "ngmodule", type: EmptyStateModule }, { kind: "component", type: i3$2.EmptyStateComponent, selector: "s-empty-state", inputs: ["id", "title", "iconClass", "description", "showPrimaryAction", "showSecondaryAction", "primaryActionLabel", "secondaryActionLabel", "primaryModel"], outputs: ["primaryAction", "secondaryAction"] }] });
|
|
1757
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1758
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: TableComponent, isStandalone: true, selector: "sdc-table", inputs: { cols: "cols", data: "data", loading: "loading", config: "config" }, outputs: { action: "action" }, usesOnChanges: true, ngImport: i0, template: "<div\n class=\"sdc-table\"\n [class.sdc-table-stack]=\"isMobile ? 'stack' : 'grid'\"\n [class.sdc-table-filtered]=\"!!globalFilter().trim()\"\n>\n <div class=\"sdc-table-caption\" *ngIf=\"showSearch()\">\n <div [style.width]=\"isMobile ? '100%' : '20%'\">\n <sdc-searchbox\n [disabled]=\"loading\"\n [placeholder]=\"searchPlaceholder()\"\n [triggerMode]=\"triggerMode()\"\n (onSearch)=\"onSearchTerm($event)\"\n (onClear)=\"onClearSearch()\"\n />\n </div>\n </div>\n\n <table class=\"sdc-table-grid\">\n <thead>\n <tr>\n @for (col of cols; let i = $index; track i) {\n <th\n [class.sdc-table-th-checkbox]=\"col.type === 'checkbox-selection'\"\n (click)=\"toggleSort(col.field!, col.sortable !== false)\"\n [class.sdc-table-sortable]=\"col.sortable !== false\"\n [class.sdc-table-is-selected]=\"sortField() === col.field\"\n >\n <div class=\"sdc-table-th-inner\" [class.sdc-table-sortable]=\"col.sortable !== false\">\n @switch (col.type) { @case ('checkbox-selection') {\n <span class=\"sdc-table-th-label\">{{ col.header }}</span>\n } @default {\n <span class=\"sdc-table-th-label\">{{ col.header }}</span>\n <span class=\"sdc-table-sort-icons sdc-table-sort-overlay\" *ngIf=\"col.sortable !== false\">\n <ng-container [ngTemplateOutlet]=\"sortIconsTpl\" [ngTemplateOutletContext]=\"{ col: col }\"></ng-container>\n </span>\n } }\n </div>\n <span\n class=\"sdc-table-th-center\"\n *ngIf=\"col.type === 'checkbox-selection' && (cellCfg('checkbox').selectAll ?? true)\"\n >\n <input\n type=\"checkbox\"\n [checked]=\"isPageFullySelected()\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"toggleSelectPage(getCheckedValue($event))\"\n />\n </span>\n </th>\n }\n </tr>\n </thead>\n\n <tbody>\n @if (loading) { } @else { @for (row of pageData(); let r = $index; track r) {\n <tr>\n @for (col of cols; let c = $index; track c) {\n <ng-container *ngIf=\"isMobile; else desktopContent\">\n <div class=\"sdc-table-td-mobile\">\n <ng-container [ngTemplateOutlet]=\"sortIconsTpl\" [ngTemplateOutletContext]=\"{ col: col }\"></ng-container>\n <td\n class=\"sdc-table-td sdc-table-tdc sdc-table-mobile-td\"\n [class.sdc-table-td-checkbox]=\"col.type === 'checkbox-selection'\"\n [class.sdc-table-is-selected]=\"sortField() === col.field\"\n [attr.data-title]=\"col.header\"\n (click)=\"toggleSort(col.field!, col.sortable !== false)\"\n >\n <div class=\"sdc-table-td-val\">\n <ng-container\n [ngTemplateOutlet]=\"cellTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row, col: col }\"\n ></ng-container>\n </div>\n </td>\n </div>\n </ng-container>\n <ng-template #desktopContent>\n <td\n class=\"sdc-table-td sdc-table-tdc\"\n [class.sdc-table-td-checkbox]=\"col.type === 'checkbox-selection'\"\n [class.sdc-table-is-selected]=\"sortField() === col.field\"\n [attr.data-title]=\"col.header\"\n >\n <div class=\"sdc-table-td-val\">\n <ng-container\n [ngTemplateOutlet]=\"cellTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row, col: col }\"\n ></ng-container>\n </div>\n </td>\n </ng-template>\n }\n </tr>\n } }\n </tbody>\n </table>\n\n <s-empty-state\n *ngIf=\"!loading && options().empty?.show !== false && totalRecords() === 0\"\n id=\"my-empty-state\"\n iconClass=\"fa fa-inbox\"\n [title]=\"emptyTitle()\"\n [description]=\"emptyText()\"\n class=\"sdc-table-empty-state\"\n >\n </s-empty-state>\n\n <s-loading-state *ngIf=\"loading\" [loading]=\"loading\" [blockWindow]=\"false\" class=\"sdc-table-loading-state\">\n </s-loading-state>\n\n <div class=\"sdc-table-paginator\" *ngIf=\"showPaginator()\">\n <sdc-paginator\n [first]=\"first()\"\n [rows]=\"rows()\"\n [totalRecords]=\"totalRecords()\"\n [rowsPerPageOptions]=\"isMobile ? undefined : rowsPerPageOptions()\"\n [isMobile]=\"isMobile\"\n [totalRecordsLabel]=\"totalRecordsLabel()\"\n (pageChange)=\"onPageChange($event)\"\n ></sdc-paginator>\n </div>\n\n <ng-template #cellTpl let-row let-col=\"col\">\n @switch (col.type) { @case ('checkbox-selection') {\n <ng-container *ngIf=\"cellCfg('checkbox') as checkboxOptions\">\n <div class=\"sdc-table-checkbox\">\n <input type=\"checkbox\" [checked]=\"isRowSelected(row)\" (change)=\"onToggleRow(row, getCheckedValue($event))\" />\n <label>{{ _(row, col.field) }}</label>\n </div>\n </ng-container>\n } @case ('date') {\n {{ formatDate(_(row, col.field), col.format || 'shortDate') }}\n } @case ('strong') {\n <div class=\"sdc-table-strong-label\">{{ _(row, col.field) }}</div>\n } @case ('code') {\n <code class=\"sdc-table-code-label\">{{ _(row, col.field) }}</code>\n } @case ('currency') {\n {{ formatCurrency(_(row, col.field), col.format || 'BRL') }}\n } @case ('tag') {\n <ng-container *ngIf=\"cellCfg('tag') as tagOptions\">\n <div class=\"sdc-table-tags\">\n @for (tag of tagsOf(row, col); let t = $index; track t) {\n <span\n class=\"sdc-table-tag\"\n [style.background]=\"tagOptions.backgroundColor || null\"\n [style.color]=\"tagOptions.color || null\"\n [attr.title]=\"tagOptions.tooltip\"\n >\n <i *ngIf=\"tagOptions.icon\" [class]=\"tagOptions.icon\"></i>\n {{ tag }}\n </span>\n }\n </div>\n </ng-container>\n } @case ('button') {\n <ng-container *ngIf=\"cellCfg('button') as buttonOptions\">\n <ng-container *ngFor=\"let __k of [buttonKey(row, col, buttonOptions)]\">\n <div class=\"sdc-table-button\">\n <sdc-button\n style=\"max-width: 70%\"\n [size]=\"buttonOptions.size\"\n [priority]=\"buttonOptions.priority || 'primary'\"\n [icon]=\"buttonOptions.icon\"\n [label]=\"buttonOptions.label\"\n [disabled]=\"buttonOptions.disabled\"\n [title]=\"buttonOptions.tooltip\"\n [attr.size]=\"buttonOptions.size\"\n [attr.priority]=\"buttonOptions.priority || 'primary'\"\n [attr.severity]=\"buttonOptions.priority || 'primary'\"\n [attr.icon]=\"buttonOptions.icon\"\n [attr.label]=\"buttonOptions.label\"\n [attr.disabled]=\"buttonOptions.disabled ? '' : null\"\n [attr.title]=\"buttonOptions.tooltip || null\"\n [attr.data-key]=\"__k\"\n (click)=\"buttonOptions.disabled ? null : onButtonClick(row, col)\"\n ></sdc-button>\n </div>\n </ng-container>\n </ng-container>\n } @default { {{ _(row, col.field) }} } }\n </ng-template>\n</div>\n\n<ng-template #sortIconsTpl let-col=\"col\">\n <span *ngIf=\"col.sortable !== false && col.type !== 'checkbox-selection'\" class=\"sdc-table-sort-indicator\">\n <i *ngIf=\"sortField() !== col.field\" class=\"fas fa-sort-alt sdc-table-sort-neutral\"></i>\n <i\n *ngIf=\"sortField() === col.field && sortOrder() === 1\"\n class=\"fas fa-sort-amount-up-alt sdc-table-sort-active\"\n ></i>\n <i\n *ngIf=\"sortField() === col.field && sortOrder() === -1\"\n class=\"fas fa-sort-amount-down sdc-table-sort-active\"\n ></i>\n </span>\n <span\n *ngIf=\"col.sortable === false || col.type === 'checkbox-selection'\"\n class=\"sdc-table-sort-indicator sdc-table-sort-indicator-placeholder\"\n ></span>\n</ng-template>\n", styles: [":host{display:block;width:100%;box-sizing:border-box}@media (max-width: 750px){.sdc-table-tag{font-size:.7rem;padding:.6rem .8rem}.sdc-table-sort-indicator-placeholder{display:none!important;width:0!important;height:0!important;min-width:0!important}.sdc-table-paginator{justify-content:center!important}.sdc-table-sort-indicator{gap:.15rem;min-width:1.2rem;position:absolute;left:21px}.sdc-table-sort-indicator i{font-size:.75rem;width:.65rem}.sdc-table-td-val{background:none!important;height:100%;padding:1rem;justify-content:end;border-left:1px solid var(--sdc-formfield-default-border);display:flex;overflow-wrap:anywhere;word-break:break-word;white-space:normal}.sdc-table-td-mobile{border-top:1px solid var(--sdc-formfield-default-border);display:flex;align-items:center;padding-left:10px}.sdc-table.sdc-table-stack thead{display:none}.sdc-table.sdc-table-stack .sdc-table-grid,.sdc-table.sdc-table-stack .sdc-table-grid tbody,.sdc-table.sdc-table-stack .sdc-table-grid tr,.sdc-table.sdc-table-stack .sdc-table-grid td{display:block;width:100%;box-sizing:border-box}.sdc-table.sdc-table-stack .sdc-table-grid tr{border-top:1px solid var(--sdc-formfield-default-border);background:var(--sdc-table-bg-card)}.sdc-table.sdc-table-stack .sdc-table-td{position:relative;padding:0;border-bottom:1px solid var(--sdc-table-border-gray);display:grid!important;grid-template-columns:45% 55%;align-items:center;gap:var(--sdc-table-gap-th-inner)}.sdc-table.sdc-table-stack .sdc-table-td:before{content:attr(data-title);font-weight:600;padding:var(--sdc-table-padding-cell) .5rem var(--sdc-table-padding-cell) var(--sdc-table-padding-cell);border-right:0px solid var(--sdc-formfield-default-border);word-break:break-word}.sdc-table.sdc-table-stack .sdc-table-td>*{grid-column:2;min-width:0}.sdc-table.sdc-table-stack .sdc-table-grid tr .sdc-table-td:last-child{border-bottom:0}.sdc-table.sdc-table-stack .sdc-table-sort-icons{flex-direction:column;line-height:.8}.sdc-table-paginator{border-top:1px solid var(--sdc-table-border-gray)}::ng-deep .p-paginator .p-paginator-next{border-width:1px 1px 1px 1px!important}}@media (min-width: 750px){.sdc-table-tag{font-size:.8rem;padding:.6rem 1.7rem}.sdc-table-sort-indicator-placeholder{width:1.4rem;height:1rem;display:inline-block}.sdc-table-grid thead th+th{border-left:1px solid var(--sdc-formfield-default-border)}}.sdc-table{width:100%;box-sizing:border-box;overflow:hidden;background:var(--sdc-table-bg-card)}.sdc-table .sdc-table-strong-label{font-weight:500;overflow-wrap:anywhere;word-break:break-word;white-space:normal}.sdc-table .sdc-table-code-label{color:var(--sdc-tab-primary);overflow-wrap:anywhere;word-break:break-word;white-space:normal;max-width:100%;display:inline-block}.sdc-table-caption{width:100%;justify-content:end;display:flex;padding:.75rem 0}.sdc-table-grid{width:100%;border-collapse:collapse;table-layout:fixed}thead th{padding:var(--sdc-table-padding-cell);background:var(--sdc-table-bg-card);border-bottom:1px solid var(--sdc-formfield-default-border);-webkit-user-select:none;user-select:none;transition:background var(--sdc-table-transition-fast),border var(--sdc-table-transition-fast)}thead th.sdc-table-sortable{cursor:pointer}thead th.sdc-table-sortable:hover{background:var(--sdc-table-th-hover-bg)}thead th.sdc-table-is-selected{background:var(--sdc-table-th-selected-bg)!important}.sdc-table-sort-neutral{color:var(--sdc-table-sort-neutral)}.sdc-table-sort-active{color:var(--sdc-table-sort-active)}.sdc-table-th-inner{display:flex;align-items:center;gap:var(--sdc-table-gap-th-inner)}.sdc-table-sort-icons i{font-size:inherit;transition:color var(--sdc-table-transition-fast),transform var(--sdc-table-transition-fast),opacity var(--sdc-table-transition-fast)}tbody td{padding:var(--sdc-table-padding-cell);border-bottom:1px solid var(--sdc-table-border-gray);vertical-align:middle}.sdc-table-tags{display:flex;flex-wrap:wrap;gap:var(--sdc-table-gap-tags)}.sdc-table-tag{display:inline-flex;align-items:center;gap:.25rem;border-radius:6px;background:var(--sdc-table-tag-bg)}.sdc-table-sort-indicator{display:inline-flex;align-items:center;justify-content:center;gap:.25rem;min-width:1.7rem}.sdc-table-sort-indicator i{width:.75rem;text-align:center}.sdc-table-sort-overlay{position:relative}.sdc-table-paginator{padding:.5rem 0}.sdc-table-button,.sdc-table-checkbox{display:flex;align-items:center;justify-content:center}.sdc-table-empty-state{display:block;padding:12rem}.sdc-table-loading-state{background:var(--sdc-table-bg-loading);display:block;border-bottom:1px solid var(--sdc-formfield-default-border);min-width:10rem;padding:18.8rem 0rem}thead th.sdc-table-th-checkbox{position:relative}thead th.sdc-table-th-checkbox .sdc-table-th-center{position:absolute;inset:0;display:grid;place-items:center;pointer-events:none}thead th.sdc-table-th-checkbox .sdc-table-th-center input{pointer-events:auto}thead th.sdc-table-th-checkbox .sdc-table-th-inner{padding-right:.5rem}thead th.sdc-table-th-checkbox .sdc-table-th-label,thead .sdc-table-th-label{color:#333!important;white-space:nowrap}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SearchboxComponent, selector: "sdc-searchbox", inputs: ["triggerMode"], outputs: ["onSearch", "onClear"] }, { kind: "component", type: PaginatorComponent, selector: "sdc-paginator", inputs: ["first", "rows", "totalRecords", "rowsPerPageOptions", "isMobile", "totalRecordsLabel"], outputs: ["pageChange"] }, { kind: "component", type: ButtonComponent, selector: "sdc-button", inputs: ["disabled", "width", "icon", "id", "label", "priority", "size", "type"], outputs: ["onClick"] }, { kind: "ngmodule", type: LoadingStateModule }, { kind: "component", type: i2$2.LoadingStateComponent, selector: "s-loading-state", inputs: ["indicator", "id", "blockWindow", "loading"] }, { kind: "ngmodule", type: EmptyStateModule }, { kind: "component", type: i3$2.EmptyStateComponent, selector: "s-empty-state", inputs: ["id", "title", "iconClass", "description", "showPrimaryAction", "showSecondaryAction", "primaryActionLabel", "secondaryActionLabel", "primaryModel"], outputs: ["primaryAction", "secondaryAction"] }] });
|
|
1493
1759
|
}
|
|
1494
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
1760
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TableComponent, decorators: [{
|
|
1495
1761
|
type: Component,
|
|
1496
1762
|
args: [{ selector: 'sdc-table', standalone: true, imports: [CommonModule, SearchboxComponent, PaginatorComponent, ButtonComponent, LoadingStateModule, EmptyStateModule], encapsulation: ViewEncapsulation.Emulated, template: "<div\n class=\"sdc-table\"\n [class.sdc-table-stack]=\"isMobile ? 'stack' : 'grid'\"\n [class.sdc-table-filtered]=\"!!globalFilter().trim()\"\n>\n <div class=\"sdc-table-caption\" *ngIf=\"showSearch()\">\n <div [style.width]=\"isMobile ? '100%' : '20%'\">\n <sdc-searchbox\n [disabled]=\"loading\"\n [placeholder]=\"searchPlaceholder()\"\n [triggerMode]=\"triggerMode()\"\n (onSearch)=\"onSearchTerm($event)\"\n (onClear)=\"onClearSearch()\"\n />\n </div>\n </div>\n\n <table class=\"sdc-table-grid\">\n <thead>\n <tr>\n @for (col of cols; let i = $index; track i) {\n <th\n [class.sdc-table-th-checkbox]=\"col.type === 'checkbox-selection'\"\n (click)=\"toggleSort(col.field!, col.sortable !== false)\"\n [class.sdc-table-sortable]=\"col.sortable !== false\"\n [class.sdc-table-is-selected]=\"sortField() === col.field\"\n >\n <div class=\"sdc-table-th-inner\" [class.sdc-table-sortable]=\"col.sortable !== false\">\n @switch (col.type) { @case ('checkbox-selection') {\n <span class=\"sdc-table-th-label\">{{ col.header }}</span>\n } @default {\n <span class=\"sdc-table-th-label\">{{ col.header }}</span>\n <span class=\"sdc-table-sort-icons sdc-table-sort-overlay\" *ngIf=\"col.sortable !== false\">\n <ng-container [ngTemplateOutlet]=\"sortIconsTpl\" [ngTemplateOutletContext]=\"{ col: col }\"></ng-container>\n </span>\n } }\n </div>\n <span\n class=\"sdc-table-th-center\"\n *ngIf=\"col.type === 'checkbox-selection' && (cellCfg('checkbox').selectAll ?? true)\"\n >\n <input\n type=\"checkbox\"\n [checked]=\"isPageFullySelected()\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"toggleSelectPage(getCheckedValue($event))\"\n />\n </span>\n </th>\n }\n </tr>\n </thead>\n\n <tbody>\n @if (loading) { } @else { @for (row of pageData(); let r = $index; track r) {\n <tr>\n @for (col of cols; let c = $index; track c) {\n <ng-container *ngIf=\"isMobile; else desktopContent\">\n <div class=\"sdc-table-td-mobile\">\n <ng-container [ngTemplateOutlet]=\"sortIconsTpl\" [ngTemplateOutletContext]=\"{ col: col }\"></ng-container>\n <td\n class=\"sdc-table-td sdc-table-tdc sdc-table-mobile-td\"\n [class.sdc-table-td-checkbox]=\"col.type === 'checkbox-selection'\"\n [class.sdc-table-is-selected]=\"sortField() === col.field\"\n [attr.data-title]=\"col.header\"\n (click)=\"toggleSort(col.field!, col.sortable !== false)\"\n >\n <div class=\"sdc-table-td-val\">\n <ng-container\n [ngTemplateOutlet]=\"cellTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row, col: col }\"\n ></ng-container>\n </div>\n </td>\n </div>\n </ng-container>\n <ng-template #desktopContent>\n <td\n class=\"sdc-table-td sdc-table-tdc\"\n [class.sdc-table-td-checkbox]=\"col.type === 'checkbox-selection'\"\n [class.sdc-table-is-selected]=\"sortField() === col.field\"\n [attr.data-title]=\"col.header\"\n >\n <div class=\"sdc-table-td-val\">\n <ng-container\n [ngTemplateOutlet]=\"cellTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row, col: col }\"\n ></ng-container>\n </div>\n </td>\n </ng-template>\n }\n </tr>\n } }\n </tbody>\n </table>\n\n <s-empty-state\n *ngIf=\"!loading && options().empty?.show !== false && totalRecords() === 0\"\n id=\"my-empty-state\"\n iconClass=\"fa fa-inbox\"\n [title]=\"emptyTitle()\"\n [description]=\"emptyText()\"\n class=\"sdc-table-empty-state\"\n >\n </s-empty-state>\n\n <s-loading-state *ngIf=\"loading\" [loading]=\"loading\" [blockWindow]=\"false\" class=\"sdc-table-loading-state\">\n </s-loading-state>\n\n <div class=\"sdc-table-paginator\" *ngIf=\"showPaginator()\">\n <sdc-paginator\n [first]=\"first()\"\n [rows]=\"rows()\"\n [totalRecords]=\"totalRecords()\"\n [rowsPerPageOptions]=\"isMobile ? undefined : rowsPerPageOptions()\"\n [isMobile]=\"isMobile\"\n [totalRecordsLabel]=\"totalRecordsLabel()\"\n (pageChange)=\"onPageChange($event)\"\n ></sdc-paginator>\n </div>\n\n <ng-template #cellTpl let-row let-col=\"col\">\n @switch (col.type) { @case ('checkbox-selection') {\n <ng-container *ngIf=\"cellCfg('checkbox') as checkboxOptions\">\n <div class=\"sdc-table-checkbox\">\n <input type=\"checkbox\" [checked]=\"isRowSelected(row)\" (change)=\"onToggleRow(row, getCheckedValue($event))\" />\n <label>{{ _(row, col.field) }}</label>\n </div>\n </ng-container>\n } @case ('date') {\n {{ formatDate(_(row, col.field), col.format || 'shortDate') }}\n } @case ('strong') {\n <div class=\"sdc-table-strong-label\">{{ _(row, col.field) }}</div>\n } @case ('code') {\n <code class=\"sdc-table-code-label\">{{ _(row, col.field) }}</code>\n } @case ('currency') {\n {{ formatCurrency(_(row, col.field), col.format || 'BRL') }}\n } @case ('tag') {\n <ng-container *ngIf=\"cellCfg('tag') as tagOptions\">\n <div class=\"sdc-table-tags\">\n @for (tag of tagsOf(row, col); let t = $index; track t) {\n <span\n class=\"sdc-table-tag\"\n [style.background]=\"tagOptions.backgroundColor || null\"\n [style.color]=\"tagOptions.color || null\"\n [attr.title]=\"tagOptions.tooltip\"\n >\n <i *ngIf=\"tagOptions.icon\" [class]=\"tagOptions.icon\"></i>\n {{ tag }}\n </span>\n }\n </div>\n </ng-container>\n } @case ('button') {\n <ng-container *ngIf=\"cellCfg('button') as buttonOptions\">\n <ng-container *ngFor=\"let __k of [buttonKey(row, col, buttonOptions)]\">\n <div class=\"sdc-table-button\">\n <sdc-button\n style=\"max-width: 70%\"\n [size]=\"buttonOptions.size\"\n [priority]=\"buttonOptions.priority || 'primary'\"\n [icon]=\"buttonOptions.icon\"\n [label]=\"buttonOptions.label\"\n [disabled]=\"buttonOptions.disabled\"\n [title]=\"buttonOptions.tooltip\"\n [attr.size]=\"buttonOptions.size\"\n [attr.priority]=\"buttonOptions.priority || 'primary'\"\n [attr.severity]=\"buttonOptions.priority || 'primary'\"\n [attr.icon]=\"buttonOptions.icon\"\n [attr.label]=\"buttonOptions.label\"\n [attr.disabled]=\"buttonOptions.disabled ? '' : null\"\n [attr.title]=\"buttonOptions.tooltip || null\"\n [attr.data-key]=\"__k\"\n (click)=\"buttonOptions.disabled ? null : onButtonClick(row, col)\"\n ></sdc-button>\n </div>\n </ng-container>\n </ng-container>\n } @default { {{ _(row, col.field) }} } }\n </ng-template>\n</div>\n\n<ng-template #sortIconsTpl let-col=\"col\">\n <span *ngIf=\"col.sortable !== false && col.type !== 'checkbox-selection'\" class=\"sdc-table-sort-indicator\">\n <i *ngIf=\"sortField() !== col.field\" class=\"fas fa-sort-alt sdc-table-sort-neutral\"></i>\n <i\n *ngIf=\"sortField() === col.field && sortOrder() === 1\"\n class=\"fas fa-sort-amount-up-alt sdc-table-sort-active\"\n ></i>\n <i\n *ngIf=\"sortField() === col.field && sortOrder() === -1\"\n class=\"fas fa-sort-amount-down sdc-table-sort-active\"\n ></i>\n </span>\n <span\n *ngIf=\"col.sortable === false || col.type === 'checkbox-selection'\"\n class=\"sdc-table-sort-indicator sdc-table-sort-indicator-placeholder\"\n ></span>\n</ng-template>\n", styles: [":host{display:block;width:100%;box-sizing:border-box}@media (max-width: 750px){.sdc-table-tag{font-size:.7rem;padding:.6rem .8rem}.sdc-table-sort-indicator-placeholder{display:none!important;width:0!important;height:0!important;min-width:0!important}.sdc-table-paginator{justify-content:center!important}.sdc-table-sort-indicator{gap:.15rem;min-width:1.2rem;position:absolute;left:21px}.sdc-table-sort-indicator i{font-size:.75rem;width:.65rem}.sdc-table-td-val{background:none!important;height:100%;padding:1rem;justify-content:end;border-left:1px solid var(--sdc-formfield-default-border);display:flex;overflow-wrap:anywhere;word-break:break-word;white-space:normal}.sdc-table-td-mobile{border-top:1px solid var(--sdc-formfield-default-border);display:flex;align-items:center;padding-left:10px}.sdc-table.sdc-table-stack thead{display:none}.sdc-table.sdc-table-stack .sdc-table-grid,.sdc-table.sdc-table-stack .sdc-table-grid tbody,.sdc-table.sdc-table-stack .sdc-table-grid tr,.sdc-table.sdc-table-stack .sdc-table-grid td{display:block;width:100%;box-sizing:border-box}.sdc-table.sdc-table-stack .sdc-table-grid tr{border-top:1px solid var(--sdc-formfield-default-border);background:var(--sdc-table-bg-card)}.sdc-table.sdc-table-stack .sdc-table-td{position:relative;padding:0;border-bottom:1px solid var(--sdc-table-border-gray);display:grid!important;grid-template-columns:45% 55%;align-items:center;gap:var(--sdc-table-gap-th-inner)}.sdc-table.sdc-table-stack .sdc-table-td:before{content:attr(data-title);font-weight:600;padding:var(--sdc-table-padding-cell) .5rem var(--sdc-table-padding-cell) var(--sdc-table-padding-cell);border-right:0px solid var(--sdc-formfield-default-border);word-break:break-word}.sdc-table.sdc-table-stack .sdc-table-td>*{grid-column:2;min-width:0}.sdc-table.sdc-table-stack .sdc-table-grid tr .sdc-table-td:last-child{border-bottom:0}.sdc-table.sdc-table-stack .sdc-table-sort-icons{flex-direction:column;line-height:.8}.sdc-table-paginator{border-top:1px solid var(--sdc-table-border-gray)}::ng-deep .p-paginator .p-paginator-next{border-width:1px 1px 1px 1px!important}}@media (min-width: 750px){.sdc-table-tag{font-size:.8rem;padding:.6rem 1.7rem}.sdc-table-sort-indicator-placeholder{width:1.4rem;height:1rem;display:inline-block}.sdc-table-grid thead th+th{border-left:1px solid var(--sdc-formfield-default-border)}}.sdc-table{width:100%;box-sizing:border-box;overflow:hidden;background:var(--sdc-table-bg-card)}.sdc-table .sdc-table-strong-label{font-weight:500;overflow-wrap:anywhere;word-break:break-word;white-space:normal}.sdc-table .sdc-table-code-label{color:var(--sdc-tab-primary);overflow-wrap:anywhere;word-break:break-word;white-space:normal;max-width:100%;display:inline-block}.sdc-table-caption{width:100%;justify-content:end;display:flex;padding:.75rem 0}.sdc-table-grid{width:100%;border-collapse:collapse;table-layout:fixed}thead th{padding:var(--sdc-table-padding-cell);background:var(--sdc-table-bg-card);border-bottom:1px solid var(--sdc-formfield-default-border);-webkit-user-select:none;user-select:none;transition:background var(--sdc-table-transition-fast),border var(--sdc-table-transition-fast)}thead th.sdc-table-sortable{cursor:pointer}thead th.sdc-table-sortable:hover{background:var(--sdc-table-th-hover-bg)}thead th.sdc-table-is-selected{background:var(--sdc-table-th-selected-bg)!important}.sdc-table-sort-neutral{color:var(--sdc-table-sort-neutral)}.sdc-table-sort-active{color:var(--sdc-table-sort-active)}.sdc-table-th-inner{display:flex;align-items:center;gap:var(--sdc-table-gap-th-inner)}.sdc-table-sort-icons i{font-size:inherit;transition:color var(--sdc-table-transition-fast),transform var(--sdc-table-transition-fast),opacity var(--sdc-table-transition-fast)}tbody td{padding:var(--sdc-table-padding-cell);border-bottom:1px solid var(--sdc-table-border-gray);vertical-align:middle}.sdc-table-tags{display:flex;flex-wrap:wrap;gap:var(--sdc-table-gap-tags)}.sdc-table-tag{display:inline-flex;align-items:center;gap:.25rem;border-radius:6px;background:var(--sdc-table-tag-bg)}.sdc-table-sort-indicator{display:inline-flex;align-items:center;justify-content:center;gap:.25rem;min-width:1.7rem}.sdc-table-sort-indicator i{width:.75rem;text-align:center}.sdc-table-sort-overlay{position:relative}.sdc-table-paginator{padding:.5rem 0}.sdc-table-button,.sdc-table-checkbox{display:flex;align-items:center;justify-content:center}.sdc-table-empty-state{display:block;padding:12rem}.sdc-table-loading-state{background:var(--sdc-table-bg-loading);display:block;border-bottom:1px solid var(--sdc-formfield-default-border);min-width:10rem;padding:18.8rem 0rem}thead th.sdc-table-th-checkbox{position:relative}thead th.sdc-table-th-checkbox .sdc-table-th-center{position:absolute;inset:0;display:grid;place-items:center;pointer-events:none}thead th.sdc-table-th-checkbox .sdc-table-th-center input{pointer-events:auto}thead th.sdc-table-th-checkbox .sdc-table-th-inner{padding-right:.5rem}thead th.sdc-table-th-checkbox .sdc-table-th-label,thead .sdc-table-th-label{color:#333!important;white-space:nowrap}\n"] }]
|
|
1497
1763
|
}], propDecorators: { cols: [{
|
|
@@ -1510,11 +1776,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
1510
1776
|
type: Output
|
|
1511
1777
|
}] } });
|
|
1512
1778
|
|
|
1779
|
+
let __tabUid = 0;
|
|
1513
1780
|
class TabComponent {
|
|
1514
1781
|
host = inject(ElementRef);
|
|
1515
1782
|
zone = inject(NgZone);
|
|
1516
1783
|
cdr = inject(ChangeDetectorRef);
|
|
1517
1784
|
headersRef;
|
|
1785
|
+
panelsRef;
|
|
1786
|
+
uid = `sdc-tab-${++__tabUid}`;
|
|
1518
1787
|
_activeIndex = signal(0);
|
|
1519
1788
|
set activeIndex(v) {
|
|
1520
1789
|
this.zone.run(() => {
|
|
@@ -1531,13 +1800,17 @@ class TabComponent {
|
|
|
1531
1800
|
return this._activeIndex();
|
|
1532
1801
|
}
|
|
1533
1802
|
activeIndexChange = new EventEmitter();
|
|
1534
|
-
isMobile = isMobile
|
|
1803
|
+
isMobile = isMobile();
|
|
1535
1804
|
wcEls = signal([]);
|
|
1536
|
-
headers = computed(() => this.wcEls().map((el, i) =>
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1805
|
+
headers = computed(() => this.wcEls().map((el, i) => {
|
|
1806
|
+
const attrLabel = el.getAttribute('label') || '';
|
|
1807
|
+
const propLabel = el.label;
|
|
1808
|
+
return {
|
|
1809
|
+
label: (attrLabel.trim() || (propLabel?.trim() ?? `Tab ${i}`)),
|
|
1810
|
+
disabled: this.parseBool(el.getAttribute('disabled')),
|
|
1811
|
+
id: el.getAttribute('id') ?? `${this.uid}-tab-${i}`,
|
|
1812
|
+
};
|
|
1813
|
+
}));
|
|
1541
1814
|
mo;
|
|
1542
1815
|
_headersEffect = effect(() => {
|
|
1543
1816
|
this.headers();
|
|
@@ -1548,7 +1821,7 @@ class TabComponent {
|
|
|
1548
1821
|
this.refreshChildren();
|
|
1549
1822
|
this.zone.runOutsideAngular(() => {
|
|
1550
1823
|
this.mo = new MutationObserver(() => this.refreshChildren());
|
|
1551
|
-
this.mo.observe(this.
|
|
1824
|
+
this.mo.observe(this.panelsRef.nativeElement, { childList: true });
|
|
1552
1825
|
});
|
|
1553
1826
|
}
|
|
1554
1827
|
ngOnDestroy() {
|
|
@@ -1613,8 +1886,15 @@ class TabComponent {
|
|
|
1613
1886
|
const list = this.headersRef?.nativeElement.querySelectorAll('[role="tab"]');
|
|
1614
1887
|
list?.[i]?.focus();
|
|
1615
1888
|
}
|
|
1889
|
+
getDirectItems() {
|
|
1890
|
+
const parent = this.panelsRef?.nativeElement;
|
|
1891
|
+
if (!parent)
|
|
1892
|
+
return [];
|
|
1893
|
+
const children = Array.from(parent.children);
|
|
1894
|
+
return children.filter((n) => n.tagName?.toLowerCase() === 'sdc-tab-item');
|
|
1895
|
+
}
|
|
1616
1896
|
refreshChildren() {
|
|
1617
|
-
const els =
|
|
1897
|
+
const els = this.getDirectItems();
|
|
1618
1898
|
this.wcEls.set(els);
|
|
1619
1899
|
this._activeIndex.set(this.normalizeIndex(this._activeIndex()));
|
|
1620
1900
|
this.syncHiddenAndAria();
|
|
@@ -1626,7 +1906,7 @@ class TabComponent {
|
|
|
1626
1906
|
const hs = this.headers();
|
|
1627
1907
|
els.forEach((el, i) => {
|
|
1628
1908
|
const hdr = hs[i];
|
|
1629
|
-
const panelId = ((hdr?.id ??
|
|
1909
|
+
const panelId = ((hdr?.id ?? `${this.uid}-tab-${i}`) + '-panel');
|
|
1630
1910
|
el.setAttribute('role', 'tabpanel');
|
|
1631
1911
|
el.setAttribute('id', panelId);
|
|
1632
1912
|
if (hdr)
|
|
@@ -1650,15 +1930,18 @@ class TabComponent {
|
|
|
1650
1930
|
const s = v.trim().toLowerCase();
|
|
1651
1931
|
return s === '' || s === 'true' || s === '1';
|
|
1652
1932
|
}
|
|
1653
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
1654
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.
|
|
1933
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TabComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1934
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: TabComponent, isStandalone: true, selector: "sdc-tab", inputs: { activeIndex: ["activeIndex", "activeIndex", numberAttribute] }, outputs: { activeIndexChange: "activeIndexChange" }, viewQueries: [{ propertyName: "headersRef", first: true, predicate: ["headersRef"], descendants: true }, { propertyName: "panelsRef", first: true, predicate: ["panelsRef"], descendants: true }], ngImport: i0, template: "<div class=\"sdc-tab\" [class.sdc-tab-stack]=\"isMobile\">\n <div #headersRef class=\"sdc-tab-headers\" role=\"tablist\" aria-label=\"Tabs\">\n @for (h of headers(); let i = $index; track i) {\n <button\n class=\"sdc-tab-header\"\n [class.sdc-tab-header-active]=\"i === activeIndex\"\n [class.sdc-tab-header-disabled]=\"h.disabled\"\n role=\"tab\"\n type=\"button\"\n [disabled]=\"h.disabled\"\n [attr.aria-selected]=\"i === activeIndex\"\n [attr.aria-controls]=\"h.id + '-panel'\"\n [attr.aria-disabled]=\"h.disabled\"\n [id]=\"h.id\"\n [tabindex]=\"h.disabled ? -1 : i === activeIndex ? 0 : -1\"\n (click)=\"select(i)\"\n (keydown)=\"onHeaderKeydown($event, i)\"\n >\n <span class=\"sdc-tab-label\">{{ h.label }}</span>\n </button>\n }\n </div>\n <div class=\"sdc-tab-panels\" #panelsRef>\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [".sdc-tab{border:0;border-radius:0;background:none;display:flex;flex-direction:column}.sdc-tab .sdc-tab-label{font-size:15px}.sdc-tab-headers{display:flex;white-space:nowrap;overflow-x:auto;overflow-y:hidden;padding:0;margin:0;border-bottom:1px solid var(--sdc-tab-border);position:relative}.sdc-tab-header{position:relative;appearance:none;background:transparent;border:0;margin:0;padding:10px 15px;color:var(--sdc-tab-primary);cursor:pointer;border-bottom:5px solid transparent;transition:color .2s ease-out,border-color .2s ease-out;border-radius:0;flex:0 0 auto}.sdc-tab-header:hover{color:var(--sdc-tab-primary-hover)}.sdc-tab-header:focus{outline:none;background-color:var(--sdc-tab-focus)}.sdc-tab-header[disabled],.sdc-tab-header-disabled{cursor:not-allowed;opacity:.6}.sdc-tab-header-active{color:var(--sdc-tab-text);font-weight:600;border-bottom-color:var(--sdc-tab-primary)}.sdc-tab-header-active:hover{color:#4d4d4d;border-bottom-color:var(--sdc-tab-primary-hover)}.sdc-tab-header>.sds-badge-error{position:absolute;top:16px;left:1px}.sdc-tab-panels{padding:10px 0 0;width:100%;min-width:0}.sdc-tab-panel{outline:0;list-style:none;margin:0}[hidden]{display:none!important}@media (max-width: 750px){.sdc-tab,.sdc-tab *{box-sizing:border-box}.sdc-tab.sdc-tab-stack{display:flex;flex-direction:column;width:100vw;max-width:100vw;overflow:hidden}.sdc-tab.sdc-tab-stack .sdc-tab-headers{flex-direction:row;border-right:0;border-bottom:1px solid var(--sdc-tab-border);width:100%;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-gutter:stable both-edges;gap:.25rem;padding:0;margin:0}.sdc-tab.sdc-tab-stack .sdc-tab-header{flex:0 0 auto;white-space:nowrap;border-right:0;border-bottom:5px solid transparent;width:auto;text-align:left}.sdc-tab.sdc-tab-stack .sdc-tab-panels{padding:10px 15px 0 0;width:100%;max-width:100%;min-width:0;overflow-x:hidden}.sdc-tab.sdc-tab-stack .sdc-tab-panel{max-width:100%;overflow-wrap:anywhere;word-break:break-word}img,video,canvas,svg{max-width:100%;height:auto}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1655
1935
|
}
|
|
1656
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
1936
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TabComponent, decorators: [{
|
|
1657
1937
|
type: Component,
|
|
1658
|
-
args: [{ selector: 'sdc-tab', standalone: true, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, template: "<div class=\"sdc-tab\" [class.sdc-tab-stack]=\"isMobile\">\n <div #headersRef class=\"sdc-tab-headers\" role=\"tablist\" aria-label=\"Tabs\">\n @for (h of headers(); let i = $index; track i) {\n
|
|
1938
|
+
args: [{ selector: 'sdc-tab', standalone: true, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, template: "<div class=\"sdc-tab\" [class.sdc-tab-stack]=\"isMobile\">\n <div #headersRef class=\"sdc-tab-headers\" role=\"tablist\" aria-label=\"Tabs\">\n @for (h of headers(); let i = $index; track i) {\n <button\n class=\"sdc-tab-header\"\n [class.sdc-tab-header-active]=\"i === activeIndex\"\n [class.sdc-tab-header-disabled]=\"h.disabled\"\n role=\"tab\"\n type=\"button\"\n [disabled]=\"h.disabled\"\n [attr.aria-selected]=\"i === activeIndex\"\n [attr.aria-controls]=\"h.id + '-panel'\"\n [attr.aria-disabled]=\"h.disabled\"\n [id]=\"h.id\"\n [tabindex]=\"h.disabled ? -1 : i === activeIndex ? 0 : -1\"\n (click)=\"select(i)\"\n (keydown)=\"onHeaderKeydown($event, i)\"\n >\n <span class=\"sdc-tab-label\">{{ h.label }}</span>\n </button>\n }\n </div>\n <div class=\"sdc-tab-panels\" #panelsRef>\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [".sdc-tab{border:0;border-radius:0;background:none;display:flex;flex-direction:column}.sdc-tab .sdc-tab-label{font-size:15px}.sdc-tab-headers{display:flex;white-space:nowrap;overflow-x:auto;overflow-y:hidden;padding:0;margin:0;border-bottom:1px solid var(--sdc-tab-border);position:relative}.sdc-tab-header{position:relative;appearance:none;background:transparent;border:0;margin:0;padding:10px 15px;color:var(--sdc-tab-primary);cursor:pointer;border-bottom:5px solid transparent;transition:color .2s ease-out,border-color .2s ease-out;border-radius:0;flex:0 0 auto}.sdc-tab-header:hover{color:var(--sdc-tab-primary-hover)}.sdc-tab-header:focus{outline:none;background-color:var(--sdc-tab-focus)}.sdc-tab-header[disabled],.sdc-tab-header-disabled{cursor:not-allowed;opacity:.6}.sdc-tab-header-active{color:var(--sdc-tab-text);font-weight:600;border-bottom-color:var(--sdc-tab-primary)}.sdc-tab-header-active:hover{color:#4d4d4d;border-bottom-color:var(--sdc-tab-primary-hover)}.sdc-tab-header>.sds-badge-error{position:absolute;top:16px;left:1px}.sdc-tab-panels{padding:10px 0 0;width:100%;min-width:0}.sdc-tab-panel{outline:0;list-style:none;margin:0}[hidden]{display:none!important}@media (max-width: 750px){.sdc-tab,.sdc-tab *{box-sizing:border-box}.sdc-tab.sdc-tab-stack{display:flex;flex-direction:column;width:100vw;max-width:100vw;overflow:hidden}.sdc-tab.sdc-tab-stack .sdc-tab-headers{flex-direction:row;border-right:0;border-bottom:1px solid var(--sdc-tab-border);width:100%;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-gutter:stable both-edges;gap:.25rem;padding:0;margin:0}.sdc-tab.sdc-tab-stack .sdc-tab-header{flex:0 0 auto;white-space:nowrap;border-right:0;border-bottom:5px solid transparent;width:auto;text-align:left}.sdc-tab.sdc-tab-stack .sdc-tab-panels{padding:10px 15px 0 0;width:100%;max-width:100%;min-width:0;overflow-x:hidden}.sdc-tab.sdc-tab-stack .sdc-tab-panel{max-width:100%;overflow-wrap:anywhere;word-break:break-word}img,video,canvas,svg{max-width:100%;height:auto}}\n"] }]
|
|
1659
1939
|
}], propDecorators: { headersRef: [{
|
|
1660
1940
|
type: ViewChild,
|
|
1661
1941
|
args: ['headersRef']
|
|
1942
|
+
}], panelsRef: [{
|
|
1943
|
+
type: ViewChild,
|
|
1944
|
+
args: ['panelsRef']
|
|
1662
1945
|
}], activeIndex: [{
|
|
1663
1946
|
type: Input,
|
|
1664
1947
|
args: [{ transform: numberAttribute }]
|
|
@@ -1671,10 +1954,10 @@ class TabItemComponent {
|
|
|
1671
1954
|
disabled = false;
|
|
1672
1955
|
lazy = true;
|
|
1673
1956
|
id;
|
|
1674
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
1675
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.2.
|
|
1957
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TabItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1958
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.2.14", type: TabItemComponent, isStandalone: true, selector: "sdc-tab-item", inputs: { label: "label", disabled: ["disabled", "disabled", booleanAttribute], lazy: ["lazy", "lazy", booleanAttribute], id: "id" }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true });
|
|
1676
1959
|
}
|
|
1677
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
1960
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TabItemComponent, decorators: [{
|
|
1678
1961
|
type: Component,
|
|
1679
1962
|
args: [{
|
|
1680
1963
|
selector: 'sdc-tab-item',
|
|
@@ -1718,10 +2001,10 @@ class SidebarComponent {
|
|
|
1718
2001
|
get sidebarWidth() {
|
|
1719
2002
|
return typeof this.width === 'number' ? `${this.width}%` : this.width;
|
|
1720
2003
|
}
|
|
1721
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
1722
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.
|
|
2004
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SidebarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2005
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: SidebarComponent, isStandalone: true, selector: "sdc-sidebar", inputs: { visible: "visible", header: "header", largeSized: "largeSized", closeOnBackdrop: "closeOnBackdrop", width: "width" }, outputs: { visibleChange: "visibleChange" }, queries: [{ propertyName: "contentTpl", first: true, predicate: ["content"], descendants: true, read: TemplateRef }, { propertyName: "footerTpl", first: true, predicate: ["footer"], descendants: true, read: TemplateRef }], usesOnChanges: true, ngImport: i0, template: "<s-sidebar [visible]=\"visible\" [header]=\"header\" [largeSized]=\"largeSized\" [dismissible]=\"closeOnBackdrop\"\n [ngClass]=\"{ 'sdc--locked': visible && !closeOnBackdrop }\" [style.--sdc-sidebar-width]=\"sidebarWidth\"\n (visibleChange)=\"onVisibleChange($event)\" (onShow)=\"onVisibleChange(true)\" (onHide)=\"onVisibleChange(false)\">\n\n <div class=\"sdc-sidebar-content\">\n <ng-container *ngIf=\"contentTpl; else projected\">\n <ng-container *ngTemplateOutlet=\"contentTpl\"></ng-container>\n </ng-container>\n <ng-template #projected>\n <ng-content></ng-content>\n </ng-template>\n </div>\n\n <div class=\"sdc-sidebar-footer\">\n <hr class=\"sdc-footer-divider\" />\n <div class=\"sdc-footer-actions\">\n <ng-container *ngIf=\"footerTpl\">\n <ng-container *ngTemplateOutlet=\"footerTpl\"></ng-container>\n </ng-container>\n </div>\n </div>\n</s-sidebar>", styles: [".sdc-sidebar-content{flex:1 1 auto;overflow:auto}.sdc-sidebar-content{flex:1 1 auto;overflow:auto;padding:0 1rem}.sdc-sidebar-footer{position:sticky;bottom:-20px;background:#fff}.sdc-footer-divider{margin:.75rem 0 1rem;border:0;border-top:1px solid #dcdcdc}.sdc-footer-actions{display:flex;padding:0 0 15px;align-items:center;justify-content:flex-start;gap:1rem}::ng-deep s-sidebar .backdrop{transition:background-color .2s ease,opacity .2s ease}::ng-deep s-sidebar.sdc--locked .backdrop{background-color:#333!important;opacity:.8!important}::ng-deep .sidebar--open{width:var(--sdc-sidebar-width, 70%)!important;min-width:var(--sdc-sidebar-width, 70%)!important;max-width:var(--sdc-sidebar-width, 70%)!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: SidebarModule }, { kind: "component", type: i2$3.SidebarComponent, selector: "s-sidebar", inputs: ["visible", "closable", "dismissible", "closeOnEscape", "header", "largeSized", "cache", "registerConfirmClose"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "ngmodule", type: StructureModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1723
2006
|
}
|
|
1724
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
2007
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SidebarComponent, decorators: [{
|
|
1725
2008
|
type: Component,
|
|
1726
2009
|
args: [{ selector: 'sdc-sidebar', standalone: true, imports: [CommonModule, SidebarModule, ButtonModule, StructureModule], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, template: "<s-sidebar [visible]=\"visible\" [header]=\"header\" [largeSized]=\"largeSized\" [dismissible]=\"closeOnBackdrop\"\n [ngClass]=\"{ 'sdc--locked': visible && !closeOnBackdrop }\" [style.--sdc-sidebar-width]=\"sidebarWidth\"\n (visibleChange)=\"onVisibleChange($event)\" (onShow)=\"onVisibleChange(true)\" (onHide)=\"onVisibleChange(false)\">\n\n <div class=\"sdc-sidebar-content\">\n <ng-container *ngIf=\"contentTpl; else projected\">\n <ng-container *ngTemplateOutlet=\"contentTpl\"></ng-container>\n </ng-container>\n <ng-template #projected>\n <ng-content></ng-content>\n </ng-template>\n </div>\n\n <div class=\"sdc-sidebar-footer\">\n <hr class=\"sdc-footer-divider\" />\n <div class=\"sdc-footer-actions\">\n <ng-container *ngIf=\"footerTpl\">\n <ng-container *ngTemplateOutlet=\"footerTpl\"></ng-container>\n </ng-container>\n </div>\n </div>\n</s-sidebar>", styles: [".sdc-sidebar-content{flex:1 1 auto;overflow:auto}.sdc-sidebar-content{flex:1 1 auto;overflow:auto;padding:0 1rem}.sdc-sidebar-footer{position:sticky;bottom:-20px;background:#fff}.sdc-footer-divider{margin:.75rem 0 1rem;border:0;border-top:1px solid #dcdcdc}.sdc-footer-actions{display:flex;padding:0 0 15px;align-items:center;justify-content:flex-start;gap:1rem}::ng-deep s-sidebar .backdrop{transition:background-color .2s ease,opacity .2s ease}::ng-deep s-sidebar.sdc--locked .backdrop{background-color:#333!important;opacity:.8!important}::ng-deep .sidebar--open{width:var(--sdc-sidebar-width, 70%)!important;min-width:var(--sdc-sidebar-width, 70%)!important;max-width:var(--sdc-sidebar-width, 70%)!important}\n"] }]
|
|
1727
2010
|
}], propDecorators: { visible: [{
|
|
@@ -1785,10 +2068,10 @@ class ModalComponent {
|
|
|
1785
2068
|
}
|
|
1786
2069
|
}
|
|
1787
2070
|
$visible = false;
|
|
1788
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
1789
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.
|
|
2071
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2072
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ModalComponent, isStandalone: true, selector: "sdc-modal", inputs: { footerButtons: "footerButtons", header: "header", height: "height", maximizable: "maximizable", maximize: "maximize", resizable: "resizable", responsive: "responsive", width: "width", zIndex: "zIndex", visible: "visible" }, outputs: { onHide: "onHide", visibleChange: "visibleChange" }, viewQueries: [{ propertyName: "modal", first: true, predicate: ["modal"], descendants: true }], ngImport: i0, template: "<p-dialog\n [(visible)]=\"visible\"\n [contentStyle]=\"getStyle()\"\n [draggable]=\"false\"\n [header]=\"header\"\n [maximizable]=\"maximizable\"\n [modal]=\"true\"\n [resizable]=\"resizable\"\n [responsive]=\"responsive\"\n (onHide)=\"onHideHandler()\"\n appendTo=\"body\"\n #modal\n>\n <ng-content></ng-content>\n <ng-template pTemplate=\"footer\">\n <div class=\"footer\">\n <ng-content select=\"[footer]\"></ng-content>\n <p-button\n *ngFor=\"let btn of footerButtons\"\n (onClick)=\"btn.action()\"\n [icon]=\"btn.icon\"\n [id]=\"btn.id\"\n [label]=\"btn.label\"\n [severity]=\"btn.severity ?? 'primary'\"\n ></p-button>\n </div>\n </ng-template>\n</p-dialog>\n", styles: [".footer{display:flex;flex-direction:row-reverse;flex-wrap:nowrap;gap:10px;padding-top:10px}\n"], dependencies: [{ kind: "ngmodule", type: ButtonModule$1 }, { kind: "component", type: i1$4.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "fluid", "buttonProps"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i2$1.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "closeButtonProps", "maximizeButtonProps", "visible", "style", "position", "role", "content", "contentTemplate", "footerTemplate", "closeIconTemplate", "maximizeIconTemplate", "minimizeIconTemplate", "headlessTemplate"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1790
2073
|
}
|
|
1791
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
2074
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ModalComponent, decorators: [{
|
|
1792
2075
|
type: Component,
|
|
1793
2076
|
args: [{ imports: [ButtonModule$1, CommonModule, DialogModule], standalone: true, selector: 'sdc-modal', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, template: "<p-dialog\n [(visible)]=\"visible\"\n [contentStyle]=\"getStyle()\"\n [draggable]=\"false\"\n [header]=\"header\"\n [maximizable]=\"maximizable\"\n [modal]=\"true\"\n [resizable]=\"resizable\"\n [responsive]=\"responsive\"\n (onHide)=\"onHideHandler()\"\n appendTo=\"body\"\n #modal\n>\n <ng-content></ng-content>\n <ng-template pTemplate=\"footer\">\n <div class=\"footer\">\n <ng-content select=\"[footer]\"></ng-content>\n <p-button\n *ngFor=\"let btn of footerButtons\"\n (onClick)=\"btn.action()\"\n [icon]=\"btn.icon\"\n [id]=\"btn.id\"\n [label]=\"btn.label\"\n [severity]=\"btn.severity ?? 'primary'\"\n ></p-button>\n </div>\n </ng-template>\n</p-dialog>\n", styles: [".footer{display:flex;flex-direction:row-reverse;flex-wrap:nowrap;gap:10px;padding-top:10px}\n"] }]
|
|
1794
2077
|
}], propDecorators: { modal: [{
|
|
@@ -1822,29 +2105,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
1822
2105
|
|
|
1823
2106
|
class PanelComponent {
|
|
1824
2107
|
header = '';
|
|
1825
|
-
showHeader = false;
|
|
1826
2108
|
toggleable = false;
|
|
1827
|
-
set collapsed(value) {
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
get collapsed() {
|
|
1831
|
-
return this.$collapsed;
|
|
1832
|
-
}
|
|
2109
|
+
set collapsed(value) { this.$collapsed = value; }
|
|
2110
|
+
get collapsed() { return this.$collapsed; }
|
|
2111
|
+
collapsedChange = new EventEmitter();
|
|
1833
2112
|
$collapsed = false;
|
|
1834
|
-
|
|
1835
|
-
|
|
2113
|
+
severity = EnumSeverity.Default;
|
|
2114
|
+
borderButtonOptions;
|
|
2115
|
+
panelClass = '';
|
|
2116
|
+
onCollapsedChanged(v) {
|
|
2117
|
+
this.$collapsed = v;
|
|
2118
|
+
this.collapsedChange.emit(v);
|
|
2119
|
+
}
|
|
2120
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2121
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: PanelComponent, isStandalone: true, selector: "sdc-panel", inputs: { header: "header", toggleable: "toggleable", collapsed: "collapsed", severity: "severity", borderButtonOptions: "borderButtonOptions", panelClass: ["class", "panelClass"] }, outputs: { collapsedChange: "collapsedChange" }, ngImport: i0, template: "<s-panel\n [(collapsed)]=\"collapsed\"\n [header]=\"header\"\n [toggleable]=\"toggleable\"\n [severity]=\"severity\"\n [borderButtonOptions]=\"borderButtonOptions\"\n [class]=\"panelClass\"\n (collapsedChange)=\"onCollapsedChanged($event)\"\n>\n <ng-content></ng-content>\n\n <div class=\"sdc-panel-footer\">\n <ng-content select=\"[sdcFooter]\"></ng-content>\n </div>\n</s-panel>\n", styles: [":host{display:contents}.sdc-panel-footer{margin-top:.75rem;padding-top:.75rem;border-top:1px solid var(--sdc-panel-divider, #dedce5)}.sdc-panel-footer:empty{display:none}\n"], dependencies: [{ kind: "ngmodule", type: PanelModule }, { kind: "component", type: i1$6.PanelComponent, selector: "s-panel", inputs: ["header", "toggleable", "collapsed", "severity", "borderButtonOptions", "class"], outputs: ["collapsedChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1836
2122
|
}
|
|
1837
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
2123
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PanelComponent, decorators: [{
|
|
1838
2124
|
type: Component,
|
|
1839
|
-
args: [{ imports: [PanelModule
|
|
2125
|
+
args: [{ imports: [PanelModule], standalone: true, selector: 'sdc-panel', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, template: "<s-panel\n [(collapsed)]=\"collapsed\"\n [header]=\"header\"\n [toggleable]=\"toggleable\"\n [severity]=\"severity\"\n [borderButtonOptions]=\"borderButtonOptions\"\n [class]=\"panelClass\"\n (collapsedChange)=\"onCollapsedChanged($event)\"\n>\n <ng-content></ng-content>\n\n <div class=\"sdc-panel-footer\">\n <ng-content select=\"[sdcFooter]\"></ng-content>\n </div>\n</s-panel>\n", styles: [":host{display:contents}.sdc-panel-footer{margin-top:.75rem;padding-top:.75rem;border-top:1px solid var(--sdc-panel-divider, #dedce5)}.sdc-panel-footer:empty{display:none}\n"] }]
|
|
1840
2126
|
}], propDecorators: { header: [{
|
|
1841
2127
|
type: Input
|
|
1842
|
-
}], showHeader: [{
|
|
1843
|
-
type: Input
|
|
1844
2128
|
}], toggleable: [{
|
|
1845
2129
|
type: Input
|
|
1846
2130
|
}], collapsed: [{
|
|
1847
2131
|
type: Input
|
|
2132
|
+
}], collapsedChange: [{
|
|
2133
|
+
type: Output
|
|
2134
|
+
}], severity: [{
|
|
2135
|
+
type: Input
|
|
2136
|
+
}], borderButtonOptions: [{
|
|
2137
|
+
type: Input
|
|
2138
|
+
}], panelClass: [{
|
|
2139
|
+
type: Input,
|
|
2140
|
+
args: ['class']
|
|
1848
2141
|
}] } });
|
|
1849
2142
|
|
|
1850
2143
|
class SpinnerService {
|
|
@@ -1859,10 +2152,10 @@ class SpinnerService {
|
|
|
1859
2152
|
this.start();
|
|
1860
2153
|
setTimeout(() => this.stop(), ms);
|
|
1861
2154
|
}
|
|
1862
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
1863
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.
|
|
2155
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SpinnerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2156
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SpinnerService, providedIn: 'root' });
|
|
1864
2157
|
}
|
|
1865
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
2158
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SpinnerService, decorators: [{
|
|
1866
2159
|
type: Injectable,
|
|
1867
2160
|
args: [{ providedIn: 'root' }]
|
|
1868
2161
|
}] });
|
|
@@ -1890,10 +2183,10 @@ class SpinnerComponent {
|
|
|
1890
2183
|
height: '50px',
|
|
1891
2184
|
};
|
|
1892
2185
|
}
|
|
1893
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
1894
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.
|
|
2186
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SpinnerComponent, deps: [{ token: SpinnerService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2187
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: SpinnerComponent, isStandalone: true, selector: "sdc-spinner", inputs: { loading: "loading", blockWindow: "blockWindow" }, ngImport: i0, template: " <div class=\"spinner-container\">\n <s-loading-state [loading]=\"loading\" [blockWindow]=\"blockWindow\">\n\n </s-loading-state>\n </div>\n\n\n", styles: [".spinner-container{width:100%;height:100%;display:flex;justify-content:center;align-items:center}\n"], dependencies: [{ kind: "ngmodule", type: ProgressSpinnerModule }, { kind: "ngmodule", type: BlockUIModule }, { kind: "ngmodule", type: LoadingStateModule }, { kind: "component", type: i2$2.LoadingStateComponent, selector: "s-loading-state", inputs: ["indicator", "id", "blockWindow", "loading"] }] });
|
|
1895
2188
|
}
|
|
1896
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
2189
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SpinnerComponent, decorators: [{
|
|
1897
2190
|
type: Component,
|
|
1898
2191
|
args: [{ selector: 'sdc-spinner', standalone: true, imports: [ProgressSpinnerModule, BlockUIModule, LoadingStateModule], encapsulation: ViewEncapsulation.Emulated, template: " <div class=\"spinner-container\">\n <s-loading-state [loading]=\"loading\" [blockWindow]=\"blockWindow\">\n\n </s-loading-state>\n </div>\n\n\n", styles: [".spinner-container{width:100%;height:100%;display:flex;justify-content:center;align-items:center}\n"] }]
|
|
1899
2192
|
}], ctorParameters: () => [{ type: SpinnerService }], propDecorators: { loading: [{
|
|
@@ -1904,145 +2197,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
1904
2197
|
args: [{ required: false }]
|
|
1905
2198
|
}] } });
|
|
1906
2199
|
|
|
1907
|
-
class SqlEditorComponent {
|
|
1908
|
-
sql = '';
|
|
1909
|
-
height = null;
|
|
1910
|
-
width = null;
|
|
1911
|
-
set schema(value) {
|
|
1912
|
-
this.$schema = value;
|
|
1913
|
-
this.updateEditorExtensions();
|
|
1914
|
-
}
|
|
1915
|
-
onDomainFilter = new EventEmitter();
|
|
1916
|
-
editorContainer;
|
|
1917
|
-
$editor;
|
|
1918
|
-
$onChange = () => { };
|
|
1919
|
-
$onTouched = () => { };
|
|
1920
|
-
$schema = {};
|
|
1921
|
-
ngOnInit() {
|
|
1922
|
-
this.$editor = new EditorView({
|
|
1923
|
-
doc: this.sql,
|
|
1924
|
-
parent: this.editorContainer.nativeElement,
|
|
1925
|
-
extensions: this.buildExtensions(),
|
|
1926
|
-
});
|
|
1927
|
-
}
|
|
1928
|
-
ngOnDestroy() {
|
|
1929
|
-
this.$editor?.destroy();
|
|
1930
|
-
}
|
|
1931
|
-
writeValue(value) {
|
|
1932
|
-
if (this.$editor && value !== this.$editor.state.doc.toString()) {
|
|
1933
|
-
this.$editor.dispatch({
|
|
1934
|
-
changes: { from: 0, to: this.$editor.state.doc.length, insert: value },
|
|
1935
|
-
});
|
|
1936
|
-
}
|
|
1937
|
-
}
|
|
1938
|
-
registerOnChange(fn) {
|
|
1939
|
-
this.$onChange = fn;
|
|
1940
|
-
this.$onTouched();
|
|
1941
|
-
}
|
|
1942
|
-
registerOnTouched(fn) {
|
|
1943
|
-
this.$onTouched = fn;
|
|
1944
|
-
}
|
|
1945
|
-
setDisabledState(isDisabled) {
|
|
1946
|
-
this.$editor?.contentDOM.setAttribute('contenteditable', String(!isDisabled));
|
|
1947
|
-
}
|
|
1948
|
-
getStyles() {
|
|
1949
|
-
const styles = [];
|
|
1950
|
-
if (this.width) {
|
|
1951
|
-
const w = typeof this.width === 'number' ? `${this.width}px` : this.width;
|
|
1952
|
-
styles.push(`width:${w}`);
|
|
1953
|
-
}
|
|
1954
|
-
if (this.height) {
|
|
1955
|
-
const h = typeof this.height === 'number' ? `${this.height}px` : this.height;
|
|
1956
|
-
styles.push(`height:${h}`);
|
|
1957
|
-
}
|
|
1958
|
-
return styles.join(';');
|
|
1959
|
-
}
|
|
1960
|
-
buildExtensions() {
|
|
1961
|
-
return [
|
|
1962
|
-
basicSetup,
|
|
1963
|
-
ayuLight,
|
|
1964
|
-
sqlUppercaseHandler(),
|
|
1965
|
-
sqlFormatterHandler(),
|
|
1966
|
-
sql({ dialect: PostgreSQL }),
|
|
1967
|
-
sqlDomainFilterDecorator(token => this.onDomainFilter.emit(token)),
|
|
1968
|
-
autocompletion({
|
|
1969
|
-
override: [createSqlAutoCompletionHadler(this.$schema)],
|
|
1970
|
-
}),
|
|
1971
|
-
EditorView.updateListener.of(update => {
|
|
1972
|
-
if (update.docChanged) {
|
|
1973
|
-
this.$onChange(update.state.doc.toString());
|
|
1974
|
-
}
|
|
1975
|
-
}),
|
|
1976
|
-
];
|
|
1977
|
-
}
|
|
1978
|
-
updateEditorExtensions() {
|
|
1979
|
-
if (!this.$editor)
|
|
1980
|
-
return;
|
|
1981
|
-
this.$editor.dispatch({
|
|
1982
|
-
effects: StateEffect.reconfigure.of(this.buildExtensions()),
|
|
1983
|
-
});
|
|
1984
|
-
}
|
|
1985
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SqlEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1986
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SqlEditorComponent, isStandalone: true, selector: "sdc-sql-editor", inputs: { sql: "sql", height: "height", width: "width", schema: "schema" }, outputs: { onDomainFilter: "onDomainFilter" }, providers: [
|
|
1987
|
-
{
|
|
1988
|
-
provide: NG_VALUE_ACCESSOR,
|
|
1989
|
-
useExisting: forwardRef(() => SqlEditorComponent),
|
|
1990
|
-
multi: true,
|
|
1991
|
-
},
|
|
1992
|
-
], viewQueries: [{ propertyName: "editorContainer", first: true, predicate: ["editorContainer"], descendants: true, static: true }], ngImport: i0, template: "<div #editorContainer class=\"sdc-sql-editor\" [style]=\"getStyles()\"></div>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1993
|
-
}
|
|
1994
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SqlEditorComponent, decorators: [{
|
|
1995
|
-
type: Component,
|
|
1996
|
-
args: [{ selector: 'sdc-sql-editor', standalone: true, imports: [CommonModule], providers: [
|
|
1997
|
-
{
|
|
1998
|
-
provide: NG_VALUE_ACCESSOR,
|
|
1999
|
-
useExisting: forwardRef(() => SqlEditorComponent),
|
|
2000
|
-
multi: true,
|
|
2001
|
-
},
|
|
2002
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, template: "<div #editorContainer class=\"sdc-sql-editor\" [style]=\"getStyles()\"></div>" }]
|
|
2003
|
-
}], propDecorators: { sql: [{
|
|
2004
|
-
type: Input
|
|
2005
|
-
}], height: [{
|
|
2006
|
-
type: Input
|
|
2007
|
-
}], width: [{
|
|
2008
|
-
type: Input
|
|
2009
|
-
}], schema: [{
|
|
2010
|
-
type: Input
|
|
2011
|
-
}], onDomainFilter: [{
|
|
2012
|
-
type: Output
|
|
2013
|
-
}], editorContainer: [{
|
|
2014
|
-
type: ViewChild,
|
|
2015
|
-
args: ['editorContainer', { static: true }]
|
|
2016
|
-
}] } });
|
|
2017
|
-
|
|
2018
|
-
class TextboxComponent extends InputsComponent {
|
|
2019
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TextboxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2020
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: TextboxComponent, isStandalone: true, selector: "sdc-textbox", providers: [
|
|
2021
|
-
{
|
|
2022
|
-
provide: NG_VALUE_ACCESSOR,
|
|
2023
|
-
useExisting: forwardRef(() => TextboxComponent),
|
|
2024
|
-
multi: true,
|
|
2025
|
-
},
|
|
2026
|
-
], usesInheritance: true, ngImport: i0, template: "<div class=\"sdc-textbox\">\n <div *ngIf=\"label || infoIcon\" class=\"flex align-items-center\">\n <label *ngIf=\"label\" [for]=\"identity.id\">\n <span>{{ label }}</span>\n <span class=\"required-field\" *ngIf=\"required\"> •</span>\n </label>\n <i *ngIf=\"infoIcon\" class=\"fas fa-info-circle ml-3\" \n [pTooltip]=\"tooltipIcon\" \n tooltipZIndex=\"999999999999\"></i>\n </div>\n\n <input\n (input)=\"onInput($event)\"\n [disabled]=\"disabled\"\n [id]=\"identity.id\"\n [name]=\"identity.name\"\n [ngClass]=\"getInvalidClass()\"\n [ngStyle]=\"getInputStyle()\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n [value]=\"value\"\n pInputText\n type=\"text\"\n [attr.maxlength]=\"maxlength\"\n [pKeyFilter]=\"keyFilter\"\n />\n\n <small\n *ngIf=\"message\"\n [ngClass]=\"getInvalidMessageClass()\"\n >{{ message }}</small>\n</div>\n", styles: [".sdc-textbox label{display:inline-flex;align-items:center;margin-bottom:0;line-height:1;padding-top:7px;padding-bottom:7px}.sdc-textbox .required-field{margin-left:.25rem}.sdc-textbox ::ng-deep input{border-start-start-radius:var(--sdc-formfield-border-radius)!important;border-end-start-radius:var(--sdc-formfield-border-radius)!important;border-start-end-radius:var(--sdc-formfield-border-radius)!important;border-end-end-radius:var(--sdc-formfield-border-radius)!important;min-height:var(--sdc-formfield-default-height)!important;height:var(--sdc-formfield-default-height)!important;max-height:var(--sdc-formfield-default-height)!important;line-height:var(--sdc-formfield-default-line-height)!important}.sdc-textbox ::ng-deep input:disabled{background-color:var(--sdc-formfield-disabled-bg)!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i6.InputText, selector: "[pInputText]", inputs: ["variant", "fluid", "pSize"] }, { kind: "ngmodule", type: KeyFilterModule }, { kind: "directive", type: i3$3.KeyFilter, selector: "[pKeyFilter]", inputs: ["pValidateOnly", "pKeyFilter"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i4$1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2027
|
-
}
|
|
2028
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TextboxComponent, decorators: [{
|
|
2029
|
-
type: Component,
|
|
2030
|
-
args: [{ selector: 'sdc-textbox', standalone: true, imports: [
|
|
2031
|
-
CommonModule,
|
|
2032
|
-
FormsModule,
|
|
2033
|
-
ReactiveFormsModule,
|
|
2034
|
-
InputTextModule,
|
|
2035
|
-
KeyFilterModule,
|
|
2036
|
-
TooltipModule,
|
|
2037
|
-
], providers: [
|
|
2038
|
-
{
|
|
2039
|
-
provide: NG_VALUE_ACCESSOR,
|
|
2040
|
-
useExisting: forwardRef(() => TextboxComponent),
|
|
2041
|
-
multi: true,
|
|
2042
|
-
},
|
|
2043
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, template: "<div class=\"sdc-textbox\">\n <div *ngIf=\"label || infoIcon\" class=\"flex align-items-center\">\n <label *ngIf=\"label\" [for]=\"identity.id\">\n <span>{{ label }}</span>\n <span class=\"required-field\" *ngIf=\"required\"> •</span>\n </label>\n <i *ngIf=\"infoIcon\" class=\"fas fa-info-circle ml-3\" \n [pTooltip]=\"tooltipIcon\" \n tooltipZIndex=\"999999999999\"></i>\n </div>\n\n <input\n (input)=\"onInput($event)\"\n [disabled]=\"disabled\"\n [id]=\"identity.id\"\n [name]=\"identity.name\"\n [ngClass]=\"getInvalidClass()\"\n [ngStyle]=\"getInputStyle()\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n [value]=\"value\"\n pInputText\n type=\"text\"\n [attr.maxlength]=\"maxlength\"\n [pKeyFilter]=\"keyFilter\"\n />\n\n <small\n *ngIf=\"message\"\n [ngClass]=\"getInvalidMessageClass()\"\n >{{ message }}</small>\n</div>\n", styles: [".sdc-textbox label{display:inline-flex;align-items:center;margin-bottom:0;line-height:1;padding-top:7px;padding-bottom:7px}.sdc-textbox .required-field{margin-left:.25rem}.sdc-textbox ::ng-deep input{border-start-start-radius:var(--sdc-formfield-border-radius)!important;border-end-start-radius:var(--sdc-formfield-border-radius)!important;border-start-end-radius:var(--sdc-formfield-border-radius)!important;border-end-end-radius:var(--sdc-formfield-border-radius)!important;min-height:var(--sdc-formfield-default-height)!important;height:var(--sdc-formfield-default-height)!important;max-height:var(--sdc-formfield-default-height)!important;line-height:var(--sdc-formfield-default-line-height)!important}.sdc-textbox ::ng-deep input:disabled{background-color:var(--sdc-formfield-disabled-bg)!important}\n"] }]
|
|
2044
|
-
}] });
|
|
2045
|
-
|
|
2046
2200
|
class ToastComponent {
|
|
2047
2201
|
toast;
|
|
2048
2202
|
dismiss = new EventEmitter();
|
|
@@ -2068,10 +2222,10 @@ class ToastComponent {
|
|
|
2068
2222
|
this.isLeaving = true;
|
|
2069
2223
|
setTimeout(() => this.dismiss.emit(), 300);
|
|
2070
2224
|
}
|
|
2071
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
2072
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.
|
|
2225
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToastComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2226
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ToastComponent, isStandalone: true, selector: "s-toast", inputs: { toast: "toast" }, outputs: { dismiss: "dismiss" }, host: { properties: { "class.toast--leaving": "this.isLeaving" } }, ngImport: i0, template: "<div\n class=\"toast\"\n [class.toast--info]=\"toast.severity === 'info'\"\n [class.toast--success]=\"toast.severity === 'success'\"\n [class.toast--warning]=\"toast.severity === 'warning'\"\n [class.toast--error]=\"toast.severity === 'error'\"\n>\n <div class=\"toast-content\">\n <i\n class=\"toast-icon fas fa-info\"\n [class.fa-info]=\"toast.severity === 'info'\"\n [class.fa-check]=\"toast.severity === 'success'\"\n [class.fa-exclamation-triangle]=\"toast.severity === 'warning'\"\n [class.fa-times]=\"toast.severity === 'error'\"\n ></i>\n <div class=\"text-container\">\n <span *ngIf=\"toast.title\" class=\"toast-summary\" [innerHTML]=\"toast.title\"></span>\n <span *ngIf=\"toast.text\" [innerHTML]=\"toast.text\"></span>\n </div>\n </div>\n <button *ngIf=\"toast.closable\" class=\"toast-close-button\" (click)=\"dismissToast()\"><i class=\"fas fa-times\"></i></button>\n</div>\n", styles: [":host{display:block}.toast{align-items:center;animation:fadeInDown .3s forwards;border-left:3px solid #428bca;border-radius:3px;box-shadow:0 1px 5px #00000040;color:#212533;display:flex;font-family:\"Open Sans\" sans-serif;font-size:14px;opacity:0;padding:10px 15px;position:relative;transform:translateY(-20px);width:400px}.toast .toast-content{align-items:center;flex-grow:1;display:flex;gap:15px}.toast .toast-content .toast-icon{align-items:center;background-color:#428bca;border-radius:50%;color:#fff;display:flex;flex-shrink:0;height:40px;justify-content:center;width:40px}.toast .toast-content .text-container{display:flex;flex-direction:column}.toast .toast-content .text-container .toast-summary{font-weight:700}.toast--success{background-color:#e0f0f0;border-left:3px solid #0c9348}.toast--success .toast-content .toast-icon{background-color:#0c9348}.toast--error{background-color:#fef0f0;border-left:3px solid #c13018}.toast--error .toast-content .toast-icon{background-color:#c13018}.toast--info{background-color:#f1f7f8;border-left:3px solid #428bca}.toast--info .toast-content .toast-icon{background-color:#428bca}.toast--warning{background-color:#fef4e3;border-left:3px solid #fcbf10}.toast--warning .toast-content .toast-icon{background-color:#fcbf10;color:#212533}.toast-close-button{background:none;border:none;color:#212533;font-size:1rem;cursor:pointer;margin-left:15px;transition:transform .2s ease-in-out}.toast-close-button:hover{transform:scale(1.1)}@keyframes fadeInDown{0%{opacity:0;transform:translateY(-20px)}to{opacity:1;transform:translateY(0)}}@keyframes fadeOutUp{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-20px)}}:host.toast--leaving{animation:fadeOutUp .3s forwards}@media (max-width: 440px){.toast{width:calc(100% - 40px)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2073
2227
|
}
|
|
2074
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
2228
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToastComponent, decorators: [{
|
|
2075
2229
|
type: Component,
|
|
2076
2230
|
args: [{ selector: 's-toast', standalone: true, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, template: "<div\n class=\"toast\"\n [class.toast--info]=\"toast.severity === 'info'\"\n [class.toast--success]=\"toast.severity === 'success'\"\n [class.toast--warning]=\"toast.severity === 'warning'\"\n [class.toast--error]=\"toast.severity === 'error'\"\n>\n <div class=\"toast-content\">\n <i\n class=\"toast-icon fas fa-info\"\n [class.fa-info]=\"toast.severity === 'info'\"\n [class.fa-check]=\"toast.severity === 'success'\"\n [class.fa-exclamation-triangle]=\"toast.severity === 'warning'\"\n [class.fa-times]=\"toast.severity === 'error'\"\n ></i>\n <div class=\"text-container\">\n <span *ngIf=\"toast.title\" class=\"toast-summary\" [innerHTML]=\"toast.title\"></span>\n <span *ngIf=\"toast.text\" [innerHTML]=\"toast.text\"></span>\n </div>\n </div>\n <button *ngIf=\"toast.closable\" class=\"toast-close-button\" (click)=\"dismissToast()\"><i class=\"fas fa-times\"></i></button>\n</div>\n", styles: [":host{display:block}.toast{align-items:center;animation:fadeInDown .3s forwards;border-left:3px solid #428bca;border-radius:3px;box-shadow:0 1px 5px #00000040;color:#212533;display:flex;font-family:\"Open Sans\" sans-serif;font-size:14px;opacity:0;padding:10px 15px;position:relative;transform:translateY(-20px);width:400px}.toast .toast-content{align-items:center;flex-grow:1;display:flex;gap:15px}.toast .toast-content .toast-icon{align-items:center;background-color:#428bca;border-radius:50%;color:#fff;display:flex;flex-shrink:0;height:40px;justify-content:center;width:40px}.toast .toast-content .text-container{display:flex;flex-direction:column}.toast .toast-content .text-container .toast-summary{font-weight:700}.toast--success{background-color:#e0f0f0;border-left:3px solid #0c9348}.toast--success .toast-content .toast-icon{background-color:#0c9348}.toast--error{background-color:#fef0f0;border-left:3px solid #c13018}.toast--error .toast-content .toast-icon{background-color:#c13018}.toast--info{background-color:#f1f7f8;border-left:3px solid #428bca}.toast--info .toast-content .toast-icon{background-color:#428bca}.toast--warning{background-color:#fef4e3;border-left:3px solid #fcbf10}.toast--warning .toast-content .toast-icon{background-color:#fcbf10;color:#212533}.toast-close-button{background:none;border:none;color:#212533;font-size:1rem;cursor:pointer;margin-left:15px;transition:transform .2s ease-in-out}.toast-close-button:hover{transform:scale(1.1)}@keyframes fadeInDown{0%{opacity:0;transform:translateY(-20px)}to{opacity:1;transform:translateY(0)}}@keyframes fadeOutUp{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-20px)}}:host.toast--leaving{animation:fadeOutUp .3s forwards}@media (max-width: 440px){.toast{width:calc(100% - 40px)}}\n"] }]
|
|
2077
2231
|
}], propDecorators: { toast: [{
|
|
@@ -2137,16 +2291,241 @@ class ToastService {
|
|
|
2137
2291
|
});
|
|
2138
2292
|
this.activeToasts.push(componentRef);
|
|
2139
2293
|
}
|
|
2140
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
2141
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.
|
|
2294
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToastService, deps: [{ token: i0.ApplicationRef }, { token: i0.Injector }, { token: i0.ComponentFactoryResolver }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2295
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToastService, providedIn: "root" });
|
|
2142
2296
|
}
|
|
2143
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
2297
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToastService, decorators: [{
|
|
2144
2298
|
type: Injectable,
|
|
2145
2299
|
args: [{
|
|
2146
2300
|
providedIn: "root",
|
|
2147
2301
|
}]
|
|
2148
2302
|
}], ctorParameters: () => [{ type: i0.ApplicationRef }, { type: i0.Injector }, { type: i0.ComponentFactoryResolver }] });
|
|
2149
2303
|
|
|
2304
|
+
class CodeEditorComponent {
|
|
2305
|
+
toast;
|
|
2306
|
+
constructor(toast) {
|
|
2307
|
+
this.toast = toast;
|
|
2308
|
+
}
|
|
2309
|
+
sql = '';
|
|
2310
|
+
height = null;
|
|
2311
|
+
width = null;
|
|
2312
|
+
showCopy = false;
|
|
2313
|
+
customHeaderItems = [];
|
|
2314
|
+
activeHeaderKey;
|
|
2315
|
+
headerSelect = new EventEmitter();
|
|
2316
|
+
copied = new EventEmitter();
|
|
2317
|
+
_readOnly = false;
|
|
2318
|
+
set readOnly(v) { this._readOnly = !!v; this.updateEditorExtensions(); }
|
|
2319
|
+
get readOnly() { return this._readOnly; }
|
|
2320
|
+
languageChange = new EventEmitter();
|
|
2321
|
+
set language(value) {
|
|
2322
|
+
const lang = (value || 'sql');
|
|
2323
|
+
if (lang !== this.$language) {
|
|
2324
|
+
this.$language = lang;
|
|
2325
|
+
this.updateEditorExtensions();
|
|
2326
|
+
this.languageChange.emit(this.$language);
|
|
2327
|
+
}
|
|
2328
|
+
}
|
|
2329
|
+
get language() { return this.$language; }
|
|
2330
|
+
set schema(value) {
|
|
2331
|
+
this.$schema = value;
|
|
2332
|
+
if (this.$language === 'sql')
|
|
2333
|
+
this.updateEditorExtensions();
|
|
2334
|
+
}
|
|
2335
|
+
onDomainFilter = new EventEmitter();
|
|
2336
|
+
editorContainer;
|
|
2337
|
+
$editor;
|
|
2338
|
+
$onChange = () => { };
|
|
2339
|
+
$onTouched = () => { };
|
|
2340
|
+
$schema = {};
|
|
2341
|
+
$language = 'sql';
|
|
2342
|
+
$disabled = false;
|
|
2343
|
+
ngOnInit() {
|
|
2344
|
+
this.$editor = new EditorView({
|
|
2345
|
+
doc: this.sql,
|
|
2346
|
+
parent: this.editorContainer.nativeElement,
|
|
2347
|
+
extensions: this.buildExtensions(),
|
|
2348
|
+
});
|
|
2349
|
+
}
|
|
2350
|
+
ngOnChanges(changes) {
|
|
2351
|
+
if (changes['sql'] && !changes['sql'].firstChange && this.$editor) {
|
|
2352
|
+
const next = (changes['sql'].currentValue ?? '');
|
|
2353
|
+
if (next !== this.$editor.state.doc.toString()) {
|
|
2354
|
+
this.$editor.dispatch({ changes: { from: 0, to: this.$editor.state.doc.length, insert: next } });
|
|
2355
|
+
}
|
|
2356
|
+
}
|
|
2357
|
+
}
|
|
2358
|
+
ngOnDestroy() { this.$editor?.destroy(); }
|
|
2359
|
+
writeValue(value) {
|
|
2360
|
+
if (this.$editor && value !== this.$editor.state.doc.toString()) {
|
|
2361
|
+
this.$editor.dispatch({ changes: { from: 0, to: this.$editor.state.doc.length, insert: value ?? '' } });
|
|
2362
|
+
}
|
|
2363
|
+
}
|
|
2364
|
+
registerOnChange(fn) { this.$onChange = fn; }
|
|
2365
|
+
registerOnTouched(fn) { this.$onTouched = fn; }
|
|
2366
|
+
setDisabledState(isDisabled) {
|
|
2367
|
+
this.$disabled = isDisabled;
|
|
2368
|
+
if (!this.$editor)
|
|
2369
|
+
return;
|
|
2370
|
+
const editable = !(isDisabled || this._readOnly);
|
|
2371
|
+
this.$editor.contentDOM.setAttribute('contenteditable', String(editable));
|
|
2372
|
+
this.updateEditorExtensions();
|
|
2373
|
+
}
|
|
2374
|
+
getStyleMap() {
|
|
2375
|
+
const s = {};
|
|
2376
|
+
if (this.width != null)
|
|
2377
|
+
s.width = typeof this.width === 'number' ? `${this.width}px` : this.width;
|
|
2378
|
+
if (this.height != null)
|
|
2379
|
+
s.height = typeof this.height === 'number' ? `${this.height}px` : this.height;
|
|
2380
|
+
return s;
|
|
2381
|
+
}
|
|
2382
|
+
pickHeader(item) {
|
|
2383
|
+
this.activeHeaderKey = item.key;
|
|
2384
|
+
if (item.value !== this.$language)
|
|
2385
|
+
this.language = item.value;
|
|
2386
|
+
this.headerSelect.emit({ key: item.key, lang: item.value });
|
|
2387
|
+
}
|
|
2388
|
+
async copy() {
|
|
2389
|
+
const text = this.$editor ? this.$editor.state.doc.toString() : this.sql || '';
|
|
2390
|
+
let ok = false;
|
|
2391
|
+
try {
|
|
2392
|
+
await navigator.clipboard.writeText(text);
|
|
2393
|
+
ok = true;
|
|
2394
|
+
}
|
|
2395
|
+
catch {
|
|
2396
|
+
try {
|
|
2397
|
+
const ta = document.createElement('textarea');
|
|
2398
|
+
ta.value = text;
|
|
2399
|
+
document.body.appendChild(ta);
|
|
2400
|
+
ta.select();
|
|
2401
|
+
document.execCommand('copy');
|
|
2402
|
+
document.body.removeChild(ta);
|
|
2403
|
+
ok = true;
|
|
2404
|
+
}
|
|
2405
|
+
catch {
|
|
2406
|
+
ok = false;
|
|
2407
|
+
}
|
|
2408
|
+
}
|
|
2409
|
+
this.toast.show({
|
|
2410
|
+
title: ok ? 'Copiado' : 'Falha ao copiar',
|
|
2411
|
+
text: ok ? 'Conteúdo copiado para a área de transferência.' : 'Não foi possível copiar.',
|
|
2412
|
+
severity: ok ? 'success' : 'error',
|
|
2413
|
+
duration: 2000,
|
|
2414
|
+
closable: true
|
|
2415
|
+
});
|
|
2416
|
+
this.copied.emit(ok);
|
|
2417
|
+
}
|
|
2418
|
+
buildExtensions() {
|
|
2419
|
+
const editable = !(this._readOnly || this.$disabled);
|
|
2420
|
+
const guards = editable ? [] : [
|
|
2421
|
+
EditorView.domEventHandlers({
|
|
2422
|
+
beforeinput: e => e.preventDefault(),
|
|
2423
|
+
drop: e => e.preventDefault(),
|
|
2424
|
+
paste: e => e.preventDefault(),
|
|
2425
|
+
cut: e => e.preventDefault(),
|
|
2426
|
+
}),
|
|
2427
|
+
];
|
|
2428
|
+
const base = [
|
|
2429
|
+
basicSetup,
|
|
2430
|
+
ayuLight,
|
|
2431
|
+
EditorView.editable.of(editable),
|
|
2432
|
+
EditorView.updateListener.of((update) => {
|
|
2433
|
+
if (update.docChanged)
|
|
2434
|
+
this.$onChange(update.state.doc.toString());
|
|
2435
|
+
}),
|
|
2436
|
+
...guards,
|
|
2437
|
+
];
|
|
2438
|
+
return [...base, ...this.getLanguageExtensions()];
|
|
2439
|
+
}
|
|
2440
|
+
getLanguageExtensions() {
|
|
2441
|
+
switch (this.$language) {
|
|
2442
|
+
case 'sql':
|
|
2443
|
+
return [
|
|
2444
|
+
sqlUppercaseHandler(),
|
|
2445
|
+
sqlFormatterHandler(),
|
|
2446
|
+
sql({ dialect: PostgreSQL }),
|
|
2447
|
+
sqlDomainFilterDecorator((token) => this.onDomainFilter.emit(token)),
|
|
2448
|
+
autocompletion({ override: [createSqlAutoCompletionHadler(this.$schema)] }),
|
|
2449
|
+
];
|
|
2450
|
+
case 'typescript': return [javascript({ typescript: true, jsx: true }), autocompletion()];
|
|
2451
|
+
case 'javascript': return [javascript({ typescript: false, jsx: true }), autocompletion()];
|
|
2452
|
+
case 'json': return [json(), autocompletion()];
|
|
2453
|
+
case 'html': return [html(), autocompletion()];
|
|
2454
|
+
case 'plaintext':
|
|
2455
|
+
default: return [autocompletion()];
|
|
2456
|
+
}
|
|
2457
|
+
}
|
|
2458
|
+
updateEditorExtensions() {
|
|
2459
|
+
if (!this.$editor)
|
|
2460
|
+
return;
|
|
2461
|
+
this.$editor.dispatch({ effects: StateEffect.reconfigure.of(this.buildExtensions()) });
|
|
2462
|
+
}
|
|
2463
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CodeEditorComponent, deps: [{ token: ToastService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2464
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: CodeEditorComponent, isStandalone: true, selector: "sdc-code-editor", inputs: { sql: "sql", height: "height", width: "width", showCopy: "showCopy", customHeaderItems: "customHeaderItems", activeHeaderKey: "activeHeaderKey", readOnly: "readOnly", language: "language", schema: "schema" }, outputs: { headerSelect: "headerSelect", copied: "onCopy", languageChange: "languageChange", onDomainFilter: "onDomainFilter" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => CodeEditorComponent), multi: true }], viewQueries: [{ propertyName: "editorContainer", first: true, predicate: ["editorContainer"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"sdc-code-editor\">\n <div #editorContainer class=\"sdc-code-editor\" [ngStyle]=\"getStyleMap()\"></div>\n\n <div class=\"sdc-code-editor-header\" *ngIf=\"showCopy || customHeaderItems.length > 1\">\n <div class=\"header-left\" *ngIf=\"customHeaderItems.length > 1\">\n <div class=\"segmented\">\n <button\n *ngFor=\"let it of customHeaderItems\"\n type=\"button\"\n class=\"segmented-item\"\n [class.active]=\"it.key ? it.key === activeHeaderKey : it.value === language\"\n (click)=\"pickHeader(it)\"\n >\n {{ it.label }}\n </button>\n </div>\n </div>\n\n <div class=\"header-right\">\n <button type=\"button\" class=\"icon-btn\" *ngIf=\"showCopy\" (click)=\"copy()\" title=\"Copiar\">\n <i class=\"fas fa-copy\" aria-hidden=\"true\"></i>\n <span class=\"sr-only\">Copiar</span>\n </button>\n </div>\n </div>\n</div>\n", styles: [":host{display:block;min-width:0;min-height:0}.sdc-code-editor{border:var(--sql-editor-border);position:relative;isolation:isolate}.sdc-code-editor:hover .sdc-code-editor-header,.sdc-code-editor:focus-within .sdc-code-editor-header{opacity:1;transform:translateY(0);pointer-events:auto}.sdc-code-editor{display:block;width:100%}.sdc-code-editor,.sdc-code-editor .cm-editor,.sdc-code-editor .cm-scroller{position:relative;z-index:0;height:100%}.sdc-code-editor .cm-scroller{overflow:auto}.sdc-code-editor-header{position:absolute;top:8px;right:8px;left:auto;display:flex;align-items:center;gap:8px;z-index:10;opacity:0;transform:translateY(-4px);transition:opacity .18s ease,transform .18s ease;pointer-events:none}.sdc-code-editor-header .header-left,.sdc-code-editor-header .header-right{display:flex;align-items:center;gap:8px}.sdc-code-editor-header .segmented{display:flex;gap:2px;padding:2px;border-radius:999px;background:#ffffffeb;border:1px solid rgba(0,0,0,.08);box-shadow:0 2px 8px #00000014;backdrop-filter:saturate(180%) blur(6px);pointer-events:auto}.sdc-code-editor-header .segmented-item{appearance:none;border:0;background:transparent;padding:6px 10px;border-radius:999px;font:500 12px/1 system-ui,-apple-system,Segoe UI,Roboto,sans-serif;text-transform:uppercase;letter-spacing:.02em;cursor:pointer;-webkit-user-select:none;user-select:none;color:#111}.sdc-code-editor-header .segmented-item:hover{background:#1118270f}.sdc-code-editor-header .segmented-item.active{background:#eef2ff;box-shadow:inset 0 0 0 1px #c7d2fe}.sdc-code-editor-header .segmented-item:focus-visible{outline:none;box-shadow:inset 0 0 0 2px #6366f1}.sdc-code-editor-header .icon-btn{appearance:none;border:1px solid rgba(0,0,0,.08);width:32px;height:32px;border-radius:999px;display:grid;place-items:center;background:#ffffffeb;box-shadow:0 2px 8px #00000014;cursor:pointer;pointer-events:auto}.sdc-code-editor-header .icon-btn:hover{filter:brightness(.98)}.sdc-code-editor-header .icon-btn:active{transform:translateY(1px)}.sdc-code-editor-header .icon-btn:focus-visible{outline:none;box-shadow:0 0 0 2px #6366f1 inset}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
2465
|
+
}
|
|
2466
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CodeEditorComponent, decorators: [{
|
|
2467
|
+
type: Component,
|
|
2468
|
+
args: [{ selector: 'sdc-code-editor', standalone: true, imports: [CommonModule], providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => CodeEditorComponent), multi: true }], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div class=\"sdc-code-editor\">\n <div #editorContainer class=\"sdc-code-editor\" [ngStyle]=\"getStyleMap()\"></div>\n\n <div class=\"sdc-code-editor-header\" *ngIf=\"showCopy || customHeaderItems.length > 1\">\n <div class=\"header-left\" *ngIf=\"customHeaderItems.length > 1\">\n <div class=\"segmented\">\n <button\n *ngFor=\"let it of customHeaderItems\"\n type=\"button\"\n class=\"segmented-item\"\n [class.active]=\"it.key ? it.key === activeHeaderKey : it.value === language\"\n (click)=\"pickHeader(it)\"\n >\n {{ it.label }}\n </button>\n </div>\n </div>\n\n <div class=\"header-right\">\n <button type=\"button\" class=\"icon-btn\" *ngIf=\"showCopy\" (click)=\"copy()\" title=\"Copiar\">\n <i class=\"fas fa-copy\" aria-hidden=\"true\"></i>\n <span class=\"sr-only\">Copiar</span>\n </button>\n </div>\n </div>\n</div>\n", styles: [":host{display:block;min-width:0;min-height:0}.sdc-code-editor{border:var(--sql-editor-border);position:relative;isolation:isolate}.sdc-code-editor:hover .sdc-code-editor-header,.sdc-code-editor:focus-within .sdc-code-editor-header{opacity:1;transform:translateY(0);pointer-events:auto}.sdc-code-editor{display:block;width:100%}.sdc-code-editor,.sdc-code-editor .cm-editor,.sdc-code-editor .cm-scroller{position:relative;z-index:0;height:100%}.sdc-code-editor .cm-scroller{overflow:auto}.sdc-code-editor-header{position:absolute;top:8px;right:8px;left:auto;display:flex;align-items:center;gap:8px;z-index:10;opacity:0;transform:translateY(-4px);transition:opacity .18s ease,transform .18s ease;pointer-events:none}.sdc-code-editor-header .header-left,.sdc-code-editor-header .header-right{display:flex;align-items:center;gap:8px}.sdc-code-editor-header .segmented{display:flex;gap:2px;padding:2px;border-radius:999px;background:#ffffffeb;border:1px solid rgba(0,0,0,.08);box-shadow:0 2px 8px #00000014;backdrop-filter:saturate(180%) blur(6px);pointer-events:auto}.sdc-code-editor-header .segmented-item{appearance:none;border:0;background:transparent;padding:6px 10px;border-radius:999px;font:500 12px/1 system-ui,-apple-system,Segoe UI,Roboto,sans-serif;text-transform:uppercase;letter-spacing:.02em;cursor:pointer;-webkit-user-select:none;user-select:none;color:#111}.sdc-code-editor-header .segmented-item:hover{background:#1118270f}.sdc-code-editor-header .segmented-item.active{background:#eef2ff;box-shadow:inset 0 0 0 1px #c7d2fe}.sdc-code-editor-header .segmented-item:focus-visible{outline:none;box-shadow:inset 0 0 0 2px #6366f1}.sdc-code-editor-header .icon-btn{appearance:none;border:1px solid rgba(0,0,0,.08);width:32px;height:32px;border-radius:999px;display:grid;place-items:center;background:#ffffffeb;box-shadow:0 2px 8px #00000014;cursor:pointer;pointer-events:auto}.sdc-code-editor-header .icon-btn:hover{filter:brightness(.98)}.sdc-code-editor-header .icon-btn:active{transform:translateY(1px)}.sdc-code-editor-header .icon-btn:focus-visible{outline:none;box-shadow:0 0 0 2px #6366f1 inset}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}\n"] }]
|
|
2469
|
+
}], ctorParameters: () => [{ type: ToastService }], propDecorators: { sql: [{
|
|
2470
|
+
type: Input
|
|
2471
|
+
}], height: [{
|
|
2472
|
+
type: Input
|
|
2473
|
+
}], width: [{
|
|
2474
|
+
type: Input
|
|
2475
|
+
}], showCopy: [{
|
|
2476
|
+
type: Input
|
|
2477
|
+
}], customHeaderItems: [{
|
|
2478
|
+
type: Input
|
|
2479
|
+
}], activeHeaderKey: [{
|
|
2480
|
+
type: Input
|
|
2481
|
+
}], headerSelect: [{
|
|
2482
|
+
type: Output
|
|
2483
|
+
}], copied: [{
|
|
2484
|
+
type: Output,
|
|
2485
|
+
args: ['onCopy']
|
|
2486
|
+
}], readOnly: [{
|
|
2487
|
+
type: Input
|
|
2488
|
+
}], languageChange: [{
|
|
2489
|
+
type: Output
|
|
2490
|
+
}], language: [{
|
|
2491
|
+
type: Input
|
|
2492
|
+
}], schema: [{
|
|
2493
|
+
type: Input
|
|
2494
|
+
}], onDomainFilter: [{
|
|
2495
|
+
type: Output
|
|
2496
|
+
}], editorContainer: [{
|
|
2497
|
+
type: ViewChild,
|
|
2498
|
+
args: ['editorContainer', { static: true }]
|
|
2499
|
+
}] } });
|
|
2500
|
+
|
|
2501
|
+
class TextboxComponent extends InputsComponent {
|
|
2502
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TextboxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2503
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: TextboxComponent, isStandalone: true, selector: "sdc-textbox", providers: [
|
|
2504
|
+
{
|
|
2505
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2506
|
+
useExisting: forwardRef(() => TextboxComponent),
|
|
2507
|
+
multi: true,
|
|
2508
|
+
},
|
|
2509
|
+
], usesInheritance: true, ngImport: i0, template: "<div class=\"sdc-textbox\">\n <div *ngIf=\"label || infoIcon\" class=\"flex align-items-center\">\n <label *ngIf=\"label\" [for]=\"identity.id\">\n <span>{{ label }}</span>\n <span class=\"required-field\" *ngIf=\"required\"> •</span>\n </label>\n <i *ngIf=\"infoIcon\" class=\"fas fa-info-circle ml-3\" \n [pTooltip]=\"tooltipIcon\" \n tooltipZIndex=\"999999999999\"></i>\n </div>\n\n <input\n (input)=\"onInput($event)\"\n [disabled]=\"disabled\"\n [id]=\"identity.id\"\n [name]=\"identity.name\"\n [ngClass]=\"getInvalidClass()\"\n [ngStyle]=\"getInputStyle()\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n [value]=\"value\"\n pInputText\n type=\"text\"\n [attr.maxlength]=\"maxlength\"\n [pKeyFilter]=\"keyFilter\"\n />\n\n <small\n *ngIf=\"message\"\n [ngClass]=\"getInvalidMessageClass()\"\n >{{ message }}</small>\n</div>\n", styles: [".sdc-textbox label{display:inline-flex;align-items:center;margin-bottom:0;line-height:1;padding-top:7px;padding-bottom:7px}.sdc-textbox .required-field{margin-left:.25rem}.sdc-textbox ::ng-deep input{border-start-start-radius:var(--sdc-formfield-border-radius)!important;border-end-start-radius:var(--sdc-formfield-border-radius)!important;border-start-end-radius:var(--sdc-formfield-border-radius)!important;border-end-end-radius:var(--sdc-formfield-border-radius)!important;min-height:var(--sdc-formfield-default-height)!important;height:var(--sdc-formfield-default-height)!important;max-height:var(--sdc-formfield-default-height)!important;line-height:var(--sdc-formfield-default-line-height)!important}.sdc-textbox ::ng-deep input:disabled{background-color:var(--sdc-formfield-disabled-bg)!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i6.InputText, selector: "[pInputText]", inputs: ["variant", "fluid", "pSize"] }, { kind: "ngmodule", type: KeyFilterModule }, { kind: "directive", type: i3$3.KeyFilter, selector: "[pKeyFilter]", inputs: ["pValidateOnly", "pKeyFilter"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i4$2.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2510
|
+
}
|
|
2511
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TextboxComponent, decorators: [{
|
|
2512
|
+
type: Component,
|
|
2513
|
+
args: [{ selector: 'sdc-textbox', standalone: true, imports: [
|
|
2514
|
+
CommonModule,
|
|
2515
|
+
FormsModule,
|
|
2516
|
+
ReactiveFormsModule,
|
|
2517
|
+
InputTextModule,
|
|
2518
|
+
KeyFilterModule,
|
|
2519
|
+
TooltipModule,
|
|
2520
|
+
], providers: [
|
|
2521
|
+
{
|
|
2522
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2523
|
+
useExisting: forwardRef(() => TextboxComponent),
|
|
2524
|
+
multi: true,
|
|
2525
|
+
},
|
|
2526
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, template: "<div class=\"sdc-textbox\">\n <div *ngIf=\"label || infoIcon\" class=\"flex align-items-center\">\n <label *ngIf=\"label\" [for]=\"identity.id\">\n <span>{{ label }}</span>\n <span class=\"required-field\" *ngIf=\"required\"> •</span>\n </label>\n <i *ngIf=\"infoIcon\" class=\"fas fa-info-circle ml-3\" \n [pTooltip]=\"tooltipIcon\" \n tooltipZIndex=\"999999999999\"></i>\n </div>\n\n <input\n (input)=\"onInput($event)\"\n [disabled]=\"disabled\"\n [id]=\"identity.id\"\n [name]=\"identity.name\"\n [ngClass]=\"getInvalidClass()\"\n [ngStyle]=\"getInputStyle()\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n [value]=\"value\"\n pInputText\n type=\"text\"\n [attr.maxlength]=\"maxlength\"\n [pKeyFilter]=\"keyFilter\"\n />\n\n <small\n *ngIf=\"message\"\n [ngClass]=\"getInvalidMessageClass()\"\n >{{ message }}</small>\n</div>\n", styles: [".sdc-textbox label{display:inline-flex;align-items:center;margin-bottom:0;line-height:1;padding-top:7px;padding-bottom:7px}.sdc-textbox .required-field{margin-left:.25rem}.sdc-textbox ::ng-deep input{border-start-start-radius:var(--sdc-formfield-border-radius)!important;border-end-start-radius:var(--sdc-formfield-border-radius)!important;border-start-end-radius:var(--sdc-formfield-border-radius)!important;border-end-end-radius:var(--sdc-formfield-border-radius)!important;min-height:var(--sdc-formfield-default-height)!important;height:var(--sdc-formfield-default-height)!important;max-height:var(--sdc-formfield-default-height)!important;line-height:var(--sdc-formfield-default-line-height)!important}.sdc-textbox ::ng-deep input:disabled{background-color:var(--sdc-formfield-disabled-bg)!important}\n"] }]
|
|
2527
|
+
}] });
|
|
2528
|
+
|
|
2150
2529
|
class ModalcComponent {
|
|
2151
2530
|
cdr;
|
|
2152
2531
|
title = 'Modal Title';
|
|
@@ -2201,10 +2580,10 @@ class ModalcComponent {
|
|
|
2201
2580
|
unlockBodyScroll() {
|
|
2202
2581
|
document.body.style.overflow = '';
|
|
2203
2582
|
}
|
|
2204
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
2205
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.
|
|
2583
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ModalcComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
2584
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ModalcComponent, isStandalone: true, selector: "sdc-modalc", inputs: { title: "title", footerButtons: "footerButtons", maximizable: "maximizable", closeOnBackdrop: "closeOnBackdrop", visible: "visible" }, outputs: { visibleChange: "visibleChange" }, host: { listeners: { "document:keydown.escape": "onEsc($event)" } }, ngImport: i0, template: "<section\n *ngIf=\"_visible\"\n class=\"modal\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"modal-title\"\n (click)=\"onBackdropClick()\"\n>\n <div class=\"modal-container\" [class.fullscreen]=\"_fullscreen\" (click)=\"$event.stopPropagation()\">\n <header class=\"modal-header\">\n <h2 id=\"modal-title\">{{ title }}</h2>\n <div class=\"modal-actions\">\n <button *ngIf=\"maximizable\" class=\"expand-button\" type=\"button\" (click)=\"toggleFullscreen()\">\n <i class=\"fal fa-expand-arrows\"></i>\n </button>\n <button class=\"close-button\" type=\"button\" (click)=\"close()\">\n <i class=\"fal fa-times\"></i>\n </button>\n </div>\n </header>\n\n <main class=\"modal-body\">\n <ng-content></ng-content>\n </main>\n\n <footer class=\"modal-footer\">\n <div class=\"footer-actions\">\n <ng-content select=\"[footer]\"></ng-content>\n <p-button *ngFor=\"let btn of footerButtons\"\n (onClick)=\"btn?.action?.()\"\n [icon]=\"btn.icon\"\n [id]=\"btn.id\"\n [label]=\"btn.label\"\n [severity]=\"btn.severity ?? 'primary'\">\n </p-button>\n </div>\n </footer>\n </div>\n</section>\n", styles: [".modal{position:fixed;top:0;left:0;width:100vw;height:100vh;display:flex;align-items:center;justify-content:center;background:#0006;z-index:9999}.modal .modal-container{display:flex;flex-direction:column;max-width:96vw;max-height:90vh;width:100%;box-sizing:border-box;overflow:hidden;border-radius:8px;box-shadow:0 4px 32px #0000002e;background:#fff;transition:all .3s}.modal .modal-container.fullscreen{max-width:100vw!important;max-height:100vh!important;width:100vw!important;height:100vh!important;border-radius:0!important;box-shadow:none!important}.modal .modal-header{display:flex;align-items:center;justify-content:space-between;background:#fff;padding:1.5rem 2rem 1rem;border-top-left-radius:8px;border-top-right-radius:8px;box-shadow:0 2px 8px #0000000a}.modal .modal-header h2{margin:0;font-size:1.5rem;font-weight:600;color:#222;flex:1 1 auto}.modal .modal-header .modal-actions{display:flex;align-items:center;gap:.5rem}.modal .modal-header .expand-button,.modal .modal-header .close-button{width:2.5rem;height:2.5rem;background:none;border:none;padding:0;margin:0;display:flex;align-items:center;justify-content:center;font-size:1.5rem;box-sizing:border-box;cursor:pointer;color:#888;transition:color .2s}.modal .modal-header .expand-button i{font-size:1rem}.modal .modal-header .close-button{font-size:1.5rem}.modal .modal-header .expand-button:hover{color:#1976d2}.modal .modal-header .close-button:hover{color:#e53935}.modal .modal-body{background:#fff;padding:2rem;min-width:320px;min-height:80px;font-size:1rem;color:#333;overflow-y:auto;flex:1 1 auto}.modal .modal-footer{background:#fff;padding:1rem 2rem;border-bottom-left-radius:8px;border-bottom-right-radius:8px;box-shadow:0 -2px 8px #0000000a}.modal .modal-footer .footer-actions{display:flex;flex-direction:row-reverse;flex-wrap:nowrap;gap:1rem;justify-content:flex-start;align-items:center}\n"], dependencies: [{ kind: "ngmodule", type: ButtonModule$1 }, { kind: "component", type: i1$4.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "fluid", "buttonProps"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2206
2585
|
}
|
|
2207
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
2586
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ModalcComponent, decorators: [{
|
|
2208
2587
|
type: Component,
|
|
2209
2588
|
args: [{ selector: 'sdc-modalc', standalone: true, imports: [ButtonModule$1, CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, template: "<section\n *ngIf=\"_visible\"\n class=\"modal\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"modal-title\"\n (click)=\"onBackdropClick()\"\n>\n <div class=\"modal-container\" [class.fullscreen]=\"_fullscreen\" (click)=\"$event.stopPropagation()\">\n <header class=\"modal-header\">\n <h2 id=\"modal-title\">{{ title }}</h2>\n <div class=\"modal-actions\">\n <button *ngIf=\"maximizable\" class=\"expand-button\" type=\"button\" (click)=\"toggleFullscreen()\">\n <i class=\"fal fa-expand-arrows\"></i>\n </button>\n <button class=\"close-button\" type=\"button\" (click)=\"close()\">\n <i class=\"fal fa-times\"></i>\n </button>\n </div>\n </header>\n\n <main class=\"modal-body\">\n <ng-content></ng-content>\n </main>\n\n <footer class=\"modal-footer\">\n <div class=\"footer-actions\">\n <ng-content select=\"[footer]\"></ng-content>\n <p-button *ngFor=\"let btn of footerButtons\"\n (onClick)=\"btn?.action?.()\"\n [icon]=\"btn.icon\"\n [id]=\"btn.id\"\n [label]=\"btn.label\"\n [severity]=\"btn.severity ?? 'primary'\">\n </p-button>\n </div>\n </footer>\n </div>\n</section>\n", styles: [".modal{position:fixed;top:0;left:0;width:100vw;height:100vh;display:flex;align-items:center;justify-content:center;background:#0006;z-index:9999}.modal .modal-container{display:flex;flex-direction:column;max-width:96vw;max-height:90vh;width:100%;box-sizing:border-box;overflow:hidden;border-radius:8px;box-shadow:0 4px 32px #0000002e;background:#fff;transition:all .3s}.modal .modal-container.fullscreen{max-width:100vw!important;max-height:100vh!important;width:100vw!important;height:100vh!important;border-radius:0!important;box-shadow:none!important}.modal .modal-header{display:flex;align-items:center;justify-content:space-between;background:#fff;padding:1.5rem 2rem 1rem;border-top-left-radius:8px;border-top-right-radius:8px;box-shadow:0 2px 8px #0000000a}.modal .modal-header h2{margin:0;font-size:1.5rem;font-weight:600;color:#222;flex:1 1 auto}.modal .modal-header .modal-actions{display:flex;align-items:center;gap:.5rem}.modal .modal-header .expand-button,.modal .modal-header .close-button{width:2.5rem;height:2.5rem;background:none;border:none;padding:0;margin:0;display:flex;align-items:center;justify-content:center;font-size:1.5rem;box-sizing:border-box;cursor:pointer;color:#888;transition:color .2s}.modal .modal-header .expand-button i{font-size:1rem}.modal .modal-header .close-button{font-size:1.5rem}.modal .modal-header .expand-button:hover{color:#1976d2}.modal .modal-header .close-button:hover{color:#e53935}.modal .modal-body{background:#fff;padding:2rem;min-width:320px;min-height:80px;font-size:1rem;color:#333;overflow-y:auto;flex:1 1 auto}.modal .modal-footer{background:#fff;padding:1rem 2rem;border-bottom-left-radius:8px;border-bottom-right-radius:8px;box-shadow:0 -2px 8px #0000000a}.modal .modal-footer .footer-actions{display:flex;flex-direction:row-reverse;flex-wrap:nowrap;gap:1rem;justify-content:flex-start;align-items:center}\n"] }]
|
|
2210
2589
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { title: [{
|
|
@@ -2265,16 +2644,16 @@ class CheckboxComponent {
|
|
|
2265
2644
|
this.checkedChange.emit(this.checked);
|
|
2266
2645
|
this.onTouched();
|
|
2267
2646
|
}
|
|
2268
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
2269
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.
|
|
2647
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2648
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: CheckboxComponent, isStandalone: true, selector: "sdc-checkbox", inputs: { label: "label", disabled: "disabled", commonCheckbox: "commonCheckbox", labelPosition: "labelPosition", size: "size", checked: "checked" }, outputs: { checkedChange: "checkedChange" }, providers: [
|
|
2270
2649
|
{
|
|
2271
2650
|
provide: NG_VALUE_ACCESSOR,
|
|
2272
2651
|
useExisting: forwardRef(() => CheckboxComponent),
|
|
2273
2652
|
multi: true
|
|
2274
2653
|
}
|
|
2275
|
-
], ngImport: i0, template: "<!-- Nativo -->\n<label\n *ngIf=\"commonCheckbox\"\n class=\"sdc-checkbox sdc-checkbox--native\"\n [class.sdc-checkbox--disabled]=\"disabled\"\n [class.sdc-checkbox--label-left]=\"labelPosition === 'left'\"\n [class.sdc-checkbox--small]=\"size === 'small'\"\n [class.sdc-checkbox--medium]=\"size === 'medium'\"\n [class.sdc-checkbox--large]=\"size === 'large'\"\n [attr.aria-disabled]=\"disabled\"\n>\n <input\n class=\"sdc-checkbox__input-native\"\n type=\"checkbox\"\n [id]=\"inputId\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n (change)=\"onInputChange($event)\"\n [attr.aria-checked]=\"checked\"\n [attr.role]=\"'checkbox'\"\n />\n <span *ngIf=\"label\" class=\"sdc-checkbox__label\">{{ label }}</span>\n</label>\n\n<!-- Custom -->\n<label\n *ngIf=\"!commonCheckbox\"\n class=\"sdc-checkbox\"\n [class.sdc-checkbox--disabled]=\"disabled\"\n [class.sdc-checkbox--label-left]=\"labelPosition === 'left'\"\n [class.sdc-checkbox--small]=\"size === 'small'\"\n [class.sdc-checkbox--medium]=\"size === 'medium'\"\n [class.sdc-checkbox--large]=\"size === 'large'\"\n [attr.aria-disabled]=\"disabled\"\n>\n <input\n class=\"sdc-checkbox__input\"\n type=\"checkbox\"\n [id]=\"inputId\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n (change)=\"onInputChange($event)\"\n [attr.aria-checked]=\"checked\"\n [attr.role]=\"'checkbox'\"\n />\n <span class=\"sdc-checkbox__box\" aria-hidden=\"true\"></span>\n <span *ngIf=\"label\" class=\"sdc-checkbox__label\">{{ label }}</span>\n</label>\n", styles: [":host{display:inline-flex}.sdc-checkbox{display:inline-flex;align-items:center;gap:8px;cursor:pointer;-webkit-user-select:none;user-select:none}.sdc-checkbox--disabled{cursor:not-allowed;opacity:.6}.sdc-checkbox--label-left{flex-direction:row-reverse}.sdc-checkbox--native .sdc-checkbox__input-native{width:var(--sdc-chk-size);height:var(--sdc-chk-size)}.sdc-checkbox--small{--sdc-chk-size: 14px}.sdc-checkbox--medium{--sdc-chk-size: 18px}.sdc-checkbox--large{--sdc-chk-size: 24px}.sdc-checkbox__input{position:absolute;opacity:0;width:0;height:0}.sdc-checkbox__box{width:var(--sdc-chk-size);height:var(--sdc-chk-size);border:1px solid var(--sdc-chk-border);border-radius:var(--sdc-chk-radius);display:inline-block;position:relative;transition:all .15s ease-in-out;flex:0 0 auto}.sdc-checkbox__input:focus-visible+.sdc-checkbox__box{outline:2px solid var(--sdc-chk-focus);outline-offset:2px}.sdc-checkbox__input:checked+.sdc-checkbox__box{background-color:var(--sdc-chk-color);border-color:var(--sdc-chk-color)}.sdc-checkbox__input:checked+.sdc-checkbox__box:after{content:\"\";position:absolute;left:calc(var(--sdc-chk-size) * .22);top:calc(var(--sdc-chk-size) * .02);width:calc(var(--sdc-chk-size) * .3);height:calc(var(--sdc-chk-size) * .6);border:solid #fff;border-width:0 max(2px,var(--sdc-chk-size) * .1) max(2px,var(--sdc-chk-size) * .1) 0;transform:rotate(45deg);box-sizing:border-box}.sdc-checkbox__label{font-size:14px;line-height:1;align-self:center}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$
|
|
2654
|
+
], ngImport: i0, template: "<!-- Nativo -->\n<label\n *ngIf=\"commonCheckbox\"\n class=\"sdc-checkbox sdc-checkbox--native\"\n [class.sdc-checkbox--disabled]=\"disabled\"\n [class.sdc-checkbox--label-left]=\"labelPosition === 'left'\"\n [class.sdc-checkbox--small]=\"size === 'small'\"\n [class.sdc-checkbox--medium]=\"size === 'medium'\"\n [class.sdc-checkbox--large]=\"size === 'large'\"\n [attr.aria-disabled]=\"disabled\"\n>\n <input\n class=\"sdc-checkbox__input-native\"\n type=\"checkbox\"\n [id]=\"inputId\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n (change)=\"onInputChange($event)\"\n [attr.aria-checked]=\"checked\"\n [attr.role]=\"'checkbox'\"\n />\n <span *ngIf=\"label\" class=\"sdc-checkbox__label\">{{ label }}</span>\n</label>\n\n<!-- Custom -->\n<label\n *ngIf=\"!commonCheckbox\"\n class=\"sdc-checkbox\"\n [class.sdc-checkbox--disabled]=\"disabled\"\n [class.sdc-checkbox--label-left]=\"labelPosition === 'left'\"\n [class.sdc-checkbox--small]=\"size === 'small'\"\n [class.sdc-checkbox--medium]=\"size === 'medium'\"\n [class.sdc-checkbox--large]=\"size === 'large'\"\n [attr.aria-disabled]=\"disabled\"\n>\n <input\n class=\"sdc-checkbox__input\"\n type=\"checkbox\"\n [id]=\"inputId\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n (change)=\"onInputChange($event)\"\n [attr.aria-checked]=\"checked\"\n [attr.role]=\"'checkbox'\"\n />\n <span class=\"sdc-checkbox__box\" aria-hidden=\"true\"></span>\n <span *ngIf=\"label\" class=\"sdc-checkbox__label\">{{ label }}</span>\n</label>\n", styles: [":host{display:inline-flex}.sdc-checkbox{display:inline-flex;align-items:center;gap:8px;cursor:pointer;-webkit-user-select:none;user-select:none}.sdc-checkbox--disabled{cursor:not-allowed;opacity:.6}.sdc-checkbox--label-left{flex-direction:row-reverse}.sdc-checkbox--native .sdc-checkbox__input-native{width:var(--sdc-chk-size);height:var(--sdc-chk-size)}.sdc-checkbox--small{--sdc-chk-size: 14px}.sdc-checkbox--medium{--sdc-chk-size: 18px}.sdc-checkbox--large{--sdc-chk-size: 24px}.sdc-checkbox__input{position:absolute;opacity:0;width:0;height:0}.sdc-checkbox__box{width:var(--sdc-chk-size);height:var(--sdc-chk-size);border:1px solid var(--sdc-chk-border);border-radius:var(--sdc-chk-radius);display:inline-block;position:relative;transition:all .15s ease-in-out;flex:0 0 auto}.sdc-checkbox__input:focus-visible+.sdc-checkbox__box{outline:2px solid var(--sdc-chk-focus);outline-offset:2px}.sdc-checkbox__input:checked+.sdc-checkbox__box{background-color:var(--sdc-chk-color);border-color:var(--sdc-chk-color)}.sdc-checkbox__input:checked+.sdc-checkbox__box:after{content:\"\";position:absolute;left:calc(var(--sdc-chk-size) * .22);top:calc(var(--sdc-chk-size) * .02);width:calc(var(--sdc-chk-size) * .3);height:calc(var(--sdc-chk-size) * .6);border:solid #fff;border-width:0 max(2px,var(--sdc-chk-size) * .1) max(2px,var(--sdc-chk-size) * .1) 0;transform:rotate(45deg);box-sizing:border-box}.sdc-checkbox__label{font-size:14px;line-height:1;align-self:center}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2276
2655
|
}
|
|
2277
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
2656
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CheckboxComponent, decorators: [{
|
|
2278
2657
|
type: Component,
|
|
2279
2658
|
args: [{ standalone: true, selector: "sdc-checkbox", imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, providers: [
|
|
2280
2659
|
{
|
|
@@ -2308,12 +2687,12 @@ class CardComponent {
|
|
|
2308
2687
|
return '';
|
|
2309
2688
|
return text.length > this.options.descriptionMaxLength ? text.slice(0, this.options.descriptionMaxLength).trimEnd() + '...' : text;
|
|
2310
2689
|
}
|
|
2311
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
2312
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.
|
|
2690
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2691
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: CardComponent, isStandalone: true, selector: "sdc-card", inputs: { data: "data", options: "options" }, outputs: { cardAction: "cardAction" }, ngImport: i0, template: "<div class=\"sdc-card dp-card\">\n <div class=\"sdc-card__header\">\n <div class=\"sdc-card__icon\" [style.background]=\"options?.backgroundIcon\" [style.color]=\"options?.iconColor\">\n <i [class]=\"options?.icon\"></i>\n </div>\n <div class=\"flex flex-column ml-3\">\n <div class=\"sdc-card__title\">\n {{ data.name }}\n </div>\n\n <div class=\"sdc-card__subtitle\">\n <span>{{ data.category }}</span>\n </div>\n </div>\n </div>\n\n <div class=\"sdc-card__body\">\n <div class=\"sdc-card__content\">\n <p class=\"sdc-card__description\">\n {{ getShortDescription(data.description) }}\n </p>\n </div>\n </div>\n\n <div class=\"sdc-card__footer flex justify-content-center\">\n <sdc-button\n width=\"100%\"\n (onClick)=\"cardAction.emit(data)\"\n [priority]=\"options?.buttonPriority!\"\n [label]=\"options?.buttonLabel! | translate\"\n >\n </sdc-button>\n </div>\n</div>\n", styles: [":host{display:block}.sdc-card{width:100%;border-radius:var(--sdc-formfield-border-radius);overflow:hidden;display:flex;padding:8px;flex-direction:column;min-height:19rem}.sdc-card__header{display:flex;align-items:center;justify-content:start;gap:.75rem;padding:.75rem 1rem}.sdc-card__icon{min-width:2.9rem;min-height:2.9rem;border-radius:50%;display:inline-flex;align-items:center;justify-content:center}.sdc-card__body{padding:8px}.sdc-card__title{font-size:1.4rem;font-weight:600;width:100%;white-space:wrap;overflow:hidden;text-overflow:ellipsis}.sdc-card__subtitle{margin-top:.25rem;font-weight:700;font-size:.775rem;color:var(--sdc-muted, #475569);display:flex;justify-content:space-between}.sdc-card__content{margin-top:.5rem}.sdc-card__description{text-align:justify;overflow:hidden}.sdc-card__tags{margin-top:.5rem;display:flex;gap:.5rem;flex-wrap:wrap}.sdc-card__footer{margin-top:auto;padding:.75rem 1rem;display:flex;align-items:center;justify-content:center;gap:.5rem;min-height:3rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: CheckboxModule }, { kind: "ngmodule", type: AvatarGroupModule }, { kind: "component", type: ButtonComponent, selector: "sdc-button", inputs: ["disabled", "width", "icon", "id", "label", "priority", "size", "type"], outputs: ["onClick"] }, { kind: "ngmodule", type: CardModule }, { kind: "ngmodule", type: TagModule }, { kind: "ngmodule", type: AvatarModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$5.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2313
2692
|
}
|
|
2314
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
2693
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CardComponent, decorators: [{
|
|
2315
2694
|
type: Component,
|
|
2316
|
-
args: [{ selector: '
|
|
2695
|
+
args: [{ selector: 'sdc-card', imports: [CommonModule, CheckboxModule, AvatarGroupModule, ButtonComponent, CardModule, TagModule, AvatarModule, TranslateModule], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, template: "<div class=\"sdc-card dp-card\">\n <div class=\"sdc-card__header\">\n <div class=\"sdc-card__icon\" [style.background]=\"options?.backgroundIcon\" [style.color]=\"options?.iconColor\">\n <i [class]=\"options?.icon\"></i>\n </div>\n <div class=\"flex flex-column ml-3\">\n <div class=\"sdc-card__title\">\n {{ data.name }}\n </div>\n\n <div class=\"sdc-card__subtitle\">\n <span>{{ data.category }}</span>\n </div>\n </div>\n </div>\n\n <div class=\"sdc-card__body\">\n <div class=\"sdc-card__content\">\n <p class=\"sdc-card__description\">\n {{ getShortDescription(data.description) }}\n </p>\n </div>\n </div>\n\n <div class=\"sdc-card__footer flex justify-content-center\">\n <sdc-button\n width=\"100%\"\n (onClick)=\"cardAction.emit(data)\"\n [priority]=\"options?.buttonPriority!\"\n [label]=\"options?.buttonLabel! | translate\"\n >\n </sdc-button>\n </div>\n</div>\n", styles: [":host{display:block}.sdc-card{width:100%;border-radius:var(--sdc-formfield-border-radius);overflow:hidden;display:flex;padding:8px;flex-direction:column;min-height:19rem}.sdc-card__header{display:flex;align-items:center;justify-content:start;gap:.75rem;padding:.75rem 1rem}.sdc-card__icon{min-width:2.9rem;min-height:2.9rem;border-radius:50%;display:inline-flex;align-items:center;justify-content:center}.sdc-card__body{padding:8px}.sdc-card__title{font-size:1.4rem;font-weight:600;width:100%;white-space:wrap;overflow:hidden;text-overflow:ellipsis}.sdc-card__subtitle{margin-top:.25rem;font-weight:700;font-size:.775rem;color:var(--sdc-muted, #475569);display:flex;justify-content:space-between}.sdc-card__content{margin-top:.5rem}.sdc-card__description{text-align:justify;overflow:hidden}.sdc-card__tags{margin-top:.5rem;display:flex;gap:.5rem;flex-wrap:wrap}.sdc-card__footer{margin-top:auto;padding:.75rem 1rem;display:flex;align-items:center;justify-content:center;gap:.5rem;min-height:3rem}\n"] }]
|
|
2317
2696
|
}], propDecorators: { data: [{
|
|
2318
2697
|
type: Input
|
|
2319
2698
|
}], options: [{
|
|
@@ -2327,13 +2706,13 @@ class CardListComponent {
|
|
|
2327
2706
|
loading = false;
|
|
2328
2707
|
config = DEFAULT_CARD_LIST_OPTIONS;
|
|
2329
2708
|
cardButtonClick = new EventEmitter();
|
|
2330
|
-
isMobile = isMobile
|
|
2331
|
-
isTablet = isTablet
|
|
2709
|
+
isMobile = isMobile();
|
|
2710
|
+
isTablet = isTablet();
|
|
2332
2711
|
options = signal(DEFAULT_CARD_LIST_OPTIONS);
|
|
2333
2712
|
totalRecordsLabel = computed(() => this.options().totalRecordsLabel ?? '');
|
|
2334
2713
|
emptyTitle = computed(() => this.options().empty?.title ?? '');
|
|
2335
2714
|
emptyText = computed(() => this.options().empty?.message ?? '');
|
|
2336
|
-
page = signal({ first: 0, rows:
|
|
2715
|
+
page = signal({ first: 0, rows: 5 });
|
|
2337
2716
|
isFirstPage = computed(() => this.page().first === 0);
|
|
2338
2717
|
isLastPage = computed(() => this.page().first + this.page().rows >= this.filtered().length);
|
|
2339
2718
|
raw = signal([]);
|
|
@@ -2427,12 +2806,12 @@ class CardListComponent {
|
|
|
2427
2806
|
return JSON.stringify(obj ?? {});
|
|
2428
2807
|
}
|
|
2429
2808
|
}
|
|
2430
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
2431
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.
|
|
2809
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CardListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2810
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: CardListComponent, isStandalone: true, selector: "sdc-card-list", inputs: { data: "data", loading: "loading", config: "config" }, outputs: { cardButtonClick: "cardButtonClick" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"sdc-card-list\">\n <div [class.my-3]=\"isMobile\">\n @if (loading) {\n <s-loading-state [loading]=\"loading\" [blockWindow]=\"false\" class=\"sdc-cardlist-loading-state\"></s-loading-state>\n } @else { @if (pagedData().length) {\n <div class=\"relative\">\n @if (options().enableSideButtons) {\n <sdc-button\n width=\"3rem\"\n *ngIf=\"!isMobile\"\n (click)=\"prevPage()\"\n [disabled]=\"isFirstPage()\"\n class=\"absolute left-0 top-50 transform -translate-y-50 z-1\"\n type=\"button\"\n icon=\"fas fa-arrow-left\"\n ></sdc-button>\n }\n\n <div class=\"grid flex-1\" [class.mx-5]=\"!isMobile && options().enableSideButtons\">\n @for (card of pagedData(); track card.name) {\n <div class=\"col-12 md:col-6 lg:col-4 xl:col-5th\">\n <sdc-card (cardAction)=\"onCardClick($event)\" [options]=\"options().customCard\" [data]=\"card\"></sdc-card>\n </div>\n }\n </div>\n\n @if (options().enableSideButtons) {\n <sdc-button\n width=\"3rem\"\n *ngIf=\"!isMobile\"\n [disabled]=\"isLastPage()\"\n (click)=\"nextPage()\"\n class=\"absolute right-0 top-50 transform -translate-y-50 z-1\"\n type=\"button\"\n icon=\"fas fa-arrow-right\"\n ></sdc-button>\n }\n </div>\n } @else {\n <s-empty-state\n id=\"cardlist-empty\"\n iconClass=\"fa fa-inbox\"\n [title]=\"emptyTitle() | translate\"\n [description]=\"emptyText() | translate\"\n class=\"sdc-cardlist-empty-state\"\n ></s-empty-state>\n } @if (options().enablePagination) {\n <div class=\"flex justify-content-between sdc-paginator pt-3\" [class.justify-content-center]=\"isMobile || isTablet\">\n <sdc-paginator\n style=\"min-width: 100%\"\n (pageChange)=\"onChangePaginator($event)\"\n [first]=\"page().first\"\n [rows]=\"page().rows\"\n [rowsPerPageOptions]=\"[5, 10, 20]\"\n [totalRecords]=\"filtered().length\"\n [totalRecordsLabel]=\"totalRecordsLabel() | translate\"\n [isMobile]=\"isMobile\"\n >\n </sdc-paginator>\n </div>\n } }\n </div>\n</div>\n", styles: [".sdc-card-list{min-height:25rem;min-width:17rem;align-content:center}@media screen and (min-width: 1200px){.xl\\:col-5th{flex:0 0 20%;max-width:20%;padding:.5rem}}@media screen and (min-width: 1400px){.\\32xl\\:col-5th{flex:0 0 20%;max-width:20%}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: CardComponent, selector: "sdc-card", inputs: ["data", "options"], outputs: ["cardAction"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$5.TranslatePipe, name: "translate" }, { kind: "component", type: ButtonComponent, selector: "sdc-button", inputs: ["disabled", "width", "icon", "id", "label", "priority", "size", "type"], outputs: ["onClick"] }, { kind: "component", type: PaginatorComponent, selector: "sdc-paginator", inputs: ["first", "rows", "totalRecords", "rowsPerPageOptions", "isMobile", "totalRecordsLabel"], outputs: ["pageChange"] }, { kind: "ngmodule", type: EmptyStateModule }, { kind: "component", type: i3$2.EmptyStateComponent, selector: "s-empty-state", inputs: ["id", "title", "iconClass", "description", "showPrimaryAction", "showSecondaryAction", "primaryActionLabel", "secondaryActionLabel", "primaryModel"], outputs: ["primaryAction", "secondaryAction"] }, { kind: "ngmodule", type: LoadingStateModule }, { kind: "component", type: i2$2.LoadingStateComponent, selector: "s-loading-state", inputs: ["indicator", "id", "blockWindow", "loading"] }] });
|
|
2432
2811
|
}
|
|
2433
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
2812
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CardListComponent, decorators: [{
|
|
2434
2813
|
type: Component,
|
|
2435
|
-
args: [{ selector: 'sdc-card-list', standalone: true, imports: [CommonModule, CardComponent, TranslateModule, ButtonComponent, PaginatorComponent, EmptyStateModule, LoadingStateModule], encapsulation: ViewEncapsulation.Emulated, template: "<div class=\"sdc-card-list
|
|
2814
|
+
args: [{ selector: 'sdc-card-list', standalone: true, imports: [CommonModule, CardComponent, TranslateModule, ButtonComponent, PaginatorComponent, EmptyStateModule, LoadingStateModule], encapsulation: ViewEncapsulation.Emulated, template: "<div class=\"sdc-card-list\">\n <div [class.my-3]=\"isMobile\">\n @if (loading) {\n <s-loading-state [loading]=\"loading\" [blockWindow]=\"false\" class=\"sdc-cardlist-loading-state\"></s-loading-state>\n } @else { @if (pagedData().length) {\n <div class=\"relative\">\n @if (options().enableSideButtons) {\n <sdc-button\n width=\"3rem\"\n *ngIf=\"!isMobile\"\n (click)=\"prevPage()\"\n [disabled]=\"isFirstPage()\"\n class=\"absolute left-0 top-50 transform -translate-y-50 z-1\"\n type=\"button\"\n icon=\"fas fa-arrow-left\"\n ></sdc-button>\n }\n\n <div class=\"grid flex-1\" [class.mx-5]=\"!isMobile && options().enableSideButtons\">\n @for (card of pagedData(); track card.name) {\n <div class=\"col-12 md:col-6 lg:col-4 xl:col-5th\">\n <sdc-card (cardAction)=\"onCardClick($event)\" [options]=\"options().customCard\" [data]=\"card\"></sdc-card>\n </div>\n }\n </div>\n\n @if (options().enableSideButtons) {\n <sdc-button\n width=\"3rem\"\n *ngIf=\"!isMobile\"\n [disabled]=\"isLastPage()\"\n (click)=\"nextPage()\"\n class=\"absolute right-0 top-50 transform -translate-y-50 z-1\"\n type=\"button\"\n icon=\"fas fa-arrow-right\"\n ></sdc-button>\n }\n </div>\n } @else {\n <s-empty-state\n id=\"cardlist-empty\"\n iconClass=\"fa fa-inbox\"\n [title]=\"emptyTitle() | translate\"\n [description]=\"emptyText() | translate\"\n class=\"sdc-cardlist-empty-state\"\n ></s-empty-state>\n } @if (options().enablePagination) {\n <div class=\"flex justify-content-between sdc-paginator pt-3\" [class.justify-content-center]=\"isMobile || isTablet\">\n <sdc-paginator\n style=\"min-width: 100%\"\n (pageChange)=\"onChangePaginator($event)\"\n [first]=\"page().first\"\n [rows]=\"page().rows\"\n [rowsPerPageOptions]=\"[5, 10, 20]\"\n [totalRecords]=\"filtered().length\"\n [totalRecordsLabel]=\"totalRecordsLabel() | translate\"\n [isMobile]=\"isMobile\"\n >\n </sdc-paginator>\n </div>\n } }\n </div>\n</div>\n", styles: [".sdc-card-list{min-height:25rem;min-width:17rem;align-content:center}@media screen and (min-width: 1200px){.xl\\:col-5th{flex:0 0 20%;max-width:20%;padding:.5rem}}@media screen and (min-width: 1400px){.\\32xl\\:col-5th{flex:0 0 20%;max-width:20%}}\n"] }]
|
|
2436
2815
|
}], propDecorators: { data: [{
|
|
2437
2816
|
type: Input
|
|
2438
2817
|
}], loading: [{
|
|
@@ -2443,50 +2822,164 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
2443
2822
|
type: Output
|
|
2444
2823
|
}] } });
|
|
2445
2824
|
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2825
|
+
class SelectButtonComponent {
|
|
2826
|
+
cdr;
|
|
2827
|
+
items = [];
|
|
2828
|
+
multiple = false;
|
|
2829
|
+
compareWith = (a, b) => ("value" in a && "value" in b ? a.value === b.value : this._deepEqual(a, b));
|
|
2830
|
+
itemSelected = new EventEmitter();
|
|
2831
|
+
itemClicked = new EventEmitter();
|
|
2832
|
+
disabled = false;
|
|
2833
|
+
activeItems = new Set();
|
|
2834
|
+
onChange;
|
|
2835
|
+
onTouched;
|
|
2836
|
+
constructor(cdr) {
|
|
2837
|
+
this.cdr = cdr;
|
|
2838
|
+
}
|
|
2839
|
+
// CVA
|
|
2840
|
+
writeValue(value) {
|
|
2841
|
+
this.activeItems.clear();
|
|
2842
|
+
if (value != null) {
|
|
2843
|
+
const ensureMatch = (v) => {
|
|
2844
|
+
for (const it of this.items) {
|
|
2845
|
+
if (this.compareWith(v, it)) {
|
|
2846
|
+
this.activeItems.add(it);
|
|
2847
|
+
break;
|
|
2848
|
+
}
|
|
2849
|
+
}
|
|
2850
|
+
};
|
|
2851
|
+
Array.isArray(value) ? value.forEach(ensureMatch) : ensureMatch(value);
|
|
2852
|
+
}
|
|
2853
|
+
this.cdr.markForCheck();
|
|
2854
|
+
}
|
|
2855
|
+
registerOnChange(fn) { this.onChange = fn; }
|
|
2856
|
+
registerOnTouched(fn) { this.onTouched = fn; }
|
|
2857
|
+
setDisabledState(disabled) { this.disabled = disabled; this.cdr.markForCheck(); }
|
|
2858
|
+
// UI
|
|
2859
|
+
onItemSelect(item) {
|
|
2860
|
+
if (this.disabled || item.disabled)
|
|
2861
|
+
return;
|
|
2862
|
+
this.itemClicked.emit(item);
|
|
2863
|
+
if (this.multiple) {
|
|
2864
|
+
this.isActive(item) ? this._deleteByCompare(item) : this._addByRef(item);
|
|
2865
|
+
}
|
|
2866
|
+
else {
|
|
2867
|
+
this.activeItems.clear();
|
|
2868
|
+
this._addByRef(item);
|
|
2869
|
+
}
|
|
2870
|
+
const arr = this._asArray();
|
|
2871
|
+
this.itemSelected.emit(arr);
|
|
2872
|
+
this.onChange?.(arr);
|
|
2873
|
+
this.onTouched?.();
|
|
2874
|
+
this.cdr.markForCheck();
|
|
2875
|
+
}
|
|
2876
|
+
isActive(item) {
|
|
2877
|
+
for (const it of this.activeItems)
|
|
2878
|
+
if (this.compareWith(item, it))
|
|
2879
|
+
return true;
|
|
2880
|
+
return false;
|
|
2881
|
+
}
|
|
2882
|
+
trackByIndex = (i) => i;
|
|
2883
|
+
// helpers
|
|
2884
|
+
_addByRef(item) { this.activeItems.add(item); }
|
|
2885
|
+
_deleteByCompare(item) {
|
|
2886
|
+
for (const it of Array.from(this.activeItems))
|
|
2887
|
+
if (this.compareWith(item, it)) {
|
|
2888
|
+
this.activeItems.delete(it);
|
|
2889
|
+
break;
|
|
2890
|
+
}
|
|
2891
|
+
}
|
|
2892
|
+
_asArray() { return [...this.activeItems]; }
|
|
2893
|
+
_deepEqual(a, b) {
|
|
2894
|
+
if (a === b)
|
|
2895
|
+
return true;
|
|
2896
|
+
if (a == null || b == null || typeof a !== "object" || typeof b !== "object")
|
|
2897
|
+
return false;
|
|
2898
|
+
if (Array.isArray(a) !== Array.isArray(b))
|
|
2899
|
+
return false;
|
|
2900
|
+
const ka = Object.keys(a), kb = Object.keys(b);
|
|
2901
|
+
if (ka.length !== kb.length)
|
|
2902
|
+
return false;
|
|
2903
|
+
for (const k of ka)
|
|
2904
|
+
if (!kb.includes(k) || !this._deepEqual(a[k], b[k]))
|
|
2905
|
+
return false;
|
|
2906
|
+
return true;
|
|
2907
|
+
}
|
|
2908
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SelectButtonComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
2909
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: SelectButtonComponent, isStandalone: true, selector: "sdc-select-button", inputs: { items: "items", multiple: "multiple", compareWith: "compareWith" }, outputs: { itemSelected: "itemSelected", itemClicked: "itemClicked" }, providers: [
|
|
2910
|
+
{
|
|
2911
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2912
|
+
useExisting: forwardRef(() => SelectButtonComponent),
|
|
2913
|
+
multi: true,
|
|
2914
|
+
},
|
|
2915
|
+
], ngImport: i0, template: "<div\n class=\"select-button\"\n [ngClass]=\"{ 'select-button--disabled': disabled }\"\n role=\"group\"\n [attr.aria-disabled]=\"disabled\">\n <button\n type=\"button\"\n class=\"select-button-item\"\n *ngFor=\"let item of items; index as i; trackBy: trackByIndex\"\n [ngClass]=\"{\n 'select-button-item--active': isActive(item),\n 'select-button-item--disabled': disabled || item.disabled,\n 'select-button-item--first': i === 0,\n 'select-button-item--last': i === items.length - 1\n }\"\n [attr.aria-pressed]=\"isActive(item)\"\n [disabled]=\"disabled || item.disabled\"\n (click)=\"onItemSelect(item)\">\n <span class=\"select-button-item__label\">{{ item.label }}</span>\n </button>\n</div>\n", styles: [".select-button{display:inline-flex;align-items:stretch}.select-button--disabled{pointer-events:none;opacity:.6}.select-button-item{padding:8px 12px;cursor:pointer;background-color:#fff;border:none;border-left:1px solid #c1c1cc;border-top:1px solid #c1c1cc;border-bottom:1px solid #c1c1cc}.select-button-item__label{font-family:Open Sans,sans-serif;font-size:14px}.select-button-item:not(.select-button-item--disabled):not(.select-button-item--active):hover{background-color:#eeebf2}.select-button-item--active,.select-button-item--active:hover{background-color:#c1c1cc;font-weight:700}.select-button-item--disabled{opacity:.5;cursor:default}.select-button-item--first{border-top-left-radius:2px;border-bottom-left-radius:2px}.select-button-item--last{border-right:1px solid #c1c1cc;border-top-right-radius:2px;border-bottom-right-radius:2px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2454
2916
|
}
|
|
2917
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SelectButtonComponent, decorators: [{
|
|
2918
|
+
type: Component,
|
|
2919
|
+
args: [{ selector: "sdc-select-button", standalone: true, imports: [CommonModule], providers: [
|
|
2920
|
+
{
|
|
2921
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2922
|
+
useExisting: forwardRef(() => SelectButtonComponent),
|
|
2923
|
+
multi: true,
|
|
2924
|
+
},
|
|
2925
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"select-button\"\n [ngClass]=\"{ 'select-button--disabled': disabled }\"\n role=\"group\"\n [attr.aria-disabled]=\"disabled\">\n <button\n type=\"button\"\n class=\"select-button-item\"\n *ngFor=\"let item of items; index as i; trackBy: trackByIndex\"\n [ngClass]=\"{\n 'select-button-item--active': isActive(item),\n 'select-button-item--disabled': disabled || item.disabled,\n 'select-button-item--first': i === 0,\n 'select-button-item--last': i === items.length - 1\n }\"\n [attr.aria-pressed]=\"isActive(item)\"\n [disabled]=\"disabled || item.disabled\"\n (click)=\"onItemSelect(item)\">\n <span class=\"select-button-item__label\">{{ item.label }}</span>\n </button>\n</div>\n", styles: [".select-button{display:inline-flex;align-items:stretch}.select-button--disabled{pointer-events:none;opacity:.6}.select-button-item{padding:8px 12px;cursor:pointer;background-color:#fff;border:none;border-left:1px solid #c1c1cc;border-top:1px solid #c1c1cc;border-bottom:1px solid #c1c1cc}.select-button-item__label{font-family:Open Sans,sans-serif;font-size:14px}.select-button-item:not(.select-button-item--disabled):not(.select-button-item--active):hover{background-color:#eeebf2}.select-button-item--active,.select-button-item--active:hover{background-color:#c1c1cc;font-weight:700}.select-button-item--disabled{opacity:.5;cursor:default}.select-button-item--first{border-top-left-radius:2px;border-bottom-left-radius:2px}.select-button-item--last{border-right:1px solid #c1c1cc;border-top-right-radius:2px;border-bottom-right-radius:2px}\n"] }]
|
|
2926
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { items: [{
|
|
2927
|
+
type: Input
|
|
2928
|
+
}], multiple: [{
|
|
2929
|
+
type: Input
|
|
2930
|
+
}], compareWith: [{
|
|
2931
|
+
type: Input
|
|
2932
|
+
}], itemSelected: [{
|
|
2933
|
+
type: Output
|
|
2934
|
+
}], itemClicked: [{
|
|
2935
|
+
type: Output
|
|
2936
|
+
}] } });
|
|
2455
2937
|
|
|
2456
2938
|
class RowCardComponent {
|
|
2457
2939
|
data;
|
|
2458
2940
|
options;
|
|
2459
2941
|
isExpanded = false;
|
|
2460
2942
|
detailTemplate;
|
|
2461
|
-
|
|
2943
|
+
cardClick = new EventEmitter();
|
|
2462
2944
|
cardButtonClick = new EventEmitter();
|
|
2463
2945
|
contentWrapper;
|
|
2464
2946
|
isMobile = isMobile();
|
|
2947
|
+
get expanded() {
|
|
2948
|
+
return !!this.options?.expandable && !!this.isExpanded;
|
|
2949
|
+
}
|
|
2465
2950
|
ngOnChanges(changes) {
|
|
2466
|
-
if (changes['isExpanded']) {
|
|
2467
|
-
queueMicrotask(() =>
|
|
2468
|
-
const el = this.contentWrapper?.nativeElement;
|
|
2469
|
-
if (!el)
|
|
2470
|
-
return;
|
|
2471
|
-
el.style.height = this.isExpanded ? el.scrollHeight + 'px' : '0px';
|
|
2472
|
-
});
|
|
2951
|
+
if (changes['isExpanded'] || changes['options']) {
|
|
2952
|
+
queueMicrotask(() => this.updateCollapseHeight());
|
|
2473
2953
|
}
|
|
2474
2954
|
}
|
|
2475
|
-
onCardClick(
|
|
2955
|
+
onCardClick() {
|
|
2956
|
+
this.cardClick.emit(this.data);
|
|
2957
|
+
}
|
|
2958
|
+
onExpandCardClick(event) {
|
|
2476
2959
|
if (event.target.closest('sdc-button'))
|
|
2477
2960
|
return;
|
|
2478
|
-
this.
|
|
2961
|
+
this.cardClick.emit(this.data);
|
|
2479
2962
|
event.stopPropagation();
|
|
2480
2963
|
}
|
|
2481
2964
|
onCardButtonClick() {
|
|
2482
2965
|
this.cardButtonClick.emit(this.data);
|
|
2483
2966
|
}
|
|
2484
|
-
|
|
2485
|
-
|
|
2967
|
+
updateCollapseHeight() {
|
|
2968
|
+
const el = this.contentWrapper?.nativeElement;
|
|
2969
|
+
if (!el)
|
|
2970
|
+
return;
|
|
2971
|
+
if (!this.options?.expandable) {
|
|
2972
|
+
el.style.height = '0px';
|
|
2973
|
+
return;
|
|
2974
|
+
}
|
|
2975
|
+
el.style.height = this.expanded ? `${el.scrollHeight}px` : '0px';
|
|
2976
|
+
}
|
|
2977
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RowCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2978
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: RowCardComponent, isStandalone: true, selector: "sdc-row-card", inputs: { data: "data", options: "options", isExpanded: "isExpanded", detailTemplate: "detailTemplate" }, outputs: { cardClick: "cardClick", cardButtonClick: "cardButtonClick" }, viewQueries: [{ propertyName: "contentWrapper", first: true, predicate: ["contentWrapper"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div\n (click)=\"options?.expandable ? onExpandCardClick($event) : onCardClick()\"\n [class.border-left]=\"data.hasBorder\"\n class=\"row-card p-3 transition-all cursor-pointer\"\n>\n <div class=\"flex flex-column md:flex-row gap-4 align-items-start md:align-items-center w-full\">\n @if (options?.expandable) {\n <i *ngIf=\"expanded\" class=\"fas fa-minus\"></i>\n <i *ngIf=\"!expanded\" class=\"fas fa-plus\"></i>\n }\n\n <div class=\"flex-1 min-w-0\">\n <div\n class=\"text-xl font-semibold mb-2 text-overflow-ellipsis white-space-nowrap overflow-hidden\"\n [ngClass]=\"options?.leftTitleColor\"\n >\n {{ data.left_title }}\n </div>\n <div class=\"text-sm\" [ngClass]=\"options?.leftSubtitleColor\">\n {{ data.left_subtitle }}\n </div>\n </div>\n\n <div class=\"flex md:ml-auto gap-4 w-full md:w-auto align-items-start md:align-items-center\">\n <div class=\"flex flex-column md:flex-row gap-2 w-full md:w-auto\">\n <sdc-button\n (click)=\"$event.stopPropagation()\"\n (onClick)=\"onCardButtonClick()\"\n [priority]=\"options?.buttonPriority!\"\n [icon]=\"options?.buttonIcon\"\n [label]=\"isMobile ? '' : (options!.buttonLabel! | translate)\"\n [class]=\"isMobile ? 'w-full' : 'w-9rem'\"\n >\n </sdc-button>\n </div>\n\n <div\n class=\"text-right text-sm flex flex-column gap-1 md:align-items-end w-full md:w-auto\"\n style=\"min-width: 13rem\"\n >\n <span class=\"font-bold text-2xl\" [ngClass]=\"options?.rightTitleColor\">{{ data.right_title }}</span>\n <span [ngClass]=\"options?.rightSubtitleColor\">{{ data.right_subtitle }}</span>\n </div>\n </div>\n </div>\n\n <ng-container *ngIf=\"options?.expandable\">\n <div #contentWrapper class=\"collapse-wrapper\" [class.show]=\"expanded\" (click)=\"$event.stopPropagation()\">\n <div class=\"collapse-inner\">\n <ng-container *ngIf=\"detailTemplate; else defaultDetail\">\n <ng-template\n [ngTemplateOutlet]=\"detailTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: data, data: data }\"\n ></ng-template>\n </ng-container>\n\n <ng-template #defaultDetail>\n <div class=\"text-sm text-700\">{{ data.wrapperDetail }}</div>\n </ng-template>\n </div>\n </div>\n </ng-container>\n</div>\n", styles: [".bg-disabled{background-color:var(--p-inputtext-disabled-background)}.collapse-wrapper{border-radius:0 0 10px 10px;height:0;overflow:hidden;transition:height .35s ease}.collapse-inner{padding:2rem 1rem 1rem;opacity:0;transform:translateY(-.5rem);transition:opacity .3s ease,transform .3s ease}.collapse-wrapper.show .collapse-inner{opacity:1;transform:translateY(0)}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "sdc-button", inputs: ["disabled", "width", "icon", "id", "label", "priority", "size", "type"], outputs: ["onClick"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$5.TranslatePipe, name: "translate" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2486
2979
|
}
|
|
2487
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
2980
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RowCardComponent, decorators: [{
|
|
2488
2981
|
type: Component,
|
|
2489
|
-
args: [{ standalone: true, selector: 'sdc-row-card', imports: [ButtonComponent
|
|
2982
|
+
args: [{ standalone: true, selector: 'sdc-row-card', imports: [ButtonComponent, TranslateModule, NgClass, NgIf, NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, template: "<div\n (click)=\"options?.expandable ? onExpandCardClick($event) : onCardClick()\"\n [class.border-left]=\"data.hasBorder\"\n class=\"row-card p-3 transition-all cursor-pointer\"\n>\n <div class=\"flex flex-column md:flex-row gap-4 align-items-start md:align-items-center w-full\">\n @if (options?.expandable) {\n <i *ngIf=\"expanded\" class=\"fas fa-minus\"></i>\n <i *ngIf=\"!expanded\" class=\"fas fa-plus\"></i>\n }\n\n <div class=\"flex-1 min-w-0\">\n <div\n class=\"text-xl font-semibold mb-2 text-overflow-ellipsis white-space-nowrap overflow-hidden\"\n [ngClass]=\"options?.leftTitleColor\"\n >\n {{ data.left_title }}\n </div>\n <div class=\"text-sm\" [ngClass]=\"options?.leftSubtitleColor\">\n {{ data.left_subtitle }}\n </div>\n </div>\n\n <div class=\"flex md:ml-auto gap-4 w-full md:w-auto align-items-start md:align-items-center\">\n <div class=\"flex flex-column md:flex-row gap-2 w-full md:w-auto\">\n <sdc-button\n (click)=\"$event.stopPropagation()\"\n (onClick)=\"onCardButtonClick()\"\n [priority]=\"options?.buttonPriority!\"\n [icon]=\"options?.buttonIcon\"\n [label]=\"isMobile ? '' : (options!.buttonLabel! | translate)\"\n [class]=\"isMobile ? 'w-full' : 'w-9rem'\"\n >\n </sdc-button>\n </div>\n\n <div\n class=\"text-right text-sm flex flex-column gap-1 md:align-items-end w-full md:w-auto\"\n style=\"min-width: 13rem\"\n >\n <span class=\"font-bold text-2xl\" [ngClass]=\"options?.rightTitleColor\">{{ data.right_title }}</span>\n <span [ngClass]=\"options?.rightSubtitleColor\">{{ data.right_subtitle }}</span>\n </div>\n </div>\n </div>\n\n <ng-container *ngIf=\"options?.expandable\">\n <div #contentWrapper class=\"collapse-wrapper\" [class.show]=\"expanded\" (click)=\"$event.stopPropagation()\">\n <div class=\"collapse-inner\">\n <ng-container *ngIf=\"detailTemplate; else defaultDetail\">\n <ng-template\n [ngTemplateOutlet]=\"detailTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: data, data: data }\"\n ></ng-template>\n </ng-container>\n\n <ng-template #defaultDetail>\n <div class=\"text-sm text-700\">{{ data.wrapperDetail }}</div>\n </ng-template>\n </div>\n </div>\n </ng-container>\n</div>\n", styles: [".bg-disabled{background-color:var(--p-inputtext-disabled-background)}.collapse-wrapper{border-radius:0 0 10px 10px;height:0;overflow:hidden;transition:height .35s ease}.collapse-inner{padding:2rem 1rem 1rem;opacity:0;transform:translateY(-.5rem);transition:opacity .3s ease,transform .3s ease}.collapse-wrapper.show .collapse-inner{opacity:1;transform:translateY(0)}\n"] }]
|
|
2490
2983
|
}], propDecorators: { data: [{
|
|
2491
2984
|
type: Input
|
|
2492
2985
|
}], options: [{
|
|
@@ -2495,7 +2988,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
2495
2988
|
type: Input
|
|
2496
2989
|
}], detailTemplate: [{
|
|
2497
2990
|
type: Input
|
|
2498
|
-
}],
|
|
2991
|
+
}], cardClick: [{
|
|
2499
2992
|
type: Output
|
|
2500
2993
|
}], cardButtonClick: [{
|
|
2501
2994
|
type: Output
|
|
@@ -2509,10 +3002,10 @@ class RowCardListComponent {
|
|
|
2509
3002
|
loading = false;
|
|
2510
3003
|
config = DEFAULT_ROW_CARD_LIST_OPTIONS;
|
|
2511
3004
|
cardButtonClick = new EventEmitter();
|
|
2512
|
-
|
|
3005
|
+
cardClick = new EventEmitter();
|
|
2513
3006
|
detailTemplate;
|
|
2514
|
-
isMobile = isMobile
|
|
2515
|
-
isTablet = isTablet
|
|
3007
|
+
isMobile = isMobile();
|
|
3008
|
+
isTablet = isTablet();
|
|
2516
3009
|
options = signal(DEFAULT_ROW_CARD_LIST_OPTIONS);
|
|
2517
3010
|
emptyTitle = computed(() => this.options().empty?.title ?? '');
|
|
2518
3011
|
emptyText = computed(() => this.options().empty?.message ?? '');
|
|
@@ -2585,7 +3078,7 @@ class RowCardListComponent {
|
|
|
2585
3078
|
onButtonExpand(card) {
|
|
2586
3079
|
const isOpen = this.expandedCardId() === card.id;
|
|
2587
3080
|
this.expandedCardId.set(isOpen ? null : card.id);
|
|
2588
|
-
this.
|
|
3081
|
+
this.cardClick.emit(card);
|
|
2589
3082
|
}
|
|
2590
3083
|
applyConfigOptions() {
|
|
2591
3084
|
const base = DEFAULT_ROW_CARD_LIST_OPTIONS;
|
|
@@ -2620,12 +3113,12 @@ class RowCardListComponent {
|
|
|
2620
3113
|
return JSON.stringify(obj ?? {});
|
|
2621
3114
|
}
|
|
2622
3115
|
}
|
|
2623
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
2624
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.
|
|
3116
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RowCardListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3117
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: RowCardListComponent, isStandalone: true, selector: "sdc-row-card-list", inputs: { data: "data", loading: "loading", config: "config" }, outputs: { cardButtonClick: "cardButtonClick", cardClick: "cardClick" }, queries: [{ propertyName: "detailTemplate", first: true, predicate: ["rowCardDetail"], descendants: true, read: TemplateRef }], usesOnChanges: true, ngImport: i0, template: "<div class=\"sdc-row-card-list\" [class.align-content-center]=\"loading\">\n @if (loading) {\n <s-loading-state [loading]=\"loading\" [blockWindow]=\"false\" class=\"sdc-cardlist-loading-state\"></s-loading-state>\n } @else { @if (pagedData().length) { @for (card of pagedData(); track card.id) {\n <div class=\"sdc-row-card-item\">\n <sdc-row-card\n (cardButtonClick)=\"onCardButtonClick(card)\"\n (cardClick)=\"onButtonExpand(card)\"\n [options]=\"options().customCard\"\n [data]=\"card\"\n [isExpanded]=\"expandedCardId() === card.id\"\n [detailTemplate]=\"detailTemplate\"\n >\n </sdc-row-card>\n </div>\n } } @else {\n <s-empty-state\n id=\"cardlist-empty\"\n iconClass=\"fa fa-inbox\"\n [title]=\"emptyTitle() | translate\"\n [description]=\"emptyText() | translate\"\n class=\"sdc-cardlist-empty-state\"\n ></s-empty-state>\n } @if (options().enablePagination) {\n <div class=\"sdc-paginator-wrap flex justify-content-start\" [class.justify-content-center]=\"isMobile || isTablet\">\n <sdc-paginator\n style=\"min-width: 100%\"\n [totalRecordsLabel]=\"totalRecordsLabel() | translate\"\n (pageChange)=\"onChangePaginator($event)\"\n [first]=\"page().first\"\n [rows]=\"page().rows\"\n [totalRecords]=\"filtered().length\"\n [isMobile]=\"isMobile\"\n >\n </sdc-paginator>\n </div>\n } }\n</div>\n", styles: [".bg-disabled{background-color:var(--p-inputtext-disabled-background)}.sdc-row-card-list{min-height:30rem;min-width:17rem}.sdc-row-card-list ::ng-deep .sdc-row-card-item sdc-row-card .row-card{border-inline:1px solid var(--sdc-formfield-default-border);border-block:0;border-radius:0}.sdc-row-card-list ::ng-deep .sdc-row-card-item:not(:last-child) sdc-row-card .row-card{border-block-end:1px solid var(--sdc-formfield-default-border)}.sdc-row-card-list ::ng-deep .sdc-row-card-item:first-child sdc-row-card .row-card{border-block-start:1px solid var(--sdc-formfield-default-border);border-start-start-radius:var(--sdc-formfield-border-radius);border-start-end-radius:var(--sdc-formfield-border-radius)}.sdc-row-card-list ::ng-deep .sdc-row-card-item:nth-last-child(1 of.sdc-row-card-item) sdc-row-card .row-card{border-block-end:1px solid var(--sdc-formfield-default-border);border-end-end-radius:var(--sdc-formfield-border-radius);border-end-start-radius:var(--sdc-formfield-border-radius)}.sdc-row-card-list ::ng-deep .sdc-row-card-item:only-child sdc-row-card .row-card{border:1px solid var(--sdc-formfield-default-border);border-radius:var(--sdc-formfield-border-radius)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$5.TranslatePipe, name: "translate" }, { kind: "component", type: RowCardComponent, selector: "sdc-row-card", inputs: ["data", "options", "isExpanded", "detailTemplate"], outputs: ["cardClick", "cardButtonClick"] }, { kind: "component", type: PaginatorComponent, selector: "sdc-paginator", inputs: ["first", "rows", "totalRecords", "rowsPerPageOptions", "isMobile", "totalRecordsLabel"], outputs: ["pageChange"] }, { kind: "ngmodule", type: EmptyStateModule }, { kind: "component", type: i3$2.EmptyStateComponent, selector: "s-empty-state", inputs: ["id", "title", "iconClass", "description", "showPrimaryAction", "showSecondaryAction", "primaryActionLabel", "secondaryActionLabel", "primaryModel"], outputs: ["primaryAction", "secondaryAction"] }, { kind: "ngmodule", type: LoadingStateModule }, { kind: "component", type: i2$2.LoadingStateComponent, selector: "s-loading-state", inputs: ["indicator", "id", "blockWindow", "loading"] }] });
|
|
2625
3118
|
}
|
|
2626
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
3119
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RowCardListComponent, decorators: [{
|
|
2627
3120
|
type: Component,
|
|
2628
|
-
args: [{ selector: 'sdc-row-card-list', standalone: true, imports: [CommonModule, TranslateModule, RowCardComponent, PaginatorComponent, EmptyStateModule, LoadingStateModule], encapsulation: ViewEncapsulation.Emulated, template: "<div class=\"sdc-row-card-list\">\n @if (loading) {\n <s-loading-state [loading]=\"loading\" [blockWindow]=\"false\" class=\"sdc-cardlist-loading-state\"></s-loading-state>\n } @else { @if (pagedData().length) { @for (card of pagedData(); track card.id) {\n <div class=\"sdc-row-card-item\">\n <sdc-row-card\n (cardButtonClick)=\"onCardButtonClick(card)\"\n (
|
|
3121
|
+
args: [{ selector: 'sdc-row-card-list', standalone: true, imports: [CommonModule, TranslateModule, RowCardComponent, PaginatorComponent, EmptyStateModule, LoadingStateModule], encapsulation: ViewEncapsulation.Emulated, template: "<div class=\"sdc-row-card-list\" [class.align-content-center]=\"loading\">\n @if (loading) {\n <s-loading-state [loading]=\"loading\" [blockWindow]=\"false\" class=\"sdc-cardlist-loading-state\"></s-loading-state>\n } @else { @if (pagedData().length) { @for (card of pagedData(); track card.id) {\n <div class=\"sdc-row-card-item\">\n <sdc-row-card\n (cardButtonClick)=\"onCardButtonClick(card)\"\n (cardClick)=\"onButtonExpand(card)\"\n [options]=\"options().customCard\"\n [data]=\"card\"\n [isExpanded]=\"expandedCardId() === card.id\"\n [detailTemplate]=\"detailTemplate\"\n >\n </sdc-row-card>\n </div>\n } } @else {\n <s-empty-state\n id=\"cardlist-empty\"\n iconClass=\"fa fa-inbox\"\n [title]=\"emptyTitle() | translate\"\n [description]=\"emptyText() | translate\"\n class=\"sdc-cardlist-empty-state\"\n ></s-empty-state>\n } @if (options().enablePagination) {\n <div class=\"sdc-paginator-wrap flex justify-content-start\" [class.justify-content-center]=\"isMobile || isTablet\">\n <sdc-paginator\n style=\"min-width: 100%\"\n [totalRecordsLabel]=\"totalRecordsLabel() | translate\"\n (pageChange)=\"onChangePaginator($event)\"\n [first]=\"page().first\"\n [rows]=\"page().rows\"\n [totalRecords]=\"filtered().length\"\n [isMobile]=\"isMobile\"\n >\n </sdc-paginator>\n </div>\n } }\n</div>\n", styles: [".bg-disabled{background-color:var(--p-inputtext-disabled-background)}.sdc-row-card-list{min-height:30rem;min-width:17rem}.sdc-row-card-list ::ng-deep .sdc-row-card-item sdc-row-card .row-card{border-inline:1px solid var(--sdc-formfield-default-border);border-block:0;border-radius:0}.sdc-row-card-list ::ng-deep .sdc-row-card-item:not(:last-child) sdc-row-card .row-card{border-block-end:1px solid var(--sdc-formfield-default-border)}.sdc-row-card-list ::ng-deep .sdc-row-card-item:first-child sdc-row-card .row-card{border-block-start:1px solid var(--sdc-formfield-default-border);border-start-start-radius:var(--sdc-formfield-border-radius);border-start-end-radius:var(--sdc-formfield-border-radius)}.sdc-row-card-list ::ng-deep .sdc-row-card-item:nth-last-child(1 of.sdc-row-card-item) sdc-row-card .row-card{border-block-end:1px solid var(--sdc-formfield-default-border);border-end-end-radius:var(--sdc-formfield-border-radius);border-end-start-radius:var(--sdc-formfield-border-radius)}.sdc-row-card-list ::ng-deep .sdc-row-card-item:only-child sdc-row-card .row-card{border:1px solid var(--sdc-formfield-default-border);border-radius:var(--sdc-formfield-border-radius)}\n"] }]
|
|
2629
3122
|
}], propDecorators: { data: [{
|
|
2630
3123
|
type: Input
|
|
2631
3124
|
}], loading: [{
|
|
@@ -2634,7 +3127,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
2634
3127
|
type: Input
|
|
2635
3128
|
}], cardButtonClick: [{
|
|
2636
3129
|
type: Output
|
|
2637
|
-
}],
|
|
3130
|
+
}], cardClick: [{
|
|
2638
3131
|
type: Output
|
|
2639
3132
|
}], detailTemplate: [{
|
|
2640
3133
|
type: ContentChild,
|
|
@@ -2654,6 +3147,8 @@ class FiltersComponent {
|
|
|
2654
3147
|
ngOnChanges(_changes) {
|
|
2655
3148
|
this.buildOptionsMap();
|
|
2656
3149
|
this.ensureModels();
|
|
3150
|
+
this.applyPresetsFromConfig();
|
|
3151
|
+
this.applyInitialStateFromConfig();
|
|
2657
3152
|
this.applyAndEmitAsync();
|
|
2658
3153
|
}
|
|
2659
3154
|
ngOnDestroy() {
|
|
@@ -2680,9 +3175,14 @@ class FiltersComponent {
|
|
|
2680
3175
|
fields: (s?.fields ?? []),
|
|
2681
3176
|
placeholder: s?.placeholder,
|
|
2682
3177
|
triggerMode: s?.triggerMode ?? 'auto',
|
|
2683
|
-
show: s?.show ?? true
|
|
3178
|
+
show: s?.show ?? true,
|
|
3179
|
+
label: s?.label
|
|
2684
3180
|
};
|
|
2685
3181
|
}
|
|
3182
|
+
getInitialState() {
|
|
3183
|
+
const c = this.config;
|
|
3184
|
+
return c?.initialState;
|
|
3185
|
+
}
|
|
2686
3186
|
readPath(obj, path) {
|
|
2687
3187
|
return path.split('.').reduce((acc, part) => (acc && typeof acc === 'object' ? acc[part] : undefined), obj);
|
|
2688
3188
|
}
|
|
@@ -2746,6 +3246,27 @@ class FiltersComponent {
|
|
|
2746
3246
|
}
|
|
2747
3247
|
}
|
|
2748
3248
|
}
|
|
3249
|
+
applyPresetsFromConfig() {
|
|
3250
|
+
for (const def of this.getFilters()) {
|
|
3251
|
+
const preset = def?.preset;
|
|
3252
|
+
if (preset && (!this.selectedValues[def.key] || (Array.isArray(this.selectedValues[def.key]) && this.selectedValues[def.key].length === 0))) {
|
|
3253
|
+
this.selectedValues[def.key] = Array.isArray(preset) ? preset.slice() : preset;
|
|
3254
|
+
}
|
|
3255
|
+
}
|
|
3256
|
+
}
|
|
3257
|
+
applyInitialStateFromConfig() {
|
|
3258
|
+
const init = this.getInitialState();
|
|
3259
|
+
if (!init)
|
|
3260
|
+
return;
|
|
3261
|
+
if (typeof init.search === 'string') {
|
|
3262
|
+
this.searchTerm.set(init.search.trim());
|
|
3263
|
+
}
|
|
3264
|
+
if (init.filters) {
|
|
3265
|
+
for (const [k, v] of Object.entries(init.filters)) {
|
|
3266
|
+
this.selectedValues[k] = Array.isArray(v) ? v.slice() : v;
|
|
3267
|
+
}
|
|
3268
|
+
}
|
|
3269
|
+
}
|
|
2749
3270
|
normalizeToValues(def, model) {
|
|
2750
3271
|
const arr = Array.isArray(model) ? model : model != null ? [model] : [];
|
|
2751
3272
|
return arr
|
|
@@ -2776,9 +3297,7 @@ class FiltersComponent {
|
|
|
2776
3297
|
const v = this.getFieldValue(row, f);
|
|
2777
3298
|
if (Array.isArray(v))
|
|
2778
3299
|
return v.join(' ').toLowerCase().includes(term);
|
|
2779
|
-
return String(v ?? '')
|
|
2780
|
-
.toLowerCase()
|
|
2781
|
-
.includes(term);
|
|
3300
|
+
return String(v ?? '').toLowerCase().includes(term);
|
|
2782
3301
|
});
|
|
2783
3302
|
}
|
|
2784
3303
|
computeFiltered() {
|
|
@@ -2792,10 +3311,10 @@ class FiltersComponent {
|
|
|
2792
3311
|
this.filtered.emit(result);
|
|
2793
3312
|
}, 0);
|
|
2794
3313
|
}
|
|
2795
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
2796
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.
|
|
3314
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FiltersComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3315
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: FiltersComponent, isStandalone: true, selector: "sdc-filters", inputs: { data: "data", config: "config", loading: "loading" }, outputs: { filtered: "filtered" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"grid min-h-10rem\">\n @if (config!.search!.show !== false) {\n <div class=\"col-12 md:col-12 lg:col-6 xl:col-4\">\n <sdc-searchbox\n [disabled]=\"loading\"\n [label]=\"config!.search!.label || ''\"\n [placeholder]=\"config!.search!.placeholder || ''\"\n [size]=\"'small'\"\n [triggerMode]=\"config!.search!.triggerMode || 'auto'\"\n (onSearch)=\"onSearch($event)\"\n (onClear)=\"onClear()\"\n >\n </sdc-searchbox>\n </div>\n } @if (config!.filters!.length) { @for (def of config.filters; track def.key) {\n <div class=\"col-12 md:col-6 lg:col-3 xl:col-2\" [class.mb-3]=\"isMobile\">\n <sdc-combobox\n width=\"100%\"\n [label]=\"def.label || ''\"\n [disabled]=\"loading\"\n [placeholder]=\"def.placeholder || ''\"\n [multiple]=\"(def.type ?? 'multiselect') === 'multiselect'\"\n [options]=\"filterOptionsMap[def.key]\"\n [(ngModel)]=\"selectedValues[def.key]\"\n (ngModelChange)=\"onComboChange(def.key, $event)\"\n >\n </sdc-combobox>\n </div>\n } }\n</div>\n", styles: [".bg-disabled{background-color:var(--p-inputtext-disabled-background)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: FloatLabelModule }, { kind: "component", type: SearchboxComponent, selector: "sdc-searchbox", inputs: ["triggerMode"], outputs: ["onSearch", "onClear"] }, { kind: "ngmodule", type: InputGroupModule }, { kind: "ngmodule", type: InputGroupAddonModule }, { kind: "ngmodule", type: MultiSelectModule }, { kind: "component", type: ComboboxComponent, selector: "sdc-combobox", inputs: ["multiple", "appendTo", "zIndex", "options", "overrideChipMessage", "maxSelectedLabels", "showClear"], outputs: ["onSelectedItem"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2797
3316
|
}
|
|
2798
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
3317
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FiltersComponent, decorators: [{
|
|
2799
3318
|
type: Component,
|
|
2800
3319
|
args: [{ selector: 'sdc-filters', standalone: true, imports: [
|
|
2801
3320
|
CommonModule,
|
|
@@ -2806,7 +3325,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
2806
3325
|
InputGroupAddonModule,
|
|
2807
3326
|
MultiSelectModule,
|
|
2808
3327
|
ComboboxComponent
|
|
2809
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, template: "<div class=\"grid
|
|
3328
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, template: "<div class=\"grid min-h-10rem\">\n @if (config!.search!.show !== false) {\n <div class=\"col-12 md:col-12 lg:col-6 xl:col-4\">\n <sdc-searchbox\n [disabled]=\"loading\"\n [label]=\"config!.search!.label || ''\"\n [placeholder]=\"config!.search!.placeholder || ''\"\n [size]=\"'small'\"\n [triggerMode]=\"config!.search!.triggerMode || 'auto'\"\n (onSearch)=\"onSearch($event)\"\n (onClear)=\"onClear()\"\n >\n </sdc-searchbox>\n </div>\n } @if (config!.filters!.length) { @for (def of config.filters; track def.key) {\n <div class=\"col-12 md:col-6 lg:col-3 xl:col-2\" [class.mb-3]=\"isMobile\">\n <sdc-combobox\n width=\"100%\"\n [label]=\"def.label || ''\"\n [disabled]=\"loading\"\n [placeholder]=\"def.placeholder || ''\"\n [multiple]=\"(def.type ?? 'multiselect') === 'multiselect'\"\n [options]=\"filterOptionsMap[def.key]\"\n [(ngModel)]=\"selectedValues[def.key]\"\n (ngModelChange)=\"onComboChange(def.key, $event)\"\n >\n </sdc-combobox>\n </div>\n } }\n</div>\n", styles: [".bg-disabled{background-color:var(--p-inputtext-disabled-background)}\n"] }]
|
|
2810
3329
|
}], propDecorators: { data: [{
|
|
2811
3330
|
type: Input,
|
|
2812
3331
|
args: [{ required: true }]
|
|
@@ -2819,9 +3338,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
2819
3338
|
type: Output
|
|
2820
3339
|
}] } });
|
|
2821
3340
|
|
|
3341
|
+
// primeng services
|
|
3342
|
+
|
|
2822
3343
|
/**
|
|
2823
3344
|
* Generated bundle index. Do not edit.
|
|
2824
3345
|
*/
|
|
2825
3346
|
|
|
2826
|
-
export { ButtonComponent, CONSTANTS, CardListComponent, CheckboxComponent, ComboboxComponent, ConfirmComponent, FiltersComponent, HyperlinkComponent, ListComponent, ModalComponent, ModalcComponent, PaginatorComponent, PanelComponent, RowCardListComponent, SQL_HELPER, ScaffoldComponent, SearchboxComponent, SidebarComponent, SpinnerComponent, SpinnerService,
|
|
3347
|
+
export { ButtonComponent, CONSTANTS, CardListComponent, CheckboxComponent, CodeEditorComponent, ComboboxComponent, ConfirmComponent, DEFAULT_CARD_LIST_OPTIONS, DEFAULT_ROW_CARD_LIST_OPTIONS, DEFAULT_TABLE_OPTIONS, FiltersComponent, HyperlinkComponent, ListComponent, ModalComponent, ModalcComponent, PaginatorComponent, PanelComponent, RowCardListComponent, SQL_HELPER, ScaffoldComponent, SearchboxComponent, SelectButtonComponent, SidebarComponent, SpinnerComponent, SpinnerService, TabComponent, TabItemComponent, TableComponent, TextboxComponent, ToastComponent, ToastService, createSqlAutoCompletionHadler, fixComboBoxOverlay, fixDialogMask, getDimensionStyles, isDesktop, isMobile, isTablet, mockRowCardList, provideDataCoreLib, provideGlobalStyles, provideTranslations, range, serviceProviders, sqlDomainFilterDecorator, sqlFormatterHandler, sqlUppercaseHandler };
|
|
2827
3348
|
//# sourceMappingURL=seniorsistemas-data-seniorx-core.mjs.map
|