@kms-ngx-ui/presentational 20.4.3 → 20.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/kms-ngx-ui-presentational.mjs +67 -7
- package/fesm2022/kms-ngx-ui-presentational.mjs.map +1 -1
- package/index.d.ts +34 -4
- package/package.json +1 -1
- package/src/assets/llms.txt +21 -0
- package/src/lib/ui/molecules/tab-group/tab-group.component.scss +41 -0
- package/src/styles/styles.scss +2 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, Pipe, NgModule, EventEmitter, Output, Input, Directive, HostListener, PLATFORM_ID, DOCUMENT, Inject, Injectable, input, VERSION, forwardRef, InjectionToken, inject, Injector, ViewChild, computed, HostBinding, output, signal, effect, ChangeDetectionStrategy, model, ChangeDetectorRef, ViewContainerRef, untracked, DestroyRef, ElementRef, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
2
|
+
import { Component, Pipe, NgModule, EventEmitter, Output, Input, Directive, HostListener, PLATFORM_ID, DOCUMENT, Inject, Injectable, input, VERSION, forwardRef, InjectionToken, inject, Injector, ViewChild, computed, HostBinding, output, signal, effect, ChangeDetectionStrategy, model, ChangeDetectorRef, ViewContainerRef, untracked, DestroyRef, ElementRef, ContentChildren, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
|
-
import { CommonModule, CurrencyPipe, isPlatformBrowser, NgClass, NgStyle } from '@angular/common';
|
|
4
|
+
import { CommonModule, CurrencyPipe, isPlatformBrowser, NgClass, NgStyle, NgTemplateOutlet } from '@angular/common';
|
|
5
5
|
import * as i2 from '@angular/forms';
|
|
6
6
|
import { FormControl, NG_VALUE_ACCESSOR, NgControl, UntypedFormGroup, UntypedFormControl, FormGroup, ReactiveFormsModule, NG_VALIDATORS, ValueChangeEvent, FormsModule } from '@angular/forms';
|
|
7
7
|
import * as i1$2 from '@angular/material/checkbox';
|
|
@@ -56,6 +56,8 @@ import { trigger, state, style } from '@angular/animations';
|
|
|
56
56
|
import { register } from 'swiper/element/bundle';
|
|
57
57
|
import { isEmpty } from 'lodash';
|
|
58
58
|
import moment from 'moment';
|
|
59
|
+
import * as i1$a from '@angular/material/tabs';
|
|
60
|
+
import { MatTabsModule } from '@angular/material/tabs';
|
|
59
61
|
|
|
60
62
|
class KmsUiPresentationalComponent {
|
|
61
63
|
constructor() { }
|
|
@@ -5065,6 +5067,52 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
5065
5067
|
], template: "<form class=\"kms-generic-form\"\n [class.kms-generic-form--loading]=\"loading()\"\n [class.kms-generic-form--disabled]=\"disabled()\"\n [attr.aria-busy]=\"loading() || null\"\n [attr.aria-disabled]=\"disabled() || null\"\n (submit)=\"onFormSubmit($event)\"\n (keydown.enter)=\"onEnterKey($event)\">\n\n @if (showActionsTop()) {\n <kms-form-actions\n [actionsConfig]=\"config().submitAction!\"\n [disabled]=\"loading()\"\n (submitClick)=\"submit()\">\n </kms-form-actions>\n }\n\n @for (section of visibleSections(); track section.key) {\n <kms-form-section\n [sectionConfig]=\"section\"\n [formGroup]=\"form()\"\n [formId]=\"config().formId\"\n [formErrorDisplay]=\"config().errorDisplay\"\n [formDisabledConfig]=\"config().disabledConfig\"\n [submitted]=\"submitted()\">\n </kms-form-section>\n }\n\n @if (showActionsBottom()) {\n <kms-form-actions\n [actionsConfig]=\"config().submitAction!\"\n [disabled]=\"loading()\"\n (submitClick)=\"submit()\">\n </kms-form-actions>\n }\n\n @if (loading()) {\n <div class=\"kms-generic-form__loading-overlay\"></div>\n }\n\n <output class=\"kms-generic-form__sr-only\" aria-live=\"polite\">\n {{ errorAnnouncement() }}\n </output>\n</form>\n", styles: [":host{display:block}.kms-generic-form{position:relative}.kms-generic-form--loading{pointer-events:none}.kms-generic-form__loading-overlay{position:absolute;inset:0;background:#fff9;z-index:1}.kms-generic-form__sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}\n"] }]
|
|
5066
5068
|
}], ctorParameters: () => [], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], formSubmit: [{ type: i0.Output, args: ["formSubmit"] }], formStateChange: [{ type: i0.Output, args: ["formStateChange"] }], formReady: [{ type: i0.Output, args: ["formReady"] }], fieldValueChange: [{ type: i0.Output, args: ["fieldValueChange"] }] } });
|
|
5067
5069
|
|
|
5070
|
+
/**
|
|
5071
|
+
* @copyright KMS GmbH
|
|
5072
|
+
*/
|
|
5073
|
+
class KmsTabContentDirective {
|
|
5074
|
+
constructor(templateRef) {
|
|
5075
|
+
this.templateRef = templateRef;
|
|
5076
|
+
}
|
|
5077
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: KmsTabContentDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
5078
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.16", type: KmsTabContentDirective, isStandalone: true, selector: "ng-template[kmsTabContent]", ngImport: i0 }); }
|
|
5079
|
+
}
|
|
5080
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: KmsTabContentDirective, decorators: [{
|
|
5081
|
+
type: Directive,
|
|
5082
|
+
args: [{
|
|
5083
|
+
selector: 'ng-template[kmsTabContent]',
|
|
5084
|
+
standalone: true,
|
|
5085
|
+
}]
|
|
5086
|
+
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
5087
|
+
class TabGroupComponent {
|
|
5088
|
+
constructor() {
|
|
5089
|
+
/** Tab definitions with label and optional count. When omitted, mat-tab children are projected directly. */
|
|
5090
|
+
this.tabs = input(...(ngDevMode ? [undefined, { debugName: "tabs" }] : []));
|
|
5091
|
+
/** Index of the initially selected tab. */
|
|
5092
|
+
this.selectedIndex = input(0, ...(ngDevMode ? [{ debugName: "selectedIndex" }] : []));
|
|
5093
|
+
/** Emits the new index whenever the user switches tabs. */
|
|
5094
|
+
this.selectedIndexChange = output();
|
|
5095
|
+
/** Whether to disable the Material ripple effect on tabs. */
|
|
5096
|
+
this.disableRipple = input(true, ...(ngDevMode ? [{ debugName: "disableRipple" }] : []));
|
|
5097
|
+
this.contentTemplates = [];
|
|
5098
|
+
}
|
|
5099
|
+
ngAfterContentInit() {
|
|
5100
|
+
this.contentTemplates = this.tabContents.map((d) => d.templateRef);
|
|
5101
|
+
}
|
|
5102
|
+
onTabChange(index) {
|
|
5103
|
+
this.selectedIndexChange.emit(index);
|
|
5104
|
+
}
|
|
5105
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: TabGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5106
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: TabGroupComponent, isStandalone: true, selector: "kms-tab-group", inputs: { tabs: { classPropertyName: "tabs", publicName: "tabs", isSignal: true, isRequired: false, transformFunction: null }, selectedIndex: { classPropertyName: "selectedIndex", publicName: "selectedIndex", isSignal: true, isRequired: false, transformFunction: null }, disableRipple: { classPropertyName: "disableRipple", publicName: "disableRipple", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectedIndexChange: "selectedIndexChange" }, queries: [{ propertyName: "tabContents", predicate: KmsTabContentDirective }], ngImport: i0, template: "<mat-tab-group\n mat-align-tabs=\"start\"\n mat-stretch-tabs=\"false\"\n [disableRipple]=\"disableRipple()\"\n [selectedIndex]=\"selectedIndex()\"\n (selectedIndexChange)=\"onTabChange($event)\"\n>\n @if (tabs(); as tabDefs) {\n @for (tab of tabDefs; track tab.label; let i = $index) {\n <mat-tab>\n <ng-template mat-tab-label>\n <span>{{ tab.label }}</span>\n @if (tab.count !== undefined) {\n <span class=\"kms-tab-group__count\">({{ tab.count }})</span>\n }\n </ng-template>\n <ng-template matTabContent>\n @if (contentTemplates[i]) {\n <ng-container *ngTemplateOutlet=\"contentTemplates[i]\"></ng-container>\n }\n </ng-template>\n </mat-tab>\n }\n } @else {\n <ng-content></ng-content>\n }\n</mat-tab-group>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatTabsModule }, { kind: "directive", type: i1$a.MatTabContent, selector: "[matTabContent]" }, { kind: "directive", type: i1$a.MatTabLabel, selector: "[mat-tab-label], [matTabLabel]" }, { kind: "component", type: i1$a.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass", "id"], exportAs: ["matTab"] }, { kind: "component", type: i1$a.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "mat-align-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
5107
|
+
}
|
|
5108
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: TabGroupComponent, decorators: [{
|
|
5109
|
+
type: Component,
|
|
5110
|
+
args: [{ selector: 'kms-tab-group', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatTabsModule, NgTemplateOutlet], template: "<mat-tab-group\n mat-align-tabs=\"start\"\n mat-stretch-tabs=\"false\"\n [disableRipple]=\"disableRipple()\"\n [selectedIndex]=\"selectedIndex()\"\n (selectedIndexChange)=\"onTabChange($event)\"\n>\n @if (tabs(); as tabDefs) {\n @for (tab of tabDefs; track tab.label; let i = $index) {\n <mat-tab>\n <ng-template mat-tab-label>\n <span>{{ tab.label }}</span>\n @if (tab.count !== undefined) {\n <span class=\"kms-tab-group__count\">({{ tab.count }})</span>\n }\n </ng-template>\n <ng-template matTabContent>\n @if (contentTemplates[i]) {\n <ng-container *ngTemplateOutlet=\"contentTemplates[i]\"></ng-container>\n }\n </ng-template>\n </mat-tab>\n }\n } @else {\n <ng-content></ng-content>\n }\n</mat-tab-group>\n" }]
|
|
5111
|
+
}], propDecorators: { tabs: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabs", required: false }] }], selectedIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedIndex", required: false }] }], selectedIndexChange: [{ type: i0.Output, args: ["selectedIndexChange"] }], disableRipple: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableRipple", required: false }] }], tabContents: [{
|
|
5112
|
+
type: ContentChildren,
|
|
5113
|
+
args: [KmsTabContentDirective]
|
|
5114
|
+
}] } });
|
|
5115
|
+
|
|
5068
5116
|
class KmsUiPresentationalModule {
|
|
5069
5117
|
constructor(translate) {
|
|
5070
5118
|
// Merge all bundled library strings (validator messages, date-input
|
|
@@ -5075,7 +5123,10 @@ class KmsUiPresentationalModule {
|
|
|
5075
5123
|
if (currentLang) {
|
|
5076
5124
|
mergeKmsLibMessages(translate, currentLang);
|
|
5077
5125
|
}
|
|
5078
|
-
|
|
5126
|
+
// Optional chain: ng-mocks mocks of TranslateService don't expose
|
|
5127
|
+
// `onLangChange`, and we don't want module instantiation in unit tests
|
|
5128
|
+
// to crash on `undefined.subscribe(...)`.
|
|
5129
|
+
translate.onLangChange?.subscribe((event) => {
|
|
5079
5130
|
mergeKmsLibMessages(translate, event.lang);
|
|
5080
5131
|
});
|
|
5081
5132
|
}
|
|
@@ -5141,7 +5192,9 @@ class KmsUiPresentationalModule {
|
|
|
5141
5192
|
MatNativeDateModule,
|
|
5142
5193
|
IconComponent,
|
|
5143
5194
|
InlineAlertComponent,
|
|
5144
|
-
DateInputComponent
|
|
5195
|
+
DateInputComponent,
|
|
5196
|
+
TabGroupComponent,
|
|
5197
|
+
KmsTabContentDirective], exports: [BackToTopComponent,
|
|
5145
5198
|
CheckboxComponent,
|
|
5146
5199
|
ColorInputComponent,
|
|
5147
5200
|
DropdownFromDataComponent,
|
|
@@ -5175,7 +5228,9 @@ class KmsUiPresentationalModule {
|
|
|
5175
5228
|
FormActionsComponent,
|
|
5176
5229
|
DynamicFieldDirective,
|
|
5177
5230
|
DateInputComponent,
|
|
5178
|
-
TextInputComponent
|
|
5231
|
+
TextInputComponent,
|
|
5232
|
+
TabGroupComponent,
|
|
5233
|
+
KmsTabContentDirective] }); }
|
|
5179
5234
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: KmsUiPresentationalModule, providers: [ViewportService], imports: [CommonModule,
|
|
5180
5235
|
DragDropModule,
|
|
5181
5236
|
MatCheckboxModule,
|
|
@@ -5203,7 +5258,8 @@ class KmsUiPresentationalModule {
|
|
|
5203
5258
|
MatCardModule,
|
|
5204
5259
|
MatDatepickerModule,
|
|
5205
5260
|
MatNativeDateModule,
|
|
5206
|
-
DateInputComponent
|
|
5261
|
+
DateInputComponent,
|
|
5262
|
+
TabGroupComponent] }); }
|
|
5207
5263
|
}
|
|
5208
5264
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: KmsUiPresentationalModule, decorators: [{
|
|
5209
5265
|
type: NgModule,
|
|
@@ -5274,6 +5330,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
5274
5330
|
IconComponent,
|
|
5275
5331
|
InlineAlertComponent,
|
|
5276
5332
|
DateInputComponent,
|
|
5333
|
+
TabGroupComponent,
|
|
5334
|
+
KmsTabContentDirective,
|
|
5277
5335
|
],
|
|
5278
5336
|
exports: [
|
|
5279
5337
|
BackToTopComponent,
|
|
@@ -5311,6 +5369,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
5311
5369
|
DynamicFieldDirective,
|
|
5312
5370
|
DateInputComponent,
|
|
5313
5371
|
TextInputComponent,
|
|
5372
|
+
TabGroupComponent,
|
|
5373
|
+
KmsTabContentDirective,
|
|
5314
5374
|
],
|
|
5315
5375
|
providers: [ViewportService],
|
|
5316
5376
|
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
@@ -5400,5 +5460,5 @@ var FormLayout;
|
|
|
5400
5460
|
* Generated bundle index. Do not edit.
|
|
5401
5461
|
*/
|
|
5402
5462
|
|
|
5403
|
-
export { BackToTopComponent, Breakpoint, ButtonAppearance, ButtonComponent, ButtonResponseType, CardComponent, CheckboxComponent, Color, ColorInputComponent, ConfirmationDialogComponent, CustomPipesModule, DateInputComponent, DirectivesModule, DropdownFromDataComponent, DynamicFieldDirective, EnumRadiogroupComponent, FieldRegistryService, FieldType, FileInputComponent, FlyoutComponent, FormActionsComponent, FormFieldComponent, FormLayout, FormParentComponent, FormSectionComponent, GenericFormComponent, GenericFormModule, GenericFormService, GetMaxHeightDirective, IconComponent, IconSizePx, IconSizesArr, ImageSliderComponent, ImageSnippet, ImageSourceType, ImageUploadComponent, InlineAlertComponent, IntegerCurrency, KMSAccordionItemComponent, KeyValuePair, KmsUiPresentationalComponent, KmsUiPresentationalModule, KmsUiPresentationalService, LabelValuePair, LoaderComponent, MapComponent, Marker, MarkerLabel, MarkerOptions, NumericInputComponent, PasswordComponent, RadioButtonComponent, RadioButtonSize, RadioGroupComponent, SafeHtmlPipe, SafeResourceUrlPipe, SafeUrlPipe, SalutationDropdownComponent, SalutationEnum, SalutationRadiogroupComponent, SanitizeNullPipe, SimpleBreakpoint, SlideToggleComponent, SliderComponent, StylingTheme, SwipeDirective, TextInputComponent, TextValuePair, TextValuePairArray, TimeDirective, TimeInputComponent, TooltipDirective, TooltipIconComponent, TrimPipe, TypeofPipe, ViewportService, WindowDimensions, YesNoRadiogroupComponent, noSpecialCharsOnly, noWhitespaceOnly };
|
|
5463
|
+
export { BackToTopComponent, Breakpoint, ButtonAppearance, ButtonComponent, ButtonResponseType, CardComponent, CheckboxComponent, Color, ColorInputComponent, ConfirmationDialogComponent, CustomPipesModule, DateInputComponent, DirectivesModule, DropdownFromDataComponent, DynamicFieldDirective, EnumRadiogroupComponent, FieldRegistryService, FieldType, FileInputComponent, FlyoutComponent, FormActionsComponent, FormFieldComponent, FormLayout, FormParentComponent, FormSectionComponent, GenericFormComponent, GenericFormModule, GenericFormService, GetMaxHeightDirective, IconComponent, IconSizePx, IconSizesArr, ImageSliderComponent, ImageSnippet, ImageSourceType, ImageUploadComponent, InlineAlertComponent, IntegerCurrency, KMSAccordionItemComponent, KeyValuePair, KmsTabContentDirective, KmsUiPresentationalComponent, KmsUiPresentationalModule, KmsUiPresentationalService, LabelValuePair, LoaderComponent, MapComponent, Marker, MarkerLabel, MarkerOptions, NumericInputComponent, PasswordComponent, RadioButtonComponent, RadioButtonSize, RadioGroupComponent, SafeHtmlPipe, SafeResourceUrlPipe, SafeUrlPipe, SalutationDropdownComponent, SalutationEnum, SalutationRadiogroupComponent, SanitizeNullPipe, SimpleBreakpoint, SlideToggleComponent, SliderComponent, StylingTheme, SwipeDirective, TabGroupComponent, TextInputComponent, TextValuePair, TextValuePairArray, TimeDirective, TimeInputComponent, TooltipDirective, TooltipIconComponent, TrimPipe, TypeofPipe, ViewportService, WindowDimensions, YesNoRadiogroupComponent, noSpecialCharsOnly, noWhitespaceOnly };
|
|
5404
5464
|
//# sourceMappingURL=kms-ngx-ui-presentational.mjs.map
|