@leanix/components 0.4.817 → 0.4.819
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/leanix-components.mjs +1771 -140
- package/fesm2022/leanix-components.mjs.map +1 -1
- package/lib/core-ui/components/avatar/avatar.component.d.ts +27 -0
- package/lib/core-ui/components/avatar-group/avatar-group.component.d.ts +45 -0
- package/lib/core-ui/components/badge/badge.component.d.ts +10 -0
- package/lib/core-ui/components/banner/banner.component.d.ts +18 -0
- package/lib/core-ui/components/button/button.component.d.ts +22 -0
- package/lib/core-ui/components/button-group/button-group.component.d.ts +26 -0
- package/lib/core-ui/components/card/card.component.d.ts +16 -3
- package/lib/core-ui/components/collapsible/collapsible.component.d.ts +39 -0
- package/lib/core-ui/components/counter/counter.component.d.ts +20 -3
- package/lib/core-ui/components/ellipsis/ellipsis.component.d.ts +13 -0
- package/lib/core-ui/components/empty-state/empty-state.component.d.ts +38 -15
- package/lib/core-ui/components/page-header/page-header.component.d.ts +2 -1
- package/lib/core-ui/components/skeleton/skeleton.component.d.ts +16 -4
- package/lib/core-ui/components/spinner/spinner.component.d.ts +15 -0
- package/lib/core-ui/components/stepper/stepper.component.d.ts +23 -0
- package/lib/core-ui/components/table/table-header/table-header.component.d.ts +26 -5
- package/lib/core-ui/components/table/table.component.d.ts +25 -2
- package/lib/core-ui/components/tokenizer/token/token.component.d.ts +16 -0
- package/lib/core-ui/components/tokenizer/tokenizer-overflow-popover/tokenizer-overflow-popover.component.d.ts +38 -0
- package/lib/core-ui/components/tokenizer/tokenizer.component.d.ts +22 -5
- package/lib/core-ui/icon/fa-to-sap-icon.pipe.d.ts +2 -1
- package/lib/core-ui/tooltip/tooltip.component.d.ts +30 -0
- package/lib/forms-ui/components/basic-dropdown/basic-dropdown.component.d.ts +79 -0
- package/lib/forms-ui/components/basic-dropdown-item/basic-dropdown-item.component.d.ts +36 -0
- package/lib/forms-ui/components/breadcrumb/breadcrumb.component.d.ts +20 -2
- package/lib/forms-ui/components/cdk-options-dropdown/cdk-options-dropdown.component.d.ts +34 -0
- package/lib/forms-ui/components/cdk-options-sub-dropdown/cdk-options-sub-dropdown.component.d.ts +21 -0
- package/lib/forms-ui/components/currency/currency-input.component.d.ts +53 -0
- package/lib/forms-ui/components/currency/currency-symbol.component.d.ts +16 -0
- package/lib/forms-ui/components/date-input/date-input.component.d.ts +135 -33
- package/lib/forms-ui/components/date-picker-ui/datepicker-inner.component.d.ts +35 -0
- package/lib/forms-ui/components/date-picker-ui/daypicker.component.d.ts +6 -0
- package/lib/forms-ui/components/date-picker-ui/monthpicker.component.d.ts +6 -0
- package/lib/forms-ui/components/date-picker-ui/yearpicker.component.d.ts +6 -0
- package/lib/forms-ui/components/drag-and-drop-list/drag-and-drop-list-item/drag-and-drop-list-item.component.d.ts +27 -2
- package/lib/forms-ui/components/drag-and-drop-list/drag-and-drop-list.component.d.ts +37 -6
- package/lib/forms-ui/components/error-message/error-message.component.d.ts +15 -0
- package/lib/forms-ui/components/form-error/form-error.component.d.ts +18 -0
- package/lib/forms-ui/components/input/input.component.d.ts +27 -0
- package/lib/forms-ui/components/multi-select/multi-select-selection/multi-select-selection.component.d.ts +30 -0
- package/lib/forms-ui/components/multi-select/multi-select.component.d.ts +80 -0
- package/lib/forms-ui/components/option/option.component.d.ts +41 -0
- package/lib/forms-ui/components/option-group/option-group.component.d.ts +24 -2
- package/lib/forms-ui/components/option-group-dropdown/option-group-dropdown.component.d.ts +51 -4
- package/lib/forms-ui/components/options-dropdown/options-dropdown.component.d.ts +73 -0
- package/lib/forms-ui/components/options-sub-dropdown/options-sub-dropdown.component.d.ts +22 -0
- package/lib/forms-ui/components/picker/picker.component.d.ts +25 -17
- package/lib/forms-ui/components/picker-option/picker-option.component.d.ts +34 -5
- package/lib/forms-ui/components/pill-item/pill-item.component.d.ts +25 -0
- package/lib/forms-ui/components/pill-list/pill-list.component.d.ts +58 -2
- package/lib/forms-ui/components/responsive-input/responsive-input.component.d.ts +20 -0
- package/lib/forms-ui/components/rich-text-editor/components/rich-text-editor-toolbar/rich-text-editor-toolbar.component.d.ts +26 -0
- package/lib/forms-ui/components/rich-text-editor/extensions/link/components/link-modal/link-modal.component.d.ts +15 -0
- package/lib/forms-ui/components/rich-text-editor/extensions/table/table-bubble-menu/table-bubble-menu.component.d.ts +17 -0
- package/lib/forms-ui/components/rich-text-editor/ngx-tiptap/node-view.component.d.ts +14 -0
- package/lib/forms-ui/components/single-select/single-select.component.d.ts +39 -0
- package/lib/forms-ui/components/sorting-dropdown/sorting-dropdown.component.d.ts +24 -0
- package/lib/forms-ui/components/sorting-dropdown-trigger/sorting-dropdown-trigger.component.d.ts +20 -0
- package/lib/forms-ui/components/switch/switch.component.d.ts +37 -8
- package/lib/modal-ui/components/modal-footer/modal-footer.component.d.ts +19 -0
- package/lib/modal-ui/components/modal-header/modal-header.component.d.ts +22 -0
- package/lib/popover-ui/components/popover/popover.component.d.ts +15 -24
- package/lib/tab-ui/components/tab/tab.component.d.ts +66 -5
- package/lib/tab-ui/components/tab-group/tab-group.component.d.ts +29 -1
- package/package.json +1 -1
|
@@ -84,11 +84,21 @@ const GLOBAL_TRANSLATION_OPTIONS = new InjectionToken('GLOBAL_TRANSLATION_OPTION
|
|
|
84
84
|
|
|
85
85
|
/**
|
|
86
86
|
* Badge component is used to show a small piece of information in a colored badge.
|
|
87
|
+
* Commonly used for status indicators, counts, or labels.
|
|
88
|
+
*
|
|
89
|
+
* ### Example
|
|
90
|
+
* @example
|
|
91
|
+
* ```html
|
|
92
|
+
* <lx-badge [content]="42" color="blue" />
|
|
93
|
+
* <lx-badge [content]="'New'" color="green" />
|
|
94
|
+
* <lx-badge [content]="errorCount" color="red" />
|
|
95
|
+
* ```
|
|
87
96
|
*/
|
|
88
97
|
class BadgeComponent {
|
|
89
98
|
constructor() {
|
|
90
99
|
/**
|
|
91
100
|
* The color of the badge component
|
|
101
|
+
* @default 'blue'
|
|
92
102
|
*/
|
|
93
103
|
this.color = 'blue';
|
|
94
104
|
}
|
|
@@ -121,15 +131,33 @@ const BANNER_SIZE = {
|
|
|
121
131
|
|
|
122
132
|
/**
|
|
123
133
|
* Banner can be used to display important information to the user. It allows for any type of content to be displayed in a banner.
|
|
134
|
+
* Banners automatically display an icon based on the type when using the 'big' size.
|
|
135
|
+
*
|
|
136
|
+
* ### Projection slots
|
|
137
|
+
* - Default slot: Main content of the banner (text, links, actions)
|
|
138
|
+
*
|
|
139
|
+
* ### Example
|
|
140
|
+
* @example
|
|
141
|
+
* ```html
|
|
142
|
+
* <lx-banner [type]="'warning'" [size]="'big'">
|
|
143
|
+
* <p>Your session will expire in 5 minutes.</p>
|
|
144
|
+
* </lx-banner>
|
|
145
|
+
*
|
|
146
|
+
* <lx-banner [type]="'success'" [size]="'small'">
|
|
147
|
+
* Changes saved successfully!
|
|
148
|
+
* </lx-banner>
|
|
149
|
+
* ```
|
|
124
150
|
*/
|
|
125
151
|
class BannerComponent {
|
|
126
152
|
constructor() {
|
|
127
153
|
/**
|
|
128
154
|
* The type of the banner
|
|
155
|
+
* @default BANNER_TYPE.WARNING
|
|
129
156
|
*/
|
|
130
157
|
this.type = input(BANNER_TYPE.WARNING);
|
|
131
158
|
/**
|
|
132
159
|
* The size of the banner
|
|
160
|
+
* @default BANNER_SIZE.BIG
|
|
133
161
|
*/
|
|
134
162
|
this.size = input(BANNER_SIZE.BIG);
|
|
135
163
|
this.showIcon = computed(() => this.size() === BANNER_SIZE.BIG);
|
|
@@ -175,8 +203,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
175
203
|
}, imports: [IconComponent$1], template: "<div class=\"banner-wrapper\">\n @if (showIcon()) {\n <ui5-icon [name]=\"iconName()\" [design]=\"iconDesign()\" />\n }\n <div class=\"banner-content\">\n <ng-content />\n </div>\n</div>\n", styles: [":host{display:block;border-left:2px solid}:host[type=success]{background-color:color-mix(in srgb,#33cc58 10%,white);border-color:#33cc58}:host[type=info]{background-color:color-mix(in srgb,#2889ff 10%,white);border-color:#2889ff}:host[type=warning]{background-color:color-mix(in srgb,#ffb62a 10%,white);border-color:#ffb62a}:host[type=danger]{background-color:color-mix(in srgb,#f96464 10%,white);border-color:#f96464}:host[size=big]{margin-bottom:12px}:host[size=big] .banner-wrapper{position:relative;padding:.75rem}:host[size=big] .banner-content{padding-left:2rem}:host[size=big] ui5-icon{position:absolute;top:.875rem;left:.75rem}:host[size=small]{margin-bottom:6px}:host[size=small] .banner-wrapper{padding:.5rem}:host ::ng-deep .banner-content h4{margin-top:0;color:inherit}:host ::ng-deep .banner-content .alert-link{font-weight:700}:host ::ng-deep .banner-content>p,:host ::ng-deep .banner-content>ul{margin-bottom:0}:host ::ng-deep .banner-content p+p{margin-bottom:5px}:host ::ng-deep .banner-content p:last-child{margin-bottom:0}\n"] }]
|
|
176
204
|
}] });
|
|
177
205
|
|
|
206
|
+
/**
|
|
207
|
+
* Button group component arranges multiple buttons in a horizontal layout with configurable separators.
|
|
208
|
+
* Use 'margin' for spaced buttons or 'border' for connected buttons with dividing lines.
|
|
209
|
+
*
|
|
210
|
+
* ### Projection slots
|
|
211
|
+
* - Default slot: Button elements to display in the group
|
|
212
|
+
*
|
|
213
|
+
* ### Example
|
|
214
|
+
* @example
|
|
215
|
+
* ```html
|
|
216
|
+
* <lx-button-group separator="margin">
|
|
217
|
+
* <button lx-button color="primary">Save</button>
|
|
218
|
+
* <button lx-button>Cancel</button>
|
|
219
|
+
* </lx-button-group>
|
|
220
|
+
*
|
|
221
|
+
* <lx-button-group separator="border">
|
|
222
|
+
* <button lx-button mode="outline">View</button>
|
|
223
|
+
* <button lx-button mode="outline">Edit</button>
|
|
224
|
+
* <button lx-button mode="outline">Delete</button>
|
|
225
|
+
* </lx-button-group>
|
|
226
|
+
* ```
|
|
227
|
+
*/
|
|
178
228
|
class ButtonGroupComponent {
|
|
179
229
|
constructor() {
|
|
230
|
+
/**
|
|
231
|
+
* The type of separator between buttons: 'margin' for spacing or 'border' for dividing lines.
|
|
232
|
+
* @default 'margin'
|
|
233
|
+
*/
|
|
180
234
|
this.separator = 'margin';
|
|
181
235
|
}
|
|
182
236
|
get hasMarginSeperator() {
|
|
@@ -204,39 +258,60 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
204
258
|
/**
|
|
205
259
|
* Button component is used to create a button with different styles and sizes. This uses native button element and
|
|
206
260
|
* only provides styling and some additional features like loading spinner.
|
|
261
|
+
*
|
|
262
|
+
* ### Projection slots
|
|
263
|
+
* - Default slot: Button label or content
|
|
264
|
+
*
|
|
265
|
+
* ### Example
|
|
266
|
+
* @example
|
|
267
|
+
* ```html
|
|
268
|
+
* <button lx-button color="primary" size="medium">Save</button>
|
|
269
|
+
* <button lx-button icon="delete" color="danger" mode="outline">Delete</button>
|
|
270
|
+
* <button lx-button [showSpinner]="isLoading" [disabled]="isLoading">Submit</button>
|
|
271
|
+
* <button lx-button icon="download" endIcon="slim-arrow-down" mode="ghost">Export</button>
|
|
272
|
+
* <button lx-button icon="action-settings" [square]="true" [circle]="true" mode="ghost"></button>
|
|
273
|
+
* ```
|
|
207
274
|
*/
|
|
208
275
|
class ButtonComponent {
|
|
209
276
|
constructor() {
|
|
210
277
|
/**
|
|
211
278
|
* The size of the button.
|
|
279
|
+
* @default 'medium'
|
|
212
280
|
*/
|
|
213
281
|
this.size = 'medium';
|
|
214
282
|
/**
|
|
215
283
|
* The color of the button.
|
|
284
|
+
* @default 'default'
|
|
216
285
|
*/
|
|
217
286
|
this.color = 'default';
|
|
218
287
|
/**
|
|
219
288
|
* The mode of the button.
|
|
289
|
+
* @default 'solid'
|
|
220
290
|
*/
|
|
221
291
|
this.mode = 'solid';
|
|
222
292
|
/**
|
|
223
293
|
* The pressed state of the button. This simulates the `:active` state of the button.
|
|
294
|
+
* @default false
|
|
224
295
|
*/
|
|
225
296
|
this.pressed = false;
|
|
226
297
|
/**
|
|
227
298
|
* The selected state of the button. This simulates the `:hover` state of the button.
|
|
299
|
+
* @default false
|
|
228
300
|
*/
|
|
229
301
|
this.selected = false;
|
|
230
302
|
/**
|
|
231
303
|
* This makes the button square.
|
|
304
|
+
* @default false
|
|
232
305
|
*/
|
|
233
306
|
this.square = false;
|
|
234
307
|
/**
|
|
235
308
|
* This makes corners rounded. Use with `square` for a true circle.
|
|
309
|
+
* @default false
|
|
236
310
|
*/
|
|
237
311
|
this.circle = false;
|
|
238
312
|
/**
|
|
239
313
|
* This disables the button.
|
|
314
|
+
* @default false
|
|
240
315
|
*/
|
|
241
316
|
this.disabled = false;
|
|
242
317
|
/**
|
|
@@ -269,6 +344,7 @@ class ButtonComponent {
|
|
|
269
344
|
this.endIconKind = computed(() => (isFontAwesomeIcon(this.endIconName()) ? 'fa' : 'sap'));
|
|
270
345
|
/**
|
|
271
346
|
* This shows a spinner inside the button.
|
|
347
|
+
* @default false
|
|
272
348
|
*/
|
|
273
349
|
this.showSpinner = false;
|
|
274
350
|
}
|
|
@@ -361,13 +437,26 @@ function removeFontAwesomeVariant(iconName) {
|
|
|
361
437
|
}
|
|
362
438
|
|
|
363
439
|
/**
|
|
364
|
-
*
|
|
365
|
-
*
|
|
440
|
+
* A simple container component for displaying content in a card-like style.
|
|
441
|
+
* Provides consistent styling and layout for grouped content.
|
|
442
|
+
*
|
|
443
|
+
* ### Projection slots
|
|
444
|
+
* - Default slot: All card content including title, body, and any other elements
|
|
445
|
+
*
|
|
446
|
+
* ### Example
|
|
447
|
+
* @example
|
|
448
|
+
* ```html
|
|
449
|
+
* <lx-card [dataStyle]="'white'">
|
|
450
|
+
* <h3>Card Title</h3>
|
|
451
|
+
* <p>Card content goes here.</p>
|
|
452
|
+
* </lx-card>
|
|
453
|
+
* ```
|
|
366
454
|
*/
|
|
367
455
|
class CardComponent {
|
|
368
456
|
constructor() {
|
|
369
457
|
/**
|
|
370
|
-
* The style of the card.
|
|
458
|
+
* The visual style variant of the card.
|
|
459
|
+
* @default 'white'
|
|
371
460
|
*/
|
|
372
461
|
this.dataStyle = 'white';
|
|
373
462
|
}
|
|
@@ -384,14 +473,53 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
384
473
|
args: ['attr.data-style']
|
|
385
474
|
}] } });
|
|
386
475
|
|
|
476
|
+
/**
|
|
477
|
+
* An expandable and collapsible section container with a toggle button.
|
|
478
|
+
* Useful for organizing content that can be shown or hidden on demand.
|
|
479
|
+
*
|
|
480
|
+
* ### Projection slots
|
|
481
|
+
* - Default slot: The title or header content that is always visible. The entire component is clickable to toggle.
|
|
482
|
+
*
|
|
483
|
+
* ### Example
|
|
484
|
+
* @example
|
|
485
|
+
* ```html
|
|
486
|
+
* <lx-collapsible [toggleTitle]="'Show Details'" [(collapsed)]="isCollapsed">
|
|
487
|
+
* <h3>Section Title</h3>
|
|
488
|
+
* <span class="subtitle">Additional info</span>
|
|
489
|
+
* </lx-collapsible>
|
|
490
|
+
* ```
|
|
491
|
+
*/
|
|
387
492
|
class CollapsibleComponent {
|
|
388
493
|
constructor() {
|
|
389
494
|
this.NAME = 'CollapsibleComponent';
|
|
495
|
+
/**
|
|
496
|
+
* When true, prevents the section from being toggled. The toggle button remains visible but disabled.
|
|
497
|
+
* @default false
|
|
498
|
+
*/
|
|
390
499
|
this.disableSectionToggle = false;
|
|
500
|
+
/**
|
|
501
|
+
* When true, hides the toggle button entirely. The section cannot be collapsed/expanded.
|
|
502
|
+
* @default false
|
|
503
|
+
*/
|
|
391
504
|
this.hideSectionToggle = false;
|
|
505
|
+
/**
|
|
506
|
+
* Size of the toggle button (arrow icon).
|
|
507
|
+
* @default 'small'
|
|
508
|
+
*/
|
|
392
509
|
this.toggleSize = 'small';
|
|
510
|
+
/**
|
|
511
|
+
* Text label displayed as the title attribute of the toggle button for accessibility.
|
|
512
|
+
* @default ''
|
|
513
|
+
*/
|
|
393
514
|
this.toggleTitle = '';
|
|
515
|
+
/**
|
|
516
|
+
* Whether the section is currently collapsed. Can be used with two-way binding.
|
|
517
|
+
* @default false
|
|
518
|
+
*/
|
|
394
519
|
this.collapsed = false;
|
|
520
|
+
/**
|
|
521
|
+
* Emitted when the collapsed state changes, either through user interaction or programmatic changes.
|
|
522
|
+
*/
|
|
395
523
|
this.collapsedChange = new EventEmitter();
|
|
396
524
|
}
|
|
397
525
|
get notClickable() {
|
|
@@ -435,12 +563,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
435
563
|
|
|
436
564
|
/**
|
|
437
565
|
* Counter component is used to create a counter with different styles and sizes.
|
|
566
|
+
* Useful for displaying notification counts, item quantities, or numeric indicators.
|
|
567
|
+
*
|
|
568
|
+
* ### Example
|
|
569
|
+
* @example
|
|
570
|
+
* ```html
|
|
571
|
+
* <lx-counter [content]="5" color="primary" size="default" />
|
|
572
|
+
* <lx-counter [content]="99" color="red" size="small" />
|
|
573
|
+
* <lx-counter [content]="unreadCount" color="green" />
|
|
574
|
+
* ```
|
|
438
575
|
*/
|
|
439
576
|
class CounterComponent {
|
|
440
577
|
constructor() {
|
|
441
|
-
/**
|
|
578
|
+
/**
|
|
579
|
+
* The size of the counter.
|
|
580
|
+
* @default 'default'
|
|
581
|
+
*/
|
|
442
582
|
this.size = 'default';
|
|
443
|
-
/**
|
|
583
|
+
/**
|
|
584
|
+
* The color of the counter.
|
|
585
|
+
* @default 'primary'
|
|
586
|
+
*/
|
|
444
587
|
this.color = 'primary';
|
|
445
588
|
}
|
|
446
589
|
get classes() {
|
|
@@ -613,6 +756,14 @@ const LX_ELLIPSIS_DEBOUNCE_ON_RESIZE = new InjectionToken('LX_ELLIPSIS_DEBOUNCE_
|
|
|
613
756
|
});
|
|
614
757
|
/**
|
|
615
758
|
* You can set `max-width` CSS property on your `lx-ellipsis` host element or the parent element if you want its content to never exceed a specific width.
|
|
759
|
+
* The component automatically truncates overflowing text and provides a "Show more" / "Show less" toggle button.
|
|
760
|
+
*
|
|
761
|
+
* ### Example
|
|
762
|
+
* @example
|
|
763
|
+
* ```html
|
|
764
|
+
* <lx-ellipsis [content]="longDescription" style="max-width: 300px;" />
|
|
765
|
+
* <lx-ellipsis [content]="userInput" [escapeHtmlInContent]="true" />
|
|
766
|
+
* ```
|
|
616
767
|
*/
|
|
617
768
|
class EllipsisComponent {
|
|
618
769
|
/** @internal */
|
|
@@ -623,10 +774,15 @@ class EllipsisComponent {
|
|
|
623
774
|
this.hostEl = hostEl;
|
|
624
775
|
this.resizeObserverService = resizeObserverService;
|
|
625
776
|
this.translateService = translateService;
|
|
777
|
+
/**
|
|
778
|
+
* The text content to display and potentially truncate.
|
|
779
|
+
* @default ''
|
|
780
|
+
*/
|
|
626
781
|
this.content = '';
|
|
627
782
|
/**
|
|
628
783
|
* Only set this to false if the content is not a user provided string
|
|
629
784
|
* or if you sanitize the provided content yourself.
|
|
785
|
+
* @default true
|
|
630
786
|
*/
|
|
631
787
|
this.escapeHtmlInContent = true;
|
|
632
788
|
/** @internal */
|
|
@@ -739,59 +895,82 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
739
895
|
args: ['showMoreButton', { read: ElementRef }]
|
|
740
896
|
}], content$: [] } });
|
|
741
897
|
|
|
898
|
+
/**
|
|
899
|
+
* Displays an empty state with an optional icon, title, description, action buttons, and a more link.
|
|
900
|
+
* Useful for showing initial states before data is loaded or when no data is available.
|
|
901
|
+
*
|
|
902
|
+
* ### Projection slots
|
|
903
|
+
* - Default slot: Description text or additional content to display below the title
|
|
904
|
+
*
|
|
905
|
+
* ### Example
|
|
906
|
+
* @example
|
|
907
|
+
* ```html
|
|
908
|
+
* <lx-empty-state
|
|
909
|
+
* [title]="'No items found'"
|
|
910
|
+
* [icon]="'inbox'"
|
|
911
|
+
* [buttonLabel]="'Add Item'"
|
|
912
|
+
* [secondaryButtonLabel]="'Import'"
|
|
913
|
+
* [moreLinkLabel]="'Learn more'"
|
|
914
|
+
* [moreLink]="'https://docs.example.com'"
|
|
915
|
+
* (buttonClicked)="onAddItem()"
|
|
916
|
+
* (secondaryButtonClicked)="onImport()"
|
|
917
|
+
* >
|
|
918
|
+
* <p>Start by adding your first item or importing existing data.</p>
|
|
919
|
+
* </lx-empty-state>
|
|
920
|
+
* ```
|
|
921
|
+
*/
|
|
742
922
|
class EmptyStateComponent {
|
|
743
923
|
constructor() {
|
|
744
924
|
/**
|
|
745
|
-
* The title to be displayed
|
|
925
|
+
* The title to be displayed. Can contain HTML.
|
|
746
926
|
*/
|
|
747
927
|
this.title = input.required();
|
|
748
928
|
/**
|
|
749
|
-
* The SAP icon to show in the empty state.
|
|
929
|
+
* The SAP icon name to show in the empty state (e.g., 'inbox', 'add-document').
|
|
750
930
|
*/
|
|
751
931
|
this.icon = input();
|
|
752
932
|
/**
|
|
753
|
-
* The main call-to-action button label
|
|
933
|
+
* The main call-to-action button label. If not provided, the button will not be shown.
|
|
754
934
|
*/
|
|
755
935
|
this.buttonLabel = input();
|
|
756
936
|
/**
|
|
757
|
-
* The secondary call-to-action button label
|
|
937
|
+
* The secondary call-to-action button label. If not provided, the button will not be shown.
|
|
758
938
|
*/
|
|
759
939
|
this.secondaryButtonLabel = input();
|
|
760
940
|
/**
|
|
761
|
-
* Whether the empty state is in a loading state. If true,
|
|
941
|
+
* Whether the empty state is in a loading state. If true, action buttons will show a spinner.
|
|
942
|
+
* @default false
|
|
762
943
|
*/
|
|
763
944
|
this.loading = input(false);
|
|
764
945
|
/**
|
|
765
|
-
* The more link
|
|
946
|
+
* The text label for the more link.
|
|
766
947
|
*/
|
|
767
948
|
this.moreLinkLabel = input();
|
|
768
949
|
/**
|
|
769
|
-
* The URL of the more link
|
|
950
|
+
* The URL of the more link. Can be a string for external links or an array for Angular router links.
|
|
770
951
|
*/
|
|
771
952
|
this.moreLink = input();
|
|
772
953
|
/**
|
|
773
|
-
* Whether the more link should be opened in a new tab
|
|
774
|
-
*
|
|
954
|
+
* Whether the more link should be opened in a new tab.
|
|
775
955
|
* @default true
|
|
776
956
|
*/
|
|
777
957
|
this.openMoreLinkInNewTab = input(true);
|
|
778
958
|
/**
|
|
779
|
-
* The size of the empty state
|
|
780
|
-
*
|
|
781
|
-
* @default medium
|
|
959
|
+
* The size of the empty state.
|
|
960
|
+
* @default 'medium'
|
|
782
961
|
*/
|
|
783
962
|
this.size = input('medium');
|
|
784
963
|
this.useRouterLink = computed(() => Array.isArray(this.moreLink()));
|
|
785
964
|
/**
|
|
786
|
-
* Emitted when the main call-to-action button is clicked
|
|
965
|
+
* Emitted when the main call-to-action button is clicked.
|
|
787
966
|
*/
|
|
788
967
|
this.buttonClicked = new EventEmitter();
|
|
789
968
|
/**
|
|
790
|
-
* Emitted when the secondary call-to-action button is clicked
|
|
969
|
+
* Emitted when the secondary call-to-action button is clicked.
|
|
791
970
|
*/
|
|
792
971
|
this.secondaryButtonClicked = new EventEmitter();
|
|
793
972
|
/**
|
|
794
|
-
* Emitted when the more link is clicked
|
|
973
|
+
* Emitted when the more link is clicked.
|
|
795
974
|
*/
|
|
796
975
|
this.moreLinkClicked = new EventEmitter();
|
|
797
976
|
}
|
|
@@ -822,10 +1001,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
822
1001
|
* (or ancestor with new rendering context, created, for example, with `transform: translate(0, 0)`
|
|
823
1002
|
* - `fadeBackground`: Sets background to 60% transparent white. TODO: Always use for fullSpace* classes and remove.
|
|
824
1003
|
*
|
|
1004
|
+
* ### Projection slots
|
|
1005
|
+
* - Default slot: Optional text or content to display below the spinner
|
|
1006
|
+
*
|
|
825
1007
|
* @deprecated Use the `ui5-busy-indicator` component instead.
|
|
1008
|
+
*
|
|
1009
|
+
* ### Example
|
|
1010
|
+
* @example
|
|
1011
|
+
* ```html
|
|
1012
|
+
* <lx-spinner class="fullSpace fadeBackground">Loading...</lx-spinner>
|
|
1013
|
+
* <lx-spinner [fadeBackground]="true" />
|
|
1014
|
+
* ```
|
|
826
1015
|
*/
|
|
827
1016
|
class SpinnerComponent {
|
|
828
1017
|
constructor() {
|
|
1018
|
+
/**
|
|
1019
|
+
* Applies a semi-transparent white background.
|
|
1020
|
+
* @default false
|
|
1021
|
+
* @deprecated Use the `fadeBackground` CSS class instead.
|
|
1022
|
+
*/
|
|
829
1023
|
this.fadeBackground = false;
|
|
830
1024
|
}
|
|
831
1025
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: SpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
@@ -845,6 +1039,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
845
1039
|
* Stepper component is a wrapper around the Angular CDK Stepper component. It provides a way to create a linear
|
|
846
1040
|
* sequence of steps that guide users through a process.
|
|
847
1041
|
*
|
|
1042
|
+
* ### Projection slots
|
|
1043
|
+
* Each `cdk-step` element projects its content into the stepper's content area when that step is active.
|
|
1044
|
+
*
|
|
1045
|
+
* ### Example
|
|
1046
|
+
* @example
|
|
1047
|
+
* ```html
|
|
1048
|
+
* <lx-stepper [selectedIndex]="currentStep">
|
|
1049
|
+
* <cdk-step label="Personal Info">
|
|
1050
|
+
* <form>
|
|
1051
|
+
* <input type="text" placeholder="Name" />
|
|
1052
|
+
* </form>
|
|
1053
|
+
* </cdk-step>
|
|
1054
|
+
* <cdk-step label="Contact Details">
|
|
1055
|
+
* <form>
|
|
1056
|
+
* <input type="email" placeholder="Email" />
|
|
1057
|
+
* </form>
|
|
1058
|
+
* </cdk-step>
|
|
1059
|
+
* <cdk-step label="Review">
|
|
1060
|
+
* <p>Review your information</p>
|
|
1061
|
+
* </cdk-step>
|
|
1062
|
+
* </lx-stepper>
|
|
1063
|
+
* ```
|
|
1064
|
+
*
|
|
848
1065
|
* ## Usage
|
|
849
1066
|
*
|
|
850
1067
|
* 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
|
|
@@ -910,6 +1127,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
910
1127
|
* The `lx-table` directive can be applied to `<table>` elements to provide a common styling.
|
|
911
1128
|
* Furthermore it supports column sorting in combination with `<lx-th>` for table headers.
|
|
912
1129
|
*
|
|
1130
|
+
* ### Example
|
|
1131
|
+
* @example
|
|
1132
|
+
* ```html
|
|
1133
|
+
* <table lx-table [isSortable]="true" [(sort)]="sort">
|
|
1134
|
+
* <thead>
|
|
1135
|
+
* <tr>
|
|
1136
|
+
* <lx-th column="name">Name</lx-th>
|
|
1137
|
+
* <lx-th column="status" [disableSortClear]="true">Status</lx-th>
|
|
1138
|
+
* <lx-th column="actions" [disableSort]="true">Actions</lx-th>
|
|
1139
|
+
* </tr>
|
|
1140
|
+
* </thead>
|
|
1141
|
+
* <tbody>
|
|
1142
|
+
* <tr>
|
|
1143
|
+
* <td>Item 1</td>
|
|
1144
|
+
* <td>Active</td>
|
|
1145
|
+
* <td><button>Edit</button></td>
|
|
1146
|
+
* </tr>
|
|
1147
|
+
* </tbody>
|
|
1148
|
+
* </table>
|
|
1149
|
+
* ```
|
|
913
1150
|
*
|
|
914
1151
|
* ## Usage
|
|
915
1152
|
*
|
|
@@ -951,11 +1188,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
951
1188
|
class TableComponent {
|
|
952
1189
|
constructor() {
|
|
953
1190
|
/**
|
|
954
|
-
*
|
|
1191
|
+
* Enables or disables the sortability of the table. When enabled, `<lx-th>` elements with a `column` attribute become sortable.
|
|
1192
|
+
* @default false
|
|
955
1193
|
*/
|
|
956
1194
|
this.isSortable = input(false);
|
|
957
1195
|
/**
|
|
958
|
-
* The sort state of the table
|
|
1196
|
+
* The sort state of the table containing the column key and sort order (ASC, DESC, or undefined).
|
|
1197
|
+
* Can be used with two-way binding to control and react to sort changes.
|
|
1198
|
+
* @default {}
|
|
959
1199
|
*/
|
|
960
1200
|
this.sort = model({});
|
|
961
1201
|
}
|
|
@@ -1020,22 +1260,43 @@ registerIcon('sort-asc', {
|
|
|
1020
1260
|
});
|
|
1021
1261
|
/**
|
|
1022
1262
|
* The `lx-th` can be used in combination with `lx-table` to implement sortable `<table>` elements.
|
|
1263
|
+
* Renders a table header cell with optional sorting functionality.
|
|
1264
|
+
*
|
|
1265
|
+
* ### Projection slots
|
|
1266
|
+
* - Default slot: The header text content
|
|
1267
|
+
*
|
|
1268
|
+
* ### Example
|
|
1269
|
+
* @example
|
|
1270
|
+
* ```html
|
|
1271
|
+
* <table lx-table [isSortable]="true" [(sort)]="sort">
|
|
1272
|
+
* <thead>
|
|
1273
|
+
* <tr>
|
|
1274
|
+
* <lx-th column="name">Name</lx-th>
|
|
1275
|
+
* <lx-th column="date" [disableSortClear]="true">Date</lx-th>
|
|
1276
|
+
* <lx-th column="actions" [disableSort]="true">Actions</lx-th>
|
|
1277
|
+
* </tr>
|
|
1278
|
+
* </thead>
|
|
1279
|
+
* </table>
|
|
1280
|
+
* ```
|
|
1023
1281
|
*/
|
|
1024
1282
|
class TableHeaderComponent {
|
|
1025
1283
|
#sort;
|
|
1026
1284
|
constructor(parentTable) {
|
|
1027
1285
|
this.parentTable = parentTable;
|
|
1028
1286
|
/**
|
|
1029
|
-
*
|
|
1287
|
+
* Disables sorting for this column even when the table has sorting enabled.
|
|
1288
|
+
* @default false
|
|
1030
1289
|
*/
|
|
1031
1290
|
this.disableSort = false;
|
|
1032
1291
|
/**
|
|
1033
|
-
* Prevents the user from clearing the sort.
|
|
1034
|
-
*
|
|
1292
|
+
* Prevents the user from clearing the sort state.
|
|
1293
|
+
* When true, only allows toggling between ascending and descending order.
|
|
1294
|
+
* @default false
|
|
1035
1295
|
*/
|
|
1036
1296
|
this.disableSortClear = false;
|
|
1037
1297
|
/**
|
|
1038
|
-
*
|
|
1298
|
+
* Emitted whenever the user changes the sort order by clicking the header.
|
|
1299
|
+
* Provides the new sort state with column key and order.
|
|
1039
1300
|
*/
|
|
1040
1301
|
this.sortChange = new EventEmitter();
|
|
1041
1302
|
this.sortable = computed(() => (this.parentTable?.isSortable() && !this.disableSort) ?? false);
|
|
@@ -2129,10 +2390,40 @@ function isValidY(y) {
|
|
|
2129
2390
|
return ['top', 'center', 'bottom'].includes(y);
|
|
2130
2391
|
}
|
|
2131
2392
|
|
|
2393
|
+
/**
|
|
2394
|
+
* Tooltip component for displaying contextual information on hover.
|
|
2395
|
+
*
|
|
2396
|
+
* Supports plain text or HTML content with configurable positioning.
|
|
2397
|
+
* Typically used via the `lxTooltip` directive rather than directly.
|
|
2398
|
+
*
|
|
2399
|
+
* ### Example
|
|
2400
|
+
* @example
|
|
2401
|
+
* ```html
|
|
2402
|
+
* <button [lxTooltip]="'Save changes'">Save</button>
|
|
2403
|
+
*
|
|
2404
|
+
* <button [lxTooltip]="'<strong>Warning:</strong> Cannot be undone'" [lxTooltipHtml]="true">Delete</button>
|
|
2405
|
+
* ```
|
|
2406
|
+
*/
|
|
2132
2407
|
class TooltipComponent {
|
|
2133
2408
|
constructor() {
|
|
2409
|
+
/**
|
|
2410
|
+
* The tooltip content to display as plain text or HTML.
|
|
2411
|
+
*
|
|
2412
|
+
* @default ''
|
|
2413
|
+
*/
|
|
2134
2414
|
this.content = '';
|
|
2415
|
+
/**
|
|
2416
|
+
* Whether the content should be rendered as HTML.
|
|
2417
|
+
* When false, content is displayed as plain text.
|
|
2418
|
+
*
|
|
2419
|
+
* @default false
|
|
2420
|
+
*/
|
|
2135
2421
|
this.isHtmlContent = false;
|
|
2422
|
+
/**
|
|
2423
|
+
* The position of the tooltip relative to the target element.
|
|
2424
|
+
*
|
|
2425
|
+
* @default { x: 'center', y: 'top' }
|
|
2426
|
+
*/
|
|
2136
2427
|
this.position = {
|
|
2137
2428
|
x: 'center',
|
|
2138
2429
|
y: 'top'
|
|
@@ -2697,7 +2988,8 @@ const FA_MODIFIER_REGEX = /\s*\b(fas|far|fal|fad|fab)\b\s*/g;
|
|
|
2697
2988
|
* Useful for scenarios in which icon names need to be mapped at runtime,
|
|
2698
2989
|
* e.g. because they are stored in the backend.
|
|
2699
2990
|
*
|
|
2700
|
-
* @example
|
|
2991
|
+
* @example
|
|
2992
|
+
* ```html
|
|
2701
2993
|
* <ui5-icon [name]="fontAwesomeIcon() | lxFaToSapIcon" />
|
|
2702
2994
|
* ```
|
|
2703
2995
|
*/
|
|
@@ -2798,11 +3090,35 @@ const AVATAR_COLORS = [
|
|
|
2798
3090
|
'#fc9785'
|
|
2799
3091
|
];
|
|
2800
3092
|
|
|
3093
|
+
/**
|
|
3094
|
+
* Avatar component displays a user's profile picture or a placeholder icon for technical users.
|
|
3095
|
+
* Optionally includes a mailto link when an email is provided.
|
|
3096
|
+
*
|
|
3097
|
+
* ### Example
|
|
3098
|
+
* @example
|
|
3099
|
+
* ```html
|
|
3100
|
+
* <lx-avatar [user]="currentUser" size="M" />
|
|
3101
|
+
* <lx-avatar [user]="{ displayName: 'Bot', technicalUser: true }" [showMailToLink]="false" />
|
|
3102
|
+
* <lx-avatar [user]="inactiveUser" [disabled]="true" size="S" />
|
|
3103
|
+
* ```
|
|
3104
|
+
*/
|
|
2801
3105
|
class AvatarComponent {
|
|
2802
3106
|
constructor(imageReader) {
|
|
2803
3107
|
this.imageReader = imageReader;
|
|
3108
|
+
/**
|
|
3109
|
+
* The size of the avatar.
|
|
3110
|
+
* @default 'M'
|
|
3111
|
+
*/
|
|
2804
3112
|
this.size = 'M';
|
|
3113
|
+
/**
|
|
3114
|
+
* Whether to show a mailto link when clicking on the avatar.
|
|
3115
|
+
* @default true
|
|
3116
|
+
*/
|
|
2805
3117
|
this.showMailToLink = true;
|
|
3118
|
+
/**
|
|
3119
|
+
* Whether the avatar should appear in a disabled state.
|
|
3120
|
+
* @default false
|
|
3121
|
+
*/
|
|
2806
3122
|
this.disabled = false;
|
|
2807
3123
|
this.NAME = 'AvatarComponent';
|
|
2808
3124
|
this.imageURL = this.imageReader.getAvatar(DEFAULT_IMAGE_ID, this.size, this.user?.displayName);
|
|
@@ -2833,6 +3149,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
2833
3149
|
type: Input
|
|
2834
3150
|
}] } });
|
|
2835
3151
|
|
|
3152
|
+
/**
|
|
3153
|
+
* Avatar group component displays multiple user avatars in a compact layout.
|
|
3154
|
+
* Supports automatic overflow handling with a "+N" indicator and overlay expansion.
|
|
3155
|
+
* Includes tooltip showing all user names on hover and click-to-expand functionality.
|
|
3156
|
+
*
|
|
3157
|
+
* ### Example
|
|
3158
|
+
* @example
|
|
3159
|
+
* ```html
|
|
3160
|
+
* <lx-avatar-group [users]="teamMembers" size="M" />
|
|
3161
|
+
* <lx-avatar-group [users]="assignees" type="individual" [maxLength]="5" />
|
|
3162
|
+
* <lx-avatar-group
|
|
3163
|
+
* [users]="participants"
|
|
3164
|
+
* [title]="'Project Team'"
|
|
3165
|
+
* [disabledUserIds]="inactiveUserIds"
|
|
3166
|
+
* [autoScale]="true"
|
|
3167
|
+
* />
|
|
3168
|
+
* ```
|
|
3169
|
+
*/
|
|
2836
3170
|
class AvatarGroupComponent {
|
|
2837
3171
|
get userNames() {
|
|
2838
3172
|
return this.users
|
|
@@ -2845,11 +3179,35 @@ class AvatarGroupComponent {
|
|
|
2845
3179
|
this.zone = zone;
|
|
2846
3180
|
this.resizeObserverService = resizeObserverService;
|
|
2847
3181
|
this.NAME = 'AvatarGroupComponent';
|
|
3182
|
+
/**
|
|
3183
|
+
* Array of user objects to display as avatars.
|
|
3184
|
+
* @default []
|
|
3185
|
+
*/
|
|
2848
3186
|
this.users = [];
|
|
3187
|
+
/**
|
|
3188
|
+
* The size of all avatars in the group.
|
|
3189
|
+
* @default 'M'
|
|
3190
|
+
*/
|
|
2849
3191
|
this.size = 'M';
|
|
3192
|
+
/**
|
|
3193
|
+
* The display type: 'individual' for separate avatars or 'group' for overlapping.
|
|
3194
|
+
* @default 'group'
|
|
3195
|
+
*/
|
|
2850
3196
|
this.type = 'group';
|
|
3197
|
+
/**
|
|
3198
|
+
* Maximum number of avatars to display before showing "+N" indicator.
|
|
3199
|
+
* @default 0
|
|
3200
|
+
*/
|
|
2851
3201
|
this.maxLength = 0;
|
|
3202
|
+
/**
|
|
3203
|
+
* Whether to automatically scale down avatars to fit container width.
|
|
3204
|
+
* @default false
|
|
3205
|
+
*/
|
|
2852
3206
|
this.autoScale = false;
|
|
3207
|
+
/**
|
|
3208
|
+
* Array of user IDs that should be displayed in a disabled state.
|
|
3209
|
+
* @default []
|
|
3210
|
+
*/
|
|
2853
3211
|
this.disabledUserIds = [];
|
|
2854
3212
|
this.overlayVisible = false;
|
|
2855
3213
|
}
|
|
@@ -2923,7 +3281,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
2923
3281
|
*
|
|
2924
3282
|
*
|
|
2925
3283
|
* ### Example
|
|
2926
|
-
* @example
|
|
3284
|
+
* @example
|
|
3285
|
+
* ```html
|
|
2927
3286
|
* <lx-page-header [pageTitle]="'Agile Tracking'">
|
|
2928
3287
|
* <ui5-breadcrumbs>
|
|
2929
3288
|
* <ui5-breadcrumbs-item routerLink="/">Root Page</ui5-breadcrumbs-item>
|
|
@@ -2995,11 +3354,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
2995
3354
|
* Use skeleton loaders for pages or sections that load content progressively, like text and images. The component can
|
|
2996
3355
|
* be used to compose various scenarios like placeholders for thumbnails, lists, and avatars. See the example
|
|
2997
3356
|
* [patterns](?path=/docs/skeleton-patterns--docs) for more details.
|
|
3357
|
+
*
|
|
3358
|
+
* ### Example
|
|
3359
|
+
* @example
|
|
3360
|
+
* ```html
|
|
3361
|
+
* <lx-skeleton width="100%" height="20px" />
|
|
3362
|
+
* <lx-skeleton width="200px" height="200px" borderRadius="50%" />
|
|
3363
|
+
* <lx-skeleton width="80%" height="16px" color="dark" />
|
|
3364
|
+
* ```
|
|
2998
3365
|
*/
|
|
2999
3366
|
class SkeletonComponent {
|
|
3000
3367
|
constructor() {
|
|
3001
3368
|
/**
|
|
3002
|
-
* Color of the skeleton element. 'dark' or 'light' are supported.
|
|
3369
|
+
* Color of the skeleton element. 'dark' or 'light' are supported.
|
|
3370
|
+
* @default 'light'
|
|
3003
3371
|
*/
|
|
3004
3372
|
this.color = 'light';
|
|
3005
3373
|
}
|
|
@@ -3031,6 +3399,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
3031
3399
|
type: Input
|
|
3032
3400
|
}] } });
|
|
3033
3401
|
|
|
3402
|
+
/**
|
|
3403
|
+
* A token wrapper component used within `lx-tokenizer` to represent individual items.
|
|
3404
|
+
* The tokenizer manages visibility of tokens based on available space.
|
|
3405
|
+
*
|
|
3406
|
+
* ### Projection slots
|
|
3407
|
+
* - Default slot: The content to display inside the token (text, icons, badges, etc.)
|
|
3408
|
+
*
|
|
3409
|
+
* ### Example
|
|
3410
|
+
* @example
|
|
3411
|
+
* ```html
|
|
3412
|
+
* <lx-tokenizer>
|
|
3413
|
+
* <lx-token>Token One</lx-token>
|
|
3414
|
+
* <lx-token>Token Two</lx-token>
|
|
3415
|
+
* </lx-tokenizer>
|
|
3416
|
+
* ```
|
|
3417
|
+
*/
|
|
3034
3418
|
class TokenComponent {
|
|
3035
3419
|
constructor(elementRef) {
|
|
3036
3420
|
this.elementRef = elementRef;
|
|
@@ -3049,13 +3433,51 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
3049
3433
|
args: [{ selector: 'lx-token', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content />\n" }]
|
|
3050
3434
|
}], ctorParameters: () => [{ type: i0.ElementRef }] });
|
|
3051
3435
|
|
|
3436
|
+
/**
|
|
3437
|
+
* A companion component for `lx-tokenizer` that displays overflowing tokens in a popover.
|
|
3438
|
+
* Automatically listens to the tokenizer's overflow events and shows a popover anchored to the counter button.
|
|
3439
|
+
*
|
|
3440
|
+
* ### Projection slots
|
|
3441
|
+
* - `popoverTemplate`: Template to render inside the popover. Receives the `startIndex` of overflowing tokens as context.
|
|
3442
|
+
*
|
|
3443
|
+
* ### Example
|
|
3444
|
+
* @example
|
|
3445
|
+
* ```html
|
|
3446
|
+
* <lx-tokenizer #tokenizer [active]="true">
|
|
3447
|
+
* <lx-token>Item 1</lx-token>
|
|
3448
|
+
* <lx-token>Item 2</lx-token>
|
|
3449
|
+
* <lx-token>Item 3</lx-token>
|
|
3450
|
+
* </lx-tokenizer>
|
|
3451
|
+
*
|
|
3452
|
+
* <lx-tokenizer-overflow-popover [tokenizer]="tokenizer">
|
|
3453
|
+
* <ng-template #popoverTemplate let-startIndex>
|
|
3454
|
+
* <div class="overflow-items">
|
|
3455
|
+
* @for (item of getOverflowItems(startIndex); track item) {
|
|
3456
|
+
* <div>{{ item }}</div>
|
|
3457
|
+
* }
|
|
3458
|
+
* </div>
|
|
3459
|
+
* </ng-template>
|
|
3460
|
+
* </lx-tokenizer-overflow-popover>
|
|
3461
|
+
* ```
|
|
3462
|
+
*/
|
|
3052
3463
|
class TokenizerOverflowPopoverComponent {
|
|
3053
3464
|
constructor() {
|
|
3054
3465
|
this.destroyRef = inject(DestroyRef);
|
|
3055
3466
|
this.startIndex = signal(0);
|
|
3056
3467
|
this.changeDetectorRef = inject(ChangeDetectorRef);
|
|
3468
|
+
/**
|
|
3469
|
+
* Reference to the tokenizer component to listen for overflow events.
|
|
3470
|
+
*/
|
|
3057
3471
|
this.tokenizer = input.required();
|
|
3472
|
+
/**
|
|
3473
|
+
* Horizontal alignment of the popover relative to the counter button.
|
|
3474
|
+
* @default 'after'
|
|
3475
|
+
*/
|
|
3058
3476
|
this.horizontalAlign = input('after');
|
|
3477
|
+
/**
|
|
3478
|
+
* Vertical alignment of the popover relative to the counter button.
|
|
3479
|
+
* @default 'start'
|
|
3480
|
+
*/
|
|
3059
3481
|
this.verticalAlign = input('start');
|
|
3060
3482
|
effect(() => {
|
|
3061
3483
|
this.overflowClickSubscription?.unsubscribe();
|
|
@@ -3087,7 +3509,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
3087
3509
|
}] } });
|
|
3088
3510
|
|
|
3089
3511
|
/**
|
|
3090
|
-
*
|
|
3512
|
+
* Renders a list of items (`lx-token`) into a container and hides overflowing items behind a counter (e.g., "+4").
|
|
3513
|
+
* Automatically calculates how many tokens fit based on available width and responds to container resize events.
|
|
3514
|
+
*
|
|
3515
|
+
* ### Projection slots
|
|
3516
|
+
* - `lx-token`: Individual token items to be managed by the tokenizer
|
|
3517
|
+
*
|
|
3518
|
+
* ### Example
|
|
3519
|
+
* @example
|
|
3520
|
+
* ```html
|
|
3521
|
+
* <lx-tokenizer [active]="true" (overflowPlaceholderClick)="onOverflowClick($event)">
|
|
3522
|
+
* <lx-token>Item 1</lx-token>
|
|
3523
|
+
* <lx-token>Item 2</lx-token>
|
|
3524
|
+
* <lx-token>Item 3</lx-token>
|
|
3525
|
+
* <lx-token>Item 4</lx-token>
|
|
3526
|
+
* </lx-tokenizer>
|
|
3527
|
+
* ```
|
|
3091
3528
|
*
|
|
3092
3529
|
* ## Usage
|
|
3093
3530
|
*
|
|
@@ -3135,14 +3572,16 @@ class TokenizerComponent {
|
|
|
3135
3572
|
this.overflowItems = signal([]);
|
|
3136
3573
|
this.overflowItemCount = computed(() => this.overflowItems().length);
|
|
3137
3574
|
this.showCounter = computed(() => this.active() && this.overflowItemCount() > 0);
|
|
3138
|
-
/**
|
|
3575
|
+
/**
|
|
3576
|
+
* Enables or disables tokenization. When false, all tokens are shown regardless of available space.
|
|
3577
|
+
* @default true
|
|
3578
|
+
*/
|
|
3139
3579
|
this.active = input(true);
|
|
3140
3580
|
this.active$ = toObservable(this.active);
|
|
3141
3581
|
this.overflowStartIndex = signal(null);
|
|
3142
3582
|
/**
|
|
3143
|
-
* Emitted when the counter button is clicked
|
|
3144
|
-
*
|
|
3145
|
-
* @param counterElement The counter button element
|
|
3583
|
+
* Emitted when the overflow counter button (e.g., "+4") is clicked.
|
|
3584
|
+
* Provides the index of the first hidden token and the counter button element for positioning popovers.
|
|
3146
3585
|
*/
|
|
3147
3586
|
this.overflowPlaceholderClick = new EventEmitter();
|
|
3148
3587
|
afterRenderEffect(() => {
|
|
@@ -3350,9 +3789,37 @@ function isSupportedNode(node) {
|
|
|
3350
3789
|
return node.nodeType === Node.ELEMENT_NODE && node.nodeName !== 'SCRIPT' && node.nodeName !== 'STYLE';
|
|
3351
3790
|
}
|
|
3352
3791
|
|
|
3792
|
+
/**
|
|
3793
|
+
* Renders a dropdown item with label and optional description.
|
|
3794
|
+
* Supports text highlighting and custom styling options.
|
|
3795
|
+
*
|
|
3796
|
+
* ### Projection slots
|
|
3797
|
+
* - `optionLabelSuffix`: Template to append to the label (e.g., badges, icons)
|
|
3798
|
+
*
|
|
3799
|
+
* ### Example
|
|
3800
|
+
* @example
|
|
3801
|
+
* ```html
|
|
3802
|
+
* <lx-basic-dropdown-item
|
|
3803
|
+
* label="Option Name"
|
|
3804
|
+
* description="Additional details"
|
|
3805
|
+
* highlightTerm="search">
|
|
3806
|
+
* <ng-template #optionLabelSuffix>
|
|
3807
|
+
* <span class="badge">New</span>
|
|
3808
|
+
* </ng-template>
|
|
3809
|
+
* </lx-basic-dropdown-item>
|
|
3810
|
+
* ```
|
|
3811
|
+
*/
|
|
3353
3812
|
class BasicDropdownItemComponent {
|
|
3354
3813
|
constructor() {
|
|
3814
|
+
/**
|
|
3815
|
+
* Font weight for the label text.
|
|
3816
|
+
* @default 'bold'
|
|
3817
|
+
*/
|
|
3355
3818
|
this.labelFontWeight = 'bold';
|
|
3819
|
+
/**
|
|
3820
|
+
* Font style for the description text.
|
|
3821
|
+
* @default 'normal'
|
|
3822
|
+
*/
|
|
3356
3823
|
this.descriptionFontStyle = 'normal';
|
|
3357
3824
|
}
|
|
3358
3825
|
get hasDescription() {
|
|
@@ -3560,6 +4027,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
3560
4027
|
args: ['keyboardSelectContainer', { static: true }]
|
|
3561
4028
|
}] } });
|
|
3562
4029
|
|
|
4030
|
+
/**
|
|
4031
|
+
* A simple dropdown component for selecting a single value from a flat list of options.
|
|
4032
|
+
* Supports keyboard navigation, custom templates, infinite scrolling, and the ability to create new options.
|
|
4033
|
+
* Uses Angular CDK overlay for positioning and supports both top and bottom dropdown placement.
|
|
4034
|
+
*
|
|
4035
|
+
* ### Projection slots
|
|
4036
|
+
* - `optionTemplate`: Custom template for rendering each option
|
|
4037
|
+
* - `createNewOptionTemplate`: Custom template for the "create new option" button
|
|
4038
|
+
* - `descriptionTemplateRef`: Custom template for additional description content
|
|
4039
|
+
*
|
|
4040
|
+
* ### Example
|
|
4041
|
+
* @example
|
|
4042
|
+
* ```html
|
|
4043
|
+
* <lx-basic-dropdown
|
|
4044
|
+
* [options]="items"
|
|
4045
|
+
* [labelKey]="'name'"
|
|
4046
|
+
* [itemKey]="'id'"
|
|
4047
|
+
* [placeholder]="'Select an item'"
|
|
4048
|
+
* (onItemSelected)="handleSelection($event)">
|
|
4049
|
+
* </lx-basic-dropdown>
|
|
4050
|
+
* ```
|
|
4051
|
+
*/
|
|
3563
4052
|
class BasicDropdownComponent extends KeyboardSelectDirective {
|
|
3564
4053
|
static isNewItem(items, term, key) {
|
|
3565
4054
|
if (!term) {
|
|
@@ -3574,17 +4063,59 @@ class BasicDropdownComponent extends KeyboardSelectDirective {
|
|
|
3574
4063
|
constructor() {
|
|
3575
4064
|
super();
|
|
3576
4065
|
this.NAME = 'BasicDropdownComponent';
|
|
4066
|
+
/**
|
|
4067
|
+
* Array of options to display in the dropdown.
|
|
4068
|
+
*/
|
|
3577
4069
|
this.options = [];
|
|
4070
|
+
/**
|
|
4071
|
+
* Index of the option to be selected initially.
|
|
4072
|
+
* @default -1
|
|
4073
|
+
*/
|
|
3578
4074
|
this.initiallySelectedIndex = -1;
|
|
4075
|
+
/**
|
|
4076
|
+
* Whether the dropdown is in a loading state.
|
|
4077
|
+
* @default false
|
|
4078
|
+
*/
|
|
3579
4079
|
this.loading = false;
|
|
4080
|
+
/**
|
|
4081
|
+
* Padding variant for the dropdown items.
|
|
4082
|
+
* @default 'default'
|
|
4083
|
+
*/
|
|
3580
4084
|
this.padding = 'default';
|
|
4085
|
+
/**
|
|
4086
|
+
* Whether to show the "create new option" button.
|
|
4087
|
+
* @default false
|
|
4088
|
+
*/
|
|
3581
4089
|
this.showCreateNewOption = false;
|
|
4090
|
+
/**
|
|
4091
|
+
* Map of disabled options, keyed by the item's unique identifier.
|
|
4092
|
+
*/
|
|
3582
4093
|
this.disabledOptions = {};
|
|
4094
|
+
/**
|
|
4095
|
+
* Whether to use CDK overlay positioning.
|
|
4096
|
+
* @default false
|
|
4097
|
+
*/
|
|
3583
4098
|
this.overlayPositioning = false;
|
|
4099
|
+
/**
|
|
4100
|
+
* Whether to truncate long option text.
|
|
4101
|
+
* @default false
|
|
4102
|
+
*/
|
|
3584
4103
|
this.truncateOptions = false;
|
|
4104
|
+
/**
|
|
4105
|
+
* Event emitted when an option is selected.
|
|
4106
|
+
*/
|
|
3585
4107
|
this.onItemSelected = new EventEmitter();
|
|
4108
|
+
/**
|
|
4109
|
+
* Event emitted when the user scrolls to the bottom, triggering a request for more entries (infinite scroll).
|
|
4110
|
+
*/
|
|
3586
4111
|
this.triggerRequestForMoreEntries = new EventEmitter();
|
|
4112
|
+
/**
|
|
4113
|
+
* Event emitted when a new option label is selected (for creating new items).
|
|
4114
|
+
*/
|
|
3587
4115
|
this.newOptionLabelSelected = new EventEmitter();
|
|
4116
|
+
/**
|
|
4117
|
+
* Event emitted when the "create new option" button is clicked.
|
|
4118
|
+
*/
|
|
3588
4119
|
this.createNewOptionSelected = new EventEmitter();
|
|
3589
4120
|
this.isTopDropdown = false;
|
|
3590
4121
|
}
|
|
@@ -3761,13 +4292,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
3761
4292
|
}]
|
|
3762
4293
|
}], ctorParameters: () => [{ type: i0.ElementRef }] });
|
|
3763
4294
|
|
|
4295
|
+
/**
|
|
4296
|
+
* Groups options under a labeled section inside dropdowns.
|
|
4297
|
+
* Used to organize related options within OptionsDropdownComponent, SingleSelectComponent, or MultiSelectComponent.
|
|
4298
|
+
*
|
|
4299
|
+
* ### Projection slots
|
|
4300
|
+
* - Default slot: Option components (`lx-option`) to group together.
|
|
4301
|
+
*
|
|
4302
|
+
* ### Example
|
|
4303
|
+
* @example
|
|
4304
|
+
* ```html
|
|
4305
|
+
* <lx-option-group label="Recent Items" [hasSelectedState]="true">
|
|
4306
|
+
* <lx-option [value]="1">Item 1</lx-option>
|
|
4307
|
+
* <lx-option [value]="2">Item 2</lx-option>
|
|
4308
|
+
* </lx-option-group>
|
|
4309
|
+
* ```
|
|
4310
|
+
*/
|
|
3764
4311
|
class OptionGroupComponent {
|
|
3765
4312
|
constructor() {
|
|
3766
4313
|
/**
|
|
3767
|
-
*
|
|
3768
|
-
*
|
|
4314
|
+
* Whether option children have a selected state.
|
|
4315
|
+
* When true, aligns the padding of the group label with the options.
|
|
4316
|
+
* @default true
|
|
3769
4317
|
*/
|
|
3770
4318
|
this.hasSelectedState = true;
|
|
4319
|
+
/**
|
|
4320
|
+
* Event emitted when an option within the group is selected.
|
|
4321
|
+
* Emits the selected option's value.
|
|
4322
|
+
*/
|
|
3771
4323
|
this.select = new EventEmitter();
|
|
3772
4324
|
}
|
|
3773
4325
|
selectOption(value) {
|
|
@@ -3787,6 +4339,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
3787
4339
|
type: Output
|
|
3788
4340
|
}] } });
|
|
3789
4341
|
|
|
4342
|
+
/**
|
|
4343
|
+
* Individual option used inside OptionsDropdownComponent, SingleSelectComponent, or MultiSelectComponent.
|
|
4344
|
+
* Can be used standalone or grouped within an OptionGroupComponent for organized selections.
|
|
4345
|
+
*/
|
|
3790
4346
|
class OptionComponent {
|
|
3791
4347
|
selectOption(event) {
|
|
3792
4348
|
if (this.disabled || this.hasSubdropdown) {
|
|
@@ -3807,8 +4363,20 @@ class OptionComponent {
|
|
|
3807
4363
|
constructor(group, elementRef) {
|
|
3808
4364
|
this.group = group;
|
|
3809
4365
|
this.elementRef = elementRef;
|
|
4366
|
+
/**
|
|
4367
|
+
* Whether the option is currently selected.
|
|
4368
|
+
* @default false
|
|
4369
|
+
*/
|
|
3810
4370
|
this.selected = false;
|
|
4371
|
+
/**
|
|
4372
|
+
* Whether the option is currently highlighted (e.g., via keyboard navigation).
|
|
4373
|
+
* @default false
|
|
4374
|
+
*/
|
|
3811
4375
|
this.isHighlighted = false;
|
|
4376
|
+
/**
|
|
4377
|
+
* Whether the option is disabled and cannot be interacted with.
|
|
4378
|
+
* @default false
|
|
4379
|
+
*/
|
|
3812
4380
|
this.disabled = false;
|
|
3813
4381
|
/**
|
|
3814
4382
|
* Is true when option has a selection nature like sorting.
|
|
@@ -3816,16 +4384,37 @@ class OptionComponent {
|
|
|
3816
4384
|
*
|
|
3817
4385
|
* Is false when option represents a one time action like printing.
|
|
3818
4386
|
* Cannot have selectedState when Option has dropdown
|
|
4387
|
+
* @default true
|
|
3819
4388
|
*/
|
|
3820
4389
|
this.hasSelectedState = true;
|
|
3821
4390
|
/**
|
|
4391
|
+
* The icon used to indicate selection state.
|
|
4392
|
+
* @default 'check'
|
|
3822
4393
|
* @deprecated Use the default `'check'` value. The `'circle'` option is deprecated and will be removed in a future release.
|
|
3823
4394
|
*/
|
|
3824
4395
|
this.selectIcon = 'check';
|
|
4396
|
+
/**
|
|
4397
|
+
* Event emitted when the option is selected.
|
|
4398
|
+
* Emits the option's value.
|
|
4399
|
+
*/
|
|
3825
4400
|
this.select = new EventEmitter();
|
|
4401
|
+
/**
|
|
4402
|
+
* Event emitted when the option's highlight state changes.
|
|
4403
|
+
* Emits a boolean indicating the new highlight state.
|
|
4404
|
+
*/
|
|
3826
4405
|
this.highlight = new EventEmitter();
|
|
4406
|
+
/**
|
|
4407
|
+
* Event emitted when an already selected option is clicked.
|
|
4408
|
+
*/
|
|
3827
4409
|
this.selectedClick = new EventEmitter();
|
|
4410
|
+
/**
|
|
4411
|
+
* Event emitted when a keyboard event occurs on the option.
|
|
4412
|
+
* Emits the KeyboardEvent for parent handling.
|
|
4413
|
+
*/
|
|
3828
4414
|
this.keyDownAction = new EventEmitter();
|
|
4415
|
+
/**
|
|
4416
|
+
* Event emitted when the mouse enters the option area.
|
|
4417
|
+
*/
|
|
3829
4418
|
this.mouseEnter = new EventEmitter();
|
|
3830
4419
|
this.hasSubdropdown = false;
|
|
3831
4420
|
this.isSuboption = false;
|
|
@@ -3915,6 +4504,24 @@ const TOP_RIGHT_POSITION$1 = {
|
|
|
3915
4504
|
};
|
|
3916
4505
|
const LEFT_ALIGN_POSITIONS$1 = [BOTTOM_LEFT_POSITION$1, TOP_LEFT_POSITION$1, BOTTOM_RIGHT_POSITION$1, TOP_RIGHT_POSITION$1];
|
|
3917
4506
|
const RIGHT_ALIGN_POSITIONS$1 = [BOTTOM_RIGHT_POSITION$1, TOP_RIGHT_POSITION$1, BOTTOM_LEFT_POSITION$1, TOP_LEFT_POSITION$1];
|
|
4507
|
+
/**
|
|
4508
|
+
* A dropdown component using CDK Overlay with keyboard navigation support.
|
|
4509
|
+
* Manages option selection, highlighting, and sub-dropdown interactions.
|
|
4510
|
+
*
|
|
4511
|
+
* ### Projection slots
|
|
4512
|
+
* - `[lxKeyboardActionSource]`: The trigger element (e.g., button) that opens the dropdown.
|
|
4513
|
+
* - Default slot: Dropdown options (`lx-option` components).
|
|
4514
|
+
*
|
|
4515
|
+
* ### Example
|
|
4516
|
+
* @example
|
|
4517
|
+
* ```html
|
|
4518
|
+
* <lx-cdk-options-dropdown [open]="isOpen" align="left" maxHeight="300px">
|
|
4519
|
+
* <button lxKeyboardActionSource>Select Option</button>
|
|
4520
|
+
* <lx-option [value]="1">Option 1</lx-option>
|
|
4521
|
+
* <lx-option [value]="2">Option 2</lx-option>
|
|
4522
|
+
* </lx-cdk-options-dropdown>
|
|
4523
|
+
* ```
|
|
4524
|
+
*/
|
|
3918
4525
|
class CdkOptionsDropdownComponent {
|
|
3919
4526
|
set open(value) {
|
|
3920
4527
|
if (this.disabled) {
|
|
@@ -3939,9 +4546,25 @@ class CdkOptionsDropdownComponent {
|
|
|
3939
4546
|
}
|
|
3940
4547
|
constructor(changeDetection) {
|
|
3941
4548
|
this.changeDetection = changeDetection;
|
|
4549
|
+
/**
|
|
4550
|
+
* Horizontal alignment of the dropdown relative to its trigger.
|
|
4551
|
+
* @default 'right'
|
|
4552
|
+
*/
|
|
3942
4553
|
this.align = 'right';
|
|
4554
|
+
/**
|
|
4555
|
+
* Whether to close the dropdown when the window is scrolled.
|
|
4556
|
+
* @default false
|
|
4557
|
+
*/
|
|
3943
4558
|
this.closeOnScroll = false;
|
|
4559
|
+
/**
|
|
4560
|
+
* Whether the dropdown trigger is disabled.
|
|
4561
|
+
* @default false
|
|
4562
|
+
*/
|
|
3944
4563
|
this.disabled = false;
|
|
4564
|
+
/**
|
|
4565
|
+
* Maximum height of the dropdown container. Use 'none' for no limit.
|
|
4566
|
+
* @default 'none'
|
|
4567
|
+
*/
|
|
3945
4568
|
this.maxHeight = 'none';
|
|
3946
4569
|
this.highlightedOptionIndex$ = new BehaviorSubject(0);
|
|
3947
4570
|
this._open = false;
|
|
@@ -4101,12 +4724,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
4101
4724
|
/**
|
|
4102
4725
|
* @deprecated Use the `ui5-breadcrumbs` instead.
|
|
4103
4726
|
*
|
|
4104
|
-
* Breadcrumb component
|
|
4727
|
+
* Breadcrumb component displays a list of labels showing the navigation path.
|
|
4728
|
+
* Supports ellipsing consecutive items into a dropdown for space efficiency.
|
|
4729
|
+
*
|
|
4730
|
+
* ### Example
|
|
4731
|
+
* @example
|
|
4732
|
+
* ```html
|
|
4733
|
+
* <lx-breadcrumb [breadcrumbs]="breadcrumbs"></lx-breadcrumb>
|
|
4734
|
+
* ```
|
|
4735
|
+
*
|
|
4736
|
+
* ```ts
|
|
4737
|
+
* breadcrumbs: Breadcrumb[] = [
|
|
4738
|
+
* { label: 'Home', onClick: (b) => this.navigate(b) },
|
|
4739
|
+
* { label: 'Products', onClick: (b) => this.navigate(b) },
|
|
4740
|
+
* { label: 'Category', ellipsed: true },
|
|
4741
|
+
* { label: 'Subcategory', ellipsed: true },
|
|
4742
|
+
* { label: 'Item Details' }
|
|
4743
|
+
* ];
|
|
4744
|
+
* ```
|
|
4105
4745
|
*/
|
|
4106
4746
|
class BreadcrumbComponent {
|
|
4107
4747
|
constructor() {
|
|
4108
4748
|
/**
|
|
4109
|
-
*
|
|
4749
|
+
* Array of breadcrumb items to display. Consecutive items with `ellipsed: true` are grouped into a dropdown.
|
|
4750
|
+
* @default []
|
|
4110
4751
|
*/
|
|
4111
4752
|
this.breadcrumbs = [];
|
|
4112
4753
|
/** @internal */
|
|
@@ -4179,9 +4820,29 @@ const TOP_RIGHT_POSITION = {
|
|
|
4179
4820
|
};
|
|
4180
4821
|
const LEFT_ALIGN_POSITIONS = [BOTTOM_LEFT_POSITION, TOP_LEFT_POSITION, BOTTOM_RIGHT_POSITION, TOP_RIGHT_POSITION];
|
|
4181
4822
|
const RIGHT_ALIGN_POSITIONS = [BOTTOM_RIGHT_POSITION, TOP_RIGHT_POSITION, BOTTOM_LEFT_POSITION, TOP_LEFT_POSITION];
|
|
4823
|
+
/**
|
|
4824
|
+
* A nested sub-dropdown that appears next to a parent option.
|
|
4825
|
+
* Opens on hover or keyboard navigation and supports both mouse and keyboard interactions.
|
|
4826
|
+
*
|
|
4827
|
+
* ### Projection slots
|
|
4828
|
+
* - Default slot: Nested dropdown options (`lx-option` components).
|
|
4829
|
+
*
|
|
4830
|
+
* ### Example
|
|
4831
|
+
* @example
|
|
4832
|
+
* ```html
|
|
4833
|
+
* <lx-cdk-options-sub-dropdown [trigger]="parentOption" align="right">
|
|
4834
|
+
* <lx-option [value]="1">Sub-option 1</lx-option>
|
|
4835
|
+
* <lx-option [value]="2">Sub-option 2</lx-option>
|
|
4836
|
+
* </lx-cdk-options-sub-dropdown>
|
|
4837
|
+
* ```
|
|
4838
|
+
*/
|
|
4182
4839
|
class CdkOptionsSubDropdownComponent {
|
|
4183
4840
|
constructor(changeDetection) {
|
|
4184
4841
|
this.changeDetection = changeDetection;
|
|
4842
|
+
/**
|
|
4843
|
+
* Horizontal alignment of the sub-dropdown relative to the trigger option.
|
|
4844
|
+
* @default 'right'
|
|
4845
|
+
*/
|
|
4185
4846
|
this.align = 'right';
|
|
4186
4847
|
this.open = false;
|
|
4187
4848
|
this.isPositionComputed = true;
|
|
@@ -4412,6 +5073,18 @@ const CURRENCY_SYMBOL_MAP = {
|
|
|
4412
5073
|
ZWD: 'ZWD'
|
|
4413
5074
|
};
|
|
4414
5075
|
|
|
5076
|
+
/**
|
|
5077
|
+
* Displays a currency symbol based on an ISO currency code.
|
|
5078
|
+
*
|
|
5079
|
+
* Converts currency codes (e.g., 'USD', 'EUR') to their symbolic representations ($, €).
|
|
5080
|
+
*
|
|
5081
|
+
* ### Example
|
|
5082
|
+
* @example
|
|
5083
|
+
* ```html
|
|
5084
|
+
* <lx-currency-symbol [code]="'USD'"></lx-currency-symbol>
|
|
5085
|
+
* <lx-currency-symbol [code]="'EUR'"></lx-currency-symbol>
|
|
5086
|
+
* ```
|
|
5087
|
+
*/
|
|
4415
5088
|
class CurrencySymbolComponent {
|
|
4416
5089
|
ngOnInit() {
|
|
4417
5090
|
this.currency$ = this.code$.pipe(map((code) => CURRENCY_SYMBOL_MAP[code] || code));
|
|
@@ -4429,20 +5102,69 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
4429
5102
|
type: Input
|
|
4430
5103
|
}], code$: [] } });
|
|
4431
5104
|
|
|
5105
|
+
/**
|
|
5106
|
+
* Currency input field with locale-aware formatting and validation.
|
|
5107
|
+
*
|
|
5108
|
+
* Supports both view and edit modes with configurable currency symbols, decimal separators, and number types.
|
|
5109
|
+
*
|
|
5110
|
+
* ### Example
|
|
5111
|
+
* @example
|
|
5112
|
+
* ```html
|
|
5113
|
+
* <lx-currency-input
|
|
5114
|
+
* [code]="'USD'"
|
|
5115
|
+
* [data]="1234.56"
|
|
5116
|
+
* [mode]="'edit'"
|
|
5117
|
+
* [fieldDefinitionType]="'DOUBLE'"
|
|
5118
|
+
* [decimalSeparator]="'.'"
|
|
5119
|
+
* [iconPosition]="'first'"
|
|
5120
|
+
* (onChange)="handleValueChange($event)"
|
|
5121
|
+
* ></lx-currency-input>
|
|
5122
|
+
* ```
|
|
5123
|
+
*/
|
|
4432
5124
|
class CurrencyInputComponent {
|
|
4433
5125
|
get allowedCharacters() {
|
|
4434
5126
|
return this.fieldDefinitionType === 'DOUBLE' ? new RegExp(`[0-9\e\\${this.decimalSeparator}\]`) : /[0-9\e\\]/;
|
|
4435
5127
|
}
|
|
4436
5128
|
constructor(changeDetector) {
|
|
4437
5129
|
this.changeDetector = changeDetector;
|
|
5130
|
+
/**
|
|
5131
|
+
* Character used as decimal separator in input.
|
|
5132
|
+
* @default '.'
|
|
5133
|
+
*/
|
|
4438
5134
|
this.decimalSeparator = '.';
|
|
5135
|
+
/**
|
|
5136
|
+
* The numeric value of the input.
|
|
5137
|
+
* @default 0
|
|
5138
|
+
*/
|
|
4439
5139
|
this.data = 0;
|
|
5140
|
+
/**
|
|
5141
|
+
* Whether the input is disabled.
|
|
5142
|
+
* @default false
|
|
5143
|
+
*/
|
|
4440
5144
|
this.disabled = false;
|
|
5145
|
+
/**
|
|
5146
|
+
* Display mode of the component.
|
|
5147
|
+
* @default 'edit'
|
|
5148
|
+
*/
|
|
4441
5149
|
this.mode = 'edit';
|
|
5150
|
+
/**
|
|
5151
|
+
* Position of the currency symbol relative to the value.
|
|
5152
|
+
* @default 'first'
|
|
5153
|
+
*/
|
|
4442
5154
|
this.iconPosition = 'first';
|
|
5155
|
+
/**
|
|
5156
|
+
* Angular decimal pipe format string.
|
|
5157
|
+
* @default '1.2-2'
|
|
5158
|
+
*/
|
|
4443
5159
|
this.format = '1.2-2';
|
|
5160
|
+
/**
|
|
5161
|
+
* Whether to visually mark the input as invalid.
|
|
5162
|
+
* @default false
|
|
5163
|
+
*/
|
|
4444
5164
|
this.markInvalid = false;
|
|
5165
|
+
/** Emitted when the input loses focus. */
|
|
4445
5166
|
this.onFocusLost = new EventEmitter();
|
|
5167
|
+
/** Emitted when the numeric value changes. */
|
|
4446
5168
|
this.onChange = new EventEmitter();
|
|
4447
5169
|
/** @internal */
|
|
4448
5170
|
this.showCurrencyInput = false;
|
|
@@ -4622,10 +5344,22 @@ class DateFormatter {
|
|
|
4622
5344
|
}
|
|
4623
5345
|
|
|
4624
5346
|
/* tslint:disable: max-file-line-count */
|
|
5347
|
+
/**
|
|
5348
|
+
* Core datepicker component managing date selection logic.
|
|
5349
|
+
*
|
|
5350
|
+
* Provides the underlying logic for day, month, and year selection modes.
|
|
5351
|
+
* Used internally by DatePickerComponent.
|
|
5352
|
+
*
|
|
5353
|
+
* ### Projection slots
|
|
5354
|
+
* - Default slot: Child picker components (daypicker, monthpicker, yearpicker).
|
|
5355
|
+
*/
|
|
4625
5356
|
class DatePickerInnerComponent {
|
|
4626
5357
|
constructor() {
|
|
5358
|
+
/** Emitted when a date is selected. */
|
|
4627
5359
|
this.selectionDone = new EventEmitter(undefined);
|
|
5360
|
+
/** Emitted when active date is updated. */
|
|
4628
5361
|
this.update = new EventEmitter(false);
|
|
5362
|
+
/** Emitted when active date changes. */
|
|
4629
5363
|
this.activeDateChange = new EventEmitter(undefined);
|
|
4630
5364
|
/* tslint:disable-next-line: no-any*/
|
|
4631
5365
|
this.stepDay = {};
|
|
@@ -4933,6 +5667,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
4933
5667
|
|
|
4934
5668
|
const isBs3 = () => true;
|
|
4935
5669
|
|
|
5670
|
+
/**
|
|
5671
|
+
* Day selection view for the datepicker.
|
|
5672
|
+
*
|
|
5673
|
+
* Displays a calendar grid for selecting individual days within a month.
|
|
5674
|
+
* Used internally by DatePickerInnerComponent.
|
|
5675
|
+
*/
|
|
4936
5676
|
class DayPickerComponent {
|
|
4937
5677
|
constructor(datePicker) {
|
|
4938
5678
|
this.labels = [];
|
|
@@ -5025,13 +5765,16 @@ class DayPickerComponent {
|
|
|
5025
5765
|
<tr>
|
|
5026
5766
|
<th>
|
|
5027
5767
|
<button
|
|
5768
|
+
lx-button
|
|
5028
5769
|
type="button"
|
|
5770
|
+
color="primary"
|
|
5771
|
+
mode="ghost"
|
|
5772
|
+
[square]="true"
|
|
5773
|
+
icon="navigation-left-arrow"
|
|
5029
5774
|
class="btn btn-default btn-secondary btn-sm pull-left float-left"
|
|
5030
5775
|
(click)="datePicker.move(-1)"
|
|
5031
5776
|
tabindex="-1"
|
|
5032
|
-
>
|
|
5033
|
-
{{ isBs4 ? '<' : '‹' }}
|
|
5034
|
-
</button>
|
|
5777
|
+
></button>
|
|
5035
5778
|
</th>
|
|
5036
5779
|
<th [attr.colspan]="5 + (datePicker.showWeeks ? 1 : 0)">
|
|
5037
5780
|
<button
|
|
@@ -5049,13 +5792,16 @@ class DayPickerComponent {
|
|
|
5049
5792
|
</th>
|
|
5050
5793
|
<th>
|
|
5051
5794
|
<button
|
|
5795
|
+
lx-button
|
|
5052
5796
|
type="button"
|
|
5797
|
+
color="primary"
|
|
5798
|
+
mode="ghost"
|
|
5799
|
+
[square]="true"
|
|
5800
|
+
icon="navigation-right-arrow"
|
|
5053
5801
|
class="btn btn-default btn-secondary btn-sm pull-right float-right"
|
|
5054
5802
|
(click)="datePicker.move(1)"
|
|
5055
5803
|
tabindex="-1"
|
|
5056
|
-
>
|
|
5057
|
-
{{ isBs4 ? '>' : '›' }}
|
|
5058
|
-
</button>
|
|
5804
|
+
></button>
|
|
5059
5805
|
</th>
|
|
5060
5806
|
</tr>
|
|
5061
5807
|
<tr>
|
|
@@ -5116,7 +5862,7 @@ class DayPickerComponent {
|
|
|
5116
5862
|
</tbody>
|
|
5117
5863
|
</table>
|
|
5118
5864
|
}
|
|
5119
|
-
`, isInline: true, styles: [":host .btn-secondary{color:#292b2c;background-color:#fff;border-color:#ccc}:host .btn-info .text-muted{color:#292b2c!important}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
|
|
5865
|
+
`, isInline: true, styles: [":host .btn-secondary:not([lx-button]){color:#292b2c;background-color:#fff;border-color:#ccc}:host .btn-info .text-muted{color:#292b2c!important}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ButtonComponent, selector: "button[lx-button]", inputs: ["size", "color", "mode", "pressed", "selected", "square", "circle", "disabled", "icon", "endIcon", "showSpinner"] }] }); }
|
|
5120
5866
|
}
|
|
5121
5867
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: DayPickerComponent, decorators: [{
|
|
5122
5868
|
type: Component,
|
|
@@ -5127,13 +5873,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
5127
5873
|
<tr>
|
|
5128
5874
|
<th>
|
|
5129
5875
|
<button
|
|
5876
|
+
lx-button
|
|
5130
5877
|
type="button"
|
|
5878
|
+
color="primary"
|
|
5879
|
+
mode="ghost"
|
|
5880
|
+
[square]="true"
|
|
5881
|
+
icon="navigation-left-arrow"
|
|
5131
5882
|
class="btn btn-default btn-secondary btn-sm pull-left float-left"
|
|
5132
5883
|
(click)="datePicker.move(-1)"
|
|
5133
5884
|
tabindex="-1"
|
|
5134
|
-
>
|
|
5135
|
-
{{ isBs4 ? '<' : '‹' }}
|
|
5136
|
-
</button>
|
|
5885
|
+
></button>
|
|
5137
5886
|
</th>
|
|
5138
5887
|
<th [attr.colspan]="5 + (datePicker.showWeeks ? 1 : 0)">
|
|
5139
5888
|
<button
|
|
@@ -5151,13 +5900,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
5151
5900
|
</th>
|
|
5152
5901
|
<th>
|
|
5153
5902
|
<button
|
|
5903
|
+
lx-button
|
|
5154
5904
|
type="button"
|
|
5905
|
+
color="primary"
|
|
5906
|
+
mode="ghost"
|
|
5907
|
+
[square]="true"
|
|
5908
|
+
icon="navigation-right-arrow"
|
|
5155
5909
|
class="btn btn-default btn-secondary btn-sm pull-right float-right"
|
|
5156
5910
|
(click)="datePicker.move(1)"
|
|
5157
5911
|
tabindex="-1"
|
|
5158
|
-
>
|
|
5159
|
-
{{ isBs4 ? '>' : '›' }}
|
|
5160
|
-
</button>
|
|
5912
|
+
></button>
|
|
5161
5913
|
</th>
|
|
5162
5914
|
</tr>
|
|
5163
5915
|
<tr>
|
|
@@ -5218,9 +5970,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
5218
5970
|
</tbody>
|
|
5219
5971
|
</table>
|
|
5220
5972
|
}
|
|
5221
|
-
`, imports: [NgClass], styles: [":host .btn-secondary{color:#292b2c;background-color:#fff;border-color:#ccc}:host .btn-info .text-muted{color:#292b2c!important}\n"] }]
|
|
5973
|
+
`, imports: [NgClass, ButtonComponent], styles: [":host .btn-secondary:not([lx-button]){color:#292b2c;background-color:#fff;border-color:#ccc}:host .btn-info .text-muted{color:#292b2c!important}\n"] }]
|
|
5222
5974
|
}], ctorParameters: () => [{ type: DatePickerInnerComponent }] });
|
|
5223
5975
|
|
|
5976
|
+
/**
|
|
5977
|
+
* Month selection view for the datepicker.
|
|
5978
|
+
*
|
|
5979
|
+
* Displays a grid of months for selecting a month within a year.
|
|
5980
|
+
* Used internally by DatePickerInnerComponent.
|
|
5981
|
+
*/
|
|
5224
5982
|
class MonthPickerComponent {
|
|
5225
5983
|
constructor(datePicker) {
|
|
5226
5984
|
this.rows = [];
|
|
@@ -5385,6 +6143,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
5385
6143
|
|
|
5386
6144
|
// @deprecated
|
|
5387
6145
|
// tslint:disable
|
|
6146
|
+
/**
|
|
6147
|
+
* Year selection view for the datepicker.
|
|
6148
|
+
*
|
|
6149
|
+
* Displays a grid of years for selecting a year within a range.
|
|
6150
|
+
* Used internally by DatePickerInnerComponent.
|
|
6151
|
+
*/
|
|
5388
6152
|
class YearPickerComponent {
|
|
5389
6153
|
constructor(datePicker) {
|
|
5390
6154
|
this.rows = [];
|
|
@@ -5776,74 +6540,176 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
5776
6540
|
const DEFAULT_MIN_DATE = new Date('0000-01-01');
|
|
5777
6541
|
const DEFAULT_MAX_DATE = new Date('9999-12-31');
|
|
5778
6542
|
/**
|
|
5779
|
-
*
|
|
6543
|
+
* Date input with integrated datepicker dropdown.
|
|
6544
|
+
*
|
|
6545
|
+
* Supports multiple rendering styles (input, link, button) and flexible date range restrictions.
|
|
6546
|
+
*
|
|
6547
|
+
* ### Projection slots
|
|
6548
|
+
* - `dateStringTemplate`: Custom template for displaying the date string when `renderingStyle` is 'BUTTON'.
|
|
6549
|
+
*
|
|
6550
|
+
* ### Example
|
|
6551
|
+
* @example
|
|
6552
|
+
* ```html
|
|
6553
|
+
* <lx-date-input
|
|
6554
|
+
* [(date)]="selectedDate"
|
|
6555
|
+
* [minDate]="minDate"
|
|
6556
|
+
* [maxDate]="maxDate"
|
|
6557
|
+
* [renderingStyle]="'INPUT'"
|
|
6558
|
+
* [placeholder]="'Select a date'"
|
|
6559
|
+
* (dateChange)="onDateSelected($event)"
|
|
6560
|
+
* ></lx-date-input>
|
|
6561
|
+
* ```
|
|
5780
6562
|
*/
|
|
5781
6563
|
class DateInputComponent {
|
|
5782
6564
|
constructor(cd, dateFormatsProvider, getDateFnLocale) {
|
|
5783
6565
|
this.cd = cd;
|
|
5784
6566
|
this.dateFormatsProvider = dateFormatsProvider;
|
|
5785
6567
|
this.getDateFnLocale = getDateFnLocale;
|
|
5786
|
-
/**
|
|
6568
|
+
/**
|
|
6569
|
+
* The initial date value for the date input field. This is used for `ngModel` and `formControl`.
|
|
6570
|
+
* @default null
|
|
6571
|
+
*/
|
|
5787
6572
|
this.date = null;
|
|
5788
|
-
/**
|
|
6573
|
+
/**
|
|
6574
|
+
* Secondary, alternative input with date string (format: 'yyyy-mm-dd').
|
|
6575
|
+
* @default null
|
|
6576
|
+
*/
|
|
5789
6577
|
this.dateString = null;
|
|
5790
|
-
/**
|
|
6578
|
+
/**
|
|
6579
|
+
* Determines whether formGroup's value accessor uses Date objects or date strings.
|
|
6580
|
+
* @default 'date'
|
|
6581
|
+
*/
|
|
5791
6582
|
this.valueAccessor = 'date';
|
|
5792
|
-
/**
|
|
6583
|
+
/**
|
|
6584
|
+
* ID to be set on input to correspond to outside label.
|
|
6585
|
+
* @default ''
|
|
6586
|
+
*/
|
|
5793
6587
|
this.inputId = '';
|
|
5794
|
-
/**
|
|
6588
|
+
/**
|
|
6589
|
+
* The rendering style of the date input component.
|
|
6590
|
+
* @default 'INPUT'
|
|
6591
|
+
*/
|
|
5795
6592
|
this.renderingStyle = 'INPUT';
|
|
5796
|
-
/**
|
|
6593
|
+
/**
|
|
6594
|
+
* The placeholder text to show in the date input field when there is no date selected.
|
|
6595
|
+
* @default 'yyyy-mm-dd'
|
|
6596
|
+
*/
|
|
5797
6597
|
this.placeholder = 'yyyy-mm-dd';
|
|
5798
|
-
/**
|
|
6598
|
+
/**
|
|
6599
|
+
* Use CDK overlay for datepicker positioning. Set to false to use legacy positioning.
|
|
6600
|
+
* @default true
|
|
6601
|
+
*/
|
|
5799
6602
|
this.cdk = true;
|
|
5800
|
-
/**
|
|
6603
|
+
/**
|
|
6604
|
+
* Sets datepicker mode, supports: 'day', 'month', 'year'.
|
|
6605
|
+
* @default 'day'
|
|
6606
|
+
*/
|
|
5801
6607
|
this.datepickerMode = 'day';
|
|
5802
|
-
/**
|
|
6608
|
+
/**
|
|
6609
|
+
* Oldest selectable date.
|
|
6610
|
+
* @default new Date('0000-01-01')
|
|
6611
|
+
*/
|
|
5803
6612
|
this.minDate = DEFAULT_MIN_DATE;
|
|
5804
|
-
/**
|
|
6613
|
+
/**
|
|
6614
|
+
* Latest selectable date.
|
|
6615
|
+
* @default new Date('9999-12-31')
|
|
6616
|
+
*/
|
|
5805
6617
|
this.maxDate = DEFAULT_MAX_DATE;
|
|
5806
|
-
/**
|
|
6618
|
+
/**
|
|
6619
|
+
* Set lower datepicker mode, supports: 'day', 'month', 'year'.
|
|
6620
|
+
* @default 'day'
|
|
6621
|
+
*/
|
|
5807
6622
|
this.minMode = 'day';
|
|
5808
|
-
/**
|
|
6623
|
+
/**
|
|
6624
|
+
* Sets upper datepicker mode, supports: 'day', 'month', 'year'.
|
|
6625
|
+
* @default 'year'
|
|
6626
|
+
*/
|
|
5809
6627
|
this.maxMode = 'year';
|
|
5810
|
-
/**
|
|
6628
|
+
/**
|
|
6629
|
+
* If false week numbers will be hidden in day picker.
|
|
6630
|
+
* @default true
|
|
6631
|
+
*/
|
|
5811
6632
|
this.showWeeks = true;
|
|
5812
|
-
/**
|
|
6633
|
+
/**
|
|
6634
|
+
* Format of day in month (date-fns format).
|
|
6635
|
+
* @default 'dd'
|
|
6636
|
+
*/
|
|
5813
6637
|
this.formatDay = 'dd';
|
|
5814
|
-
/**
|
|
6638
|
+
/**
|
|
6639
|
+
* Format of month in year (date-fns format).
|
|
6640
|
+
* @default 'MMMM'
|
|
6641
|
+
*/
|
|
5815
6642
|
this.formatMonth = 'MMMM';
|
|
5816
|
-
/**
|
|
6643
|
+
/**
|
|
6644
|
+
* Format of year in year range (date-fns format).
|
|
6645
|
+
* @default 'yyyy'
|
|
6646
|
+
*/
|
|
5817
6647
|
this.formatYear = 'yyyy';
|
|
5818
|
-
/**
|
|
6648
|
+
/**
|
|
6649
|
+
* Format of day in week header (date-fns format).
|
|
6650
|
+
* @default 'EE'
|
|
6651
|
+
*/
|
|
5819
6652
|
this.formatDayHeader = 'EE';
|
|
5820
|
-
/**
|
|
6653
|
+
/**
|
|
6654
|
+
* Format of title when selecting day (date-fns format).
|
|
6655
|
+
* @default 'MMMM yyyy'
|
|
6656
|
+
*/
|
|
5821
6657
|
this.formatDayTitle = 'MMMM yyyy';
|
|
5822
|
-
/**
|
|
6658
|
+
/**
|
|
6659
|
+
* Format of title when selecting month (date-fns format).
|
|
6660
|
+
* @default 'yyyy'
|
|
6661
|
+
*/
|
|
5823
6662
|
this.formatMonthTitle = 'yyyy';
|
|
5824
|
-
/**
|
|
6663
|
+
/**
|
|
6664
|
+
* Starting day of the week from 0-6 (0=Sunday, 6=Saturday).
|
|
6665
|
+
* @default 0
|
|
6666
|
+
*/
|
|
5825
6667
|
this.startingDay = 0;
|
|
5826
|
-
/**
|
|
6668
|
+
/**
|
|
6669
|
+
* Number of years displayed in year selection.
|
|
6670
|
+
* @default 20
|
|
6671
|
+
*/
|
|
5827
6672
|
this.yearRange = 20;
|
|
5828
|
-
/**
|
|
6673
|
+
/**
|
|
6674
|
+
* If true only dates from the currently displayed month will be shown.
|
|
6675
|
+
* @default false
|
|
6676
|
+
*/
|
|
5829
6677
|
this.onlyCurrentMonth = false;
|
|
5830
|
-
/**
|
|
6678
|
+
/**
|
|
6679
|
+
* If true shortcut event propagation will be disabled.
|
|
6680
|
+
* @default false
|
|
6681
|
+
*/
|
|
5831
6682
|
this.shortcutPropagation = false;
|
|
5832
|
-
/**
|
|
6683
|
+
/**
|
|
6684
|
+
* Array of custom css classes to be applied to specific dates.
|
|
6685
|
+
* @default []
|
|
6686
|
+
*/
|
|
5833
6687
|
this.customClass = [];
|
|
5834
|
-
/**
|
|
6688
|
+
/**
|
|
6689
|
+
* Array of disabled dates with mode specification.
|
|
6690
|
+
* @default []
|
|
6691
|
+
*/
|
|
5835
6692
|
this.dateDisabled = [];
|
|
5836
|
-
/**
|
|
6693
|
+
/**
|
|
6694
|
+
* If true, the date input field will be auto-focused when the component is first rendered.
|
|
6695
|
+
* @default false
|
|
6696
|
+
*/
|
|
5837
6697
|
this.autoFocus = false;
|
|
5838
|
-
/**
|
|
6698
|
+
/**
|
|
6699
|
+
* If true, the date input field will be marked as invalid.
|
|
6700
|
+
* @default false
|
|
6701
|
+
*/
|
|
5839
6702
|
this.markInvalid = false;
|
|
5840
|
-
/**
|
|
6703
|
+
/**
|
|
6704
|
+
* Also emit dateStringChange on invalid date string.
|
|
6705
|
+
* @default false
|
|
6706
|
+
*/
|
|
5841
6707
|
this.alwaysEmitDateString = false;
|
|
5842
|
-
/**
|
|
6708
|
+
/** Emitted whenever the datepicker is closed. */
|
|
5843
6709
|
this.closeDateInput = new EventEmitter();
|
|
5844
|
-
/**
|
|
6710
|
+
/** Emitted whenever the date string changes. */
|
|
5845
6711
|
this.dateStringChange = new EventEmitter();
|
|
5846
|
-
/**
|
|
6712
|
+
/** Emitted whenever the date changes. */
|
|
5847
6713
|
this.dateChange = new EventEmitter();
|
|
5848
6714
|
/** @internal */
|
|
5849
6715
|
this.showDatepicker = false;
|
|
@@ -6007,7 +6873,7 @@ class DateInputComponent {
|
|
|
6007
6873
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.18", 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", alwaysEmitDateString: "alwaysEmitDateString" }, outputs: { closeDateInput: "closeDateInput", dateStringChange: "dateStringChange", dateChange: "dateChange" }, providers: [
|
|
6008
6874
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DateInputComponent), multi: true },
|
|
6009
6875
|
{ provide: NG_VALIDATORS, useExisting: forwardRef(() => DateInputComponent), multi: true }
|
|
6010
|
-
], 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: "@if (cdk) {\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\" endIcon=\"slim-arrow-down\">\n @if (dateStringTemplate) {\n <ng-container *ngTemplateOutlet=\"dateStringTemplate\" />\n } @else {\n {{ dateString ?? placeholder }}\n }\n </button>\n }\n @case ('INPUT') {\n <input\n #input\n class=\"form-control dateControl\"\n autocomplete=\"off\"\n aria-autocomplete=\"list\"\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 (change)=\"onRawValueChange($event)\"\n />\n }\n @case ('LINK') {\n <a class=\"dateControl\" (click)=\"togglePopup()\">{{ date | lxDate: dateFormat }}</a>\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} @else {\n <div class=\"legacy\" [class.forLink]=\"renderingStyle === 'LINK'\">\n @if (showDatepicker) {\n <div class=\"backdrop\" (click)=\"hidePopup()\"></div>\n }\n <span class=\"wrapper\" [class.forLink]=\"renderingStyle === 'LINK'\" [class.has-error]=\"hasError\">\n @if (renderingStyle === 'INPUT') {\n <input\n #input\n class=\"form-control dateControl\"\n autocomplete=\"off\"\n aria-autocomplete=\"list\"\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 (change)=\"onRawValueChange($event)\"\n />\n } @else if (renderingStyle === 'LINK') {\n <a class=\"dateControl\" (click)=\"togglePopup()\">{{ date | lxDate: dateFormat }}</a>\n }\n <div class=\"datepickerContainer\">\n <div class=\"calendar\">\n @if (showDatepicker) {\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 }\n </div>\n </div>\n </span>\n </div>\n}\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:var(--lxFontSize, 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:var(--lxFontBlack, 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:var(--lxFontSize, 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:var(--lxFontBlack, 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:var(--lxFontSize, 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:var(--lxFontSmallSize, 12px)}datepicker ::ng-deep th small b{font-weight:400;color:#556b82;font-size:var(--lxFontSmallSize, 12px)}datepicker ::ng-deep table{border-spacing:1px;border-collapse:separate}\n"], dependencies: [{ kind: "directive", type: 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$4.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$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.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", "icon", "endIcon", "showSpinner"] }] }); }
|
|
6876
|
+
], 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: "@if (cdk) {\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\" endIcon=\"slim-arrow-down\">\n @if (dateStringTemplate) {\n <ng-container *ngTemplateOutlet=\"dateStringTemplate\" />\n } @else {\n {{ dateString ?? placeholder }}\n }\n </button>\n }\n @case ('INPUT') {\n <input\n #input\n class=\"form-control dateControl\"\n autocomplete=\"off\"\n aria-autocomplete=\"list\"\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 (change)=\"onRawValueChange($event)\"\n />\n }\n @case ('LINK') {\n <a class=\"dateControl\" (click)=\"togglePopup()\">{{ date | lxDate: dateFormat }}</a>\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} @else {\n <div class=\"legacy\" [class.forLink]=\"renderingStyle === 'LINK'\">\n @if (showDatepicker) {\n <div class=\"backdrop\" (click)=\"hidePopup()\"></div>\n }\n <span class=\"wrapper\" [class.forLink]=\"renderingStyle === 'LINK'\" [class.has-error]=\"hasError\">\n @if (renderingStyle === 'INPUT') {\n <input\n #input\n class=\"form-control dateControl\"\n autocomplete=\"off\"\n aria-autocomplete=\"list\"\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 (change)=\"onRawValueChange($event)\"\n />\n } @else if (renderingStyle === 'LINK') {\n <a class=\"dateControl\" (click)=\"togglePopup()\">{{ date | lxDate: dateFormat }}</a>\n }\n <div class=\"datepickerContainer\">\n <div class=\"calendar\">\n @if (showDatepicker) {\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 }\n </div>\n </div>\n </span>\n </div>\n}\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:not([lx-button]){border:none!important;font-size:var(--lxFontSize, 14px)}datepicker ::ng-deep table tr:first-child th{padding-bottom:12px}datepicker ::ng-deep table tr:first-child th .btn:not([lx-button]){color:#0070f2!important}datepicker ::ng-deep [role=gridcell] .btn-default:not([lx-button]){border:solid 2px transparent!important;border-radius:8px;padding:8px 6px}datepicker ::ng-deep [role=gridcell] .btn-default:not([lx-button]):focus,datepicker ::ng-deep [role=gridcell] .btn-default:not([lx-button]).focus{outline-offset:0}datepicker ::ng-deep [role=gridcell] .btn-default:not([lx-button]):hover{background-color:#fff;border:#0070f2 2px solid!important;border-radius:8px}datepicker ::ng-deep .btn-default.active:not([lx-button]){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:not([lx-button]) .text-muted,datepicker ::ng-deep .btn-default.active:not([lx-button]) .text-primary,datepicker ::ng-deep .btn-default.active:not([lx-button]) .text-info{color:inherit}datepicker ::ng-deep tr td:first-child{padding:0 6px;color:#556b82;font-size:var(--lxFontSmallSize, 12px)}datepicker ::ng-deep th small b{font-weight:400;color:#556b82;font-size:var(--lxFontSmallSize, 12px)}datepicker ::ng-deep table{border-spacing:1px;border-collapse:separate}\n"], dependencies: [{ kind: "directive", type: 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$4.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$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.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", "icon", "endIcon", "showSpinner"] }] }); }
|
|
6011
6877
|
}
|
|
6012
6878
|
__decorate([
|
|
6013
6879
|
Observe('initDateString')
|
|
@@ -6027,7 +6893,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
6027
6893
|
CustomDatePipe,
|
|
6028
6894
|
MarkInvalidDirective,
|
|
6029
6895
|
ButtonComponent
|
|
6030
|
-
], template: "@if (cdk) {\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\" endIcon=\"slim-arrow-down\">\n @if (dateStringTemplate) {\n <ng-container *ngTemplateOutlet=\"dateStringTemplate\" />\n } @else {\n {{ dateString ?? placeholder }}\n }\n </button>\n }\n @case ('INPUT') {\n <input\n #input\n class=\"form-control dateControl\"\n autocomplete=\"off\"\n aria-autocomplete=\"list\"\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 (change)=\"onRawValueChange($event)\"\n />\n }\n @case ('LINK') {\n <a class=\"dateControl\" (click)=\"togglePopup()\">{{ date | lxDate: dateFormat }}</a>\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} @else {\n <div class=\"legacy\" [class.forLink]=\"renderingStyle === 'LINK'\">\n @if (showDatepicker) {\n <div class=\"backdrop\" (click)=\"hidePopup()\"></div>\n }\n <span class=\"wrapper\" [class.forLink]=\"renderingStyle === 'LINK'\" [class.has-error]=\"hasError\">\n @if (renderingStyle === 'INPUT') {\n <input\n #input\n class=\"form-control dateControl\"\n autocomplete=\"off\"\n aria-autocomplete=\"list\"\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 (change)=\"onRawValueChange($event)\"\n />\n } @else if (renderingStyle === 'LINK') {\n <a class=\"dateControl\" (click)=\"togglePopup()\">{{ date | lxDate: dateFormat }}</a>\n }\n <div class=\"datepickerContainer\">\n <div class=\"calendar\">\n @if (showDatepicker) {\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 }\n </div>\n </div>\n </span>\n </div>\n}\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:var(--lxFontSize, 14px)}datepicker ::ng-deep
|
|
6896
|
+
], template: "@if (cdk) {\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\" endIcon=\"slim-arrow-down\">\n @if (dateStringTemplate) {\n <ng-container *ngTemplateOutlet=\"dateStringTemplate\" />\n } @else {\n {{ dateString ?? placeholder }}\n }\n </button>\n }\n @case ('INPUT') {\n <input\n #input\n class=\"form-control dateControl\"\n autocomplete=\"off\"\n aria-autocomplete=\"list\"\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 (change)=\"onRawValueChange($event)\"\n />\n }\n @case ('LINK') {\n <a class=\"dateControl\" (click)=\"togglePopup()\">{{ date | lxDate: dateFormat }}</a>\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} @else {\n <div class=\"legacy\" [class.forLink]=\"renderingStyle === 'LINK'\">\n @if (showDatepicker) {\n <div class=\"backdrop\" (click)=\"hidePopup()\"></div>\n }\n <span class=\"wrapper\" [class.forLink]=\"renderingStyle === 'LINK'\" [class.has-error]=\"hasError\">\n @if (renderingStyle === 'INPUT') {\n <input\n #input\n class=\"form-control dateControl\"\n autocomplete=\"off\"\n aria-autocomplete=\"list\"\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 (change)=\"onRawValueChange($event)\"\n />\n } @else if (renderingStyle === 'LINK') {\n <a class=\"dateControl\" (click)=\"togglePopup()\">{{ date | lxDate: dateFormat }}</a>\n }\n <div class=\"datepickerContainer\">\n <div class=\"calendar\">\n @if (showDatepicker) {\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 }\n </div>\n </div>\n </span>\n </div>\n}\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:not([lx-button]){border:none!important;font-size:var(--lxFontSize, 14px)}datepicker ::ng-deep table tr:first-child th{padding-bottom:12px}datepicker ::ng-deep table tr:first-child th .btn:not([lx-button]){color:#0070f2!important}datepicker ::ng-deep [role=gridcell] .btn-default:not([lx-button]){border:solid 2px transparent!important;border-radius:8px;padding:8px 6px}datepicker ::ng-deep [role=gridcell] .btn-default:not([lx-button]):focus,datepicker ::ng-deep [role=gridcell] .btn-default:not([lx-button]).focus{outline-offset:0}datepicker ::ng-deep [role=gridcell] .btn-default:not([lx-button]):hover{background-color:#fff;border:#0070f2 2px solid!important;border-radius:8px}datepicker ::ng-deep .btn-default.active:not([lx-button]){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:not([lx-button]) .text-muted,datepicker ::ng-deep .btn-default.active:not([lx-button]) .text-primary,datepicker ::ng-deep .btn-default.active:not([lx-button]) .text-info{color:inherit}datepicker ::ng-deep tr td:first-child{padding:0 6px;color:#556b82;font-size:var(--lxFontSmallSize, 12px)}datepicker ::ng-deep th small b{font-weight:400;color:#556b82;font-size:var(--lxFontSmallSize, 12px)}datepicker ::ng-deep table{border-spacing:1px;border-collapse:separate}\n"] }]
|
|
6031
6897
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
|
|
6032
6898
|
type: Inject,
|
|
6033
6899
|
args: [DATE_FORMATS]
|
|
@@ -6116,7 +6982,7 @@ class DatepickerUiModule {
|
|
|
6116
6982
|
}
|
|
6117
6983
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: DatepickerUiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
6118
6984
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.18", ngImport: i0, type: DatepickerUiModule, imports: [DatePickerComponent], exports: [DatePickerComponent] }); }
|
|
6119
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: DatepickerUiModule }); }
|
|
6985
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: DatepickerUiModule, imports: [DatePickerComponent] }); }
|
|
6120
6986
|
}
|
|
6121
6987
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: DatepickerUiModule, decorators: [{
|
|
6122
6988
|
type: NgModule,
|
|
@@ -6126,6 +6992,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
6126
6992
|
}]
|
|
6127
6993
|
}] });
|
|
6128
6994
|
|
|
6995
|
+
/**
|
|
6996
|
+
* Individual item within a drag-and-drop list.
|
|
6997
|
+
*
|
|
6998
|
+
* Supports custom templates and optional action buttons.
|
|
6999
|
+
*
|
|
7000
|
+
* ### Projection slots
|
|
7001
|
+
* - `customTemplate`: Custom template for the item content. If not provided, displays the item string with a drag handle.
|
|
7002
|
+
*
|
|
7003
|
+
* ### Example
|
|
7004
|
+
* @example
|
|
7005
|
+
* ```html
|
|
7006
|
+
* <lx-drag-and-drop-list-item
|
|
7007
|
+
* [item]="'Task 1'"
|
|
7008
|
+
* [draggable]="true"
|
|
7009
|
+
* [actions]="[{ id: 'delete', label: 'Delete', icon: 'delete', showOnlyOnHover: true }]"
|
|
7010
|
+
* (action)="handleAction($event)"
|
|
7011
|
+
* ></lx-drag-and-drop-list-item>
|
|
7012
|
+
* ```
|
|
7013
|
+
*/
|
|
6129
7014
|
class DragAndDropListItemComponent {
|
|
6130
7015
|
get draggingDisabled() {
|
|
6131
7016
|
return !this.draggable;
|
|
@@ -6136,7 +7021,12 @@ class DragAndDropListItemComponent {
|
|
|
6136
7021
|
constructor(element) {
|
|
6137
7022
|
this.element = element;
|
|
6138
7023
|
this.NAME = 'DragAndDropListItemComponent';
|
|
7024
|
+
/**
|
|
7025
|
+
* Whether the item can be dragged.
|
|
7026
|
+
* @default true
|
|
7027
|
+
*/
|
|
6139
7028
|
this.draggable = true;
|
|
7029
|
+
/** Emitted when an action button is clicked. */
|
|
6140
7030
|
this.action = new EventEmitter();
|
|
6141
7031
|
this.customTemplateRef = null;
|
|
6142
7032
|
}
|
|
@@ -6331,21 +7221,54 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
6331
7221
|
type: Input
|
|
6332
7222
|
}] } });
|
|
6333
7223
|
|
|
7224
|
+
/**
|
|
7225
|
+
* Sortable list with drag-and-drop and keyboard navigation support.
|
|
7226
|
+
*
|
|
7227
|
+
* Items can be reordered via mouse drag or keyboard controls (Arrow keys, Space).
|
|
7228
|
+
*
|
|
7229
|
+
* ### Example
|
|
7230
|
+
* @example
|
|
7231
|
+
* ```html
|
|
7232
|
+
* <lx-drag-and-drop-list
|
|
7233
|
+
* [label]="'My Tasks'"
|
|
7234
|
+
* (moveToIndex)="handleReorder($event)"
|
|
7235
|
+
* >
|
|
7236
|
+
* @for (task of tasks; track $index) {
|
|
7237
|
+
* <lx-drag-and-drop-list-item
|
|
7238
|
+
* [item]="task.name"
|
|
7239
|
+
* [draggable]="true"
|
|
7240
|
+
* />
|
|
7241
|
+
* }
|
|
7242
|
+
* </lx-drag-and-drop-list>
|
|
7243
|
+
* ```
|
|
7244
|
+
*/
|
|
6334
7245
|
class DragAndDropListComponent {
|
|
6335
7246
|
constructor() {
|
|
6336
7247
|
/** @internal */
|
|
6337
7248
|
this.NAME = DRAG_AND_DROP_LIST_TRANSLATION_NAME;
|
|
6338
7249
|
/**
|
|
6339
|
-
* Override the global label font weight
|
|
7250
|
+
* Override the global label font weight.
|
|
7251
|
+
* @default 700
|
|
6340
7252
|
*/
|
|
6341
7253
|
this.labelFontWeight = 700;
|
|
7254
|
+
/**
|
|
7255
|
+
* Color theme of the list items.
|
|
7256
|
+
* @default 'light'
|
|
7257
|
+
*/
|
|
6342
7258
|
this.color = 'light';
|
|
7259
|
+
/**
|
|
7260
|
+
* Font size of the list items.
|
|
7261
|
+
* @default 'normal'
|
|
7262
|
+
*/
|
|
6343
7263
|
this.fontSize = 'normal';
|
|
6344
7264
|
/**
|
|
6345
|
-
*
|
|
6346
|
-
*
|
|
7265
|
+
* Emitted when an item is moved, providing the new and previous index.
|
|
7266
|
+
* Use this when you need index-based reordering.
|
|
6347
7267
|
*/
|
|
6348
7268
|
this.moveToIndex = new EventEmitter();
|
|
7269
|
+
/**
|
|
7270
|
+
* Emitted when an item is moved, providing the item data and new index.
|
|
7271
|
+
*/
|
|
6349
7272
|
this.moveItem = new EventEmitter();
|
|
6350
7273
|
/**
|
|
6351
7274
|
* TODO: extract state about keyboard sorting into KeyboardSortableListDirective
|
|
@@ -6463,8 +7386,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
6463
7386
|
}]
|
|
6464
7387
|
}] });
|
|
6465
7388
|
|
|
7389
|
+
/**
|
|
7390
|
+
* Displays form validation error messages.
|
|
7391
|
+
*
|
|
7392
|
+
* Shows either projected content or a programmatically set error message.
|
|
7393
|
+
*
|
|
7394
|
+
* ### Projection slots
|
|
7395
|
+
* - Default slot: Static error message text. Hidden but captured for display.
|
|
7396
|
+
*
|
|
7397
|
+
* ### Example
|
|
7398
|
+
* @example
|
|
7399
|
+
* ```html
|
|
7400
|
+
* <lx-error-message>This field is required</lx-error-message>
|
|
7401
|
+
* ```
|
|
7402
|
+
*/
|
|
6466
7403
|
class ErrorMessageComponent {
|
|
6467
7404
|
constructor() {
|
|
7405
|
+
/** Signal for setting error message programmatically. */
|
|
6468
7406
|
this.dynamicErrorMessage = signal('');
|
|
6469
7407
|
this.wrapper = viewChild.required('contentWrapper');
|
|
6470
7408
|
this.computedErrorMessage = computed(() => this.dynamicErrorMessage() || this.wrapper().nativeElement.innerText);
|
|
@@ -6477,6 +7415,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
6477
7415
|
args: [{ selector: 'lx-error-message', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span #contentWrapper hidden>\n <ng-content />\n</span>\n\n@if (computedErrorMessage()) {\n <div class=\"error\">\n {{ computedErrorMessage() }}\n </div>\n}\n", styles: [".error{color:#f96464;padding:4px}\n"] }]
|
|
6478
7416
|
}] });
|
|
6479
7417
|
|
|
7418
|
+
/**
|
|
7419
|
+
* Displays translated form validation errors for a specific form control.
|
|
7420
|
+
*
|
|
7421
|
+
* Automatically updates when form errors change.
|
|
7422
|
+
*
|
|
7423
|
+
* ### Example
|
|
7424
|
+
* @example
|
|
7425
|
+
* ```html
|
|
7426
|
+
* <lx-form-error
|
|
7427
|
+
* [form]="myFormGroup"
|
|
7428
|
+
* [controlName]="'email'"
|
|
7429
|
+
* [namespace]="'USER_FORM'"
|
|
7430
|
+
* ></lx-form-error>
|
|
7431
|
+
* ```
|
|
7432
|
+
*/
|
|
6480
7433
|
class FormErrorComponent {
|
|
6481
7434
|
constructor() {
|
|
6482
7435
|
/** @internal */
|
|
@@ -6520,10 +7473,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
6520
7473
|
type: Input
|
|
6521
7474
|
}] } });
|
|
6522
7475
|
|
|
7476
|
+
/**
|
|
7477
|
+
* A directive applied to native `<input>` elements to provide consistent styling and automatic error state handling.
|
|
7478
|
+
* Integrates with Angular's `NgControl` to automatically apply error and disabled classes based on form control state.
|
|
7479
|
+
* The directive listens to form control status changes and updates the visual state accordingly.
|
|
7480
|
+
*
|
|
7481
|
+
* ### Example
|
|
7482
|
+
* @example
|
|
7483
|
+
* ```html
|
|
7484
|
+
* <input lx-input type="text" [formControl]="nameControl" />
|
|
7485
|
+
* ```
|
|
7486
|
+
*
|
|
7487
|
+
* ### Example
|
|
7488
|
+
* @example
|
|
7489
|
+
* ```html
|
|
7490
|
+
* <input lx-input type="email" [error]="true" [disabled]="false" />
|
|
7491
|
+
* ```
|
|
7492
|
+
*/
|
|
6523
7493
|
class InputComponent {
|
|
6524
7494
|
constructor(ngControl) {
|
|
6525
7495
|
this.ngControl = ngControl;
|
|
7496
|
+
/**
|
|
7497
|
+
* Whether to display the input in an error state (applies 'error' CSS class).
|
|
7498
|
+
* Automatically updated when used with `NgControl` based on validation state.
|
|
7499
|
+
* @default false
|
|
7500
|
+
*/
|
|
6526
7501
|
this.error = false;
|
|
7502
|
+
/**
|
|
7503
|
+
* Whether the input is disabled (applies 'disabled' CSS class).
|
|
7504
|
+
* Automatically updated when used with `NgControl` based on control state.
|
|
7505
|
+
* @default false
|
|
7506
|
+
*/
|
|
6527
7507
|
this.disabled = false;
|
|
6528
7508
|
this.destroyed$ = new Subject();
|
|
6529
7509
|
}
|
|
@@ -6768,10 +7748,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
6768
7748
|
args: [KeyboardSelectDirective, { static: false, descendants: true }]
|
|
6769
7749
|
}] } });
|
|
6770
7750
|
|
|
7751
|
+
/**
|
|
7752
|
+
* Input that dynamically adjusts its width based on content length.
|
|
7753
|
+
*
|
|
7754
|
+
* Useful for inline editing or space-constrained layouts.
|
|
7755
|
+
*
|
|
7756
|
+
* ### Example
|
|
7757
|
+
* @example
|
|
7758
|
+
* ```html
|
|
7759
|
+
* <lx-responsive-input
|
|
7760
|
+
* [(ngModel)]="searchTerm"
|
|
7761
|
+
* [inputId]="'search'"
|
|
7762
|
+
* (focus)="onFocus()"
|
|
7763
|
+
* (blur)="onBlur()"
|
|
7764
|
+
* ></lx-responsive-input>
|
|
7765
|
+
* ```
|
|
7766
|
+
*/
|
|
6771
7767
|
class ResponsiveInputComponent {
|
|
6772
7768
|
constructor() {
|
|
7769
|
+
/** Emitted when the input receives focus. */
|
|
6773
7770
|
this.focus = new EventEmitter();
|
|
7771
|
+
/** Emitted when the input receives focus via Tab key. */
|
|
6774
7772
|
this.focusViaTab = new EventEmitter();
|
|
7773
|
+
/** Emitted when the input loses focus. */
|
|
6775
7774
|
this.blur = new EventEmitter();
|
|
6776
7775
|
this.inputWidth$ = new BehaviorSubject('1px');
|
|
6777
7776
|
this.inputControl = new UntypedFormControl();
|
|
@@ -6862,11 +7861,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
6862
7861
|
args: ['inputWidth', { static: true }]
|
|
6863
7862
|
}] } });
|
|
6864
7863
|
|
|
7864
|
+
/**
|
|
7865
|
+
* Displays selected items in a multi-select component.
|
|
7866
|
+
*
|
|
7867
|
+
* Items can be rendered as tokens or custom templates.
|
|
7868
|
+
*
|
|
7869
|
+
* ### Projection slots
|
|
7870
|
+
* - `innerSelectionTemplate`: Custom template for rendering each selected item.
|
|
7871
|
+
*
|
|
7872
|
+
* ### Example
|
|
7873
|
+
* @example
|
|
7874
|
+
* ```html
|
|
7875
|
+
* <lx-multi-select-selection
|
|
7876
|
+
* [selection]="selectedItems"
|
|
7877
|
+
* [tokenize]="true"
|
|
7878
|
+
* (removeItem)="handleRemove($event)"
|
|
7879
|
+
* >
|
|
7880
|
+
* <ng-template #innerSelectionTemplate let-item>
|
|
7881
|
+
* {{ item.name }}
|
|
7882
|
+
* </ng-template>
|
|
7883
|
+
* </lx-multi-select-selection>
|
|
7884
|
+
* ```
|
|
7885
|
+
*/
|
|
6865
7886
|
class MultiSelectSelectionComponent extends KeyboardSelectDirective {
|
|
6866
7887
|
constructor() {
|
|
6867
7888
|
super(...arguments);
|
|
7889
|
+
/**
|
|
7890
|
+
* Array of selected items to display.
|
|
7891
|
+
*/
|
|
6868
7892
|
this.selection = input();
|
|
7893
|
+
/**
|
|
7894
|
+
* Whether to render items as tokens (pills).
|
|
7895
|
+
* @default true
|
|
7896
|
+
*/
|
|
6869
7897
|
this.tokenize = input(true);
|
|
7898
|
+
/** Emitted when an item is clicked for removal. */
|
|
6870
7899
|
this.removeItem = new EventEmitter();
|
|
6871
7900
|
this.selectionTemplate = null;
|
|
6872
7901
|
}
|
|
@@ -6883,6 +7912,63 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
6883
7912
|
args: ['innerSelectionTemplate', { read: TemplateRef, static: true }]
|
|
6884
7913
|
}] } });
|
|
6885
7914
|
|
|
7915
|
+
/**
|
|
7916
|
+
* A dropdown component for selecting multiple values from a list of options.
|
|
7917
|
+
* Implements `ControlValueAccessor` for seamless integration with Angular reactive forms.
|
|
7918
|
+
* Supports keyboard navigation, custom templates, and various sizing options.
|
|
7919
|
+
*
|
|
7920
|
+
* ### Projection slots
|
|
7921
|
+
* - `.pills`: Contains the pill list for selected items (`lx-pill-list`).
|
|
7922
|
+
* The pill list shows removable pills for each selected item.
|
|
7923
|
+
* Use `lx-pill-item` inside a `#pillTemplate` for custom pill rendering.
|
|
7924
|
+
* - `.dropdownComponent`: Contains the dropdown (`lx-basic-dropdown`)
|
|
7925
|
+
*
|
|
7926
|
+
* Alternatively, use `lxSelectDropdown` directive on `<ng-template>` for the dropdown,
|
|
7927
|
+
* and `#selectionTemplate` on `<ng-template>` for tokenized selection display.
|
|
7928
|
+
*
|
|
7929
|
+
* ### Example — with pill list and basic dropdown
|
|
7930
|
+
* @example
|
|
7931
|
+
* ```html
|
|
7932
|
+
* <lx-multi-select
|
|
7933
|
+
* #multiSelect
|
|
7934
|
+
* [(selection)]="selectedItems"
|
|
7935
|
+
* (query)="searchTerm = $event">
|
|
7936
|
+
* <lx-pill-list
|
|
7937
|
+
* class="pills"
|
|
7938
|
+
* [keyboardSelectAction]="multiSelect.selectionKeyboardSelectAction$"
|
|
7939
|
+
* [pills]="selectedItems"
|
|
7940
|
+
* labelKey="name"
|
|
7941
|
+
* itemKey="id"
|
|
7942
|
+
* (remove)="multiSelect.removeItem($event)">
|
|
7943
|
+
* </lx-pill-list>
|
|
7944
|
+
* <lx-basic-dropdown
|
|
7945
|
+
* class="dropdownComponent"
|
|
7946
|
+
* [keyboardSelectAction]="multiSelect.optionsKeyboardSelectAction$"
|
|
7947
|
+
* [options]="options | lxFilterBySelection: selectedItems | lxFilterByTerm: { term: searchTerm }"
|
|
7948
|
+
* labelKey="name"
|
|
7949
|
+
* (onItemSelected)="multiSelect.addItemToSelection($event)">
|
|
7950
|
+
* </lx-basic-dropdown>
|
|
7951
|
+
* </lx-multi-select>
|
|
7952
|
+
* ```
|
|
7953
|
+
*
|
|
7954
|
+
* ### Example — with custom pill template
|
|
7955
|
+
* @example
|
|
7956
|
+
* ```html
|
|
7957
|
+
* <lx-multi-select #multiSelect [(selection)]="selectedItems">
|
|
7958
|
+
* <lx-pill-list
|
|
7959
|
+
* class="pills"
|
|
7960
|
+
* [keyboardSelectAction]="multiSelect.selectionKeyboardSelectAction$"
|
|
7961
|
+
* [pills]="selectedItems"
|
|
7962
|
+
* itemKey="id"
|
|
7963
|
+
* (remove)="multiSelect.removeItem($event)">
|
|
7964
|
+
* <ng-template #pillTemplate let-pill>
|
|
7965
|
+
* <lx-pill-item [label]="pill.name" [item]="pill" [class.readOnly]="pill.readOnly" />
|
|
7966
|
+
* </ng-template>
|
|
7967
|
+
* </lx-pill-list>
|
|
7968
|
+
* <!-- dropdown omitted for brevity -->
|
|
7969
|
+
* </lx-multi-select>
|
|
7970
|
+
* ```
|
|
7971
|
+
*/
|
|
6886
7972
|
class MultiSelectComponent extends BaseSelectDirective {
|
|
6887
7973
|
/** @internal */
|
|
6888
7974
|
static isStillPossibleMoveToLeft(eventSet) {
|
|
@@ -6938,11 +8024,31 @@ class MultiSelectComponent extends BaseSelectDirective {
|
|
|
6938
8024
|
constructor(cd) {
|
|
6939
8025
|
super();
|
|
6940
8026
|
this.cd = cd;
|
|
8027
|
+
/**
|
|
8028
|
+
* Whether to visually mark the input as invalid.
|
|
8029
|
+
*/
|
|
6941
8030
|
this.markInvalid = false;
|
|
8031
|
+
/**
|
|
8032
|
+
* Array of currently selected items.
|
|
8033
|
+
*/
|
|
6942
8034
|
this.selection = [];
|
|
8035
|
+
/**
|
|
8036
|
+
* Visual size variant of the multi-select component.
|
|
8037
|
+
* @default 'default'
|
|
8038
|
+
*/
|
|
6943
8039
|
this.size = 'default';
|
|
8040
|
+
/**
|
|
8041
|
+
* Whether pressing Tab should close the dropdown.
|
|
8042
|
+
* @default true
|
|
8043
|
+
*/
|
|
6944
8044
|
this.closeDropdownOnTab = true;
|
|
8045
|
+
/**
|
|
8046
|
+
* Event emitted when the selection changes.
|
|
8047
|
+
*/
|
|
6945
8048
|
this.selectionChange = new EventEmitter();
|
|
8049
|
+
/**
|
|
8050
|
+
* Event emitted when the input loses focus.
|
|
8051
|
+
*/
|
|
6946
8052
|
this.blur = new EventEmitter();
|
|
6947
8053
|
/** @internal */
|
|
6948
8054
|
this.destroyed$ = new Subject();
|
|
@@ -7199,23 +8305,67 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
7199
8305
|
}] } });
|
|
7200
8306
|
|
|
7201
8307
|
/**
|
|
7202
|
-
*
|
|
7203
|
-
*
|
|
7204
|
-
*
|
|
8308
|
+
* Dropdown component that displays options grouped by categories.
|
|
8309
|
+
* Supports keyboard navigation, infinite scroll, custom templates, and creating new options.
|
|
8310
|
+
* Used standalone or with SingleSelectComponent/MultiSelectComponent.
|
|
8311
|
+
*
|
|
8312
|
+
* ### Projection slots
|
|
8313
|
+
* - `optionTemplate`: Template for custom option rendering (context: `$implicit`, `index`, `groupIndex`).
|
|
8314
|
+
* - `noResultsOptionTemplateRef`: Template for custom "no results" message (context: `group`, `groupIndex`).
|
|
8315
|
+
*
|
|
8316
|
+
* ### Example
|
|
8317
|
+
* @example
|
|
8318
|
+
* ```html
|
|
8319
|
+
* <lx-option-group-dropdown
|
|
8320
|
+
* [optionGroups]="groups"
|
|
8321
|
+
* [highlightTerm]="searchTerm"
|
|
8322
|
+
* (onItemSelected)="handleSelection($event)">
|
|
8323
|
+
* <ng-template #optionTemplate let-option>
|
|
8324
|
+
* <span>{{ option.label }}</span>
|
|
8325
|
+
* </ng-template>
|
|
8326
|
+
* </lx-option-group-dropdown>
|
|
8327
|
+
* ```
|
|
7205
8328
|
*/
|
|
7206
8329
|
class OptionGroupDropdownComponent extends KeyboardSelectDirective {
|
|
7207
8330
|
constructor() {
|
|
7208
8331
|
super(...arguments);
|
|
7209
8332
|
/** @internal */
|
|
7210
8333
|
this.NAME = 'OptionGroupDropdownComponent';
|
|
8334
|
+
/**
|
|
8335
|
+
* Array of option groups to display in the dropdown.
|
|
8336
|
+
* @default []
|
|
8337
|
+
*/
|
|
7211
8338
|
this.optionGroups = [];
|
|
8339
|
+
/**
|
|
8340
|
+
* Whether to show a "create new option" entry at the top of the dropdown.
|
|
8341
|
+
* @default false
|
|
8342
|
+
*/
|
|
7212
8343
|
this.showCreateNewOption = false;
|
|
8344
|
+
/**
|
|
8345
|
+
* Property name to use as the label for each option.
|
|
8346
|
+
* @default 'label'
|
|
8347
|
+
*/
|
|
7213
8348
|
this.labelKey = 'label';
|
|
8349
|
+
/**
|
|
8350
|
+
* Whether the dropdown is in a loading state.
|
|
8351
|
+
* @default false
|
|
8352
|
+
*/
|
|
7214
8353
|
this.loading = false;
|
|
8354
|
+
/**
|
|
8355
|
+
* Whether to show "no results" message when a group has no options.
|
|
8356
|
+
* @default false
|
|
8357
|
+
*/
|
|
7215
8358
|
this.showNoResultsIfGroupIsEmpty = false;
|
|
8359
|
+
/**
|
|
8360
|
+
* Whether to use CDK overlay positioning for the dropdown.
|
|
8361
|
+
* @default false
|
|
8362
|
+
*/
|
|
7216
8363
|
this.overlayPositioning = false;
|
|
8364
|
+
/** Event emitted when an option is selected. */
|
|
7217
8365
|
this.onItemSelected = new EventEmitter();
|
|
8366
|
+
/** Event emitted when the dropdown container is scrolled (for infinite scroll). */
|
|
7218
8367
|
this.containerScrolled = new EventEmitter();
|
|
8368
|
+
/** Event emitted when the user requests to create a new option. */
|
|
7219
8369
|
this.createNewOption = new EventEmitter();
|
|
7220
8370
|
/** @internal */
|
|
7221
8371
|
this.isTopDropdown = false;
|
|
@@ -7305,6 +8455,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
7305
8455
|
args: ['selectOrigin', { static: false }]
|
|
7306
8456
|
}] } });
|
|
7307
8457
|
|
|
8458
|
+
/**
|
|
8459
|
+
* A dropdown component that displays a list of selectable options.
|
|
8460
|
+
* The dropdown opens when triggered and provides keyboard navigation support for accessible option selection.
|
|
8461
|
+
* It supports nested option groups and sub-dropdowns with full ARIA compliance.
|
|
8462
|
+
*
|
|
8463
|
+
* ### Projection slots
|
|
8464
|
+
* - Default (trigger): The button or element that triggers the dropdown (must have `lxKeyboardActionSource` directive)
|
|
8465
|
+
* - `lx-option`: Individual selectable options within the dropdown
|
|
8466
|
+
* - `lx-option-group`: Optional groups of options with labels
|
|
8467
|
+
*
|
|
8468
|
+
* ### Example
|
|
8469
|
+
* @example
|
|
8470
|
+
* ```html
|
|
8471
|
+
* <lx-options-dropdown [disabled]="disabled" [maxHeight]="maxHeight">
|
|
8472
|
+
* <button lxKeyboardActionSource lx-button [disabled]="disabled" endIcon="slim-arrow-down">
|
|
8473
|
+
* <span>{{ activeView?.label }}</span>
|
|
8474
|
+
* </button>
|
|
8475
|
+
* @for (viewGroup of viewGroups; track viewGroup.groupKey) {
|
|
8476
|
+
* <lx-option-group [label]="'viewGroups.' + viewGroup.groupKey | translate">
|
|
8477
|
+
* @for (view of viewGroup.views; track view.key) {
|
|
8478
|
+
* <lx-option
|
|
8479
|
+
* [selected]="view === activeView"
|
|
8480
|
+
* (select)="applyView.emit(view.key)"
|
|
8481
|
+
* >{{ view.label }}</lx-option>
|
|
8482
|
+
* }
|
|
8483
|
+
* </lx-option-group>
|
|
8484
|
+
* }
|
|
8485
|
+
* </lx-options-dropdown>
|
|
8486
|
+
* ```
|
|
8487
|
+
*/
|
|
7308
8488
|
class OptionsDropdownComponent {
|
|
7309
8489
|
/** @internal */
|
|
7310
8490
|
get displayStyle() {
|
|
@@ -7369,18 +8549,61 @@ class OptionsDropdownComponent {
|
|
|
7369
8549
|
this.renderer = renderer;
|
|
7370
8550
|
/** @internal */
|
|
7371
8551
|
this.NAME = 'OptionsDropdownComponent';
|
|
8552
|
+
/**
|
|
8553
|
+
* The alignment of the dropdown relative to the trigger element.
|
|
8554
|
+
* @default 'right'
|
|
8555
|
+
*/
|
|
7372
8556
|
this.align = 'right';
|
|
8557
|
+
/**
|
|
8558
|
+
* Whether the dropdown should close when the page is scrolled.
|
|
8559
|
+
* @default false
|
|
8560
|
+
*/
|
|
7373
8561
|
this.closeOnScroll = false;
|
|
8562
|
+
/**
|
|
8563
|
+
* Whether the dropdown is disabled and cannot be opened.
|
|
8564
|
+
* @default false
|
|
8565
|
+
*/
|
|
7374
8566
|
this.disabled = false;
|
|
8567
|
+
/**
|
|
8568
|
+
* The maximum height of the dropdown. Can be any valid CSS height value.
|
|
8569
|
+
* @default 'none'
|
|
8570
|
+
*/
|
|
7375
8571
|
this.maxHeight = 'none';
|
|
8572
|
+
/**
|
|
8573
|
+
* Whether the dropdown should close automatically when an option is selected.
|
|
8574
|
+
* @default true
|
|
8575
|
+
*/
|
|
7376
8576
|
this.closeOnSelect = true;
|
|
8577
|
+
/**
|
|
8578
|
+
* Whether to enable advanced overlay positioning using CDK overlay.
|
|
8579
|
+
* Use when the dropdown is wider than its trigger or positioned near a viewport edge —
|
|
8580
|
+
* enables CDK overlay positioning with automatic boundary detection to prevent off-screen clipping
|
|
8581
|
+
* @default false
|
|
8582
|
+
*/
|
|
7377
8583
|
this.overlayPositioning = false;
|
|
8584
|
+
/**
|
|
8585
|
+
* Additional CSS class to apply to the dropdown overlay.
|
|
8586
|
+
* @default ''
|
|
8587
|
+
*/
|
|
7378
8588
|
this.dropdownClass = '';
|
|
8589
|
+
/**
|
|
8590
|
+
* Whether the trigger container should use display flex instead of inline-block.
|
|
8591
|
+
* @default false
|
|
8592
|
+
*/
|
|
7379
8593
|
this.isFlexEnabledTriggerContainer = false;
|
|
7380
8594
|
/** @internal */
|
|
7381
8595
|
this.overlayScrollStrategy = this.closeOnScroll ? this.scrollStrategies.close() : this.scrollStrategies.reposition();
|
|
8596
|
+
/**
|
|
8597
|
+
* Event emitted when the dropdown is opened.
|
|
8598
|
+
*/
|
|
7382
8599
|
this.opened = new EventEmitter();
|
|
8600
|
+
/**
|
|
8601
|
+
* Event emitted when the dropdown is closed for any reason.
|
|
8602
|
+
*/
|
|
7383
8603
|
this.closed = new EventEmitter();
|
|
8604
|
+
/**
|
|
8605
|
+
* Event emitted when the dropdown is closed without an option being selected (e.g., by pressing Escape or clicking outside).
|
|
8606
|
+
*/
|
|
7384
8607
|
this.closedWithoutSelection = new EventEmitter();
|
|
7385
8608
|
this.highlightedOptionIndex$ = new BehaviorSubject(0);
|
|
7386
8609
|
this._open = false;
|
|
@@ -7599,9 +8822,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
7599
8822
|
args: ['style.display']
|
|
7600
8823
|
}] } });
|
|
7601
8824
|
|
|
8825
|
+
/**
|
|
8826
|
+
* A nested sub-dropdown that appears next to a parent option.
|
|
8827
|
+
* Opens on hover or keyboard navigation with debounced interactions.
|
|
8828
|
+
* Automatically adjusts max height to fit viewport.
|
|
8829
|
+
*
|
|
8830
|
+
* ### Projection slots
|
|
8831
|
+
* - Default slot: Nested dropdown options (`lx-option` components).
|
|
8832
|
+
*
|
|
8833
|
+
* ### Example
|
|
8834
|
+
* @example
|
|
8835
|
+
* ```html
|
|
8836
|
+
* <lx-options-sub-dropdown [trigger]="parentOption" align="left">
|
|
8837
|
+
* <lx-option [value]="1">Sub-option 1</lx-option>
|
|
8838
|
+
* <lx-option [value]="2">Sub-option 2</lx-option>
|
|
8839
|
+
* </lx-options-sub-dropdown>
|
|
8840
|
+
* ```
|
|
8841
|
+
*/
|
|
7602
8842
|
class OptionsSubDropdownComponent {
|
|
7603
8843
|
constructor(changeDetection) {
|
|
7604
8844
|
this.changeDetection = changeDetection;
|
|
8845
|
+
/**
|
|
8846
|
+
* Horizontal alignment of the sub-dropdown relative to the trigger option.
|
|
8847
|
+
* @default 'right'
|
|
8848
|
+
*/
|
|
7605
8849
|
this.align = 'right';
|
|
7606
8850
|
this.hidden = true;
|
|
7607
8851
|
this.mouseInside$ = new BehaviorSubject(false);
|
|
@@ -7684,6 +8928,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
7684
8928
|
args: ['mouseleave']
|
|
7685
8929
|
}] } });
|
|
7686
8930
|
|
|
8931
|
+
/**
|
|
8932
|
+
* Individual option within a picker dropdown.
|
|
8933
|
+
*
|
|
8934
|
+
* Must be a direct child of lx-picker.
|
|
8935
|
+
*
|
|
8936
|
+
* ### Projection slots
|
|
8937
|
+
* - Default slot: Option content (text, icons, or custom elements). Hidden when `isClearOption` is true.
|
|
8938
|
+
*
|
|
8939
|
+
* ### Example
|
|
8940
|
+
* @example
|
|
8941
|
+
* ```html
|
|
8942
|
+
* <lx-picker>
|
|
8943
|
+
* <button lxPickerTrigger>Select</button>
|
|
8944
|
+
* <li lx-picker-option [optionId]="'opt1'" [value]="'option1'" [ariaLabel]="'Option 1'">
|
|
8945
|
+
* Option 1
|
|
8946
|
+
* </li>
|
|
8947
|
+
* <li lx-picker-option [optionId]="'opt2'" [value]="'option2'" [ariaLabel]="'Option 2'">
|
|
8948
|
+
* Option 2
|
|
8949
|
+
* </li>
|
|
8950
|
+
* </lx-picker>
|
|
8951
|
+
* ```
|
|
8952
|
+
*/
|
|
7687
8953
|
class PickerOptionComponent {
|
|
7688
8954
|
get ariaLabelValue() {
|
|
7689
8955
|
if (this.isClearOption) {
|
|
@@ -7719,11 +8985,17 @@ class PickerOptionComponent {
|
|
|
7719
8985
|
this.NAME = 'PickerOptionComponent';
|
|
7720
8986
|
this.role = 'option';
|
|
7721
8987
|
this.ariaSelected = false;
|
|
8988
|
+
/**
|
|
8989
|
+
* Whether this option is currently selected.
|
|
8990
|
+
* @default false
|
|
8991
|
+
*/
|
|
7722
8992
|
this.selected = false;
|
|
7723
|
-
this.isClearOption = false;
|
|
7724
8993
|
/**
|
|
7725
|
-
*
|
|
8994
|
+
* Whether this is a special "clear selection" option.
|
|
8995
|
+
* @default false
|
|
7726
8996
|
*/
|
|
8997
|
+
this.isClearOption = false;
|
|
8998
|
+
/** Emitted when the option is selected. */
|
|
7727
8999
|
this.select = new EventEmitter();
|
|
7728
9000
|
this._highlighted = false;
|
|
7729
9001
|
}
|
|
@@ -7840,22 +9112,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
7840
9112
|
}], ctorParameters: () => [{ type: i0.ElementRef }] });
|
|
7841
9113
|
|
|
7842
9114
|
/**
|
|
7843
|
-
*
|
|
7844
|
-
*
|
|
7845
|
-
* 1. A lxPickerTrigger, preferably a button element, which we use to open the dropdown on click or enter.
|
|
7846
|
-
* 2. A list of `<li>` elements with an lx-picker-option attribute that own the option template as content children.
|
|
9115
|
+
* A dropdown picker for selecting a value from a list of options.
|
|
9116
|
+
* Supports keyboard navigation, `ControlValueAccessor` for reactive forms, and custom trigger elements.
|
|
7847
9117
|
*
|
|
7848
|
-
*
|
|
9118
|
+
* ### Projection slots
|
|
9119
|
+
* - `lxPickerTrigger`: A button element used to open the dropdown on click or Enter
|
|
9120
|
+
* - `li[lx-picker-option]`: List items representing selectable options
|
|
7849
9121
|
*
|
|
7850
|
-
* Example
|
|
7851
|
-
*
|
|
7852
|
-
*
|
|
7853
|
-
*
|
|
7854
|
-
*
|
|
7855
|
-
*
|
|
7856
|
-
*
|
|
7857
|
-
*
|
|
7858
|
-
*
|
|
9122
|
+
* ### Example
|
|
9123
|
+
* @example
|
|
9124
|
+
* ```html
|
|
9125
|
+
* <lx-picker listBoxAriaLabel="Color picker">
|
|
9126
|
+
* <button lxPickerTrigger lx-button mode="outline" size="large" [square]="true">
|
|
9127
|
+
* {{ selection.label }}
|
|
9128
|
+
* </button>
|
|
9129
|
+
* @for (option of options; track option.id) {
|
|
9130
|
+
* <li lx-picker-option [value]="option.value" [selected]="selection === option"
|
|
9131
|
+
* (select)="selection = option" [optionId]="option.id">
|
|
9132
|
+
* {{ option.label }}
|
|
9133
|
+
* </li>
|
|
9134
|
+
* }
|
|
7859
9135
|
* </lx-picker>
|
|
7860
9136
|
* ```
|
|
7861
9137
|
*/
|
|
@@ -7889,6 +9165,10 @@ class PickerComponent {
|
|
|
7889
9165
|
constructor(dir, cdRef) {
|
|
7890
9166
|
this.dir = dir;
|
|
7891
9167
|
this.cdRef = cdRef;
|
|
9168
|
+
/**
|
|
9169
|
+
* Direction the picker options dropdown opens.
|
|
9170
|
+
* @default 'right'
|
|
9171
|
+
*/
|
|
7892
9172
|
this.openDirection = 'right';
|
|
7893
9173
|
/** @internal */
|
|
7894
9174
|
this._isFormControl = false;
|
|
@@ -8046,10 +9326,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
8046
9326
|
args: ['document:keydown', ['$event']]
|
|
8047
9327
|
}] } });
|
|
8048
9328
|
|
|
9329
|
+
/**
|
|
9330
|
+
* An individual pill/tag item with a remove button.
|
|
9331
|
+
* Typically used within `lx-pill-list` to display selected items.
|
|
9332
|
+
*
|
|
9333
|
+
* ### Example
|
|
9334
|
+
* @example
|
|
9335
|
+
* ```html
|
|
9336
|
+
* <lx-pill-item [item]="selectedItem"
|
|
9337
|
+
* [label]="'Option A'"
|
|
9338
|
+
* (remove)="onRemove($event)">
|
|
9339
|
+
* </lx-pill-item>
|
|
9340
|
+
* ```
|
|
9341
|
+
*/
|
|
8049
9342
|
class PillItemComponent {
|
|
8050
9343
|
constructor() {
|
|
8051
9344
|
this.NAME = 'PillItemComponent';
|
|
9345
|
+
/**
|
|
9346
|
+
* When set to true, disables the pill and prevents removal.
|
|
9347
|
+
*/
|
|
8052
9348
|
this.disabled = false;
|
|
9349
|
+
/**
|
|
9350
|
+
* Event emitted when the pill is removed.
|
|
9351
|
+
*/
|
|
8053
9352
|
this.remove = new EventEmitter();
|
|
8054
9353
|
}
|
|
8055
9354
|
removePill(item, isMouse = false) {
|
|
@@ -8076,11 +9375,64 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
8076
9375
|
type: Output
|
|
8077
9376
|
}] } });
|
|
8078
9377
|
|
|
9378
|
+
/**
|
|
9379
|
+
* A container for displaying a list of removable pill/tag items.
|
|
9380
|
+
* Commonly used inside `lx-multi-select` to show selected items.
|
|
9381
|
+
*
|
|
9382
|
+
* When used inside `lx-multi-select`, apply `class="pills"` for proper projection
|
|
9383
|
+
* and wire up `[keyboardSelectAction]` for keyboard navigation.
|
|
9384
|
+
*
|
|
9385
|
+
* ### Projection slots
|
|
9386
|
+
* - `#pillTemplate`: Optional custom template for rendering individual pills.
|
|
9387
|
+
* Receives each pill as implicit context. Use when you need custom styling
|
|
9388
|
+
* or attributes on individual pills.
|
|
9389
|
+
*
|
|
9390
|
+
* ### Example — Basic usage inside multi-select
|
|
9391
|
+
* @example
|
|
9392
|
+
* ```html
|
|
9393
|
+
* <lx-pill-list
|
|
9394
|
+
* class="pills"
|
|
9395
|
+
* [keyboardSelectAction]="multiSelect.selectionKeyboardSelectAction$"
|
|
9396
|
+
* [pills]="selectedItems"
|
|
9397
|
+
* labelKey="name"
|
|
9398
|
+
* itemKey="id"
|
|
9399
|
+
* (remove)="multiSelect.removeItem($event)">
|
|
9400
|
+
* </lx-pill-list>
|
|
9401
|
+
* ```
|
|
9402
|
+
*
|
|
9403
|
+
* ### Example — Custom pill template
|
|
9404
|
+
* @example
|
|
9405
|
+
* ```html
|
|
9406
|
+
* <lx-pill-list
|
|
9407
|
+
* class="pills"
|
|
9408
|
+
* [keyboardSelectAction]="multiSelect.selectionKeyboardSelectAction$"
|
|
9409
|
+
* [pills]="selectedItems"
|
|
9410
|
+
* itemKey="id"
|
|
9411
|
+
* (remove)="multiSelect.removeItem($event)">
|
|
9412
|
+
* <ng-template #pillTemplate let-pill>
|
|
9413
|
+
* <lx-pill-item
|
|
9414
|
+
* [label]="pill.name"
|
|
9415
|
+
* [item]="pill"
|
|
9416
|
+
* [class.readOnly]="pill.readOnly">
|
|
9417
|
+
* </lx-pill-item>
|
|
9418
|
+
* </ng-template>
|
|
9419
|
+
* </lx-pill-list>
|
|
9420
|
+
* ```
|
|
9421
|
+
*/
|
|
8079
9422
|
class PillListComponent extends KeyboardSelectDirective {
|
|
8080
9423
|
constructor() {
|
|
8081
9424
|
super(...arguments);
|
|
9425
|
+
/**
|
|
9426
|
+
* Array of items to display as pills.
|
|
9427
|
+
*/
|
|
8082
9428
|
this.pills = [];
|
|
9429
|
+
/**
|
|
9430
|
+
* When set to true, disables removal of pills.
|
|
9431
|
+
*/
|
|
8083
9432
|
this.disabled = false;
|
|
9433
|
+
/**
|
|
9434
|
+
* Event emitted when a pill is removed.
|
|
9435
|
+
*/
|
|
8084
9436
|
this.remove = new EventEmitter();
|
|
8085
9437
|
}
|
|
8086
9438
|
ngAfterViewInit() {
|
|
@@ -8187,6 +9539,34 @@ function stopKeyboardEventPropagation(evt) {
|
|
|
8187
9539
|
evt.stopImmediatePropagation();
|
|
8188
9540
|
}
|
|
8189
9541
|
|
|
9542
|
+
/**
|
|
9543
|
+
* A dropdown component for selecting a single value from a list of options.
|
|
9544
|
+
* Implements `ControlValueAccessor` for seamless integration with Angular reactive forms.
|
|
9545
|
+
*
|
|
9546
|
+
* ### Projection slots
|
|
9547
|
+
* - `.selectedOption`: Displays the currently selected value in the input field
|
|
9548
|
+
* - `.dropdownComponent`: Contains the dropdown (typically `lx-basic-dropdown`)
|
|
9549
|
+
*
|
|
9550
|
+
* Alternatively, use `lxSelectDropdown` and `lxSelectedOption` directives on `<ng-template>`.
|
|
9551
|
+
*
|
|
9552
|
+
* ### Example
|
|
9553
|
+
* @example
|
|
9554
|
+
* ```html
|
|
9555
|
+
* <lx-single-select
|
|
9556
|
+
* #select
|
|
9557
|
+
* [formControl]="control"
|
|
9558
|
+
* (query)="searchTerm = $event">
|
|
9559
|
+
* <span class="selectedOption">{{ control.value?.name }}</span>
|
|
9560
|
+
* <lx-basic-dropdown
|
|
9561
|
+
* class="dropdownComponent"
|
|
9562
|
+
* [keyboardSelectAction]="select.optionsKeyboardSelectAction$"
|
|
9563
|
+
* [options]="options | lxFilterByTerm: { term: searchTerm }"
|
|
9564
|
+
* labelKey="name"
|
|
9565
|
+
* (onItemSelected)="select.selectOption($event)">
|
|
9566
|
+
* </lx-basic-dropdown>
|
|
9567
|
+
* </lx-single-select>
|
|
9568
|
+
* ```
|
|
9569
|
+
*/
|
|
8190
9570
|
class SingleSelectComponent extends BaseSelectDirective {
|
|
8191
9571
|
/** @internal */
|
|
8192
9572
|
static calculateNewCursorPostionOnKeyboardNavigation(cursorPosition, keyCode) {
|
|
@@ -8227,16 +9607,25 @@ class SingleSelectComponent extends BaseSelectDirective {
|
|
|
8227
9607
|
constructor(cd) {
|
|
8228
9608
|
super();
|
|
8229
9609
|
this.cd = cd;
|
|
9610
|
+
/** Background color of the selection input field. */
|
|
8230
9611
|
this.selectionBackground = 'white';
|
|
9612
|
+
/** Size variant of the select component. */
|
|
8231
9613
|
this.size = 'default';
|
|
8232
9614
|
/** @deprecated To keep different inputs aligned, we should use the default padding */
|
|
8233
9615
|
this.padding = 'default';
|
|
9616
|
+
/** Whether the select field is required. */
|
|
8234
9617
|
this.required = false;
|
|
9618
|
+
/** Whether to close the dropdown when the Tab key is pressed. */
|
|
8235
9619
|
this.closeDropdownOnTab = true;
|
|
9620
|
+
/** Event emitted when the selection changes. */
|
|
8236
9621
|
this.selectionChange = new EventEmitter();
|
|
9622
|
+
/** Event emitted when the input loses focus. */
|
|
8237
9623
|
this.blur = new EventEmitter();
|
|
9624
|
+
/** Whether to show a clear button to remove the selection. */
|
|
8238
9625
|
this.allowClear = true;
|
|
9626
|
+
/** Tab index of the input element for keyboard navigation. */
|
|
8239
9627
|
this.tabIndex = 0;
|
|
9628
|
+
/** Whether to visually mark the input as invalid. */
|
|
8240
9629
|
this.markInvalid = false;
|
|
8241
9630
|
/** @internal */
|
|
8242
9631
|
this.destroyed$ = new Subject();
|
|
@@ -8474,8 +9863,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
8474
9863
|
args: ['queryInput', { static: true }]
|
|
8475
9864
|
}] } });
|
|
8476
9865
|
|
|
9866
|
+
/**
|
|
9867
|
+
* Trigger button for the sorting dropdown.
|
|
9868
|
+
* Displays the current sorting mode with a dropdown chevron icon.
|
|
9869
|
+
*
|
|
9870
|
+
* ### Example
|
|
9871
|
+
* @example
|
|
9872
|
+
* ```html
|
|
9873
|
+
* <lx-sorting-dropdown-trigger
|
|
9874
|
+
* label="Sort by"
|
|
9875
|
+
* currentSortingLabel="Name"
|
|
9876
|
+
* [disabled]="false">
|
|
9877
|
+
* </lx-sorting-dropdown-trigger>
|
|
9878
|
+
* ```
|
|
9879
|
+
*/
|
|
8477
9880
|
class SortingDropdownTriggerComponent {
|
|
8478
9881
|
constructor() {
|
|
9882
|
+
/**
|
|
9883
|
+
* Whether the trigger button is disabled.
|
|
9884
|
+
* @default false
|
|
9885
|
+
*/
|
|
8479
9886
|
this.disabled = false;
|
|
8480
9887
|
}
|
|
8481
9888
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: SortingDropdownTriggerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
@@ -8498,10 +9905,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
8498
9905
|
* score will be used for sorting.
|
|
8499
9906
|
*/
|
|
8500
9907
|
const RELEVANCE_SORTING_KEY = 'lx-relevance';
|
|
9908
|
+
/**
|
|
9909
|
+
* Dropdown for selecting sorting mode and direction.
|
|
9910
|
+
* Displays available sorting options and allows toggling between ascending/descending order.
|
|
9911
|
+
*
|
|
9912
|
+
* ### Example
|
|
9913
|
+
* @example
|
|
9914
|
+
* ```html
|
|
9915
|
+
* <lx-sorting-dropdown
|
|
9916
|
+
* [currentSorting]="{ key: 'name', order: 'asc' }"
|
|
9917
|
+
* [sortingOptions]="sortOptions"
|
|
9918
|
+
* (apply)="handleSortChange($event)">
|
|
9919
|
+
* </lx-sorting-dropdown>
|
|
9920
|
+
* ```
|
|
9921
|
+
*/
|
|
8501
9922
|
class SortingDropdownComponent {
|
|
8502
9923
|
constructor() {
|
|
9924
|
+
/**
|
|
9925
|
+
* Available sorting options to choose from.
|
|
9926
|
+
* @default []
|
|
9927
|
+
*/
|
|
8503
9928
|
this.sortingOptions = [];
|
|
9929
|
+
/**
|
|
9930
|
+
* Whether to show ascending/descending direction options.
|
|
9931
|
+
* @default true
|
|
9932
|
+
*/
|
|
8504
9933
|
this.showDirectionOptions = true;
|
|
9934
|
+
/** Event emitted when a new sorting configuration is applied. */
|
|
8505
9935
|
this.apply = new EventEmitter();
|
|
8506
9936
|
this.NAME = 'SortingDropdownComponent';
|
|
8507
9937
|
this.sortingDirections = ['asc', 'desc'];
|
|
@@ -8552,17 +9982,40 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
8552
9982
|
}] } });
|
|
8553
9983
|
|
|
8554
9984
|
/**
|
|
8555
|
-
*
|
|
9985
|
+
* A toggle switch component for selecting between two states (on/off, true/false).
|
|
9986
|
+
* Provides a visual toggle with optional label and supports disabled states.
|
|
9987
|
+
*
|
|
9988
|
+
* ### Example
|
|
9989
|
+
* @example
|
|
9990
|
+
* ```html
|
|
9991
|
+
* <lx-switch
|
|
9992
|
+
* [value]="isEnabled"
|
|
9993
|
+
* [label]="'Enable notifications'"
|
|
9994
|
+
* [labelInFront]="true"
|
|
9995
|
+
* (toggle)="handleToggle($event)">
|
|
9996
|
+
* </lx-switch>
|
|
9997
|
+
* ```
|
|
8556
9998
|
*/
|
|
8557
9999
|
class SwitchComponent {
|
|
8558
10000
|
constructor() {
|
|
8559
|
-
/**
|
|
10001
|
+
/**
|
|
10002
|
+
* Visual size variant of the switch.
|
|
10003
|
+
* @default 'small'
|
|
10004
|
+
*/
|
|
8560
10005
|
this.size = 'small';
|
|
8561
|
-
/**
|
|
10006
|
+
/**
|
|
10007
|
+
* Whether the switch is disabled and cannot be toggled.
|
|
10008
|
+
* @default false
|
|
10009
|
+
*/
|
|
8562
10010
|
this.disabled = false;
|
|
8563
|
-
/**
|
|
10011
|
+
/**
|
|
10012
|
+
* Whether the label should appear before (left of) the switch.
|
|
10013
|
+
* @default true
|
|
10014
|
+
*/
|
|
8564
10015
|
this.labelInFront = true;
|
|
8565
|
-
/**
|
|
10016
|
+
/**
|
|
10017
|
+
* Event emitted when the switch is toggled, returning the new boolean value.
|
|
10018
|
+
*/
|
|
8566
10019
|
this.toggle = new EventEmitter();
|
|
8567
10020
|
}
|
|
8568
10021
|
/** @internal */
|
|
@@ -9588,6 +11041,20 @@ const isRowSelectorActive = (params) => {
|
|
|
9588
11041
|
return isSelectorActive({ ...params, selectorType: 'selector-row' });
|
|
9589
11042
|
};
|
|
9590
11043
|
|
|
11044
|
+
/**
|
|
11045
|
+
* Contextual bubble menu for table editing in the rich text editor.
|
|
11046
|
+
*
|
|
11047
|
+
* Provides three context-sensitive menus that appear when interacting with tables:
|
|
11048
|
+
* - Row menu: appears when a table row selector is active
|
|
11049
|
+
* - Column menu: appears when a table column selector is active
|
|
11050
|
+
* - Table menu: appears when the entire table is selected
|
|
11051
|
+
*
|
|
11052
|
+
* ### Example
|
|
11053
|
+
* @example
|
|
11054
|
+
* ```html
|
|
11055
|
+
* <lx-table-bubble-menu [editor]="editor" />
|
|
11056
|
+
* ```
|
|
11057
|
+
*/
|
|
9591
11058
|
class TableBubbleMenuComponent {
|
|
9592
11059
|
constructor() {
|
|
9593
11060
|
this.NAME = 'RichTextEditorTableActions';
|
|
@@ -10158,8 +11625,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
10158
11625
|
}]
|
|
10159
11626
|
}] });
|
|
10160
11627
|
|
|
11628
|
+
/**
|
|
11629
|
+
* Footer component for modals with content projection for action buttons.
|
|
11630
|
+
*
|
|
11631
|
+
* ### Projection slots
|
|
11632
|
+
* - Default slot: Action buttons or footer content
|
|
11633
|
+
*
|
|
11634
|
+
* ### Example
|
|
11635
|
+
* @example
|
|
11636
|
+
* ```html
|
|
11637
|
+
* <lx-modal-footer [border]="true">
|
|
11638
|
+
* <button lx-button (click)="cancel()">Cancel</button>
|
|
11639
|
+
* <button lx-button color="primary" (click)="save()">Save</button>
|
|
11640
|
+
* </lx-modal-footer>
|
|
11641
|
+
* ```
|
|
11642
|
+
*/
|
|
10161
11643
|
class ModalFooterComponent {
|
|
10162
11644
|
constructor() {
|
|
11645
|
+
/**
|
|
11646
|
+
* Whether to show a top border on the footer.
|
|
11647
|
+
* @default false
|
|
11648
|
+
*/
|
|
10163
11649
|
this.border = false;
|
|
10164
11650
|
}
|
|
10165
11651
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: ModalFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
@@ -10172,9 +11658,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
10172
11658
|
type: Input
|
|
10173
11659
|
}] } });
|
|
10174
11660
|
|
|
11661
|
+
/**
|
|
11662
|
+
* Header component for modals with optional title and content projection.
|
|
11663
|
+
*
|
|
11664
|
+
* ### Projection slots
|
|
11665
|
+
* - Default slot: Custom header content displayed before the title
|
|
11666
|
+
*
|
|
11667
|
+
* ### Example
|
|
11668
|
+
* @example
|
|
11669
|
+
* ```html
|
|
11670
|
+
* <lx-modal-header [title]="'Create New Item'" [bottomBorder]="true">
|
|
11671
|
+
* <button class="close-button">×</button>
|
|
11672
|
+
* </lx-modal-header>
|
|
11673
|
+
* ```
|
|
11674
|
+
*/
|
|
10175
11675
|
class ModalHeaderComponent {
|
|
10176
11676
|
constructor() {
|
|
11677
|
+
/**
|
|
11678
|
+
* The title text to display in the header.
|
|
11679
|
+
* @default ''
|
|
11680
|
+
*/
|
|
10177
11681
|
this.title = '';
|
|
11682
|
+
/**
|
|
11683
|
+
* Whether to show a bottom border on the header.
|
|
11684
|
+
* @default true
|
|
11685
|
+
*/
|
|
10178
11686
|
this.bottomBorder = true;
|
|
10179
11687
|
}
|
|
10180
11688
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: ModalHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
@@ -10492,6 +12000,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
10492
12000
|
}]
|
|
10493
12001
|
}] });
|
|
10494
12002
|
|
|
12003
|
+
/**
|
|
12004
|
+
* Modal dialog for creating and editing hyperlinks in the rich text editor.
|
|
12005
|
+
*
|
|
12006
|
+
* Provides a form to input link text and URL with validation. Supports creating new links
|
|
12007
|
+
* and editing existing ones. The modal state is managed by the link plugin.
|
|
12008
|
+
*
|
|
12009
|
+
* ### Example
|
|
12010
|
+
* @example
|
|
12011
|
+
* ```html
|
|
12012
|
+
* <lx-link-modal [editor]="editor" />
|
|
12013
|
+
* ```
|
|
12014
|
+
*/
|
|
10495
12015
|
class LinkModalComponent {
|
|
10496
12016
|
constructor() {
|
|
10497
12017
|
this.NAME = 'LinkModalComponent';
|
|
@@ -10563,9 +12083,32 @@ const ensureHttpProtocol = (url) => {
|
|
|
10563
12083
|
return url.startsWith('http://') || url.startsWith('https://') ? url : `http://${url}`;
|
|
10564
12084
|
};
|
|
10565
12085
|
|
|
12086
|
+
/**
|
|
12087
|
+
* Toolbar component for the rich text editor providing formatting controls.
|
|
12088
|
+
*
|
|
12089
|
+
* Displays formatting buttons based on enabled Tiptap extensions, including text styles,
|
|
12090
|
+
* bold/italic/underline, lists, alignment, links, code blocks, and table insertion.
|
|
12091
|
+
* The toolbar visibility is controlled by the `isVisible` input and link modal state.
|
|
12092
|
+
*
|
|
12093
|
+
* ### Projection slots
|
|
12094
|
+
* - `.diagram-btn`: Custom diagram button when `lxDiagram` extension is enabled
|
|
12095
|
+
*
|
|
12096
|
+
* ### Example
|
|
12097
|
+
* @example
|
|
12098
|
+
* ```html
|
|
12099
|
+
* <lx-rich-text-editor-toolbar [editor]="editor" [isVisible]="true">
|
|
12100
|
+
* <button class="diagram-btn" lx-button>Insert Diagram</button>
|
|
12101
|
+
* </lx-rich-text-editor-toolbar>
|
|
12102
|
+
* ```
|
|
12103
|
+
*/
|
|
10566
12104
|
class RichTextEditorToolbarComponent {
|
|
10567
12105
|
constructor() {
|
|
10568
12106
|
this.NAME = 'RichTextEditorToolbarComponent';
|
|
12107
|
+
/**
|
|
12108
|
+
* Controls the visibility of the toolbar.
|
|
12109
|
+
*
|
|
12110
|
+
* @default true
|
|
12111
|
+
*/
|
|
10569
12112
|
this.isVisible = input(true);
|
|
10570
12113
|
this.headingLevels = [];
|
|
10571
12114
|
this.isLinkModalOpen = signal(false);
|
|
@@ -10773,16 +12316,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
10773
12316
|
}]
|
|
10774
12317
|
}], ctorParameters: () => [] });
|
|
10775
12318
|
|
|
12319
|
+
/**
|
|
12320
|
+
* Base component for custom Tiptap node views in Angular.
|
|
12321
|
+
*
|
|
12322
|
+
* Extend this component to create custom node views for the rich text editor.
|
|
12323
|
+
* Provides all Tiptap NodeViewProps as required input signals.
|
|
12324
|
+
*/
|
|
10776
12325
|
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
|
|
10777
12326
|
class AngularNodeViewComponent {
|
|
10778
12327
|
constructor() {
|
|
12328
|
+
/** The Tiptap editor instance. */
|
|
10779
12329
|
this.editor = input.required();
|
|
12330
|
+
/** The ProseMirror node being rendered. */
|
|
10780
12331
|
this.node = input.required();
|
|
12332
|
+
/** Array of decorations for this node. */
|
|
10781
12333
|
this.decorations = input.required();
|
|
12334
|
+
/** Whether the node is currently selected. */
|
|
10782
12335
|
this.selected = input.required();
|
|
12336
|
+
/** The Tiptap extension that created this node. */
|
|
10783
12337
|
this.extension = input.required();
|
|
12338
|
+
/** Function to get the node's position in the document. */
|
|
10784
12339
|
this.getPos = input.required();
|
|
12340
|
+
/** Function to update the node's attributes. */
|
|
10785
12341
|
this.updateAttributes = input.required();
|
|
12342
|
+
/** Function to delete the node from the document. */
|
|
10786
12343
|
this.deleteNode = input.required();
|
|
10787
12344
|
}
|
|
10788
12345
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: AngularNodeViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
@@ -11224,25 +12781,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
11224
12781
|
}] });
|
|
11225
12782
|
|
|
11226
12783
|
/**
|
|
11227
|
-
*
|
|
11228
|
-
*
|
|
11229
|
-
* ## Examples
|
|
11230
|
-
|
|
11231
|
-
* This popover encapsulates this open source library: https://github.com/ncstate-sat/popover,
|
|
11232
|
-
* make sure to also check out the docs over there.
|
|
12784
|
+
* A floating overlay component anchored to a trigger element.
|
|
12785
|
+
* Based on the [ncstate-sat/popover](https://github.com/ncstate-sat/popover) library.
|
|
11233
12786
|
*
|
|
11234
|
-
*
|
|
11235
|
-
*
|
|
11236
|
-
*
|
|
12787
|
+
* The popover requires one of the trigger directives:
|
|
12788
|
+
* - `lxPopoverHover`: Shows on hover (both anchor and popover body)
|
|
12789
|
+
* - `lxPopoverClick`: Shows on click (stays open while hovering popover body)
|
|
11237
12790
|
*
|
|
11238
|
-
*
|
|
11239
|
-
*
|
|
11240
|
-
* ### Example:
|
|
12791
|
+
* ### Example with hover trigger
|
|
12792
|
+
* @example
|
|
11241
12793
|
* ```html
|
|
11242
12794
|
* <div lxPopoverHover
|
|
11243
12795
|
* hoverAnchor
|
|
11244
12796
|
* satPopoverAnchor
|
|
11245
|
-
* #anchor="hoverAnchor"
|
|
12797
|
+
* #anchor="hoverAnchor">Hover me</div>
|
|
11246
12798
|
* <lx-popover [trigger]="anchor"
|
|
11247
12799
|
* horizontalAlign="after"
|
|
11248
12800
|
* verticalAlign="center">
|
|
@@ -11250,18 +12802,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
11250
12802
|
* </lx-popover>
|
|
11251
12803
|
* ```
|
|
11252
12804
|
*
|
|
11253
|
-
*
|
|
11254
|
-
*
|
|
11255
|
-
* needs to fetch some data before opening it, we do not register a click EventListener in this directive,
|
|
11256
|
-
* but require the developer to implement that in the component, where the popover is used.
|
|
11257
|
-
*
|
|
11258
|
-
* ### Example:
|
|
12805
|
+
* ### Example with click trigger
|
|
12806
|
+
* @example
|
|
11259
12807
|
* ```html
|
|
11260
12808
|
* <div lxPopoverClick
|
|
11261
12809
|
* clickAnchor
|
|
11262
12810
|
* satPopoverAnchor
|
|
11263
12811
|
* #anchor="clickAnchor"
|
|
11264
|
-
* (click)="popover.open()">Click
|
|
12812
|
+
* (click)="popover.open()">Click me</div>
|
|
11265
12813
|
* <lx-popover [trigger]="anchor"
|
|
11266
12814
|
* horizontalAlign="after"
|
|
11267
12815
|
* verticalAlign="center"
|
|
@@ -11270,10 +12818,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
11270
12818
|
* </lx-popover>
|
|
11271
12819
|
* ```
|
|
11272
12820
|
*
|
|
11273
|
-
*
|
|
11274
|
-
*
|
|
11275
|
-
*
|
|
11276
|
-
*
|
|
12821
|
+
* ### With strict templates
|
|
12822
|
+
* When using `strictTemplates=true`, bind `satPopoverAnchor` to the popover's internal reference:
|
|
12823
|
+
* ### Example
|
|
12824
|
+
* @example
|
|
11277
12825
|
* ```html
|
|
11278
12826
|
* <div [satPopoverAnchor]="popover.satPopover"></div>
|
|
11279
12827
|
* <lx-popover #popover>
|
|
@@ -11688,6 +13236,27 @@ var LxTabGroupKeyCode;
|
|
|
11688
13236
|
LxTabGroupKeyCode["End"] = "End";
|
|
11689
13237
|
})(LxTabGroupKeyCode || (LxTabGroupKeyCode = {}));
|
|
11690
13238
|
|
|
13239
|
+
/**
|
|
13240
|
+
* Individual tab component used inside `lx-tab-group`.
|
|
13241
|
+
* Supports icons, counters, router links, and keyboard navigation.
|
|
13242
|
+
* Content is projected and rendered by the parent tab group when the tab is active.
|
|
13243
|
+
*
|
|
13244
|
+
* ### Example
|
|
13245
|
+
* @example
|
|
13246
|
+
* ```html
|
|
13247
|
+
* <lx-tab-group>
|
|
13248
|
+
* <lx-tab [label]="'General'" [icon]="'settings'" [disabled]="false">
|
|
13249
|
+
* <p>General content</p>
|
|
13250
|
+
* </lx-tab>
|
|
13251
|
+
* <lx-tab [label]="'Notifications'" [counter]="3">
|
|
13252
|
+
* <p>Notification content</p>
|
|
13253
|
+
* </lx-tab>
|
|
13254
|
+
* <lx-tab [label]="'Settings'" [tabLink]="['/settings']">
|
|
13255
|
+
* <p>Settings content</p>
|
|
13256
|
+
* </lx-tab>
|
|
13257
|
+
* </lx-tab-group>
|
|
13258
|
+
* ```
|
|
13259
|
+
*/
|
|
11691
13260
|
class TabComponent {
|
|
11692
13261
|
set isActive(value) {
|
|
11693
13262
|
this._isActive = value;
|
|
@@ -11704,18 +13273,52 @@ class TabComponent {
|
|
|
11704
13273
|
this.router = router;
|
|
11705
13274
|
this.activatedRoute = activatedRoute;
|
|
11706
13275
|
/**
|
|
11707
|
-
* The
|
|
13276
|
+
* The design of the icon.
|
|
11708
13277
|
* @default NonInteractive
|
|
11709
13278
|
*/
|
|
11710
13279
|
this.iconDesign = 'NonInteractive';
|
|
13280
|
+
/**
|
|
13281
|
+
* The label text displayed for the tab.
|
|
13282
|
+
* @default ''
|
|
13283
|
+
*/
|
|
11711
13284
|
this.label = '';
|
|
13285
|
+
/**
|
|
13286
|
+
* Options for the RouterLinkActive directive.
|
|
13287
|
+
* @default { exact: true }
|
|
13288
|
+
*/
|
|
11712
13289
|
this.routerLinkActiveOptions = { exact: true };
|
|
13290
|
+
/**
|
|
13291
|
+
* Size of the counter badge.
|
|
13292
|
+
* @default 'default'
|
|
13293
|
+
*/
|
|
11713
13294
|
this.counterBadgeSize = 'default';
|
|
13295
|
+
/**
|
|
13296
|
+
* Whether to remove margin from the tab.
|
|
13297
|
+
* @default false
|
|
13298
|
+
*/
|
|
11714
13299
|
this.noMargin = false;
|
|
13300
|
+
/**
|
|
13301
|
+
* Whether to remove left margin for the first tab.
|
|
13302
|
+
* @default false
|
|
13303
|
+
*/
|
|
11715
13304
|
this.noLeftMarginForFirstTab = false;
|
|
13305
|
+
/**
|
|
13306
|
+
* Background color of the tab.
|
|
13307
|
+
* @default 'white'
|
|
13308
|
+
*/
|
|
11716
13309
|
this.background = 'white';
|
|
13310
|
+
/**
|
|
13311
|
+
* Whether the tab is disabled and cannot be selected.
|
|
13312
|
+
* @default false
|
|
13313
|
+
*/
|
|
11717
13314
|
this.disabled = false;
|
|
13315
|
+
/**
|
|
13316
|
+
* Event emitted when the tab is selected.
|
|
13317
|
+
*/
|
|
11718
13318
|
this.switch = new EventEmitter();
|
|
13319
|
+
/**
|
|
13320
|
+
* Event emitted when a keyboard key is pressed on the tab.
|
|
13321
|
+
*/
|
|
11719
13322
|
this.keyDownAction = new EventEmitter();
|
|
11720
13323
|
this._isActive = false;
|
|
11721
13324
|
this.tabId = uniqueId$1('tab');
|
|
@@ -11800,6 +13403,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
11800
13403
|
args: [RouterLinkActive]
|
|
11801
13404
|
}] } });
|
|
11802
13405
|
|
|
13406
|
+
/**
|
|
13407
|
+
* Container for tab navigation that manages active tab state and keyboard interactions.
|
|
13408
|
+
* Supports both static tabs and router-linked tabs with keyboard navigation (arrow keys, Home, End).
|
|
13409
|
+
*
|
|
13410
|
+
* ### Content Projection
|
|
13411
|
+
* - Project `lx-tab` components as children
|
|
13412
|
+
*
|
|
13413
|
+
* ### Example
|
|
13414
|
+
* @example
|
|
13415
|
+
* ```html
|
|
13416
|
+
* <lx-tab-group [selectedIndex]="0" (indexChange)="onTabChange($event)">
|
|
13417
|
+
* <lx-tab [label]="'General'" [icon]="'settings'">
|
|
13418
|
+
* <p>General content</p>
|
|
13419
|
+
* </lx-tab>
|
|
13420
|
+
* <lx-tab [label]="'Notifications'" [counter]="3">
|
|
13421
|
+
* <p>Notification content</p>
|
|
13422
|
+
* </lx-tab>
|
|
13423
|
+
* </lx-tab-group>
|
|
13424
|
+
* ```
|
|
13425
|
+
*/
|
|
11803
13426
|
class TabGroupComponent {
|
|
11804
13427
|
/** @internal */
|
|
11805
13428
|
get tabIds() {
|
|
@@ -11814,11 +13437,19 @@ class TabGroupComponent {
|
|
|
11814
13437
|
}
|
|
11815
13438
|
constructor(cd) {
|
|
11816
13439
|
this.cd = cd;
|
|
13440
|
+
/**
|
|
13441
|
+
* Whether the tabs should be centered.
|
|
13442
|
+
* @default false
|
|
13443
|
+
*/
|
|
11817
13444
|
this.isCentered = false;
|
|
11818
13445
|
/**
|
|
11819
|
-
* The tab whose content should be displayed.
|
|
13446
|
+
* The index of the tab whose content should be displayed.
|
|
13447
|
+
* @default 0
|
|
11820
13448
|
*/
|
|
11821
13449
|
this.selectedIndex = 0;
|
|
13450
|
+
/**
|
|
13451
|
+
* Event emitted when the selected tab index changes.
|
|
13452
|
+
*/
|
|
11822
13453
|
this.indexChange = new EventEmitter();
|
|
11823
13454
|
/**
|
|
11824
13455
|
* The tab that is currently focused via keyboard.
|