@leanix/components 0.4.470 → 0.4.473
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/esm2022/lib/core-ui/components/spinner/spinner.component.mjs +4 -4
- package/esm2022/lib/core-ui/components/table/table-header/table-header.component.mjs +85 -33
- package/esm2022/lib/core-ui/components/table/table.component.mjs +13 -57
- package/esm2022/lib/core-ui/components/tokenizer/tokenizer.component.mjs +40 -1
- package/esm2022/lib/core-ui/core-ui.module.mjs +2 -1
- package/esm2022/lib/forms-ui/components/option-group-dropdown/option-group-dropdown.component.mjs +4 -2
- package/esm2022/lib/forms-ui/components/picker/picker.component.mjs +4 -2
- package/esm2022/lib/forms-ui/components/single-select/single-select.component.mjs +12 -1
- package/esm2022/lib/tab-ui/components/tab-group/tab-group.component.mjs +24 -1
- package/fesm2022/leanix-components.mjs +184 -99
- package/fesm2022/leanix-components.mjs.map +1 -1
- package/lib/core-ui/components/spinner/spinner.component.d.ts +3 -3
- package/lib/core-ui/components/table/table-header/table-header.component.d.ts +8 -10
- package/lib/core-ui/components/table/table.component.d.ts +5 -13
- package/lib/core-ui/components/tokenizer/tokenizer.component.d.ts +39 -0
- package/lib/forms-ui/components/option-group-dropdown/option-group-dropdown.component.d.ts +3 -1
- package/lib/forms-ui/components/picker/picker.component.d.ts +3 -1
- package/lib/forms-ui/components/single-select/single-select.component.d.ts +11 -0
- package/lib/tab-ui/components/tab-group/tab-group.component.d.ts +23 -0
- package/package.json +3 -2
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
|
-
import { InjectionToken, Component, Input, signal, ChangeDetectionStrategy, HostBinding, inject, input, computed, EventEmitter, Output, HostListener, Injectable, ElementRef, Inject, ViewChild, Directive,
|
2
|
+
import { InjectionToken, Component, Input, signal, ChangeDetectionStrategy, HostBinding, inject, input, computed, EventEmitter, Output, HostListener, Injectable, ElementRef, Inject, ViewChild, model, Directive, Optional, Pipe, NgModule, effect, ContentChildren, DestroyRef, ChangeDetectorRef, ContentChild, ViewChildren, forwardRef, TemplateRef, viewChild, booleanAttribute, SecurityContext, Self, Host } from '@angular/core';
|
3
3
|
import * as i1$1 from '@ngx-translate/core';
|
4
4
|
import { TranslatePipe, TranslateModule } from '@ngx-translate/core';
|
5
5
|
import * as i1 from '@angular/common';
|
@@ -15,6 +15,7 @@ import * as i1$9 from '@angular/router';
|
|
15
15
|
import { RouterLink, RouterLinkActive, RouterModule } from '@angular/router';
|
16
16
|
import { CdkStepper, CdkStepperModule } from '@angular/cdk/stepper';
|
17
17
|
import * as i1$2 from '@angular/cdk/bidi';
|
18
|
+
import { registerIcon } from '@ui5/webcomponents-base/dist/asset-registries/Icons.js';
|
18
19
|
import Color from 'color';
|
19
20
|
import { format, distanceInWords, startOfDay } from 'date-fns';
|
20
21
|
import DOMPurify from 'dompurify';
|
@@ -1100,10 +1101,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
|
|
1100
1101
|
|
1101
1102
|
/**
|
1102
1103
|
* The following CSS classes should be used to style this component. The use of the inputs is deprecated.
|
1103
|
-
* - fullSpace
|
1104
|
-
* - fullSpaceFixed
|
1104
|
+
* - `fullSpace`: Sets position to absolute with full height and width => fills ancestor with position set.
|
1105
|
+
* - `fullSpaceFixed`: Sets position to fixed with full height and width => fills window
|
1105
1106
|
* (or ancestor with new rendering context, created, for example, with `transform: translate(0, 0)`
|
1106
|
-
* - fadeBackground
|
1107
|
+
* - `fadeBackground`: Sets background to 60% transparent white. TODO: Always use for fullSpace* classes and remove.
|
1107
1108
|
*/
|
1108
1109
|
class SpinnerComponent {
|
1109
1110
|
constructor() {
|
@@ -1186,50 +1187,112 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
|
|
1186
1187
|
args: [{ selector: 'lx-stepper', standalone: true, imports: [CommonModule, CdkStepperModule], providers: [{ provide: CdkStepper, useExisting: StepperComponent }], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ul class=\"stepper\">\n @for (step of steps; track step.label; let i = $index) {\n <li class=\"step\" [ngClass]=\"{ 'step-completed': isCompleted(i) }\">\n <div\n class=\"step-container\"\n [class]=\"isSmallVariant ? 'step-container-small' : 'step-container-normal'\"\n [ngClass]=\"{ 'step-container-active': isActiveStep(i), 'step-container-completed': isCompleted(i) }\"\n >\n <div class=\"step-number\" [ngClass]=\"{ 'step-number-active': isActiveStep(i) }\">\n @if (isCompleted(i)) {\n <i [class]=\"'far fa-check check-icon'\" [ngClass]=\"{ 'small-icon': isSmallVariant }\"></i>\n } @else if (!isSmallVariant) {\n {{ i + 1 }}\n }\n </div>\n @if (!isSmallVariant) {\n <div class=\"step-title\">\n {{ step.label }}\n </div>\n }\n </div>\n </li>\n }\n</ul>\n@if (selected) {\n <div class=\"content\">\n <ng-container [ngTemplateOutlet]=\"selected!.content\" />\n </div>\n}\n", styles: [".stepper{display:flex;position:relative;align-items:center;padding-left:0}.step{position:relative;z-index:1;flex:1;display:flex;flex-direction:row;flex-shrink:0}.step:not(:last-child):after{content:\"\";position:relative;z-index:1;flex:auto;height:1px;min-width:30px;border-top:2px solid #b2bccc;align-self:center;margin-left:5px;margin-right:5px}.step-container{display:flex;flex-direction:column;justify-content:space-between;flex-shrink:0;border:2px solid #b2bccc;border-radius:50%;background-color:#fff;pointer-events:none}.step-container-normal{width:40px;height:40px}.step-container-small{width:22.5px;height:22.5px}.step-number{color:#b2bccc;font-size:15.5px;font-style:normal;font-weight:var(--lxFontNormal, 400);line-height:20px;width:100%;height:100%;padding-top:8px;text-align:center}.step-container-small .step-number{padding-top:0}.step-title{width:max-content;top:50px;position:absolute}.check-icon{font-size:20px;color:#0070f2}.small-icon{position:relative;font-size:var(--lxFontSmallSize, 12px)}@supports (-moz-appearance: none){.small-icon{top:-1px}}.content{margin-top:48px;height:100%}.step:first-child{justify-content:flex-start}.step:first-child .step-title{left:0}.step:not(:first-child):not(:last-child) .step-container{align-self:center}.step:not(:first-child):not(:last-child) .step-container .step-title{align-self:center}.step:last-child{justify-content:flex-end;align-items:flex-end;text-align:right;flex:0 0 auto}.step:last-child .step-container .step-title{align-self:flex-end;right:0}.step:last-child .step-number{margin-right:40%}.step:nth-child(n+19):last-child .step-number{margin-right:31%}.step-container.step-container-active{background-color:#0070f2;border-color:#0070f2}.step-number-active{color:#fff}.step.step-completed:not(:last-child):after{border-color:#0070f2}.step-container.step-container-completed{border-color:#0070f2}\n"] }]
|
1187
1188
|
}], ctorParameters: () => [{ type: i1$2.Directionality }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }] });
|
1188
1189
|
|
1190
|
+
// eslint-disable-next-line @angular-eslint/directive-class-suffix
|
1191
|
+
class TableComponent {
|
1192
|
+
constructor() {
|
1193
|
+
this.isSortable = input(false);
|
1194
|
+
this.sort = model({});
|
1195
|
+
}
|
1196
|
+
onTableHeaderSortChange(sort) {
|
1197
|
+
this.sort.set(sort);
|
1198
|
+
}
|
1199
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
1200
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.8", type: TableComponent, isStandalone: true, selector: "table[lx-table]", inputs: { isSortable: { classPropertyName: "isSortable", publicName: "isSortable", isSignal: true, isRequired: false, transformFunction: null }, sort: { classPropertyName: "sort", publicName: "sort", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sort: "sortChange" }, host: { classAttribute: "table table-hover" }, ngImport: i0 }); }
|
1201
|
+
}
|
1202
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: TableComponent, decorators: [{
|
1203
|
+
type: Directive,
|
1204
|
+
args: [{
|
1205
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
1206
|
+
selector: 'table[lx-table]',
|
1207
|
+
host: {
|
1208
|
+
class: 'table table-hover'
|
1209
|
+
},
|
1210
|
+
standalone: true
|
1211
|
+
}]
|
1212
|
+
}] });
|
1213
|
+
|
1214
|
+
registerIcon('sort', {
|
1215
|
+
pathData: '',
|
1216
|
+
ltr: false,
|
1217
|
+
collection: 'lx-icons',
|
1218
|
+
packageName: '@leanix/theming',
|
1219
|
+
viewBox: '0 0 16 16',
|
1220
|
+
customTemplate: () => ({
|
1221
|
+
strings: [
|
1222
|
+
'<path d="M8.00278 2C8.19778 2 8.37778 2.09 8.49028 2.2475L10.8903 5.5475C11.0253 5.7275 11.0403 5.975 10.9428 6.17C10.8378 6.3725 10.6353 6.5 10.4103 6.5L5.61028 6.5C5.38528 6.5 5.17528 6.3725 5.07778 6.17C4.97278 5.9675 4.99528 5.7275 5.13028 5.5475L7.53028 2.2475C7.64278 2.09 7.82278 2 8.01778 2H8.00278Z" fill="#99A5BB"/>',
|
1223
|
+
'<path d="M8.00278 14.455C7.80778 14.455 7.62778 14.365 7.51528 14.2075L5.11528 10.9075C4.98028 10.7275 4.96528 10.48 5.06278 10.285C5.16778 10.0825 5.37028 9.95496 5.59528 9.95496H10.3953C10.6203 9.95496 10.8303 10.0825 10.9278 10.285C11.0328 10.4875 11.0103 10.7275 10.8753 10.9075L8.47528 14.2075C8.36278 14.365 8.18278 14.455 7.98778 14.455H8.00278Z" fill="#99A5BB"/>'
|
1224
|
+
]
|
1225
|
+
})
|
1226
|
+
});
|
1227
|
+
registerIcon('sort-desc', {
|
1228
|
+
pathData: '',
|
1229
|
+
ltr: false,
|
1230
|
+
collection: 'lx-icons',
|
1231
|
+
packageName: '@leanix/theming',
|
1232
|
+
viewBox: '0 0 16 16',
|
1233
|
+
customTemplate: () => ({
|
1234
|
+
strings: [
|
1235
|
+
'<path d="M8.00278 2C8.19778 2 8.37778 2.09 8.49028 2.2475L10.8903 5.5475C11.0253 5.7275 11.0403 5.975 10.9428 6.17C10.8378 6.3725 10.6353 6.5 10.4103 6.5L5.61028 6.5C5.38528 6.5 5.17528 6.3725 5.07778 6.17C4.97278 5.9675 4.99528 5.7275 5.13028 5.5475L7.53028 2.2475C7.64278 2.09 7.82278 2 8.01778 2H8.00278Z" fill="#99A5BB"/>',
|
1236
|
+
'<path d="M8.00278 14.455C7.80778 14.455 7.62778 14.365 7.51528 14.2075L5.11528 10.9075C4.98028 10.7275 4.96528 10.48 5.06278 10.285C5.16778 10.0825 5.37028 9.95496 5.59528 9.95496H10.3953C10.6203 9.95496 10.8303 10.0825 10.9278 10.285C11.0328 10.4875 11.0103 10.7275 10.8753 10.9075L8.47528 14.2075C8.36278 14.365 8.18278 14.455 7.98778 14.455H8.00278Z" fill="#2A303D"/>'
|
1237
|
+
]
|
1238
|
+
})
|
1239
|
+
});
|
1240
|
+
registerIcon('sort-asc', {
|
1241
|
+
pathData: '',
|
1242
|
+
ltr: false,
|
1243
|
+
collection: 'lx-icons',
|
1244
|
+
packageName: '@leanix/theming',
|
1245
|
+
viewBox: '0 0 16 16',
|
1246
|
+
customTemplate: () => ({
|
1247
|
+
strings: [
|
1248
|
+
'<path d="M8.00278 2C8.19778 2 8.37778 2.09 8.49028 2.2475L10.8903 5.5475C11.0253 5.7275 11.0403 5.975 10.9428 6.17C10.8378 6.3725 10.6353 6.5 10.4103 6.5L5.61028 6.5C5.38528 6.5 5.17528 6.3725 5.07778 6.17C4.97278 5.9675 4.99528 5.7275 5.13028 5.5475L7.53028 2.2475C7.64278 2.09 7.82278 2 8.01778 2H8.00278Z" fill="#2A303D"/>',
|
1249
|
+
'<path d="M8.00278 14.455C7.80778 14.455 7.62778 14.365 7.51528 14.2075L5.11528 10.9075C4.98028 10.7275 4.96528 10.48 5.06278 10.285C5.16778 10.0825 5.37028 9.95496 5.59528 9.95496H10.3953C10.6203 9.95496 10.8303 10.0825 10.9278 10.285C11.0328 10.4875 11.0103 10.7275 10.8753 10.9075L8.47528 14.2075C8.36278 14.365 8.18278 14.455 7.98778 14.455H8.00278Z" fill="#99A5BB"/>'
|
1250
|
+
]
|
1251
|
+
})
|
1252
|
+
});
|
1189
1253
|
class TableHeaderComponent {
|
1190
|
-
|
1191
|
-
|
1192
|
-
this.
|
1254
|
+
#sort;
|
1255
|
+
constructor(parentTable) {
|
1256
|
+
this.parentTable = parentTable;
|
1193
1257
|
this.sortChange = new EventEmitter();
|
1194
|
-
this.sortable = false;
|
1258
|
+
this.sortable = computed(() => this.parentTable?.isSortable() ?? false);
|
1259
|
+
this.order = computed(() => {
|
1260
|
+
const sort = this.parentTable ? this.parentTable.sort() : this.#sort();
|
1261
|
+
if (this.column !== sort?.key) {
|
1262
|
+
return undefined;
|
1263
|
+
}
|
1264
|
+
else {
|
1265
|
+
return sort?.order;
|
1266
|
+
}
|
1267
|
+
});
|
1268
|
+
this.#sort = signal({ key: this.column, order: undefined });
|
1195
1269
|
}
|
1196
1270
|
onSort() {
|
1197
1271
|
if (this.column) {
|
1198
|
-
|
1199
|
-
|
1200
|
-
|
1201
|
-
else if (this.order === 'ASC') {
|
1202
|
-
this.order = 'DESC';
|
1272
|
+
const sort = { key: this.column, order: determineNewOrder(this.order()) };
|
1273
|
+
if (!this.parentTable) {
|
1274
|
+
this.#sort.set(sort);
|
1203
1275
|
}
|
1204
|
-
|
1205
|
-
|
1206
|
-
}
|
1207
|
-
this.sortChange.emit({ key: this.order ? this.column : undefined, order: this.order });
|
1276
|
+
this.sortChange.emit(sort);
|
1277
|
+
this.parentTable?.onTableHeaderSortChange(sort);
|
1208
1278
|
}
|
1209
1279
|
}
|
1210
|
-
|
1211
|
-
|
1212
|
-
this.changeDetection.markForCheck();
|
1213
|
-
}
|
1214
|
-
get order() {
|
1215
|
-
return this._order;
|
1216
|
-
}
|
1217
|
-
set isTabable(tabable) {
|
1218
|
-
this.elmentRef.nativeElement.tabIndex = tabable ? 0 : -1;
|
1219
|
-
}
|
1220
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: TableHeaderComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
1221
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.8", type: TableHeaderComponent, isStandalone: true, selector: "lx-th", inputs: { column: "column" }, outputs: { sortChange: "sortChange" }, host: { listeners: { "keydown.enter": "onSort()", "click": "onSort()" }, properties: { "class.sortable": "this.sortable" } }, ngImport: i0, template: "<span>\n <ng-content />\n</span>\n<i\n class=\"fas\"\n [class.fa-sort]=\"!order\"\n [class.inactive]=\"!order\"\n [class.fa-sort-up]=\"order === 'ASC'\"\n [class.fa-sort-down]=\"order === 'DESC'\"\n *ngIf=\"sortable\"\n></i>\n", styles: [":host{display:table-cell;padding:8px;vertical-align:bottom;border-bottom:2px solid #e1e5eb;border-top:none;font-weight:700}:host.sortable span{cursor:pointer}i{margin-left:4px;cursor:pointer}.inactive{color:#e1e5eb}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
1280
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: TableHeaderComponent, deps: [{ token: TableComponent, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
1281
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.8", type: TableHeaderComponent, isStandalone: true, selector: "lx-th", inputs: { column: "column" }, outputs: { sortChange: "sortChange" }, host: { attributes: { "role": "columnheader" }, listeners: { "keydown.enter": "onSort()", "click": "onSort()" }, properties: { "class.sortable": "sortable()", "tabIndex": "sortable() ? 0 : -1" } }, ngImport: i0, template: "<div class=\"wrapper\">\n <span>\n <ng-content />\n </span>\n @if (sortable()) {\n @if (!order()) {\n <ui5-icon name=\"lx-icons/sort\" />\n } @else if (order() === 'ASC') {\n <ui5-icon name=\"lx-icons/sort-asc\" />\n } @else if (order() === 'DESC') {\n <ui5-icon name=\"lx-icons/sort-desc\" />\n }\n }\n</div>\n", styles: [":host{display:table-cell;line-height:normal;padding:8px;border-bottom:2px solid #e1e5eb;border-top:none;font-weight:700;color:#526179}:host.sortable span{cursor:pointer}.wrapper{display:flex;align-items:center;gap:4px}ui5-icon{cursor:pointer}\n"], dependencies: [{ kind: "component", type: IconComponent$1, selector: "ui5-icon", inputs: ["design", "name", "accessibleName", "showTooltip", "mode"], exportAs: ["ui5Icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
1222
1282
|
}
|
1223
1283
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: TableHeaderComponent, decorators: [{
|
1224
1284
|
type: Component,
|
1225
|
-
args: [{ selector: 'lx-th', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true,
|
1226
|
-
|
1285
|
+
args: [{ selector: 'lx-th', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, host: {
|
1286
|
+
'[class.sortable]': 'sortable()',
|
1287
|
+
'[tabIndex]': 'sortable() ? 0 : -1',
|
1288
|
+
role: 'columnheader'
|
1289
|
+
}, imports: [IconComponent$1], template: "<div class=\"wrapper\">\n <span>\n <ng-content />\n </span>\n @if (sortable()) {\n @if (!order()) {\n <ui5-icon name=\"lx-icons/sort\" />\n } @else if (order() === 'ASC') {\n <ui5-icon name=\"lx-icons/sort-asc\" />\n } @else if (order() === 'DESC') {\n <ui5-icon name=\"lx-icons/sort-desc\" />\n }\n }\n</div>\n", styles: [":host{display:table-cell;line-height:normal;padding:8px;border-bottom:2px solid #e1e5eb;border-top:none;font-weight:700;color:#526179}:host.sortable span{cursor:pointer}.wrapper{display:flex;align-items:center;gap:4px}ui5-icon{cursor:pointer}\n"] }]
|
1290
|
+
}], ctorParameters: () => [{ type: TableComponent, decorators: [{
|
1291
|
+
type: Optional
|
1292
|
+
}] }], propDecorators: { column: [{
|
1227
1293
|
type: Input
|
1228
1294
|
}], sortChange: [{
|
1229
1295
|
type: Output
|
1230
|
-
}], sortable: [{
|
1231
|
-
type: HostBinding,
|
1232
|
-
args: ['class.sortable']
|
1233
1296
|
}], onSort: [{
|
1234
1297
|
type: HostListener,
|
1235
1298
|
args: ['keydown.enter']
|
@@ -1237,72 +1300,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
|
|
1237
1300
|
type: HostListener,
|
1238
1301
|
args: ['click']
|
1239
1302
|
}] } });
|
1240
|
-
|
1241
|
-
|
1242
|
-
|
1243
|
-
|
1244
|
-
this.elementRef = elementRef;
|
1245
|
-
this.isSortable = false;
|
1246
|
-
this.sortChange = new EventEmitter();
|
1247
|
-
this.elementRef.nativeElement.classList.add('table', 'table-hover');
|
1248
|
-
}
|
1249
|
-
ngOnChanges(changes) {
|
1250
|
-
if (changes['sort'] && this.tableHeaders) {
|
1251
|
-
this.tableHeaders.forEach((header) => {
|
1252
|
-
this.setSortValueOnHeader(header);
|
1253
|
-
});
|
1254
|
-
}
|
1255
|
-
if (changes['isSortable'] && this.tableHeaders) {
|
1256
|
-
this.tableHeaders.forEach((header) => {
|
1257
|
-
header.sortable = this.isSortable;
|
1258
|
-
header.isTabable = this.isSortable;
|
1259
|
-
});
|
1260
|
-
}
|
1303
|
+
function determineNewOrder(currentOrder) {
|
1304
|
+
let newOrder = undefined;
|
1305
|
+
if (!currentOrder) {
|
1306
|
+
newOrder = 'ASC';
|
1261
1307
|
}
|
1262
|
-
|
1263
|
-
|
1264
|
-
header.sortable = this.isSortable;
|
1265
|
-
header.isTabable = this.isSortable;
|
1266
|
-
if (this.sort) {
|
1267
|
-
this.setSortValueOnHeader(header);
|
1268
|
-
}
|
1269
|
-
});
|
1270
|
-
const sortChange$ = merge(...this.tableHeaders.map((header) => header.sortChange.asObservable()));
|
1271
|
-
sortChange$.subscribe((change) => {
|
1272
|
-
this.tableHeaders.forEach((header) => {
|
1273
|
-
this.setSortValueOnHeader(header);
|
1274
|
-
});
|
1275
|
-
this.sortChange.emit(change);
|
1276
|
-
});
|
1308
|
+
else if (currentOrder === 'ASC') {
|
1309
|
+
newOrder = 'DESC';
|
1277
1310
|
}
|
1278
|
-
|
1279
|
-
if (header.column !== this.sort?.key) {
|
1280
|
-
header.order = undefined;
|
1281
|
-
}
|
1282
|
-
else {
|
1283
|
-
header.order = this.sort?.order;
|
1284
|
-
}
|
1285
|
-
}
|
1286
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: TableComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
1287
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.8", type: TableComponent, isStandalone: true, selector: "table[lx-table]", inputs: { isSortable: "isSortable", sort: "sort" }, outputs: { sortChange: "sortChange" }, queries: [{ propertyName: "tableHeaders", predicate: TableHeaderComponent, descendants: true }], usesOnChanges: true, ngImport: i0 }); }
|
1311
|
+
return newOrder;
|
1288
1312
|
}
|
1289
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: TableComponent, decorators: [{
|
1290
|
-
type: Directive,
|
1291
|
-
args: [{
|
1292
|
-
// eslint-disable-next-line @angular-eslint/directive-selector
|
1293
|
-
selector: 'table[lx-table]',
|
1294
|
-
standalone: true
|
1295
|
-
}]
|
1296
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { isSortable: [{
|
1297
|
-
type: Input
|
1298
|
-
}], sort: [{
|
1299
|
-
type: Input
|
1300
|
-
}], sortChange: [{
|
1301
|
-
type: Output
|
1302
|
-
}], tableHeaders: [{
|
1303
|
-
type: ContentChildren,
|
1304
|
-
args: [TableHeaderComponent, { descendants: true }]
|
1305
|
-
}] } });
|
1306
1313
|
|
1307
1314
|
/**
|
1308
1315
|
* Allows to register an event handler for the "AfterViewInit" lifecycle hook.
|
@@ -2465,6 +2472,7 @@ class LxCoreUiModule {
|
|
2465
2472
|
CollapsibleComponent,
|
2466
2473
|
EllipsisComponent,
|
2467
2474
|
StepperComponent,
|
2475
|
+
TableHeaderComponent,
|
2468
2476
|
EmptyStateComponent] }); }
|
2469
2477
|
}
|
2470
2478
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: LxCoreUiModule, decorators: [{
|
@@ -2622,6 +2630,45 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
|
|
2622
2630
|
args: [{ selector: 'lx-token', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content />\n" }]
|
2623
2631
|
}], ctorParameters: () => [{ type: i0.ElementRef }] });
|
2624
2632
|
|
2633
|
+
/**
|
2634
|
+
* The tokenizer component (`lx-tokenizer`) is responsible for rendering a list of items into a container and hiding those that do not fit behind a placeholder. The items are represented as `lx-token`. Each `lx-token` allows to project any content into it, so anything can become a token. The tokenizer calculates how many items fit into the container (based on width), hiding those items that are overflowing and showing a overflow placeholder instead (e.g. "+4").
|
2635
|
+
*
|
2636
|
+
* ## Usage
|
2637
|
+
*
|
2638
|
+
* 1. Import `TokenizerComponent` & `TokenComponent` into your module or component.
|
2639
|
+
* 2. Use the component in your template. All items should be wrapped in a `lx-token` element for the tokenizer to identify the individual tokens.
|
2640
|
+
*
|
2641
|
+
* ```ts
|
2642
|
+
* import { TokenizerComponent } from '@leanix/components';
|
2643
|
+
*
|
2644
|
+
* @Component({
|
2645
|
+
* selector: 'lx-my-component',
|
2646
|
+
* standalone: true,
|
2647
|
+
* imports: [TokenizerComponent, TokenComponent],
|
2648
|
+
* template: `
|
2649
|
+
* <lx-tokenizer>
|
2650
|
+
* <lx-token>Token One</lx-token>
|
2651
|
+
* <lx-token>Token Two</lx-token>
|
2652
|
+
* </lx-tokenizer>
|
2653
|
+
* `
|
2654
|
+
* })
|
2655
|
+
* export class MyComponent {}
|
2656
|
+
* ```
|
2657
|
+
*
|
2658
|
+
* ## API
|
2659
|
+
*
|
2660
|
+
* ### Inputs
|
2661
|
+
*
|
2662
|
+
* - `active`: Can be used to activate & deactivate tokenization
|
2663
|
+
*
|
2664
|
+
* ### Outputs
|
2665
|
+
*
|
2666
|
+
* - `overflowPlaceholderClick`: Fires when the user clicks on the overflow placeholder
|
2667
|
+
*
|
2668
|
+
* ### Content projection
|
2669
|
+
*
|
2670
|
+
* - `lx-token`: All `lx-tokens` will be projected into the tokenizer
|
2671
|
+
*/
|
2625
2672
|
class TokenizerComponent {
|
2626
2673
|
constructor(elementRef, destroyRef, changeDetectorRef, resizeObserverService) {
|
2627
2674
|
this.elementRef = elementRef;
|
@@ -6656,6 +6703,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
|
|
6656
6703
|
|
6657
6704
|
/**
|
6658
6705
|
* Usage:
|
6706
|
+
*
|
6707
|
+
* ```
|
6659
6708
|
* <lx-single-select
|
6660
6709
|
* #singleSelect
|
6661
6710
|
* [selection]="value"
|
@@ -6670,7 +6719,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
|
|
6670
6719
|
* (onItemSelected)="singleSelect.selectOption($event)">
|
6671
6720
|
* </lx-option-group-dropdown>
|
6672
6721
|
* </lx-single-select>
|
6673
|
-
*
|
6722
|
+
* ```
|
6674
6723
|
*/
|
6675
6724
|
class OptionGroupDropdownComponent extends KeyboardSelectDirective {
|
6676
6725
|
constructor() {
|
@@ -7283,11 +7332,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
|
|
7283
7332
|
* How to use:
|
7284
7333
|
* Provide the lx-picker with two kinds of ContentChildren:
|
7285
7334
|
* 1. A lxPickerTrigger, preferably a button element, which we use to open the dropdown on click or enter.
|
7286
|
-
* 2. A list of
|
7335
|
+
* 2. A list of `<li>` elements with an lx-picker-option attribute that own the option template as content children.
|
7287
7336
|
*
|
7288
7337
|
* You can use this component as part of a FormGroup or wire it up yourself by listening on the (select) output of the options.
|
7289
7338
|
*
|
7290
7339
|
* Example usage (non FormGroup style):
|
7340
|
+
* ```
|
7291
7341
|
* <lx-picker listBoxAriaLabel="Awesome picker">
|
7292
7342
|
* <button lxPickerTrigger lx-button mode="outline" size="large" [square]="true" aria-label="Awesome picker" title="Awesome picker">
|
7293
7343
|
* <lx-icon [name]="selection.label" [color]="selection.value" fontAwsomeStyle="solid"></lx-icon>
|
@@ -7296,6 +7346,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
|
|
7296
7346
|
* <lx-icon lx-picker-option [name]="option.label" [color]="option.value" fontAwsomeStyle="solid"></lx-icon>
|
7297
7347
|
* </li>
|
7298
7348
|
* </lx-picker>
|
7349
|
+
* ```
|
7299
7350
|
*/
|
7300
7351
|
class PickerComponent {
|
7301
7352
|
get activeDescendantsId() {
|
@@ -7765,6 +7816,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
|
|
7765
7816
|
}]
|
7766
7817
|
}] });
|
7767
7818
|
|
7819
|
+
/**
|
7820
|
+
* ## Usage
|
7821
|
+
*
|
7822
|
+
* 1. Import the `LxFormsModule` module from `@leanix/components` in your module where you want to use the component.
|
7823
|
+
*
|
7824
|
+
* ```ts
|
7825
|
+
* import { LxFormsModule } from '@leanix/components';
|
7826
|
+
* ```
|
7827
|
+
*
|
7828
|
+
* 2. Use the component in your template.
|
7829
|
+
*/
|
7768
7830
|
class SingleSelectComponent extends BaseSelectDirective {
|
7769
7831
|
static calculateNewCursorPostionOnKeyboardNavigation(cursorPosition, keyCode) {
|
7770
7832
|
switch (keyCode) {
|
@@ -9819,6 +9881,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
|
|
9819
9881
|
args: [RouterLinkActive]
|
9820
9882
|
}] } });
|
9821
9883
|
|
9884
|
+
/**
|
9885
|
+
* ## Usage
|
9886
|
+
*
|
9887
|
+
* 1. Import the `LxTabUiModule` module from `@leanix/components` in your module where you want to use the component.
|
9888
|
+
*
|
9889
|
+
* ```ts
|
9890
|
+
* import { LxTabUiModule } from '@leanix/components';
|
9891
|
+
*
|
9892
|
+
* // ...
|
9893
|
+
*
|
9894
|
+
* @NgModule({
|
9895
|
+
* // ...
|
9896
|
+
* imports: [
|
9897
|
+
* // ...
|
9898
|
+
* LxTabUiModule
|
9899
|
+
* // ...
|
9900
|
+
* ]
|
9901
|
+
* })
|
9902
|
+
* export class MyModule {}
|
9903
|
+
* ```
|
9904
|
+
*
|
9905
|
+
* 2. Use the component in your template.
|
9906
|
+
*/
|
9822
9907
|
class TabGroupComponent {
|
9823
9908
|
get tabIds() {
|
9824
9909
|
return this.tabs.map((t) => t.tabId);
|