invensys-ng 21.4.2 → 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "invensys-ng",
3
- "version": "21.4.2",
3
+ "version": "21.5.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/ulbrichFrauendorf/invensys-ng"
@@ -0,0 +1,44 @@
1
+ @use './color-variables.scss' as colors;
2
+
3
+ // Keep native elements out of desktop keyboard and accessibility navigation.
4
+ @mixin mobile-picker($prefix) {
5
+ .i-native-field { display: none; }
6
+
7
+ @media (max-width: 991px) and (pointer: coarse) {
8
+ .native-on-mobile {
9
+ .#{$prefix}-input-container, .#{$prefix}-dropdown { display: none; }
10
+ .i-native-field { display: flex; flex-direction: column; gap: 6px; }
11
+ }
12
+ .i-native-field label { font-size: 0.875rem; color: colors.$color-text-primary; }
13
+ .i-native-row { display: flex; align-items: center; gap: 4px; min-width: 0; }
14
+ .i-native-select {
15
+ flex: 1;
16
+ min-width: 0;
17
+ width: 100%;
18
+ box-sizing: border-box;
19
+ min-height: 44px;
20
+ padding: 10px 12px;
21
+ font: inherit;
22
+ font-size: 16px;
23
+ border: 1px solid colors.$color-surface-border;
24
+ border-radius: 6px;
25
+ color: colors.$color-text-primary;
26
+ background: colors.$color-component-background;
27
+ &[aria-invalid='true'] { border-color: colors.$color-danger; }
28
+ &:disabled { opacity: 0.6; }
29
+ }
30
+ .i-native-clear {
31
+ flex: 0 0 44px;
32
+ min-height: 44px;
33
+ border: 0;
34
+ border-radius: 6px;
35
+ background: transparent;
36
+ color: colors.$color-text-primary;
37
+ }
38
+ .i-native-error { color: colors.$color-danger; font-size: 0.875rem; }
39
+ .i-native-select:focus-visible, .i-native-clear:focus-visible {
40
+ outline: 2px solid colors.$color-primary;
41
+ outline-offset: 2px;
42
+ }
43
+ }
44
+ }
@@ -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
+ }
@@ -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
- /** Label text for float label */
928
+ /** Accessible name for the chip collection (not a visible field label). */
928
929
  label?: string;
929
- /** Whether to use floating label style */
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;
@@ -2313,6 +2314,7 @@ declare class LayoutComponent implements OnInit, OnDestroy, AfterViewInit {
2313
2314
  protected readonly Math: Math;
2314
2315
  private routerSubscription;
2315
2316
  private touchStartY;
2317
+ private touchStartX;
2316
2318
  private touchCurrentY;
2317
2319
  private isPulling;
2318
2320
  pullDistance: i0.WritableSignal<number>;
@@ -2963,6 +2965,11 @@ declare class IMultiSelect implements ControlValueAccessor {
2963
2965
  * @default true
2964
2966
  */
2965
2967
  readonly: boolean;
2968
+ useFloatLabel: boolean;
2969
+ /** Use the platform multiple-option picker on small touch screens. */
2970
+ nativeOnMobile: boolean;
2971
+ onNativeChange(event: Event): void;
2972
+ touch(): void;
2966
2973
  /**
2967
2974
  * Event emitted when selection changes
2968
2975
  */
@@ -2986,6 +2993,14 @@ declare class IMultiSelect implements ControlValueAccessor {
2986
2993
  * @internal
2987
2994
  */
2988
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;
2989
3004
  /**
2990
3005
  * Current filter/search value
2991
3006
  * @internal
@@ -3146,7 +3161,7 @@ declare class IMultiSelect implements ControlValueAccessor {
3146
3161
  */
3147
3162
  getErrorMessage(): string | null;
3148
3163
  static ɵfac: i0.ɵɵFactoryDeclaration<IMultiSelect, never>;
3149
- 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; }; }, { "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>;
3150
3165
  }
3151
3166
 
3152
3167
  /**
@@ -3432,6 +3447,12 @@ declare class ISelect implements ControlValueAccessor {
3432
3447
  * @default true
3433
3448
  */
3434
3449
  readonly: boolean;
3450
+ disabled: boolean;
3451
+ /** Use the platform option picker on small touch screens. */
3452
+ nativeOnMobile: boolean;
3453
+ get nativeSelectedIndex(): string;
3454
+ onNativeChange(event: Event): void;
3455
+ touch(): void;
3435
3456
  /**
3436
3457
  * Event emitted when selection changes
3437
3458
  */
@@ -3460,6 +3481,14 @@ declare class ISelect implements ControlValueAccessor {
3460
3481
  * @internal
3461
3482
  */
3462
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;
3463
3492
  /**
3464
3493
  * Current filter/search value
3465
3494
  * @internal
@@ -3598,7 +3627,7 @@ declare class ISelect implements ControlValueAccessor {
3598
3627
  */
3599
3628
  getErrorMessage(): string | null;
3600
3629
  static ɵfac: i0.ɵɵFactoryDeclaration<ISelect, never>;
3601
- static ɵcmp: i0.ɵɵComponentDeclaration<ISelect, "i-select", never, { "label": { "alias": "label"; "required": false; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "optionLabel": { "alias": "optionLabel"; "required": true; }; "placeholder": { "alias": "placeholder"; "required": false; }; "useFloatLabel": { "alias": "useFloatLabel"; "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; }; "errorMessages": { "alias": "errorMessages"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; }, { "onChange": "onChange"; "onClear": "onClear"; }, never, never, true, never>;
3630
+ static ɵcmp: i0.ɵɵComponentDeclaration<ISelect, "i-select", never, { "label": { "alias": "label"; "required": false; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "optionLabel": { "alias": "optionLabel"; "required": true; }; "placeholder": { "alias": "placeholder"; "required": false; }; "useFloatLabel": { "alias": "useFloatLabel"; "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; }; "errorMessages": { "alias": "errorMessages"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "nativeOnMobile": { "alias": "nativeOnMobile"; "required": false; }; }, { "onChange": "onChange"; "onClear": "onClear"; }, never, never, true, never>;
3602
3631
  }
3603
3632
 
3604
3633
  /** A single step rendered inside an {@link IStepper}. */