invensys-ng 21.4.3 → 21.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/package.json
CHANGED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
@use './color-variables.scss' as colors;
|
|
2
|
+
@use './variables' as vars;
|
|
3
|
+
@use './floating-label' as floating;
|
|
4
|
+
|
|
5
|
+
@mixin option-field() {
|
|
6
|
+
:host { display: block; min-width: 0; max-width: 100%; }
|
|
7
|
+
.i-option-field { position: relative; width: 100%; }
|
|
8
|
+
.i-option-field--float { margin-top: floating.$space; }
|
|
9
|
+
.i-option-control {
|
|
10
|
+
position: relative;
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
width: 100%;
|
|
14
|
+
min-height: vars.$component-input-height;
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
border: 1px solid colors.$color-surface-border;
|
|
17
|
+
border-radius: vars.$componentBorderRadius;
|
|
18
|
+
color: colors.$color-text-primary;
|
|
19
|
+
background: colors.$color-component-background;
|
|
20
|
+
&:focus-within { border-color: colors.$color-primary; box-shadow: colors.$color-box-shadow; }
|
|
21
|
+
}
|
|
22
|
+
.i-option-value { flex: 1; min-width: 0; padding: 4px 0 4px 12px; pointer-events: none; }
|
|
23
|
+
.i-option-text { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
24
|
+
.i-option-placeholder { color: colors.$color-text-secondary; }
|
|
25
|
+
.i-option-trigger, .i-native-select {
|
|
26
|
+
position: absolute;
|
|
27
|
+
inset: 0;
|
|
28
|
+
width: 100%;
|
|
29
|
+
height: 100%;
|
|
30
|
+
box-sizing: border-box;
|
|
31
|
+
margin: 0;
|
|
32
|
+
border: 0;
|
|
33
|
+
border-radius: inherit;
|
|
34
|
+
background: transparent;
|
|
35
|
+
cursor: pointer;
|
|
36
|
+
z-index: 1;
|
|
37
|
+
}
|
|
38
|
+
.i-option-trigger:focus-visible { outline: 2px solid colors.$color-primary; outline-offset: 2px; }
|
|
39
|
+
.i-native-select { display: none; opacity: 0; font-size: 16px; }
|
|
40
|
+
.i-option-actions { display: flex; align-items: center; flex-shrink: 0; pointer-events: none; }
|
|
41
|
+
.i-option-clear {
|
|
42
|
+
position: relative;
|
|
43
|
+
z-index: 2;
|
|
44
|
+
pointer-events: auto;
|
|
45
|
+
display: inline-flex;
|
|
46
|
+
justify-content: center;
|
|
47
|
+
align-items: center;
|
|
48
|
+
width: 32px;
|
|
49
|
+
height: 32px;
|
|
50
|
+
flex-shrink: 0;
|
|
51
|
+
padding: 0;
|
|
52
|
+
border: 0;
|
|
53
|
+
border-radius: vars.$componentBorderRadius;
|
|
54
|
+
background: transparent;
|
|
55
|
+
color: colors.$color-text-secondary;
|
|
56
|
+
cursor: pointer;
|
|
57
|
+
&:focus-visible { outline: 2px solid colors.$color-primary; outline-offset: -2px; }
|
|
58
|
+
}
|
|
59
|
+
.i-option-arrow { width: 32px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }
|
|
60
|
+
.i-option-arrow i { transition: transform 0.15s ease; }
|
|
61
|
+
.i-option-arrow .flipped { transform: rotate(180deg); }
|
|
62
|
+
.i-option-label { @include floating.base; position: absolute; top: 21px; left: 12px; transform: translateY(-50%); pointer-events: none; color: colors.$color-text-secondary; }
|
|
63
|
+
.i-option-field--open .i-option-label, .i-option-field--filled .i-option-label, .i-option-field:focus-within .i-option-label { @include floating.floated; }
|
|
64
|
+
.i-option-field--invalid {
|
|
65
|
+
.i-option-control { border-color: colors.$color-danger; }
|
|
66
|
+
.i-option-label { color: colors.$color-danger; }
|
|
67
|
+
}
|
|
68
|
+
.i-option-field--disabled {
|
|
69
|
+
.i-option-control { background: colors.$color-disabled-background; color: colors.$color-text-disabled; }
|
|
70
|
+
.i-option-trigger, .i-native-select { cursor: not-allowed; }
|
|
71
|
+
}
|
|
72
|
+
.i-option-error { margin-top: 4px; font-size: 12px; color: colors.$color-danger; }
|
|
73
|
+
.i-option-panel {
|
|
74
|
+
width: 100%; min-width: 0; box-sizing: border-box;
|
|
75
|
+
max-height: min(360px, calc(100dvh - 24px));
|
|
76
|
+
display: flex; flex-direction: column; overflow: hidden;
|
|
77
|
+
border: 1px solid colors.$color-surface-border; border-radius: vars.$componentBorderRadius;
|
|
78
|
+
background: colors.$color-component-background; color: colors.$color-text-primary;
|
|
79
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
80
|
+
}
|
|
81
|
+
.i-option-filter { padding: 8px; flex-shrink: 0; }
|
|
82
|
+
.i-option-search { box-sizing: border-box; width: 100%; min-width: 0; min-height: 40px; padding: 8px; font: inherit; border: 1px solid colors.$color-surface-border; border-radius: vars.$componentBorderRadius; color: inherit; background: colors.$color-component-background; }
|
|
83
|
+
.i-option-search:focus-visible { outline: 2px solid colors.$color-primary; outline-offset: -2px; }
|
|
84
|
+
.i-option-list { overflow: auto; min-height: 0; overscroll-behavior: contain; }
|
|
85
|
+
.i-option { display: flex; align-items: center; gap: 8px; width: 100%; box-sizing: border-box; min-height: 40px; padding: 8px 12px; border: 0; font: inherit; text-align: left; overflow-wrap: anywhere; background: transparent; color: inherit; cursor: pointer; }
|
|
86
|
+
.i-option:hover, .i-option.selected { background: colors.$color-surface-hover; }
|
|
87
|
+
.i-option:focus-visible { outline: 2px solid colors.$color-primary; outline-offset: -2px; }
|
|
88
|
+
.i-option-check { flex-shrink: 0; color: colors.$color-primary; }
|
|
89
|
+
.i-option-empty { padding: 12px; color: colors.$color-text-secondary; }
|
|
90
|
+
@media (pointer: coarse) {
|
|
91
|
+
.i-option-control, .i-option { min-height: 44px; }
|
|
92
|
+
.i-option-clear { width: 44px; height: 44px; }
|
|
93
|
+
.i-option-search { min-height: 44px; font-size: 16px; }
|
|
94
|
+
}
|
|
95
|
+
@media (max-width: 991px) and (pointer: coarse) {
|
|
96
|
+
.native-on-mobile .i-option-trigger { display: none; }
|
|
97
|
+
.native-on-mobile .i-native-select { display: block; }
|
|
98
|
+
}
|
|
99
|
+
}
|
package/types/invensys-ng.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { ControlValueAccessor, NgControl, AbstractControl } from '@angular/forms
|
|
|
5
5
|
import { UrlTree, Params, Router } from '@angular/router';
|
|
6
6
|
import * as rxjs from 'rxjs';
|
|
7
7
|
import { Observable, Subscription } from 'rxjs';
|
|
8
|
+
import * as _angular_cdk_overlay from '@angular/cdk/overlay';
|
|
8
9
|
import { IPosition } from '@shared/enums/IPosition';
|
|
9
10
|
import { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';
|
|
10
11
|
import { LegendItem } from 'chart.js';
|
|
@@ -924,9 +925,9 @@ declare class IChipsComponent implements OnChanges, AfterViewInit, OnDestroy {
|
|
|
924
925
|
/** Render chips inside a boxed input-like container */
|
|
925
926
|
boxed: boolean;
|
|
926
927
|
allowCloseAll: boolean;
|
|
927
|
-
/**
|
|
928
|
+
/** Accessible name for the chip collection (not a visible field label). */
|
|
928
929
|
label?: string;
|
|
929
|
-
/**
|
|
930
|
+
/** @deprecated Chips are a collection, so no floating label is rendered. */
|
|
930
931
|
useFloatLabel: boolean;
|
|
931
932
|
/** Show error state styling */
|
|
932
933
|
showError: boolean;
|
|
@@ -2964,6 +2965,7 @@ declare class IMultiSelect implements ControlValueAccessor {
|
|
|
2964
2965
|
* @default true
|
|
2965
2966
|
*/
|
|
2966
2967
|
readonly: boolean;
|
|
2968
|
+
useFloatLabel: boolean;
|
|
2967
2969
|
/** Use the platform multiple-option picker on small touch screens. */
|
|
2968
2970
|
nativeOnMobile: boolean;
|
|
2969
2971
|
onNativeChange(event: Event): void;
|
|
@@ -2991,6 +2993,14 @@ declare class IMultiSelect implements ControlValueAccessor {
|
|
|
2991
2993
|
* @internal
|
|
2992
2994
|
*/
|
|
2993
2995
|
isOpen: boolean;
|
|
2996
|
+
readonly overlayPositions: _angular_cdk_overlay.ConnectedPosition[];
|
|
2997
|
+
triggerRef?: ElementRef<HTMLButtonElement>;
|
|
2998
|
+
panelRef?: ElementRef<HTMLDivElement>;
|
|
2999
|
+
openDropdown(): void;
|
|
3000
|
+
closeDropdown(restoreFocus?: boolean): void;
|
|
3001
|
+
focusControl(): void;
|
|
3002
|
+
focusOptions(): void;
|
|
3003
|
+
onPanelKeydown(event: KeyboardEvent): void;
|
|
2994
3004
|
/**
|
|
2995
3005
|
* Current filter/search value
|
|
2996
3006
|
* @internal
|
|
@@ -3151,7 +3161,7 @@ declare class IMultiSelect implements ControlValueAccessor {
|
|
|
3151
3161
|
*/
|
|
3152
3162
|
getErrorMessage(): string | null;
|
|
3153
3163
|
static ɵfac: i0.ɵɵFactoryDeclaration<IMultiSelect, never>;
|
|
3154
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<IMultiSelect, "i-multi-select", never, { "label": { "alias": "label"; "required": false; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "optionLabel": { "alias": "optionLabel"; "required": true; }; "placeholder": { "alias": "placeholder"; "required": false; }; "id": { "alias": "id"; "required": false; }; "fluid": { "alias": "fluid"; "required": false; }; "showClear": { "alias": "showClear"; "required": false; }; "filter": { "alias": "filter"; "required": false; }; "filterBy": { "alias": "filterBy"; "required": false; }; "maxSelectedLabels": { "alias": "maxSelectedLabels"; "required": false; }; "selectedItemsLabel": { "alias": "selectedItemsLabel"; "required": false; }; "errorMessages": { "alias": "errorMessages"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "nativeOnMobile": { "alias": "nativeOnMobile"; "required": false; }; }, { "onChange": "onChange"; "onClear": "onClear"; }, never, never, true, never>;
|
|
3164
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<IMultiSelect, "i-multi-select", never, { "label": { "alias": "label"; "required": false; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "optionLabel": { "alias": "optionLabel"; "required": true; }; "placeholder": { "alias": "placeholder"; "required": false; }; "id": { "alias": "id"; "required": false; }; "fluid": { "alias": "fluid"; "required": false; }; "showClear": { "alias": "showClear"; "required": false; }; "filter": { "alias": "filter"; "required": false; }; "filterBy": { "alias": "filterBy"; "required": false; }; "maxSelectedLabels": { "alias": "maxSelectedLabels"; "required": false; }; "selectedItemsLabel": { "alias": "selectedItemsLabel"; "required": false; }; "errorMessages": { "alias": "errorMessages"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "useFloatLabel": { "alias": "useFloatLabel"; "required": false; }; "nativeOnMobile": { "alias": "nativeOnMobile"; "required": false; }; }, { "onChange": "onChange"; "onClear": "onClear"; }, never, never, true, never>;
|
|
3155
3165
|
}
|
|
3156
3166
|
|
|
3157
3167
|
/**
|
|
@@ -3471,6 +3481,14 @@ declare class ISelect implements ControlValueAccessor {
|
|
|
3471
3481
|
* @internal
|
|
3472
3482
|
*/
|
|
3473
3483
|
isOpen: boolean;
|
|
3484
|
+
readonly overlayPositions: _angular_cdk_overlay.ConnectedPosition[];
|
|
3485
|
+
triggerRef?: ElementRef<HTMLButtonElement>;
|
|
3486
|
+
panelRef?: ElementRef<HTMLDivElement>;
|
|
3487
|
+
openDropdown(): void;
|
|
3488
|
+
closeDropdown(restoreFocus?: boolean): void;
|
|
3489
|
+
focusControl(): void;
|
|
3490
|
+
focusOptions(): void;
|
|
3491
|
+
onPanelKeydown(event: KeyboardEvent): void;
|
|
3474
3492
|
/**
|
|
3475
3493
|
* Current filter/search value
|
|
3476
3494
|
* @internal
|