@ngx-stoui/core 20.0.16 → 21.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/README.md +143 -2
  2. package/fesm2022/ngx-stoui-core.mjs +86 -146
  3. package/fesm2022/ngx-stoui-core.mjs.map +1 -1
  4. package/ngx-datatable.css +343 -204
  5. package/ngx-stoui.css +2797 -4243
  6. package/package.json +5 -5
  7. package/styles/README.md +273 -0
  8. package/{index.d.ts → types/ngx-stoui-core.d.ts} +7 -20
  9. package/style/_fonts.scss +0 -3
  10. package/style/datatable/_ngx-datatable-compact.scss +0 -146
  11. package/style/datatable/_ngx-datatable-form.scss +0 -90
  12. package/style/datatable/_ngx-datatable-variables.scss +0 -10
  13. package/style/datatable/ngx-datatable.scss +0 -405
  14. package/style/fonts/Equinor-Bold.woff +0 -0
  15. package/style/fonts/Equinor-Bold.woff2 +0 -0
  16. package/style/fonts/Equinor-Light.woff +0 -0
  17. package/style/fonts/Equinor-Light.woff2 +0 -0
  18. package/style/fonts/Equinor-Medium.woff +0 -0
  19. package/style/fonts/Equinor-Medium.woff2 +0 -0
  20. package/style/fonts/Equinor-Regular.woff +0 -0
  21. package/style/fonts/Equinor-Regular.woff2 +0 -0
  22. package/style/form/sto-form.scss +0 -343
  23. package/style/grid.scss +0 -20
  24. package/style/statoil-sansmedium-webfont.woff +0 -0
  25. package/style/statoil-sansmedium-webfont.woff2 +0 -0
  26. package/style/sto-dialog.scss +0 -70
  27. package/style/sto-grid.scss +0 -63
  28. package/style/theme/_action-footer.scss +0 -18
  29. package/style/theme/_appheader.scss +0 -122
  30. package/style/theme/_card.scss +0 -28
  31. package/style/theme/_colors.scss +0 -185
  32. package/style/theme/_datatable.scss +0 -265
  33. package/style/theme/_daterange.scss +0 -48
  34. package/style/theme/_dialog.scss +0 -24
  35. package/style/theme/_drawer.scss +0 -0
  36. package/style/theme/_filterpanel.scss +0 -89
  37. package/style/theme/_input-overrides.scss +0 -119
  38. package/style/theme/_message-panel.scss +0 -96
  39. package/style/theme/_number-input.scss +0 -23
  40. package/style/theme/_number-unit-input.scss +0 -34
  41. package/style/theme/_select-filter.scss +0 -17
  42. package/style/theme/_sto-indicators.scss +0 -118
  43. package/style/theme/_theme-variables.scss +0 -67
  44. package/style/theme/_theme.scss +0 -22
  45. package/style/theme/_typography.scss +0 -56
  46. package/style/theme/_wysiwyg.scss +0 -39
  47. package/style/theme/components.scss +0 -16
  48. package/style/theme/preference-manager.scss +0 -46
  49. package/style/theme.scss +0 -46
package/README.md CHANGED
@@ -1,6 +1,147 @@
1
- # core
1
+ # @ngx-stoui/core
2
2
 
3
- This library was generated with [Nx](https://nx.dev).
3
+ Core packages like styling, pipes and common directives for Angular, based on EDS design styles.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @ngx-stoui/core
9
+ ```
10
+
11
+ ## Public API
12
+
13
+ ### Compiled Stylesheets
14
+
15
+ Import these in your `styles.scss` or `angular.json`:
16
+
17
+ ```scss
18
+ // Main stylesheet with all components and utilities
19
+ @import '@ngx-stoui/core/ngx-stoui.css';
20
+
21
+ // Datatable stylesheet (optional, if using datatables)
22
+ @import '@ngx-stoui/core/ngx-datatable.css';
23
+ ```
24
+
25
+ ### SCSS Utilities (for advanced usage)
26
+
27
+ #### Grid System
28
+
29
+ Use the grid mixin to create responsive grid layouts:
30
+
31
+ ```scss
32
+ @use '@ngx-stoui/core/style/grid' as grid;
33
+
34
+ .my-grid {
35
+ @include grid.grid(12); // 12-column grid
36
+ }
37
+
38
+ .my-compact-grid {
39
+ @include grid.grid(4, 'column', 0); // 4-column grid with custom class name
40
+ }
41
+ ```
42
+
43
+ #### Theme Variables and Mixins
44
+
45
+ Access theme variables, typography, and create custom themed components:
46
+
47
+ ```scss
48
+ @use 'sass:map';
49
+ @import '@ngx-stoui/core/style/theme/theme';
50
+
51
+ // Access theme variables
52
+ @mixin my-component-theme($theme, $variables) {
53
+ $primary: map.get($variables, primary);
54
+ $accent: map.get($variables, accent);
55
+
56
+ .my-component {
57
+ background: $primary;
58
+ color: $accent;
59
+ }
60
+ }
61
+
62
+ // Apply to light and dark themes
63
+ .light-theme {
64
+ @include my-component-theme($sto-theme, $variables);
65
+ }
66
+
67
+ .dark-theme {
68
+ @include my-component-theme($sto-dark-theme, $dark-variables);
69
+ }
70
+ ```
71
+
72
+ #### Typography Only
73
+
74
+ If you only need typography definitions:
75
+
76
+ ```scss
77
+ @import '@ngx-stoui/core/style/theme/typography';
78
+
79
+ // Access typography variables:
80
+ // - $sto-typography (default 13px)
81
+ // - $sto-sm-typography (small 10px)
82
+ // - $sto-l-typography (large 16px)
83
+ ```
84
+
85
+ ## Available Exports
86
+
87
+ ### Compiled CSS
88
+
89
+ - `ngx-stoui.css` - Main stylesheet
90
+ - `ngx-datatable.css` - Datatable styles
91
+
92
+ ### SCSS Utilities
93
+
94
+ - `style/grid.scss` - Grid mixin system
95
+ - `style/theme/theme.scss` - Complete theme with variables and components
96
+ - `style/theme/_typography.scss` - Typography configurations
97
+ - `style/theme/_theme.scss` - Theme color palettes
98
+ - `style/theme/_colors.scss` - Color definitions
99
+ - `style/theme/_theme-variables.scss` - Theme variable functions
100
+ - `style/theme/components.scss` - All component styles
101
+
102
+ ### Fonts
103
+
104
+ - Equinor font files (`.woff`, `.woff2`)
105
+
106
+ ## Usage Examples
107
+
108
+ ### Basic Setup
109
+
110
+ ```scss
111
+ // styles.scss
112
+ @import '@ngx-stoui/core/ngx-stoui.css';
113
+ ```
114
+
115
+ ### With Grid System
116
+
117
+ ```scss
118
+ // styles.scss
119
+ @use '@ngx-stoui/core/style/grid' as grid;
120
+ @import '@ngx-stoui/core/ngx-stoui.css';
121
+
122
+ .product-grid {
123
+ @include grid.grid(6); // 6-column grid
124
+ }
125
+ ```
126
+
127
+ ### With Custom Theming
128
+
129
+ ```scss
130
+ // styles.scss
131
+ @use 'sass:map';
132
+ @import '@ngx-stoui/core/ngx-stoui.css';
133
+ @import '@ngx-stoui/core/style/theme/theme';
134
+
135
+ @mixin app-theme($theme, $variables) {
136
+ // Your custom theme styles using $variables
137
+ }
138
+
139
+ @include app-theme($sto-theme, $variables);
140
+
141
+ .sto-dark-theme {
142
+ @include app-theme($sto-dark-theme, $dark-variables);
143
+ }
144
+ ```
4
145
 
5
146
  ## Running unit tests
6
147
 
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, output, HostListener, Directive, ContentChildren, inject, ElementRef, HostBinding, Input, NgModule, Pipe } from '@angular/core';
2
+ import { input, output, HostListener, Directive, ContentChildren, inject, ElementRef, HostBinding, NgModule, Pipe } from '@angular/core';
3
3
  import { MatInput } from '@angular/material/input';
4
4
  import { Subject, fromEvent } from 'rxjs';
5
5
  import { takeUntil, switchMap, take } from 'rxjs/operators';
@@ -207,15 +207,15 @@ class QuickKeysDirective {
207
207
  this.quickSubmit.emit();
208
208
  }
209
209
  }
210
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: QuickKeysDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
211
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.3", type: QuickKeysDirective, isStandalone: true, selector: "[stoQuickKeys]", inputs: { quickKeys: { classPropertyName: "quickKeys", publicName: "quickKeys", isSignal: true, isRequired: false, transformFunction: null }, formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { quickSubmit: "quickSubmit", quickCancel: "quickCancel" }, host: { listeners: { "keyup": "onKeyUp($event)" } }, ngImport: i0 }); }
210
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: QuickKeysDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
211
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.6", type: QuickKeysDirective, isStandalone: true, selector: "[stoQuickKeys]", inputs: { quickKeys: { classPropertyName: "quickKeys", publicName: "quickKeys", isSignal: true, isRequired: false, transformFunction: null }, formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { quickSubmit: "quickSubmit", quickCancel: "quickCancel" }, host: { listeners: { "keyup": "onKeyUp($event)" } }, ngImport: i0 }); }
212
212
  }
213
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: QuickKeysDirective, decorators: [{
213
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: QuickKeysDirective, decorators: [{
214
214
  type: Directive,
215
215
  args: [{
216
216
  selector: '[stoQuickKeys]',
217
217
  }]
218
- }], propDecorators: { onKeyUp: [{
218
+ }], propDecorators: { quickKeys: [{ type: i0.Input, args: [{ isSignal: true, alias: "quickKeys", required: false }] }], formGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "formGroup", required: false }] }], quickSubmit: [{ type: i0.Output, args: ["quickSubmit"] }], quickCancel: [{ type: i0.Output, args: ["quickCancel"] }], onKeyUp: [{
219
219
  type: HostListener,
220
220
  args: ['keyup', ['$event']]
221
221
  }] } });
@@ -243,10 +243,10 @@ class DateFormFieldClickDirective {
243
243
  this.destroy$.next(true);
244
244
  this.destroy$.complete();
245
245
  }
246
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: DateFormFieldClickDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
247
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.3", type: DateFormFieldClickDirective, isStandalone: true, selector: "[stoDateFormFieldClick]", inputs: { stoDateFormFieldClick: { classPropertyName: "stoDateFormFieldClick", publicName: "stoDateFormFieldClick", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "click": "clickEvent()" } }, queries: [{ propertyName: "inputs", predicate: MatInput }], ngImport: i0 }); }
246
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DateFormFieldClickDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
247
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.6", type: DateFormFieldClickDirective, isStandalone: true, selector: "[stoDateFormFieldClick]", inputs: { stoDateFormFieldClick: { classPropertyName: "stoDateFormFieldClick", publicName: "stoDateFormFieldClick", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "click": "clickEvent()" } }, queries: [{ propertyName: "inputs", predicate: MatInput }], ngImport: i0 }); }
248
248
  }
249
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: DateFormFieldClickDirective, decorators: [{
249
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DateFormFieldClickDirective, decorators: [{
250
250
  type: Directive,
251
251
  args: [{
252
252
  selector: '[stoDateFormFieldClick]',
@@ -254,7 +254,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
254
254
  }], propDecorators: { inputs: [{
255
255
  type: ContentChildren,
256
256
  args: [MatInput]
257
- }], clickEvent: [{
257
+ }], stoDateFormFieldClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "stoDateFormFieldClick", required: true }] }], clickEvent: [{
258
258
  type: HostListener,
259
259
  args: ['click']
260
260
  }] } });
@@ -276,10 +276,10 @@ class StoSelectTextOnFocusDirective {
276
276
  this._el.select();
277
277
  }
278
278
  }
279
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: StoSelectTextOnFocusDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
280
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.3", type: StoSelectTextOnFocusDirective, isStandalone: true, selector: "[stoSelectTextOnFocus]", host: { listeners: { "focus": "onFocus()", "dblclick": "onFocus()" } }, ngImport: i0 }); }
279
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: StoSelectTextOnFocusDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
280
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.6", type: StoSelectTextOnFocusDirective, isStandalone: true, selector: "[stoSelectTextOnFocus]", host: { listeners: { "focus": "onFocus()", "dblclick": "onFocus()" } }, ngImport: i0 }); }
281
281
  }
282
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: StoSelectTextOnFocusDirective, decorators: [{
282
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: StoSelectTextOnFocusDirective, decorators: [{
283
283
  type: Directive,
284
284
  args: [{
285
285
  selector: '[stoSelectTextOnFocus]',
@@ -293,121 +293,56 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
293
293
  args: ['dblclick']
294
294
  }] } });
295
295
 
296
- const getClass = (width, small = 400, large = 800) => {
297
- let cols = 1;
298
- if (width > small) {
299
- cols += 1;
300
- }
301
- if (width > large) {
302
- cols += 2;
303
- }
304
- return `sto-f-grid--${cols}`;
305
- };
306
- const ALL_GRIDS = ['sto-f-grid--1', 'sto-f-grid--2', 'sto-f-grid--4', 'sto-f-grid--6'];
307
296
  class StoGridSpacerDirective {
308
- constructor() {
309
- this.useClass = true;
310
- }
311
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: StoGridSpacerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
312
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.3", type: StoGridSpacerDirective, isStandalone: true, selector: "[stoGridSpacer]", host: { properties: { "class.sto-f-grid__col": "this.useClass", "class.sto-f-grid__col--spacer": "this.useClass" } }, ngImport: i0 }); }
297
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: StoGridSpacerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
298
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.6", type: StoGridSpacerDirective, isStandalone: true, selector: "[stoGridSpacer]", host: { classAttribute: "sto-grid__col sto-grid__col--spacer" }, ngImport: i0 }); }
313
299
  }
314
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: StoGridSpacerDirective, decorators: [{
300
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: StoGridSpacerDirective, decorators: [{
315
301
  type: Directive,
316
302
  args: [{
317
303
  selector: '[stoGridSpacer]',
318
- standalone: true
304
+ host: {
305
+ class: 'sto-grid__col sto-grid__col--spacer',
306
+ },
319
307
  }]
320
- }], propDecorators: { useClass: [{
321
- type: HostBinding,
322
- args: ['class.sto-f-grid__col']
323
- }, {
324
- type: HostBinding,
325
- args: ['class.sto-f-grid__col--spacer']
326
- }] } });
308
+ }] });
327
309
  class StoGridColumnDirective {
328
310
  constructor() {
329
- this.useClass = true;
311
+ this.stoGridColumnDouble = input(false, ...(ngDevMode ? [{ debugName: "stoGridColumnDouble" }] : []));
330
312
  }
331
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: StoGridColumnDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
332
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.3", type: StoGridColumnDirective, isStandalone: true, selector: "[stoGridColumn]", inputs: { stoGridColumnDouble: "stoGridColumnDouble" }, host: { properties: { "class.sto-f-grid__col": "this.useClass", "class.sto-f-grid__col--2": "this.stoGridColumnDouble" } }, ngImport: i0 }); }
313
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: StoGridColumnDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
314
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.6", type: StoGridColumnDirective, isStandalone: true, selector: "[stoGridColumn]", inputs: { stoGridColumnDouble: { classPropertyName: "stoGridColumnDouble", publicName: "stoGridColumnDouble", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.sto-grid__col--2": "stoGridColumnDouble()" }, classAttribute: "sto-grid__col" }, ngImport: i0 }); }
333
315
  }
334
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: StoGridColumnDirective, decorators: [{
316
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: StoGridColumnDirective, decorators: [{
335
317
  type: Directive,
336
318
  args: [{
337
319
  selector: '[stoGridColumn]',
338
- standalone: true
320
+ host: {
321
+ class: 'sto-grid__col',
322
+ '[class.sto-grid__col--2]': 'stoGridColumnDouble()',
323
+ },
339
324
  }]
340
- }], propDecorators: { useClass: [{
341
- type: HostBinding,
342
- args: ['class.sto-f-grid__col']
343
- }], stoGridColumnDouble: [{
344
- type: HostBinding,
345
- args: ['class.sto-f-grid__col--2']
346
- }, {
347
- type: Input
348
- }] } });
325
+ }], propDecorators: { stoGridColumnDouble: [{ type: i0.Input, args: [{ isSignal: true, alias: "stoGridColumnDouble", required: false }] }] } });
349
326
  class StoGridDirective {
350
327
  constructor() {
351
- this.elRef = inject(ElementRef);
352
- // TODO: Skipped for migration because:
353
- // This input is used in combination with `@HostBinding` and migrating would
354
- // break.
355
- this.maxWidth = 1000;
356
- // TODO: Skipped for migration because:
357
- // This input is used in combination with `@HostBinding` and migrating would
358
- // break.
359
- this.minWidth = 250;
360
- this.baseClass = true;
361
- this.breakpoints = input(...(ngDevMode ? [undefined, { debugName: "breakpoints" }] : []));
328
+ this.maxWidth = input(1000, ...(ngDevMode ? [{ debugName: "maxWidth" }] : []));
329
+ this.minWidth = input(250, ...(ngDevMode ? [{ debugName: "minWidth" }] : []));
362
330
  }
363
- ngAfterViewInit() {
364
- const el = this.elRef.nativeElement;
365
- this.observer = new ResizeObserver(entries => {
366
- for (const entry of entries) {
367
- const cr = entry.contentRect;
368
- const { width } = cr;
369
- const breakpoints = this.breakpoints() || { 2: 400, 4: 800 };
370
- const gridType = getClass(width, breakpoints[2], breakpoints[4]);
371
- if (!el.classList.contains(gridType)) {
372
- el.classList.remove(...ALL_GRIDS);
373
- el.classList.add(gridType);
374
- }
375
- }
376
- });
377
- this.observer.observe(this.elRef.nativeElement);
378
- }
379
- ngOnDestroy() {
380
- if (this.observer) {
381
- this.observer.disconnect();
382
- }
383
- }
384
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: StoGridDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
385
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.3", type: StoGridDirective, isStandalone: true, selector: "[stoGrid]", inputs: { maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: false, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: false, isRequired: false, transformFunction: null }, breakpoints: { classPropertyName: "breakpoints", publicName: "breakpoints", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.max-width.px": "this.maxWidth", "style.min-width.px": "this.minWidth", "class.sto-f-grid": "this.baseClass" } }, queries: [{ propertyName: "columns", predicate: StoGridColumnDirective, read: ElementRef }], exportAs: ["stoGrid"], ngImport: i0 }); }
331
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: StoGridDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
332
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.6", type: StoGridDirective, isStandalone: true, selector: "[stoGrid]", inputs: { maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.max-width.px": "maxWidth()", "style.min-width.px": "minWidth()" }, classAttribute: "sto-grid" }, exportAs: ["stoGrid"], ngImport: i0 }); }
386
333
  }
387
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: StoGridDirective, decorators: [{
334
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: StoGridDirective, decorators: [{
388
335
  type: Directive,
389
336
  args: [{
390
337
  selector: '[stoGrid]',
391
338
  exportAs: 'stoGrid',
392
- standalone: true
339
+ host: {
340
+ class: 'sto-grid',
341
+ '[style.max-width.px]': 'maxWidth()',
342
+ '[style.min-width.px]': 'minWidth()',
343
+ },
393
344
  }]
394
- }], propDecorators: { maxWidth: [{
395
- type: HostBinding,
396
- args: ['style.max-width.px']
397
- }, {
398
- type: Input
399
- }], minWidth: [{
400
- type: HostBinding,
401
- args: ['style.min-width.px']
402
- }, {
403
- type: Input
404
- }], baseClass: [{
405
- type: HostBinding,
406
- args: ['class.sto-f-grid']
407
- }], columns: [{
408
- type: ContentChildren,
409
- args: [StoGridColumnDirective, { read: ElementRef }]
410
- }] } });
345
+ }], propDecorators: { maxWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxWidth", required: false }] }], minWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "minWidth", required: false }] }] } });
411
346
 
412
347
  class MenuOverlayDirective {
413
348
  constructor() {
@@ -433,10 +368,10 @@ class MenuOverlayDirective {
433
368
  element.style.height = '1px';
434
369
  element.style.width = '1px';
435
370
  }
436
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: MenuOverlayDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
437
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.3", type: MenuOverlayDirective, isStandalone: true, selector: "[stoMenuOverlay]", host: { properties: { "style.left.px": "this.left", "style.top.px": "this.top" } }, exportAs: ["stoMenuOverlay"], ngImport: i0 }); }
371
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MenuOverlayDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
372
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.6", type: MenuOverlayDirective, isStandalone: true, selector: "[stoMenuOverlay]", host: { properties: { "style.left.px": "this.left", "style.top.px": "this.top" } }, exportAs: ["stoMenuOverlay"], ngImport: i0 }); }
438
373
  }
439
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: MenuOverlayDirective, decorators: [{
374
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MenuOverlayDirective, decorators: [{
440
375
  type: Directive,
441
376
  args: [{
442
377
  selector: '[stoMenuOverlay]',
@@ -468,22 +403,22 @@ class ContextMenuDirective {
468
403
  this.menuTrigger().openMenu();
469
404
  }, 150);
470
405
  }
471
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: ContextMenuDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
472
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.3", type: ContextMenuDirective, isStandalone: true, selector: "[stoContextMenu]", inputs: { menuTrigger: { classPropertyName: "menuTrigger", publicName: "menuTrigger", isSignal: true, isRequired: true, transformFunction: null }, overlayDirective: { classPropertyName: "overlayDirective", publicName: "overlayDirective", isSignal: true, isRequired: true, transformFunction: null }, menuContext: { classPropertyName: "menuContext", publicName: "menuContext", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "contextmenu": "contextMenu($event)" } }, ngImport: i0 }); }
406
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ContextMenuDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
407
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.6", type: ContextMenuDirective, isStandalone: true, selector: "[stoContextMenu]", inputs: { menuTrigger: { classPropertyName: "menuTrigger", publicName: "menuTrigger", isSignal: true, isRequired: true, transformFunction: null }, overlayDirective: { classPropertyName: "overlayDirective", publicName: "overlayDirective", isSignal: true, isRequired: true, transformFunction: null }, menuContext: { classPropertyName: "menuContext", publicName: "menuContext", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "contextmenu": "contextMenu($event)" } }, ngImport: i0 }); }
473
408
  }
474
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: ContextMenuDirective, decorators: [{
409
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ContextMenuDirective, decorators: [{
475
410
  type: Directive,
476
411
  args: [{
477
412
  selector: '[stoContextMenu]',
478
413
  }]
479
- }], propDecorators: { contextMenu: [{
414
+ }], propDecorators: { menuTrigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "menuTrigger", required: true }] }], overlayDirective: [{ type: i0.Input, args: [{ isSignal: true, alias: "overlayDirective", required: true }] }], menuContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "menuContext", required: false }] }], contextMenu: [{
480
415
  type: HostListener,
481
416
  args: ['contextmenu', ['$event']]
482
417
  }] } });
483
418
 
484
419
  class StoDirectivesModule {
485
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: StoDirectivesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
486
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.3", ngImport: i0, type: StoDirectivesModule, imports: [QuickKeysDirective,
420
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: StoDirectivesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
421
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.6", ngImport: i0, type: StoDirectivesModule, imports: [QuickKeysDirective,
487
422
  DateFormFieldClickDirective,
488
423
  StoSelectTextOnFocusDirective,
489
424
  StoGridDirective,
@@ -498,9 +433,9 @@ class StoDirectivesModule {
498
433
  StoGridSpacerDirective,
499
434
  MenuOverlayDirective,
500
435
  ContextMenuDirective] }); }
501
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: StoDirectivesModule }); }
436
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: StoDirectivesModule }); }
502
437
  }
503
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: StoDirectivesModule, decorators: [{
438
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: StoDirectivesModule, decorators: [{
504
439
  type: NgModule,
505
440
  args: [{
506
441
  imports: [
@@ -549,10 +484,10 @@ class CurrencyFormatPipe {
549
484
  const intl = new Intl.NumberFormat('en-US', { maximumFractionDigits }).format(value);
550
485
  return intl.replace(/,/g, ' ').replace('.', ',') + ` ${unit}`;
551
486
  }
552
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: CurrencyFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
553
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.3", ngImport: i0, type: CurrencyFormatPipe, isStandalone: true, name: "currencyFormat" }); }
487
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: CurrencyFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
488
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.0.6", ngImport: i0, type: CurrencyFormatPipe, isStandalone: true, name: "currencyFormat" }); }
554
489
  }
555
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: CurrencyFormatPipe, decorators: [{
490
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: CurrencyFormatPipe, decorators: [{
556
491
  type: Pipe,
557
492
  args: [{
558
493
  name: 'currencyFormat',
@@ -600,10 +535,10 @@ class DateFormatPipe {
600
535
  return format(value, 'MMM d, yyyy');
601
536
  }
602
537
  }
603
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: DateFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
604
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.3", ngImport: i0, type: DateFormatPipe, isStandalone: true, name: "formatDate" }); }
538
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DateFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
539
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.0.6", ngImport: i0, type: DateFormatPipe, isStandalone: true, name: "formatDate" }); }
605
540
  }
606
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: DateFormatPipe, decorators: [{
541
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DateFormatPipe, decorators: [{
607
542
  type: Pipe,
608
543
  args: [{
609
544
  name: 'formatDate',
@@ -626,10 +561,10 @@ class KeysPipe {
626
561
  }
627
562
  return [];
628
563
  }
629
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: KeysPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
630
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.3", ngImport: i0, type: KeysPipe, isStandalone: true, name: "keys" }); }
564
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: KeysPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
565
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.0.6", ngImport: i0, type: KeysPipe, isStandalone: true, name: "keys" }); }
631
566
  }
632
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: KeysPipe, decorators: [{
567
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: KeysPipe, decorators: [{
633
568
  type: Pipe,
634
569
  args: [{
635
570
  name: 'keys',
@@ -674,15 +609,18 @@ class NumberFormatPipe {
674
609
  value = parseFloat(this.toFixed(value, numberOfDecimals));
675
610
  }
676
611
  // Turn negative numbers back, but only if value is not -0
677
- // eslint-disable-next-line no-compare-neg-zero
678
- if (isNegativeNumber && value !== -0) {
612
+ if (isNegativeNumber && value < 0) {
679
613
  value = value * -1;
680
614
  }
681
615
  const localized = this.prettyPrintValue(value, appendDecimals, numberOfDecimals);
682
- return localized.replace(/,/g, ' ').replace('.', ',') + `${unit ? ' ' + unit : ''}`;
616
+ return (localized.replace(/,/g, ' ').replace('.', ',') +
617
+ `${unit ? ' ' + unit : ''}`);
683
618
  }
684
619
  prettyPrintValue(value, appendDecimals, numberOfDecimals) {
685
- const intlOptions = { minimumFractionDigits: numberOfDecimals, maximumFractionDigits: numberOfDecimals };
620
+ const intlOptions = {
621
+ minimumFractionDigits: numberOfDecimals,
622
+ maximumFractionDigits: numberOfDecimals,
623
+ };
686
624
  const intl = new Intl.NumberFormat('en-US', intlOptions).format(value);
687
625
  const split = intl.split('.');
688
626
  let localized = split[0];
@@ -697,20 +635,22 @@ class NumberFormatPipe {
697
635
  toFixed(num, precision) {
698
636
  // This method also has some issues - namely, it's unable to parse negative numbers with huge floating points
699
637
  // -8.185452315956354e-12 becomes NaN
700
- let returnValue = (+(Math.round(+(num + 'e' + precision)) + 'e' + -precision));
638
+ let returnValue = +(Math.round(+(num + 'e' + precision)) +
639
+ 'e' +
640
+ -precision);
701
641
  if (isNaN(returnValue)) {
702
642
  returnValue = parseFloat(num.toFixed(precision));
703
643
  }
704
644
  return returnValue.toFixed(precision);
705
645
  }
706
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: NumberFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
707
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.3", ngImport: i0, type: NumberFormatPipe, isStandalone: true, name: "numberFormat" }); }
646
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: NumberFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
647
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.0.6", ngImport: i0, type: NumberFormatPipe, isStandalone: true, name: "numberFormat" }); }
708
648
  }
709
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: NumberFormatPipe, decorators: [{
649
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: NumberFormatPipe, decorators: [{
710
650
  type: Pipe,
711
651
  args: [{
712
652
  name: 'numberFormat',
713
- standalone: true
653
+ standalone: true,
714
654
  }]
715
655
  }] });
716
656
 
@@ -730,10 +670,10 @@ class GetUnit {
730
670
  }
731
671
  return value;
732
672
  }
733
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: GetUnit, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
734
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.3", ngImport: i0, type: GetUnit, isStandalone: true, name: "getUnit" }); }
673
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: GetUnit, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
674
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.0.6", ngImport: i0, type: GetUnit, isStandalone: true, name: "getUnit" }); }
735
675
  }
736
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: GetUnit, decorators: [{
676
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: GetUnit, decorators: [{
737
677
  type: Pipe,
738
678
  args: [{ name: 'getUnit', standalone: true }]
739
679
  }] });
@@ -747,10 +687,10 @@ class ExcludeUnit {
747
687
  }
748
688
  return value;
749
689
  }
750
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: ExcludeUnit, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
751
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.3", ngImport: i0, type: ExcludeUnit, isStandalone: true, name: "excludeUnit" }); }
690
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ExcludeUnit, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
691
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.0.6", ngImport: i0, type: ExcludeUnit, isStandalone: true, name: "excludeUnit" }); }
752
692
  }
753
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: ExcludeUnit, decorators: [{
693
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ExcludeUnit, decorators: [{
754
694
  type: Pipe,
755
695
  args: [{ name: 'excludeUnit', standalone: true }]
756
696
  }] });
@@ -766,17 +706,17 @@ class YesNoPipe {
766
706
  }
767
707
  return valueStr;
768
708
  }
769
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: YesNoPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
770
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.3", ngImport: i0, type: YesNoPipe, isStandalone: true, name: "yesNo" }); }
709
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: YesNoPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
710
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.0.6", ngImport: i0, type: YesNoPipe, isStandalone: true, name: "yesNo" }); }
771
711
  }
772
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: YesNoPipe, decorators: [{
712
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: YesNoPipe, decorators: [{
773
713
  type: Pipe,
774
714
  args: [{ name: 'yesNo', standalone: true }]
775
715
  }] });
776
716
 
777
717
  class StoPipesModule {
778
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: StoPipesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
779
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.3", ngImport: i0, type: StoPipesModule, imports: [DateFormatPipe,
718
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: StoPipesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
719
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.6", ngImport: i0, type: StoPipesModule, imports: [DateFormatPipe,
780
720
  KeysPipe,
781
721
  NumberFormatPipe,
782
722
  CurrencyFormatPipe,
@@ -789,9 +729,9 @@ class StoPipesModule {
789
729
  GetUnit,
790
730
  ExcludeUnit,
791
731
  YesNoPipe] }); }
792
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: StoPipesModule }); }
732
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: StoPipesModule }); }
793
733
  }
794
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: StoPipesModule, decorators: [{
734
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: StoPipesModule, decorators: [{
795
735
  type: NgModule,
796
736
  args: [{
797
737
  imports: [