@ifsworld/granite-components 13.2.6 → 13.2.8
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/esm2022/lib/core/core.module.mjs +5 -2
- package/esm2022/lib/core/overlay-base.mjs +18 -0
- package/esm2022/lib/core/overlay-position-config.mjs +2 -0
- package/esm2022/lib/core/overlay-trigger-for-base.directive.mjs +121 -0
- package/esm2022/lib/core/overlay.service.mjs +90 -0
- package/esm2022/lib/input-field/input-field.component.mjs +4 -9
- package/esm2022/lib/progress-bar/progress-bar-legend/progress-bar-legend.component.mjs +2 -2
- package/esm2022/lib/progress-bar/progress-bar-legend-base.mjs +10 -13
- package/esm2022/lib/progress-bar/progress-bar-legend-trigger-for.directive.mjs +30 -167
- package/fesm2022/ifsworld-granite-components.mjs +238 -160
- package/fesm2022/ifsworld-granite-components.mjs.map +1 -1
- package/lib/core/core.module.d.ts +2 -1
- package/lib/core/overlay-base.d.ts +16 -0
- package/lib/core/overlay-position-config.d.ts +12 -0
- package/lib/core/overlay-trigger-for-base.directive.d.ts +32 -0
- package/lib/core/overlay.service.d.ts +21 -0
- package/lib/input-field/input-field.component.d.ts +0 -1
- package/lib/progress-bar/progress-bar-legend-base.d.ts +3 -12
- package/lib/progress-bar/progress-bar-legend-trigger-for.directive.d.ts +14 -37
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, ChangeDetectionStrategy, Input, HostBinding, ContentChildren, NgModule, InjectionToken, Attribute, Inject, Optional, EventEmitter, QueryList, TemplateRef, Directive, ViewChild, Output, Self, HostListener, ContentChild,
|
|
2
|
+
import { Component, ChangeDetectionStrategy, Input, HostBinding, ContentChildren, NgModule, InjectionToken, Attribute, Inject, Optional, EventEmitter, QueryList, TemplateRef, Directive, ViewChild, Output, Self, HostListener, ContentChild, Injectable, inject, ElementRef, ViewContainerRef, Pipe } from '@angular/core';
|
|
3
3
|
import * as i1$1 from '@angular/common';
|
|
4
4
|
import { CommonModule, DOCUMENT } from '@angular/common';
|
|
5
5
|
import { coerceNumberProperty, coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
@@ -7,19 +7,20 @@ import { Subject, BehaviorSubject, combineLatest, Subscription, merge, of, asapS
|
|
|
7
7
|
import { takeUntil, filter, map, startWith, switchMap, take, delay, debounceTime } from 'rxjs/operators';
|
|
8
8
|
import { ComponentHarness, HarnessPredicate, TestKey } from '@angular/cdk/testing';
|
|
9
9
|
import * as i1$2 from '@angular/cdk/overlay';
|
|
10
|
-
import { OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
|
|
10
|
+
import { OverlayConfig, OverlayModule, Overlay } from '@angular/cdk/overlay';
|
|
11
11
|
import { TemplatePortal, PortalModule } from '@angular/cdk/portal';
|
|
12
12
|
import { trigger, state, style, transition, group, query, animate, sequence } from '@angular/animations';
|
|
13
13
|
import * as i1 from '@angular/cdk/a11y';
|
|
14
14
|
import { FocusKeyManager, isFakeMousedownFromScreenReader } from '@angular/cdk/a11y';
|
|
15
15
|
import { hasModifierKey, SPACE, BACKSPACE, DELETE, ENTER, TAB } from '@angular/cdk/keycodes';
|
|
16
|
-
import * as
|
|
16
|
+
import * as i3 from '@angular/cdk/bidi';
|
|
17
|
+
import { Directionality } from '@angular/cdk/bidi';
|
|
17
18
|
import { normalizePassiveListenerOptions } from '@angular/cdk/platform';
|
|
18
|
-
import * as i2
|
|
19
|
+
import * as i2 from '@angular/cdk/collections';
|
|
19
20
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
20
|
-
import * as i2$
|
|
21
|
+
import * as i2$1 from '@angular/forms';
|
|
21
22
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
22
|
-
import * as i3 from '@ifsworld/granite-components/tooltip';
|
|
23
|
+
import * as i3$1 from '@ifsworld/granite-components/tooltip';
|
|
23
24
|
import { GraniteTooltipModule } from '@ifsworld/granite-components/tooltip';
|
|
24
25
|
import * as i1$3 from '@angular/cdk/scrolling';
|
|
25
26
|
import { ScrollingModule } from '@angular/cdk/scrolling';
|
|
@@ -1950,7 +1951,7 @@ class GraniteMenuTriggerForDirective {
|
|
|
1950
1951
|
}
|
|
1951
1952
|
}
|
|
1952
1953
|
}
|
|
1953
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: GraniteMenuTriggerForDirective, deps: [{ token: i1$2.Overlay }, { token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: i0.ChangeDetectorRef }, { token: GRANITE_MENU_PANEL, optional: true }, { token: GRANITE_CLIENT_INPUT, optional: true }, { token: GRANITE_CLIENT_OUTPUT, optional: true }, { token: GraniteMenuItemComponent, optional: true, self: true }, { token:
|
|
1954
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: GraniteMenuTriggerForDirective, deps: [{ token: i1$2.Overlay }, { token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: i0.ChangeDetectorRef }, { token: GRANITE_MENU_PANEL, optional: true }, { token: GRANITE_CLIENT_INPUT, optional: true }, { token: GRANITE_CLIENT_OUTPUT, optional: true }, { token: GraniteMenuItemComponent, optional: true, self: true }, { token: i3.Directionality, optional: true }, { token: i1.FocusMonitor }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1954
1955
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.4", type: GraniteMenuTriggerForDirective, selector: "[graniteMenuTriggerFor]", inputs: { menu: ["graniteMenuTriggerFor", "menu"], openOnClick: "openOnClick" }, host: { attributes: { "aria-haspopup": "true" }, listeners: { "mousedown": "_handleMousedown($event)", "keydown": "_handleKeydown($event)", "click": "_handleClick($event)" }, properties: { "attr.aria-expanded": "isMenuOpened || null", "attr.aria-controls": "isMenuOpened ? menu.panelId : null" }, classAttribute: "granite-menu-trigger" }, exportAs: ["graniteMenuTriggerFor"], usesOnChanges: true, ngImport: i0 }); }
|
|
1955
1956
|
}
|
|
1956
1957
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: GraniteMenuTriggerForDirective, decorators: [{
|
|
@@ -1987,7 +1988,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
|
|
|
1987
1988
|
type: Optional
|
|
1988
1989
|
}, {
|
|
1989
1990
|
type: Self
|
|
1990
|
-
}] }, { type:
|
|
1991
|
+
}] }, { type: i3.Directionality, decorators: [{
|
|
1991
1992
|
type: Optional
|
|
1992
1993
|
}] }, { type: i1.FocusMonitor }, { type: undefined, decorators: [{
|
|
1993
1994
|
type: Inject,
|
|
@@ -2375,7 +2376,7 @@ class GraniteRadioButtonComponent {
|
|
|
2375
2376
|
_getInputElement() {
|
|
2376
2377
|
return this._inputElement.nativeElement;
|
|
2377
2378
|
}
|
|
2378
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: GraniteRadioButtonComponent, deps: [{ token: i1.FocusMonitor }, { token: i2
|
|
2379
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: GraniteRadioButtonComponent, deps: [{ token: i1.FocusMonitor }, { token: i2.UniqueSelectionDispatcher }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2379
2380
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: GraniteRadioButtonComponent, selector: "granite-radio-button", inputs: { value: "value", id: "id", name: "name", checked: "checked", required: "required", disabled: "disabled", readonly: "readonly", labelPosition: "labelPosition", ariaLabel: ["aria-label", "ariaLabel"], ariaLabelledby: ["aria-labelledby", "ariaLabelledby"] }, outputs: { radioChange: "radioChange", radioBlur: "radioBlur" }, host: { properties: { "class.granite-radio-button-disabled": "disabled", "class.granite-radio-button-label-before": "_positionBefore", "class.granite-radio-button-checked": "checked", "class.granite-radio-button-readonly": "readonly" }, classAttribute: "granite-radio-button" }, viewQueries: [{ propertyName: "_inputElement", first: true, predicate: ["input"], descendants: true }], exportAs: ["graniteRadioButton"], usesOnChanges: true, ngImport: i0, template: "<label class=\"granite-radio-button-label\">\n <div class=\"granite-radio-button-outer-circle\">\n <input\n #input\n [id]=\"id\"\n class=\"granite-radio-button-input cdk-visually-hidden\"\n type=\"radio\"\n [attr.name]=\"name\"\n [disabled]=\"_radioDisabled\"\n [checked]=\"checked\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-checked]=\"checked.toString()\"\n [value]=\"value\"\n (change)=\"_radioChange($event.target)\"\n (blur)=\"_onBlur()\"\n />\n <div class=\"granite-radio-button-inner-circle\"></div>\n </div>\n <span class=\"granite-radio-button-text\">\n <ng-content></ng-content>\n </span>\n</label>\n", styles: [".cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0}:host(.granite-radio-button):not(.granite-radio-button-readonly):not(.granite-radio-button-disabled) .granite-radio-button-outer-circle:focus-within{border:.0625rem solid var(--granite-color-focus)}:host(.granite-radio-button):not(.granite-radio-button-readonly):not(.granite-radio-button-disabled) .granite-radio-button-outer-circle .granite-radio-button-label:hover{cursor:pointer}:host(.granite-radio-button):not(.granite-radio-button-readonly):not(.granite-radio-button-disabled) .granite-radio-button-outer-circle .granite-radio-button-label:hover .granite-radio-button-outer-circle{border-color:var(--granite-color-background-active-hover)}:host(.granite-radio-button):not(.granite-radio-button-readonly):not(.granite-radio-button-disabled) .granite-radio-button-outer-circle .granite-radio-button-label:hover .granite-radio-button-inner-circle{background-color:var(--granite-color-background-active-hover)}:host(.granite-radio-button-label-before) .granite-radio-button-label{flex-direction:row-reverse}:host(.granite-radio-button-label-before) .granite-radio-button-text{padding-inline-start:0;padding-inline-end:var(--granite-spacing-8)}:host(.granite-radio-button-checked) .granite-radio-button-inner-circle{visibility:visible;animation:grow-animation .1s}:host(.granite-radio-button-checked) .granite-radio-button-outer-circle{border-color:var(--granite-color-background-active)}:host(.granite-radio-button-checked).granite-radio-button-disabled .granite-radio-button-inner-circle{background-color:var(--granite-color-text)}:host(.granite-radio-button-checked).granite-radio-button-disabled .granite-radio-button-outer-circle{border:.0625rem solid var(--granite-color-text);background-color:transparent}:host(.granite-radio-button-checked).granite-radio-button-readonly .granite-radio-button-inner-circle{background-color:var(--granite-color-text)}:host(.granite-radio-button-checked).granite-radio-button-readonly .granite-radio-button-outer-circle{border:.0625rem solid var(--granite-color-text)}.granite-radio-button-text{padding-inline-start:var(--granite-spacing-8);color:var(--granite-color-text);font-size:var(--granite-font-size-body-small)}.granite-radio-button-text:empty{display:none}.granite-radio-button-label{display:flex;align-items:center;width:max-content;margin-inline-end:var(--granite-spacing-32);margin-block-end:var(--granite-spacing-4)}:host(.granite-radio-button-disabled) .granite-radio-button-text{opacity:.6}:host(.granite-radio-button-disabled) .granite-radio-button-outer-circle{opacity:.3;background-color:var(--granite-color-border-soft)}.granite-radio-button-outer-circle{height:1rem;width:1rem;border-radius:50%;box-sizing:border-box;border:.0625rem solid var(--granite-color-border-hard);display:flex;justify-content:center;position:relative;align-items:center}.granite-radio-button-inner-circle{width:.625rem;height:.625rem;visibility:hidden;position:absolute;border-radius:50%;background-color:var(--granite-color-background-active);margin:auto}@keyframes grow-animation{0%{transform:scale(0)}to{transform:scale(1)}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2380
2381
|
}
|
|
2381
2382
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: GraniteRadioButtonComponent, decorators: [{
|
|
@@ -2387,7 +2388,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
|
|
|
2387
2388
|
'[class.granite-radio-button-checked]': 'checked',
|
|
2388
2389
|
'[class.granite-radio-button-readonly]': 'readonly',
|
|
2389
2390
|
}, changeDetection: ChangeDetectionStrategy.OnPush, template: "<label class=\"granite-radio-button-label\">\n <div class=\"granite-radio-button-outer-circle\">\n <input\n #input\n [id]=\"id\"\n class=\"granite-radio-button-input cdk-visually-hidden\"\n type=\"radio\"\n [attr.name]=\"name\"\n [disabled]=\"_radioDisabled\"\n [checked]=\"checked\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-checked]=\"checked.toString()\"\n [value]=\"value\"\n (change)=\"_radioChange($event.target)\"\n (blur)=\"_onBlur()\"\n />\n <div class=\"granite-radio-button-inner-circle\"></div>\n </div>\n <span class=\"granite-radio-button-text\">\n <ng-content></ng-content>\n </span>\n</label>\n", styles: [".cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0}:host(.granite-radio-button):not(.granite-radio-button-readonly):not(.granite-radio-button-disabled) .granite-radio-button-outer-circle:focus-within{border:.0625rem solid var(--granite-color-focus)}:host(.granite-radio-button):not(.granite-radio-button-readonly):not(.granite-radio-button-disabled) .granite-radio-button-outer-circle .granite-radio-button-label:hover{cursor:pointer}:host(.granite-radio-button):not(.granite-radio-button-readonly):not(.granite-radio-button-disabled) .granite-radio-button-outer-circle .granite-radio-button-label:hover .granite-radio-button-outer-circle{border-color:var(--granite-color-background-active-hover)}:host(.granite-radio-button):not(.granite-radio-button-readonly):not(.granite-radio-button-disabled) .granite-radio-button-outer-circle .granite-radio-button-label:hover .granite-radio-button-inner-circle{background-color:var(--granite-color-background-active-hover)}:host(.granite-radio-button-label-before) .granite-radio-button-label{flex-direction:row-reverse}:host(.granite-radio-button-label-before) .granite-radio-button-text{padding-inline-start:0;padding-inline-end:var(--granite-spacing-8)}:host(.granite-radio-button-checked) .granite-radio-button-inner-circle{visibility:visible;animation:grow-animation .1s}:host(.granite-radio-button-checked) .granite-radio-button-outer-circle{border-color:var(--granite-color-background-active)}:host(.granite-radio-button-checked).granite-radio-button-disabled .granite-radio-button-inner-circle{background-color:var(--granite-color-text)}:host(.granite-radio-button-checked).granite-radio-button-disabled .granite-radio-button-outer-circle{border:.0625rem solid var(--granite-color-text);background-color:transparent}:host(.granite-radio-button-checked).granite-radio-button-readonly .granite-radio-button-inner-circle{background-color:var(--granite-color-text)}:host(.granite-radio-button-checked).granite-radio-button-readonly .granite-radio-button-outer-circle{border:.0625rem solid var(--granite-color-text)}.granite-radio-button-text{padding-inline-start:var(--granite-spacing-8);color:var(--granite-color-text);font-size:var(--granite-font-size-body-small)}.granite-radio-button-text:empty{display:none}.granite-radio-button-label{display:flex;align-items:center;width:max-content;margin-inline-end:var(--granite-spacing-32);margin-block-end:var(--granite-spacing-4)}:host(.granite-radio-button-disabled) .granite-radio-button-text{opacity:.6}:host(.granite-radio-button-disabled) .granite-radio-button-outer-circle{opacity:.3;background-color:var(--granite-color-border-soft)}.granite-radio-button-outer-circle{height:1rem;width:1rem;border-radius:50%;box-sizing:border-box;border:.0625rem solid var(--granite-color-border-hard);display:flex;justify-content:center;position:relative;align-items:center}.granite-radio-button-inner-circle{width:.625rem;height:.625rem;visibility:hidden;position:absolute;border-radius:50%;background-color:var(--granite-color-background-active);margin:auto}@keyframes grow-animation{0%{transform:scale(0)}to{transform:scale(1)}}\n"] }]
|
|
2390
|
-
}], ctorParameters: () => [{ type: i1.FocusMonitor }, { type: i2
|
|
2391
|
+
}], ctorParameters: () => [{ type: i1.FocusMonitor }, { type: i2.UniqueSelectionDispatcher }], propDecorators: { value: [{
|
|
2391
2392
|
type: Input
|
|
2392
2393
|
}], id: [{
|
|
2393
2394
|
type: Input
|
|
@@ -2774,14 +2775,9 @@ class GraniteInputFieldComponent {
|
|
|
2774
2775
|
this._passwordFieldIcon = 'view-disabled';
|
|
2775
2776
|
}
|
|
2776
2777
|
}
|
|
2777
|
-
_onKeyUp(event) {
|
|
2778
|
-
const inputEvent = event.target;
|
|
2779
|
-
this._applyCharacterCount(inputEvent.value);
|
|
2780
|
-
this._empty = inputEvent.value == null || inputEvent.value === '';
|
|
2781
|
-
this.valueChange.emit(inputEvent.value);
|
|
2782
|
-
}
|
|
2783
2778
|
_onInput(event) {
|
|
2784
2779
|
const inputEvent = event.target;
|
|
2780
|
+
this._applyCharacterCount(inputEvent.value);
|
|
2785
2781
|
this._empty = inputEvent.value == null || inputEvent.value === '';
|
|
2786
2782
|
this.valueChange.emit(inputEvent.value);
|
|
2787
2783
|
}
|
|
@@ -2807,13 +2803,13 @@ class GraniteInputFieldComponent {
|
|
|
2807
2803
|
return this._textareaElement.nativeElement;
|
|
2808
2804
|
}
|
|
2809
2805
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: GraniteInputFieldComponent, deps: [{ token: i1.FocusMonitor }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2810
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: GraniteInputFieldComponent, selector: "granite-input-field", inputs: { id: "id", name: "name", type: "type", value: "value", required: "required", readonly: "readonly", invalid: "invalid", disabled: "disabled", placeholder: "placeholder", prefixicon: "prefixicon", maxlength: "maxlength", countcharacters: "countcharacters", ariaLabel: ["aria-label", "ariaLabel"], ariaLabelledby: ["aria-labelledby", "ariaLabelledby"] }, outputs: { valueChange: "valueChange" }, host: { classAttribute: "granite-input-field" }, viewQueries: [{ propertyName: "_inputElement", first: true, predicate: ["input"], descendants: true }, { propertyName: "_textareaElement", first: true, predicate: ["textarea"], descendants: true }], exportAs: ["graniteInputField"], usesOnChanges: true, ngImport: i0, template: "<div\n *ngIf=\"_supported\"\n class=\"granite-input-container\"\n [class.granite-input-disabled]=\"disabled\"\n [class.granite-input-readonly]=\"readonly\"\n [class.granite-input-disabled]=\"disabled\"\n [class.granite-input-readonly]=\"readonly\"\n>\n <div\n class=\"granite-input-top-row\"\n [class.granite-input-required]=\"required\"\n [class.granite-input-empty]=\"_empty\"\n [class.granite-input-disabled]=\"disabled\"\n [class.granite-input-readonly]=\"readonly\"\n [class.granite-input-invalid]=\"invalid\"\n >\n <div\n *ngIf=\"prefixicon\"\n class=\"granite-input-prepend\"\n [class.granite-input-required]=\"required\"\n [class.granite-input-empty]=\"_empty\"\n >\n <granite-icon class=\"granite-input-prepend-icon\">\n {{ prefixicon }}\n </granite-icon>\n </div>\n\n <ng-container\n *ngIf=\"type !== 'textarea'; then inputElement; else textareaElement\"\n ></ng-container>\n\n <ng-template #inputElement>\n <input\n #input\n [id]=\"id\"\n class=\"granite-input-base\"\n [class.granite-input-invalid]=\"invalid\"\n [class.granite-input-empty]=\"_empty\"\n [name]=\"name\"\n [attr.type]=\"type\"\n [required]=\"required\"\n [readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [placeholder]=\"placeholder\"\n [attr.maxlength]=\"maxlength\"\n [value]=\"value\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-invalid]=\"invalid\"\n (
|
|
2806
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: GraniteInputFieldComponent, selector: "granite-input-field", inputs: { id: "id", name: "name", type: "type", value: "value", required: "required", readonly: "readonly", invalid: "invalid", disabled: "disabled", placeholder: "placeholder", prefixicon: "prefixicon", maxlength: "maxlength", countcharacters: "countcharacters", ariaLabel: ["aria-label", "ariaLabel"], ariaLabelledby: ["aria-labelledby", "ariaLabelledby"] }, outputs: { valueChange: "valueChange" }, host: { classAttribute: "granite-input-field" }, viewQueries: [{ propertyName: "_inputElement", first: true, predicate: ["input"], descendants: true }, { propertyName: "_textareaElement", first: true, predicate: ["textarea"], descendants: true }], exportAs: ["graniteInputField"], usesOnChanges: true, ngImport: i0, template: "<div\n *ngIf=\"_supported\"\n class=\"granite-input-container\"\n [class.granite-input-disabled]=\"disabled\"\n [class.granite-input-readonly]=\"readonly\"\n [class.granite-input-disabled]=\"disabled\"\n [class.granite-input-readonly]=\"readonly\"\n>\n <div\n class=\"granite-input-top-row\"\n [class.granite-input-required]=\"required\"\n [class.granite-input-empty]=\"_empty\"\n [class.granite-input-disabled]=\"disabled\"\n [class.granite-input-readonly]=\"readonly\"\n [class.granite-input-invalid]=\"invalid\"\n >\n <div\n *ngIf=\"prefixicon\"\n class=\"granite-input-prepend\"\n [class.granite-input-required]=\"required\"\n [class.granite-input-empty]=\"_empty\"\n >\n <granite-icon class=\"granite-input-prepend-icon\">\n {{ prefixicon }}\n </granite-icon>\n </div>\n\n <ng-container\n *ngIf=\"type !== 'textarea'; then inputElement; else textareaElement\"\n ></ng-container>\n\n <ng-template #inputElement>\n <input\n #input\n [id]=\"id\"\n class=\"granite-input-base\"\n [class.granite-input-invalid]=\"invalid\"\n [class.granite-input-empty]=\"_empty\"\n [name]=\"name\"\n [attr.type]=\"type\"\n [required]=\"required\"\n [readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [placeholder]=\"placeholder\"\n [attr.maxlength]=\"maxlength\"\n [value]=\"value\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-invalid]=\"invalid\"\n (input)=\"_onInput($event)\"\n />\n </ng-template>\n\n <button\n *ngIf=\"_passwordField\"\n class=\"granite-input-append\"\n [class.granite-input-required]=\"required\"\n [class.granite-input-empty]=\"_empty\"\n (click)=\"_togglePassword()\"\n >\n <granite-icon class=\"granite-input-password-toggle-icon\">\n {{ _passwordFieldIcon }}\n </granite-icon>\n </button>\n\n <ng-container *ngIf=\"!_passwordField\">\n <ng-content select=\"[graniteInputSuffixButton]\"></ng-content>\n </ng-container>\n\n <ng-template #textareaElement>\n <textarea\n #textarea\n [id]=\"id\"\n class=\"granite-input-base granite-text-area\"\n [class.granite-input-invalid]=\"invalid\"\n [class.granite-input-empty]=\"_empty\"\n rows=\"1\"\n [name]=\"name\"\n [attr.type]=\"type\"\n [required]=\"required\"\n [readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [placeholder]=\"placeholder\"\n [value]=\"value\"\n [attr.maxlength]=\"maxlength\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-required]=\"required\"\n [attr.aria-invalid]=\"invalid\"\n (input)=\"_onInput($event)\"\n ></textarea>\n </ng-template>\n </div>\n\n <div *ngIf=\"countcharacters\" class=\"granite-input-bottom-row\">\n <div class=\"granite-input-char-count\">\n {{ _currentCharCount }}/{{ maxlength }}\n </div>\n </div>\n</div>\n", styles: [":host{transition:all .2s ease-out;width:14.5rem;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:inherit}.granite-input-container{width:inherit;font-size:var(--granite-font-size-body-small)}.granite-input-container .granite-input-top-row{display:inline-flex;width:inherit;position:relative;background:var(--granite-color-background)}.granite-input-container .granite-input-top-row:not(:focus-within){outline:var(--granite-border-width-regular) solid var(--granite-color-border-medium)}.granite-input-container .granite-input-top-row:hover:not(:focus-within){outline:var(--granite-border-width-regular) solid var(--granite-color-border-hard)}.granite-input-container .granite-input-top-row .granite-text-area{min-width:14.5rem;min-height:2rem}.granite-input-container .granite-input-top-row.granite-input-disabled,.granite-input-container .granite-input-top-row.granite-input-readonly{background-color:transparent;box-shadow:none}.granite-input-container .granite-input-top-row.granite-input-invalid:not(:focus-within){outline:var(--granite-border-width-regular) solid var(--granite-color-signal-failure)}.granite-input-container .granite-input-top-row .granite-input-base{appearance:none;outline:none;border:none;background-color:var(--granite-color-background-input);padding:var(--granite-spacing-8);width:inherit;color:var(--granite-color-text);font:inherit;font-weight:var(--granite-font-weight-regular);line-height:var(--granite-line-height-regular)}.granite-input-container .granite-input-top-row .granite-input-base::placeholder{color:var(--granite-color-text-hint)}.granite-input-container .granite-input-top-row .granite-input-base:required.granite-input-empty{background-color:var(--granite-color-background-failure)}.granite-input-container .granite-input-top-row .granite-input-base:required::placeholder{color:var(--granite-color-text-weak)}.granite-input-container .granite-input-top-row .granite-input-base:read-only{background-color:transparent}.granite-input-container .granite-input-top-row .granite-input-base:disabled{opacity:.3}.granite-input-container .granite-input-top-row .granite-input-base:hover::placeholder{color:var(--granite-color-text)}.granite-input-container .granite-input-top-row .granite-input-base:focus{box-shadow:inset 0 .125rem var(--granite-color-focus),inset .125rem 0 var(--granite-color-focus),inset -.125rem 0 var(--granite-color-focus),inset 0 -.125rem var(--granite-color-focus)}.granite-input-container .granite-input-top-row .granite-input-base:focus.granite-input-invalid{box-shadow:inset 0 -.125rem var(--granite-color-signal-failure),inset 0 .125rem var(--granite-color-signal-failure),inset .125rem 0 var(--granite-color-signal-failure),inset -.125rem 0 var(--granite-color-signal-failure)}.granite-input-container .granite-input-top-row .granite-input-base:focus::placeholder{color:transparent}.granite-input-container .granite-input-prepend{display:flex;align-items:center;padding:0 var(--granite-spacing-8);background:var(--granite-color-background-input)}.granite-input-container .granite-input-prepend .granite-input-prepend-icon{width:1rem;height:1rem;color:var(--granite-color-text);box-shadow:none}.granite-input-container .granite-input-prepend.granite-input-required.granite-input-empty{background-color:var(--granite-color-background-failure)}.granite-input-container .granite-input-append{appearance:none;outline:none;border:none;background-color:var(--granite-color-background-input);position:relative}.granite-input-container .granite-input-append:focus{box-shadow:inset 0 .125rem var(--granite-color-focus),inset .125rem 0 var(--granite-color-focus),inset -.125rem 0 var(--granite-color-focus),inset 0 -.125rem var(--granite-color-focus)}.granite-input-container .granite-input-append .granite-input-password-toggle-icon{width:max-content;height:max-content;color:var(--granite-color-text);box-shadow:none}.granite-input-container .granite-input-append.granite-input-required.granite-input-empty{background-color:var(--granite-color-background-failure)}.granite-input-container .granite-input-bottom-row{box-shadow:none}.granite-input-container .granite-input-char-count{background:var(--granite-color-background-warning);border-radius:0 0 .25rem .25rem;padding:var(--granite-spacing-8);background-size:contain;width:-moz-fit-content;width:fit-content;box-shadow:none}.granite-input-container.granite-input-disabled,.granite-input-container.granite-input-readonly{background-color:transparent}:host ::ng-deep button[graniteInputSuffixButton]{appearance:none;outline:none;border:none;background-color:var(--granite-color-background-input);position:relative;margin:0;border-radius:0}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: GraniteIconComponent, selector: "granite-icon", inputs: ["fontIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2811
2807
|
}
|
|
2812
2808
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: GraniteInputFieldComponent, decorators: [{
|
|
2813
2809
|
type: Component,
|
|
2814
2810
|
args: [{ selector: 'granite-input-field', exportAs: 'graniteInputField', host: {
|
|
2815
2811
|
class: 'granite-input-field',
|
|
2816
|
-
}, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n *ngIf=\"_supported\"\n class=\"granite-input-container\"\n [class.granite-input-disabled]=\"disabled\"\n [class.granite-input-readonly]=\"readonly\"\n [class.granite-input-disabled]=\"disabled\"\n [class.granite-input-readonly]=\"readonly\"\n>\n <div\n class=\"granite-input-top-row\"\n [class.granite-input-required]=\"required\"\n [class.granite-input-empty]=\"_empty\"\n [class.granite-input-disabled]=\"disabled\"\n [class.granite-input-readonly]=\"readonly\"\n [class.granite-input-invalid]=\"invalid\"\n >\n <div\n *ngIf=\"prefixicon\"\n class=\"granite-input-prepend\"\n [class.granite-input-required]=\"required\"\n [class.granite-input-empty]=\"_empty\"\n >\n <granite-icon class=\"granite-input-prepend-icon\">\n {{ prefixicon }}\n </granite-icon>\n </div>\n\n <ng-container\n *ngIf=\"type !== 'textarea'; then inputElement; else textareaElement\"\n ></ng-container>\n\n <ng-template #inputElement>\n <input\n #input\n [id]=\"id\"\n class=\"granite-input-base\"\n [class.granite-input-invalid]=\"invalid\"\n [class.granite-input-empty]=\"_empty\"\n [name]=\"name\"\n [attr.type]=\"type\"\n [required]=\"required\"\n [readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [placeholder]=\"placeholder\"\n [attr.maxlength]=\"maxlength\"\n [value]=\"value\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-invalid]=\"invalid\"\n (
|
|
2812
|
+
}, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n *ngIf=\"_supported\"\n class=\"granite-input-container\"\n [class.granite-input-disabled]=\"disabled\"\n [class.granite-input-readonly]=\"readonly\"\n [class.granite-input-disabled]=\"disabled\"\n [class.granite-input-readonly]=\"readonly\"\n>\n <div\n class=\"granite-input-top-row\"\n [class.granite-input-required]=\"required\"\n [class.granite-input-empty]=\"_empty\"\n [class.granite-input-disabled]=\"disabled\"\n [class.granite-input-readonly]=\"readonly\"\n [class.granite-input-invalid]=\"invalid\"\n >\n <div\n *ngIf=\"prefixicon\"\n class=\"granite-input-prepend\"\n [class.granite-input-required]=\"required\"\n [class.granite-input-empty]=\"_empty\"\n >\n <granite-icon class=\"granite-input-prepend-icon\">\n {{ prefixicon }}\n </granite-icon>\n </div>\n\n <ng-container\n *ngIf=\"type !== 'textarea'; then inputElement; else textareaElement\"\n ></ng-container>\n\n <ng-template #inputElement>\n <input\n #input\n [id]=\"id\"\n class=\"granite-input-base\"\n [class.granite-input-invalid]=\"invalid\"\n [class.granite-input-empty]=\"_empty\"\n [name]=\"name\"\n [attr.type]=\"type\"\n [required]=\"required\"\n [readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [placeholder]=\"placeholder\"\n [attr.maxlength]=\"maxlength\"\n [value]=\"value\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-invalid]=\"invalid\"\n (input)=\"_onInput($event)\"\n />\n </ng-template>\n\n <button\n *ngIf=\"_passwordField\"\n class=\"granite-input-append\"\n [class.granite-input-required]=\"required\"\n [class.granite-input-empty]=\"_empty\"\n (click)=\"_togglePassword()\"\n >\n <granite-icon class=\"granite-input-password-toggle-icon\">\n {{ _passwordFieldIcon }}\n </granite-icon>\n </button>\n\n <ng-container *ngIf=\"!_passwordField\">\n <ng-content select=\"[graniteInputSuffixButton]\"></ng-content>\n </ng-container>\n\n <ng-template #textareaElement>\n <textarea\n #textarea\n [id]=\"id\"\n class=\"granite-input-base granite-text-area\"\n [class.granite-input-invalid]=\"invalid\"\n [class.granite-input-empty]=\"_empty\"\n rows=\"1\"\n [name]=\"name\"\n [attr.type]=\"type\"\n [required]=\"required\"\n [readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [placeholder]=\"placeholder\"\n [value]=\"value\"\n [attr.maxlength]=\"maxlength\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-required]=\"required\"\n [attr.aria-invalid]=\"invalid\"\n (input)=\"_onInput($event)\"\n ></textarea>\n </ng-template>\n </div>\n\n <div *ngIf=\"countcharacters\" class=\"granite-input-bottom-row\">\n <div class=\"granite-input-char-count\">\n {{ _currentCharCount }}/{{ maxlength }}\n </div>\n </div>\n</div>\n", styles: [":host{transition:all .2s ease-out;width:14.5rem;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:inherit}.granite-input-container{width:inherit;font-size:var(--granite-font-size-body-small)}.granite-input-container .granite-input-top-row{display:inline-flex;width:inherit;position:relative;background:var(--granite-color-background)}.granite-input-container .granite-input-top-row:not(:focus-within){outline:var(--granite-border-width-regular) solid var(--granite-color-border-medium)}.granite-input-container .granite-input-top-row:hover:not(:focus-within){outline:var(--granite-border-width-regular) solid var(--granite-color-border-hard)}.granite-input-container .granite-input-top-row .granite-text-area{min-width:14.5rem;min-height:2rem}.granite-input-container .granite-input-top-row.granite-input-disabled,.granite-input-container .granite-input-top-row.granite-input-readonly{background-color:transparent;box-shadow:none}.granite-input-container .granite-input-top-row.granite-input-invalid:not(:focus-within){outline:var(--granite-border-width-regular) solid var(--granite-color-signal-failure)}.granite-input-container .granite-input-top-row .granite-input-base{appearance:none;outline:none;border:none;background-color:var(--granite-color-background-input);padding:var(--granite-spacing-8);width:inherit;color:var(--granite-color-text);font:inherit;font-weight:var(--granite-font-weight-regular);line-height:var(--granite-line-height-regular)}.granite-input-container .granite-input-top-row .granite-input-base::placeholder{color:var(--granite-color-text-hint)}.granite-input-container .granite-input-top-row .granite-input-base:required.granite-input-empty{background-color:var(--granite-color-background-failure)}.granite-input-container .granite-input-top-row .granite-input-base:required::placeholder{color:var(--granite-color-text-weak)}.granite-input-container .granite-input-top-row .granite-input-base:read-only{background-color:transparent}.granite-input-container .granite-input-top-row .granite-input-base:disabled{opacity:.3}.granite-input-container .granite-input-top-row .granite-input-base:hover::placeholder{color:var(--granite-color-text)}.granite-input-container .granite-input-top-row .granite-input-base:focus{box-shadow:inset 0 .125rem var(--granite-color-focus),inset .125rem 0 var(--granite-color-focus),inset -.125rem 0 var(--granite-color-focus),inset 0 -.125rem var(--granite-color-focus)}.granite-input-container .granite-input-top-row .granite-input-base:focus.granite-input-invalid{box-shadow:inset 0 -.125rem var(--granite-color-signal-failure),inset 0 .125rem var(--granite-color-signal-failure),inset .125rem 0 var(--granite-color-signal-failure),inset -.125rem 0 var(--granite-color-signal-failure)}.granite-input-container .granite-input-top-row .granite-input-base:focus::placeholder{color:transparent}.granite-input-container .granite-input-prepend{display:flex;align-items:center;padding:0 var(--granite-spacing-8);background:var(--granite-color-background-input)}.granite-input-container .granite-input-prepend .granite-input-prepend-icon{width:1rem;height:1rem;color:var(--granite-color-text);box-shadow:none}.granite-input-container .granite-input-prepend.granite-input-required.granite-input-empty{background-color:var(--granite-color-background-failure)}.granite-input-container .granite-input-append{appearance:none;outline:none;border:none;background-color:var(--granite-color-background-input);position:relative}.granite-input-container .granite-input-append:focus{box-shadow:inset 0 .125rem var(--granite-color-focus),inset .125rem 0 var(--granite-color-focus),inset -.125rem 0 var(--granite-color-focus),inset 0 -.125rem var(--granite-color-focus)}.granite-input-container .granite-input-append .granite-input-password-toggle-icon{width:max-content;height:max-content;color:var(--granite-color-text);box-shadow:none}.granite-input-container .granite-input-append.granite-input-required.granite-input-empty{background-color:var(--granite-color-background-failure)}.granite-input-container .granite-input-bottom-row{box-shadow:none}.granite-input-container .granite-input-char-count{background:var(--granite-color-background-warning);border-radius:0 0 .25rem .25rem;padding:var(--granite-spacing-8);background-size:contain;width:-moz-fit-content;width:fit-content;box-shadow:none}.granite-input-container.granite-input-disabled,.granite-input-container.granite-input-readonly{background-color:transparent}:host ::ng-deep button[graniteInputSuffixButton]{appearance:none;outline:none;border:none;background-color:var(--granite-color-background-input);position:relative;margin:0;border-radius:0}\n"] }]
|
|
2817
2813
|
}], ctorParameters: () => [{ type: i1.FocusMonitor }], propDecorators: { id: [{
|
|
2818
2814
|
type: Input
|
|
2819
2815
|
}], name: [{
|
|
@@ -3645,7 +3641,7 @@ class GraniteChipListComponent extends GraniteChipListBase {
|
|
|
3645
3641
|
});
|
|
3646
3642
|
}
|
|
3647
3643
|
}
|
|
3648
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: GraniteChipListComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token:
|
|
3644
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: GraniteChipListComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i3.Directionality, optional: true }, { token: i2$1.NgForm, optional: true }, { token: i2$1.FormGroupDirective, optional: true }, { token: i2$1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3649
3645
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: GraniteChipListComponent, selector: "granite-chip-list", inputs: { ariaLabel: ["aria-label", "ariaLabel"], ariaLabelledby: ["aria-labelledby", "ariaLabelledby"], ariaOrientation: ["aria-orientation", "ariaOrientation"], role: "role", multiselect: "multiselect", disabled: "disabled", selectable: "selectable", tabindex: "tabindex" }, host: { listeners: { "focus": "focus()", "blur": "_blur()", "keydown": "_keydown($event)" }, properties: { "class.granite-chip-list-disabled": "disabled", "attr.tabindex": "disabled ? null : _tabIndex", "attr.role": "role", "attr.aria-label": "ariaLabel", "attr.aria-labelledby": "ariaLabelledby", "attr.aria-disabled": "disabled.toString()", "attr.aria-multiselectable": "multiselect", "attr.aria-orientation": "ariaOrientation", "id": "_uid" }, classAttribute: "granite-chip-list" }, queries: [{ propertyName: "chips", predicate: GraniteChipComponent, descendants: true }], exportAs: ["graniteChipList"], usesInheritance: true, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, styles: [":host.granite-chip-list{display:flex;flex-direction:row;flex-wrap:wrap;place-content:center flex-start;align-items:center;font-weight:400;font-size:var(--granite-font-size-body-small);line-height:var(--granite-line-height-regular);overflow:auto;padding:0;margin:0}:host ::ng-deep input.granite-chip-input{outline:none;border:none;background-color:transparent;color:var(--granite-color-text);margin:var(--granite-spacing-4)}:host ::ng-deep granite-icon{color:var(--granite-color-text);background-color:transparent}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3650
3646
|
}
|
|
3651
3647
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: GraniteChipListComponent, decorators: [{
|
|
@@ -3665,13 +3661,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
|
|
|
3665
3661
|
'(blur)': '_blur()',
|
|
3666
3662
|
'(keydown)': '_keydown($event)',
|
|
3667
3663
|
}, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host.granite-chip-list{display:flex;flex-direction:row;flex-wrap:wrap;place-content:center flex-start;align-items:center;font-weight:400;font-size:var(--granite-font-size-body-small);line-height:var(--granite-line-height-regular);overflow:auto;padding:0;margin:0}:host ::ng-deep input.granite-chip-input{outline:none;border:none;background-color:transparent;color:var(--granite-color-text);margin:var(--granite-spacing-4)}:host ::ng-deep granite-icon{color:var(--granite-color-text);background-color:transparent}\n"] }]
|
|
3668
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type:
|
|
3664
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i3.Directionality, decorators: [{
|
|
3669
3665
|
type: Optional
|
|
3670
|
-
}] }, { type: i2$
|
|
3666
|
+
}] }, { type: i2$1.NgForm, decorators: [{
|
|
3671
3667
|
type: Optional
|
|
3672
|
-
}] }, { type: i2$
|
|
3668
|
+
}] }, { type: i2$1.FormGroupDirective, decorators: [{
|
|
3673
3669
|
type: Optional
|
|
3674
|
-
}] }, { type: i2$
|
|
3670
|
+
}] }, { type: i2$1.NgControl, decorators: [{
|
|
3675
3671
|
type: Optional
|
|
3676
3672
|
}, {
|
|
3677
3673
|
type: Self
|
|
@@ -4474,7 +4470,7 @@ class GraniteContactsTriggerForDirective {
|
|
|
4474
4470
|
_touchPositionStrategy() {
|
|
4475
4471
|
return this._overlay.position().global();
|
|
4476
4472
|
}
|
|
4477
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: GraniteContactsTriggerForDirective, deps: [{ token: i1$2.Overlay }, { token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: i1$2.OverlayOutsideClickDispatcher }, { token: GRANITE_CLIENT_INPUT, optional: true }, { token: GRANITE_CLIENT_OUTPUT, optional: true }, { token:
|
|
4473
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: GraniteContactsTriggerForDirective, deps: [{ token: i1$2.Overlay }, { token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: i1$2.OverlayOutsideClickDispatcher }, { token: GRANITE_CLIENT_INPUT, optional: true }, { token: GRANITE_CLIENT_OUTPUT, optional: true }, { token: i3.Directionality, optional: true }, { token: i1.FocusMonitor }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
4478
4474
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.4", type: GraniteContactsTriggerForDirective, selector: "[graniteContactsTriggerFor]", inputs: { contacts: ["graniteContactsTriggerFor", "contacts"] }, host: { attributes: { "aria-haspopup": "true" }, listeners: { "keydown": "_handleKeydown($event)", "click": "_handleClick($event)" }, properties: { "attr.aria-expanded": "_isContactsOpen || null", "attr.aria-controls": "_isContactsOpen ? contacts.panelId : null" }, classAttribute: "granite-contacts-trigger" }, ngImport: i0 }); }
|
|
4479
4475
|
}
|
|
4480
4476
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: GraniteContactsTriggerForDirective, decorators: [{
|
|
@@ -4500,7 +4496,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
|
|
|
4500
4496
|
args: [GRANITE_CLIENT_OUTPUT]
|
|
4501
4497
|
}, {
|
|
4502
4498
|
type: Optional
|
|
4503
|
-
}] }, { type:
|
|
4499
|
+
}] }, { type: i3.Directionality, decorators: [{
|
|
4504
4500
|
type: Optional
|
|
4505
4501
|
}] }, { type: i1.FocusMonitor }], propDecorators: { contacts: [{
|
|
4506
4502
|
type: Input,
|
|
@@ -4656,17 +4652,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
|
|
|
4656
4652
|
}]
|
|
4657
4653
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }] });
|
|
4658
4654
|
|
|
4659
|
-
|
|
4660
|
-
class LegendBaseComponent {
|
|
4655
|
+
class OverlayBaseComponent {
|
|
4661
4656
|
constructor() {
|
|
4662
|
-
this.xPosition = '
|
|
4657
|
+
this.xPosition = 'after';
|
|
4663
4658
|
this.yPosition = 'below';
|
|
4664
|
-
this.panelId = `granite-progress-bar-legend-panel-${legendPanelUid++}`;
|
|
4665
4659
|
}
|
|
4666
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type:
|
|
4667
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.4", type:
|
|
4660
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: OverlayBaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
4661
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.4", type: OverlayBaseComponent, viewQueries: [{ propertyName: "templateRef", first: true, predicate: TemplateRef, descendants: true }], ngImport: i0 }); }
|
|
4668
4662
|
}
|
|
4669
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type:
|
|
4663
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: OverlayBaseComponent, decorators: [{
|
|
4670
4664
|
type: Directive,
|
|
4671
4665
|
args: [{}]
|
|
4672
4666
|
}], propDecorators: { templateRef: [{
|
|
@@ -4674,134 +4668,73 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
|
|
|
4674
4668
|
args: [TemplateRef]
|
|
4675
4669
|
}] } });
|
|
4676
4670
|
|
|
4671
|
+
let legendPanelUid = 0;
|
|
4672
|
+
class LegendBaseComponent extends OverlayBaseComponent {
|
|
4673
|
+
constructor() {
|
|
4674
|
+
super(...arguments);
|
|
4675
|
+
this.panelId = `granite-progress-bar-legend-panel-${legendPanelUid++}`;
|
|
4676
|
+
this.xPosition = 'before';
|
|
4677
|
+
}
|
|
4678
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: LegendBaseComponent, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
4679
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.4", type: LegendBaseComponent, usesInheritance: true, ngImport: i0 }); }
|
|
4680
|
+
}
|
|
4681
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: LegendBaseComponent, decorators: [{
|
|
4682
|
+
type: Directive
|
|
4683
|
+
}] });
|
|
4684
|
+
|
|
4677
4685
|
class GraniteProgressBarLegendComponent extends LegendBaseComponent {
|
|
4678
4686
|
constructor() {
|
|
4679
4687
|
super(...arguments);
|
|
4680
4688
|
this.legendItems = [];
|
|
4681
4689
|
}
|
|
4682
4690
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: GraniteProgressBarLegendComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4683
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: GraniteProgressBarLegendComponent, selector: "granite-progress-bar-legend", inputs: { legendItems: "legendItems" }, usesInheritance: true, ngImport: i0, template: "<ng-template>\n <div class=\"legend\" data-fnd=\"legend\">\n <div\n *ngFor=\"let item of legendItems\"\n class=\"legend-item\"\n data-fnd=\"legend-item\"\n >\n <div class=\"legend-label-text\">{{ item.label }}</div>\n <div\n [style.background-color]=\"item.backgroundColor\"\n class=\"color-box\"\n ></div>\n </div>\n </div>\n</ng-template>\n", styles: [".legend{display:flex;flex-direction:column;align-items:flex-start;padding:var(--granite-spacing-8);gap:var(--granite-spacing-8);background-color:var(--granite-color-background-page);border:solid var(--granite-border-width-regular) var(--granite-color-border-contrast);border-radius:var(--granite-radius-s)}.legend-item{display:flex;align-items:center;justify-content:space-between;align-self:stretch;flex-wrap:wrap;padding:0 var(--granite-spacing-4);gap:var(--granite-spacing-8)}.legend-label-text{font-size:var(--granite-font-size-body-small);line-height:var(--granite-font-size-body-small);font-weight:var(--granite-font-weight-regular);color:var(--granite-color-text);width:max-content}.color-box{width:8px;height:8px}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4691
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: GraniteProgressBarLegendComponent, selector: "granite-progress-bar-legend", inputs: { legendItems: "legendItems" }, usesInheritance: true, ngImport: i0, template: "<ng-template>\n <div class=\"legend\" data-fnd=\"legend\">\n <div\n *ngFor=\"let item of legendItems\"\n class=\"legend-item\"\n data-fnd=\"legend-item\"\n >\n <div class=\"legend-label-text\">{{ item.label }}</div>\n <div\n [style.background-color]=\"item.backgroundColor\"\n class=\"color-box\"\n ></div>\n </div>\n </div>\n</ng-template>\n", styles: [".legend{display:flex;flex-direction:column;align-items:flex-start;padding:var(--granite-spacing-8);gap:var(--granite-spacing-8);background-color:var(--granite-color-background-page);border:solid var(--granite-border-width-regular) var(--granite-color-border-contrast);border-radius:var(--granite-radius-s);height:-moz-fit-content;height:fit-content}.legend-item{display:flex;align-items:center;justify-content:space-between;align-self:stretch;flex-wrap:wrap;padding:0 var(--granite-spacing-4);gap:var(--granite-spacing-8)}.legend-label-text{font-size:var(--granite-font-size-body-small);line-height:var(--granite-font-size-body-small);font-weight:var(--granite-font-weight-regular);color:var(--granite-color-text);width:max-content}.color-box{width:8px;height:8px}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4684
4692
|
}
|
|
4685
4693
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: GraniteProgressBarLegendComponent, decorators: [{
|
|
4686
4694
|
type: Component,
|
|
4687
|
-
args: [{ selector: 'granite-progress-bar-legend', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template>\n <div class=\"legend\" data-fnd=\"legend\">\n <div\n *ngFor=\"let item of legendItems\"\n class=\"legend-item\"\n data-fnd=\"legend-item\"\n >\n <div class=\"legend-label-text\">{{ item.label }}</div>\n <div\n [style.background-color]=\"item.backgroundColor\"\n class=\"color-box\"\n ></div>\n </div>\n </div>\n</ng-template>\n", styles: [".legend{display:flex;flex-direction:column;align-items:flex-start;padding:var(--granite-spacing-8);gap:var(--granite-spacing-8);background-color:var(--granite-color-background-page);border:solid var(--granite-border-width-regular) var(--granite-color-border-contrast);border-radius:var(--granite-radius-s)}.legend-item{display:flex;align-items:center;justify-content:space-between;align-self:stretch;flex-wrap:wrap;padding:0 var(--granite-spacing-4);gap:var(--granite-spacing-8)}.legend-label-text{font-size:var(--granite-font-size-body-small);line-height:var(--granite-font-size-body-small);font-weight:var(--granite-font-weight-regular);color:var(--granite-color-text);width:max-content}.color-box{width:8px;height:8px}\n"] }]
|
|
4695
|
+
args: [{ selector: 'granite-progress-bar-legend', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template>\n <div class=\"legend\" data-fnd=\"legend\">\n <div\n *ngFor=\"let item of legendItems\"\n class=\"legend-item\"\n data-fnd=\"legend-item\"\n >\n <div class=\"legend-label-text\">{{ item.label }}</div>\n <div\n [style.background-color]=\"item.backgroundColor\"\n class=\"color-box\"\n ></div>\n </div>\n </div>\n</ng-template>\n", styles: [".legend{display:flex;flex-direction:column;align-items:flex-start;padding:var(--granite-spacing-8);gap:var(--granite-spacing-8);background-color:var(--granite-color-background-page);border:solid var(--granite-border-width-regular) var(--granite-color-border-contrast);border-radius:var(--granite-radius-s);height:-moz-fit-content;height:fit-content}.legend-item{display:flex;align-items:center;justify-content:space-between;align-self:stretch;flex-wrap:wrap;padding:0 var(--granite-spacing-4);gap:var(--granite-spacing-8)}.legend-label-text{font-size:var(--granite-font-size-body-small);line-height:var(--granite-font-size-body-small);font-weight:var(--granite-font-weight-regular);color:var(--granite-color-text);width:max-content}.color-box{width:8px;height:8px}\n"] }]
|
|
4688
4696
|
}], propDecorators: { legendItems: [{
|
|
4689
4697
|
type: Input
|
|
4690
4698
|
}] } });
|
|
4691
4699
|
|
|
4692
|
-
class
|
|
4693
|
-
constructor(_overlay,
|
|
4694
|
-
/** Client input device information */
|
|
4695
|
-
_clientInput,
|
|
4696
|
-
/** Client output device information */
|
|
4697
|
-
_clientOutput, _dir, _focusMonitor) {
|
|
4700
|
+
class OverlayService {
|
|
4701
|
+
constructor(_overlay, _focusMonitor, _outsideClickDispatcher) {
|
|
4698
4702
|
this._overlay = _overlay;
|
|
4699
|
-
this._element = _element;
|
|
4700
|
-
this._viewContainerRef = _viewContainerRef;
|
|
4701
|
-
this._outsideClickDispatcher = _outsideClickDispatcher;
|
|
4702
|
-
this._clientInput = _clientInput;
|
|
4703
|
-
this._clientOutput = _clientOutput;
|
|
4704
|
-
this._dir = _dir;
|
|
4705
4703
|
this._focusMonitor = _focusMonitor;
|
|
4706
|
-
this.
|
|
4707
|
-
this._portal = null;
|
|
4708
|
-
this._overlayRef = null;
|
|
4709
|
-
}
|
|
4710
|
-
ngOnDestroy() {
|
|
4711
|
-
if (this._overlayRef) {
|
|
4712
|
-
this._overlayRef.dispose();
|
|
4713
|
-
this._overlayRef = null;
|
|
4714
|
-
}
|
|
4715
|
-
}
|
|
4716
|
-
openLegend() {
|
|
4717
|
-
if (this._isLegendOpen) {
|
|
4718
|
-
return;
|
|
4719
|
-
}
|
|
4720
|
-
this.legend.direction = this._dir.value === 'rtl' ? 'rtl' : 'ltr';
|
|
4721
|
-
this.legend.clientInput = this._clientInput;
|
|
4722
|
-
this.legend.clientOutput = this._clientOutput;
|
|
4723
|
-
const panelClass = [];
|
|
4724
|
-
if (this._clientOutput?.device === 'touch') {
|
|
4725
|
-
panelClass.push('granite-overlay-pane-center');
|
|
4726
|
-
}
|
|
4727
|
-
const scrollStrategy = this._clientOutput?.device !== 'touch'
|
|
4728
|
-
? this._overlay.scrollStrategies.reposition()
|
|
4729
|
-
: this._overlay.scrollStrategies.block();
|
|
4730
|
-
const hasBackdrop = this._clientOutput?.device === 'touch';
|
|
4731
|
-
if (!this._overlayRef) {
|
|
4732
|
-
const config = new OverlayConfig({
|
|
4733
|
-
positionStrategy: this._positionStrategy(),
|
|
4734
|
-
backdropClass: 'granite-overlay-dark-glass-backdrop',
|
|
4735
|
-
scrollStrategy,
|
|
4736
|
-
direction: this._dir,
|
|
4737
|
-
panelClass,
|
|
4738
|
-
hasBackdrop,
|
|
4739
|
-
});
|
|
4740
|
-
this._overlayRef = this._overlay.create(config);
|
|
4741
|
-
}
|
|
4742
|
-
if (!this._portal || this._portal.templateRef !== this.legend.templateRef) {
|
|
4743
|
-
this._portal = new TemplatePortal(this.legend.templateRef, this._viewContainerRef);
|
|
4744
|
-
}
|
|
4745
|
-
this._overlayRef.attach(this._portal);
|
|
4746
|
-
this._outsideClickDispatcher.add(this._overlayRef);
|
|
4747
|
-
this._overlayRef.outsidePointerEvents().subscribe((event) => {
|
|
4748
|
-
event.stopPropagation();
|
|
4749
|
-
this.closeLegend();
|
|
4750
|
-
});
|
|
4751
|
-
this._isLegendOpen = true;
|
|
4704
|
+
this._outsideClickDispatcher = _outsideClickDispatcher;
|
|
4752
4705
|
}
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
this.openLegend();
|
|
4759
|
-
}
|
|
4706
|
+
createOverlay(config, component, viewContainerRef) {
|
|
4707
|
+
const overlayRef = this._overlay.create(config);
|
|
4708
|
+
const portal = new TemplatePortal(component.templateRef, viewContainerRef);
|
|
4709
|
+
overlayRef.attach(portal);
|
|
4710
|
+
return overlayRef;
|
|
4760
4711
|
}
|
|
4761
|
-
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
|
|
4765
|
-
this._outsideClickDispatcher.remove(this._overlayRef);
|
|
4766
|
-
this._overlayRef.detach();
|
|
4767
|
-
this._restoreFocus();
|
|
4768
|
-
this._isLegendOpen = false;
|
|
4712
|
+
closeOverlay(overlayRef, element) {
|
|
4713
|
+
this._outsideClickDispatcher.remove(overlayRef);
|
|
4714
|
+
overlayRef.detach();
|
|
4715
|
+
this.restoreFocus(element);
|
|
4769
4716
|
}
|
|
4770
|
-
|
|
4771
|
-
if (event.key === 'Enter') {
|
|
4772
|
-
event.preventDefault();
|
|
4773
|
-
this.toggleLegend();
|
|
4774
|
-
}
|
|
4775
|
-
}
|
|
4776
|
-
_handleClick() {
|
|
4777
|
-
this.toggleLegend();
|
|
4778
|
-
}
|
|
4779
|
-
_restoreFocus(origin = 'program', options) {
|
|
4717
|
+
restoreFocus(element, origin = 'program', options) {
|
|
4780
4718
|
if (this._focusMonitor) {
|
|
4781
|
-
this._focusMonitor.focusVia(
|
|
4719
|
+
this._focusMonitor.focusVia(element, origin, options);
|
|
4782
4720
|
}
|
|
4783
4721
|
else {
|
|
4784
|
-
|
|
4722
|
+
element.nativeElement.focus(options);
|
|
4785
4723
|
}
|
|
4786
4724
|
}
|
|
4787
|
-
|
|
4788
|
-
|
|
4725
|
+
desktopPositionStrategy(element, selector) {
|
|
4726
|
+
return this._overlay
|
|
4789
4727
|
.position()
|
|
4790
|
-
.flexibleConnectedTo(
|
|
4728
|
+
.flexibleConnectedTo(element)
|
|
4791
4729
|
.withLockedPosition()
|
|
4792
|
-
.withTransformOriginOn(
|
|
4730
|
+
.withTransformOriginOn(selector)
|
|
4793
4731
|
.withPush(false);
|
|
4794
|
-
this._setPosition(positionStrategy);
|
|
4795
|
-
return positionStrategy;
|
|
4796
4732
|
}
|
|
4797
|
-
|
|
4798
|
-
|
|
4799
|
-
|
|
4800
|
-
|
|
4801
|
-
const
|
|
4802
|
-
const offsetY = 4;
|
|
4803
|
-
originY = overlayY === 'top' ? 'bottom' : 'top';
|
|
4804
|
-
originFallbackY = overlayFallbackY === 'top' ? 'bottom' : 'top';
|
|
4733
|
+
touchPositionStrategy() {
|
|
4734
|
+
return this._overlay.position().global();
|
|
4735
|
+
}
|
|
4736
|
+
setPosition(positionStrategy, positionConfig) {
|
|
4737
|
+
const { originX, originFallbackX, originY, originFallbackY, overlayX, overlayFallbackX, overlayY, overlayFallbackY, offsetX, offsetY, } = positionConfig;
|
|
4805
4738
|
positionStrategy.withPositions([
|
|
4806
4739
|
{ originX, originY, overlayX, overlayY, offsetY },
|
|
4807
4740
|
{
|
|
@@ -4826,18 +4759,173 @@ class GraniteProgressBarLegendTriggerForDirective {
|
|
|
4826
4759
|
offsetY: -offsetY,
|
|
4827
4760
|
},
|
|
4828
4761
|
]);
|
|
4762
|
+
return positionStrategy;
|
|
4829
4763
|
}
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4764
|
+
subscribeOutsideClick(overlayRef, callback) {
|
|
4765
|
+
this._outsideClickDispatcher.add(overlayRef);
|
|
4766
|
+
overlayRef.outsidePointerEvents().subscribe((event) => {
|
|
4767
|
+
event.stopPropagation();
|
|
4768
|
+
if (callback) {
|
|
4769
|
+
callback();
|
|
4770
|
+
}
|
|
4771
|
+
});
|
|
4772
|
+
}
|
|
4773
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: OverlayService, deps: [{ token: i1$2.Overlay }, { token: i1.FocusMonitor }, { token: i1$2.OverlayOutsideClickDispatcher }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4774
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: OverlayService, providedIn: 'root' }); }
|
|
4775
|
+
}
|
|
4776
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: OverlayService, decorators: [{
|
|
4777
|
+
type: Injectable,
|
|
4778
|
+
args: [{
|
|
4779
|
+
providedIn: 'root',
|
|
4780
|
+
}]
|
|
4781
|
+
}], ctorParameters: () => [{ type: i1$2.Overlay }, { type: i1.FocusMonitor }, { type: i1$2.OverlayOutsideClickDispatcher }] });
|
|
4782
|
+
|
|
4783
|
+
class GraniteOverlayTriggerForBaseDirective {
|
|
4784
|
+
constructor() {
|
|
4785
|
+
/** Client output device information */
|
|
4786
|
+
this._clientOutput = inject(GRANITE_CLIENT_OUTPUT);
|
|
4787
|
+
/** Client input device information */
|
|
4788
|
+
this._clientInput = inject(GRANITE_CLIENT_INPUT);
|
|
4789
|
+
this._dir = inject(Directionality);
|
|
4790
|
+
this.offsetX = 0;
|
|
4791
|
+
this.offsetY = 0;
|
|
4792
|
+
this._overlayRef = null;
|
|
4793
|
+
this._overlay = inject(Overlay);
|
|
4794
|
+
this._element = inject((ElementRef));
|
|
4795
|
+
this._viewContainerRef = inject(ViewContainerRef);
|
|
4796
|
+
this._overlayService = inject(OverlayService);
|
|
4797
|
+
}
|
|
4798
|
+
ngOnDestroy() {
|
|
4799
|
+
if (this._overlayRef) {
|
|
4800
|
+
this._overlayRef.dispose();
|
|
4801
|
+
this._overlayRef = null;
|
|
4833
4802
|
}
|
|
4834
|
-
return this._touchPositionStrategy();
|
|
4835
4803
|
}
|
|
4836
|
-
|
|
4837
|
-
|
|
4804
|
+
getPositionConfig() {
|
|
4805
|
+
const [originX, originFallbackX] = this.componentRef.xPosition === 'before'
|
|
4806
|
+
? ['end', 'start']
|
|
4807
|
+
: ['start', 'end'];
|
|
4808
|
+
const [overlayY, overlayFallbackY] = this.componentRef.yPosition === 'above'
|
|
4809
|
+
? ['bottom', 'top']
|
|
4810
|
+
: ['top', 'bottom'];
|
|
4811
|
+
let [originY, originFallbackY] = [overlayY, overlayFallbackY];
|
|
4812
|
+
const [overlayX, overlayFallbackX] = [originX, originFallbackX];
|
|
4813
|
+
originY = overlayY === 'top' ? 'bottom' : 'top';
|
|
4814
|
+
originFallbackY = overlayFallbackY === 'top' ? 'bottom' : 'top';
|
|
4815
|
+
return {
|
|
4816
|
+
originX,
|
|
4817
|
+
originFallbackX,
|
|
4818
|
+
originY,
|
|
4819
|
+
originFallbackY,
|
|
4820
|
+
overlayX,
|
|
4821
|
+
overlayFallbackX,
|
|
4822
|
+
overlayY,
|
|
4823
|
+
overlayFallbackY,
|
|
4824
|
+
offsetX: this.offsetX,
|
|
4825
|
+
offsetY: this.offsetY,
|
|
4826
|
+
};
|
|
4827
|
+
}
|
|
4828
|
+
getPositionStrategy() {
|
|
4829
|
+
let positionStrategy = this._overlayService.desktopPositionStrategy(this._element, this.selector);
|
|
4830
|
+
const positionConfig = this.getPositionConfig();
|
|
4831
|
+
positionStrategy = this._overlayService.setPosition(positionStrategy, positionConfig);
|
|
4832
|
+
return positionStrategy;
|
|
4833
|
+
}
|
|
4834
|
+
getScrollStrategy() {
|
|
4835
|
+
return this.setScrollStrategy('close');
|
|
4836
|
+
}
|
|
4837
|
+
setScrollStrategy(scrollStrategy) {
|
|
4838
|
+
switch (scrollStrategy) {
|
|
4839
|
+
case 'reposition':
|
|
4840
|
+
return this._overlay.scrollStrategies.reposition();
|
|
4841
|
+
case 'block':
|
|
4842
|
+
return this._overlay.scrollStrategies.block();
|
|
4843
|
+
case 'close':
|
|
4844
|
+
return this._overlay.scrollStrategies.close();
|
|
4845
|
+
default:
|
|
4846
|
+
return this._overlay.scrollStrategies.close();
|
|
4847
|
+
}
|
|
4848
|
+
}
|
|
4849
|
+
toggleOverlay(isOpen) {
|
|
4850
|
+
isOpen ? this._closeOverlay() : this._openOverlay();
|
|
4851
|
+
return !isOpen;
|
|
4852
|
+
}
|
|
4853
|
+
onOutsideClick() {
|
|
4854
|
+
this._closeOverlay();
|
|
4855
|
+
}
|
|
4856
|
+
_openOverlay() {
|
|
4857
|
+
this.componentRef.direction = this._dir.value === 'rtl' ? 'rtl' : 'ltr';
|
|
4858
|
+
this.componentRef.clientInput = this._clientInput;
|
|
4859
|
+
this.componentRef.clientOutput = this._clientOutput;
|
|
4860
|
+
const panelClass = [];
|
|
4861
|
+
if (this._clientOutput?.device === 'touch') {
|
|
4862
|
+
panelClass.push('granite-overlay-pane-center');
|
|
4863
|
+
}
|
|
4864
|
+
const hasBackdrop = this._clientOutput?.device === 'touch';
|
|
4865
|
+
const config = new OverlayConfig({
|
|
4866
|
+
positionStrategy: this.getPositionStrategy(),
|
|
4867
|
+
backdropClass: 'granite-overlay-dark-glass-backdrop',
|
|
4868
|
+
scrollStrategy: this.getScrollStrategy(),
|
|
4869
|
+
direction: this._dir,
|
|
4870
|
+
panelClass,
|
|
4871
|
+
hasBackdrop,
|
|
4872
|
+
});
|
|
4873
|
+
this._overlayRef = this._overlayService.createOverlay(config, this.componentRef, this._viewContainerRef);
|
|
4874
|
+
this._overlayService.subscribeOutsideClick(this._overlayRef, () => this.onOutsideClick());
|
|
4875
|
+
}
|
|
4876
|
+
_closeOverlay() {
|
|
4877
|
+
if (!this._overlayRef) {
|
|
4878
|
+
return;
|
|
4879
|
+
}
|
|
4880
|
+
this._overlayService.closeOverlay(this._overlayRef, this._element);
|
|
4881
|
+
}
|
|
4882
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: GraniteOverlayTriggerForBaseDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
4883
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.4", type: GraniteOverlayTriggerForBaseDirective, selector: "[graniteOverlayTriggerForBase]", ngImport: i0 }); }
|
|
4884
|
+
}
|
|
4885
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: GraniteOverlayTriggerForBaseDirective, decorators: [{
|
|
4886
|
+
type: Directive,
|
|
4887
|
+
args: [{
|
|
4888
|
+
selector: '[graniteOverlayTriggerForBase]',
|
|
4889
|
+
}]
|
|
4890
|
+
}], propDecorators: { _clientOutput: [{
|
|
4891
|
+
type: Optional
|
|
4892
|
+
}], _clientInput: [{
|
|
4893
|
+
type: Optional
|
|
4894
|
+
}], _dir: [{
|
|
4895
|
+
type: Optional
|
|
4896
|
+
}] } });
|
|
4897
|
+
|
|
4898
|
+
class GraniteProgressBarLegendTriggerForDirective extends GraniteOverlayTriggerForBaseDirective {
|
|
4899
|
+
constructor() {
|
|
4900
|
+
super(...arguments);
|
|
4901
|
+
this.isLegendOpen = false;
|
|
4902
|
+
this.selector = '.granite-progress-bar-legend';
|
|
4903
|
+
this.offsetY = 4;
|
|
4904
|
+
}
|
|
4905
|
+
get legend() {
|
|
4906
|
+
return this.componentRef;
|
|
4907
|
+
}
|
|
4908
|
+
set legend(value) {
|
|
4909
|
+
this.componentRef = value;
|
|
4910
|
+
}
|
|
4911
|
+
handleKeydown(event) {
|
|
4912
|
+
if (event.key === 'Enter') {
|
|
4913
|
+
event.preventDefault();
|
|
4914
|
+
this.isLegendOpen = this.toggleOverlay(this.isLegendOpen);
|
|
4915
|
+
}
|
|
4916
|
+
}
|
|
4917
|
+
handleClick() {
|
|
4918
|
+
this.isLegendOpen = this.toggleOverlay(this.isLegendOpen);
|
|
4919
|
+
}
|
|
4920
|
+
onOutsideClick() {
|
|
4921
|
+
super.onOutsideClick();
|
|
4922
|
+
this.isLegendOpen = false;
|
|
4838
4923
|
}
|
|
4839
|
-
|
|
4840
|
-
|
|
4924
|
+
getScrollStrategy() {
|
|
4925
|
+
return this.setScrollStrategy('reposition');
|
|
4926
|
+
}
|
|
4927
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: GraniteProgressBarLegendTriggerForDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
4928
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.4", type: GraniteProgressBarLegendTriggerForDirective, selector: "[graniteProgressBarLegendTriggerFor]", inputs: { legend: ["graniteProgressBarLegendTriggerFor", "legend"] }, host: { attributes: { "aria-haspopup": "true" }, listeners: { "keydown": "handleKeydown($event)", "click": "handleClick($event)" }, properties: { "attr.aria-expanded": "isLegendOpen || null", "attr.aria-controls": "isLegendOpen ? legend.panelId : null" }, classAttribute: "granite-progress-bar-legend-trigger" }, usesInheritance: true, ngImport: i0 }); }
|
|
4841
4929
|
}
|
|
4842
4930
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: GraniteProgressBarLegendTriggerForDirective, decorators: [{
|
|
4843
4931
|
type: Directive,
|
|
@@ -4846,25 +4934,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
|
|
|
4846
4934
|
host: {
|
|
4847
4935
|
class: 'granite-progress-bar-legend-trigger',
|
|
4848
4936
|
'aria-haspopup': 'true',
|
|
4849
|
-
'[attr.aria-expanded]': '
|
|
4850
|
-
'[attr.aria-controls]': '
|
|
4851
|
-
'(keydown)': '
|
|
4852
|
-
'(click)': '
|
|
4937
|
+
'[attr.aria-expanded]': 'isLegendOpen || null',
|
|
4938
|
+
'[attr.aria-controls]': 'isLegendOpen ? legend.panelId : null',
|
|
4939
|
+
'(keydown)': 'handleKeydown($event)',
|
|
4940
|
+
'(click)': 'handleClick($event)',
|
|
4853
4941
|
},
|
|
4854
4942
|
}]
|
|
4855
|
-
}],
|
|
4856
|
-
type: Inject,
|
|
4857
|
-
args: [GRANITE_CLIENT_INPUT]
|
|
4858
|
-
}, {
|
|
4859
|
-
type: Optional
|
|
4860
|
-
}] }, { type: undefined, decorators: [{
|
|
4861
|
-
type: Inject,
|
|
4862
|
-
args: [GRANITE_CLIENT_OUTPUT]
|
|
4863
|
-
}, {
|
|
4864
|
-
type: Optional
|
|
4865
|
-
}] }, { type: i2.Directionality, decorators: [{
|
|
4866
|
-
type: Optional
|
|
4867
|
-
}] }, { type: i1.FocusMonitor }], propDecorators: { legend: [{
|
|
4943
|
+
}], propDecorators: { legend: [{
|
|
4868
4944
|
type: Input,
|
|
4869
4945
|
args: ['graniteProgressBarLegendTriggerFor']
|
|
4870
4946
|
}] } });
|
|
@@ -4935,7 +5011,7 @@ class GraniteProgressBarComponent {
|
|
|
4935
5011
|
}
|
|
4936
5012
|
}
|
|
4937
5013
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: GraniteProgressBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4938
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: GraniteProgressBarComponent, selector: "granite-progress-bar", inputs: { progressBarData: "progressBarData", legendData: "legendData", showLabel: "showLabel", showLegend: "showLegend" }, host: { properties: { "class.label-present": "showLabel" } }, exportAs: ["graniteProgressBar"], usesOnChanges: true, ngImport: i0, template: "<div\n role=\"progressbar\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n class=\"progress\"\n [style.background-color]=\"getBackgroundColor()\"\n>\n <div\n *ngFor=\"let bar of progressBarData; let i = index\"\n [style.background-color]=\"getStackColor(bar.backgroundColor)\"\n [style.width]=\"getStringOfWidth(getWidth(bar.value))\"\n [style.color]=\"getFontColor(bar.foregroundColor)\"\n [graniteTooltipTriggerFor]=\"tooltip\"\n class=\"progress-bar\"\n >\n <label *ngIf=\"showLabel\" graniteHideOnOverflow>{{ bar.valueLabel }}</label>\n <granite-tooltip #tooltip> {{ bar.valueLabel }} </granite-tooltip>\n </div>\n</div>\n\n<ng-container *ngIf=\"showLegend\">\n <button\n graniteFlatButton\n [graniteProgressBarLegendTriggerFor]=\"legend\"\n class=\"legend-btn\"\n >\n <granite-icon fontIcon=\"icon-caret-down\"></granite-icon>\n </button>\n</ng-container>\n\n<granite-progress-bar-legend\n #legend\n [legendItems]=\"legendItems\"\n></granite-progress-bar-legend>\n", styles: [":host{width:100%;display:flex;align-items:center;box-sizing:border-box;height:.5rem;border-radius:var(--granite-radius-m);font-size:var(--granite-font-size-body-small);line-height:var(--granite-font-size-body-small)}:host(.label-present){height:auto!important}.progress{display:flex;width:inherit;height:inherit;overflow:hidden;border-radius:inherit;background-color:var(--granite-color-background-selected)}.progress-bar{display:flex;align-items:center;box-sizing:border-box;width:inherit;height:inherit;line-height:inherit;font-size:inherit;vertical-align:middle;text-overflow:ellipsis;white-space:nowrap;color:var(--granite-color-text);overflow:hidden;text-align:center;justify-content:center}.progress-bar label{width:100%;padding:var(--granite-spacing-4) 0}.legend-btn{width:16px;height:16px;margin-inline-start:var(--granite-spacing-16)}\n"], dependencies: [{ 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: GraniteHideOnOverflowDirective, selector: "[graniteHideOnOverflow]", exportAs: ["graniteHideOnOverflow"] }, { kind: "component", type: i3.GraniteTooltipComponent, selector: "granite-tooltip" }, { kind: "directive", type: i3.GraniteTooltipTriggerForDirective, selector: "[graniteTooltipTriggerFor]", inputs: ["graniteTooltipTriggerFor", "hideDelay", "showDelay", "showOnKeyboardFocus", "showOnClick"] }, { kind: "component", type: GraniteIconComponent, selector: "granite-icon", inputs: ["fontIcon"] }, { kind: "component", type: GraniteButtonComponent, selector: "button[graniteButton],\n button[granitePrimaryButton],\n button[graniteFlatButton],\n button[graniteToolbarButton]\n ", inputs: ["disabled", "toggled"], exportAs: ["graniteButton"] }, { kind: "component", type: GraniteProgressBarLegendComponent, selector: "granite-progress-bar-legend", inputs: ["legendItems"] }, { kind: "directive", type: GraniteProgressBarLegendTriggerForDirective, selector: "[graniteProgressBarLegendTriggerFor]", inputs: ["graniteProgressBarLegendTriggerFor"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
5014
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: GraniteProgressBarComponent, selector: "granite-progress-bar", inputs: { progressBarData: "progressBarData", legendData: "legendData", showLabel: "showLabel", showLegend: "showLegend" }, host: { properties: { "class.label-present": "showLabel" } }, exportAs: ["graniteProgressBar"], usesOnChanges: true, ngImport: i0, template: "<div\n role=\"progressbar\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n class=\"progress\"\n [style.background-color]=\"getBackgroundColor()\"\n>\n <div\n *ngFor=\"let bar of progressBarData; let i = index\"\n [style.background-color]=\"getStackColor(bar.backgroundColor)\"\n [style.width]=\"getStringOfWidth(getWidth(bar.value))\"\n [style.color]=\"getFontColor(bar.foregroundColor)\"\n [graniteTooltipTriggerFor]=\"tooltip\"\n class=\"progress-bar\"\n >\n <label *ngIf=\"showLabel\" graniteHideOnOverflow>{{ bar.valueLabel }}</label>\n <granite-tooltip #tooltip> {{ bar.valueLabel }} </granite-tooltip>\n </div>\n</div>\n\n<ng-container *ngIf=\"showLegend\">\n <button\n graniteFlatButton\n [graniteProgressBarLegendTriggerFor]=\"legend\"\n class=\"legend-btn\"\n >\n <granite-icon fontIcon=\"icon-caret-down\"></granite-icon>\n </button>\n</ng-container>\n\n<granite-progress-bar-legend\n #legend\n [legendItems]=\"legendItems\"\n></granite-progress-bar-legend>\n", styles: [":host{width:100%;display:flex;align-items:center;box-sizing:border-box;height:.5rem;border-radius:var(--granite-radius-m);font-size:var(--granite-font-size-body-small);line-height:var(--granite-font-size-body-small)}:host(.label-present){height:auto!important}.progress{display:flex;width:inherit;height:inherit;overflow:hidden;border-radius:inherit;background-color:var(--granite-color-background-selected)}.progress-bar{display:flex;align-items:center;box-sizing:border-box;width:inherit;height:inherit;line-height:inherit;font-size:inherit;vertical-align:middle;text-overflow:ellipsis;white-space:nowrap;color:var(--granite-color-text);overflow:hidden;text-align:center;justify-content:center}.progress-bar label{width:100%;padding:var(--granite-spacing-4) 0}.legend-btn{width:16px;height:16px;margin-inline-start:var(--granite-spacing-16)}\n"], dependencies: [{ 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: GraniteHideOnOverflowDirective, selector: "[graniteHideOnOverflow]", exportAs: ["graniteHideOnOverflow"] }, { kind: "component", type: i3$1.GraniteTooltipComponent, selector: "granite-tooltip" }, { kind: "directive", type: i3$1.GraniteTooltipTriggerForDirective, selector: "[graniteTooltipTriggerFor]", inputs: ["graniteTooltipTriggerFor", "hideDelay", "showDelay", "showOnKeyboardFocus", "showOnClick"] }, { kind: "component", type: GraniteIconComponent, selector: "granite-icon", inputs: ["fontIcon"] }, { kind: "component", type: GraniteButtonComponent, selector: "button[graniteButton],\n button[granitePrimaryButton],\n button[graniteFlatButton],\n button[graniteToolbarButton]\n ", inputs: ["disabled", "toggled"], exportAs: ["graniteButton"] }, { kind: "component", type: GraniteProgressBarLegendComponent, selector: "granite-progress-bar-legend", inputs: ["legendItems"] }, { kind: "directive", type: GraniteProgressBarLegendTriggerForDirective, selector: "[graniteProgressBarLegendTriggerFor]", inputs: ["graniteProgressBarLegendTriggerFor"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4939
5015
|
}
|
|
4940
5016
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: GraniteProgressBarComponent, decorators: [{
|
|
4941
5017
|
type: Component,
|
|
@@ -5063,7 +5139,8 @@ class GraniteCoreModule {
|
|
|
5063
5139
|
ClientOutputTouchDirective,
|
|
5064
5140
|
ClientInputDesktopDirective,
|
|
5065
5141
|
ClientInputTouchDirective,
|
|
5066
|
-
GraniteHideOnOverflowDirective
|
|
5142
|
+
GraniteHideOnOverflowDirective,
|
|
5143
|
+
GraniteOverlayTriggerForBaseDirective], exports: [ClientOutputDesktopDirective,
|
|
5067
5144
|
ClientOutputTouchDirective,
|
|
5068
5145
|
ClientInputDesktopDirective,
|
|
5069
5146
|
ClientInputTouchDirective,
|
|
@@ -5079,6 +5156,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
|
|
|
5079
5156
|
ClientInputDesktopDirective,
|
|
5080
5157
|
ClientInputTouchDirective,
|
|
5081
5158
|
GraniteHideOnOverflowDirective,
|
|
5159
|
+
GraniteOverlayTriggerForBaseDirective,
|
|
5082
5160
|
],
|
|
5083
5161
|
exports: [
|
|
5084
5162
|
ClientOutputDesktopDirective,
|