@rivet-health/design-system 18.0.0 → 18.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.
- package/esm2020/lib/notification/banner/banner-action.component.mjs +43 -6
- package/fesm2015/rivet-health-design-system.mjs +39 -4
- package/fesm2015/rivet-health-design-system.mjs.map +1 -1
- package/fesm2020/rivet-health-design-system.mjs +39 -4
- package/fesm2020/rivet-health-design-system.mjs.map +1 -1
- package/lib/notification/banner/banner-action.component.d.ts +12 -2
- package/package.json +1 -1
|
@@ -1,11 +1,48 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
1
|
+
import { ChangeDetectionStrategy, Component, HostBinding, Input, } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "@angular/common";
|
|
4
|
+
import * as i2 from "../../icon/icon.component";
|
|
3
5
|
export class BannerActionComponent {
|
|
6
|
+
constructor(el, renderer) {
|
|
7
|
+
this.el = el;
|
|
8
|
+
this.renderer = renderer;
|
|
9
|
+
this.disableNativeElement = false;
|
|
10
|
+
this.lockNativeElement = false;
|
|
11
|
+
}
|
|
12
|
+
get isDisabled() {
|
|
13
|
+
return this.disabled || this.locked;
|
|
14
|
+
}
|
|
15
|
+
ngOnChanges(changes) {
|
|
16
|
+
const accessChange = !!changes['disabled'] || !!changes['locked'];
|
|
17
|
+
if (accessChange) {
|
|
18
|
+
if (changes['disabled']) {
|
|
19
|
+
this.disableNativeElement = changes['disabled'].currentValue;
|
|
20
|
+
}
|
|
21
|
+
if (changes['locked']) {
|
|
22
|
+
this.lockNativeElement = changes['locked'].currentValue;
|
|
23
|
+
}
|
|
24
|
+
if ('disabled' in this.el.nativeElement) {
|
|
25
|
+
if (this.disableNativeElement || this.lockNativeElement) {
|
|
26
|
+
this.renderer.setAttribute(this.el.nativeElement, 'disabled', 'true');
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
this.renderer.removeAttribute(this.el.nativeElement, 'disabled');
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
4
34
|
}
|
|
5
|
-
BannerActionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BannerActionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6
|
-
BannerActionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: BannerActionComponent, selector: "[riv-banner-action]", ngImport: i0, template:
|
|
35
|
+
BannerActionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BannerActionComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
36
|
+
BannerActionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: BannerActionComponent, selector: "[riv-banner-action]", inputs: { locked: "locked", disabled: "disabled" }, host: { properties: { "class.disabled": "this.isDisabled" } }, usesOnChanges: true, ngImport: i0, template: "<ng-content></ng-content>\n<riv-icon *ngIf=\"locked\" [name]=\"'Lock'\" [size]=\"16\"></riv-icon>\n", styles: [":host{display:inline-block;color:currentColor;text-decoration:underline;cursor:pointer}:host:disabled,:host.disabled{color:var(--type-light-disabled);cursor:default}riv-icon{vertical-align:bottom}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.IconComponent, selector: "riv-icon", inputs: ["name", "size", "customSize", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7
37
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BannerActionComponent, decorators: [{
|
|
8
38
|
type: Component,
|
|
9
|
-
args: [{ selector: '[riv-banner-action]', template:
|
|
10
|
-
}] }
|
|
11
|
-
|
|
39
|
+
args: [{ selector: '[riv-banner-action]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>\n<riv-icon *ngIf=\"locked\" [name]=\"'Lock'\" [size]=\"16\"></riv-icon>\n", styles: [":host{display:inline-block;color:currentColor;text-decoration:underline;cursor:pointer}:host:disabled,:host.disabled{color:var(--type-light-disabled);cursor:default}riv-icon{vertical-align:bottom}\n"] }]
|
|
40
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { locked: [{
|
|
41
|
+
type: Input
|
|
42
|
+
}], disabled: [{
|
|
43
|
+
type: Input
|
|
44
|
+
}], isDisabled: [{
|
|
45
|
+
type: HostBinding,
|
|
46
|
+
args: ['class.disabled']
|
|
47
|
+
}] } });
|
|
48
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFubmVyLWFjdGlvbi5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9yaXYvc3JjL2xpYi9ub3RpZmljYXRpb24vYmFubmVyL2Jhbm5lci1hY3Rpb24uY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvcml2L3NyYy9saWIvbm90aWZpY2F0aW9uL2Jhbm5lci9iYW5uZXItYWN0aW9uLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFDTCx1QkFBdUIsRUFDdkIsU0FBUyxFQUVULFdBQVcsRUFDWCxLQUFLLEdBSU4sTUFBTSxlQUFlLENBQUM7Ozs7QUFRdkIsTUFBTSxPQUFPLHFCQUFxQjtJQUNoQyxZQUNtQixFQUFjLEVBQ2QsUUFBbUI7UUFEbkIsT0FBRSxHQUFGLEVBQUUsQ0FBWTtRQUNkLGFBQVEsR0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W50LCAnZGlzYWJsZWQnLCAndHJ1ZScpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHRoaXMucmVuZGVyZXIucmVtb3ZlQXR0cmlidXRlKHRoaXMuZWwubmF0aXZlRWxlbWVudCwgJ2Rpc2FibGVkJyk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gIH1cbn1cbiIsIjxuZy1jb250ZW50PjwvbmctY29udGVudD5cbjxyaXYtaWNvbiAqbmdJZj1cImxvY2tlZFwiIFtuYW1lXT1cIidMb2NrJ1wiIFtzaXplXT1cIjE2XCI+PC9yaXYtaWNvbj5cbiJdfQ==
|
|
@@ -2888,13 +2888,48 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
2888
2888
|
})(BadgeComponent || (BadgeComponent = {}));
|
|
2889
2889
|
|
|
2890
2890
|
class BannerActionComponent {
|
|
2891
|
+
constructor(el, renderer) {
|
|
2892
|
+
this.el = el;
|
|
2893
|
+
this.renderer = renderer;
|
|
2894
|
+
this.disableNativeElement = false;
|
|
2895
|
+
this.lockNativeElement = false;
|
|
2896
|
+
}
|
|
2897
|
+
get isDisabled() {
|
|
2898
|
+
return this.disabled || this.locked;
|
|
2899
|
+
}
|
|
2900
|
+
ngOnChanges(changes) {
|
|
2901
|
+
const accessChange = !!changes['disabled'] || !!changes['locked'];
|
|
2902
|
+
if (accessChange) {
|
|
2903
|
+
if (changes['disabled']) {
|
|
2904
|
+
this.disableNativeElement = changes['disabled'].currentValue;
|
|
2905
|
+
}
|
|
2906
|
+
if (changes['locked']) {
|
|
2907
|
+
this.lockNativeElement = changes['locked'].currentValue;
|
|
2908
|
+
}
|
|
2909
|
+
if ('disabled' in this.el.nativeElement) {
|
|
2910
|
+
if (this.disableNativeElement || this.lockNativeElement) {
|
|
2911
|
+
this.renderer.setAttribute(this.el.nativeElement, 'disabled', 'true');
|
|
2912
|
+
}
|
|
2913
|
+
else {
|
|
2914
|
+
this.renderer.removeAttribute(this.el.nativeElement, 'disabled');
|
|
2915
|
+
}
|
|
2916
|
+
}
|
|
2917
|
+
}
|
|
2918
|
+
}
|
|
2891
2919
|
}
|
|
2892
|
-
BannerActionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BannerActionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2893
|
-
BannerActionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: BannerActionComponent, selector: "[riv-banner-action]", ngImport: i0, template:
|
|
2920
|
+
BannerActionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BannerActionComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
2921
|
+
BannerActionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: BannerActionComponent, selector: "[riv-banner-action]", inputs: { locked: "locked", disabled: "disabled" }, host: { properties: { "class.disabled": "this.isDisabled" } }, usesOnChanges: true, ngImport: i0, template: "<ng-content></ng-content>\n<riv-icon *ngIf=\"locked\" [name]=\"'Lock'\" [size]=\"16\"></riv-icon>\n", styles: [":host{display:inline-block;color:currentColor;text-decoration:underline;cursor:pointer}:host:disabled,:host.disabled{color:var(--type-light-disabled);cursor:default}riv-icon{vertical-align:bottom}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconComponent, selector: "riv-icon", inputs: ["name", "size", "customSize", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2894
2922
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BannerActionComponent, decorators: [{
|
|
2895
2923
|
type: Component,
|
|
2896
|
-
args: [{ selector: '[riv-banner-action]', template:
|
|
2897
|
-
}] }
|
|
2924
|
+
args: [{ selector: '[riv-banner-action]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>\n<riv-icon *ngIf=\"locked\" [name]=\"'Lock'\" [size]=\"16\"></riv-icon>\n", styles: [":host{display:inline-block;color:currentColor;text-decoration:underline;cursor:pointer}:host:disabled,:host.disabled{color:var(--type-light-disabled);cursor:default}riv-icon{vertical-align:bottom}\n"] }]
|
|
2925
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { locked: [{
|
|
2926
|
+
type: Input
|
|
2927
|
+
}], disabled: [{
|
|
2928
|
+
type: Input
|
|
2929
|
+
}], isDisabled: [{
|
|
2930
|
+
type: HostBinding,
|
|
2931
|
+
args: ['class.disabled']
|
|
2932
|
+
}] } });
|
|
2898
2933
|
|
|
2899
2934
|
class BannerComponent {
|
|
2900
2935
|
constructor() {
|