@siemens/element-ng 49.15.0 → 49.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/siemens-element-ng-auto-collapsable-list.mjs +8 -7
- package/fesm2022/siemens-element-ng-auto-collapsable-list.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-datepicker.mjs +9 -9
- package/fesm2022/siemens-element-ng-datepicker.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-empty-state.mjs +2 -2
- package/fesm2022/siemens-element-ng-split.mjs +2 -2
- package/fesm2022/siemens-element-ng-split.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tabs.mjs +2 -2
- package/fesm2022/siemens-element-ng-tabs.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -62,17 +62,18 @@ class SiAutoCollapsableListItemDirective extends SiAutoCollapsableListMeasurable
|
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiAutoCollapsableListItemDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
65
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.8", type: SiAutoCollapsableListItemDirective, isStandalone: true, selector: "[siAutoCollapsableListItem]", inputs: { forceHide: { classPropertyName: "forceHide", publicName: "forceHide", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "
|
|
65
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.8", type: SiAutoCollapsableListItemDirective, isStandalone: true, selector: "[siAutoCollapsableListItem]", inputs: { forceHide: { classPropertyName: "forceHide", publicName: "forceHide", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.visible": "isVisible()", "class.invisible": "!isVisible()", "class.position-absolute": "!isVisible()", "class.z-n1": "!isVisible()" } }, exportAs: ["siAutoCollapsableListItem"], usesInheritance: true, ngImport: i0 });
|
|
66
66
|
}
|
|
67
67
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiAutoCollapsableListItemDirective, decorators: [{
|
|
68
68
|
type: Directive,
|
|
69
69
|
args: [{
|
|
70
70
|
selector: '[siAutoCollapsableListItem]',
|
|
71
71
|
host: {
|
|
72
|
-
'[
|
|
73
|
-
'[
|
|
72
|
+
'[class.visible]': 'isVisible()',
|
|
73
|
+
'[class.invisible]': '!isVisible()',
|
|
74
|
+
'[class.position-absolute]': '!isVisible()',
|
|
74
75
|
// Ensure hidden items are behind the visible ones. Otherwise, the visible ones are not clickable
|
|
75
|
-
'[
|
|
76
|
+
'[class.z-n1]': '!isVisible()'
|
|
76
77
|
},
|
|
77
78
|
exportAs: 'siAutoCollapsableListItem'
|
|
78
79
|
}]
|
|
@@ -259,15 +260,15 @@ class SiAutoCollapsableListDirective {
|
|
|
259
260
|
}
|
|
260
261
|
}
|
|
261
262
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiAutoCollapsableListDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
262
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "21.0.8", type: SiAutoCollapsableListDirective, isStandalone: true, selector: "[siAutoCollapsableList]", inputs: { siAutoCollapsableList: { classPropertyName: "siAutoCollapsableList", publicName: "siAutoCollapsableList", isSignal: true, isRequired: false, transformFunction: null }, gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null }, containerElement: { classPropertyName: "containerElement", publicName: "siAutoCollapsableListContainerElement", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "
|
|
263
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "21.0.8", type: SiAutoCollapsableListDirective, isStandalone: true, selector: "[siAutoCollapsableList]", inputs: { siAutoCollapsableList: { classPropertyName: "siAutoCollapsableList", publicName: "siAutoCollapsableList", isSignal: true, isRequired: false, transformFunction: null }, gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null }, containerElement: { classPropertyName: "containerElement", publicName: "siAutoCollapsableListContainerElement", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.overflow-hidden": "siAutoCollapsableList()" }, classAttribute: "position-relative" }, queries: [{ propertyName: "items", predicate: SiAutoCollapsableListItemDirective, isSignal: true }, { propertyName: "overflowItem", first: true, predicate: SiAutoCollapsableListOverflowItemDirective, descendants: true, isSignal: true }, { propertyName: "additionalContent", predicate: SiAutoCollapsableListAdditionalContentDirective, isSignal: true }], exportAs: ["siAutoCollapsableList"], usesOnChanges: true, ngImport: i0 });
|
|
263
264
|
}
|
|
264
265
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiAutoCollapsableListDirective, decorators: [{
|
|
265
266
|
type: Directive,
|
|
266
267
|
args: [{
|
|
267
268
|
selector: '[siAutoCollapsableList]',
|
|
268
269
|
host: {
|
|
269
|
-
|
|
270
|
-
'[
|
|
270
|
+
class: 'position-relative',
|
|
271
|
+
'[class.overflow-hidden]': 'siAutoCollapsableList()'
|
|
271
272
|
},
|
|
272
273
|
exportAs: 'siAutoCollapsableList'
|
|
273
274
|
}]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"siemens-element-ng-auto-collapsable-list.mjs","sources":["../../../../projects/element-ng/auto-collapsable-list/si-auto-collapsable-list-measurable.class.ts","../../../../projects/element-ng/auto-collapsable-list/si-auto-collapsable-list-item.directive.ts","../../../../projects/element-ng/auto-collapsable-list/si-auto-collapsable-list-additional-content.directive.ts","../../../../projects/element-ng/auto-collapsable-list/si-auto-collapsable-list-overflow-item.directive.ts","../../../../projects/element-ng/auto-collapsable-list/si-auto-collapsable-list.directive.ts","../../../../projects/element-ng/auto-collapsable-list/si-auto-collapsable-list.module.ts","../../../../projects/element-ng/auto-collapsable-list/index.ts","../../../../projects/element-ng/auto-collapsable-list/siemens-element-ng-auto-collapsable-list.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { Directive, ElementRef, inject } from '@angular/core';\nimport { ResizeObserverService } from '@siemens/element-ng/resize-observer';\nimport { distinctUntilChanged, map, shareReplay } from 'rxjs/operators';\n\n@Directive()\nexport class SiAutoCollapsableListMeasurable {\n protected readonly elementRef = inject(ElementRef<HTMLElement>);\n private readonly resizeObserverService = inject(ResizeObserverService);\n\n /**\n * Emits on element width changes.\n *\n * @defaultValue\n * ```\n * this.resizeObserverService\n * .observe(this.elementRef.nativeElement, 0, true, true)\n * .pipe(\n * map(size => size.width),\n * distinctUntilChanged(),\n * shareReplay(1)\n * )\n * ```\n */\n size$ = this.resizeObserverService.observe(this.elementRef.nativeElement, 0, true, true).pipe(\n map(size => size.width),\n distinctUntilChanged(),\n shareReplay(1)\n );\n}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { AfterViewInit, booleanAttribute, computed, Directive, input, signal } from '@angular/core';\n\nimport { SiAutoCollapsableListMeasurable } from './si-auto-collapsable-list-measurable.class';\n\n@Directive({\n selector: '[siAutoCollapsableListItem]',\n host: {\n '[style.visibility]': 'isVisible() ? \"visible\" : \"hidden\"',\n '[style.position]': 'isVisible() ? \"\" : \"absolute\"',\n // Ensure hidden items are behind the visible ones. Otherwise, the visible ones are not clickable\n '[style.z-index]': 'isVisible() ? \"\" : \"-1\"'\n },\n exportAs: 'siAutoCollapsableListItem'\n})\nexport class SiAutoCollapsableListItemDirective\n extends SiAutoCollapsableListMeasurable\n implements AfterViewInit\n{\n /**\n * Hide this item even if enough space is available.\n * When calculating the overall available size, this item is still considered when forceHide=true\n *\n * @defaultValue false\n */\n readonly forceHide = input(false, { transform: booleanAttribute });\n\n /**\n * True if enough space is available for this item.\n *\n * @defaultValue false\n */\n readonly canBeVisible = signal<boolean>(false);\n\n /**\n * True if this item is actually visible to the user\n */\n readonly isVisible = computed(() => this.canBeVisible() && !this.forceHide());\n\n ngAfterViewInit(): void {\n if (getComputedStyle(this.elementRef.nativeElement).display === 'inline') {\n console.error('siAutoCollapsibleListItem does not work on items with display=\"inline\"');\n }\n }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { Directive } from '@angular/core';\n\nimport { SiAutoCollapsableListMeasurable } from './si-auto-collapsable-list-measurable.class';\n\n@Directive({\n selector: '[siAutoCollapsableListAdditionalContent]'\n})\nexport class SiAutoCollapsableListAdditionalContentDirective extends SiAutoCollapsableListMeasurable {}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { Directive } from '@angular/core';\n\nimport { SiAutoCollapsableListItemDirective } from './si-auto-collapsable-list-item.directive';\n\n@Directive({\n selector: '[siAutoCollapsableListOverflowItem]',\n exportAs: 'siAutoCollapsableListOverflowItem'\n})\nexport class SiAutoCollapsableListOverflowItemDirective extends SiAutoCollapsableListItemDirective {\n /**\n * Number of hidden items.\n *\n * @defaultValue 0\n */\n hiddenItemCount = 0;\n}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport {\n AfterViewInit,\n booleanAttribute,\n ChangeDetectorRef,\n contentChild,\n contentChildren,\n Directive,\n ElementRef,\n inject,\n INJECTOR,\n input,\n OnChanges,\n OnDestroy,\n SimpleChanges\n} from '@angular/core';\nimport { toObservable } from '@angular/core/rxjs-interop';\nimport { ResizeObserverService } from '@siemens/element-ng/resize-observer';\nimport { BehaviorSubject, combineLatest, of, Subscription } from 'rxjs';\nimport { auditTime, distinctUntilChanged, map, startWith, switchMap } from 'rxjs/operators';\n\nimport { SiAutoCollapsableListAdditionalContentDirective } from './si-auto-collapsable-list-additional-content.directive';\nimport { SiAutoCollapsableListItemDirective } from './si-auto-collapsable-list-item.directive';\nimport { SiAutoCollapsableListOverflowItemDirective } from './si-auto-collapsable-list-overflow-item.directive';\n\n@Directive({\n selector: '[siAutoCollapsableList]',\n host: {\n style: 'position: relative',\n '[style.overflow]': 'siAutoCollapsableList() ? \"hidden\" : \"\"'\n },\n exportAs: 'siAutoCollapsableList'\n})\nexport class SiAutoCollapsableListDirective implements AfterViewInit, OnChanges, OnDestroy {\n /**\n * The items which are displayed in the siAutoCollapsableList.\n */\n readonly items = contentChildren(SiAutoCollapsableListItemDirective);\n\n private readonly overflowItem = contentChild(SiAutoCollapsableListOverflowItemDirective);\n\n private readonly additionalContent = contentChildren(\n SiAutoCollapsableListAdditionalContentDirective\n );\n\n /**\n * Enables the auto-collapsing behavior. When `true`, items that overflow the container\n * are hidden and an overflow indicator item is shown instead.\n *\n * @defaultValue true\n */\n readonly siAutoCollapsableList = input(true, { transform: booleanAttribute });\n\n /**\n * The (flex) gap in pixels, will automatically be set if a pixel value is used in CSS.\n */\n readonly gap = input<number>();\n\n /**\n * The element which size is available for the content of the siAutoCollapsableList.\n *\n * @defaultValue undefined\n */\n readonly containerElement = input<HTMLElement | undefined | null>(undefined, {\n alias: 'siAutoCollapsableListContainerElement'\n });\n\n private resizeSubscription?: Subscription;\n private disableInitSubscription?: Subscription;\n private readonly elementRef = inject(ElementRef);\n private readonly resizeObserverService = inject(ResizeObserverService);\n private readonly changeDetectorRef = inject(ChangeDetectorRef);\n private readonly containerElementSubject = new BehaviorSubject<HTMLElement | null>(\n this.elementRef.nativeElement\n );\n\n /**\n * The same as {@link gap}, but automatically read from the computed styles.\n * Used if not set by user.\n */\n private computedGap = 0;\n private injector = inject(INJECTOR);\n\n ngAfterViewInit(): void {\n if (this.siAutoCollapsableList()) {\n this.readGapSize();\n this.setupResizeListener();\n } else {\n this.reset();\n }\n }\n\n ngOnChanges(changes: SimpleChanges<this>): void {\n if (changes.siAutoCollapsableList) {\n const siAutoCollapsableList = this.siAutoCollapsableList();\n if (!siAutoCollapsableList && this.resizeSubscription) {\n this.reset();\n } else if (siAutoCollapsableList && !this.resizeSubscription && this.items()) {\n this.setupResizeListener();\n }\n }\n\n if (changes.containerElement) {\n this.containerElementSubject.next(this.containerElement() ?? this.elementRef.nativeElement);\n }\n }\n\n ngOnDestroy(): void {\n this.resizeSubscription?.unsubscribe();\n this.disableInitSubscription?.unsubscribe();\n this.containerElementSubject.complete();\n }\n\n private setupResizeListener(): void {\n this.disableInitSubscription?.unsubscribe();\n const containerSize$ = this.containerElementSubject.pipe(\n switchMap(element => this.resizeObserverService.observe(element!, 0, true, true)),\n map(size => size.width),\n distinctUntilChanged(),\n map(size => {\n const { paddingInlineStart, paddingInlineEnd } = getComputedStyle(\n this.containerElement() ?? this.elementRef.nativeElement\n );\n return size - parseFloat(paddingInlineStart) - parseFloat(paddingInlineEnd);\n })\n );\n\n const itemSizes$ = toObservable(this.items, { injector: this.injector }).pipe(\n startWith(this.items()),\n switchMap(items =>\n !items.length\n ? of([])\n : combineLatest(\n items.map(item =>\n item.size$.pipe(\n map(size => ({\n size,\n directive: item\n }))\n )\n )\n )\n )\n );\n const additionalContentSizes$ = toObservable(this.additionalContent, {\n injector: this.injector\n }).pipe(\n startWith(this.additionalContent()),\n switchMap(additionalContent => combineLatest(additionalContent.map(item => item.size$))),\n startWith([])\n );\n\n this.resizeSubscription = combineLatest([\n containerSize$,\n this.overflowItem()?.size$ ?? of(0),\n itemSizes$,\n additionalContentSizes$\n ])\n .pipe(auditTime(0))\n .subscribe(([containerSize, overflowItemSize, items, additionalContentSizes]) =>\n this.updateItemVisibility(containerSize, overflowItemSize, items, additionalContentSizes)\n );\n }\n\n private updateItemVisibility(\n containerSize: number,\n overflowItemSize: number,\n items: { size: number; directive: SiAutoCollapsableListItemDirective }[],\n additionalContent: number[]\n ): void {\n let remainingSpace = containerSize - additionalContent.reduce((a, b) => a + b, 0);\n\n const itemsRemaining = items.slice();\n\n const gap = this.gap() ?? this.computedGap;\n\n while (remainingSpace > 0 && itemsRemaining.length) {\n const item = itemsRemaining.shift()!;\n if (remainingSpace - item.size - gap - overflowItemSize >= 0) {\n // There is space for the item and an overflow item.\n item.directive.canBeVisible.set(true);\n remainingSpace -= item.size + gap;\n } else if (\n !itemsRemaining.length &&\n (remainingSpace - item.size >= 0 || overflowItemSize >= item.size)\n ) {\n // There are no other items remaining and there is enough space or the overflow item is biggger than the current one.\n item.directive.canBeVisible.set(true);\n remainingSpace = 0;\n } else {\n // There is no space for the item.\n remainingSpace = 0;\n item.directive.canBeVisible.set(false);\n }\n }\n itemsRemaining.forEach(item => item.directive.canBeVisible.set(false));\n\n const overflowItem = this.overflowItem();\n if (overflowItem) {\n overflowItem.hiddenItemCount = this.items().filter(item => !item.canBeVisible()).length;\n overflowItem.canBeVisible.set(overflowItem.hiddenItemCount !== 0);\n }\n this.changeDetectorRef.markForCheck();\n }\n\n private reset(): void {\n this.resizeSubscription?.unsubscribe();\n this.resizeSubscription = undefined;\n this.disableInitSubscription = toObservable(this.items, { injector: this.injector }).subscribe(\n items =>\n queueMicrotask(() => {\n items.forEach(item => item.canBeVisible.set(true));\n })\n );\n\n const overflowItem = this.overflowItem();\n if (overflowItem) {\n queueMicrotask(() => {\n overflowItem!.canBeVisible.set(false);\n overflowItem!.hiddenItemCount = 0;\n });\n }\n }\n\n private readGapSize(): void {\n const { gap } = getComputedStyle(this.containerElement() ?? this.elementRef.nativeElement);\n if (gap.endsWith('px') || gap === '0') {\n this.computedGap = parseFloat(gap);\n }\n }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { NgModule } from '@angular/core';\n\nimport { SiAutoCollapsableListAdditionalContentDirective } from './si-auto-collapsable-list-additional-content.directive';\nimport { SiAutoCollapsableListItemDirective } from './si-auto-collapsable-list-item.directive';\nimport { SiAutoCollapsableListOverflowItemDirective } from './si-auto-collapsable-list-overflow-item.directive';\nimport { SiAutoCollapsableListDirective } from './si-auto-collapsable-list.directive';\n\n@NgModule({\n imports: [\n SiAutoCollapsableListAdditionalContentDirective,\n SiAutoCollapsableListDirective,\n SiAutoCollapsableListItemDirective,\n SiAutoCollapsableListOverflowItemDirective\n ],\n exports: [\n SiAutoCollapsableListAdditionalContentDirective,\n SiAutoCollapsableListDirective,\n SiAutoCollapsableListItemDirective,\n SiAutoCollapsableListOverflowItemDirective\n ]\n})\nexport class SiAutoCollapsableListModule {}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nexport * from './si-auto-collapsable-list-item.directive';\nexport * from './si-auto-collapsable-list.directive';\nexport * from './si-auto-collapsable-list-overflow-item.directive';\nexport * from './si-auto-collapsable-list-measurable.class';\nexport * from './si-auto-collapsable-list-additional-content.directive';\nexport * from './si-auto-collapsable-list.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAAA;;;AAGG;MAMU,+BAA+B,CAAA;AACvB,IAAA,UAAU,GAAG,MAAM,EAAC,UAAuB,EAAC;AAC9C,IAAA,qBAAqB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AAEtE;;;;;;;;;;;;;AAaG;AACH,IAAA,KAAK,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,IAAI,CAC3F,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,EACvB,oBAAoB,EAAE,EACtB,WAAW,CAAC,CAAC,CAAC,CACf;uGAtBU,+BAA+B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAA/B,+BAA+B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAA/B,+BAA+B,EAAA,UAAA,EAAA,CAAA;kBAD3C;;;ACRD;;;AAGG;AAeG,MAAO,kCACX,SAAQ,+BAA+B,CAA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;AAClC,YAAA,0CAA0C,aAG1C,+CAA+C;YAC/C,8BAA8B;YAC9B,kCAAkC;YAClC,0CAA0C,CAAA,EAAA,CAAA;wGAGjC,2BAA2B,EAAA,CAAA;;2FAA3B,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBAdvC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,+CAA+C;wBAC/C,8BAA8B;wBAC9B,kCAAkC;wBAClC;AACD,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,+CAA+C;wBAC/C,8BAA8B;wBAC9B,kCAAkC;wBAClC;AACD;AACF,iBAAA;;;ACxBD;;;AAGG;;ACHH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"siemens-element-ng-auto-collapsable-list.mjs","sources":["../../../../projects/element-ng/auto-collapsable-list/si-auto-collapsable-list-measurable.class.ts","../../../../projects/element-ng/auto-collapsable-list/si-auto-collapsable-list-item.directive.ts","../../../../projects/element-ng/auto-collapsable-list/si-auto-collapsable-list-additional-content.directive.ts","../../../../projects/element-ng/auto-collapsable-list/si-auto-collapsable-list-overflow-item.directive.ts","../../../../projects/element-ng/auto-collapsable-list/si-auto-collapsable-list.directive.ts","../../../../projects/element-ng/auto-collapsable-list/si-auto-collapsable-list.module.ts","../../../../projects/element-ng/auto-collapsable-list/index.ts","../../../../projects/element-ng/auto-collapsable-list/siemens-element-ng-auto-collapsable-list.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { Directive, ElementRef, inject } from '@angular/core';\nimport { ResizeObserverService } from '@siemens/element-ng/resize-observer';\nimport { distinctUntilChanged, map, shareReplay } from 'rxjs/operators';\n\n@Directive()\nexport class SiAutoCollapsableListMeasurable {\n protected readonly elementRef = inject(ElementRef<HTMLElement>);\n private readonly resizeObserverService = inject(ResizeObserverService);\n\n /**\n * Emits on element width changes.\n *\n * @defaultValue\n * ```\n * this.resizeObserverService\n * .observe(this.elementRef.nativeElement, 0, true, true)\n * .pipe(\n * map(size => size.width),\n * distinctUntilChanged(),\n * shareReplay(1)\n * )\n * ```\n */\n size$ = this.resizeObserverService.observe(this.elementRef.nativeElement, 0, true, true).pipe(\n map(size => size.width),\n distinctUntilChanged(),\n shareReplay(1)\n );\n}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { AfterViewInit, booleanAttribute, computed, Directive, input, signal } from '@angular/core';\n\nimport { SiAutoCollapsableListMeasurable } from './si-auto-collapsable-list-measurable.class';\n\n@Directive({\n selector: '[siAutoCollapsableListItem]',\n host: {\n '[class.visible]': 'isVisible()',\n '[class.invisible]': '!isVisible()',\n '[class.position-absolute]': '!isVisible()',\n // Ensure hidden items are behind the visible ones. Otherwise, the visible ones are not clickable\n '[class.z-n1]': '!isVisible()'\n },\n exportAs: 'siAutoCollapsableListItem'\n})\nexport class SiAutoCollapsableListItemDirective\n extends SiAutoCollapsableListMeasurable\n implements AfterViewInit\n{\n /**\n * Hide this item even if enough space is available.\n * When calculating the overall available size, this item is still considered when forceHide=true\n *\n * @defaultValue false\n */\n readonly forceHide = input(false, { transform: booleanAttribute });\n\n /**\n * True if enough space is available for this item.\n *\n * @defaultValue false\n */\n readonly canBeVisible = signal<boolean>(false);\n\n /**\n * True if this item is actually visible to the user\n */\n readonly isVisible = computed(() => this.canBeVisible() && !this.forceHide());\n\n ngAfterViewInit(): void {\n if (getComputedStyle(this.elementRef.nativeElement).display === 'inline') {\n console.error('siAutoCollapsibleListItem does not work on items with display=\"inline\"');\n }\n }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { Directive } from '@angular/core';\n\nimport { SiAutoCollapsableListMeasurable } from './si-auto-collapsable-list-measurable.class';\n\n@Directive({\n selector: '[siAutoCollapsableListAdditionalContent]'\n})\nexport class SiAutoCollapsableListAdditionalContentDirective extends SiAutoCollapsableListMeasurable {}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { Directive } from '@angular/core';\n\nimport { SiAutoCollapsableListItemDirective } from './si-auto-collapsable-list-item.directive';\n\n@Directive({\n selector: '[siAutoCollapsableListOverflowItem]',\n exportAs: 'siAutoCollapsableListOverflowItem'\n})\nexport class SiAutoCollapsableListOverflowItemDirective extends SiAutoCollapsableListItemDirective {\n /**\n * Number of hidden items.\n *\n * @defaultValue 0\n */\n hiddenItemCount = 0;\n}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport {\n AfterViewInit,\n booleanAttribute,\n ChangeDetectorRef,\n contentChild,\n contentChildren,\n Directive,\n ElementRef,\n inject,\n INJECTOR,\n input,\n OnChanges,\n OnDestroy,\n SimpleChanges\n} from '@angular/core';\nimport { toObservable } from '@angular/core/rxjs-interop';\nimport { ResizeObserverService } from '@siemens/element-ng/resize-observer';\nimport { BehaviorSubject, combineLatest, of, Subscription } from 'rxjs';\nimport { auditTime, distinctUntilChanged, map, startWith, switchMap } from 'rxjs/operators';\n\nimport { SiAutoCollapsableListAdditionalContentDirective } from './si-auto-collapsable-list-additional-content.directive';\nimport { SiAutoCollapsableListItemDirective } from './si-auto-collapsable-list-item.directive';\nimport { SiAutoCollapsableListOverflowItemDirective } from './si-auto-collapsable-list-overflow-item.directive';\n\n@Directive({\n selector: '[siAutoCollapsableList]',\n host: {\n class: 'position-relative',\n '[class.overflow-hidden]': 'siAutoCollapsableList()'\n },\n exportAs: 'siAutoCollapsableList'\n})\nexport class SiAutoCollapsableListDirective implements AfterViewInit, OnChanges, OnDestroy {\n /**\n * The items which are displayed in the siAutoCollapsableList.\n */\n readonly items = contentChildren(SiAutoCollapsableListItemDirective);\n\n private readonly overflowItem = contentChild(SiAutoCollapsableListOverflowItemDirective);\n\n private readonly additionalContent = contentChildren(\n SiAutoCollapsableListAdditionalContentDirective\n );\n\n /**\n * Enables the auto-collapsing behavior. When `true`, items that overflow the container\n * are hidden and an overflow indicator item is shown instead.\n *\n * @defaultValue true\n */\n readonly siAutoCollapsableList = input(true, { transform: booleanAttribute });\n\n /**\n * The (flex) gap in pixels, will automatically be set if a pixel value is used in CSS.\n */\n readonly gap = input<number>();\n\n /**\n * The element which size is available for the content of the siAutoCollapsableList.\n *\n * @defaultValue undefined\n */\n readonly containerElement = input<HTMLElement | undefined | null>(undefined, {\n alias: 'siAutoCollapsableListContainerElement'\n });\n\n private resizeSubscription?: Subscription;\n private disableInitSubscription?: Subscription;\n private readonly elementRef = inject(ElementRef);\n private readonly resizeObserverService = inject(ResizeObserverService);\n private readonly changeDetectorRef = inject(ChangeDetectorRef);\n private readonly containerElementSubject = new BehaviorSubject<HTMLElement | null>(\n this.elementRef.nativeElement\n );\n\n /**\n * The same as {@link gap}, but automatically read from the computed styles.\n * Used if not set by user.\n */\n private computedGap = 0;\n private injector = inject(INJECTOR);\n\n ngAfterViewInit(): void {\n if (this.siAutoCollapsableList()) {\n this.readGapSize();\n this.setupResizeListener();\n } else {\n this.reset();\n }\n }\n\n ngOnChanges(changes: SimpleChanges<this>): void {\n if (changes.siAutoCollapsableList) {\n const siAutoCollapsableList = this.siAutoCollapsableList();\n if (!siAutoCollapsableList && this.resizeSubscription) {\n this.reset();\n } else if (siAutoCollapsableList && !this.resizeSubscription && this.items()) {\n this.setupResizeListener();\n }\n }\n\n if (changes.containerElement) {\n this.containerElementSubject.next(this.containerElement() ?? this.elementRef.nativeElement);\n }\n }\n\n ngOnDestroy(): void {\n this.resizeSubscription?.unsubscribe();\n this.disableInitSubscription?.unsubscribe();\n this.containerElementSubject.complete();\n }\n\n private setupResizeListener(): void {\n this.disableInitSubscription?.unsubscribe();\n const containerSize$ = this.containerElementSubject.pipe(\n switchMap(element => this.resizeObserverService.observe(element!, 0, true, true)),\n map(size => size.width),\n distinctUntilChanged(),\n map(size => {\n const { paddingInlineStart, paddingInlineEnd } = getComputedStyle(\n this.containerElement() ?? this.elementRef.nativeElement\n );\n return size - parseFloat(paddingInlineStart) - parseFloat(paddingInlineEnd);\n })\n );\n\n const itemSizes$ = toObservable(this.items, { injector: this.injector }).pipe(\n startWith(this.items()),\n switchMap(items =>\n !items.length\n ? of([])\n : combineLatest(\n items.map(item =>\n item.size$.pipe(\n map(size => ({\n size,\n directive: item\n }))\n )\n )\n )\n )\n );\n const additionalContentSizes$ = toObservable(this.additionalContent, {\n injector: this.injector\n }).pipe(\n startWith(this.additionalContent()),\n switchMap(additionalContent => combineLatest(additionalContent.map(item => item.size$))),\n startWith([])\n );\n\n this.resizeSubscription = combineLatest([\n containerSize$,\n this.overflowItem()?.size$ ?? of(0),\n itemSizes$,\n additionalContentSizes$\n ])\n .pipe(auditTime(0))\n .subscribe(([containerSize, overflowItemSize, items, additionalContentSizes]) =>\n this.updateItemVisibility(containerSize, overflowItemSize, items, additionalContentSizes)\n );\n }\n\n private updateItemVisibility(\n containerSize: number,\n overflowItemSize: number,\n items: { size: number; directive: SiAutoCollapsableListItemDirective }[],\n additionalContent: number[]\n ): void {\n let remainingSpace = containerSize - additionalContent.reduce((a, b) => a + b, 0);\n\n const itemsRemaining = items.slice();\n\n const gap = this.gap() ?? this.computedGap;\n\n while (remainingSpace > 0 && itemsRemaining.length) {\n const item = itemsRemaining.shift()!;\n if (remainingSpace - item.size - gap - overflowItemSize >= 0) {\n // There is space for the item and an overflow item.\n item.directive.canBeVisible.set(true);\n remainingSpace -= item.size + gap;\n } else if (\n !itemsRemaining.length &&\n (remainingSpace - item.size >= 0 || overflowItemSize >= item.size)\n ) {\n // There are no other items remaining and there is enough space or the overflow item is biggger than the current one.\n item.directive.canBeVisible.set(true);\n remainingSpace = 0;\n } else {\n // There is no space for the item.\n remainingSpace = 0;\n item.directive.canBeVisible.set(false);\n }\n }\n itemsRemaining.forEach(item => item.directive.canBeVisible.set(false));\n\n const overflowItem = this.overflowItem();\n if (overflowItem) {\n overflowItem.hiddenItemCount = this.items().filter(item => !item.canBeVisible()).length;\n overflowItem.canBeVisible.set(overflowItem.hiddenItemCount !== 0);\n }\n this.changeDetectorRef.markForCheck();\n }\n\n private reset(): void {\n this.resizeSubscription?.unsubscribe();\n this.resizeSubscription = undefined;\n this.disableInitSubscription = toObservable(this.items, { injector: this.injector }).subscribe(\n items =>\n queueMicrotask(() => {\n items.forEach(item => item.canBeVisible.set(true));\n })\n );\n\n const overflowItem = this.overflowItem();\n if (overflowItem) {\n queueMicrotask(() => {\n overflowItem!.canBeVisible.set(false);\n overflowItem!.hiddenItemCount = 0;\n });\n }\n }\n\n private readGapSize(): void {\n const { gap } = getComputedStyle(this.containerElement() ?? this.elementRef.nativeElement);\n if (gap.endsWith('px') || gap === '0') {\n this.computedGap = parseFloat(gap);\n }\n }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { NgModule } from '@angular/core';\n\nimport { SiAutoCollapsableListAdditionalContentDirective } from './si-auto-collapsable-list-additional-content.directive';\nimport { SiAutoCollapsableListItemDirective } from './si-auto-collapsable-list-item.directive';\nimport { SiAutoCollapsableListOverflowItemDirective } from './si-auto-collapsable-list-overflow-item.directive';\nimport { SiAutoCollapsableListDirective } from './si-auto-collapsable-list.directive';\n\n@NgModule({\n imports: [\n SiAutoCollapsableListAdditionalContentDirective,\n SiAutoCollapsableListDirective,\n SiAutoCollapsableListItemDirective,\n SiAutoCollapsableListOverflowItemDirective\n ],\n exports: [\n SiAutoCollapsableListAdditionalContentDirective,\n SiAutoCollapsableListDirective,\n SiAutoCollapsableListItemDirective,\n SiAutoCollapsableListOverflowItemDirective\n ]\n})\nexport class SiAutoCollapsableListModule {}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nexport * from './si-auto-collapsable-list-item.directive';\nexport * from './si-auto-collapsable-list.directive';\nexport * from './si-auto-collapsable-list-overflow-item.directive';\nexport * from './si-auto-collapsable-list-measurable.class';\nexport * from './si-auto-collapsable-list-additional-content.directive';\nexport * from './si-auto-collapsable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;;ACxBD;;;AAGG;;ACHH;;AAEG;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getLocaleDayPeriods, FormStyle, TranslationWidth, getLocaleId, getLocaleDateTimeFormat, FormatWidth, getLocaleTimeFormat, getLocaleDateFormat, formatDate, DatePipe, NgTemplateOutlet, getLocaleFirstDayOfWeek, WeekDay } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { input, model, output, booleanAttribute, computed, signal, inject, LOCALE_ID,
|
|
3
|
+
import { input, model, output, booleanAttribute, computed, signal, inject, LOCALE_ID, Directive, ElementRef, viewChildren, ChangeDetectionStrategy, Component, viewChild, HostListener, HostAttributeToken, effect, ChangeDetectorRef, SimpleChange, DOCUMENT, DestroyRef, contentChild, NgModule } from '@angular/core';
|
|
4
4
|
import * as i2 from '@angular/forms';
|
|
5
5
|
import { Validators, NG_VALUE_ACCESSOR, NG_VALIDATORS, FormBuilder, ReactiveFormsModule, FormControl, FormsModule, NgControl } from '@angular/forms';
|
|
6
6
|
import { SI_FORM_ITEM_CONTROL } from '@siemens/element-ng/form';
|
|
@@ -882,6 +882,10 @@ class SiDateInputDirective {
|
|
|
882
882
|
onInput(event) {
|
|
883
883
|
const value = event.target.value;
|
|
884
884
|
const parsedDate = parseDate(value, this.getFormat(), this.locale);
|
|
885
|
+
// Keep dateString in sync with the raw DOM value so that a subsequent
|
|
886
|
+
// writeValue() with the same formatted string still triggers the host
|
|
887
|
+
// [value] binding and overwrites any manually entered text.
|
|
888
|
+
this.dateString.set(value);
|
|
885
889
|
// Is same date
|
|
886
890
|
const hasChanged = !(parsedDate === this.date);
|
|
887
891
|
if (hasChanged) {
|
|
@@ -1009,17 +1013,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
1009
1013
|
'[attr.readonly]': 'readonly() || null',
|
|
1010
1014
|
'[class.readonly]': 'readonly()',
|
|
1011
1015
|
'[attr.aria-describedby]': 'errormessageId()',
|
|
1012
|
-
'[value]': 'dateString()'
|
|
1016
|
+
'[value]': 'dateString()',
|
|
1017
|
+
'(input)': 'onInput($event)',
|
|
1018
|
+
'(blur)': 'onBlur($event)'
|
|
1013
1019
|
},
|
|
1014
1020
|
exportAs: 'siDateInput'
|
|
1015
1021
|
}]
|
|
1016
|
-
}], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], siDatepickerConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "siDatepickerConfig", required: false }] }, { type: i0.Output, args: ["siDatepickerConfigChange"] }], siDatepickerDisabledTime: [{ type: i0.Output, args: ["siDatepickerDisabledTime"] }], stateChange: [{ type: i0.Output, args: ["stateChange"] }], disabledInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], errormessageId: [{ type: i0.Input, args: [{ isSignal: true, alias: "errormessageId", required: false }] }], dateChange: [{ type: i0.Output, args: ["dateChange"] }]
|
|
1017
|
-
type: HostListener,
|
|
1018
|
-
args: ['input', ['$event']]
|
|
1019
|
-
}], onBlur: [{
|
|
1020
|
-
type: HostListener,
|
|
1021
|
-
args: ['blur', ['$event']]
|
|
1022
|
-
}] } });
|
|
1022
|
+
}], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], siDatepickerConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "siDatepickerConfig", required: false }] }, { type: i0.Output, args: ["siDatepickerConfigChange"] }], siDatepickerDisabledTime: [{ type: i0.Output, args: ["siDatepickerDisabledTime"] }], stateChange: [{ type: i0.Output, args: ["stateChange"] }], disabledInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], errormessageId: [{ type: i0.Input, args: [{ isSignal: true, alias: "errormessageId", required: false }] }], dateChange: [{ type: i0.Output, args: ["dateChange"] }] } });
|
|
1023
1023
|
|
|
1024
1024
|
/**
|
|
1025
1025
|
* Copyright (c) Siemens 2016 - 2026
|