@seniorsistemas/data-seniorx-core 1.5.0 → 1.6.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/lists.type.d.ts +7 -2
- package/core/types/searchbox.type.d.ts +1 -0
- package/core/types/semantics.type.d.ts +4 -2
- package/core/types/table.types.d.ts +58 -0
- package/core/types/toast.type.d.ts +16 -0
- package/core/utils/layout.util.d.ts +3 -0
- package/esm2022/core/types/lists.type.mjs +1 -1
- package/esm2022/core/types/searchbox.type.mjs +2 -0
- package/esm2022/core/types/semantics.type.mjs +11 -9
- package/esm2022/core/types/table.types.mjs +26 -0
- package/esm2022/core/types/toast.type.mjs +2 -0
- package/esm2022/core/utils/layout.util.mjs +10 -0
- package/esm2022/features/button/button.component.mjs +12 -10
- package/esm2022/features/checkbox/checkbox.component.mjs +80 -0
- package/esm2022/features/combobox/combobox.component.mjs +30 -12
- package/esm2022/features/inputs.mjs +1 -12
- package/esm2022/features/list/list.component.mjs +55 -32
- package/esm2022/features/modalc/modalc.component.mjs +49 -26
- package/esm2022/features/panel/panel.component.mjs +6 -5
- package/esm2022/features/scaffold/scaffold.component.mjs +34 -0
- package/esm2022/features/searchbox/searchbox.component.mjs +26 -20
- package/esm2022/features/sidebar/sidebar.component.mjs +59 -0
- package/esm2022/features/spinner/spinner.component.mjs +15 -8
- package/esm2022/features/tab/tab-item.component.mjs +29 -0
- package/esm2022/features/tab/tab.component.mjs +159 -0
- package/esm2022/features/table/table.component.mjs +263 -0
- package/esm2022/features/textbox/textbox.component.mjs +3 -3
- package/esm2022/features/toast/toast.component.mjs +35 -27
- package/esm2022/features/toast/toast.service.mjs +60 -35
- package/esm2022/providers/primeng-config.provider.mjs +10 -8
- package/esm2022/public-api.mjs +7 -1
- package/features/button/button.component.d.ts +5 -4
- package/features/checkbox/checkbox.component.d.ts +23 -0
- package/features/combobox/combobox.component.d.ts +8 -5
- package/features/inputs.d.ts +0 -4
- package/features/list/list.component.d.ts +10 -4
- package/features/modalc/modalc.component.d.ts +16 -8
- package/features/scaffold/scaffold.component.d.ts +11 -0
- package/features/searchbox/searchbox.component.d.ts +7 -7
- package/features/sidebar/sidebar.component.d.ts +18 -0
- package/features/spinner/spinner.component.d.ts +3 -2
- package/features/tab/tab-item.component.d.ts +11 -0
- package/features/tab/tab.component.d.ts +38 -0
- package/features/table/table.component.d.ts +60 -0
- package/features/toast/toast.component.d.ts +10 -10
- package/features/toast/toast.service.d.ts +10 -10
- package/fesm2022/seniorsistemas-data-seniorx-core.mjs +930 -223
- package/fesm2022/seniorsistemas-data-seniorx-core.mjs.map +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +6 -0
- package/styles.css +50 -0
- package/styles.css.map +1 -1
|
@@ -1,52 +1,65 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as i2$1 from 'primeng/api';
|
|
2
2
|
import { MessageService } from 'primeng/api';
|
|
3
3
|
export { MessageService } from 'primeng/api';
|
|
4
4
|
import { definePreset } from '@primeng/themes';
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
|
-
import { makeEnvironmentProviders, APP_INITIALIZER, EventEmitter, Component, Input, Output, Directive, forwardRef, ViewChild, Injectable } from '@angular/core';
|
|
6
|
+
import { makeEnvironmentProviders, APP_INITIALIZER, EventEmitter, Component, Input, Output, TemplateRef, ContentChild, Directive, forwardRef, ViewChild, computed, signal, inject, ElementRef, NgZone, DestroyRef, ChangeDetectorRef, effect, numberAttribute, ChangeDetectionStrategy, booleanAttribute, Injectable, HostBinding, HostListener } from '@angular/core';
|
|
7
7
|
import { provideAnimationsAsync } from '@angular/platform-browser/animations/async';
|
|
8
8
|
import { providePrimeNG } from 'primeng/config';
|
|
9
9
|
import Aura from '@primeng/themes/aura';
|
|
10
10
|
import * as i3$1 from '@ngx-translate/core';
|
|
11
11
|
import { TranslateService, TranslateModule } from '@ngx-translate/core';
|
|
12
12
|
import { BehaviorSubject } from 'rxjs';
|
|
13
|
+
import * as i1$1 from '@angular/common';
|
|
14
|
+
import { CommonModule } from '@angular/common';
|
|
15
|
+
import { first } from 'rxjs/operators';
|
|
13
16
|
import { ViewPlugin, Decoration, keymap, EditorView } from '@codemirror/view';
|
|
14
17
|
import { RangeSetBuilder, Prec, StateEffect } from '@codemirror/state';
|
|
15
18
|
import { format } from 'sql-formatter';
|
|
16
|
-
import * as i1 from '
|
|
17
|
-
import { ButtonModule } from '
|
|
18
|
-
import * as i2 from '@angular/
|
|
19
|
-
import {
|
|
20
|
-
import * as
|
|
19
|
+
import * as i1 from '@seniorsistemas/angular-components/button';
|
|
20
|
+
import { ButtonModule } from '@seniorsistemas/angular-components/button';
|
|
21
|
+
import * as i2 from '@seniorsistemas/angular-components/product-header';
|
|
22
|
+
import { ProductHeaderModule } from '@seniorsistemas/angular-components/product-header';
|
|
23
|
+
import * as i3 from '@seniorsistemas/angular-components/breadcrumb';
|
|
24
|
+
import { BreadcrumbModule } from '@seniorsistemas/angular-components/breadcrumb';
|
|
25
|
+
import * as i1$2 from 'primeng/autocomplete';
|
|
21
26
|
import { AutoCompleteModule } from 'primeng/autocomplete';
|
|
22
|
-
import * as
|
|
27
|
+
import * as i4 from '@angular/forms';
|
|
23
28
|
import { NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
24
|
-
import * as
|
|
29
|
+
import * as i1$3 from 'primeng/button';
|
|
30
|
+
import { ButtonModule as ButtonModule$1 } from 'primeng/button';
|
|
31
|
+
import * as i2$2 from 'primeng/dialog';
|
|
25
32
|
import { DialogModule } from 'primeng/dialog';
|
|
26
|
-
import * as
|
|
27
|
-
import {
|
|
28
|
-
import * as
|
|
29
|
-
import {
|
|
30
|
-
import
|
|
31
|
-
import {
|
|
32
|
-
import * as i1$3 from 'primeng/panel';
|
|
33
|
-
import { PanelModule } from 'primeng/panel';
|
|
33
|
+
import * as i2$3 from '@seniorsistemas/angular-components/empty-state';
|
|
34
|
+
import { EmptyStateModule } from '@seniorsistemas/angular-components/empty-state';
|
|
35
|
+
import * as i3$2 from '@seniorsistemas/angular-components/loading-state';
|
|
36
|
+
import { LoadingStateModule } from '@seniorsistemas/angular-components/loading-state';
|
|
37
|
+
import { DEFAULT_TABLE_OPTIONS } from 'lib/src/core/types/table.types';
|
|
38
|
+
import { isMobile } from 'lib/src/core/utils/layout.util';
|
|
34
39
|
import * as i4$1 from 'primeng/inputgroupaddon';
|
|
35
40
|
import { InputGroupAddonModule } from 'primeng/inputgroupaddon';
|
|
36
|
-
import * as i5
|
|
41
|
+
import * as i5 from 'primeng/inputgroup';
|
|
37
42
|
import { InputGroupModule } from 'primeng/inputgroup';
|
|
38
43
|
import * as i6 from 'primeng/inputtext';
|
|
39
44
|
import { InputTextModule } from 'primeng/inputtext';
|
|
40
|
-
import * as
|
|
45
|
+
import * as i2$4 from 'primeng/paginator';
|
|
46
|
+
import { PaginatorModule } from 'primeng/paginator';
|
|
47
|
+
import * as i2$5 from '@seniorsistemas/angular-components/sidebar';
|
|
48
|
+
import { SidebarModule } from '@seniorsistemas/angular-components/sidebar';
|
|
49
|
+
import { StructureModule } from '@seniorsistemas/angular-components/structure';
|
|
50
|
+
import { PanelModule } from 'primeng/panel';
|
|
51
|
+
import * as i1$4 from '@seniorsistemas/angular-components/panel';
|
|
52
|
+
import { PanelModule as PanelModule$1 } from '@seniorsistemas/angular-components/panel';
|
|
41
53
|
import { BlockUIModule } from 'primeng/blockui';
|
|
54
|
+
import { ProgressSpinnerModule } from 'primeng/progressspinner';
|
|
42
55
|
import { autocompletion } from '@codemirror/autocomplete';
|
|
43
56
|
import { ayuLight } from 'thememirror';
|
|
44
57
|
import { basicSetup } from 'codemirror';
|
|
45
58
|
import { sql, PostgreSQL } from '@codemirror/lang-sql';
|
|
46
|
-
import * as i3$
|
|
59
|
+
import * as i3$3 from 'primeng/keyfilter';
|
|
47
60
|
import { KeyFilterModule } from 'primeng/keyfilter';
|
|
48
|
-
import * as
|
|
49
|
-
import {
|
|
61
|
+
import * as i4$2 from 'primeng/tooltip';
|
|
62
|
+
import { TooltipModule } from 'primeng/tooltip';
|
|
50
63
|
|
|
51
64
|
function customButton(theme) {
|
|
52
65
|
const colors = [
|
|
@@ -311,13 +324,15 @@ const SeniorTheme = definePreset(Aura, {
|
|
|
311
324
|
},
|
|
312
325
|
components: {
|
|
313
326
|
progressspinner: {
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
327
|
+
progressspinner: {
|
|
328
|
+
colorScheme: {
|
|
329
|
+
light: {
|
|
330
|
+
root: {
|
|
331
|
+
color1: '{emerald-300}',
|
|
332
|
+
color2: '{emerald-300}',
|
|
333
|
+
color3: '{emerald-300}',
|
|
334
|
+
color4: '{emerald-300}'
|
|
335
|
+
}
|
|
321
336
|
}
|
|
322
337
|
}
|
|
323
338
|
}
|
|
@@ -633,45 +648,50 @@ function getWordBeforeCursor(state, pos) {
|
|
|
633
648
|
}
|
|
634
649
|
|
|
635
650
|
function getDimensionStyles(type, value) {
|
|
636
|
-
if (typeof value === 'boolean'
|
|
651
|
+
if (value === null || value === undefined || typeof value === 'boolean')
|
|
637
652
|
return {};
|
|
638
|
-
}
|
|
639
653
|
return { [type]: dimensionFormat(value) };
|
|
640
654
|
}
|
|
641
655
|
const dimensionFormat = (value) => {
|
|
642
|
-
|
|
656
|
+
const raw = String(value).trim();
|
|
657
|
+
if (raw === '' || raw.toLowerCase() === 'auto')
|
|
658
|
+
return 'auto';
|
|
659
|
+
if (raw === 'w-fill')
|
|
643
660
|
return '100%';
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
return
|
|
661
|
+
if (/^\d+(\.\d+)?(px|%|rem|em|vh|vw|ch)$/.test(raw))
|
|
662
|
+
return raw;
|
|
663
|
+
if (/^\d+(\.\d+)?$/.test(raw))
|
|
664
|
+
return `${raw}px`;
|
|
665
|
+
return raw;
|
|
649
666
|
};
|
|
650
667
|
|
|
651
668
|
class ButtonComponent {
|
|
652
669
|
disabled = false;
|
|
653
|
-
|
|
670
|
+
width = '10rem';
|
|
671
|
+
icon;
|
|
654
672
|
id = 'button-id';
|
|
655
|
-
label = '
|
|
656
|
-
|
|
673
|
+
label = '';
|
|
674
|
+
priority = 'primary';
|
|
657
675
|
size = undefined;
|
|
658
676
|
type = 'button';
|
|
659
677
|
onClick = new EventEmitter();
|
|
660
678
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
661
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ButtonComponent, isStandalone: true, selector: "sdc-button", inputs: { disabled: "disabled", icon: "icon", id: "id", label: "label",
|
|
679
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", 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}::ng-deep s-button button{min-width:100%!important;width:100%!important;max-width:100%!important}::ng-deep s-button{min-width:100%!important;width:100%!important;max-width:100%!important}\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"] }] });
|
|
662
680
|
}
|
|
663
681
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
664
682
|
type: Component,
|
|
665
|
-
args: [{ imports: [CommonModule, ButtonModule], standalone: true, selector: 'sdc-button', template: "<
|
|
683
|
+
args: [{ imports: [CommonModule, ButtonModule], standalone: true, selector: 'sdc-button', 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}::ng-deep s-button button{min-width:100%!important;width:100%!important;max-width:100%!important}::ng-deep s-button{min-width:100%!important;width:100%!important;max-width:100%!important}\n"] }]
|
|
666
684
|
}], propDecorators: { disabled: [{
|
|
667
685
|
type: Input
|
|
686
|
+
}], width: [{
|
|
687
|
+
type: Input
|
|
668
688
|
}], icon: [{
|
|
669
689
|
type: Input
|
|
670
690
|
}], id: [{
|
|
671
691
|
type: Input
|
|
672
692
|
}], label: [{
|
|
673
693
|
type: Input
|
|
674
|
-
}],
|
|
694
|
+
}], priority: [{
|
|
675
695
|
type: Input
|
|
676
696
|
}], size: [{
|
|
677
697
|
type: Input
|
|
@@ -681,6 +701,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
681
701
|
type: Output
|
|
682
702
|
}] } });
|
|
683
703
|
|
|
704
|
+
class ScaffoldComponent {
|
|
705
|
+
header = 'Scaffold Component';
|
|
706
|
+
title = 'Scaffold Component Title';
|
|
707
|
+
homeUrl = '/';
|
|
708
|
+
headerTpl;
|
|
709
|
+
footerTpl;
|
|
710
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ScaffoldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
711
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ScaffoldComponent, isStandalone: true, selector: "sdc-scaffold", inputs: { header: "header", title: "title", 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\">{{ title }}</div>\n <s-breadcrumb [homeUrl]=\"homeUrl\"></s-breadcrumb>\n\n <div class=\"sdc-scaffold-content\">\n <ng-content select=\"[sdc-scaffold-content]\"></ng-content>\n <ng-content></ng-content>\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}::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}.sdc-scaffold{padding:5px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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: "ngmodule", type: ProductHeaderModule }, { kind: "component", type: i2.ProductHeaderComponent, selector: "s-product-header", inputs: ["id", "header", "baseZIndex", "isHeaderFrame"] }, { kind: "ngmodule", type: BreadcrumbModule }, { kind: "component", type: i3.BreadcrumbComponent, selector: "s-breadcrumb", inputs: ["homeUrl", "targetHomeUrl"] }] });
|
|
712
|
+
}
|
|
713
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ScaffoldComponent, decorators: [{
|
|
714
|
+
type: Component,
|
|
715
|
+
args: [{ selector: 'sdc-scaffold', standalone: true, imports: [CommonModule, ProductHeaderModule, BreadcrumbModule], 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\">{{ title }}</div>\n <s-breadcrumb [homeUrl]=\"homeUrl\"></s-breadcrumb>\n\n <div class=\"sdc-scaffold-content\">\n <ng-content select=\"[sdc-scaffold-content]\"></ng-content>\n <ng-content></ng-content>\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}::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}.sdc-scaffold{padding:5px}\n"] }]
|
|
716
|
+
}], propDecorators: { header: [{
|
|
717
|
+
type: Input
|
|
718
|
+
}], title: [{
|
|
719
|
+
type: Input
|
|
720
|
+
}], homeUrl: [{
|
|
721
|
+
type: Input
|
|
722
|
+
}], headerTpl: [{
|
|
723
|
+
type: ContentChild,
|
|
724
|
+
args: ['scaffoldHeader', { read: TemplateRef }]
|
|
725
|
+
}], footerTpl: [{
|
|
726
|
+
type: ContentChild,
|
|
727
|
+
args: ['scaffoldFooter', { read: TemplateRef }]
|
|
728
|
+
}] } });
|
|
729
|
+
|
|
684
730
|
class InputsComponent {
|
|
685
731
|
disabled = false;
|
|
686
732
|
identity = {};
|
|
@@ -728,20 +774,9 @@ class InputsComponent {
|
|
|
728
774
|
getStyles() {
|
|
729
775
|
return getDimensionStyles('width', this.width);
|
|
730
776
|
}
|
|
731
|
-
getSizeStyle() {
|
|
732
|
-
switch (this.size) {
|
|
733
|
-
case 'small':
|
|
734
|
-
return { 'font-size': '12px', height: '28px' };
|
|
735
|
-
case 'large':
|
|
736
|
-
return { 'font-size': '16px', height: '44px' };
|
|
737
|
-
default:
|
|
738
|
-
return { 'font-size': '14px', height: '36px' };
|
|
739
|
-
}
|
|
740
|
-
}
|
|
741
777
|
getInputStyle() {
|
|
742
778
|
return {
|
|
743
779
|
...this.getStyles(),
|
|
744
|
-
...this.getSizeStyle()
|
|
745
780
|
};
|
|
746
781
|
}
|
|
747
782
|
getInvalidClass() {
|
|
@@ -796,35 +831,50 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
796
831
|
class ComboboxComponent extends InputsComponent {
|
|
797
832
|
filteredItems = [];
|
|
798
833
|
autocomplete;
|
|
834
|
+
appendTo;
|
|
799
835
|
zIndex = 9999;
|
|
800
836
|
options = [];
|
|
801
837
|
selectedValueEvent = new EventEmitter();
|
|
802
838
|
ngAfterViewInit() {
|
|
803
839
|
fixComboBoxOverlay(this.autocomplete, this.zIndex);
|
|
804
840
|
}
|
|
841
|
+
normalizeOptions() {
|
|
842
|
+
if (Array.isArray(this.options))
|
|
843
|
+
return this.options;
|
|
844
|
+
try {
|
|
845
|
+
const parsed = JSON.parse(this.options || '[]');
|
|
846
|
+
return Array.isArray(parsed) ? parsed : [];
|
|
847
|
+
}
|
|
848
|
+
catch {
|
|
849
|
+
return [];
|
|
850
|
+
}
|
|
851
|
+
}
|
|
805
852
|
onSearch(event) {
|
|
806
|
-
const
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
this.invalid =
|
|
853
|
+
const all = this.normalizeOptions();
|
|
854
|
+
const q = (event?.query ?? '').toString().trim().toLowerCase();
|
|
855
|
+
if (!q) {
|
|
856
|
+
this.filteredItems = all.slice();
|
|
857
|
+
this.invalid = this.filteredItems.length === 0;
|
|
858
|
+
return;
|
|
811
859
|
}
|
|
860
|
+
this.filteredItems = all.filter(i => (i?.text ?? '').toLowerCase().includes(q));
|
|
861
|
+
this.invalid = this.filteredItems.length === 0;
|
|
812
862
|
}
|
|
813
863
|
onInput(event) {
|
|
814
864
|
super.onInput(event);
|
|
815
865
|
this.selectedValueEvent.emit(this.value);
|
|
816
|
-
if (this.filteredItems
|
|
866
|
+
if (this.filteredItems?.length > 0) {
|
|
817
867
|
this.invalid = false;
|
|
818
868
|
}
|
|
819
869
|
}
|
|
820
870
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ComboboxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
821
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ComboboxComponent, isStandalone: true, selector: "sdc-combobox", inputs: { zIndex: "zIndex", options: "options" }, outputs: { selectedValueEvent: "onSelectedItem" }, providers: [
|
|
871
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ComboboxComponent, isStandalone: true, selector: "sdc-combobox", inputs: { appendTo: "appendTo", zIndex: "zIndex", options: "options" }, outputs: { selectedValueEvent: "onSelectedItem" }, providers: [
|
|
822
872
|
{
|
|
823
873
|
provide: NG_VALUE_ACCESSOR,
|
|
824
874
|
useExisting: forwardRef(() => ComboboxComponent),
|
|
825
875
|
multi: true
|
|
826
876
|
}
|
|
827
|
-
], viewQueries: [{ propertyName: "autocomplete", first: true, predicate: ["autocomplete"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"
|
|
877
|
+
], viewQueries: [{ propertyName: "autocomplete", first: true, predicate: ["autocomplete"], 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 <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]=\"true\"\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\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\n <small *ngIf=\"message\" [ngClass]=\"getInvalidMessageClass()\">{{ message }}</small>\n</div>\n", styles: [".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-button-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}\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: 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: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }] });
|
|
828
878
|
}
|
|
829
879
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ComboboxComponent, decorators: [{
|
|
830
880
|
type: Component,
|
|
@@ -834,10 +884,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
834
884
|
useExisting: forwardRef(() => ComboboxComponent),
|
|
835
885
|
multi: true
|
|
836
886
|
}
|
|
837
|
-
], template: "<div class=\"
|
|
887
|
+
], 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 <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]=\"true\"\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\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\n <small *ngIf=\"message\" [ngClass]=\"getInvalidMessageClass()\">{{ message }}</small>\n</div>\n", styles: [".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-button-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}\n"] }]
|
|
838
888
|
}], propDecorators: { autocomplete: [{
|
|
839
889
|
type: ViewChild,
|
|
840
890
|
args: ['autocomplete']
|
|
891
|
+
}], appendTo: [{
|
|
892
|
+
type: Input
|
|
841
893
|
}], zIndex: [{
|
|
842
894
|
type: Input
|
|
843
895
|
}], options: [{
|
|
@@ -892,11 +944,11 @@ class ConfirmComponent {
|
|
|
892
944
|
this.visible = false;
|
|
893
945
|
}
|
|
894
946
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ConfirmComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
895
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", 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 }, { kind: "component", type: i1.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$
|
|
947
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", 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$3.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$2.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: i3$1.TranslatePipe, name: "translate" }] });
|
|
896
948
|
}
|
|
897
949
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ConfirmComponent, decorators: [{
|
|
898
950
|
type: Component,
|
|
899
|
-
args: [{ imports: [ButtonModule, DialogModule, TranslateModule], standalone: true, selector: 'sdc-confirm', 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"] }]
|
|
951
|
+
args: [{ imports: [ButtonModule$1, DialogModule, TranslateModule], standalone: true, selector: 'sdc-confirm', 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"] }]
|
|
900
952
|
}], propDecorators: { modal: [{
|
|
901
953
|
type: ViewChild,
|
|
902
954
|
args: ['modal']
|
|
@@ -934,7 +986,7 @@ class HyperlinkComponent {
|
|
|
934
986
|
}
|
|
935
987
|
}
|
|
936
988
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: HyperlinkComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
937
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", 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:
|
|
989
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", 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$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
938
990
|
}
|
|
939
991
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: HyperlinkComponent, decorators: [{
|
|
940
992
|
type: Component,
|
|
@@ -957,50 +1009,611 @@ class ListComponent {
|
|
|
957
1009
|
dataItems = [];
|
|
958
1010
|
dataActions = [];
|
|
959
1011
|
loading = false;
|
|
1012
|
+
action = new EventEmitter();
|
|
960
1013
|
set items(value) {
|
|
961
1014
|
this.dataItems = this.parseArray(value ?? []);
|
|
962
1015
|
}
|
|
963
1016
|
set actions(value) {
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
1017
|
+
const arr = this.parseArray(value ?? []);
|
|
1018
|
+
this.dataActions = arr.map(this.normalizeAction);
|
|
1019
|
+
}
|
|
1020
|
+
onActionClick(a, item) {
|
|
1021
|
+
const name = a.name ?? '';
|
|
1022
|
+
const id = item?.id ?? '';
|
|
1023
|
+
this.action.emit({ name, id, item });
|
|
1024
|
+
const fn = a.action;
|
|
1025
|
+
if (typeof fn === 'function') {
|
|
1026
|
+
try {
|
|
1027
|
+
fn(name, id);
|
|
1028
|
+
}
|
|
1029
|
+
catch { }
|
|
1030
|
+
}
|
|
971
1031
|
}
|
|
972
|
-
|
|
1032
|
+
normalizeAction(a) {
|
|
1033
|
+
const icon = a?.icon ?? a?.iconClass ?? a?.leftIcon ?? null;
|
|
1034
|
+
const label = a?.label ?? a?.text ?? '';
|
|
973
1035
|
return {
|
|
974
|
-
|
|
975
|
-
|
|
1036
|
+
...a,
|
|
1037
|
+
icon,
|
|
1038
|
+
label,
|
|
1039
|
+
iconClass: icon,
|
|
1040
|
+
leftIcon: icon,
|
|
1041
|
+
text: label,
|
|
1042
|
+
priority: a?.priority ?? 'default',
|
|
1043
|
+
disabled: !!a?.disabled,
|
|
976
1044
|
};
|
|
977
1045
|
}
|
|
978
1046
|
parseArray(value) {
|
|
979
|
-
if (Array.isArray(value))
|
|
1047
|
+
if (Array.isArray(value))
|
|
980
1048
|
return value;
|
|
1049
|
+
if (typeof value === 'string') {
|
|
1050
|
+
try {
|
|
1051
|
+
const safe = value.trim().replace(/\\n/g, '').replace(/'/g, '"');
|
|
1052
|
+
return JSON.parse(safe);
|
|
1053
|
+
}
|
|
1054
|
+
catch (e) {
|
|
1055
|
+
console.warn('Error converting value to array:', value, e);
|
|
1056
|
+
}
|
|
981
1057
|
}
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
1058
|
+
return [];
|
|
1059
|
+
}
|
|
1060
|
+
actionKey(a) {
|
|
1061
|
+
return [
|
|
1062
|
+
String(a?.label ?? a?.text ?? ''),
|
|
1063
|
+
String(a?.icon ?? a?.iconClass ?? a?.leftIcon ?? ''),
|
|
1064
|
+
String(a?.priority ?? 'default'),
|
|
1065
|
+
String(!!a?.disabled)
|
|
1066
|
+
].join('|');
|
|
989
1067
|
}
|
|
990
1068
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
991
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ListComponent, isStandalone: true, selector: "sdc-list", inputs: { loading: "loading", items: "items", actions: "actions" }, ngImport: i0, template: "<
|
|
1069
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", 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 (onClick)=\"onActionClick(action, item)\" [disabled]=\"!!action.disabled\"\n [icon]=\"action.icon || $any(action).iconClass || $any(action).leftIcon\"\n [label]=\"action.label ?? $any(action).text\" [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\" [attr.priority]=\"action.priority || 'default'\"\n [attr.severity]=\"action.priority || 'default'\" [attr.data-key]=\"__k\">\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 id=\"my-empty-state\" iconClass=\"fa fa-inbox\" title=\"Nenhum registro encontrado\"\n primaryActionLabel=\"Recarregar\" description=\"Nenhum cadastro foi encontrado.\">\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>", 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$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.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: i2$3.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: i3$2.LoadingStateComponent, selector: "s-loading-state", inputs: ["indicator", "id", "blockWindow", "loading"] }] });
|
|
992
1070
|
}
|
|
993
1071
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ListComponent, decorators: [{
|
|
994
1072
|
type: Component,
|
|
995
|
-
args: [{
|
|
1073
|
+
args: [{ standalone: true, selector: 'sdc-list', imports: [CommonModule, ButtonComponent, EmptyStateModule, LoadingStateModule], 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 (onClick)=\"onActionClick(action, item)\" [disabled]=\"!!action.disabled\"\n [icon]=\"action.icon || $any(action).iconClass || $any(action).leftIcon\"\n [label]=\"action.label ?? $any(action).text\" [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\" [attr.priority]=\"action.priority || 'default'\"\n [attr.severity]=\"action.priority || 'default'\" [attr.data-key]=\"__k\">\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 id=\"my-empty-state\" iconClass=\"fa fa-inbox\" title=\"Nenhum registro encontrado\"\n primaryActionLabel=\"Recarregar\" description=\"Nenhum cadastro foi encontrado.\">\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>", 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"] }]
|
|
996
1074
|
}], propDecorators: { loading: [{
|
|
997
1075
|
type: Input
|
|
1076
|
+
}], action: [{
|
|
1077
|
+
type: Output
|
|
998
1078
|
}], items: [{
|
|
999
1079
|
type: Input
|
|
1000
1080
|
}], actions: [{
|
|
1001
1081
|
type: Input
|
|
1002
1082
|
}] } });
|
|
1003
1083
|
|
|
1084
|
+
class SearchboxComponent extends InputsComponent {
|
|
1085
|
+
value = '';
|
|
1086
|
+
triggerMode = 'auto';
|
|
1087
|
+
searchEvent = new EventEmitter();
|
|
1088
|
+
clearEvent = new EventEmitter();
|
|
1089
|
+
onInput(ev) {
|
|
1090
|
+
this.value = ev.target?.value ?? '';
|
|
1091
|
+
if (this.triggerMode === 'auto' && !this.disabled) {
|
|
1092
|
+
this.searchEvent.emit(this.value);
|
|
1093
|
+
}
|
|
1094
|
+
}
|
|
1095
|
+
onKeydown(ev) {
|
|
1096
|
+
if (this.triggerMode === 'submit' && ev.key === 'Enter' && !this.disabled) {
|
|
1097
|
+
this.searchEvent.emit(this.value);
|
|
1098
|
+
}
|
|
1099
|
+
}
|
|
1100
|
+
onSearch() {
|
|
1101
|
+
if (!this.disabled)
|
|
1102
|
+
this.searchEvent.emit(this.value);
|
|
1103
|
+
}
|
|
1104
|
+
onClear() {
|
|
1105
|
+
this.value = '';
|
|
1106
|
+
this.clearEvent.emit();
|
|
1107
|
+
if (this.triggerMode === 'auto' && !this.disabled) {
|
|
1108
|
+
this.searchEvent.emit(this.value);
|
|
1109
|
+
}
|
|
1110
|
+
}
|
|
1111
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SearchboxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1112
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", 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-inputgroupaddon{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;padding:0rem!important}.sdc-searchbox ::ng-deep .p-inputtext:disabled{background-color:var(--sdc-formfield-disabled-bg)!important}.sdc-searchbox ::ng-deep .p-inputtext{border:1px solid var(--sdc-formfield-default-border)!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 s-button{background-color:var(--sdc-button-bg)!important;color:var(--sdc-button-icon-default)!important}.sdc-searchbox ::ng-deep .p-inputgroupaddon{background-color:var(--sdc-formfield-disabled-bg)!important}.sdc-searchbox ::ng-deep .p-inputgroupaddon s-button i{color:var(--sdc-button-icon-default)!important}.sdc-searchbox ::ng-deep .p-inputgroupaddon:hover:has(s-button button:not(:disabled)){transition:var(--sdc-button-bg-hover-transition)!important;background-color:var(--sdc-button-bg-hover)!important}.sdc-searchbox ::ng-deep .p-inputgroupaddon s-button button:focus{border-color:var(--sdc-formfield-default-border)!important}.sdc-searchbox ::ng-deep .p-inputgroupaddon s-button button:first-child{border-color:var(--sdc-formfield-default-border)!important;border-width:1px 0px 1px 0px!important;border-radius:0 0 0 6px}.sdc-searchbox ::ng-deep .p-inputgroupaddon:last-child s-button button{border-color:var(--sdc-formfield-default-border)!important;border-width:1px 0px 1px 0!important;border-radius:0 6px 6px 0}.sdc-searchbox ::ng-deep .p-inputgroupaddon:first-child s-button button{border-start-start-radius:var(--sdc-formfield-border-radius)!important;border-end-start-radius:var(--sdc-formfield-border-radius)!important}\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$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: "directive", type: i4.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: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.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.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: i3$1.TranslatePipe, name: "translate" }] });
|
|
1113
|
+
}
|
|
1114
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SearchboxComponent, decorators: [{
|
|
1115
|
+
type: Component,
|
|
1116
|
+
args: [{ imports: [
|
|
1117
|
+
ButtonModule,
|
|
1118
|
+
CommonModule,
|
|
1119
|
+
FormsModule,
|
|
1120
|
+
InputGroupAddonModule,
|
|
1121
|
+
InputGroupModule,
|
|
1122
|
+
InputTextModule,
|
|
1123
|
+
ReactiveFormsModule,
|
|
1124
|
+
TranslateModule,
|
|
1125
|
+
], standalone: true, selector: 'sdc-searchbox', 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-inputgroupaddon{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;padding:0rem!important}.sdc-searchbox ::ng-deep .p-inputtext:disabled{background-color:var(--sdc-formfield-disabled-bg)!important}.sdc-searchbox ::ng-deep .p-inputtext{border:1px solid var(--sdc-formfield-default-border)!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 s-button{background-color:var(--sdc-button-bg)!important;color:var(--sdc-button-icon-default)!important}.sdc-searchbox ::ng-deep .p-inputgroupaddon{background-color:var(--sdc-formfield-disabled-bg)!important}.sdc-searchbox ::ng-deep .p-inputgroupaddon s-button i{color:var(--sdc-button-icon-default)!important}.sdc-searchbox ::ng-deep .p-inputgroupaddon:hover:has(s-button button:not(:disabled)){transition:var(--sdc-button-bg-hover-transition)!important;background-color:var(--sdc-button-bg-hover)!important}.sdc-searchbox ::ng-deep .p-inputgroupaddon s-button button:focus{border-color:var(--sdc-formfield-default-border)!important}.sdc-searchbox ::ng-deep .p-inputgroupaddon s-button button:first-child{border-color:var(--sdc-formfield-default-border)!important;border-width:1px 0px 1px 0px!important;border-radius:0 0 0 6px}.sdc-searchbox ::ng-deep .p-inputgroupaddon:last-child s-button button{border-color:var(--sdc-formfield-default-border)!important;border-width:1px 0px 1px 0!important;border-radius:0 6px 6px 0}.sdc-searchbox ::ng-deep .p-inputgroupaddon:first-child s-button button{border-start-start-radius:var(--sdc-formfield-border-radius)!important;border-end-start-radius:var(--sdc-formfield-border-radius)!important}\n"] }]
|
|
1126
|
+
}], propDecorators: { triggerMode: [{
|
|
1127
|
+
type: Input
|
|
1128
|
+
}], searchEvent: [{
|
|
1129
|
+
type: Output,
|
|
1130
|
+
args: ['onSearch']
|
|
1131
|
+
}], clearEvent: [{
|
|
1132
|
+
type: Output,
|
|
1133
|
+
args: ['onClear']
|
|
1134
|
+
}] } });
|
|
1135
|
+
|
|
1136
|
+
class TableComponent {
|
|
1137
|
+
cols = [];
|
|
1138
|
+
data = [];
|
|
1139
|
+
loading = false;
|
|
1140
|
+
config = DEFAULT_TABLE_OPTIONS;
|
|
1141
|
+
action = new EventEmitter();
|
|
1142
|
+
isMobile = isMobile();
|
|
1143
|
+
showSearch = computed(() => this.options().search?.show ?? false);
|
|
1144
|
+
showPaginator = computed(() => this.options().pagination?.show ?? false);
|
|
1145
|
+
rowsPerPageOptions = computed(() => this.options().pagination?.rowsPerPageOptions ?? []);
|
|
1146
|
+
searchPlaceholder = computed(() => this.options().search?.placeholder ?? '');
|
|
1147
|
+
triggerMode = computed(() => this.options().search?.type ?? 'auto');
|
|
1148
|
+
totalRecordsLabel = computed(() => this.options().table?.totalRecordsLabel ?? '');
|
|
1149
|
+
emptyTitle = computed(() => this.options().empty?.title ?? '');
|
|
1150
|
+
emptyText = computed(() => this.options().empty?.text ?? '');
|
|
1151
|
+
options = signal(DEFAULT_TABLE_OPTIONS);
|
|
1152
|
+
globalFilter = signal('');
|
|
1153
|
+
sortField = signal(null);
|
|
1154
|
+
sortOrder = signal(0);
|
|
1155
|
+
selection = signal([]);
|
|
1156
|
+
first = signal(0);
|
|
1157
|
+
rows = signal(DEFAULT_TABLE_OPTIONS.pagination?.rowsPerPage ?? 10);
|
|
1158
|
+
cellCfg(kind) {
|
|
1159
|
+
return (this.options().cells?.[kind] ?? {});
|
|
1160
|
+
}
|
|
1161
|
+
tagsOf(row, col) {
|
|
1162
|
+
const raw = this._(row, col.field);
|
|
1163
|
+
const arr = Array.isArray(raw) ? raw : [];
|
|
1164
|
+
const max = this.options().cells?.tag?.maxItems;
|
|
1165
|
+
return typeof max === 'number' ? arr.slice(0, max) : arr;
|
|
1166
|
+
}
|
|
1167
|
+
filteredData = computed(() => {
|
|
1168
|
+
const q = this.globalFilter().trim().toLowerCase();
|
|
1169
|
+
if (!q)
|
|
1170
|
+
return this.data;
|
|
1171
|
+
const fields = this.cols.filter(c => c.searchable ?? true).filter(c => !!c.field).map(c => c.field);
|
|
1172
|
+
if (fields.length === 0)
|
|
1173
|
+
return this.data;
|
|
1174
|
+
return this.data.filter(row => fields.some(f => {
|
|
1175
|
+
const v = this._(row, f);
|
|
1176
|
+
if (Array.isArray(v))
|
|
1177
|
+
return v.join(' ').toLowerCase().includes(q);
|
|
1178
|
+
return String(v ?? '').toLowerCase().includes(q);
|
|
1179
|
+
}));
|
|
1180
|
+
});
|
|
1181
|
+
sortedData = computed(() => {
|
|
1182
|
+
const field = this.sortField();
|
|
1183
|
+
const order = this.sortOrder();
|
|
1184
|
+
const arr = [...this.filteredData()];
|
|
1185
|
+
if (!field || order === 0)
|
|
1186
|
+
return arr;
|
|
1187
|
+
return arr.sort((a, b) => {
|
|
1188
|
+
const va = this._(a, field);
|
|
1189
|
+
const vb = this._(b, field);
|
|
1190
|
+
if (va == null && vb == null)
|
|
1191
|
+
return 0;
|
|
1192
|
+
if (va == null)
|
|
1193
|
+
return -order;
|
|
1194
|
+
if (vb == null)
|
|
1195
|
+
return order;
|
|
1196
|
+
if (typeof va === 'number' && typeof vb === 'number')
|
|
1197
|
+
return (va - vb) * order;
|
|
1198
|
+
return String(va).localeCompare(String(vb)) * order;
|
|
1199
|
+
});
|
|
1200
|
+
});
|
|
1201
|
+
totalRecords = computed(() => this.sortedData().length);
|
|
1202
|
+
pageData = computed(() => {
|
|
1203
|
+
const start = this.first();
|
|
1204
|
+
const end = start + this.rows();
|
|
1205
|
+
return this.sortedData().slice(start, end);
|
|
1206
|
+
});
|
|
1207
|
+
configHash = '';
|
|
1208
|
+
constructor() { }
|
|
1209
|
+
ngOnChanges(changes) {
|
|
1210
|
+
if (changes['config']) {
|
|
1211
|
+
this.applyConfigOptions();
|
|
1212
|
+
this.rows.set(this.options().pagination?.rowsPerPage ?? 10);
|
|
1213
|
+
this.first.set(0);
|
|
1214
|
+
this.configHash = this.stableStringify(this.config);
|
|
1215
|
+
}
|
|
1216
|
+
}
|
|
1217
|
+
ngDoCheck() {
|
|
1218
|
+
const nextHash = this.stableStringify(this.config);
|
|
1219
|
+
if (nextHash !== this.configHash) {
|
|
1220
|
+
this.configHash = nextHash;
|
|
1221
|
+
this.applyConfigOptions();
|
|
1222
|
+
this.rows.set(this.options().pagination?.rowsPerPage ?? 10);
|
|
1223
|
+
this.first.set(0);
|
|
1224
|
+
}
|
|
1225
|
+
}
|
|
1226
|
+
onSearchTerm(evOrVal) {
|
|
1227
|
+
const term = typeof evOrVal === 'string'
|
|
1228
|
+
? evOrVal
|
|
1229
|
+
: evOrVal?.detail ?? '';
|
|
1230
|
+
this.globalFilter.set(String(term));
|
|
1231
|
+
this.first.set(0);
|
|
1232
|
+
}
|
|
1233
|
+
onClearSearch(_ev) {
|
|
1234
|
+
this.globalFilter.set('');
|
|
1235
|
+
this.first.set(0);
|
|
1236
|
+
}
|
|
1237
|
+
toggleSort(field, enabled = true) {
|
|
1238
|
+
if (!enabled)
|
|
1239
|
+
return;
|
|
1240
|
+
if (this.sortField() !== field) {
|
|
1241
|
+
this.sortField.set(field);
|
|
1242
|
+
this.sortOrder.set(1);
|
|
1243
|
+
}
|
|
1244
|
+
else {
|
|
1245
|
+
const order = this.sortOrder();
|
|
1246
|
+
if (order === 1)
|
|
1247
|
+
this.sortOrder.set(-1);
|
|
1248
|
+
else if (order === -1) {
|
|
1249
|
+
this.sortOrder.set(0);
|
|
1250
|
+
this.sortField.set(null);
|
|
1251
|
+
}
|
|
1252
|
+
else {
|
|
1253
|
+
this.sortOrder.set(1);
|
|
1254
|
+
this.sortField.set(field);
|
|
1255
|
+
}
|
|
1256
|
+
}
|
|
1257
|
+
this.first.set(0);
|
|
1258
|
+
}
|
|
1259
|
+
onPageChange(e) {
|
|
1260
|
+
this.first.set(e.first ?? 0);
|
|
1261
|
+
this.rows.set(e.rows ?? this.options().pagination?.rowsPerPage ?? 10);
|
|
1262
|
+
}
|
|
1263
|
+
getCheckedValue(event) {
|
|
1264
|
+
return event.target.checked;
|
|
1265
|
+
}
|
|
1266
|
+
onToggleRow(row, checked) {
|
|
1267
|
+
const sel = new Set(this.selection());
|
|
1268
|
+
checked ? sel.add(row) : sel.delete(row);
|
|
1269
|
+
this.selection.set([...sel]);
|
|
1270
|
+
}
|
|
1271
|
+
isRowSelected(row) {
|
|
1272
|
+
return this.selection().includes(row);
|
|
1273
|
+
}
|
|
1274
|
+
toggleSelectPage(checked) {
|
|
1275
|
+
const sel = new Set(this.selection());
|
|
1276
|
+
this.pageData().forEach(r => (checked ? sel.add(r) : sel.delete(r)));
|
|
1277
|
+
this.selection.set([...sel]);
|
|
1278
|
+
}
|
|
1279
|
+
isPageFullySelected() {
|
|
1280
|
+
const visible = this.pageData();
|
|
1281
|
+
return visible.length > 0 && visible.every(r => this.selection().includes(r));
|
|
1282
|
+
}
|
|
1283
|
+
_ = (obj, path) => path.split('.').reduce((acc, part) => {
|
|
1284
|
+
if (acc !== null && typeof acc === 'object')
|
|
1285
|
+
return acc[part];
|
|
1286
|
+
return undefined;
|
|
1287
|
+
}, obj);
|
|
1288
|
+
formatDate(value, _format = 'shortDate') {
|
|
1289
|
+
try {
|
|
1290
|
+
return new Intl.DateTimeFormat(undefined).format(new Date(value));
|
|
1291
|
+
}
|
|
1292
|
+
catch {
|
|
1293
|
+
return String(value ?? '');
|
|
1294
|
+
}
|
|
1295
|
+
}
|
|
1296
|
+
formatCurrency(value, currency = 'BRL') {
|
|
1297
|
+
const n = Number(value);
|
|
1298
|
+
if (Number.isNaN(n))
|
|
1299
|
+
return String(value ?? '');
|
|
1300
|
+
return new Intl.NumberFormat(undefined, { style: 'currency', currency }).format(n);
|
|
1301
|
+
}
|
|
1302
|
+
applyConfigOptions() {
|
|
1303
|
+
const cfg = this.config || DEFAULT_TABLE_OPTIONS;
|
|
1304
|
+
this.options.set({
|
|
1305
|
+
...DEFAULT_TABLE_OPTIONS,
|
|
1306
|
+
...cfg,
|
|
1307
|
+
search: { ...DEFAULT_TABLE_OPTIONS.search, ...cfg.search },
|
|
1308
|
+
table: { ...DEFAULT_TABLE_OPTIONS.table, ...cfg.table },
|
|
1309
|
+
empty: { ...DEFAULT_TABLE_OPTIONS.empty, ...cfg.empty },
|
|
1310
|
+
pagination: { ...DEFAULT_TABLE_OPTIONS.pagination, ...cfg.pagination },
|
|
1311
|
+
cells: {
|
|
1312
|
+
checkbox: { ...(DEFAULT_TABLE_OPTIONS.cells?.checkbox ?? {}), ...(cfg.cells?.checkbox ?? {}) },
|
|
1313
|
+
button: { ...(DEFAULT_TABLE_OPTIONS.cells?.button ?? {}), ...(cfg.cells?.button ?? {}) },
|
|
1314
|
+
tag: { ...(DEFAULT_TABLE_OPTIONS.cells?.tag ?? {}), ...(cfg.cells?.tag ?? {}) },
|
|
1315
|
+
},
|
|
1316
|
+
});
|
|
1317
|
+
}
|
|
1318
|
+
stableStringify(obj) {
|
|
1319
|
+
const seen = new WeakSet();
|
|
1320
|
+
const replacer = (_k, v) => {
|
|
1321
|
+
if (v && typeof v === 'object') {
|
|
1322
|
+
const asObj = v;
|
|
1323
|
+
if (seen.has(asObj))
|
|
1324
|
+
return;
|
|
1325
|
+
seen.add(asObj);
|
|
1326
|
+
if (Array.isArray(v))
|
|
1327
|
+
return v;
|
|
1328
|
+
const o = v;
|
|
1329
|
+
return Object.keys(o).sort().reduce((acc, key) => {
|
|
1330
|
+
acc[key] = o[key];
|
|
1331
|
+
return acc;
|
|
1332
|
+
}, {});
|
|
1333
|
+
}
|
|
1334
|
+
if (typeof v === 'function' || typeof v === 'undefined')
|
|
1335
|
+
return undefined;
|
|
1336
|
+
return v;
|
|
1337
|
+
};
|
|
1338
|
+
try {
|
|
1339
|
+
return JSON.stringify(obj ?? {}, replacer);
|
|
1340
|
+
}
|
|
1341
|
+
catch {
|
|
1342
|
+
return JSON.stringify(obj ?? {});
|
|
1343
|
+
}
|
|
1344
|
+
}
|
|
1345
|
+
onButtonClick(row, col) {
|
|
1346
|
+
const key = (col.actionField ?? col.field);
|
|
1347
|
+
const value = key ? this._(row, key) : undefined;
|
|
1348
|
+
this.action.emit({ column: col, row, value });
|
|
1349
|
+
}
|
|
1350
|
+
buttonKey(row, col, opt) {
|
|
1351
|
+
const actKey = (col.actionField ?? col.field ?? '');
|
|
1352
|
+
const actVal = actKey ? String(this._(row, actKey) ?? '') : '';
|
|
1353
|
+
return [
|
|
1354
|
+
String(opt?.label ?? ''),
|
|
1355
|
+
String(opt?.icon ?? ''),
|
|
1356
|
+
String(opt?.priority ?? ''),
|
|
1357
|
+
String(opt?.size ?? ''),
|
|
1358
|
+
String(opt?.tooltip ?? ''),
|
|
1359
|
+
actVal
|
|
1360
|
+
].join('|');
|
|
1361
|
+
}
|
|
1362
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1363
|
+
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 class=\"sdc-table\" [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 [disabled]=\"loading\" [placeholder]=\"searchPlaceholder()\" [triggerMode]=\"triggerMode()\"\n (onSearch)=\"onSearchTerm($event)\" (onClear)=\"onClearSearch()\" />\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 [class.sdc-table-th-checkbox]=\"col.type === 'checkbox-selection'\"\n (click)=\"toggleSort(col.field!, col.sortable !== false)\" [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) {\n @case ('checkbox-selection') {\n <span class=\"sdc-table-th-label\">{{ col.header }}</span>\n }\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 }\n </div>\n\n <span class=\"sdc-table-th-center\"\n *ngIf=\"col.type === 'checkbox-selection' && (cellCfg('checkbox').selectAll ?? true)\">\n <input type=\"checkbox\" [checked]=\"isPageFullySelected()\" (click)=\"$event.stopPropagation()\"\n (change)=\"toggleSelectPage(getCheckedValue($event))\" />\n </span>\n </th>\n }\n </tr>\n </thead>\n\n <tbody>\n @if (loading) { } @else {\n @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\n <td 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\" [attr.data-title]=\"col.header\"\n (click)=\"toggleSort(col.field!, col.sortable !== false)\">\n <div class=\"sdc-table-td-val\">\n <ng-container [ngTemplateOutlet]=\"cellTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row, col: col }\"></ng-container>\n </div>\n </td>\n </div>\n </ng-container>\n\n <ng-template #desktopContent>\n <td class=\"sdc-table-td sdc-table-tdc\" [class.sdc-table-td-checkbox]=\"col.type === 'checkbox-selection'\"\n [class.sdc-table-is-selected]=\"sortField() === col.field\" [attr.data-title]=\"col.header\">\n <div class=\"sdc-table-td-val\">\n <ng-container [ngTemplateOutlet]=\"cellTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row, col: col }\"></ng-container>\n </div>\n </td>\n </ng-template>\n }\n </tr>\n }\n }\n </tbody>\n </table>\n\n <s-empty-state *ngIf=\"!loading && options().empty?.show !== false && totalRecords() === 0\" id=\"my-empty-state\"\n iconClass=\"fa fa-inbox\" [title]=\"emptyTitle()\" [description]=\"emptyText()\" class=\"sdc-table-empty-state\">\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 <p-paginator [dropdownAppendTo]=\"'body'\" [first]=\"first()\" [rows]=\"rows()\" [totalRecords]=\"totalRecords()\"\n [rowsPerPageOptions]=\"isMobile ? undefined : rowsPerPageOptions()\" [showFirstLastIcon]=\"!isMobile\"\n (onPageChange)=\"onPageChange($event)\">\n <ng-template pTemplate=\"dropdownicon\"><i class=\"fas fa-caret-down\"></i></ng-template>\n <ng-template pTemplate=\"firstpagelinkicon\"><i class=\"fas fa-step-forward fa-rotate-180\"></i></ng-template>\n <ng-template pTemplate=\"previouspagelinkicon\"><i class=\"fas fa-caret-left\"></i></ng-template>\n <ng-template pTemplate=\"nextpagelinkicon\"><i class=\"fas fa-caret-right\"></i></ng-template>\n <ng-template pTemplate=\"lastpagelinkicon\"><i class=\"fas fa-step-forward\"></i></ng-template>\n </p-paginator>\n\n <span *ngIf=\"!isMobile\">\n {{ totalRecordsLabel() }}: {{ totalRecords() }}\n </span>\n </div>\n\n <ng-template #cellTpl let-row let-col=\" col\">\n @switch (col.type) {\n @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 }\n\n @case ('date') { {{ formatDate(_(row, col.field), col.format || 'shortDate') }} }\n\n @case ('currency') { {{ formatCurrency(_(row, col.field), col.format || 'BRL') }} }\n\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 class=\"sdc-table-tag\" [style.background]=\"tagOptions.backgroundColor || null\"\n [style.color]=\"tagOptions.color || null\" [attr.title]=\"tagOptions.tooltip\">\n <i *ngIf=\"tagOptions.icon\" [class]=\"tagOptions.icon\"></i>\n {{ tag }}\n </span>\n }\n </div>\n </ng-container>\n }\n\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\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\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\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 }\n @default { {{ _(row, col.field) }} }\n }\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 *ngIf=\"sortField() === col.field && sortOrder() === 1\"\n class=\"fas fa-sort-amount-up-alt sdc-table-sort-active\"></i>\n <i *ngIf=\"sortField() === col.field && sortOrder() === -1\"\n class=\"fas fa-sort-amount-down sdc-table-sort-active\"></i>\n </span>\n <span *ngIf=\"col.sortable === false || col.type === 'checkbox-selection'\"\n class=\"sdc-table-sort-indicator sdc-table-sort-indicator-placeholder\"></span>\n</ng-template>", 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-paginator{justify-content:center!important}.sdc-table-sort-indicator{gap:.15rem;min-width:1.2rem}.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}.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-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-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-indicator-placeholder{width:1.4rem;height:1rem;display:inline-block}.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}.sdc-table-paginator{display:flex;width:100%;justify-content:space-between;align-items:center;padding:.75em;box-sizing:border-box}.sdc-table-paginator ::ng-deep .p-paginator{text-align:left;background:var(--sdc-table-bg-card);border-color:transparent;gap:0;display:flex}.sdc-table-paginator ::ng-deep .p-paginator .p-paginator-element{font-weight:400}.sdc-table-paginator ::ng-deep .p-paginator .p-paginator-right-content{margin-left:auto;height:100%;padding-top:5px;padding-left:20px}.sdc-table-paginator ::ng-deep .p-paginator .p-paginator-first .p-paginator-icon,.sdc-table-paginator ::ng-deep .p-paginator .p-paginator-last .p-paginator-icon{font-size:12px}.sdc-table-paginator ::ng-deep .p-paginator .p-paginator-pages{padding:0;margin:0;white-space:nowrap;gap:0}.sdc-table-paginator ::ng-deep .p-paginator .p-paginator-pages .p-paginator-page-selected{color:#fff!important;border:1px solid #428bca;background:#428bca}.sdc-table-paginator ::ng-deep .p-paginator .p-paginator-pages .p-paginator-page-selected:hover{background-color:#6aa3d5!important;border-color:#6aa3d5!important}.sdc-table-paginator ::ng-deep .p-paginator .p-paginator-first,.sdc-table-paginator ::ng-deep .p-paginator .p-paginator-prev,.sdc-table-paginator ::ng-deep .p-paginator .p-paginator-next,.sdc-table-paginator ::ng-deep .p-paginator .p-paginator-last,.sdc-table-paginator ::ng-deep .p-paginator .p-paginator-pages .p-paginator-page{padding:.4em .25em;color:#428bca;transition:background-color .2s ease-out;border-radius:0;border:1px solid #cccccc;border-width:1px 0 1px 1px;text-align:center;min-width:var(--sdc-table-paginator-size);height:var(--sdc-table-paginator-size);margin:0}.sdc-table-paginator ::ng-deep .p-paginator .p-paginator-first:hover,.sdc-table-paginator ::ng-deep .p-paginator .p-paginator-prev:hover,.sdc-table-paginator ::ng-deep .p-paginator .p-paginator-next:hover,.sdc-table-paginator ::ng-deep .p-paginator .p-paginator-last:hover,.sdc-table-paginator ::ng-deep .p-paginator .p-paginator-pages .p-paginator-page:hover{background-color:#f7f7f7}.sdc-table-paginator ::ng-deep .p-paginator .p-paginator-first.p-highlight:hover,.sdc-table-paginator ::ng-deep .p-paginator .p-paginator-prev.p-highlight:hover,.sdc-table-paginator ::ng-deep .p-paginator .p-paginator-next.p-highlight:hover,.sdc-table-paginator ::ng-deep .p-paginator .p-paginator-last.p-highlight:hover,.sdc-table-paginator ::ng-deep .p-paginator .p-paginator-pages .p-paginator-page.p-highlight:hover{background-color:#6aa3d5;border-color:#6aa3d5}.sdc-table-paginator ::ng-deep .p-paginator .p-paginator-first{border-radius:4px 0 0 4px}.sdc-table-paginator ::ng-deep .p-paginator .p-paginator-last{border-right-width:1px;border-radius:0 4px 4px 0}.sdc-table-paginator ::ng-deep .p-select{margin-left:34px}.sdc-table-paginator ::ng-deep .p-select-label{height:34px;padding:6px 17px}.sdc-table-paginator ::ng-deep .p-select-dropdown{border-left:1px solid #cccccc}\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: "ngmodule", type: PaginatorModule }, { kind: "component", type: i2$4.Paginator, selector: "p-paginator", inputs: ["pageLinkSize", "style", "styleClass", "alwaysShow", "dropdownAppendTo", "templateLeft", "templateRight", "appendTo", "dropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showFirstLastIcon", "totalRecords", "rows", "rowsPerPageOptions", "showJumpToPageDropdown", "showJumpToPageInput", "jumpToPageItemTemplate", "showPageLinks", "locale", "dropdownItemTemplate", "first"], outputs: ["onPageChange"] }, { kind: "directive", type: i2$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { 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: i3$2.LoadingStateComponent, selector: "s-loading-state", inputs: ["indicator", "id", "blockWindow", "loading"] }, { kind: "ngmodule", type: EmptyStateModule }, { kind: "component", type: i2$3.EmptyStateComponent, selector: "s-empty-state", inputs: ["id", "title", "iconClass", "description", "showPrimaryAction", "showSecondaryAction", "primaryActionLabel", "secondaryActionLabel", "primaryModel"], outputs: ["primaryAction", "secondaryAction"] }] });
|
|
1364
|
+
}
|
|
1365
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TableComponent, decorators: [{
|
|
1366
|
+
type: Component,
|
|
1367
|
+
args: [{ selector: 'sdc-table', standalone: true, imports: [CommonModule, SearchboxComponent, PaginatorModule, ButtonComponent, LoadingStateModule, EmptyStateModule], template: "<div class=\"sdc-table\" [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 [disabled]=\"loading\" [placeholder]=\"searchPlaceholder()\" [triggerMode]=\"triggerMode()\"\n (onSearch)=\"onSearchTerm($event)\" (onClear)=\"onClearSearch()\" />\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 [class.sdc-table-th-checkbox]=\"col.type === 'checkbox-selection'\"\n (click)=\"toggleSort(col.field!, col.sortable !== false)\" [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) {\n @case ('checkbox-selection') {\n <span class=\"sdc-table-th-label\">{{ col.header }}</span>\n }\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 }\n </div>\n\n <span class=\"sdc-table-th-center\"\n *ngIf=\"col.type === 'checkbox-selection' && (cellCfg('checkbox').selectAll ?? true)\">\n <input type=\"checkbox\" [checked]=\"isPageFullySelected()\" (click)=\"$event.stopPropagation()\"\n (change)=\"toggleSelectPage(getCheckedValue($event))\" />\n </span>\n </th>\n }\n </tr>\n </thead>\n\n <tbody>\n @if (loading) { } @else {\n @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\n <td 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\" [attr.data-title]=\"col.header\"\n (click)=\"toggleSort(col.field!, col.sortable !== false)\">\n <div class=\"sdc-table-td-val\">\n <ng-container [ngTemplateOutlet]=\"cellTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row, col: col }\"></ng-container>\n </div>\n </td>\n </div>\n </ng-container>\n\n <ng-template #desktopContent>\n <td class=\"sdc-table-td sdc-table-tdc\" [class.sdc-table-td-checkbox]=\"col.type === 'checkbox-selection'\"\n [class.sdc-table-is-selected]=\"sortField() === col.field\" [attr.data-title]=\"col.header\">\n <div class=\"sdc-table-td-val\">\n <ng-container [ngTemplateOutlet]=\"cellTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row, col: col }\"></ng-container>\n </div>\n </td>\n </ng-template>\n }\n </tr>\n }\n }\n </tbody>\n </table>\n\n <s-empty-state *ngIf=\"!loading && options().empty?.show !== false && totalRecords() === 0\" id=\"my-empty-state\"\n iconClass=\"fa fa-inbox\" [title]=\"emptyTitle()\" [description]=\"emptyText()\" class=\"sdc-table-empty-state\">\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 <p-paginator [dropdownAppendTo]=\"'body'\" [first]=\"first()\" [rows]=\"rows()\" [totalRecords]=\"totalRecords()\"\n [rowsPerPageOptions]=\"isMobile ? undefined : rowsPerPageOptions()\" [showFirstLastIcon]=\"!isMobile\"\n (onPageChange)=\"onPageChange($event)\">\n <ng-template pTemplate=\"dropdownicon\"><i class=\"fas fa-caret-down\"></i></ng-template>\n <ng-template pTemplate=\"firstpagelinkicon\"><i class=\"fas fa-step-forward fa-rotate-180\"></i></ng-template>\n <ng-template pTemplate=\"previouspagelinkicon\"><i class=\"fas fa-caret-left\"></i></ng-template>\n <ng-template pTemplate=\"nextpagelinkicon\"><i class=\"fas fa-caret-right\"></i></ng-template>\n <ng-template pTemplate=\"lastpagelinkicon\"><i class=\"fas fa-step-forward\"></i></ng-template>\n </p-paginator>\n\n <span *ngIf=\"!isMobile\">\n {{ totalRecordsLabel() }}: {{ totalRecords() }}\n </span>\n </div>\n\n <ng-template #cellTpl let-row let-col=\" col\">\n @switch (col.type) {\n @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 }\n\n @case ('date') { {{ formatDate(_(row, col.field), col.format || 'shortDate') }} }\n\n @case ('currency') { {{ formatCurrency(_(row, col.field), col.format || 'BRL') }} }\n\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 class=\"sdc-table-tag\" [style.background]=\"tagOptions.backgroundColor || null\"\n [style.color]=\"tagOptions.color || null\" [attr.title]=\"tagOptions.tooltip\">\n <i *ngIf=\"tagOptions.icon\" [class]=\"tagOptions.icon\"></i>\n {{ tag }}\n </span>\n }\n </div>\n </ng-container>\n }\n\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\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\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\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 }\n @default { {{ _(row, col.field) }} }\n }\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 *ngIf=\"sortField() === col.field && sortOrder() === 1\"\n class=\"fas fa-sort-amount-up-alt sdc-table-sort-active\"></i>\n <i *ngIf=\"sortField() === col.field && sortOrder() === -1\"\n class=\"fas fa-sort-amount-down sdc-table-sort-active\"></i>\n </span>\n <span *ngIf=\"col.sortable === false || col.type === 'checkbox-selection'\"\n class=\"sdc-table-sort-indicator sdc-table-sort-indicator-placeholder\"></span>\n</ng-template>", 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-paginator{justify-content:center!important}.sdc-table-sort-indicator{gap:.15rem;min-width:1.2rem}.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}.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-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-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-indicator-placeholder{width:1.4rem;height:1rem;display:inline-block}.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}.sdc-table-paginator{display:flex;width:100%;justify-content:space-between;align-items:center;padding:.75em;box-sizing:border-box}.sdc-table-paginator ::ng-deep .p-paginator{text-align:left;background:var(--sdc-table-bg-card);border-color:transparent;gap:0;display:flex}.sdc-table-paginator ::ng-deep .p-paginator .p-paginator-element{font-weight:400}.sdc-table-paginator ::ng-deep .p-paginator .p-paginator-right-content{margin-left:auto;height:100%;padding-top:5px;padding-left:20px}.sdc-table-paginator ::ng-deep .p-paginator .p-paginator-first .p-paginator-icon,.sdc-table-paginator ::ng-deep .p-paginator .p-paginator-last .p-paginator-icon{font-size:12px}.sdc-table-paginator ::ng-deep .p-paginator .p-paginator-pages{padding:0;margin:0;white-space:nowrap;gap:0}.sdc-table-paginator ::ng-deep .p-paginator .p-paginator-pages .p-paginator-page-selected{color:#fff!important;border:1px solid #428bca;background:#428bca}.sdc-table-paginator ::ng-deep .p-paginator .p-paginator-pages .p-paginator-page-selected:hover{background-color:#6aa3d5!important;border-color:#6aa3d5!important}.sdc-table-paginator ::ng-deep .p-paginator .p-paginator-first,.sdc-table-paginator ::ng-deep .p-paginator .p-paginator-prev,.sdc-table-paginator ::ng-deep .p-paginator .p-paginator-next,.sdc-table-paginator ::ng-deep .p-paginator .p-paginator-last,.sdc-table-paginator ::ng-deep .p-paginator .p-paginator-pages .p-paginator-page{padding:.4em .25em;color:#428bca;transition:background-color .2s ease-out;border-radius:0;border:1px solid #cccccc;border-width:1px 0 1px 1px;text-align:center;min-width:var(--sdc-table-paginator-size);height:var(--sdc-table-paginator-size);margin:0}.sdc-table-paginator ::ng-deep .p-paginator .p-paginator-first:hover,.sdc-table-paginator ::ng-deep .p-paginator .p-paginator-prev:hover,.sdc-table-paginator ::ng-deep .p-paginator .p-paginator-next:hover,.sdc-table-paginator ::ng-deep .p-paginator .p-paginator-last:hover,.sdc-table-paginator ::ng-deep .p-paginator .p-paginator-pages .p-paginator-page:hover{background-color:#f7f7f7}.sdc-table-paginator ::ng-deep .p-paginator .p-paginator-first.p-highlight:hover,.sdc-table-paginator ::ng-deep .p-paginator .p-paginator-prev.p-highlight:hover,.sdc-table-paginator ::ng-deep .p-paginator .p-paginator-next.p-highlight:hover,.sdc-table-paginator ::ng-deep .p-paginator .p-paginator-last.p-highlight:hover,.sdc-table-paginator ::ng-deep .p-paginator .p-paginator-pages .p-paginator-page.p-highlight:hover{background-color:#6aa3d5;border-color:#6aa3d5}.sdc-table-paginator ::ng-deep .p-paginator .p-paginator-first{border-radius:4px 0 0 4px}.sdc-table-paginator ::ng-deep .p-paginator .p-paginator-last{border-right-width:1px;border-radius:0 4px 4px 0}.sdc-table-paginator ::ng-deep .p-select{margin-left:34px}.sdc-table-paginator ::ng-deep .p-select-label{height:34px;padding:6px 17px}.sdc-table-paginator ::ng-deep .p-select-dropdown{border-left:1px solid #cccccc}\n"] }]
|
|
1368
|
+
}], ctorParameters: () => [], propDecorators: { cols: [{
|
|
1369
|
+
type: Input,
|
|
1370
|
+
args: [{ required: true }]
|
|
1371
|
+
}], data: [{
|
|
1372
|
+
type: Input,
|
|
1373
|
+
args: [{ required: true }]
|
|
1374
|
+
}], loading: [{
|
|
1375
|
+
type: Input,
|
|
1376
|
+
args: [{ required: false }]
|
|
1377
|
+
}], config: [{
|
|
1378
|
+
type: Input,
|
|
1379
|
+
args: [{ required: false }]
|
|
1380
|
+
}], action: [{
|
|
1381
|
+
type: Output
|
|
1382
|
+
}] } });
|
|
1383
|
+
|
|
1384
|
+
class TabComponent {
|
|
1385
|
+
host = inject(ElementRef);
|
|
1386
|
+
zone = inject(NgZone);
|
|
1387
|
+
destroyRef = inject(DestroyRef);
|
|
1388
|
+
cdr = inject(ChangeDetectorRef);
|
|
1389
|
+
headersRef;
|
|
1390
|
+
_activeIndex = signal(0);
|
|
1391
|
+
set activeIndex(v) {
|
|
1392
|
+
this.zone.run(() => {
|
|
1393
|
+
const idx = this.normalizeIndex(v);
|
|
1394
|
+
if (idx === this._activeIndex())
|
|
1395
|
+
return;
|
|
1396
|
+
this._activeIndex.set(idx);
|
|
1397
|
+
this.syncHiddenAndAria();
|
|
1398
|
+
this.activeIndexChange.emit(this._activeIndex());
|
|
1399
|
+
this.cdr.detectChanges();
|
|
1400
|
+
});
|
|
1401
|
+
}
|
|
1402
|
+
get activeIndex() { return this._activeIndex(); }
|
|
1403
|
+
activeIndexChange = new EventEmitter();
|
|
1404
|
+
isMobile = isMobile();
|
|
1405
|
+
wcEls = signal([]);
|
|
1406
|
+
headers = computed(() => this.wcEls().map((el, i) => ({
|
|
1407
|
+
label: el.getAttribute('label') ?? `Tab ${i}`,
|
|
1408
|
+
disabled: this.parseBool(el.getAttribute('disabled')),
|
|
1409
|
+
id: el.getAttribute('id') ?? `tab-${i}`
|
|
1410
|
+
})));
|
|
1411
|
+
mo;
|
|
1412
|
+
_headersEffect = effect(() => {
|
|
1413
|
+
this.headers();
|
|
1414
|
+
this.syncHiddenAndAria();
|
|
1415
|
+
this.cdr.markForCheck();
|
|
1416
|
+
});
|
|
1417
|
+
ngAfterViewInit() {
|
|
1418
|
+
this.refreshChildren();
|
|
1419
|
+
this.zone.runOutsideAngular(() => {
|
|
1420
|
+
this.mo = new MutationObserver(() => this.refreshChildren());
|
|
1421
|
+
this.mo.observe(this.host.nativeElement, { childList: true, subtree: false });
|
|
1422
|
+
});
|
|
1423
|
+
}
|
|
1424
|
+
ngOnDestroy() {
|
|
1425
|
+
this.mo?.disconnect();
|
|
1426
|
+
}
|
|
1427
|
+
select(i) {
|
|
1428
|
+
const hs = this.headers();
|
|
1429
|
+
if (!hs[i] || hs[i].disabled)
|
|
1430
|
+
return;
|
|
1431
|
+
if (i !== this._activeIndex()) {
|
|
1432
|
+
this._activeIndex.set(i);
|
|
1433
|
+
this.syncHiddenAndAria();
|
|
1434
|
+
this.activeIndexChange.emit(i);
|
|
1435
|
+
this.cdr.detectChanges();
|
|
1436
|
+
}
|
|
1437
|
+
}
|
|
1438
|
+
onHeaderKeydown(e, i) {
|
|
1439
|
+
if (e.key === 'ArrowRight') {
|
|
1440
|
+
e.preventDefault();
|
|
1441
|
+
this.focusNext(i);
|
|
1442
|
+
}
|
|
1443
|
+
else if (e.key === 'ArrowLeft') {
|
|
1444
|
+
e.preventDefault();
|
|
1445
|
+
this.focusPrev(i);
|
|
1446
|
+
}
|
|
1447
|
+
else if (e.key === 'Home') {
|
|
1448
|
+
e.preventDefault();
|
|
1449
|
+
this.focusIndex(0);
|
|
1450
|
+
}
|
|
1451
|
+
else if (e.key === 'End') {
|
|
1452
|
+
e.preventDefault();
|
|
1453
|
+
this.focusIndex(this.headers().length - 1);
|
|
1454
|
+
}
|
|
1455
|
+
else if (e.key === 'Enter' || e.key === ' ') {
|
|
1456
|
+
e.preventDefault();
|
|
1457
|
+
this.select(i);
|
|
1458
|
+
}
|
|
1459
|
+
}
|
|
1460
|
+
focusNext(i) {
|
|
1461
|
+
const hs = this.headers();
|
|
1462
|
+
const len = hs.length;
|
|
1463
|
+
for (let step = 1; step <= len; step++) {
|
|
1464
|
+
const idx = (i + step) % len;
|
|
1465
|
+
if (!hs[idx].disabled) {
|
|
1466
|
+
this.focusIndex(idx);
|
|
1467
|
+
break;
|
|
1468
|
+
}
|
|
1469
|
+
}
|
|
1470
|
+
}
|
|
1471
|
+
focusPrev(i) {
|
|
1472
|
+
const hs = this.headers();
|
|
1473
|
+
const len = hs.length;
|
|
1474
|
+
for (let step = 1; step <= len; step++) {
|
|
1475
|
+
const idx = (i - step + len) % len;
|
|
1476
|
+
if (!hs[idx].disabled) {
|
|
1477
|
+
this.focusIndex(idx);
|
|
1478
|
+
break;
|
|
1479
|
+
}
|
|
1480
|
+
}
|
|
1481
|
+
}
|
|
1482
|
+
focusIndex(i) {
|
|
1483
|
+
const list = this.headersRef?.nativeElement.querySelectorAll('[role="tab"]');
|
|
1484
|
+
list?.[i]?.focus();
|
|
1485
|
+
}
|
|
1486
|
+
refreshChildren() {
|
|
1487
|
+
const els = Array.from(this.host.nativeElement.querySelectorAll('sdc-tab-item'));
|
|
1488
|
+
this.wcEls.set(els);
|
|
1489
|
+
this._activeIndex.set(this.normalizeIndex(this._activeIndex()));
|
|
1490
|
+
this.syncHiddenAndAria();
|
|
1491
|
+
this.cdr.markForCheck();
|
|
1492
|
+
}
|
|
1493
|
+
syncHiddenAndAria() {
|
|
1494
|
+
const idx = this._activeIndex();
|
|
1495
|
+
const els = this.wcEls();
|
|
1496
|
+
const hs = this.headers();
|
|
1497
|
+
els.forEach((el, i) => {
|
|
1498
|
+
const hdr = hs[i];
|
|
1499
|
+
const panelId = ((hdr?.id ?? `tab-${i}`) + '-panel');
|
|
1500
|
+
el.setAttribute('role', 'tabpanel');
|
|
1501
|
+
el.setAttribute('id', panelId);
|
|
1502
|
+
if (hdr)
|
|
1503
|
+
el.setAttribute('aria-labelledby', hdr.id);
|
|
1504
|
+
if (i === idx)
|
|
1505
|
+
el.removeAttribute('hidden');
|
|
1506
|
+
else
|
|
1507
|
+
el.setAttribute('hidden', '');
|
|
1508
|
+
});
|
|
1509
|
+
}
|
|
1510
|
+
normalizeIndex(v) {
|
|
1511
|
+
const len = this.wcEls().length;
|
|
1512
|
+
if (len === 0)
|
|
1513
|
+
return 0;
|
|
1514
|
+
const n = Number.isFinite(v) ? Math.trunc(v) : 0;
|
|
1515
|
+
return Math.min(Math.max(0, n), len - 1);
|
|
1516
|
+
}
|
|
1517
|
+
parseBool(v) {
|
|
1518
|
+
if (v == null)
|
|
1519
|
+
return false;
|
|
1520
|
+
const s = v.trim().toLowerCase();
|
|
1521
|
+
return s === '' || s === 'true' || s === '1';
|
|
1522
|
+
}
|
|
1523
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TabComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1524
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: TabComponent, isStandalone: true, selector: "sdc-tab", inputs: { activeIndex: ["activeIndex", "activeIndex", numberAttribute] }, outputs: { activeIndexChange: "activeIndexChange" }, viewQueries: [{ propertyName: "headersRef", first: true, predicate: ["headersRef"], 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 <span class=\"sdc-tab-label\">{{ h.label }}</span>\n </button>\n }\n </div>\n\n <div class=\"sdc-tab-panels\">\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;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 });
|
|
1525
|
+
}
|
|
1526
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TabComponent, decorators: [{
|
|
1527
|
+
type: Component,
|
|
1528
|
+
args: [{ selector: 'sdc-tab', standalone: true, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, 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 <span class=\"sdc-tab-label\">{{ h.label }}</span>\n </button>\n }\n </div>\n\n <div class=\"sdc-tab-panels\">\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;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"] }]
|
|
1529
|
+
}], propDecorators: { headersRef: [{
|
|
1530
|
+
type: ViewChild,
|
|
1531
|
+
args: ['headersRef']
|
|
1532
|
+
}], activeIndex: [{
|
|
1533
|
+
type: Input,
|
|
1534
|
+
args: [{ transform: numberAttribute }]
|
|
1535
|
+
}], activeIndexChange: [{
|
|
1536
|
+
type: Output
|
|
1537
|
+
}] } });
|
|
1538
|
+
|
|
1539
|
+
class TabItemComponent {
|
|
1540
|
+
label = '';
|
|
1541
|
+
disabled = false;
|
|
1542
|
+
lazy = true;
|
|
1543
|
+
id;
|
|
1544
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TabItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1545
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.2.13", 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 });
|
|
1546
|
+
}
|
|
1547
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TabItemComponent, decorators: [{
|
|
1548
|
+
type: Component,
|
|
1549
|
+
args: [{
|
|
1550
|
+
selector: 'sdc-tab-item',
|
|
1551
|
+
standalone: true,
|
|
1552
|
+
template: `<ng-content></ng-content>`
|
|
1553
|
+
}]
|
|
1554
|
+
}], propDecorators: { label: [{
|
|
1555
|
+
type: Input
|
|
1556
|
+
}], disabled: [{
|
|
1557
|
+
type: Input,
|
|
1558
|
+
args: [{ transform: booleanAttribute }]
|
|
1559
|
+
}], lazy: [{
|
|
1560
|
+
type: Input,
|
|
1561
|
+
args: [{ transform: booleanAttribute }]
|
|
1562
|
+
}], id: [{
|
|
1563
|
+
type: Input
|
|
1564
|
+
}] } });
|
|
1565
|
+
|
|
1566
|
+
class SidebarComponent {
|
|
1567
|
+
visible = false;
|
|
1568
|
+
header = 'Título do Sidebar';
|
|
1569
|
+
largeSized = true;
|
|
1570
|
+
closeOnBackdrop = true;
|
|
1571
|
+
width = '70%';
|
|
1572
|
+
visibleChange = new EventEmitter();
|
|
1573
|
+
contentTpl;
|
|
1574
|
+
footerTpl;
|
|
1575
|
+
ngOnChanges(changes) {
|
|
1576
|
+
if (changes['visible'] || changes['closeOnBackdrop']) {
|
|
1577
|
+
}
|
|
1578
|
+
}
|
|
1579
|
+
onVisibleChange(next) {
|
|
1580
|
+
this.visible = next;
|
|
1581
|
+
this.visibleChange.emit(next);
|
|
1582
|
+
}
|
|
1583
|
+
close() {
|
|
1584
|
+
this.visible = false;
|
|
1585
|
+
}
|
|
1586
|
+
get sidebarWidth() {
|
|
1587
|
+
return typeof this.width === 'number' ? `${this.width}%` : this.width;
|
|
1588
|
+
}
|
|
1589
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SidebarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1590
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", 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$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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: "ngmodule", type: SidebarModule }, { kind: "component", type: i2$5.SidebarComponent, selector: "s-sidebar", inputs: ["visible", "closable", "dismissible", "closeOnEscape", "header", "largeSized", "cache", "registerConfirmClose"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "ngmodule", type: StructureModule }] });
|
|
1591
|
+
}
|
|
1592
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SidebarComponent, decorators: [{
|
|
1593
|
+
type: Component,
|
|
1594
|
+
args: [{ selector: 'sdc-sidebar', standalone: true, imports: [CommonModule, SidebarModule, ButtonModule, StructureModule], 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"] }]
|
|
1595
|
+
}], propDecorators: { visible: [{
|
|
1596
|
+
type: Input,
|
|
1597
|
+
args: [{ required: true }]
|
|
1598
|
+
}], header: [{
|
|
1599
|
+
type: Input,
|
|
1600
|
+
args: [{ required: true }]
|
|
1601
|
+
}], largeSized: [{
|
|
1602
|
+
type: Input
|
|
1603
|
+
}], closeOnBackdrop: [{
|
|
1604
|
+
type: Input
|
|
1605
|
+
}], width: [{
|
|
1606
|
+
type: Input
|
|
1607
|
+
}], visibleChange: [{
|
|
1608
|
+
type: Output
|
|
1609
|
+
}], contentTpl: [{
|
|
1610
|
+
type: ContentChild,
|
|
1611
|
+
args: ['content', { read: TemplateRef }]
|
|
1612
|
+
}], footerTpl: [{
|
|
1613
|
+
type: ContentChild,
|
|
1614
|
+
args: ['footer', { read: TemplateRef }]
|
|
1615
|
+
}] } });
|
|
1616
|
+
|
|
1004
1617
|
class ModalComponent {
|
|
1005
1618
|
$visible = false;
|
|
1006
1619
|
modal;
|
|
@@ -1041,11 +1654,11 @@ class ModalComponent {
|
|
|
1041
1654
|
}
|
|
1042
1655
|
}
|
|
1043
1656
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1044
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", 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 }, { kind: "component", type: i1.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:
|
|
1657
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", 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$3.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$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i2$2.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"] }] });
|
|
1045
1658
|
}
|
|
1046
1659
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ModalComponent, decorators: [{
|
|
1047
1660
|
type: Component,
|
|
1048
|
-
args: [{ imports: [ButtonModule, CommonModule, DialogModule], standalone: true, selector: 'sdc-modal', 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"] }]
|
|
1661
|
+
args: [{ imports: [ButtonModule$1, CommonModule, DialogModule], standalone: true, selector: 'sdc-modal', 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"] }]
|
|
1049
1662
|
}], propDecorators: { modal: [{
|
|
1050
1663
|
type: ViewChild,
|
|
1051
1664
|
args: ['modal']
|
|
@@ -1087,11 +1700,11 @@ class PanelComponent {
|
|
|
1087
1700
|
showHeader = false;
|
|
1088
1701
|
toggleable = false;
|
|
1089
1702
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1090
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: PanelComponent, isStandalone: true, selector: "sdc-panel", inputs: { collapsed: "collapsed", header: "header", showHeader: "showHeader", toggleable: "toggleable" }, ngImport: i0, template: "<
|
|
1703
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: PanelComponent, isStandalone: true, selector: "sdc-panel", inputs: { collapsed: "collapsed", header: "header", showHeader: "showHeader", toggleable: "toggleable" }, ngImport: i0, template: "<s-panel [(collapsed)]=\"collapsed\" [header]=\"header\" [toggleable]=\"toggleable\">\n <p>\n <ng-content></ng-content>\n </p>\n</s-panel>", styles: ["p{padding-bottom:0;margin-bottom:0}::ng-deep .panel{border:1px solid var(--sdc-formfield-default-border)!important}\n"], dependencies: [{ kind: "ngmodule", type: PanelModule }, { kind: "ngmodule", type: PanelModule$1 }, { kind: "component", type: i1$4.PanelComponent, selector: "s-panel", inputs: ["header", "toggleable", "collapsed", "severity", "borderButtonOptions", "class"], outputs: ["collapsedChange"] }] });
|
|
1091
1704
|
}
|
|
1092
1705
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PanelComponent, decorators: [{
|
|
1093
1706
|
type: Component,
|
|
1094
|
-
args: [{ imports: [PanelModule], standalone: true, selector: 'sdc-panel', template: "<
|
|
1707
|
+
args: [{ imports: [PanelModule, PanelModule$1], standalone: true, selector: 'sdc-panel', template: "<s-panel [(collapsed)]=\"collapsed\" [header]=\"header\" [toggleable]=\"toggleable\">\n <p>\n <ng-content></ng-content>\n </p>\n</s-panel>", styles: ["p{padding-bottom:0;margin-bottom:0}::ng-deep .panel{border:1px solid var(--sdc-formfield-default-border)!important}\n"] }]
|
|
1095
1708
|
}], propDecorators: { collapsed: [{
|
|
1096
1709
|
type: Input
|
|
1097
1710
|
}], header: [{
|
|
@@ -1102,52 +1715,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
1102
1715
|
type: Input
|
|
1103
1716
|
}] } });
|
|
1104
1717
|
|
|
1105
|
-
class SearchboxComponent {
|
|
1106
|
-
value = '';
|
|
1107
|
-
width = false;
|
|
1108
|
-
disabled = false;
|
|
1109
|
-
placeholder = null;
|
|
1110
|
-
searchEvent = new EventEmitter();
|
|
1111
|
-
clearEvent = new EventEmitter();
|
|
1112
|
-
getStyles() {
|
|
1113
|
-
return getDimensionStyles('width', this.width);
|
|
1114
|
-
}
|
|
1115
|
-
onSearch() {
|
|
1116
|
-
this.searchEvent.emit(this.value);
|
|
1117
|
-
}
|
|
1118
|
-
onClear() {
|
|
1119
|
-
this.value = '';
|
|
1120
|
-
this.clearEvent.emit();
|
|
1121
|
-
}
|
|
1122
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SearchboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1123
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SearchboxComponent, isStandalone: true, selector: "sdc-searchbox", inputs: { width: "width", disabled: "disabled", placeholder: "placeholder" }, outputs: { searchEvent: "onSearch", clearEvent: "onClear" }, ngImport: i0, template: "<p-inputgroup [ngStyle]=\"getStyles()\" >\n <input\n (keyup.enter)=\"onSearch()\"\n (keyup.esc)=\"onClear()\"\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n [placeholder]=\" placeholder || ('platform.datacore.search' | translate)\"\n pInputText\n type=\"text\"\n />\n\n <p-inputgroup-addon>\n <p-button\n class=\"height-100\"\n (onClick)=\"onClear()\"\n [disabled]=\"disabled\" \n icon=\"fas fa-times\"\n severity=\"secondary\"\n />\n </p-inputgroup-addon>\n\n <p-inputgroup-addon>\n <p-button\n class=\"height-100\"\n (onClick)=\"onSearch()\"\n [disabled]=\"disabled\"\n icon=\"fas fa-search\"\n severity=\"secondary\"\n />\n </p-inputgroup-addon>\n</p-inputgroup>\n", styles: [".height-100{height:100%}\n"], dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i1.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: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.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: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.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: i3$1.TranslatePipe, name: "translate" }] });
|
|
1124
|
-
}
|
|
1125
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SearchboxComponent, decorators: [{
|
|
1126
|
-
type: Component,
|
|
1127
|
-
args: [{ imports: [
|
|
1128
|
-
ButtonModule,
|
|
1129
|
-
CommonModule,
|
|
1130
|
-
FormsModule,
|
|
1131
|
-
InputGroupAddonModule,
|
|
1132
|
-
InputGroupModule,
|
|
1133
|
-
InputTextModule,
|
|
1134
|
-
ReactiveFormsModule,
|
|
1135
|
-
TranslateModule
|
|
1136
|
-
], standalone: true, selector: 'sdc-searchbox', template: "<p-inputgroup [ngStyle]=\"getStyles()\" >\n <input\n (keyup.enter)=\"onSearch()\"\n (keyup.esc)=\"onClear()\"\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n [placeholder]=\" placeholder || ('platform.datacore.search' | translate)\"\n pInputText\n type=\"text\"\n />\n\n <p-inputgroup-addon>\n <p-button\n class=\"height-100\"\n (onClick)=\"onClear()\"\n [disabled]=\"disabled\" \n icon=\"fas fa-times\"\n severity=\"secondary\"\n />\n </p-inputgroup-addon>\n\n <p-inputgroup-addon>\n <p-button\n class=\"height-100\"\n (onClick)=\"onSearch()\"\n [disabled]=\"disabled\"\n icon=\"fas fa-search\"\n severity=\"secondary\"\n />\n </p-inputgroup-addon>\n</p-inputgroup>\n", styles: [".height-100{height:100%}\n"] }]
|
|
1137
|
-
}], propDecorators: { width: [{
|
|
1138
|
-
type: Input
|
|
1139
|
-
}], disabled: [{
|
|
1140
|
-
type: Input
|
|
1141
|
-
}], placeholder: [{
|
|
1142
|
-
type: Input
|
|
1143
|
-
}], searchEvent: [{
|
|
1144
|
-
type: Output,
|
|
1145
|
-
args: ['onSearch']
|
|
1146
|
-
}], clearEvent: [{
|
|
1147
|
-
type: Output,
|
|
1148
|
-
args: ['onClear']
|
|
1149
|
-
}] } });
|
|
1150
|
-
|
|
1151
1718
|
class SpinnerService {
|
|
1152
1719
|
spinner = new BehaviorSubject(false);
|
|
1153
1720
|
start() {
|
|
@@ -1170,8 +1737,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
1170
1737
|
|
|
1171
1738
|
class SpinnerComponent {
|
|
1172
1739
|
$service;
|
|
1173
|
-
subscription = null;
|
|
1174
1740
|
loading = false;
|
|
1741
|
+
blockWindow = false;
|
|
1742
|
+
subscription = null;
|
|
1175
1743
|
constructor($service) {
|
|
1176
1744
|
this.$service = $service;
|
|
1177
1745
|
}
|
|
@@ -1193,12 +1761,18 @@ class SpinnerComponent {
|
|
|
1193
1761
|
};
|
|
1194
1762
|
}
|
|
1195
1763
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SpinnerComponent, deps: [{ token: SpinnerService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1196
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SpinnerComponent, isStandalone: true, selector: "sdc-spinner",
|
|
1764
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", 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: i3$2.LoadingStateComponent, selector: "s-loading-state", inputs: ["indicator", "id", "blockWindow", "loading"] }] });
|
|
1197
1765
|
}
|
|
1198
1766
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SpinnerComponent, decorators: [{
|
|
1199
1767
|
type: Component,
|
|
1200
|
-
args: [{ imports: [ProgressSpinnerModule, BlockUIModule], standalone: true, selector: 'sdc-spinner', template: "
|
|
1201
|
-
}], ctorParameters: () => [{ type: SpinnerService }]
|
|
1768
|
+
args: [{ imports: [ProgressSpinnerModule, BlockUIModule, LoadingStateModule], standalone: true, selector: 'sdc-spinner', 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"] }]
|
|
1769
|
+
}], ctorParameters: () => [{ type: SpinnerService }], propDecorators: { loading: [{
|
|
1770
|
+
type: Input,
|
|
1771
|
+
args: [{ required: true }]
|
|
1772
|
+
}], blockWindow: [{
|
|
1773
|
+
type: Input,
|
|
1774
|
+
args: [{ required: false }]
|
|
1775
|
+
}] } });
|
|
1202
1776
|
|
|
1203
1777
|
class SqlEditorComponent {
|
|
1204
1778
|
height = null;
|
|
@@ -1321,7 +1895,7 @@ class TextboxComponent extends InputsComponent {
|
|
|
1321
1895
|
useExisting: forwardRef(() => TextboxComponent),
|
|
1322
1896
|
multi: true
|
|
1323
1897
|
}
|
|
1324
|
-
], usesInheritance: true, ngImport: i0, template: "<div class=\"
|
|
1898
|
+
], 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$2.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }] });
|
|
1325
1899
|
}
|
|
1326
1900
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TextboxComponent, decorators: [{
|
|
1327
1901
|
type: Component,
|
|
@@ -1331,133 +1905,266 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
1331
1905
|
useExisting: forwardRef(() => TextboxComponent),
|
|
1332
1906
|
multi: true
|
|
1333
1907
|
}
|
|
1334
|
-
], template: "<div class=\"
|
|
1908
|
+
], 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"] }]
|
|
1335
1909
|
}] });
|
|
1336
1910
|
|
|
1337
1911
|
class ToastComponent {
|
|
1338
|
-
$service;
|
|
1339
|
-
$subscriptions = [];
|
|
1340
|
-
key = CONSTANTS.TOAST_DEFAULT_KEY;
|
|
1341
|
-
zIndex = 999999;
|
|
1342
1912
|
toast;
|
|
1343
|
-
|
|
1344
|
-
|
|
1913
|
+
dismiss = new EventEmitter();
|
|
1914
|
+
isLeaving = false;
|
|
1915
|
+
timer = null;
|
|
1916
|
+
startDismissAnimation() {
|
|
1917
|
+
this.isLeaving = true;
|
|
1918
|
+
setTimeout(() => {
|
|
1919
|
+
this.dismiss.emit();
|
|
1920
|
+
}, 300);
|
|
1921
|
+
}
|
|
1922
|
+
dismissToast() {
|
|
1923
|
+
if (this.timer) {
|
|
1924
|
+
clearTimeout(this.timer);
|
|
1925
|
+
}
|
|
1926
|
+
this.startDismissAnimation();
|
|
1345
1927
|
}
|
|
1346
1928
|
ngOnInit() {
|
|
1347
|
-
this
|
|
1348
|
-
this
|
|
1349
|
-
this.
|
|
1350
|
-
})
|
|
1351
|
-
|
|
1929
|
+
if (!this.toast.sticky && this.toast.duration) {
|
|
1930
|
+
this.timer = setTimeout(() => {
|
|
1931
|
+
this.startDismissAnimation();
|
|
1932
|
+
}, this.toast.duration);
|
|
1933
|
+
}
|
|
1352
1934
|
}
|
|
1353
1935
|
ngOnDestroy() {
|
|
1354
|
-
this
|
|
1936
|
+
if (this.timer) {
|
|
1937
|
+
clearTimeout(this.timer);
|
|
1938
|
+
}
|
|
1355
1939
|
}
|
|
1356
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ToastComponent, deps: [
|
|
1357
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ToastComponent, isStandalone: true, selector: "
|
|
1940
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ToastComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1941
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", 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$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1358
1942
|
}
|
|
1359
1943
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ToastComponent, decorators: [{
|
|
1360
1944
|
type: Component,
|
|
1361
|
-
args: [{
|
|
1362
|
-
}],
|
|
1363
|
-
type: Input
|
|
1364
|
-
}], zIndex: [{
|
|
1945
|
+
args: [{ selector: "s-toast", standalone: true, imports: [CommonModule], 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"] }]
|
|
1946
|
+
}], propDecorators: { toast: [{
|
|
1365
1947
|
type: Input
|
|
1366
|
-
}],
|
|
1367
|
-
type:
|
|
1368
|
-
|
|
1948
|
+
}], dismiss: [{
|
|
1949
|
+
type: Output
|
|
1950
|
+
}], isLeaving: [{
|
|
1951
|
+
type: HostBinding,
|
|
1952
|
+
args: ["class.toast--leaving"]
|
|
1369
1953
|
}] } });
|
|
1370
1954
|
|
|
1371
1955
|
class ToastService {
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
this.
|
|
1381
|
-
}
|
|
1382
|
-
|
|
1383
|
-
this.
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1956
|
+
appRef;
|
|
1957
|
+
injector;
|
|
1958
|
+
componentFactoryResolver;
|
|
1959
|
+
activeToasts = [];
|
|
1960
|
+
globalToastHostElement = null;
|
|
1961
|
+
constructor(appRef, injector, componentFactoryResolver) {
|
|
1962
|
+
this.appRef = appRef;
|
|
1963
|
+
this.injector = injector;
|
|
1964
|
+
this.componentFactoryResolver = componentFactoryResolver;
|
|
1965
|
+
}
|
|
1966
|
+
ensureGlobalToastHost() {
|
|
1967
|
+
if (!this.globalToastHostElement) {
|
|
1968
|
+
this.globalToastHostElement = document.createElement("div");
|
|
1969
|
+
document.body.appendChild(this.globalToastHostElement);
|
|
1970
|
+
this.globalToastHostElement.style.display = "flex";
|
|
1971
|
+
this.globalToastHostElement.style.flexDirection = "column";
|
|
1972
|
+
this.globalToastHostElement.style.position = "fixed";
|
|
1973
|
+
this.globalToastHostElement.style.right = "20px";
|
|
1974
|
+
this.globalToastHostElement.style.top = "20px";
|
|
1975
|
+
this.globalToastHostElement.style.zIndex = "99999";
|
|
1976
|
+
this.globalToastHostElement.style.gap = "10px";
|
|
1977
|
+
}
|
|
1390
1978
|
}
|
|
1391
|
-
|
|
1392
|
-
this
|
|
1393
|
-
this
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1979
|
+
show(toast) {
|
|
1980
|
+
this.ensureGlobalToastHost();
|
|
1981
|
+
const componentFactory = this.componentFactoryResolver.resolveComponentFactory(ToastComponent);
|
|
1982
|
+
const componentRef = componentFactory.create(this.injector);
|
|
1983
|
+
this.appRef.attachView(componentRef.hostView);
|
|
1984
|
+
if (!toast.sticky) {
|
|
1985
|
+
toast.duration = toast.duration ?? 10000;
|
|
1986
|
+
}
|
|
1987
|
+
componentRef.instance.toast = {
|
|
1988
|
+
closable: true,
|
|
1989
|
+
...toast,
|
|
1990
|
+
};
|
|
1991
|
+
const domElem = componentRef.hostView.rootNodes[0];
|
|
1992
|
+
this.globalToastHostElement.appendChild(domElem);
|
|
1993
|
+
domElem.style.display = "flex";
|
|
1994
|
+
domElem.style.justifyContent = "center";
|
|
1995
|
+
componentRef.instance.dismiss.pipe(first()).subscribe(() => {
|
|
1996
|
+
const index = this.activeToasts.indexOf(componentRef);
|
|
1997
|
+
if (index !== -1) {
|
|
1998
|
+
this.appRef.detachView(componentRef.hostView);
|
|
1999
|
+
componentRef.destroy();
|
|
2000
|
+
this.activeToasts.splice(index, 1);
|
|
2001
|
+
}
|
|
2002
|
+
if (this.activeToasts.length === 0 && this.globalToastHostElement) {
|
|
2003
|
+
this.globalToastHostElement.remove();
|
|
2004
|
+
this.globalToastHostElement = null;
|
|
2005
|
+
}
|
|
1401
2006
|
});
|
|
2007
|
+
this.activeToasts.push(componentRef);
|
|
1402
2008
|
}
|
|
1403
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ToastService, deps: [{ token:
|
|
1404
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ToastService });
|
|
2009
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ToastService, deps: [{ token: i0.ApplicationRef }, { token: i0.Injector }, { token: i0.ComponentFactoryResolver }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2010
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ToastService, providedIn: "root" });
|
|
1405
2011
|
}
|
|
1406
2012
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ToastService, decorators: [{
|
|
1407
|
-
type: Injectable
|
|
1408
|
-
|
|
2013
|
+
type: Injectable,
|
|
2014
|
+
args: [{
|
|
2015
|
+
providedIn: "root",
|
|
2016
|
+
}]
|
|
2017
|
+
}], ctorParameters: () => [{ type: i0.ApplicationRef }, { type: i0.Injector }, { type: i0.ComponentFactoryResolver }] });
|
|
1409
2018
|
|
|
1410
2019
|
class ModalcComponent {
|
|
1411
|
-
|
|
2020
|
+
cdr;
|
|
1412
2021
|
title = 'Modal Title';
|
|
1413
2022
|
footerButtons = [];
|
|
1414
2023
|
maximizable = false;
|
|
2024
|
+
closeOnBackdrop = true;
|
|
2025
|
+
set visible(v) { this.setVisible(!!v, false); }
|
|
2026
|
+
get visible() { return this._visible; }
|
|
1415
2027
|
visibleChange = new EventEmitter();
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
2028
|
+
_visible = false;
|
|
2029
|
+
_fullscreen = false;
|
|
2030
|
+
constructor(cdr) {
|
|
2031
|
+
this.cdr = cdr;
|
|
2032
|
+
}
|
|
2033
|
+
ngOnInit() { }
|
|
2034
|
+
ngOnDestroy() { this.unlockBodyScroll(); }
|
|
2035
|
+
open() { this.setVisible(true, true); }
|
|
2036
|
+
close() { this.setVisible(false, true); }
|
|
2037
|
+
toggleFullscreen() {
|
|
2038
|
+
this._fullscreen = !this._fullscreen;
|
|
2039
|
+
this.cdr.markForCheck();
|
|
1422
2040
|
}
|
|
1423
|
-
|
|
1424
|
-
if (
|
|
2041
|
+
onBackdropClick() {
|
|
2042
|
+
if (this.closeOnBackdrop)
|
|
1425
2043
|
this.close();
|
|
1426
|
-
}
|
|
1427
|
-
};
|
|
1428
|
-
ngOnInit() {
|
|
1429
|
-
window.addEventListener('keydown', this.escListener);
|
|
1430
|
-
}
|
|
1431
|
-
ngOnDestroy() {
|
|
1432
|
-
window.removeEventListener('keydown', this.escListener);
|
|
1433
|
-
}
|
|
1434
|
-
toggleFullscreen() {
|
|
1435
|
-
this.$fullscreen = !this.$fullscreen;
|
|
1436
2044
|
}
|
|
1437
|
-
|
|
1438
|
-
this.
|
|
2045
|
+
onEsc(ev) {
|
|
2046
|
+
if (this._visible)
|
|
2047
|
+
this.close();
|
|
1439
2048
|
}
|
|
1440
|
-
|
|
1441
|
-
|
|
2049
|
+
setVisible(next, emit) {
|
|
2050
|
+
if (this._visible === next)
|
|
2051
|
+
return;
|
|
2052
|
+
this._visible = next;
|
|
2053
|
+
if (this._visible)
|
|
2054
|
+
this.lockBodyScroll();
|
|
2055
|
+
else
|
|
2056
|
+
this.unlockBodyScroll();
|
|
2057
|
+
if (emit)
|
|
2058
|
+
this.visibleChange.emit(this._visible);
|
|
2059
|
+
this.cdr.markForCheck();
|
|
2060
|
+
}
|
|
2061
|
+
lockBodyScroll() {
|
|
2062
|
+
document.body.style.overflow = 'hidden';
|
|
2063
|
+
}
|
|
2064
|
+
unlockBodyScroll() {
|
|
2065
|
+
document.body.style.overflow = '';
|
|
2066
|
+
}
|
|
2067
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ModalcComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
2068
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", 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$3.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$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1442
2069
|
}
|
|
1443
2070
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ModalcComponent, decorators: [{
|
|
1444
2071
|
type: Component,
|
|
1445
|
-
args: [{ selector: 'sdc-modalc', standalone: true, imports: [ButtonModule, CommonModule], template: "<section
|
|
1446
|
-
}], propDecorators: {
|
|
1447
|
-
type: Input
|
|
1448
|
-
}], title: [{
|
|
2072
|
+
args: [{ selector: 'sdc-modalc', standalone: true, imports: [ButtonModule$1, CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, 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"] }]
|
|
2073
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { title: [{
|
|
1449
2074
|
type: Input
|
|
1450
2075
|
}], footerButtons: [{
|
|
1451
2076
|
type: Input
|
|
1452
2077
|
}], maximizable: [{
|
|
1453
2078
|
type: Input
|
|
2079
|
+
}], closeOnBackdrop: [{
|
|
2080
|
+
type: Input
|
|
2081
|
+
}], visible: [{
|
|
2082
|
+
type: Input
|
|
1454
2083
|
}], visibleChange: [{
|
|
1455
2084
|
type: Output
|
|
2085
|
+
}], onEsc: [{
|
|
2086
|
+
type: HostListener,
|
|
2087
|
+
args: ['document:keydown.escape', ['$event']]
|
|
2088
|
+
}] } });
|
|
2089
|
+
|
|
2090
|
+
let nextId = 0;
|
|
2091
|
+
class CheckboxComponent {
|
|
2092
|
+
label = "";
|
|
2093
|
+
disabled = false;
|
|
2094
|
+
commonCheckbox = false;
|
|
2095
|
+
labelPosition = 'right';
|
|
2096
|
+
size = 'medium';
|
|
2097
|
+
checked = false;
|
|
2098
|
+
checkedChange = new EventEmitter();
|
|
2099
|
+
inputId = `sdc-checkbox-${++nextId}`;
|
|
2100
|
+
onChange = () => { };
|
|
2101
|
+
onTouched = () => { };
|
|
2102
|
+
writeValue(value) {
|
|
2103
|
+
this.checked = !!value;
|
|
2104
|
+
}
|
|
2105
|
+
registerOnChange(fn) {
|
|
2106
|
+
this.onChange = fn;
|
|
2107
|
+
}
|
|
2108
|
+
registerOnTouched(fn) {
|
|
2109
|
+
this.onTouched = fn;
|
|
2110
|
+
}
|
|
2111
|
+
setDisabledState(isDisabled) {
|
|
2112
|
+
this.disabled = isDisabled;
|
|
2113
|
+
}
|
|
2114
|
+
toggleChecked() {
|
|
2115
|
+
if (this.disabled)
|
|
2116
|
+
return;
|
|
2117
|
+
this.checked = !this.checked;
|
|
2118
|
+
this.onChange(this.checked);
|
|
2119
|
+
this.checkedChange.emit(this.checked);
|
|
2120
|
+
this.onTouched();
|
|
2121
|
+
}
|
|
2122
|
+
onInputChange(ev) {
|
|
2123
|
+
if (this.disabled)
|
|
2124
|
+
return;
|
|
2125
|
+
const el = ev.target;
|
|
2126
|
+
this.checked = !!el.checked;
|
|
2127
|
+
this.onChange(this.checked);
|
|
2128
|
+
this.checkedChange.emit(this.checked);
|
|
2129
|
+
this.onTouched();
|
|
2130
|
+
}
|
|
2131
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2132
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: CheckboxComponent, isStandalone: true, selector: "sdc-checkbox", inputs: { label: "label", disabled: "disabled", commonCheckbox: "commonCheckbox", labelPosition: "labelPosition", size: "size", checked: "checked" }, outputs: { checkedChange: "checkedChange" }, providers: [
|
|
2133
|
+
{
|
|
2134
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2135
|
+
useExisting: forwardRef(() => CheckboxComponent),
|
|
2136
|
+
multi: true
|
|
2137
|
+
}
|
|
2138
|
+
], 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:2px 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$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
2139
|
+
}
|
|
2140
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CheckboxComponent, decorators: [{
|
|
2141
|
+
type: Component,
|
|
2142
|
+
args: [{ standalone: true, selector: "sdc-checkbox", imports: [CommonModule], providers: [
|
|
2143
|
+
{
|
|
2144
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2145
|
+
useExisting: forwardRef(() => CheckboxComponent),
|
|
2146
|
+
multi: true
|
|
2147
|
+
}
|
|
2148
|
+
], 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:2px 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"] }]
|
|
2149
|
+
}], propDecorators: { label: [{
|
|
2150
|
+
type: Input
|
|
2151
|
+
}], disabled: [{
|
|
2152
|
+
type: Input
|
|
2153
|
+
}], commonCheckbox: [{
|
|
2154
|
+
type: Input
|
|
2155
|
+
}], labelPosition: [{
|
|
2156
|
+
type: Input
|
|
2157
|
+
}], size: [{
|
|
2158
|
+
type: Input
|
|
2159
|
+
}], checked: [{
|
|
2160
|
+
type: Input
|
|
2161
|
+
}], checkedChange: [{
|
|
2162
|
+
type: Output
|
|
1456
2163
|
}] } });
|
|
1457
2164
|
|
|
1458
2165
|
/**
|
|
1459
2166
|
* Generated bundle index. Do not edit.
|
|
1460
2167
|
*/
|
|
1461
2168
|
|
|
1462
|
-
export { ButtonComponent, CONSTANTS, ComboboxComponent, ConfirmComponent, HyperlinkComponent, ListComponent, ModalComponent, ModalcComponent, PanelComponent, SQL_HELPER, SearchboxComponent, SpinnerComponent, SpinnerService, SqlEditorComponent, TextboxComponent, ToastComponent, ToastService, createSqlAutoCompletionHadler, fixComboBoxOverlay, fixDialogMask, getDimensionStyles, provideDataCoreLib, provideTranslations, serviceProviders, sqlDomainFilterDecorator, sqlFormatterHandler, sqlUppercaseHandler };
|
|
2169
|
+
export { ButtonComponent, CONSTANTS, CheckboxComponent, ComboboxComponent, ConfirmComponent, HyperlinkComponent, ListComponent, ModalComponent, ModalcComponent, PanelComponent, SQL_HELPER, ScaffoldComponent, SearchboxComponent, SidebarComponent, SpinnerComponent, SpinnerService, SqlEditorComponent, TabComponent, TabItemComponent, TableComponent, TextboxComponent, ToastComponent, ToastService, createSqlAutoCompletionHadler, fixComboBoxOverlay, fixDialogMask, getDimensionStyles, provideDataCoreLib, provideTranslations, serviceProviders, sqlDomainFilterDecorator, sqlFormatterHandler, sqlUppercaseHandler };
|
|
1463
2170
|
//# sourceMappingURL=seniorsistemas-data-seniorx-core.mjs.map
|