@bcgov/nr-ngx-component-lib 21.0.99 → 21.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -125,7 +125,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
125
125
|
class ConfigurationService {
|
|
126
126
|
constructor() {
|
|
127
127
|
this._defaultConfiguration = {
|
|
128
|
-
displayMode: 'desktop'
|
|
128
|
+
displayMode: 'desktop',
|
|
129
|
+
interfaceStyle: '2025'
|
|
129
130
|
};
|
|
130
131
|
this.configSubject = new BehaviorSubject(this._defaultConfiguration);
|
|
131
132
|
// Observable that components can subscribe to
|
|
@@ -134,6 +135,8 @@ class ConfigurationService {
|
|
|
134
135
|
let el = document.querySelector('body');
|
|
135
136
|
el.classList.toggle('nrcl-device-desktop', c.displayMode == 'desktop');
|
|
136
137
|
el.classList.toggle('nrcl-device-mobile', c.displayMode == 'mobile');
|
|
138
|
+
el.classList.toggle('nrcl-style-2025', c.interfaceStyle == '2025');
|
|
139
|
+
el.classList.toggle('nrcl-style-2026', c.interfaceStyle == '2026');
|
|
137
140
|
});
|
|
138
141
|
}
|
|
139
142
|
// Get current config value synchronously
|
|
@@ -179,6 +182,8 @@ class ConfigurationSubscriberBase extends NrclBase {
|
|
|
179
182
|
onConfigurationChange() { }
|
|
180
183
|
get desktopVisible() { return this.configuration.displayMode == 'desktop'; }
|
|
181
184
|
get mobileVisible() { return this.configuration.displayMode == 'mobile'; }
|
|
185
|
+
get isStyle2025() { return this.configuration.interfaceStyle == '2025'; }
|
|
186
|
+
get isStyle2026() { return this.configuration.interfaceStyle == '2026'; }
|
|
182
187
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: ConfigurationSubscriberBase, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
183
188
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.25", type: ConfigurationSubscriberBase, isStandalone: true, usesInheritance: true, ngImport: i0 }); }
|
|
184
189
|
}
|
|
@@ -830,10 +835,12 @@ const DATE_FORMATS = {
|
|
|
830
835
|
class FilterDateComponent extends NrclBase {
|
|
831
836
|
constructor() {
|
|
832
837
|
super(...arguments);
|
|
833
|
-
this.label = '[label]
|
|
838
|
+
this.label = '[label]';
|
|
834
839
|
this.placeholder = 'Select...';
|
|
835
840
|
this.value = moment().format(DATE_FORMATS.datePickerInput);
|
|
836
841
|
this.clear = true;
|
|
842
|
+
this.minErrorMessage = 'Date is too soon';
|
|
843
|
+
this.maxErrorMessage = 'Date is too late';
|
|
837
844
|
this.valueChange = new EventEmitter();
|
|
838
845
|
}
|
|
839
846
|
onDateChange(ev) {
|
|
@@ -858,7 +865,7 @@ class FilterDateComponent extends NrclBase {
|
|
|
858
865
|
return !!this.value;
|
|
859
866
|
}
|
|
860
867
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FilterDateComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
861
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: FilterDateComponent, isStandalone: true, selector: "nrcl-filter-date", inputs: { label: "label", placeholder: "placeholder", hint: "hint", value: "value", wide: "wide", clear: ["clear", "clear", booleanAttribute] }, outputs: { valueChange: "valueChange" }, host: { properties: { "style.--nrcl-filter-date-width": "this.wide ? \"var( --nrcl-filter-width-\" + this.wide + \" )\" : null" } }, providers: [
|
|
868
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: FilterDateComponent, isStandalone: true, selector: "nrcl-filter-date", inputs: { label: "label", placeholder: "placeholder", hint: "hint", value: "value", wide: "wide", clear: ["clear", "clear", booleanAttribute], min: "min", minErrorMessage: "minErrorMessage", max: "max", maxErrorMessage: "maxErrorMessage" }, outputs: { valueChange: "valueChange" }, host: { properties: { "style.--nrcl-filter-date-width": "this.wide ? \"var( --nrcl-filter-width-\" + this.wide + \" )\" : null" } }, providers: [
|
|
862
869
|
provideMomentDateAdapter({
|
|
863
870
|
parse: {
|
|
864
871
|
dateInput: 'YYYY-MM-DD'
|
|
@@ -870,7 +877,7 @@ class FilterDateComponent extends NrclBase {
|
|
|
870
877
|
monthYearA11yLabel: 'MMMM YYYY',
|
|
871
878
|
}
|
|
872
879
|
})
|
|
873
|
-
], viewQueries: [{ propertyName: "picker", first: true, predicate: ["picker"], descendants: true }, { propertyName: "input", first: true, predicate: MatInput, descendants: true }], usesInheritance: true, ngImport: i0, template: "<mat-form-field\n floatLabel=\"auto\"\n appearance=\"outline\"\n subscriptSizing=\"dynamic\"\n>\n <mat-label>{{ label }}</mat-label>\n\n <input matInput class=\"search-input\" readonly\n [ngModel]=\"value\"\n (ngModelChange)=\"onDateChange( $event )\"\n [placeholder]=\"placeholder\"\n maxlength=\"10\"\n (click)=\"onInputFocus()\"\n [matDatepicker]=\"picker\"\n >\n\n @if ( hint ) {\n <mat-hint>{{ hint }}</mat-hint>\n }\n\n <mat-datepicker #picker></mat-datepicker>\n</mat-form-field>\n\n@if ( isOpen || !hasValue || !clear ) {\n <nrcl-button tertiary\n icon=\"event\"\n (click)=\"picker.open()\"\n ></nrcl-button>\n}\n@else {\n <nrcl-button tertiary\n icon=\"close\"\n (click)=\"onCancelClick()\"\n ></nrcl-button>\n}\n", styles: ["::ng-deep :root{--nrcl-filter-date-width: var( --nrcl-filter-width-2 );--nrcl-filter-date-height: var( --nrcl-filter-height )}:host{--mat-form-field-container-height: calc( var( --nrcl-filter-date-height ) - 4px );--mat-form-field-container-vertical-padding: 8px;--mat-form-field-container-text-size: 15px;--mat-form-field-outlined-focus-label-text-color: black;--mat-form-field-outlined-hover-label-text-color: black;width:var(--nrcl-filter-date-width);display:block;position:relative}:host .nrcl-button{position:absolute;right:2px;top:2px;bottom:2px}:host ::ng-deep .mat-mdc-form-field{width:100%}:host ::ng-deep .mat-mdc-form-field .mat-mdc-text-field-wrapper{background-color:#fff;height:var(--nrcl-filter-date-height)}:host ::ng-deep .mat-mdc-form-field .mat-mdc-text-field-wrapper .mat-mdc-form-field-infix{width:var(--nrcl-filter-date-width)}\n"], dependencies: [{ kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i1$5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i1$5.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$5.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1$5.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i2$1.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i2$1.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { 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.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ButtonComponent, selector: "nrcl-button", inputs: ["label", "ariaLabel", "icon", "iconRight", "iconCompact", "tooltip", "compact", "small", "primary", "secondary", "tertiary", "disabled", "anchor"], outputs: ["click"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
880
|
+
], viewQueries: [{ propertyName: "picker", first: true, predicate: ["picker"], descendants: true }, { propertyName: "input", first: true, predicate: MatInput, descendants: true }], usesInheritance: true, ngImport: i0, template: "<mat-form-field\n floatLabel=\"auto\"\n appearance=\"outline\"\n subscriptSizing=\"dynamic\"\n>\n <mat-label>{{ label }}</mat-label>\n\n <input matInput class=\"search-input\" readonly\n [ngModel]=\"value\"\n (ngModelChange)=\"onDateChange( $event )\"\n [placeholder]=\"placeholder\"\n maxlength=\"10\"\n (click)=\"onInputFocus()\"\n [matDatepicker]=\"picker\"\n [min]=\"min\"\n [max]=\"max\"\n #filter=\"ngModel\"\n >\n\n @if ( filter.invalid && ( filter.dirty || filter.touched ) ) {\n @if ( filter.hasError( 'matDatepickerMin' ) ) {\n <mat-error>{{ minErrorMessage }}</mat-error>\n }\n\n @if ( filter.hasError( 'matDatepickerMax' ) ) {\n <mat-error>{{ maxErrorMessage }}</mat-error>\n }\n }\n\n @if ( hint ) {\n <mat-hint>{{ hint }}</mat-hint>\n }\n\n <mat-datepicker #picker></mat-datepicker>\n</mat-form-field>\n\n@if ( isOpen || !hasValue || !clear ) {\n <nrcl-button tertiary\n icon=\"event\"\n (click)=\"picker.open()\"\n ></nrcl-button>\n}\n@else {\n <nrcl-button tertiary\n icon=\"close\"\n (click)=\"onCancelClick()\"\n ></nrcl-button>\n}\n", styles: ["::ng-deep :root{--nrcl-filter-date-width: var( --nrcl-filter-width-2 );--nrcl-filter-date-height: var( --nrcl-filter-height )}:host{--mat-form-field-container-height: calc( var( --nrcl-filter-date-height ) - 4px );--mat-form-field-container-vertical-padding: 8px;--mat-form-field-container-text-size: 15px;--mat-form-field-outlined-focus-label-text-color: black;--mat-form-field-outlined-hover-label-text-color: black;width:var(--nrcl-filter-date-width);display:block;position:relative}:host .nrcl-button{position:absolute;right:2px;top:2px;bottom:2px}:host ::ng-deep .mat-mdc-form-field{width:100%}:host ::ng-deep .mat-mdc-form-field .mat-mdc-text-field-wrapper{background-color:#fff;height:var(--nrcl-filter-date-height)}:host ::ng-deep .mat-mdc-form-field .mat-mdc-text-field-wrapper .mat-mdc-form-field-infix{width:var(--nrcl-filter-date-width)}:host ::ng-deep .mat-mdc-form-field .mat-mdc-text-field-wrapper .mat-mdc-form-field-infix .mat-mdc-form-field-error{position:absolute;padding-top:4px;font-size:12px}\n"], dependencies: [{ kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i1$5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i1$5.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$5.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1$5.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i1$5.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i2$1.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i2$1.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { 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.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ButtonComponent, selector: "nrcl-button", inputs: ["label", "ariaLabel", "icon", "iconRight", "iconCompact", "tooltip", "compact", "small", "primary", "secondary", "tertiary", "disabled", "anchor"], outputs: ["click"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
874
881
|
}
|
|
875
882
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FilterDateComponent, decorators: [{
|
|
876
883
|
type: Component,
|
|
@@ -881,7 +888,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
881
888
|
MatFormFieldModule,
|
|
882
889
|
MatDatepickerModule,
|
|
883
890
|
FormsModule,
|
|
884
|
-
ButtonComponent
|
|
891
|
+
ButtonComponent,
|
|
885
892
|
], providers: [
|
|
886
893
|
provideMomentDateAdapter({
|
|
887
894
|
parse: {
|
|
@@ -894,7 +901,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
894
901
|
monthYearA11yLabel: 'MMMM YYYY',
|
|
895
902
|
}
|
|
896
903
|
})
|
|
897
|
-
], template: "<mat-form-field\n floatLabel=\"auto\"\n appearance=\"outline\"\n subscriptSizing=\"dynamic\"\n>\n <mat-label>{{ label }}</mat-label>\n\n <input matInput class=\"search-input\" readonly\n [ngModel]=\"value\"\n (ngModelChange)=\"onDateChange( $event )\"\n [placeholder]=\"placeholder\"\n maxlength=\"10\"\n (click)=\"onInputFocus()\"\n [matDatepicker]=\"picker\"\n >\n\n @if ( hint ) {\n <mat-hint>{{ hint }}</mat-hint>\n }\n\n <mat-datepicker #picker></mat-datepicker>\n</mat-form-field>\n\n@if ( isOpen || !hasValue || !clear ) {\n <nrcl-button tertiary\n icon=\"event\"\n (click)=\"picker.open()\"\n ></nrcl-button>\n}\n@else {\n <nrcl-button tertiary\n icon=\"close\"\n (click)=\"onCancelClick()\"\n ></nrcl-button>\n}\n", styles: ["::ng-deep :root{--nrcl-filter-date-width: var( --nrcl-filter-width-2 );--nrcl-filter-date-height: var( --nrcl-filter-height )}:host{--mat-form-field-container-height: calc( var( --nrcl-filter-date-height ) - 4px );--mat-form-field-container-vertical-padding: 8px;--mat-form-field-container-text-size: 15px;--mat-form-field-outlined-focus-label-text-color: black;--mat-form-field-outlined-hover-label-text-color: black;width:var(--nrcl-filter-date-width);display:block;position:relative}:host .nrcl-button{position:absolute;right:2px;top:2px;bottom:2px}:host ::ng-deep .mat-mdc-form-field{width:100%}:host ::ng-deep .mat-mdc-form-field .mat-mdc-text-field-wrapper{background-color:#fff;height:var(--nrcl-filter-date-height)}:host ::ng-deep .mat-mdc-form-field .mat-mdc-text-field-wrapper .mat-mdc-form-field-infix{width:var(--nrcl-filter-date-width)}\n"] }]
|
|
904
|
+
], template: "<mat-form-field\n floatLabel=\"auto\"\n appearance=\"outline\"\n subscriptSizing=\"dynamic\"\n>\n <mat-label>{{ label }}</mat-label>\n\n <input matInput class=\"search-input\" readonly\n [ngModel]=\"value\"\n (ngModelChange)=\"onDateChange( $event )\"\n [placeholder]=\"placeholder\"\n maxlength=\"10\"\n (click)=\"onInputFocus()\"\n [matDatepicker]=\"picker\"\n [min]=\"min\"\n [max]=\"max\"\n #filter=\"ngModel\"\n >\n\n @if ( filter.invalid && ( filter.dirty || filter.touched ) ) {\n @if ( filter.hasError( 'matDatepickerMin' ) ) {\n <mat-error>{{ minErrorMessage }}</mat-error>\n }\n\n @if ( filter.hasError( 'matDatepickerMax' ) ) {\n <mat-error>{{ maxErrorMessage }}</mat-error>\n }\n }\n\n @if ( hint ) {\n <mat-hint>{{ hint }}</mat-hint>\n }\n\n <mat-datepicker #picker></mat-datepicker>\n</mat-form-field>\n\n@if ( isOpen || !hasValue || !clear ) {\n <nrcl-button tertiary\n icon=\"event\"\n (click)=\"picker.open()\"\n ></nrcl-button>\n}\n@else {\n <nrcl-button tertiary\n icon=\"close\"\n (click)=\"onCancelClick()\"\n ></nrcl-button>\n}\n", styles: ["::ng-deep :root{--nrcl-filter-date-width: var( --nrcl-filter-width-2 );--nrcl-filter-date-height: var( --nrcl-filter-height )}:host{--mat-form-field-container-height: calc( var( --nrcl-filter-date-height ) - 4px );--mat-form-field-container-vertical-padding: 8px;--mat-form-field-container-text-size: 15px;--mat-form-field-outlined-focus-label-text-color: black;--mat-form-field-outlined-hover-label-text-color: black;width:var(--nrcl-filter-date-width);display:block;position:relative}:host .nrcl-button{position:absolute;right:2px;top:2px;bottom:2px}:host ::ng-deep .mat-mdc-form-field{width:100%}:host ::ng-deep .mat-mdc-form-field .mat-mdc-text-field-wrapper{background-color:#fff;height:var(--nrcl-filter-date-height)}:host ::ng-deep .mat-mdc-form-field .mat-mdc-text-field-wrapper .mat-mdc-form-field-infix{width:var(--nrcl-filter-date-width)}:host ::ng-deep .mat-mdc-form-field .mat-mdc-text-field-wrapper .mat-mdc-form-field-infix .mat-mdc-form-field-error{position:absolute;padding-top:4px;font-size:12px}\n"] }]
|
|
898
905
|
}], propDecorators: { label: [{
|
|
899
906
|
type: Input
|
|
900
907
|
}], placeholder: [{
|
|
@@ -908,6 +915,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
908
915
|
}], clear: [{
|
|
909
916
|
type: Input,
|
|
910
917
|
args: [{ transform: booleanAttribute }]
|
|
918
|
+
}], min: [{
|
|
919
|
+
type: Input
|
|
920
|
+
}], minErrorMessage: [{
|
|
921
|
+
type: Input
|
|
922
|
+
}], max: [{
|
|
923
|
+
type: Input
|
|
924
|
+
}], maxErrorMessage: [{
|
|
925
|
+
type: Input
|
|
911
926
|
}], valueChange: [{
|
|
912
927
|
type: Output
|
|
913
928
|
}], picker: [{
|
|
@@ -2528,7 +2543,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
2528
2543
|
type: Output
|
|
2529
2544
|
}] } });
|
|
2530
2545
|
|
|
2531
|
-
class DialogComponent extends
|
|
2546
|
+
class DialogComponent extends ConfigurationSubscriberBase {
|
|
2532
2547
|
constructor() {
|
|
2533
2548
|
super(...arguments);
|
|
2534
2549
|
this.isLoading = false;
|
|
@@ -2543,7 +2558,7 @@ class DialogComponent extends NrclBase {
|
|
|
2543
2558
|
this.cancelClick = new EventEmitter();
|
|
2544
2559
|
}
|
|
2545
2560
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: DialogComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
2546
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: DialogComponent, isStandalone: true, selector: "nrcl-dialog", inputs: { title: "title", isLoading: "isLoading", showClose: "showClose", saveLabel: "saveLabel", saveEnabled: "saveEnabled", cancelLabel: "cancelLabel", cancelEnabled: "cancelEnabled", showWarning: "showWarning", showActions: "showActions" }, outputs: { saveClick: "saveClick", cancelClick: "cancelClick" }, usesInheritance: true, ngImport: i0, template: "<div mat-dialog-title >\n <div class=\"title-bar\">\n <ng-content select=\"section[header]\">\n <h1>{{ title }}</h1>\n\n <div style=\"flex: 1 0\"></div>\n\n @if ( isLoading ) {\n <div class=\"spinner-header\">\n <mat-spinner [diameter]=\"25\"></mat-spinner>\n </div>\n }\n\n @if ( showClose ) {\n <nrcl-button tertiary class=\"close\"\n icon=\"close\"\n ariaLabel=\"Close dialog\"\n (click)=\"cancelClick.emit()\"\n ></nrcl-button> \n }\n </ng-content>\n </div>\n\n <ng-content select=\"section[title]\"></ng-content>\n</div>\n\n<div mat-dialog-content>\n <div class=\"content-wrapper\">\n <ng-content></ng-content>\n </div>\n</div>\n\n<ng-content select=\"section[footer]\"></ng-content>\n\n@if ( showActions ) {\n <div mat-dialog-actions align=\"end\">\n <div class=\"action-button-wrapper\"> \n <ng-content select=\"section[actions]\">\n @if ( saveEnabled && showWarning ) {\n <div class=\"warning\">\n <nrcl-icon attr.alt=\"Unsaved Changes\">warning</nrcl-icon>\n <span>Unsaved Changes</span>\n </div>\n } \n \n @if ( cancelEnabled != null ) {\n <nrcl-button \n [label]=\"cancelLabel\"\n (click)=\"cancelClick.emit()\"\n [disabled]=\"!cancelEnabled\"\n ></nrcl-button>\n }\n\n @if ( saveEnabled != null ) {\n <nrcl-button primary\n [label]=\"saveLabel\"\n (click)=\"saveClick.emit()\" \n [disabled]=\"!saveEnabled\"\n ></nrcl-button>\n }\n </ng-content>\n </div>\n </div>\n}\n", styles: [":host{display:contents}:host .title-bar{display:flex;align-items:center;background-color
|
|
2561
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: DialogComponent, isStandalone: true, selector: "nrcl-dialog", inputs: { title: "title", isLoading: "isLoading", showClose: "showClose", saveLabel: "saveLabel", saveEnabled: "saveEnabled", cancelLabel: "cancelLabel", cancelEnabled: "cancelEnabled", showWarning: "showWarning", showActions: "showActions" }, outputs: { saveClick: "saveClick", cancelClick: "cancelClick" }, usesInheritance: true, ngImport: i0, template: "<div mat-dialog-title >\n <div class=\"title-bar\">\n <ng-content select=\"section[header]\">\n <h1>{{ title }}</h1>\n\n <div style=\"flex: 1 0\"></div>\n\n @if ( isLoading ) {\n <div class=\"spinner-header\">\n <mat-spinner [diameter]=\"25\"></mat-spinner>\n </div>\n }\n\n @if ( showClose ) {\n <nrcl-button tertiary class=\"close\"\n icon=\"close\"\n ariaLabel=\"Close dialog\"\n (click)=\"cancelClick.emit()\"\n ></nrcl-button> \n }\n </ng-content>\n </div>\n\n <ng-content select=\"section[title]\"></ng-content>\n</div>\n\n<div mat-dialog-content>\n <div class=\"content-wrapper\">\n <ng-content></ng-content>\n </div>\n</div>\n\n<ng-content select=\"section[footer]\"></ng-content>\n\n@if ( showActions ) {\n <div mat-dialog-actions align=\"end\">\n <div class=\"action-button-wrapper\"> \n <ng-content select=\"section[actions]\">\n @if ( saveEnabled && showWarning ) {\n <div class=\"warning\">\n <nrcl-icon attr.alt=\"Unsaved Changes\">warning</nrcl-icon>\n <span>Unsaved Changes</span>\n </div>\n } \n \n @if ( cancelEnabled != null ) {\n <nrcl-button \n [secondary]=\"isStyle2025\"\n [tertiary]=\"isStyle2026\"\n [label]=\"cancelLabel\"\n (click)=\"cancelClick.emit()\"\n [disabled]=\"!cancelEnabled\"\n ></nrcl-button>\n }\n\n @if ( saveEnabled != null ) {\n <nrcl-button \n [primary]=\"isStyle2025\"\n [secondary]=\"isStyle2026\"\n [label]=\"saveLabel\"\n (click)=\"saveClick.emit()\" \n [disabled]=\"!saveEnabled\"\n ></nrcl-button>\n }\n </ng-content>\n </div>\n </div>\n}\n", styles: ["::ng-deep :root{--nrcl-dialog-border-color: #c6c8cb}::ng-deep :root .nrcl-style-2025{--nrcl-dialog-title-bar-background-color: #003366;--nrcl-dialog-title-bar-foreground-color: white;--nrcl-dialog-title-bar-border-style: none;--nrcl-dialog-actions-background-color: #F2F2F2;--nrcl-dialog-actions-foreground-color: black;--nrcl-dialog-spinner-color: white}::ng-deep :root .nrcl-style-2026{--nrcl-dialog-title-bar-background-color: white;--nrcl-dialog-title-bar-foreground-color: black;--nrcl-dialog-title-bar-border-style: solid;--nrcl-dialog-actions-background-color: white;--nrcl-dialog-actions-foreground-color: black;--nrcl-dialog-spinner-color: black}:host{display:contents}:host .title-bar{display:flex;align-items:center;background-color:var(--nrcl-dialog-title-bar-background-color);color:var(--nrcl-dialog-title-bar-foreground-color);padding:var(--nrcl-gutter-space);border-bottom-style:var(--nrcl-dialog-title-bar-border-style);border-bottom-width:1px;border-bottom-color:var(--nrcl-dialog-border-color)}:host .title-bar ::ng-deep section[header]{display:contents}:host .title-bar h1{margin:0;padding:0;font-weight:400;font-family:var(--nrcl-font-family);font-size:var(--mat-dialog-subhead-size, 1rem);display:flex;align-items:center}:host .title-bar .spinner-header{--mat-progress-spinner-active-indicator-color: var(--nrcl-dialog-spinner-color)}:host .title-bar .close{display:flex;--nrcl-button-tertiary-foreground-color: var( --nrcl-dialog-title-bar-foreground-color );--nrcl-button-width: 32px;--nrcl-button-height: 32px}:host ::ng-deep .mat-mdc-dialog-title{padding:0}:host ::ng-deep .mat-mdc-dialog-title:before{display:none}:host ::ng-deep .mat-mdc-dialog-content{margin:0;padding:0;max-height:unset}:host ::ng-deep .mat-mdc-dialog-content .content-wrapper{padding-top:var(--nrcl-gutter-space);padding-left:var(--nrcl-gutter-space);padding-right:var(--nrcl-gutter-space);padding-bottom:0}:host ::ng-deep .mat-mdc-dialog-actions{margin:0;padding:0}:host ::ng-deep .mat-mdc-dialog-actions .footer{width:100%}:host ::ng-deep .mat-mdc-dialog-actions .action-button-wrapper{background-color:var(--nrcl-dialog-actions-background-color);color:var(--nrcl-dialog-actions-foreground-color);border-top-style:solid;border-top-width:1px;border-top-color:var(--nrcl-dialog-border-color);padding:var(--nrcl-gutter-space);display:flex;align-items:center;justify-content:flex-end;gap:8px;width:100%}:host ::ng-deep .mat-mdc-dialog-actions .action-button-wrapper section[actions]{display:contents}:host ::ng-deep .mat-mdc-dialog-actions .action-button-wrapper .warning{display:flex;align-items:center}:host ::ng-deep .mat-mdc-dialog-actions .action-button-wrapper .warning .mat-icon{color:#fcba19;margin-right:8px}::ng-deep .cdk-overlay-pane.nrcl-dialog mat-dialog-container.mat-mdc-dialog-container{font-family:var(--nrcl-font-family);font-size:var(--nrcl-font-size);--mat-dialog-supporting-text-color: rgba(0, 0, 0, .87)}::ng-deep .cdk-overlay-pane.nrcl-dialog mat-dialog-container.mat-mdc-dialog-container .mat-mdc-dialog-content{font-family:var(--nrcl-font-family);font-size:var(--nrcl-font-size)}:host-context(.nrcl-device-desktop) .cdk-overlay-pane.nrcl-dialog .mat-mdc-dialog-container .mat-mdc-dialog-surface{overflow:hidden}:host-context(.nrcl-device-desktop) .cdk-overlay-pane.nrcl-dialog .mat-mdc-dialog-container .mat-mdc-dialog-content.no-scroll{overflow-y:hidden}:host-context(.nrcl-device-mobile) .cdk-overlay-pane.nrcl-dialog{width:unset!important;max-width:unset!important}:host-context(.nrcl-device-mobile) .cdk-overlay-pane.nrcl-dialog .mat-mdc-dialog-container .mat-mdc-dialog-surface{overflow:hidden}:host-context(.nrcl-device-mobile) .cdk-overlay-pane.nrcl-dialog .mat-mdc-dialog-container .title-bar .spinner-header{top:10px;right:14px}:host-context(.nrcl-device-mobile) .cdk-overlay-pane.nrcl-dialog .mat-mdc-dialog-container .mat-mdc-dialog-content{overflow-y:auto!important;max-height:calc(var(--vh, 1vh) * 100 - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 135px);width:calc(var(--vw, 1vw) * 100 - env(safe-area-inset-left) - env(safe-area-inset-right) - 2 * var(--nrcl-gutter-space))}:host-context(.nrcl-device-mobile) .cdk-overlay-pane.nrcl-dialog .mat-mdc-dialog-container .mat-mdc-dialog-actions{width:calc(var(--vw, 1vw) * 100 - env(safe-area-inset-left) - env(safe-area-inset-right) - 2 * var(--nrcl-gutter-space))}:host-context(.nrcl-device-mobile) .cdk-overlay-pane.nrcl-dialog .mat-mdc-dialog-container .max-content-width{width:calc(var(--vw, 1vw) * 100 - env(safe-area-inset-left) - env(safe-area-inset-right) - 2 * var(--nrcl-gutter-space))}\n"], dependencies: [{ kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i1$4.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: ButtonComponent, selector: "nrcl-button", inputs: ["label", "ariaLabel", "icon", "iconRight", "iconCompact", "tooltip", "compact", "small", "primary", "secondary", "tertiary", "disabled", "anchor"], outputs: ["click"] }, { kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i2$3.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i2$3.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i2$3.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: IconComponent, selector: "nrcl-icon", inputs: ["small", "large", "fill"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2547
2562
|
}
|
|
2548
2563
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: DialogComponent, decorators: [{
|
|
2549
2564
|
type: Component,
|
|
@@ -2552,7 +2567,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
2552
2567
|
ButtonComponent,
|
|
2553
2568
|
MatDialogModule,
|
|
2554
2569
|
IconComponent
|
|
2555
|
-
], template: "<div mat-dialog-title >\n <div class=\"title-bar\">\n <ng-content select=\"section[header]\">\n <h1>{{ title }}</h1>\n\n <div style=\"flex: 1 0\"></div>\n\n @if ( isLoading ) {\n <div class=\"spinner-header\">\n <mat-spinner [diameter]=\"25\"></mat-spinner>\n </div>\n }\n\n @if ( showClose ) {\n <nrcl-button tertiary class=\"close\"\n icon=\"close\"\n ariaLabel=\"Close dialog\"\n (click)=\"cancelClick.emit()\"\n ></nrcl-button> \n }\n </ng-content>\n </div>\n\n <ng-content select=\"section[title]\"></ng-content>\n</div>\n\n<div mat-dialog-content>\n <div class=\"content-wrapper\">\n <ng-content></ng-content>\n </div>\n</div>\n\n<ng-content select=\"section[footer]\"></ng-content>\n\n@if ( showActions ) {\n <div mat-dialog-actions align=\"end\">\n <div class=\"action-button-wrapper\"> \n <ng-content select=\"section[actions]\">\n @if ( saveEnabled && showWarning ) {\n <div class=\"warning\">\n <nrcl-icon attr.alt=\"Unsaved Changes\">warning</nrcl-icon>\n <span>Unsaved Changes</span>\n </div>\n } \n \n @if ( cancelEnabled != null ) {\n <nrcl-button \n [label]=\"cancelLabel\"\n (click)=\"cancelClick.emit()\"\n [disabled]=\"!cancelEnabled\"\n ></nrcl-button>\n }\n\n @if ( saveEnabled != null ) {\n <nrcl-button primary\n [label]=\"saveLabel\"\n (click)=\"saveClick.emit()\" \n [disabled]=\"!saveEnabled\"\n ></nrcl-button>\n }\n </ng-content>\n </div>\n </div>\n}\n", styles: [":host{display:contents}:host .title-bar{display:flex;align-items:center;background-color
|
|
2570
|
+
], template: "<div mat-dialog-title >\n <div class=\"title-bar\">\n <ng-content select=\"section[header]\">\n <h1>{{ title }}</h1>\n\n <div style=\"flex: 1 0\"></div>\n\n @if ( isLoading ) {\n <div class=\"spinner-header\">\n <mat-spinner [diameter]=\"25\"></mat-spinner>\n </div>\n }\n\n @if ( showClose ) {\n <nrcl-button tertiary class=\"close\"\n icon=\"close\"\n ariaLabel=\"Close dialog\"\n (click)=\"cancelClick.emit()\"\n ></nrcl-button> \n }\n </ng-content>\n </div>\n\n <ng-content select=\"section[title]\"></ng-content>\n</div>\n\n<div mat-dialog-content>\n <div class=\"content-wrapper\">\n <ng-content></ng-content>\n </div>\n</div>\n\n<ng-content select=\"section[footer]\"></ng-content>\n\n@if ( showActions ) {\n <div mat-dialog-actions align=\"end\">\n <div class=\"action-button-wrapper\"> \n <ng-content select=\"section[actions]\">\n @if ( saveEnabled && showWarning ) {\n <div class=\"warning\">\n <nrcl-icon attr.alt=\"Unsaved Changes\">warning</nrcl-icon>\n <span>Unsaved Changes</span>\n </div>\n } \n \n @if ( cancelEnabled != null ) {\n <nrcl-button \n [secondary]=\"isStyle2025\"\n [tertiary]=\"isStyle2026\"\n [label]=\"cancelLabel\"\n (click)=\"cancelClick.emit()\"\n [disabled]=\"!cancelEnabled\"\n ></nrcl-button>\n }\n\n @if ( saveEnabled != null ) {\n <nrcl-button \n [primary]=\"isStyle2025\"\n [secondary]=\"isStyle2026\"\n [label]=\"saveLabel\"\n (click)=\"saveClick.emit()\" \n [disabled]=\"!saveEnabled\"\n ></nrcl-button>\n }\n </ng-content>\n </div>\n </div>\n}\n", styles: ["::ng-deep :root{--nrcl-dialog-border-color: #c6c8cb}::ng-deep :root .nrcl-style-2025{--nrcl-dialog-title-bar-background-color: #003366;--nrcl-dialog-title-bar-foreground-color: white;--nrcl-dialog-title-bar-border-style: none;--nrcl-dialog-actions-background-color: #F2F2F2;--nrcl-dialog-actions-foreground-color: black;--nrcl-dialog-spinner-color: white}::ng-deep :root .nrcl-style-2026{--nrcl-dialog-title-bar-background-color: white;--nrcl-dialog-title-bar-foreground-color: black;--nrcl-dialog-title-bar-border-style: solid;--nrcl-dialog-actions-background-color: white;--nrcl-dialog-actions-foreground-color: black;--nrcl-dialog-spinner-color: black}:host{display:contents}:host .title-bar{display:flex;align-items:center;background-color:var(--nrcl-dialog-title-bar-background-color);color:var(--nrcl-dialog-title-bar-foreground-color);padding:var(--nrcl-gutter-space);border-bottom-style:var(--nrcl-dialog-title-bar-border-style);border-bottom-width:1px;border-bottom-color:var(--nrcl-dialog-border-color)}:host .title-bar ::ng-deep section[header]{display:contents}:host .title-bar h1{margin:0;padding:0;font-weight:400;font-family:var(--nrcl-font-family);font-size:var(--mat-dialog-subhead-size, 1rem);display:flex;align-items:center}:host .title-bar .spinner-header{--mat-progress-spinner-active-indicator-color: var(--nrcl-dialog-spinner-color)}:host .title-bar .close{display:flex;--nrcl-button-tertiary-foreground-color: var( --nrcl-dialog-title-bar-foreground-color );--nrcl-button-width: 32px;--nrcl-button-height: 32px}:host ::ng-deep .mat-mdc-dialog-title{padding:0}:host ::ng-deep .mat-mdc-dialog-title:before{display:none}:host ::ng-deep .mat-mdc-dialog-content{margin:0;padding:0;max-height:unset}:host ::ng-deep .mat-mdc-dialog-content .content-wrapper{padding-top:var(--nrcl-gutter-space);padding-left:var(--nrcl-gutter-space);padding-right:var(--nrcl-gutter-space);padding-bottom:0}:host ::ng-deep .mat-mdc-dialog-actions{margin:0;padding:0}:host ::ng-deep .mat-mdc-dialog-actions .footer{width:100%}:host ::ng-deep .mat-mdc-dialog-actions .action-button-wrapper{background-color:var(--nrcl-dialog-actions-background-color);color:var(--nrcl-dialog-actions-foreground-color);border-top-style:solid;border-top-width:1px;border-top-color:var(--nrcl-dialog-border-color);padding:var(--nrcl-gutter-space);display:flex;align-items:center;justify-content:flex-end;gap:8px;width:100%}:host ::ng-deep .mat-mdc-dialog-actions .action-button-wrapper section[actions]{display:contents}:host ::ng-deep .mat-mdc-dialog-actions .action-button-wrapper .warning{display:flex;align-items:center}:host ::ng-deep .mat-mdc-dialog-actions .action-button-wrapper .warning .mat-icon{color:#fcba19;margin-right:8px}::ng-deep .cdk-overlay-pane.nrcl-dialog mat-dialog-container.mat-mdc-dialog-container{font-family:var(--nrcl-font-family);font-size:var(--nrcl-font-size);--mat-dialog-supporting-text-color: rgba(0, 0, 0, .87)}::ng-deep .cdk-overlay-pane.nrcl-dialog mat-dialog-container.mat-mdc-dialog-container .mat-mdc-dialog-content{font-family:var(--nrcl-font-family);font-size:var(--nrcl-font-size)}:host-context(.nrcl-device-desktop) .cdk-overlay-pane.nrcl-dialog .mat-mdc-dialog-container .mat-mdc-dialog-surface{overflow:hidden}:host-context(.nrcl-device-desktop) .cdk-overlay-pane.nrcl-dialog .mat-mdc-dialog-container .mat-mdc-dialog-content.no-scroll{overflow-y:hidden}:host-context(.nrcl-device-mobile) .cdk-overlay-pane.nrcl-dialog{width:unset!important;max-width:unset!important}:host-context(.nrcl-device-mobile) .cdk-overlay-pane.nrcl-dialog .mat-mdc-dialog-container .mat-mdc-dialog-surface{overflow:hidden}:host-context(.nrcl-device-mobile) .cdk-overlay-pane.nrcl-dialog .mat-mdc-dialog-container .title-bar .spinner-header{top:10px;right:14px}:host-context(.nrcl-device-mobile) .cdk-overlay-pane.nrcl-dialog .mat-mdc-dialog-container .mat-mdc-dialog-content{overflow-y:auto!important;max-height:calc(var(--vh, 1vh) * 100 - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 135px);width:calc(var(--vw, 1vw) * 100 - env(safe-area-inset-left) - env(safe-area-inset-right) - 2 * var(--nrcl-gutter-space))}:host-context(.nrcl-device-mobile) .cdk-overlay-pane.nrcl-dialog .mat-mdc-dialog-container .mat-mdc-dialog-actions{width:calc(var(--vw, 1vw) * 100 - env(safe-area-inset-left) - env(safe-area-inset-right) - 2 * var(--nrcl-gutter-space))}:host-context(.nrcl-device-mobile) .cdk-overlay-pane.nrcl-dialog .mat-mdc-dialog-container .max-content-width{width:calc(var(--vw, 1vw) * 100 - env(safe-area-inset-left) - env(safe-area-inset-right) - 2 * var(--nrcl-gutter-space))}\n"] }]
|
|
2556
2571
|
}], propDecorators: { title: [{
|
|
2557
2572
|
type: Input
|
|
2558
2573
|
}], isLoading: [{
|
|
@@ -3348,6 +3363,14 @@ class DialogService {
|
|
|
3348
3363
|
};
|
|
3349
3364
|
return this.matDialog.open(dialog, config);
|
|
3350
3365
|
}
|
|
3366
|
+
openDialogTemplate(dialog, data, additionalConfig) {
|
|
3367
|
+
let config = {
|
|
3368
|
+
...DEFAULT_CONFIG,
|
|
3369
|
+
data,
|
|
3370
|
+
...additionalConfig
|
|
3371
|
+
};
|
|
3372
|
+
return this.matDialog.open(dialog, config);
|
|
3373
|
+
}
|
|
3351
3374
|
openConfirmDialog(config, additionalConfig) {
|
|
3352
3375
|
return this.openDialog(DialogConfirmComponent, config, additionalConfig);
|
|
3353
3376
|
}
|