@haiilo/catalyst-angular 6.4.6 → 6.5.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/esm2020/lib/catalyst.module.mjs +9 -9
- package/esm2020/lib/dialog/dialog.component.mjs +4 -4
- package/esm2020/lib/dialog/dialog.service.mjs +2 -2
- package/esm2020/lib/directives/value-accessor-decorator.mjs +22 -6
- package/fesm2015/haiilo-catalyst-angular.mjs +34 -19
- package/fesm2015/haiilo-catalyst-angular.mjs.map +1 -1
- package/fesm2020/haiilo-catalyst-angular.mjs +33 -18
- package/fesm2020/haiilo-catalyst-angular.mjs.map +1 -1
- package/lib/catalyst.module.d.ts +3 -3
- package/lib/directives/value-accessor-decorator.d.ts +5 -4
- package/package.json +3 -3
|
@@ -3,7 +3,7 @@ import { DialogModule } from '@angular/cdk/dialog';
|
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
|
-
import { Component, ChangeDetectionStrategy, ViewEncapsulation, Input, EventEmitter, Inject, Output, ContentChild, Directive, HostListener, Self, Optional, InjectionToken, NgModule, Injectable } from '@angular/core';
|
|
6
|
+
import { Component, ChangeDetectionStrategy, ViewEncapsulation, Input, EventEmitter, Inject, Output, ContentChild, Directive, HostListener, Self, Optional, Host, SkipSelf, InjectionToken, NgModule, Injectable } from '@angular/core';
|
|
7
7
|
import * as i3 from '@haiilo/catalyst';
|
|
8
8
|
import { catI18nRegistry, catIconRegistry, catNotificationService } from '@haiilo/catalyst';
|
|
9
9
|
import { defineCustomElements } from '@haiilo/catalyst/loader';
|
|
@@ -11,7 +11,7 @@ import log from 'loglevel';
|
|
|
11
11
|
import { __decorate } from 'tslib';
|
|
12
12
|
import { fromEvent } from 'rxjs';
|
|
13
13
|
import * as i1$2 from '@angular/forms';
|
|
14
|
-
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
14
|
+
import { NG_VALUE_ACCESSOR, Validators } from '@angular/forms';
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* The bottom actions of a dialog.
|
|
@@ -779,12 +779,12 @@ class CatDialogComponent {
|
|
|
779
779
|
}
|
|
780
780
|
}
|
|
781
781
|
CatDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: CatDialogComponent, deps: [{ token: i1$1.DialogRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
782
|
-
CatDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: CatDialogComponent, selector: "cat-dialog", host: { classAttribute: "cat-dialog
|
|
782
|
+
CatDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: CatDialogComponent, selector: "cat-dialog", host: { classAttribute: "cat-dialog" }, queries: [{ propertyName: "header", first: true, predicate: CatDialogHeaderComponent, descendants: true }], ngImport: i0, template: "<ng-content select=\"cat-dialog-header\"></ng-content>\n<cat-scrollable>\n <div class=\"cat-dialog-content\">\n <ng-content></ng-content>\n </div>\n</cat-scrollable>\n<ng-content select=\"cat-dialog-actions\"></ng-content>\n", styles: [".cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed;z-index:1000}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute;z-index:1000}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;z-index:1000;display:flex;max-width:100%;max-height:100%}.cdk-overlay-backdrop{position:absolute;inset:0;z-index:1000;pointer-events:auto;-webkit-tap-highlight-color:transparent;transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0}.cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:1}.cdk-high-contrast-active .cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:.6}.cdk-overlay-dark-backdrop{background:rgba(0,0,0,.32)}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;z-index:1000;display:flex;flex-direction:column;min-width:1px;min-height:1px}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}.cat-backdrop{transition-duration:.5s}.cat-dialog-pane .cdk-dialog-container>*:only-child{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}.cat-dialog{width:100%;height:100%;min-height:inherit;max-height:inherit;animation:cat-dialog-enter .25s ease}@keyframes cat-dialog-enter{0%{opacity:0;transform:translateY(24px)}to{opacity:1;transform:none}}\n"], dependencies: [{ kind: "component", type: CatScrollable, selector: "cat-scrollable", inputs: ["noOverflowX", "noOverflowY", "noOverscroll", "noScrolledInit", "noShadowX", "noShadowY", "scrolledBuffer"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
783
783
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: CatDialogComponent, decorators: [{
|
|
784
784
|
type: Component,
|
|
785
785
|
args: [{ selector: 'cat-dialog', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
786
|
-
class: 'cat-dialog
|
|
787
|
-
}, template: "<ng-content select=\"cat-dialog-header\"></ng-content>\n<cat-scrollable>\n <div class=\"cat-dialog-content\">\n <ng-content></ng-content>\n </div>\n</cat-scrollable>\n<ng-content select=\"cat-dialog-actions\"></ng-content>\n", styles: [".cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed;z-index:1000}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute;z-index:1000}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;z-index:1000;display:flex;max-width:100%;max-height:100%}.cdk-overlay-backdrop{position:absolute;inset:0;z-index:1000;pointer-events:auto;-webkit-tap-highlight-color:transparent;transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0}.cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:1}.cdk-high-contrast-active .cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:.6}.cdk-overlay-dark-backdrop{background:rgba(0,0,0,.32)}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;z-index:1000;display:flex;flex-direction:column;min-width:1px;min-height:1px}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}.
|
|
786
|
+
class: 'cat-dialog'
|
|
787
|
+
}, template: "<ng-content select=\"cat-dialog-header\"></ng-content>\n<cat-scrollable>\n <div class=\"cat-dialog-content\">\n <ng-content></ng-content>\n </div>\n</cat-scrollable>\n<ng-content select=\"cat-dialog-actions\"></ng-content>\n", styles: [".cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed;z-index:1000}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute;z-index:1000}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;z-index:1000;display:flex;max-width:100%;max-height:100%}.cdk-overlay-backdrop{position:absolute;inset:0;z-index:1000;pointer-events:auto;-webkit-tap-highlight-color:transparent;transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0}.cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:1}.cdk-high-contrast-active .cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:.6}.cdk-overlay-dark-backdrop{background:rgba(0,0,0,.32)}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;z-index:1000;display:flex;flex-direction:column;min-width:1px;min-height:1px}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}.cat-backdrop{transition-duration:.5s}.cat-dialog-pane .cdk-dialog-container>*:only-child{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}.cat-dialog{width:100%;height:100%;min-height:inherit;max-height:inherit;animation:cat-dialog-enter .25s ease}@keyframes cat-dialog-enter{0%{opacity:0;transform:translateY(24px)}to{opacity:1;transform:none}}\n"] }]
|
|
788
788
|
}], ctorParameters: function () { return [{ type: i1$1.DialogRef }]; }, propDecorators: { header: [{
|
|
789
789
|
type: ContentChild,
|
|
790
790
|
args: [CatDialogHeaderComponent]
|
|
@@ -978,29 +978,44 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImpor
|
|
|
978
978
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
|
|
979
979
|
|
|
980
980
|
class ValueAccessorDecorator {
|
|
981
|
-
constructor(el, controlDirective) {
|
|
981
|
+
constructor(el, controlDirective, controlContainer) {
|
|
982
982
|
this.el = el;
|
|
983
983
|
this.controlDirective = controlDirective;
|
|
984
|
+
this.controlContainer = controlContainer;
|
|
984
985
|
}
|
|
985
986
|
ngAfterViewInit() {
|
|
986
987
|
this.controlDirective?.statusChanges?.subscribe(() => this.updateErrors());
|
|
988
|
+
const controlName = this.controlDirective?.name?.toString() ?? '';
|
|
989
|
+
const control = this.controlContainer?.control?.get(controlName);
|
|
990
|
+
if (control?.hasValidator(Validators.required)) {
|
|
991
|
+
this.el.nativeElement.required = true;
|
|
992
|
+
}
|
|
987
993
|
}
|
|
988
994
|
updateErrors() {
|
|
989
995
|
this.el.nativeElement.errors = this.controlDirective?.errors || !!this.controlDirective?.invalid;
|
|
990
996
|
}
|
|
991
997
|
}
|
|
992
|
-
ValueAccessorDecorator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ValueAccessorDecorator, deps: [{ token: i0.ElementRef }, { token: i1$2.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
993
|
-
ValueAccessorDecorator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.7", type: ValueAccessorDecorator, selector: "cat-input, cat-textarea, cat-datepicker, cat-select", ngImport: i0 });
|
|
998
|
+
ValueAccessorDecorator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ValueAccessorDecorator, deps: [{ token: i0.ElementRef }, { token: i1$2.NgControl, optional: true, self: true }, { token: i1$2.ControlContainer, host: true, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
999
|
+
ValueAccessorDecorator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.7", type: ValueAccessorDecorator, selector: "cat-input, cat-textarea, cat-datepicker, cat-select", host: { listeners: { "catBlur": "updateErrors()" } }, ngImport: i0 });
|
|
994
1000
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ValueAccessorDecorator, decorators: [{
|
|
995
1001
|
type: Directive,
|
|
996
1002
|
args: [{
|
|
997
1003
|
/* tslint:disable-next-line:directive-selector */
|
|
998
|
-
selector: 'cat-input, cat-textarea, cat-datepicker, cat-select'
|
|
1004
|
+
selector: 'cat-input, cat-textarea, cat-datepicker, cat-select',
|
|
1005
|
+
host: {
|
|
1006
|
+
'(catBlur)': 'updateErrors()'
|
|
1007
|
+
}
|
|
999
1008
|
}]
|
|
1000
1009
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$2.NgControl, decorators: [{
|
|
1001
1010
|
type: Self
|
|
1002
1011
|
}, {
|
|
1003
1012
|
type: Optional
|
|
1013
|
+
}] }, { type: i1$2.ControlContainer, decorators: [{
|
|
1014
|
+
type: Optional
|
|
1015
|
+
}, {
|
|
1016
|
+
type: Host
|
|
1017
|
+
}, {
|
|
1018
|
+
type: SkipSelf
|
|
1004
1019
|
}] }]; } });
|
|
1005
1020
|
|
|
1006
1021
|
const CatComponents = [
|
|
@@ -1068,15 +1083,15 @@ CatalystModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version:
|
|
|
1068
1083
|
SelectValueAccessorDecorator,
|
|
1069
1084
|
TextValueAccessor,
|
|
1070
1085
|
ValueAccessorDecorator, CatDialogComponent,
|
|
1071
|
-
|
|
1072
|
-
|
|
1086
|
+
CatDialogHeaderComponent,
|
|
1087
|
+
CatDialogActionsComponent], imports: [CommonModule, DialogModule], exports: [CatAlert, CatAvatar, CatBadge, CatButton, CatButtonGroup, CatCard, CatCheckbox, CatDatepicker, CatDropdown, CatFormGroup, CatIcon, CatInput, CatPagination, CatRadio, CatRadioGroup, CatScrollable, CatSelect, CatSkeleton, CatSpinner, CatTab, CatTabs, CatTextarea, CatToggle, CatTooltip, BooleanValueAccessor,
|
|
1073
1088
|
RadioValueAccessor,
|
|
1074
1089
|
SelectValueAccessor,
|
|
1075
1090
|
SelectValueAccessorDecorator,
|
|
1076
1091
|
TextValueAccessor,
|
|
1077
1092
|
ValueAccessorDecorator, CatDialogComponent,
|
|
1078
|
-
|
|
1079
|
-
|
|
1093
|
+
CatDialogHeaderComponent,
|
|
1094
|
+
CatDialogActionsComponent] });
|
|
1080
1095
|
CatalystModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: CatalystModule, imports: [CommonModule, DialogModule] });
|
|
1081
1096
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: CatalystModule, decorators: [{
|
|
1082
1097
|
type: NgModule,
|
|
@@ -1086,15 +1101,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImpor
|
|
|
1086
1101
|
...CatComponents,
|
|
1087
1102
|
...CatDirectives,
|
|
1088
1103
|
CatDialogComponent,
|
|
1089
|
-
|
|
1090
|
-
|
|
1104
|
+
CatDialogHeaderComponent,
|
|
1105
|
+
CatDialogActionsComponent
|
|
1091
1106
|
],
|
|
1092
1107
|
exports: [
|
|
1093
1108
|
...CatComponents,
|
|
1094
1109
|
...CatDirectives,
|
|
1095
1110
|
CatDialogComponent,
|
|
1096
|
-
|
|
1097
|
-
|
|
1111
|
+
CatDialogHeaderComponent,
|
|
1112
|
+
CatDialogActionsComponent
|
|
1098
1113
|
],
|
|
1099
1114
|
providers: []
|
|
1100
1115
|
}]
|
|
@@ -1117,7 +1132,7 @@ class CatDialogService {
|
|
|
1117
1132
|
open(component, config) {
|
|
1118
1133
|
return this.dialog.open(component, {
|
|
1119
1134
|
backdropClass: 'cat-backdrop',
|
|
1120
|
-
panelClass: 'cat-dialog',
|
|
1135
|
+
panelClass: 'cat-dialog-pane',
|
|
1121
1136
|
width: '600px',
|
|
1122
1137
|
minWidth: 'clamp(240px, 100vw - 16px, 320px)',
|
|
1123
1138
|
minHeight: 'clamp(144px, 100vh - 16px, 160px)',
|