@leanix/components 0.4.407 → 0.4.408

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 (35) hide show
  1. package/esm2022/lib/core-ui/components/badge/badge.component.mjs +21 -1
  2. package/esm2022/lib/core-ui/components/banner/banner.component.mjs +23 -1
  3. package/esm2022/lib/core-ui/components/button/button.component.mjs +40 -1
  4. package/esm2022/lib/core-ui/components/card/card.component.mjs +16 -1
  5. package/esm2022/lib/core-ui/components/content-panel/content-panel.component.mjs +18 -3
  6. package/esm2022/lib/core-ui/components/counter/counter.component.mjs +14 -1
  7. package/esm2022/lib/core-ui/components/integration-link-card/integration-link-card.component.mjs +47 -1
  8. package/esm2022/lib/core-ui/components/skeleton/skeleton.component.mjs +19 -1
  9. package/esm2022/lib/core-ui/components/stepper/stepper.component.mjs +41 -1
  10. package/esm2022/lib/core-ui/components/tiny-spinner/tiny-spinner.component.mjs +12 -1
  11. package/esm2022/lib/core-ui/tooltip/tooltip.directive.mjs +16 -1
  12. package/esm2022/lib/forms-ui/components/breadcrumb/breadcrumb.component.mjs +17 -1
  13. package/esm2022/lib/forms-ui/components/date-input/date-input.component.mjs +100 -38
  14. package/esm2022/lib/forms-ui/components/slider-toggle/slider-toggle.component.mjs +18 -1
  15. package/esm2022/lib/modal-ui/components/modal/modal.component.mjs +55 -7
  16. package/esm2022/lib/popover-ui/components/popover/popover.component.mjs +31 -6
  17. package/fesm2022/leanix-components.mjs +471 -49
  18. package/fesm2022/leanix-components.mjs.map +1 -1
  19. package/lib/core-ui/components/badge/badge.component.d.ts +23 -0
  20. package/lib/core-ui/components/banner/banner.component.d.ts +22 -0
  21. package/lib/core-ui/components/button/button.component.d.ts +39 -0
  22. package/lib/core-ui/components/card/card.component.d.ts +15 -0
  23. package/lib/core-ui/components/content-panel/content-panel.component.d.ts +18 -1
  24. package/lib/core-ui/components/counter/counter.component.d.ts +14 -0
  25. package/lib/core-ui/components/integration-link-card/integration-link-card.component.d.ts +60 -0
  26. package/lib/core-ui/components/skeleton/skeleton.component.d.ts +18 -0
  27. package/lib/core-ui/components/stepper/stepper.component.d.ts +40 -0
  28. package/lib/core-ui/components/tiny-spinner/tiny-spinner.component.d.ts +11 -0
  29. package/lib/core-ui/tooltip/tooltip.directive.d.ts +17 -0
  30. package/lib/forms-ui/components/breadcrumb/breadcrumb.component.d.ts +16 -0
  31. package/lib/forms-ui/components/date-input/date-input.component.d.ts +80 -7
  32. package/lib/forms-ui/components/slider-toggle/slider-toggle.component.d.ts +20 -0
  33. package/lib/modal-ui/components/modal/modal.component.d.ts +59 -5
  34. package/lib/popover-ui/components/popover/popover.component.d.ts +37 -5
  35. package/package.json +1 -1
@@ -50,11 +50,31 @@ const DATE_FN_LOCALE = new InjectionToken('DATE_FN_LOCALE');
50
50
  const LOCALE_FN = new InjectionToken('LOCALE_FN');
51
51
  const GLOBAL_TRANSLATION_OPTIONS = new InjectionToken('GLOBAL_TRANSLATION_OPTIONS');
52
52
 
53
+ /**
54
+ * Badge component is used to show a small piece of information in a colored badge.
55
+ *
56
+ * ## Usage
57
+ *
58
+ * 1. Import the `LxCoreUiModule` module from `@leanix/components` in your module where you want to use the component.
59
+ *
60
+ * ```ts
61
+ * import { LxCoreUiModule } from '@leanix/components';
62
+ * ```
63
+ */
53
64
  class BadgeComponent {
54
65
  constructor() {
66
+ /**
67
+ * The color of the badge component
68
+ */
55
69
  this.color = 'blue';
70
+ /**
71
+ * If set to true, the badge will create a color for itself based on the content, ignoring other color settings.
72
+ * This could be useful if we want to show a range of different colors for different contents.
73
+ */
56
74
  this.calculateColorsDynamically = false;
75
+ /** @internal */
57
76
  this.textColor = '';
77
+ /** @internal */
58
78
  this.backGroundColor = '';
59
79
  }
60
80
  ngOnInit() {
@@ -106,13 +126,31 @@ const BANNER_SIZE = {
106
126
  SMALL: 'small'
107
127
  };
108
128
 
129
+ /**
130
+ * Banner can be used to display important information to the user. It allows for any type of content to be displayed in a banner.
131
+ *
132
+ * ## Usage
133
+ *
134
+ * 1. Import the `LxCoreUiModule` module from `@leanix/components` in your module where you want to use the component.
135
+ *
136
+ * ```ts
137
+ * import { LxCoreUiModule } from '@leanix/components';
138
+ * ```
139
+ *
140
+ * 2. Use the component in your template.
141
+ */
109
142
  class BannerComponent {
110
143
  constructor() {
111
144
  this._type = signal(BANNER_TYPE.WARNING);
112
145
  this._size = signal(BANNER_SIZE.BIG);
146
+ /** @internal */
113
147
  this.showIcon = signal(false);
148
+ /** @internal */
114
149
  this.iconClass = signal('');
115
150
  }
151
+ /**
152
+ * The type of the banner
153
+ */
116
154
  set type(type) {
117
155
  this._type.set(type);
118
156
  this.iconClass.set(this.getIconClass(type));
@@ -120,6 +158,9 @@ class BannerComponent {
120
158
  get type() {
121
159
  return this._type();
122
160
  }
161
+ /**
162
+ * The size of the banner
163
+ */
123
164
  set size(size) {
124
165
  this._size.set(size);
125
166
  this.showIcon.set(size === BANNER_SIZE.BIG);
@@ -130,6 +171,7 @@ class BannerComponent {
130
171
  ngOnInit() {
131
172
  this.showIcon.set(this.size === BANNER_SIZE.BIG);
132
173
  }
174
+ /** @internal */
133
175
  getIconClass(type) {
134
176
  switch (type) {
135
177
  case BANNER_TYPE.SUCCESS:
@@ -185,6 +227,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
185
227
  args: ['class.borderSeparator']
186
228
  }] } });
187
229
 
230
+ /**
231
+ * Tiny spinner component is used to show a small spinner.
232
+ *
233
+ * ## Usage
234
+ *
235
+ * 1. Import the `TinySpinnerComponent` component from `@leanix/components` in your module or standalone copmonent where you want to use the component.
236
+ *
237
+ * ```ts
238
+ * import { TinySpinnerComponent } from '@leanix/components';
239
+ * ```
240
+ */
188
241
  class TinySpinnerComponent {
189
242
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: TinySpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
190
243
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.8", type: TinySpinnerComponent, isStandalone: true, selector: "lx-tiny-spinner", ngImport: i0, template: "<i class=\"far fa-spinner fa-spin fa-fw\"></i>\n" }); }
@@ -194,16 +247,55 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
194
247
  args: [{ selector: 'lx-tiny-spinner', standalone: true, template: "<i class=\"far fa-spinner fa-spin fa-fw\"></i>\n" }]
195
248
  }] });
196
249
 
250
+ /**
251
+ * Button component is used to create a button with different styles and sizes. This uses native button element and
252
+ * only provides styling and some additional features like loading spinner.
253
+ *
254
+ * ## Usage
255
+ *
256
+ * 1. Import the `LxCoreUiModule` module from `@leanix/components` in your module where you want to use the component.
257
+ *
258
+ * ```ts
259
+ * import { LxCoreUiModule } from '@leanix/components';
260
+ * ```
261
+ */
197
262
  class ButtonComponent {
198
263
  constructor() {
264
+ /**
265
+ * The size of the button.
266
+ */
199
267
  this.size = 'medium';
268
+ /**
269
+ * The color of the button.
270
+ */
200
271
  this.color = 'default';
272
+ /**
273
+ * The mode of the button.
274
+ */
201
275
  this.mode = 'solid';
276
+ /**
277
+ * The pressed state of the button. This simulates the `:active` state of the button.
278
+ */
202
279
  this.pressed = false;
280
+ /**
281
+ * The selected state of the button. This simulates the `:hover` state of the button.
282
+ */
203
283
  this.selected = false;
284
+ /**
285
+ * This makes the button square.
286
+ */
204
287
  this.square = false;
288
+ /**
289
+ * This makes corners rounded. Use with `square` for a true circle.
290
+ */
205
291
  this.circle = false;
292
+ /**
293
+ * This disables the button.
294
+ */
206
295
  this.disabled = false;
296
+ /**
297
+ * This shows a spinner inside the button.
298
+ */
207
299
  this.showSpinner = false;
208
300
  }
209
301
  get isDisabled() {
@@ -262,8 +354,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
262
354
  args: ['disabled']
263
355
  }] } });
264
356
 
357
+ /**
358
+ * Card component is a container component that can be used to display content in a card-like style.
359
+ * This documentation provides details on the usage and configuration of the Card Component.
360
+ *
361
+ * ## Usage
362
+ *
363
+ * 1. Import the `LxCoreUiModule` module from `@leanix/components` in your module where you want to use the component.
364
+ *
365
+ * ```ts
366
+ * import { LxCoreUiModule } from '@leanix/components';
367
+ * ```
368
+ */
265
369
  class CardComponent {
266
370
  constructor() {
371
+ /**
372
+ * The style of the card.
373
+ */
267
374
  this.dataStyle = 'white';
268
375
  }
269
376
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: CardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
@@ -328,9 +435,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
328
435
  args: ['click', ['$event']]
329
436
  }] } });
330
437
 
438
+ /**
439
+ * Counter component is used to create a counter with different styles and sizes.
440
+ *
441
+ * ## Usage
442
+ *
443
+ * 1. Import the `CounterComponent` component from `@leanix/components` in your module or standalone copmonent where you want to use the component.
444
+ *
445
+ * ```ts
446
+ * import { CounterComponent } from '@leanix/components';
447
+ * ```
448
+ */
331
449
  class CounterComponent {
332
450
  constructor() {
451
+ /** The size of the counter. */
333
452
  this.size = 'default';
453
+ /** The color of the counter. */
334
454
  this.color = 'primary';
335
455
  }
336
456
  get classes() {
@@ -804,7 +924,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
804
924
  type: Input
805
925
  }] } });
806
926
 
927
+ /**
928
+ * Tooltip directive is used to show a tooltip on hover or focus on an element.
929
+ *
930
+ * ## Usage
931
+ *
932
+ * 1. Import the `TooltipDirective` component from `@leanix/components` in your module or standalone copmonent where you want to use the component.
933
+ *
934
+ * ```ts
935
+ * import { TooltipDirective } from '@leanix/components';
936
+ * ```
937
+ */
807
938
  class TooltipDirective {
939
+ /** The position of the tooltip. */
808
940
  set lxTooltipPosition(value) {
809
941
  this.position = {
810
942
  x: value && isValidX(value.x) ? value.x : 'center',
@@ -823,6 +955,7 @@ class TooltipDirective {
823
955
  x: 'center',
824
956
  y: 'top'
825
957
  };
958
+ /** Whether the tooltip content is HTML. */
826
959
  this.lxTooltipIsHtmlContent = false;
827
960
  this.mouseOrFocusOnHost = false;
828
961
  }
@@ -848,6 +981,7 @@ class TooltipDirective {
848
981
  }
849
982
  }
850
983
  }
984
+ /** @internal */
851
985
  show() {
852
986
  this.mouseOrFocusOnHost = true;
853
987
  setTimeout(() => {
@@ -866,6 +1000,7 @@ class TooltipDirective {
866
1000
  this.mouseOrFocusOnHost = false;
867
1001
  this.overlayRef?.dispose();
868
1002
  }
1003
+ /** @internal */
869
1004
  hide() {
870
1005
  this.mouseOrFocusOnHost = false;
871
1006
  this.ariaDescriber.removeDescription(this.elementRef.nativeElement, this.tooltipRef?.location.nativeElement);
@@ -906,15 +1041,61 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
906
1041
  args: ['blur']
907
1042
  }] } });
908
1043
 
1044
+ /**
1045
+ * Integration Link Card Component is a card component that displays information about an integration link.
1046
+ *
1047
+ * This documentation provides details on the usage and configuration of the Integration Link Card Component.
1048
+ *
1049
+ * ## Usage
1050
+ *
1051
+ * 1. Import `LxCoreUiModule` module from `@leanix/components` in your module where you want to use the component, or in case of a standalone parent component, import the
1052
+ * `IntegrationLinkCardComponent` directly into your standalone component.
1053
+ *
1054
+ * - Module import:
1055
+ *
1056
+ * ```ts
1057
+ * import { LxCoreUiModule } from '@leanix/components';
1058
+ * ```
1059
+ *
1060
+ * - Standalone component import:
1061
+ *
1062
+ * ```ts
1063
+ * import { IntegrationLinkCardComponent } from '@leanix/components';
1064
+ *
1065
+ * @Component({
1066
+ * selector: 'lx-my-component',
1067
+ * standalone: true,
1068
+ * imports: [IntegrationLinkCardComponent],
1069
+ * templateUrl: './my-component.component.html'
1070
+ * })
1071
+ * export class MyComponent {}
1072
+ * ```
1073
+ *
1074
+ * ## Usage
1075
+ *
1076
+ * #### Required Inputs:
1077
+ *
1078
+ * - `sourceIconClasses` (`string`) - font awesome classes for source icon;
1079
+ * - `sourceName` (`string`) - the name of the source associated with the integration card;
1080
+ * - `title` (`string`) - the main title of the integration card.
1081
+ */
909
1082
  class IntegrationLinkCardComponent {
910
1083
  constructor() {
1084
+ /**
1085
+ * Determines if the integration is in an inactive state
1086
+ * When set to true, the card will display in an inactive state
1087
+ * */
911
1088
  this.isInactive = false;
1089
+ /** Event emitted when the action button is clicked */
912
1090
  this.actionButtonClicked = new EventEmitter();
1091
+ /** Event emitted when the link is clicked */
913
1092
  this.linkClicked = new EventEmitter();
914
1093
  }
1094
+ /** @internal */
915
1095
  onActionButtonClicked() {
916
1096
  this.actionButtonClicked.emit();
917
1097
  }
1098
+ /** @internal */
918
1099
  onLinkClicked(event) {
919
1100
  this.linkClicked.emit(event);
920
1101
  }
@@ -990,19 +1171,59 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
990
1171
  type: Input
991
1172
  }] } });
992
1173
 
1174
+ /**
1175
+ * Stepper component is a wrapper around the Angular CDK Stepper component. It provides a way to create a linear
1176
+ * sequence of steps that guide users through a process.
1177
+ *
1178
+ * ## Usage
1179
+ *
1180
+ * 1. Import `LxCoreUiModule` module from `@leanix/components` and `CdkStepperModule` module from `@angular/cdk/stepper` in your module where you want to use the component, or in case of a standalone parent component, import the
1181
+ * `StepperComponent` and `CdkStepperModule` directly into your standalone component.
1182
+ *
1183
+ * - Module import:
1184
+ *
1185
+ * ```ts
1186
+ * import { LxCoreUiModule } from '@leanix/components';
1187
+ * import { CdkStepperModule } from '@angular/cdk/stepper';
1188
+ * ```
1189
+ *
1190
+ * - Standalone component import:
1191
+ *
1192
+ * ```ts
1193
+ * import { StepperComponent } from '@leanix/components';
1194
+ * import { CdkStepperModule } from '@angular/cdk/stepper';
1195
+ *
1196
+ * @Component({
1197
+ * selector: 'lx-my-component',
1198
+ * standalone: true,
1199
+ * imports: [CdkStepperModule, StepperComponent],
1200
+ * templateUrl: './my-component.component.html'
1201
+ * })
1202
+ * export class MyComponent {}
1203
+ * ```
1204
+ *
1205
+ * 2. Use the component in your template. All steps added to the stepper should be wrapped in a `cdk-step` element.
1206
+ *
1207
+ * Since this component extends the Angular CDK `CdkStepper` component, all the inputs, outputs, and methods available in the
1208
+ * `CdkStepper` component are also available in the `StepperComponent` and are documented in the
1209
+ * [Angular CDK documentation](https://material.angular.io/cdk/stepper/api).
1210
+ */
993
1211
  class StepperComponent extends CdkStepper {
994
1212
  // TODO - Remove this constructor once the following issue is resolved: https://github.com/storybookjs/storybook/issues/23534#issuecomment-2042888436
995
1213
  // Storybook smoke tests for stepper component are failing without this constructor
996
1214
  constructor(_dir, _changeDetectorRef, _elementRef) {
997
1215
  super(_dir, _changeDetectorRef, _elementRef);
1216
+ /** @internal */
998
1217
  this.size = 'normal';
999
1218
  }
1000
1219
  get isSmallVariant() {
1001
1220
  return this.size === 'small';
1002
1221
  }
1222
+ /** @internal */
1003
1223
  isCompleted(index) {
1004
1224
  return index < this.selectedIndex;
1005
1225
  }
1226
+ /** @internal */
1006
1227
  isActiveStep(index) {
1007
1228
  return index === this.selectedIndex;
1008
1229
  }
@@ -2164,14 +2385,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
2164
2385
  }]
2165
2386
  }] });
2166
2387
 
2388
+ /**
2389
+ * A content panel component is used to show a panel with a title and content.
2390
+ *
2391
+ * ## Usage
2392
+ *
2393
+ * 1. Import the `ContentPanelComponent` component from `@leanix/components` in your module or standalone copmonent where you want to use the component.
2394
+ *
2395
+ * ```ts
2396
+ * import { ContentPanelComponent } from '@leanix/components';
2397
+ * ```
2398
+ */
2167
2399
  class ContentPanelComponent {
2168
2400
  constructor() {
2169
- this.baseClass = 'contentPanel';
2401
+ /** Event emitted when the close button is clicked */
2170
2402
  this.contentPanelClose = new EventEmitter();
2403
+ /** @internal */
2404
+ this.baseClass = 'contentPanel';
2171
2405
  }
2406
+ /** @internal */
2172
2407
  onClose() {
2173
2408
  this.contentPanelClose.emit();
2174
2409
  }
2410
+ /** @internal */
2175
2411
  scrollToTop() {
2176
2412
  this.body.nativeElement.scrollTo({ top: 0, behavior: 'smooth' });
2177
2413
  }
@@ -2190,6 +2426,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
2190
2426
  args: ['body']
2191
2427
  }] } });
2192
2428
 
2429
+ /**
2430
+ * Skeleton is a component that can be used to show a loading state of a component.
2431
+ *
2432
+ * ## Usage
2433
+ *
2434
+ * 1. Import the `SkeletonComponent` component from `@leanix/components` in your module or standalone copmonent where you want to use the component.
2435
+ *
2436
+ * ```ts
2437
+ * import { SkeletonComponent } from '@leanix/components';
2438
+ * ```
2439
+ *
2440
+ * Use skeleton loaders for pages or sections that load content progressively, like text and images. The component can
2441
+ * be used to compose various scenarios like placeholders for thumbnails, lists, and avatars. See the example
2442
+ * [patterns](?path=/docs/skeleton-patterns--docs) for more details.
2443
+ *
2444
+ * To get started, import the `SkeletonComponent` in your Angular module or standalone component and use it in the
2445
+ * template using the `<lx-skeleton />` selector with the desired width, height, and border radius.
2446
+ */
2193
2447
  class SkeletonComponent {
2194
2448
  constructor() {
2195
2449
  /**
@@ -3142,9 +3396,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
3142
3396
  args: [TooltipDirective, { descendants: true }]
3143
3397
  }] } });
3144
3398
 
3399
+ /**
3400
+ * Breadcrumb component is used to show a list of labels, usually to show the path of user's navigation.
3401
+ *
3402
+ * ## Usage
3403
+ *
3404
+ * 1. Import the LxFormsModule module from @leanix/components in your module where you want to use the component.
3405
+ *
3406
+ * ```ts
3407
+ * import { LxFormsModule } from '@leanix/components';
3408
+ * ```
3409
+ */
3145
3410
  class BreadcrumbComponent {
3146
3411
  constructor() {
3412
+ /**
3413
+ * Breadcrumbs array to build the component.
3414
+ */
3147
3415
  this.breadcrumbs = [];
3416
+ /** @internal */
3148
3417
  this.viewBreadcrumbs = [];
3149
3418
  }
3150
3419
  ngOnChanges(changes) {
@@ -3170,6 +3439,7 @@ class BreadcrumbComponent {
3170
3439
  }, []);
3171
3440
  }
3172
3441
  }
3442
+ /** @internal */
3173
3443
  isEllipsedBreadcrumb(breadcrumb) {
3174
3444
  return !!breadcrumb.breadcrumbs;
3175
3445
  }
@@ -4778,46 +5048,89 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
4778
5048
 
4779
5049
  const DEFAULT_MIN_DATE = new Date('0000-01-01');
4780
5050
  const DEFAULT_MAX_DATE = new Date('9999-12-31');
5051
+ /**
5052
+ * This is a date input component that can be used to select a date.
5053
+ *
5054
+ * ## Usage
5055
+ *
5056
+ * 1. Import the `LxFormsUiModule` module from `@leanix/components` in your module where you want to use the component.
5057
+ *
5058
+ * ```ts
5059
+ * import { LxFormsUiModule } from '@leanix/components';
5060
+ * ```
5061
+ */
4781
5062
  class DateInputComponent {
4782
5063
  constructor(cd, dateFormatsProvider, getDateFnLocale) {
4783
5064
  this.cd = cd;
4784
5065
  this.dateFormatsProvider = dateFormatsProvider;
4785
5066
  this.getDateFnLocale = getDateFnLocale;
4786
- this.date = null; // main date input; this is also the one used for ngModel & formControl!
4787
- this.dateChange = new EventEmitter(); // triggered whenever the date changes
4788
- this.dateString = null; // secondary, alternative input with date string
4789
- this.dateStringChange = new EventEmitter(); // triggered whenever the date changes
4790
- // Determine whether formGroup's value accessor is accessing the selected IDs or the selected objects
5067
+ /** The initial date value for the date input field. This is used for `ngModel` and `formControl`. */
5068
+ this.date = null;
5069
+ /** Secondary, alternative input with date string */
5070
+ this.dateString = null;
5071
+ /** Determine whether formGroup's value accessor is accessing the selected IDs or the selected objects */
4791
5072
  this.valueAccessor = 'date';
4792
- this.inputId = ''; // id to be set on input to correspond to outside label
5073
+ /** ID to be set on input to correspond to outside label */
5074
+ this.inputId = '';
5075
+ /** The rendering style of the date input component. Can be one of "LINK", "BUTTON", or "INPUT". */
4793
5076
  this.renderingStyle = 'INPUT';
5077
+ /** The placeholder text to show in the date input field when there is no date selected */
4794
5078
  this.placeholder = 'yyyy-mm-dd';
4795
- this.cdk = true; // Deactivate to use old date picker
4796
- //--- Inputs replicated from datepicker; (selectionDone) is not needed, as (dateChange) is equivalen
4797
- this.datepickerMode = 'day'; // sets datepicker mode, supports: day, month, year
4798
- this.minDate = DEFAULT_MIN_DATE; // oldest selectable date
4799
- this.maxDate = DEFAULT_MAX_DATE; // latest selectable date
4800
- this.minMode = 'day'; // set lower datepicker mode, supports: day, month, year
4801
- this.maxMode = 'year'; // sets upper datepicker mode, supports: day, month, year
4802
- this.showWeeks = true; // if false week numbers will be hidden
4803
- this.formatDay = 'DD'; // format of day in month
4804
- this.formatMonth = 'MMMM'; // format of month in year
4805
- this.formatYear = 'YYYY'; // format of year in year range
4806
- this.formatDayHeader = 'dd'; // format of day in week header
4807
- this.formatDayTitle = 'MMMM YYYY'; // format of title when selecting day
4808
- this.formatMonthTitle = 'YYYY'; // format of title when selecting month
4809
- this.startingDay = 0; // starting day of the week from 0-6 (0=Sunday, ..., 6=Saturday) public
4810
- this.yearRange = 20; // number of years displayed in year selection
4811
- this.onlyCurrentMonth = false; // if true only dates from the currently displayed month will be shown
4812
- this.shortcutPropagation = false; // if true shortcut`s event propagation will be disabled
4813
- this.customClass = []; // array of custom css classes to be applied to
4814
- this.dateDisabled = []; // array of disabled dates if mode is day, or years, etc.
5079
+ /** Deactivate to use old date picker */
5080
+ this.cdk = true;
5081
+ /** Sets datepicker mode, supports: day, month, year */
5082
+ this.datepickerMode = 'day';
5083
+ /** Oldest selectable date */
5084
+ this.minDate = DEFAULT_MIN_DATE;
5085
+ /** Latest selectable date */
5086
+ this.maxDate = DEFAULT_MAX_DATE;
5087
+ /** Set lower datepicker mode, supports: day, month, year */
5088
+ this.minMode = 'day';
5089
+ /** Sets upper datepicker mode, supports: day, month, year */
5090
+ this.maxMode = 'year';
5091
+ /** If false week numbers will be hidden */
5092
+ this.showWeeks = true;
5093
+ /** Format of day in month */
5094
+ this.formatDay = 'DD';
5095
+ /** Format of month in year */
5096
+ this.formatMonth = 'MMMM';
5097
+ /** Format of year in year range */
5098
+ this.formatYear = 'YYYY';
5099
+ /** Format of day in week header */
5100
+ this.formatDayHeader = 'dd';
5101
+ /** Format of title when selecting day */
5102
+ this.formatDayTitle = 'MMMM YYYY';
5103
+ /** Format of title when selecting month */
5104
+ this.formatMonthTitle = 'YYYY';
5105
+ /** Starting day of the week from 0-6 (0=Sunday, ..., 6=Saturday) public */
5106
+ this.startingDay = 0;
5107
+ /** Number of years displayed in year selection */
5108
+ this.yearRange = 20;
5109
+ /** If true only dates from the currently displayed month will be shown */
5110
+ this.onlyCurrentMonth = false;
5111
+ /** If true shortcut`s event propagation will be disabled */
5112
+ this.shortcutPropagation = false;
5113
+ /** Array of custom css classes to be applied to */
5114
+ this.customClass = [];
5115
+ /** Array of disabled dates if mode is day, or years, etc. */
5116
+ this.dateDisabled = [];
5117
+ /** If true, the date input field will be auto-focused when the component is first rendered. */
4815
5118
  this.autoFocus = false;
5119
+ /** If true, the date input field will be marked as invalid. */
4816
5120
  this.markInvalid = false;
5121
+ /** Triggered whenever the datepicker is closed */
4817
5122
  this.closeDateInput = new EventEmitter();
5123
+ /** Triggered whenever the date changes */
5124
+ this.dateStringChange = new EventEmitter();
5125
+ /** Triggered whenever the date changes. */
5126
+ this.dateChange = new EventEmitter();
5127
+ /** @internal */
4818
5128
  this.showDatepicker = false;
5129
+ /** @internal */
4819
5130
  this.destroyed$ = new Subject();
5131
+ /** @internal */
4820
5132
  this.hasError = false;
5133
+ /** @internal */
4821
5134
  this.propagateChange = (_date) => { };
4822
5135
  this.dateFormat = this.dateFormatsProvider.getDateFormat();
4823
5136
  // Patch DatePicker until https://github.com/valor-software/ng2-bootstrap/issues/1385 is resolved
@@ -4835,11 +5148,13 @@ class DateInputComponent {
4835
5148
  return format(date, f, { locale });
4836
5149
  };
4837
5150
  }
5151
+ /** @internal */
4838
5152
  ngOnInit() {
4839
5153
  this.initDateString$.pipe(takeUntil(this.destroyed$)).subscribe((date) => {
4840
5154
  this.initDate = createDateFromDateString(date) ?? startOfDay(new Date());
4841
5155
  });
4842
5156
  }
5157
+ /** @internal */
4843
5158
  ngOnChanges(changes) {
4844
5159
  if (changes['date']) {
4845
5160
  this.dateString = this.date ? convertDateToLocaleDateString(this.date) : null;
@@ -4848,25 +5163,31 @@ class DateInputComponent {
4848
5163
  this.onDateStringChange(this.dateString, false);
4849
5164
  }
4850
5165
  }
5166
+ /** @internal */
4851
5167
  ngOnDestroy() {
4852
5168
  this.destroyed$.next();
4853
5169
  }
5170
+ /** @internal */
4854
5171
  focus() {
4855
5172
  this.input.nativeElement.focus();
4856
5173
  }
5174
+ /** @internal */
4857
5175
  showPopup() {
4858
5176
  this.showDatepicker = true;
4859
5177
  this.cd.detectChanges();
4860
5178
  }
5179
+ /** @internal */
4861
5180
  togglePopup() {
4862
5181
  this.showDatepicker = !this.showDatepicker;
4863
5182
  }
5183
+ /** @internal */
4864
5184
  hidePopup() {
4865
5185
  if (this.showDatepicker) {
4866
5186
  this.showDatepicker = false;
4867
5187
  this.closeDateInput.emit();
4868
5188
  }
4869
5189
  }
5190
+ /** @internal */
4870
5191
  onDateStringChange(newDateString, emit = true) {
4871
5192
  if (isValidDateString(newDateString)) {
4872
5193
  const date = createDateFromDateString(newDateString);
@@ -4882,10 +5203,12 @@ class DateInputComponent {
4882
5203
  }
4883
5204
  }
4884
5205
  }
5206
+ /** @internal */
4885
5207
  onSelectionDone(newDate) {
4886
5208
  this.updateDate(newDate);
4887
5209
  this.hidePopup();
4888
5210
  }
5211
+ /** @internal */
4889
5212
  onBlur() {
4890
5213
  if (this.onTouched) {
4891
5214
  this.onTouched();
@@ -4907,8 +5230,10 @@ class DateInputComponent {
4907
5230
  this.formControl.updateValueAndValidity();
4908
5231
  }
4909
5232
  }
4910
- //--- Implement ControlValueAccessor
4911
- /** Write a new value to the element. */
5233
+ /**
5234
+ * Write a new value to the element.
5235
+ * @internal
5236
+ */
4912
5237
  writeValue(newDate) {
4913
5238
  if (this.valueAccessor === 'date') {
4914
5239
  this.date = newDate;
@@ -4919,7 +5244,10 @@ class DateInputComponent {
4919
5244
  this.onDateStringChange(this.dateString, false);
4920
5245
  }
4921
5246
  }
4922
- /** Set the function to be called when the control receives a change event. */
5247
+ /**
5248
+ * Set the function to be called when the control receives a change event.
5249
+ * @internal
5250
+ */
4923
5251
  registerOnChange(fn) {
4924
5252
  if (this.valueAccessor === 'date') {
4925
5253
  this.dateChange.pipe(takeUntil(this.destroyed$)).subscribe(fn);
@@ -4928,10 +5256,14 @@ class DateInputComponent {
4928
5256
  this.dateStringChange.pipe(takeUntil(this.destroyed$)).subscribe(fn);
4929
5257
  }
4930
5258
  }
4931
- /** Set the function to be called when the control receives a touch event. */
5259
+ /**
5260
+ * Set the function to be called when the control receives a touch event.
5261
+ * @internal
5262
+ */
4932
5263
  registerOnTouched(fn) {
4933
5264
  this.onTouched = fn;
4934
5265
  }
5266
+ /** @internal */
4935
5267
  validate(c) {
4936
5268
  this.formControl = c;
4937
5269
  return this.hasError
@@ -4944,7 +5276,7 @@ class DateInputComponent {
4944
5276
  : null;
4945
5277
  }
4946
5278
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: DateInputComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: DATE_FORMATS }, { token: DATE_FN_LOCALE, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
4947
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.8", type: DateInputComponent, isStandalone: true, selector: "lx-date-input", inputs: { date: "date", dateString: "dateString", valueAccessor: "valueAccessor", inputId: "inputId", renderingStyle: "renderingStyle", placeholder: "placeholder", cdk: "cdk", datepickerMode: "datepickerMode", initDateString: "initDateString", minDate: "minDate", maxDate: "maxDate", minMode: "minMode", maxMode: "maxMode", showWeeks: "showWeeks", formatDay: "formatDay", formatMonth: "formatMonth", formatYear: "formatYear", formatDayHeader: "formatDayHeader", formatDayTitle: "formatDayTitle", formatMonthTitle: "formatMonthTitle", startingDay: "startingDay", yearRange: "yearRange", onlyCurrentMonth: "onlyCurrentMonth", shortcutPropagation: "shortcutPropagation", customClass: "customClass", disabled: "disabled", dateDisabled: "dateDisabled", autoFocus: "autoFocus", markInvalid: "markInvalid" }, outputs: { dateChange: "dateChange", dateStringChange: "dateStringChange", closeDateInput: "closeDateInput" }, providers: [
5279
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.8", type: DateInputComponent, isStandalone: true, selector: "lx-date-input", inputs: { date: "date", dateString: "dateString", valueAccessor: "valueAccessor", inputId: "inputId", renderingStyle: "renderingStyle", placeholder: "placeholder", cdk: "cdk", datepickerMode: "datepickerMode", initDateString: "initDateString", minDate: "minDate", maxDate: "maxDate", minMode: "minMode", maxMode: "maxMode", showWeeks: "showWeeks", formatDay: "formatDay", formatMonth: "formatMonth", formatYear: "formatYear", formatDayHeader: "formatDayHeader", formatDayTitle: "formatDayTitle", formatMonthTitle: "formatMonthTitle", startingDay: "startingDay", yearRange: "yearRange", onlyCurrentMonth: "onlyCurrentMonth", shortcutPropagation: "shortcutPropagation", customClass: "customClass", disabled: "disabled", dateDisabled: "dateDisabled", autoFocus: "autoFocus", markInvalid: "markInvalid" }, outputs: { closeDateInput: "closeDateInput", dateStringChange: "dateStringChange", dateChange: "dateChange" }, providers: [
4948
5280
  { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DateInputComponent), multi: true },
4949
5281
  { provide: NG_VALIDATORS, useExisting: forwardRef(() => DateInputComponent), multi: true }
4950
5282
  ], queries: [{ propertyName: "dateStringTemplate", first: true, predicate: ["dateStringTemplate"], descendants: true, read: TemplateRef, static: true }], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"cdk; else withoutCdkOverlay\">\n <span\n class=\"wrapper\"\n [class.forLink]=\"renderingStyle === 'LINK'\"\n [class.has-error]=\"hasError\"\n cdkOverlayOrigin\n #origin=\"cdkOverlayOrigin\"\n >\n <!-- TODO: The dateInput and datePicker code ist duplicated for cdk and withoutCdK use to solve a placing problem of the\n ngx-bootstrap datepicker component. Writing it in a ng-container led to an unexpected anchoring behavior of the datePicker NOT directly\n below the dateInput element -->\n @switch (renderingStyle) {\n @case ('BUTTON') {\n <button lx-button (click)=\"showPopup()\" lxAutoclose (autoclose)=\"hidePopup()\" size=\"large\">\n @if (dateStringTemplate) {\n <ng-container *ngTemplateOutlet=\"dateStringTemplate\" />\n } @else {\n {{ dateString ?? placeholder }}\n }\n <i class=\"far fa-angle-down lx-margin-left\"></i>\n </button>\n }\n @case ('INPUT') {\n <input\n #input\n class=\"form-control dateControl\"\n placeholder=\"{{ placeholder }}\"\n [id]=\"inputId\"\n [lxAutofocus]=\"autoFocus\"\n [(ngModel)]=\"dateString\"\n [disabled]=\"disabled\"\n [lxMarkInvalid]=\"markInvalid\"\n (ngModelChange)=\"onDateStringChange($event)\"\n (focus)=\"showPopup()\"\n (blur)=\"onBlur()\"\n (keydown.enter)=\"hidePopup()\"\n (keydown.escape)=\"hidePopup()\"\n (keydown.tab)=\"hidePopup()\"\n (keydown.shift.tab)=\"hidePopup()\"\n [class.text-danger]=\"hasError\"\n />\n }\n @case ('LINK') {\n <a class=\"dateControl\" (click)=\"togglePopup()\">{{ date | lxDate: dateFormat }}</a>\n }\n }\n\n <ng-template\n #cdkDatepicker\n cdkConnectedOverlay\n [cdkConnectedOverlayOpen]=\"showDatepicker\"\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n [cdkConnectedOverlayBackdropClass]=\"'backdrop'\"\n (backdropClick)=\"hidePopup()\"\n >\n <div class=\"datepickerContainer\">\n <div class=\"calendar\">\n <datepicker\n class=\"popup\"\n (selectionDone)=\"onSelectionDone($event)\"\n [ngModel]=\"date\"\n [datepickerMode]=\"datepickerMode\"\n [initDate]=\"initDate\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [minMode]=\"minMode\"\n [maxMode]=\"maxMode\"\n [showWeeks]=\"showWeeks\"\n [formatDay]=\"formatDay\"\n [formatMonth]=\"formatMonth\"\n [formatYear]=\"formatYear\"\n [formatDayHeader]=\"formatDayHeader\"\n [formatDayTitle]=\"formatDayTitle\"\n [formatMonthTitle]=\"formatMonthTitle\"\n [startingDay]=\"startingDay\"\n [yearRange]=\"yearRange\"\n [onlyCurrentMonth]=\"onlyCurrentMonth\"\n [shortcutPropagation]=\"shortcutPropagation\"\n [customClass]=\"customClass\"\n [dateDisabled]=\"dateDisabled\"\n />\n </div>\n </div>\n </ng-template>\n </span>\n</ng-container>\n\n<ng-template #withoutCdkOverlay>\n <div class=\"legacy\" [class.forLink]=\"renderingStyle === 'LINK'\">\n <div class=\"backdrop\" *ngIf=\"showDatepicker\" (click)=\"hidePopup()\"></div>\n <span class=\"wrapper\" [class.forLink]=\"renderingStyle === 'LINK'\" [class.has-error]=\"hasError\">\n <input\n #input\n class=\"form-control dateControl\"\n placeholder=\"{{ placeholder }}\"\n [id]=\"inputId\"\n [lxAutofocus]=\"autoFocus\"\n [lxMarkInvalid]=\"markInvalid\"\n [(ngModel)]=\"dateString\"\n [disabled]=\"disabled\"\n (ngModelChange)=\"onDateStringChange($event)\"\n (focus)=\"showPopup()\"\n (blur)=\"onBlur()\"\n (keydown.enter)=\"hidePopup()\"\n (keydown.escape)=\"hidePopup()\"\n (keydown.tab)=\"hidePopup()\"\n (keydown.shift.tab)=\"hidePopup()\"\n [class.text-danger]=\"hasError\"\n *ngIf=\"renderingStyle === 'INPUT'\"\n />\n <a class=\"dateControl\" (click)=\"togglePopup()\" *ngIf=\"renderingStyle === 'LINK'\">{{ date | lxDate: dateFormat }}</a>\n <div class=\"datepickerContainer\">\n <div class=\"calendar\">\n <datepicker\n class=\"popup\"\n *ngIf=\"showDatepicker\"\n (selectionDone)=\"onSelectionDone($event)\"\n [ngModel]=\"date\"\n [datepickerMode]=\"datepickerMode\"\n [initDate]=\"initDate\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [minMode]=\"minMode\"\n [maxMode]=\"maxMode\"\n [showWeeks]=\"showWeeks\"\n [formatDay]=\"formatDay\"\n [formatMonth]=\"formatMonth\"\n [formatYear]=\"formatYear\"\n [formatDayHeader]=\"formatDayHeader\"\n [formatDayTitle]=\"formatDayTitle\"\n [formatMonthTitle]=\"formatMonthTitle\"\n [startingDay]=\"startingDay\"\n [yearRange]=\"yearRange\"\n [onlyCurrentMonth]=\"onlyCurrentMonth\"\n [shortcutPropagation]=\"shortcutPropagation\"\n [customClass]=\"customClass\"\n [dateDisabled]=\"dateDisabled\"\n />\n </div>\n </div>\n </span>\n </div>\n</ng-template>\n", styles: [".backdrop{background-color:transparent}.datepickerContainer{z-index:700}.wrapper .forLink .popup{top:15px}.dateControl,.calendar{position:relative}.popup{position:relative;left:0;z-index:700;border-radius:3px}.popup ::ng-deep .text-info{color:#2a303d}.popup ::ng-deep .text-muted{color:#99a5bb}.popup ::ng-deep .btn.active,.popup ::ng-deep .btn.active .text-info{color:#fff}.popup ::ng-deep .well{margin:0;border:1px solid #2a303d}:host-context(.input-group) .datepickerContainer{top:100%}.legacy .backdrop{position:fixed;z-index:2;inset:0}.legacy .datepickerContainer{position:absolute}.legacy.forLink{display:inline-block}.datepickerContainer datepicker{display:block;border-radius:4px;background-color:#fff;box-shadow:0 2px 8px #22364940;width:290px;z-index:700;padding:0 16px 16px;margin-top:4px}datepicker ::ng-deep .well{margin-bottom:0;border:none!important;background:none;box-shadow:none;padding:12px 0 0}datepicker ::ng-deep .btn{border:none!important;font-size:14px}datepicker ::ng-deep .btn.pull-left{font-size:0}datepicker ::ng-deep .btn.pull-left:after{color:#0070f2;font-family:\"Font Awesome 5 Pro\";font-weight:900;content:\"\\f104\";-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;font-style:normal;font-variant:normal;text-rendering:auto;line-height:1;font-size:14px}datepicker ::ng-deep .btn.pull-right{font-size:0}datepicker ::ng-deep .btn.pull-right:after{color:#0070f2;font-family:\"Font Awesome 5 Pro\";font-weight:900;content:\"\\f105\";-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;font-style:normal;font-variant:normal;text-rendering:auto;line-height:1;font-size:14px}datepicker ::ng-deep table tr:first-child th{padding-bottom:12px}datepicker ::ng-deep table tr:first-child th .btn{color:#0070f2!important}datepicker ::ng-deep [role=gridcell] .btn-default{border:solid 2px transparent!important;border-radius:8px;padding:8px 6px}datepicker ::ng-deep [role=gridcell] .btn-default:focus,datepicker ::ng-deep [role=gridcell] .btn-default.focus{outline-offset:0}datepicker ::ng-deep [role=gridcell] .btn-default:hover{background-color:#fff;border:#0070f2 2px solid!important;border-radius:8px}datepicker ::ng-deep .btn-default.active{background:none;box-shadow:none;color:#fff;border:solid 2px #0070f2!important;background-color:#0070f2!important;border-radius:8px}datepicker ::ng-deep .btn-default.active .text-muted,datepicker ::ng-deep .btn-default.active .text-primary,datepicker ::ng-deep .btn-default.active .text-info{color:inherit}datepicker ::ng-deep tr td:first-child{padding:0 6px;color:#556b82;font-size:12px}datepicker ::ng-deep th small b{font-weight:400;color:#556b82;font-size:12px}datepicker ::ng-deep table{border-spacing:1px;border-collapse:separate}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: AutofocusDirective, selector: "[lxAutofocus]", inputs: ["lxAutofocus", "lxAutofocusPreventScroll", "lxAutofocusTimeout"] }, { kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "component", type: DatePickerComponent, selector: "datepicker", inputs: ["datepickerMode", "initDate", "minDate", "maxDate", "minMode", "maxMode", "showWeeks", "formatDay", "formatMonth", "formatYear", "formatDayHeader", "formatDayTitle", "formatMonthTitle", "startingDay", "yearRange", "onlyCurrentMonth", "shortcutPropagation", "monthColLimit", "yearColLimit", "customClass", "dateDisabled", "dayDisabled", "activeDate"], outputs: ["selectionDone", "activeDateChange"] }, { kind: "pipe", type: CustomDatePipe, name: "lxDate" }, { kind: "directive", type: MarkInvalidDirective, selector: "[lxMarkInvalid]", inputs: ["lxMarkInvalid"] }, { kind: "component", type: ButtonComponent, selector: "button[lx-button]", inputs: ["size", "color", "mode", "pressed", "selected", "square", "circle", "disabled", "showSpinner"] }] }); }
@@ -4979,12 +5311,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
4979
5311
  args: [DATE_FN_LOCALE]
4980
5312
  }] }], propDecorators: { date: [{
4981
5313
  type: Input
4982
- }], dateChange: [{
4983
- type: Output
4984
5314
  }], dateString: [{
4985
5315
  type: Input
4986
- }], dateStringChange: [{
4987
- type: Output
4988
5316
  }], valueAccessor: [{
4989
5317
  type: Input
4990
5318
  }], inputId: [{
@@ -4999,7 +5327,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
4999
5327
  type: Input
5000
5328
  }], initDateString: [{
5001
5329
  type: Input
5002
- }], initDateString$: [], minDate: [{
5330
+ }], minDate: [{
5003
5331
  type: Input
5004
5332
  }], maxDate: [{
5005
5333
  type: Input
@@ -5041,7 +5369,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
5041
5369
  type: Input
5042
5370
  }], closeDateInput: [{
5043
5371
  type: Output
5044
- }], input: [{
5372
+ }], dateStringChange: [{
5373
+ type: Output
5374
+ }], dateChange: [{
5375
+ type: Output
5376
+ }], initDateString$: [], input: [{
5045
5377
  type: ViewChild,
5046
5378
  args: ['input']
5047
5379
  }], dateStringTemplate: [{
@@ -7539,19 +7871,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
7539
7871
  args: ['queryInput', { static: true }]
7540
7872
  }] } });
7541
7873
 
7874
+ /**
7875
+ * Switch component is a toggle switch that can be used to switch between two states.
7876
+ *
7877
+ * ## Usage
7878
+ *
7879
+ * 1. Import the `SliderToggleComponent` component from `@leanix/components` in your module or standalone copmonent where you want to use the component.
7880
+ *
7881
+ * ```ts
7882
+ * import { SliderToggleComponent } from '@leanix/components';
7883
+ * ```
7884
+ */
7542
7885
  class SliderToggleComponent {
7543
7886
  constructor() {
7887
+ /** Size of the switch */
7544
7888
  this.size = 'small';
7889
+ /** Whether the switch is disabled */
7545
7890
  this.disabled = false;
7891
+ /** Whether the label is in front of the switch */
7546
7892
  this.labelInFront = true;
7893
+ /** Event that is emitted when the switch is toggled */
7547
7894
  this.toggle = new EventEmitter();
7548
7895
  }
7896
+ /** @internal */
7549
7897
  onToggle() {
7550
7898
  this.toggle.emit(!this.value);
7551
7899
  }
7552
7900
  get id() {
7553
7901
  return this.elementId ? `tour${this.elementId}` : null;
7554
7902
  }
7903
+ /** @internal */
7555
7904
  focus(checkbox) {
7556
7905
  // without a delay the checkbox will not be focused again
7557
7906
  setTimeout(() => checkbox.focus(), 150);
@@ -8530,12 +8879,42 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
8530
8879
  }] });
8531
8880
 
8532
8881
  /**
8533
- * GLOBAL PROVIDERS required for this component:
8534
- * - provideAnimations()
8882
+ * This documentation provides details on the usage and configuration of the Modal.
8883
+ *
8884
+ * ## Usage
8885
+ *
8886
+ * 1. Import `LxModalModule` and `LxCoreUiModule` modules from `@leanix/components` in your module where you want to use the component.
8535
8887
  *
8536
- * ATTENTION - SCROLLABLE DIALOG:
8888
+ * ```ts
8889
+ * import { LxModalModule, LxCoreUiModule } from '@leanix/components';
8890
+ * ```
8891
+ *
8892
+ * 2. Use the **lx-modal** component in your template with the parameters described below.
8893
+ *
8894
+ * - **`open`**: Whether the modal is open or closed.
8895
+ * - **`size`**: 'dialog' | 'dialog-large'.
8896
+ * - **`verticalScroll`**: Whether the modal is scrollable or not.
8897
+ * - **`showHeader`**: Whether the modal has a header or not.
8898
+ * - **`showFooter`**: Whether the modal has a footer or not.
8899
+ * - **`showCloseButton`**: Whether to show the close button.
8900
+ * - **`showBackButton`**: Whether to show the back button.
8901
+ *
8902
+ * 3. Use optional **lx-modal-header** component in your template with the parameters described below.
8903
+ *
8904
+ * - **`title`**: Title of the modal.
8905
+ * - **`subtitle`**: Subtitle of the modal.
8906
+ * - **`bottomBorder`**: Whether to show a bottom border.
8907
+ *
8908
+ * 4. Use optional **lx-modal-footer** component in your template with the parameters described below.
8909
+ *
8910
+ * - **`border`**: Whether to show the footer at the bottom of the modal.
8911
+ *
8912
+ * **GLOBAL PROVIDERS** required for this component:
8913
+ * - `provideAnimations()`
8914
+ *
8915
+ * **ATTENTION - SCROLLABLE DIALOG**:
8537
8916
  * The <lx-modal> component when used as "dialog" is not designed to work with a
8538
- * scrollable body (via "overflow: auto | scroll") in combination with dropdowns.
8917
+ * scrollable body (via `overflow: auto | scroll`) in combination with dropdowns.
8539
8918
  * The overflow on the body will also clip the dropdowns, which is expected.
8540
8919
  *
8541
8920
  * Reasoning:
@@ -8544,12 +8923,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
8544
8923
  * requires scrolling, we should discuss whether to put it into a dialog at all
8545
8924
  * and rather think about putting the content on a separate route or
8546
8925
  * using the fullscreen version of the modal.
8547
- *
8548
8926
  */
8549
8927
  class ModalComponent {
8550
8928
  get content() {
8551
8929
  return this.explicitContent || this.implicitContent;
8552
8930
  }
8931
+ /** @internal */
8553
8932
  onEscape() {
8554
8933
  if (this.open && this.showCloseButton) {
8555
8934
  this.closeModal(ModalCloseClickLocation.Escape);
@@ -8560,21 +8939,36 @@ class ModalComponent {
8560
8939
  this.renderer = renderer;
8561
8940
  this.closeModal$ = closeModal$;
8562
8941
  this.focusTrap = focusTrap;
8942
+ /** @internal */
8563
8943
  this.NAME = 'ModalComponent';
8944
+ /** Whether the modal is open or closed. */
8564
8945
  this.open = false;
8946
+ /** Whether to show the close button. */
8565
8947
  this.showCloseButton = true;
8948
+ /** Whether to show the back button. */
8566
8949
  this.showBackButton = false;
8567
8950
  /*
8568
8951
  * If true, then the content area scrolls vertically instead of expanding its height.
8569
8952
  * This can be a problem if the content has dropdowns or date inputs, but can be good if the content has a huge amount of text.
8570
8953
  */
8571
8954
  this.verticalScroll = false;
8955
+ /** The size of the modal. */
8572
8956
  this.size = 'fullscreen';
8573
- this.minWidth = '600px'; // NB: Some modal implementations rely on this minWidth being 600px
8957
+ /**
8958
+ * Minimum width of the modal.
8959
+ *
8960
+ * _NB: Some modal implementations rely on this minWidth being 600px_
8961
+ */
8962
+ this.minWidth = '600px';
8963
+ /** Whether the modal is a focus trap. */
8574
8964
  this.isFocusTrap = false;
8965
+ /** Event emitted when the modal is closed. */
8575
8966
  this.close = new EventEmitter();
8967
+ /** Event emitted when the back button is clicked. */
8576
8968
  this.back = new EventEmitter();
8969
+ /** @internal */
8577
8970
  this.closeLocation = ModalCloseClickLocation;
8971
+ /** @internal */
8578
8972
  this.destroyed$ = new Subject();
8579
8973
  }
8580
8974
  ngOnInit() {
@@ -8634,6 +9028,7 @@ class ModalComponent {
8634
9028
  .subscribe(() => this.openModal());
8635
9029
  }
8636
9030
  }
9031
+ /** @internal */
8637
9032
  openModal() {
8638
9033
  this.oldOverflow = document.documentElement.style.overflowY;
8639
9034
  if (this.size === 'fullscreen') {
@@ -8642,6 +9037,7 @@ class ModalComponent {
8642
9037
  this.overlayRef.attach(this.cdkPortal);
8643
9038
  this.trapFocusInModal(this.overlayRef.hostElement);
8644
9039
  }
9040
+ /** @internal */
8645
9041
  emitBack() {
8646
9042
  this.back.emit();
8647
9043
  }
@@ -8654,6 +9050,7 @@ class ModalComponent {
8654
9050
  this.overlayRef.dispose();
8655
9051
  }
8656
9052
  }
9053
+ /** @internal */
8657
9054
  async closeModal(closeLocation) {
8658
9055
  if (!this.canModalBeClosed || (await this.canModalBeClosed(closeLocation))) {
8659
9056
  this.open = false;
@@ -8778,7 +9175,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
8778
9175
  }] });
8779
9176
 
8780
9177
  /**
8781
- * HOW TO USE
9178
+ * The Popover component is based on the [ncstate-sat/popover](https://github.com/ncstate-sat/popover) library.
9179
+ *
9180
+ * ## Usage
9181
+ *
9182
+ * 1. Import `LxPopoverUiModule` and `LxCoreUiModule` module from `@leanix/components` in your module where you want to use the component.
9183
+ *
9184
+ * ```ts
9185
+ * import { LxPopoverUiModule, LxCoreUiModule } from '@leanix/components';
9186
+ * ```
8782
9187
  *
8783
9188
  * This popover encapsulates this open source library: https://github.com/ncstate-sat/popover,
8784
9189
  * make sure to also check out the docs over there.
@@ -8789,7 +9194,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
8789
9194
  *
8790
9195
  * For use case 1. you would use the lxPopoverHover directive, which exports as hoverAnchor.
8791
9196
  *
8792
- * Example:
9197
+ * ### Example:
9198
+ * ```html
8793
9199
  * <div lxPopoverHover
8794
9200
  * hoverAnchor
8795
9201
  * satPopoverAnchor
@@ -8799,13 +9205,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
8799
9205
  * verticalAlign="center">
8800
9206
  * <p>Popover content</p>
8801
9207
  * </lx-popover>
9208
+ * ```
8802
9209
  *
8803
9210
  * For use case 2. you would use the lxPopoverClick directive, which exports as clickAnchor.
8804
9211
  * Note: Since the only component where we use the lxPopoverClick directive (ReportComponent)
8805
9212
  * needs to fetch some data before opening it, we do not register a click EventListener in this directive,
8806
9213
  * but require the developer to implement that in the component, where the popover is used.
8807
9214
  *
8808
- * Example:
9215
+ * ### Example:
9216
+ * ```html
8809
9217
  * <div lxPopoverClick
8810
9218
  * clickAnchor
8811
9219
  * satPopoverAnchor
@@ -8817,21 +9225,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
8817
9225
  * #popover>
8818
9226
  * <p>Popover content</p>
8819
9227
  * </lx-popover>
9228
+ * ```
8820
9229
  *
8821
9230
  * If this component is used with angularCompilerOptions strictTemplates=true,
8822
9231
  * satPopoverAnchor must be set to the reference to the SatPopover inside lx-popover.
8823
9232
  *
8824
- * Example:
8825
- * <div [satPopoverAnchor]="popover.satPopover"></div>
9233
+ * ### Example:
9234
+ * ```html
9235
+ * <div [satPopoverAnchor]="popover.satPopover"></div>
8826
9236
  * <lx-popover #popover>
8827
9237
  * <p>Popover content</p>
8828
9238
  * </lx-popover>
9239
+ * ```
8829
9240
  */
8830
9241
  class PopoverComponent {
8831
9242
  constructor() {
9243
+ /** Whether to apply margins. */
8832
9244
  this.noMargin = false;
9245
+ /** Whether to allow the popover to overflow the viewport. */
8833
9246
  this.allowOverflow = false;
9247
+ /** Whether to focus the first focusable element in the popover when it is opened. */
8834
9248
  this.autoFocus = false;
9249
+ /** Whether to restore focus to the previously-focused element when the popover is closed. */
8835
9250
  this.restoreFocus = true;
8836
9251
  /**
8837
9252
  * If you have a popover, that should usually be displayed above or below its anchor,
@@ -8842,7 +9257,9 @@ class PopoverComponent {
8842
9257
  * position of the popover after opening.
8843
9258
  */
8844
9259
  this.adaptMarginsForViewportAlignChange = false;
9260
+ /** Event emitted when the popover is opened. */
8845
9261
  this.opened = new EventEmitter();
9262
+ /** Event emitted when the popover is closed. */
8846
9263
  this.closed = new EventEmitter();
8847
9264
  this._isOpen = false;
8848
9265
  }
@@ -8857,21 +9274,26 @@ class PopoverComponent {
8857
9274
  this.marginClasses = this.getDefaultMarginClasses(this.horizontalAlign, this.verticalAlign);
8858
9275
  }
8859
9276
  }
9277
+ /** @internal */
8860
9278
  open() {
8861
9279
  this.satPopover.open();
8862
9280
  }
9281
+ /** @internal */
8863
9282
  close() {
8864
9283
  this.satPopover.close();
8865
9284
  }
9285
+ /** @internal */
8866
9286
  onOpen() {
8867
9287
  this._isOpen = true;
8868
9288
  this.opened.emit();
8869
9289
  }
9290
+ /** @internal */
8870
9291
  onAfterOpen() {
8871
9292
  if (this.adaptMarginsForViewportAlignChange) {
8872
9293
  this.marginClasses = this.getMarginClassesForClassList(this.satPopover._classList);
8873
9294
  }
8874
9295
  }
9296
+ /** @internal */
8875
9297
  onClose() {
8876
9298
  this._isOpen = false;
8877
9299
  this.closed.emit();