@odx/angular 1.0.0-rc.6 → 1.0.0-rc.7
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/cdk/connected-overlay/README.md +3 -0
- package/cdk/connected-overlay/index.d.ts +3 -0
- package/cdk/connected-overlay/lib/connected-overlay.component.d.ts +28 -0
- package/cdk/connected-overlay/lib/connected-overlay.service.d.ts +10 -0
- package/cdk/connected-overlay/lib/helpers/compute-overlay-position.d.ts +3 -0
- package/cdk/connected-overlay/lib/helpers/get-opposite-overlay-side.d.ts +2 -0
- package/cdk/connected-overlay/lib/helpers/get-overlay-side.d.ts +2 -0
- package/cdk/connected-overlay/lib/helpers/index.d.ts +3 -0
- package/cdk/connected-overlay/lib/models/connected-overlay-options.d.ts +23 -0
- package/cdk/connected-overlay/lib/models/connected-overlay-ref.d.ts +12 -0
- package/cdk/connected-overlay/lib/models/index.d.ts +2 -0
- package/cdk/dynamic-view/lib/models/dynamic-view-options.d.ts +1 -1
- package/components/circular-progress/lib/circular-progress.component.d.ts +1 -0
- package/components/dropdown/README.md +3 -0
- package/components/dropdown/index.d.ts +3 -0
- package/components/dropdown/lib/dropdown.component.d.ts +11 -0
- package/components/dropdown/lib/dropdown.directive.d.ts +32 -0
- package/components/dropdown/lib/dropdown.module.d.ts +8 -0
- package/components/dropdown/lib/models/dropdown-options.d.ts +3 -0
- package/components/dropdown/lib/models/index.d.ts +1 -0
- package/components/inline-message/README.md +3 -0
- package/components/inline-message/index.d.ts +2 -0
- package/components/inline-message/lib/inline-message.component.d.ts +9 -0
- package/components/inline-message/lib/models/inline-message-variant.d.ts +7 -0
- package/components/loading-spinner/lib/loading-spinner.component.d.ts +2 -2
- package/components/loading-spinner/lib/loading-spinner.directive.d.ts +6 -7
- package/components/select/README.md +3 -0
- package/components/select/index.d.ts +7 -0
- package/components/select/lib/abstract/index.d.ts +2 -0
- package/components/select/lib/abstract/select-control-option.d.ts +7 -0
- package/components/select/lib/abstract/select-control.d.ts +11 -0
- package/components/select/lib/components/index.d.ts +1 -0
- package/components/select/lib/components/option/option.component.d.ts +22 -0
- package/components/select/lib/directives/index.d.ts +1 -0
- package/components/select/lib/directives/select-search-field.directive.d.ts +13 -0
- package/components/select/lib/pipes/index.d.ts +1 -0
- package/components/select/lib/pipes/select-search-filter.pipe.d.ts +13 -0
- package/components/select/lib/select.component.d.ts +50 -0
- package/components/select/lib/select.module.d.ts +11 -0
- package/components/select/lib/select.tokens.d.ts +3 -0
- package/components/spinbox/README.md +3 -0
- package/components/spinbox/index.d.ts +1 -0
- package/components/spinbox/lib/spinbox.component.d.ts +25 -0
- package/components/tooltip/README.md +3 -0
- package/components/tooltip/index.d.ts +3 -0
- package/components/tooltip/lib/helpers/index.d.ts +1 -0
- package/components/tooltip/lib/helpers/resolve-tooltip-trigger-events.d.ts +2 -0
- package/components/tooltip/lib/models/index.d.ts +3 -0
- package/components/tooltip/lib/models/tooltip-options.d.ts +10 -0
- package/components/tooltip/lib/models/tooltip-size.d.ts +7 -0
- package/components/tooltip/lib/models/tooltip-trigger.d.ts +1 -0
- package/components/tooltip/lib/tooltip.component.d.ts +12 -0
- package/components/tooltip/lib/tooltip.directive.d.ts +33 -0
- package/esm2020/cdk/connected-overlay/index.mjs +4 -0
- package/esm2020/cdk/connected-overlay/lib/connected-overlay.component.mjs +112 -0
- package/esm2020/cdk/connected-overlay/lib/connected-overlay.service.mjs +25 -0
- package/esm2020/cdk/connected-overlay/lib/helpers/compute-overlay-position.mjs +57 -0
- package/esm2020/cdk/connected-overlay/lib/helpers/get-opposite-overlay-side.mjs +13 -0
- package/esm2020/cdk/connected-overlay/lib/helpers/get-overlay-side.mjs +4 -0
- package/esm2020/cdk/connected-overlay/lib/helpers/index.mjs +4 -0
- package/esm2020/cdk/connected-overlay/lib/models/connected-overlay-options.mjs +10 -0
- package/esm2020/cdk/connected-overlay/lib/models/connected-overlay-ref.mjs +15 -0
- package/esm2020/cdk/connected-overlay/lib/models/index.mjs +3 -0
- package/esm2020/cdk/connected-overlay/odx-angular-cdk-connected-overlay.mjs +5 -0
- package/esm2020/cdk/dynamic-view/lib/models/dynamic-component-ref.mjs +5 -3
- package/esm2020/cdk/dynamic-view/lib/models/dynamic-template-ref.mjs +4 -2
- package/esm2020/cdk/dynamic-view/lib/models/dynamic-view-options.mjs +1 -1
- package/esm2020/components/accordion/lib/components/accordion-item/accordion-item.component.mjs +3 -3
- package/esm2020/components/circular-progress/lib/circular-progress.component.mjs +11 -4
- package/esm2020/components/dropdown/index.mjs +4 -0
- package/esm2020/components/dropdown/lib/dropdown.component.mjs +31 -0
- package/esm2020/components/dropdown/lib/dropdown.directive.mjs +123 -0
- package/esm2020/components/dropdown/lib/dropdown.module.mjs +18 -0
- package/esm2020/components/dropdown/lib/models/dropdown-options.mjs +7 -0
- package/esm2020/components/dropdown/lib/models/index.mjs +2 -0
- package/esm2020/components/dropdown/odx-angular-components-dropdown.mjs +5 -0
- package/esm2020/components/inline-message/index.mjs +3 -0
- package/esm2020/components/inline-message/lib/inline-message.component.mjs +43 -0
- package/esm2020/components/inline-message/lib/models/inline-message-variant.mjs +7 -0
- package/esm2020/components/inline-message/odx-angular-components-inline-message.mjs +5 -0
- package/esm2020/components/loading-spinner/lib/loading-spinner.component.mjs +7 -7
- package/esm2020/components/loading-spinner/lib/loading-spinner.directive.mjs +28 -24
- package/esm2020/components/main-menu/lib/main-menu.component.mjs +3 -3
- package/esm2020/components/select/index.mjs +8 -0
- package/esm2020/components/select/lib/abstract/index.mjs +3 -0
- package/esm2020/components/select/lib/abstract/select-control-option.mjs +2 -0
- package/esm2020/components/select/lib/abstract/select-control.mjs +2 -0
- package/esm2020/components/select/lib/components/index.mjs +2 -0
- package/esm2020/components/select/lib/components/option/option.component.mjs +78 -0
- package/esm2020/components/select/lib/directives/index.mjs +2 -0
- package/esm2020/components/select/lib/directives/select-search-field.directive.mjs +47 -0
- package/esm2020/components/select/lib/pipes/index.mjs +2 -0
- package/esm2020/components/select/lib/pipes/select-search-filter.pipe.mjs +51 -0
- package/esm2020/components/select/lib/select.component.mjs +190 -0
- package/esm2020/components/select/lib/select.module.mjs +21 -0
- package/esm2020/components/select/lib/select.tokens.mjs +3 -0
- package/esm2020/components/select/odx-angular-components-select.mjs +5 -0
- package/esm2020/components/spinbox/index.mjs +2 -0
- package/esm2020/components/spinbox/lib/spinbox.component.mjs +91 -0
- package/esm2020/components/spinbox/odx-angular-components-spinbox.mjs +5 -0
- package/esm2020/components/tooltip/index.mjs +4 -0
- package/esm2020/components/tooltip/lib/helpers/index.mjs +2 -0
- package/esm2020/components/tooltip/lib/helpers/resolve-tooltip-trigger-events.mjs +9 -0
- package/esm2020/components/tooltip/lib/models/index.mjs +4 -0
- package/esm2020/components/tooltip/lib/models/tooltip-options.mjs +10 -0
- package/esm2020/components/tooltip/lib/models/tooltip-size.mjs +7 -0
- package/esm2020/components/tooltip/lib/models/tooltip-trigger.mjs +2 -0
- package/esm2020/components/tooltip/lib/tooltip.component.mjs +39 -0
- package/esm2020/components/tooltip/lib/tooltip.directive.mjs +132 -0
- package/esm2020/components/tooltip/odx-angular-components-tooltip.mjs +5 -0
- package/esm2020/index.mjs +2 -1
- package/esm2020/lib/tokens/identity-matcher.mjs +7 -0
- package/esm2020/lib/tokens/index.mjs +4 -0
- package/esm2020/lib/tokens/string-search-handler.mjs +9 -0
- package/esm2020/lib/tokens/stringify.mjs +8 -0
- package/esm2020/rxjs/index.mjs +2 -1
- package/esm2020/rxjs/lib/delay-until.mjs +5 -0
- package/esm2020/utils/lib/decorators/index.mjs +2 -1
- package/esm2020/utils/lib/decorators/pure.mjs +37 -0
- package/esm2020/utils/lib/helpers/defer-fn.mjs +4 -0
- package/esm2020/utils/lib/helpers/event-manager.mjs +30 -0
- package/esm2020/utils/lib/helpers/index.mjs +3 -1
- package/fesm2015/odx-angular-cdk-connected-overlay.mjs +234 -0
- package/fesm2015/odx-angular-cdk-connected-overlay.mjs.map +1 -0
- package/fesm2015/odx-angular-cdk-dynamic-view.mjs +6 -3
- package/fesm2015/odx-angular-cdk-dynamic-view.mjs.map +1 -1
- package/fesm2015/odx-angular-components-accordion.mjs +2 -2
- package/fesm2015/odx-angular-components-accordion.mjs.map +1 -1
- package/fesm2015/odx-angular-components-circular-progress.mjs +10 -3
- package/fesm2015/odx-angular-components-circular-progress.mjs.map +1 -1
- package/fesm2015/odx-angular-components-dropdown.mjs +168 -0
- package/fesm2015/odx-angular-components-dropdown.mjs.map +1 -0
- package/fesm2015/odx-angular-components-inline-message.mjs +55 -0
- package/fesm2015/odx-angular-components-inline-message.mjs.map +1 -0
- package/fesm2015/odx-angular-components-loading-spinner.mjs +75 -85
- package/fesm2015/odx-angular-components-loading-spinner.mjs.map +1 -1
- package/fesm2015/odx-angular-components-main-menu.mjs +2 -2
- package/fesm2015/odx-angular-components-main-menu.mjs.map +1 -1
- package/fesm2015/odx-angular-components-select.mjs +375 -0
- package/fesm2015/odx-angular-components-select.mjs.map +1 -0
- package/fesm2015/odx-angular-components-spinbox.mjs +100 -0
- package/fesm2015/odx-angular-components-spinbox.mjs.map +1 -0
- package/fesm2015/odx-angular-components-tooltip.mjs +187 -0
- package/fesm2015/odx-angular-components-tooltip.mjs.map +1 -0
- package/fesm2015/odx-angular-rxjs.mjs +6 -2
- package/fesm2015/odx-angular-rxjs.mjs.map +1 -1
- package/fesm2015/odx-angular-utils.mjs +72 -2
- package/fesm2015/odx-angular-utils.mjs.map +1 -1
- package/fesm2015/odx-angular.mjs +21 -1
- package/fesm2015/odx-angular.mjs.map +1 -1
- package/fesm2020/odx-angular-cdk-connected-overlay.mjs +230 -0
- package/fesm2020/odx-angular-cdk-connected-overlay.mjs.map +1 -0
- package/fesm2020/odx-angular-cdk-dynamic-view.mjs +6 -3
- package/fesm2020/odx-angular-cdk-dynamic-view.mjs.map +1 -1
- package/fesm2020/odx-angular-components-accordion.mjs +2 -2
- package/fesm2020/odx-angular-components-accordion.mjs.map +1 -1
- package/fesm2020/odx-angular-components-circular-progress.mjs +10 -3
- package/fesm2020/odx-angular-components-circular-progress.mjs.map +1 -1
- package/fesm2020/odx-angular-components-dropdown.mjs +172 -0
- package/fesm2020/odx-angular-components-dropdown.mjs.map +1 -0
- package/fesm2020/odx-angular-components-inline-message.mjs +55 -0
- package/fesm2020/odx-angular-components-inline-message.mjs.map +1 -0
- package/fesm2020/odx-angular-components-loading-spinner.mjs +74 -84
- package/fesm2020/odx-angular-components-loading-spinner.mjs.map +1 -1
- package/fesm2020/odx-angular-components-main-menu.mjs +2 -2
- package/fesm2020/odx-angular-components-main-menu.mjs.map +1 -1
- package/fesm2020/odx-angular-components-select.mjs +362 -0
- package/fesm2020/odx-angular-components-select.mjs.map +1 -0
- package/fesm2020/odx-angular-components-spinbox.mjs +97 -0
- package/fesm2020/odx-angular-components-spinbox.mjs.map +1 -0
- package/fesm2020/odx-angular-components-tooltip.mjs +192 -0
- package/fesm2020/odx-angular-components-tooltip.mjs.map +1 -0
- package/fesm2020/odx-angular-rxjs.mjs +6 -2
- package/fesm2020/odx-angular-rxjs.mjs.map +1 -1
- package/fesm2020/odx-angular-utils.mjs +71 -2
- package/fesm2020/odx-angular-utils.mjs.map +1 -1
- package/fesm2020/odx-angular.mjs +21 -1
- package/fesm2020/odx-angular.mjs.map +1 -1
- package/index.d.ts +1 -0
- package/lib/tokens/identity-matcher.d.ts +3 -0
- package/lib/tokens/index.d.ts +3 -0
- package/lib/tokens/string-search-handler.d.ts +3 -0
- package/lib/tokens/stringify.d.ts +3 -0
- package/package.json +50 -2
- package/rxjs/index.d.ts +1 -0
- package/rxjs/lib/delay-until.d.ts +2 -0
- package/utils/lib/decorators/index.d.ts +1 -0
- package/utils/lib/decorators/pure.d.ts +1 -0
- package/utils/lib/helpers/defer-fn.d.ts +1 -0
- package/utils/lib/helpers/event-manager.d.ts +12 -0
- package/utils/lib/helpers/index.d.ts +2 -0
- package/components/loading-spinner/lib/loading-spinner.service.d.ts +0 -9
- package/esm2020/components/loading-spinner/lib/loading-spinner.service.mjs +0 -17
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odx-angular-components-circular-progress.mjs","sources":["../../../../libs/angular/components/circular-progress/src/lib/models/circular-progress-size.ts","../../../../libs/angular/components/circular-progress/src/lib/circular-progress.component.ts","../../../../libs/angular/components/circular-progress/src/lib/circular-progress.component.html","../../../../libs/angular/components/circular-progress/src/odx-angular-components-circular-progress.ts"],"sourcesContent":["export type CircularProgressSize = typeof CircularProgressSize[keyof typeof CircularProgressSize];\n\nexport const CircularProgressSize = {\n AUTO: 'auto',\n SMALL: 'small',\n MEDIUM: 'medium',\n LARGE: 'large',\n} as const;\n","import { coerceNumberProperty, NumberInput } from '@angular/cdk/coercion';\nimport { AfterViewInit, ChangeDetectionStrategy, ChangeDetectorRef, Component, inject, Input, OnChanges, ViewEncapsulation } from '@angular/core';\nimport { CSSComponent, CSSModifier } from '@odx/angular/internal';\nimport { hasChanged, injectElement, NgChanges, Transform } from '@odx/angular/utils';\nimport { CircularProgressSize } from './models/circular-progress-size';\n\n@CSSComponent('circular-progress')\n@Component({\n standalone: true,\n selector: 'odx-circular-progress',\n templateUrl: './circular-progress.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[attr.aria-valuenow]': 'ariaValueNow',\n '[attr.aria-valuemax]': '100',\n '[attr.aria-valuemin]': '0',\n '[attr.role]': '\"meter\"',\n },\n})\nexport class CircularProgressComponent implements OnChanges, AfterViewInit {\n public static ngAcceptInputType_size: NumberInput;\n public static ngAcceptInputType_stroke: NumberInput;\n public static ngAcceptInputType_value: NumberInput;\n\n private readonly changeDetector = inject(ChangeDetectorRef);\n private _value = 0;\n\n protected readonly viewPortSize = 100;\n protected radius = 0;\n protected normalizedStroke = 0;\n protected circumference = 283;\n\n protected get ariaValueNow(): null | number {\n return this.indeterminate ? null : this.value;\n }\n\n protected get progressValue(): number {\n return this.indeterminate ? this.circumference : Math.floor((1 - this.value / 100) * this.circumference);\n }\n\n public readonly element = injectElement();\n\n @CSSModifier()\n public indeterminate = false;\n\n @Transform(coerceNumberProperty)\n @Input()\n public stroke = 4;\n\n @CSSModifier()\n @Input()\n public size = CircularProgressSize.MEDIUM;\n\n @Transform(coerceNumberProperty)\n @Input()\n public set value(value: unknown) {\n const coercedValue = coerceNumberProperty(value);\n if (coercedValue <= 100 && coercedValue >= -1) {\n this._value = coercedValue;\n this.indeterminate = coercedValue === -1;\n }\n }\n\n public get value(): number {\n return this._value;\n }\n\n public ngAfterViewInit(): void {\n this.updateDimensions();\n }\n\n public ngOnChanges(changes: NgChanges<CircularProgressComponent>): void {\n if (hasChanged(changes, ['stroke', 'size'])) {\n this.updateDimensions();\n }\n }\n\n private updateDimensions(): void {\n const normalizeFactor = this.viewPortSize / (this.element.nativeElement.offsetWidth || 1);\n this.normalizedStroke =
|
|
1
|
+
{"version":3,"file":"odx-angular-components-circular-progress.mjs","sources":["../../../../libs/angular/components/circular-progress/src/lib/models/circular-progress-size.ts","../../../../libs/angular/components/circular-progress/src/lib/circular-progress.component.ts","../../../../libs/angular/components/circular-progress/src/lib/circular-progress.component.html","../../../../libs/angular/components/circular-progress/src/odx-angular-components-circular-progress.ts"],"sourcesContent":["export type CircularProgressSize = typeof CircularProgressSize[keyof typeof CircularProgressSize];\n\nexport const CircularProgressSize = {\n AUTO: 'auto',\n SMALL: 'small',\n MEDIUM: 'medium',\n LARGE: 'large',\n} as const;\n","import { coerceNumberProperty, NumberInput } from '@angular/cdk/coercion';\nimport { AfterViewInit, ChangeDetectionStrategy, ChangeDetectorRef, Component, inject, Input, OnChanges, ViewEncapsulation } from '@angular/core';\nimport { CSSComponent, CSSModifier } from '@odx/angular/internal';\nimport { fromElementResize$ } from '@odx/angular/rxjs';\nimport { hasChanged, injectElement, NgChanges, Transform, untilDestroyed } from '@odx/angular/utils';\nimport { CircularProgressSize } from './models/circular-progress-size';\n\n@CSSComponent('circular-progress')\n@Component({\n standalone: true,\n selector: 'odx-circular-progress',\n templateUrl: './circular-progress.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[attr.aria-valuenow]': 'ariaValueNow',\n '[attr.aria-valuemax]': '100',\n '[attr.aria-valuemin]': '0',\n '[attr.role]': '\"meter\"',\n },\n})\nexport class CircularProgressComponent implements OnChanges, AfterViewInit {\n public static ngAcceptInputType_size: NumberInput;\n public static ngAcceptInputType_stroke: NumberInput;\n public static ngAcceptInputType_value: NumberInput;\n\n private readonly changeDetector = inject(ChangeDetectorRef);\n private readonly takeUntilDestroyed = untilDestroyed();\n private _value = 0;\n\n protected readonly viewPortSize = 100;\n protected radius = 0;\n protected normalizedStroke = 0;\n protected circumference = 283;\n\n protected get ariaValueNow(): null | number {\n return this.indeterminate ? null : this.value;\n }\n\n protected get progressValue(): number {\n return this.indeterminate ? this.circumference : Math.floor((1 - this.value / 100) * this.circumference);\n }\n\n public readonly element = injectElement();\n\n @CSSModifier()\n public indeterminate = false;\n\n @Transform(coerceNumberProperty)\n @Input()\n public stroke = 4;\n\n @CSSModifier()\n @Input()\n public size = CircularProgressSize.MEDIUM;\n\n @Transform(coerceNumberProperty)\n @Input()\n public set value(value: unknown) {\n const coercedValue = coerceNumberProperty(value);\n if (coercedValue <= 100 && coercedValue >= -1) {\n this._value = coercedValue;\n this.indeterminate = coercedValue === -1;\n }\n }\n\n public get value(): number {\n return this._value;\n }\n\n public ngAfterViewInit(): void {\n fromElementResize$(this.element.nativeElement)\n .pipe(this.takeUntilDestroyed())\n .subscribe(() => this.updateDimensions());\n }\n\n public ngOnChanges(changes: NgChanges<CircularProgressComponent>): void {\n if (hasChanged(changes, ['stroke', 'size'])) {\n this.updateDimensions();\n }\n }\n\n private updateDimensions(): void {\n const normalizeFactor = this.viewPortSize / (this.element.nativeElement.offsetWidth || 1);\n\n this.normalizedStroke = normalizeFactor * this.stroke;\n if (normalizeFactor >= 3) {\n this.normalizedStroke = Math.max(0, this.normalizedStroke - normalizeFactor);\n }\n this.radius = this.viewPortSize / 2 - this.normalizedStroke / 2;\n this.circumference = Math.floor(2 * this.radius * Math.PI);\n this.changeDetector.detectChanges();\n }\n}\n","<svg class=\"odx-circular-progress__inner\" attr.viewBox=\"0 0 {{ viewPortSize }} {{ viewPortSize }}\">\n <circle class=\"odx-circular-progress__track\" [attr.stroke-width]=\"normalizedStroke\" [attr.r]=\"radius\" cx=\"50%\" cy=\"50%\" />\n <circle\n class=\"odx-circular-progress__indicator\"\n [attr.stroke-dasharray]=\"circumference\"\n [attr.stroke-dashoffset]=\"progressValue\"\n [attr.stroke-width]=\"normalizedStroke\"\n [attr.r]=\"radius\"\n cx=\"50%\"\n cy=\"50%\"\n />\n</svg>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAEa,MAAA,oBAAoB,GAAG;AAClC,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,KAAK,EAAE,OAAO;AACd,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,KAAK,EAAE,OAAO;;;ACeH,IAAA,yBAAyB,GAA/B,MAAM,yBAAyB,CAAA;AAA/B,IAAA,WAAA,GAAA;AAKY,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAC3C,QAAA,IAAkB,CAAA,kBAAA,GAAG,cAAc,EAAE,CAAC;AAC/C,QAAA,IAAM,CAAA,MAAA,GAAG,CAAC,CAAC;AAEA,QAAA,IAAY,CAAA,YAAA,GAAG,GAAG,CAAC;AAC5B,QAAA,IAAM,CAAA,MAAA,GAAG,CAAC,CAAC;AACX,QAAA,IAAgB,CAAA,gBAAA,GAAG,CAAC,CAAC;AACrB,QAAA,IAAa,CAAA,aAAA,GAAG,GAAG,CAAC;AAUd,QAAA,IAAO,CAAA,OAAA,GAAG,aAAa,EAAE,CAAC;AAGnC,QAAA,IAAa,CAAA,aAAA,GAAG,KAAK,CAAC;AAItB,QAAA,IAAM,CAAA,MAAA,GAAG,CAAC,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,CAAA;AAAC,IAAA,WAAW,EAAE;;CAE4B,EAAA,yBAAA,CAAA,SAAA,EAAA,MAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAE1C,UAAA,CAAA;IAAC,SAAS,CAAC,oBAAoB,CAAC;;;CAQ/B,EAAA,yBAAA,CAAA,SAAA,EAAA,OAAA,EAAA,IAAA,CAAA,CAAA;AA3CU,yBAAyB,GAAA,UAAA,CAAA;IAdrC,YAAY,CAAC,mBAAmB,CAAC;CAcrB,EAAA,yBAAyB,CAwErC,CAAA;4FAxEY,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAbrC,SAAS;iCACI,IAAI,EAAA,QAAA,EACN,uBAAuB,EAAA,eAAA,EAEhB,uBAAuB,CAAC,MAAM,EAChC,aAAA,EAAA,iBAAiB,CAAC,IAAI,EAC/B,IAAA,EAAA;AACJ,wBAAA,sBAAsB,EAAE,cAAc;AACtC,wBAAA,sBAAsB,EAAE,KAAK;AAC7B,wBAAA,sBAAsB,EAAE,GAAG;AAC3B,wBAAA,aAAa,EAAE,SAAS;AACzB,qBAAA,EAAA,QAAA,EAAA,kgBAAA,EAAA,CAAA;SA2BM,CAAA,EAAA,cAAA,EAAA,EAAA,aAAa,MAIb,MAAM,EAAA,CAAA;sBADZ,KAAK;gBAKC,IAAI,EAAA,CAAA;sBADV,KAAK;gBAKK,KAAK,EAAA,CAAA;sBADf,KAAK;;;AEzDR;;AAEG;;;;"}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { __decorate, __metadata } from 'tslib';
|
|
2
|
+
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { inject, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, EventEmitter, Directive, Output, NgModule } from '@angular/core';
|
|
5
|
+
import { ConnectedOverlayService } from '@odx/angular/cdk/connected-overlay';
|
|
6
|
+
import { CSSComponent, CSSModifier } from '@odx/angular/internal';
|
|
7
|
+
import { getInjector, injectElement, EventManager, hasChanged, Transform } from '@odx/angular/utils';
|
|
8
|
+
import * as i1 from '@odx/angular';
|
|
9
|
+
import { CoreModule } from '@odx/angular';
|
|
10
|
+
import { DynamicViewDirective } from '@odx/angular/cdk/dynamic-view';
|
|
11
|
+
import * as i2 from '@odx/angular/components/loading-spinner';
|
|
12
|
+
import { LoadingSpinnerModule } from '@odx/angular/components/loading-spinner';
|
|
13
|
+
|
|
14
|
+
let DropdownComponent = class DropdownComponent {
|
|
15
|
+
constructor() {
|
|
16
|
+
this.host = inject(DropdownDirective);
|
|
17
|
+
this.injector = getInjector();
|
|
18
|
+
this.element = injectElement();
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
DropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
22
|
+
DropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: DropdownComponent, isStandalone: true, selector: "odx-dropdown", inputs: { content: "content" }, ngImport: i0, template: "<div class=\"odx-dropdown__inner\" [odxLoadingSpinner]=\"host.showLoader\" [odxClickOutsideActive]=\"true\" (odxClickOutside)=\"host.close()\">\n <ng-template [odxDynamicView]=\"content\" [odxDynamicViewInjector]=\"injector\"></ng-template>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i1.ClickOutsideDirective, selector: "[odxClickOutside]", inputs: ["odxClickOutsideActive"], outputs: ["odxClickOutside"] }, { kind: "directive", type: DynamicViewDirective, selector: "ng-template[odxDynamicView]", inputs: ["odxDynamicView", "odxDynamicViewInjector", "odxDynamicViewContext"] }, { kind: "ngmodule", type: LoadingSpinnerModule }, { kind: "directive", type: i2.LoadingSpinnerDirective, selector: "[odxLoadingSpinner]", inputs: ["odxLoadingSpinnerAutoColor", "odxLoadingSpinner", "odxLoadingSpinnerMinHeight"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
23
|
+
DropdownComponent = __decorate([
|
|
24
|
+
CSSComponent('dropdown')
|
|
25
|
+
], DropdownComponent);
|
|
26
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DropdownComponent, decorators: [{
|
|
27
|
+
type: Component,
|
|
28
|
+
args: [{ standalone: true, selector: 'odx-dropdown', imports: [CoreModule, DynamicViewDirective, LoadingSpinnerModule], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"odx-dropdown__inner\" [odxLoadingSpinner]=\"host.showLoader\" [odxClickOutsideActive]=\"true\" (odxClickOutside)=\"host.close()\">\n <ng-template [odxDynamicView]=\"content\" [odxDynamicViewInjector]=\"injector\"></ng-template>\n</div>\n" }]
|
|
29
|
+
}], propDecorators: { content: [{
|
|
30
|
+
type: Input
|
|
31
|
+
}] } });
|
|
32
|
+
|
|
33
|
+
const DefaultDropdownOptions = {
|
|
34
|
+
position: 'bottom',
|
|
35
|
+
matchReferenceWidth: false,
|
|
36
|
+
enableFallback: true,
|
|
37
|
+
minHeight: 0,
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
let DropdownDirective = class DropdownDirective {
|
|
41
|
+
constructor() {
|
|
42
|
+
this.connectedOverlayService = inject(ConnectedOverlayService);
|
|
43
|
+
this.eventManager = inject(EventManager);
|
|
44
|
+
this.injector = getInjector();
|
|
45
|
+
this.overlayRef = null;
|
|
46
|
+
this.element = injectElement();
|
|
47
|
+
this.disabled = false;
|
|
48
|
+
this.showLoader = false;
|
|
49
|
+
this.beforeOpen = new EventEmitter();
|
|
50
|
+
this.afterOpen = new EventEmitter();
|
|
51
|
+
this.beforeClose = new EventEmitter();
|
|
52
|
+
this.afterClose = new EventEmitter();
|
|
53
|
+
}
|
|
54
|
+
get isOpen() {
|
|
55
|
+
return this.overlayRef !== null;
|
|
56
|
+
}
|
|
57
|
+
ngAfterViewInit() {
|
|
58
|
+
this.eventManager.register(['click', 'keydown.enter'], (event) => this.open(event), this.referenceElement);
|
|
59
|
+
this.eventManager.register(['keyup.esc'], () => this.close(), 'document');
|
|
60
|
+
}
|
|
61
|
+
ngOnChanges(changes) {
|
|
62
|
+
var _a;
|
|
63
|
+
if (hasChanged(changes, 'disabled') && this.disabled) {
|
|
64
|
+
this.close();
|
|
65
|
+
}
|
|
66
|
+
if (hasChanged(changes, ['options', 'content', 'showLoader'])) {
|
|
67
|
+
(_a = this.overlayRef) === null || _a === void 0 ? void 0 : _a.update(this.createOverlayOptions());
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
open(event) {
|
|
71
|
+
var _a;
|
|
72
|
+
event === null || event === void 0 ? void 0 : event.preventDefault();
|
|
73
|
+
if (this.isOpen || !this.content || this.disabled)
|
|
74
|
+
return;
|
|
75
|
+
this.overlayRef = this.connectedOverlayService.createOverlay((_a = this.referenceElement) !== null && _a !== void 0 ? _a : this.element.nativeElement, this.createOverlayOptions(), {
|
|
76
|
+
host: this.referenceElement,
|
|
77
|
+
injector: this.injector,
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
close() {
|
|
81
|
+
var _a;
|
|
82
|
+
(_a = this.overlayRef) === null || _a === void 0 ? void 0 : _a.close();
|
|
83
|
+
this.overlayRef = null;
|
|
84
|
+
}
|
|
85
|
+
createOverlayOptions() {
|
|
86
|
+
return Object.assign(Object.assign(Object.assign({}, DefaultDropdownOptions), this.options), { containerClass: 'odx-dropdown-overlay', content: DropdownComponent, context: { content: this.content }, hooks: {
|
|
87
|
+
beforeOpen: () => this.beforeOpen.emit(),
|
|
88
|
+
afterOpen: () => this.afterOpen.emit(),
|
|
89
|
+
beforeClose: () => this.beforeClose.emit(),
|
|
90
|
+
afterClose: () => this.afterClose.emit(),
|
|
91
|
+
} });
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
DropdownDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DropdownDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
95
|
+
DropdownDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.12", type: DropdownDirective, isStandalone: true, selector: "[odxDropdown]", inputs: { content: ["odxDropdown", "content"], disabled: ["odxDropdownDisabled", "disabled"], showLoader: ["odxDropdownShowLoader", "showLoader"], options: ["odxDropdownOptions", "options"], referenceElement: ["odxDropdownReferenceElement", "referenceElement"] }, outputs: { beforeOpen: "odxDropdownBeforeOpen", afterOpen: "odxDropdownAfterOpen", beforeClose: "odxDropdownBeforeClose", afterClose: "odxDropdownAfterClose" }, providers: [EventManager], exportAs: ["odxDropdown"], usesOnChanges: true, ngImport: i0 });
|
|
96
|
+
__decorate([
|
|
97
|
+
CSSModifier(),
|
|
98
|
+
__metadata("design:type", Boolean),
|
|
99
|
+
__metadata("design:paramtypes", [])
|
|
100
|
+
], DropdownDirective.prototype, "isOpen", null);
|
|
101
|
+
__decorate([
|
|
102
|
+
Transform(coerceBooleanProperty),
|
|
103
|
+
__metadata("design:type", Object)
|
|
104
|
+
], DropdownDirective.prototype, "disabled", void 0);
|
|
105
|
+
__decorate([
|
|
106
|
+
Transform(coerceBooleanProperty),
|
|
107
|
+
__metadata("design:type", Object)
|
|
108
|
+
], DropdownDirective.prototype, "showLoader", void 0);
|
|
109
|
+
DropdownDirective = __decorate([
|
|
110
|
+
CSSComponent('dropdown-host')
|
|
111
|
+
], DropdownDirective);
|
|
112
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DropdownDirective, decorators: [{
|
|
113
|
+
type: Directive,
|
|
114
|
+
args: [{
|
|
115
|
+
standalone: true,
|
|
116
|
+
selector: '[odxDropdown]',
|
|
117
|
+
exportAs: 'odxDropdown',
|
|
118
|
+
providers: [EventManager],
|
|
119
|
+
}]
|
|
120
|
+
}], propDecorators: { isOpen: [], content: [{
|
|
121
|
+
type: Input,
|
|
122
|
+
args: ['odxDropdown']
|
|
123
|
+
}], disabled: [{
|
|
124
|
+
type: Input,
|
|
125
|
+
args: ['odxDropdownDisabled']
|
|
126
|
+
}], showLoader: [{
|
|
127
|
+
type: Input,
|
|
128
|
+
args: ['odxDropdownShowLoader']
|
|
129
|
+
}], options: [{
|
|
130
|
+
type: Input,
|
|
131
|
+
args: ['odxDropdownOptions']
|
|
132
|
+
}], referenceElement: [{
|
|
133
|
+
type: Input,
|
|
134
|
+
args: ['odxDropdownReferenceElement']
|
|
135
|
+
}], beforeOpen: [{
|
|
136
|
+
type: Output,
|
|
137
|
+
args: ['odxDropdownBeforeOpen']
|
|
138
|
+
}], afterOpen: [{
|
|
139
|
+
type: Output,
|
|
140
|
+
args: ['odxDropdownAfterOpen']
|
|
141
|
+
}], beforeClose: [{
|
|
142
|
+
type: Output,
|
|
143
|
+
args: ['odxDropdownBeforeClose']
|
|
144
|
+
}], afterClose: [{
|
|
145
|
+
type: Output,
|
|
146
|
+
args: ['odxDropdownAfterClose']
|
|
147
|
+
}] } });
|
|
148
|
+
|
|
149
|
+
const modules = [DropdownDirective];
|
|
150
|
+
class DropdownModule {
|
|
151
|
+
}
|
|
152
|
+
DropdownModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DropdownModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
153
|
+
DropdownModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: DropdownModule, imports: [DropdownDirective], exports: [CoreModule, DropdownDirective] });
|
|
154
|
+
DropdownModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DropdownModule, imports: [CoreModule] });
|
|
155
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DropdownModule, decorators: [{
|
|
156
|
+
type: NgModule,
|
|
157
|
+
args: [{
|
|
158
|
+
imports: modules,
|
|
159
|
+
exports: [CoreModule, ...modules],
|
|
160
|
+
}]
|
|
161
|
+
}] });
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Generated bundle index. Do not edit.
|
|
165
|
+
*/
|
|
166
|
+
|
|
167
|
+
export { DefaultDropdownOptions, DropdownDirective, DropdownModule };
|
|
168
|
+
//# sourceMappingURL=odx-angular-components-dropdown.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"odx-angular-components-dropdown.mjs","sources":["../../../../libs/angular/components/dropdown/src/lib/dropdown.component.ts","../../../../libs/angular/components/dropdown/src/lib/dropdown.component.html","../../../../libs/angular/components/dropdown/src/lib/models/dropdown-options.ts","../../../../libs/angular/components/dropdown/src/lib/dropdown.directive.ts","../../../../libs/angular/components/dropdown/src/lib/dropdown.module.ts","../../../../libs/angular/components/dropdown/src/odx-angular-components-dropdown.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, inject, Input, ViewEncapsulation } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { DynamicContent, DynamicViewDirective } from '@odx/angular/cdk/dynamic-view';\nimport { LoadingSpinnerModule } from '@odx/angular/components/loading-spinner';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { getInjector, injectElement } from '@odx/angular/utils';\nimport { DropdownDirective } from './dropdown.directive';\n\n@CSSComponent('dropdown')\n@Component({\n standalone: true,\n selector: 'odx-dropdown',\n imports: [CoreModule, DynamicViewDirective, LoadingSpinnerModule],\n templateUrl: './dropdown.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DropdownComponent {\n protected readonly host = inject(DropdownDirective);\n protected readonly injector = getInjector();\n public readonly element = injectElement();\n\n @Input()\n public content?: DynamicContent | null;\n}\n","<div class=\"odx-dropdown__inner\" [odxLoadingSpinner]=\"host.showLoader\" [odxClickOutsideActive]=\"true\" (odxClickOutside)=\"host.close()\">\n <ng-template [odxDynamicView]=\"content\" [odxDynamicViewInjector]=\"injector\"></ng-template>\n</div>\n","import { ConnectedOverlayOptions } from '@odx/angular/cdk/connected-overlay';\n\nexport type DropdownOptions = Pick<ConnectedOverlayOptions, 'position' | 'enableFallback' | 'matchReferenceWidth' | 'minHeight'>;\n\nexport const DefaultDropdownOptions: DropdownOptions = {\n position: 'bottom',\n matchReferenceWidth: false,\n enableFallback: true,\n minHeight: 0,\n};\n","import { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { AfterViewInit, Directive, EventEmitter, inject, Input, OnChanges, Output } from '@angular/core';\nimport { ConnectedOverlayOptions, ConnectedOverlayRef, ConnectedOverlayService } from '@odx/angular/cdk/connected-overlay';\nimport { DynamicContent } from '@odx/angular/cdk/dynamic-view';\nimport { CSSComponent, CSSModifier } from '@odx/angular/internal';\nimport { EventManager, getInjector, hasChanged, injectElement, NgChanges, Transform } from '@odx/angular/utils';\nimport { DropdownComponent } from './dropdown.component';\nimport { DefaultDropdownOptions, DropdownOptions } from './models';\n\n@CSSComponent('dropdown-host')\n@Directive({\n standalone: true,\n selector: '[odxDropdown]',\n exportAs: 'odxDropdown',\n providers: [EventManager],\n})\nexport class DropdownDirective implements AfterViewInit, OnChanges {\n public static ngAcceptInputType_disabled: BooleanInput;\n public static ngAcceptInputType_loading: BooleanInput;\n\n private readonly connectedOverlayService = inject(ConnectedOverlayService);\n private readonly eventManager = inject(EventManager);\n private readonly injector = getInjector();\n private overlayRef: ConnectedOverlayRef | null = null;\n\n public readonly element = injectElement();\n\n @CSSModifier()\n public get isOpen(): boolean {\n return this.overlayRef !== null;\n }\n\n @Input('odxDropdown')\n public content?: DynamicContent | null;\n\n @Transform(coerceBooleanProperty)\n @Input('odxDropdownDisabled')\n public disabled = false;\n\n @Transform(coerceBooleanProperty)\n @Input('odxDropdownShowLoader')\n public showLoader = false;\n\n @Input('odxDropdownOptions')\n public options?: Partial<DropdownOptions> | null;\n\n @Input('odxDropdownReferenceElement')\n public referenceElement?: HTMLElement | null;\n\n @Output('odxDropdownBeforeOpen')\n public beforeOpen = new EventEmitter<void>();\n\n @Output('odxDropdownAfterOpen')\n public afterOpen = new EventEmitter<void>();\n\n @Output('odxDropdownBeforeClose')\n public beforeClose = new EventEmitter<void>();\n\n @Output('odxDropdownAfterClose')\n public afterClose = new EventEmitter<void>();\n\n public ngAfterViewInit(): void {\n this.eventManager.register(['click', 'keydown.enter'], (event) => this.open(event), this.referenceElement);\n this.eventManager.register(['keyup.esc'], () => this.close(), 'document');\n }\n\n public ngOnChanges(changes: NgChanges<DropdownDirective>) {\n if (hasChanged(changes, 'disabled') && this.disabled) {\n this.close();\n }\n if (hasChanged(changes, ['options', 'content', 'showLoader'])) {\n this.overlayRef?.update(this.createOverlayOptions());\n }\n }\n\n public open(event?: Event) {\n event?.preventDefault();\n if (this.isOpen || !this.content || this.disabled) return;\n this.overlayRef = this.connectedOverlayService.createOverlay(this.referenceElement ?? this.element.nativeElement, this.createOverlayOptions(), {\n host: this.referenceElement,\n injector: this.injector,\n });\n }\n\n public close() {\n this.overlayRef?.close();\n this.overlayRef = null;\n }\n\n private createOverlayOptions(): Partial<ConnectedOverlayOptions> {\n return {\n ...DefaultDropdownOptions,\n ...this.options,\n containerClass: 'odx-dropdown-overlay',\n content: DropdownComponent,\n context: { content: this.content },\n hooks: {\n beforeOpen: () => this.beforeOpen.emit(),\n afterOpen: () => this.afterOpen.emit(),\n beforeClose: () => this.beforeClose.emit(),\n afterClose: () => this.afterClose.emit(),\n },\n };\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { DropdownDirective } from './dropdown.directive';\n\nconst modules = [DropdownDirective];\n\n@NgModule({\n imports: modules,\n exports: [CoreModule, ...modules],\n})\nexport class DropdownModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAiBO,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B,oBAAA,OAAO,EAAE,CAAC,UAAU,EAAE,GAAG,OAAO,CAAC;iBAClC,CAAA;;;ACTD;;AAEG;;;;"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { __decorate, __metadata } from 'tslib';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { Component, ChangeDetectionStrategy, ViewEncapsulation, Input } from '@angular/core';
|
|
4
|
+
import { IconComponent } from '@odx/angular/components/icon';
|
|
5
|
+
import { CSSModifier, CSSComponent } from '@odx/angular/internal';
|
|
6
|
+
import { injectElement } from '@odx/angular/utils';
|
|
7
|
+
|
|
8
|
+
const InlineMessageVariant = {
|
|
9
|
+
DEFAULT: 'default',
|
|
10
|
+
WARNING: 'warning',
|
|
11
|
+
DANGER: 'danger',
|
|
12
|
+
SUCCESS: 'success',
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
let InlineMessageComponent = class InlineMessageComponent {
|
|
16
|
+
constructor() {
|
|
17
|
+
this.element = injectElement();
|
|
18
|
+
}
|
|
19
|
+
get icon() {
|
|
20
|
+
switch (this.variant) {
|
|
21
|
+
case InlineMessageVariant.WARNING:
|
|
22
|
+
return 'warning';
|
|
23
|
+
case InlineMessageVariant.DANGER:
|
|
24
|
+
return 'danger';
|
|
25
|
+
case InlineMessageVariant.SUCCESS:
|
|
26
|
+
return 'check';
|
|
27
|
+
default:
|
|
28
|
+
return 'info';
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
InlineMessageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: InlineMessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
33
|
+
InlineMessageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: InlineMessageComponent, isStandalone: true, selector: "odx-inline-message", inputs: { variant: "variant" }, ngImport: i0, template: "<odx-icon size=\"medium\" [name]=\"icon\"></odx-icon>\n<div class=\"odx-inline-message__content\">\n <ng-content></ng-content>\n</div>\n", dependencies: [{ kind: "component", type: IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
34
|
+
__decorate([
|
|
35
|
+
CSSModifier({
|
|
36
|
+
default: InlineMessageVariant.DEFAULT,
|
|
37
|
+
}),
|
|
38
|
+
__metadata("design:type", Object)
|
|
39
|
+
], InlineMessageComponent.prototype, "variant", void 0);
|
|
40
|
+
InlineMessageComponent = __decorate([
|
|
41
|
+
CSSComponent('inline-message')
|
|
42
|
+
], InlineMessageComponent);
|
|
43
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: InlineMessageComponent, decorators: [{
|
|
44
|
+
type: Component,
|
|
45
|
+
args: [{ selector: 'odx-inline-message', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [IconComponent], template: "<odx-icon size=\"medium\" [name]=\"icon\"></odx-icon>\n<div class=\"odx-inline-message__content\">\n <ng-content></ng-content>\n</div>\n" }]
|
|
46
|
+
}], propDecorators: { variant: [{
|
|
47
|
+
type: Input
|
|
48
|
+
}] } });
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Generated bundle index. Do not edit.
|
|
52
|
+
*/
|
|
53
|
+
|
|
54
|
+
export { InlineMessageComponent, InlineMessageVariant };
|
|
55
|
+
//# sourceMappingURL=odx-angular-components-inline-message.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"odx-angular-components-inline-message.mjs","sources":["../../../../libs/angular/components/inline-message/src/lib/models/inline-message-variant.ts","../../../../libs/angular/components/inline-message/src/lib/inline-message.component.ts","../../../../libs/angular/components/inline-message/src/lib/inline-message.component.html","../../../../libs/angular/components/inline-message/src/odx-angular-components-inline-message.ts"],"sourcesContent":["export type InlineMessageVariant = typeof InlineMessageVariant[keyof typeof InlineMessageVariant];\n\nexport const InlineMessageVariant = {\n DEFAULT: 'default',\n WARNING: 'warning',\n DANGER: 'danger',\n SUCCESS: 'success',\n} as const;\n","import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { CSSComponent, CSSModifier } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\nimport { InlineMessageVariant } from './models/inline-message-variant';\n\n@CSSComponent('inline-message')\n@Component({\n selector: 'odx-inline-message',\n templateUrl: 'inline-message.component.html',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [IconComponent],\n})\nexport class InlineMessageComponent {\n public readonly element = injectElement<HTMLElement>();\n\n @CSSModifier({\n default: InlineMessageVariant.DEFAULT,\n })\n @Input()\n public variant?: InlineMessageVariant | null;\n\n public get icon(): string {\n switch (this.variant) {\n case InlineMessageVariant.WARNING:\n return 'warning';\n case InlineMessageVariant.DANGER:\n return 'danger';\n case InlineMessageVariant.SUCCESS:\n return 'check';\n default:\n return 'info';\n }\n }\n}\n","<odx-icon size=\"medium\" [name]=\"icon\"></odx-icon>\n<div class=\"odx-inline-message__content\">\n <ng-content></ng-content>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAEa,MAAA,oBAAoB,GAAG;AAClC,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,OAAO,EAAE,SAAS;;;ACSP,IAAA,sBAAsB,GAA5B,MAAM,sBAAsB,CAAA;AAA5B,IAAA,WAAA,GAAA;AACW,QAAA,IAAO,CAAA,OAAA,GAAG,aAAa,EAAe,CAAC;KAoBxD;AAZC,IAAA,IAAW,IAAI,GAAA;QACb,QAAQ,IAAI,CAAC,OAAO;YAClB,KAAK,oBAAo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,EAChC,aAAA,EAAA,iBAAiB,CAAC,IAAI,EAC5B,OAAA,EAAA,CAAC,aAAa,CAAC,EAAA,QAAA,EAAA,2IAAA,EAAA,CAAA;8BASjB,OAAO,EAAA,CAAA;sBADb,KAAK;;;AErBR;;AAEG;;;;"}
|
|
@@ -1,120 +1,64 @@
|
|
|
1
1
|
import { __decorate, __metadata } from 'tslib';
|
|
2
2
|
import { trigger, transition, useAnimation } from '@angular/animations';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import {
|
|
4
|
+
import { inject, Renderer2, Directive, Input, Component, ViewEncapsulation, ChangeDetectionStrategy, NgModule } from '@angular/core';
|
|
5
5
|
import { WindowRef, CoreModule } from '@odx/angular';
|
|
6
6
|
import { fadeIn, fadeOut } from '@odx/angular/animations';
|
|
7
7
|
import { CircularProgressComponent } from '@odx/angular/components/circular-progress';
|
|
8
8
|
import { CSSModifier, CSSComponent } from '@odx/angular/internal';
|
|
9
|
-
import { injectElement, getInjector, px, Transform } from '@odx/angular/utils';
|
|
10
|
-
import { Subject } from 'rxjs';
|
|
9
|
+
import { injectElement, getInjector, px, deferFn, Transform } from '@odx/angular/utils';
|
|
11
10
|
import { coerceNumberProperty, coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
12
11
|
import { DynamicViewService } from '@odx/angular/cdk/dynamic-view';
|
|
13
12
|
|
|
14
|
-
|
|
15
|
-
constructor() {
|
|
16
|
-
this.spinnerDestroyed$ = new Subject();
|
|
17
|
-
}
|
|
18
|
-
ngOnDestroy() {
|
|
19
|
-
this.spinnerDestroyed$.complete();
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
LoadingSpinnerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: LoadingSpinnerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
23
|
-
LoadingSpinnerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: LoadingSpinnerService });
|
|
24
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: LoadingSpinnerService, decorators: [{
|
|
25
|
-
type: Injectable
|
|
26
|
-
}] });
|
|
27
|
-
|
|
28
|
-
const BROWSER_TRANSPARENT_COLOR = 'rgba(0, 0, 0, 0)';
|
|
29
|
-
let LoadingSpinnerComponent = class LoadingSpinnerComponent {
|
|
30
|
-
constructor() {
|
|
31
|
-
this.spinnerService = inject(LoadingSpinnerService);
|
|
32
|
-
this.windowRef = inject(WindowRef);
|
|
33
|
-
this.backgroundColor = null;
|
|
34
|
-
this.element = injectElement();
|
|
35
|
-
this.autoColor = false;
|
|
36
|
-
}
|
|
37
|
-
animationFinished({ toState }) {
|
|
38
|
-
if (toState === 'void') {
|
|
39
|
-
this.spinnerService.spinnerDestroyed$.next();
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
ngOnInit() {
|
|
43
|
-
this.backgroundColor = this.resolveBackgroundColor(this.element.nativeElement);
|
|
44
|
-
}
|
|
45
|
-
resolveBackgroundColor(element) {
|
|
46
|
-
const { backgroundColor } = this.windowRef.nativeWindow.getComputedStyle(element);
|
|
47
|
-
if (backgroundColor !== BROWSER_TRANSPARENT_COLOR) {
|
|
48
|
-
return backgroundColor;
|
|
49
|
-
}
|
|
50
|
-
if (element.parentElement) {
|
|
51
|
-
return this.resolveBackgroundColor(element.parentElement);
|
|
52
|
-
}
|
|
53
|
-
return null;
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
LoadingSpinnerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: LoadingSpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
57
|
-
LoadingSpinnerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: LoadingSpinnerComponent, isStandalone: true, selector: "odx-loading-spinner", inputs: { autoColor: "autoColor" }, host: { listeners: { "@hostAnimation.done": "animationFinished($event)" }, properties: { "@hostAnimation": "true" } }, ngImport: i0, template: "<odx-circular-progress size=\"auto\" value=\"-1\"></odx-circular-progress>\n<div class=\"odx-loading-spinner__backdrop\" [style.backgroundColor]=\"backgroundColor\"></div>\n", dependencies: [{ kind: "component", type: CircularProgressComponent, selector: "odx-circular-progress", inputs: ["stroke", "size", "value"] }], animations: [trigger('hostAnimation', [transition(':enter', useAnimation(fadeIn())), transition(':leave', useAnimation(fadeOut()))])], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
58
|
-
__decorate([
|
|
59
|
-
CSSModifier(),
|
|
60
|
-
__metadata("design:type", Object)
|
|
61
|
-
], LoadingSpinnerComponent.prototype, "autoColor", void 0);
|
|
62
|
-
LoadingSpinnerComponent = __decorate([
|
|
63
|
-
CSSComponent('loading-spinner')
|
|
64
|
-
], LoadingSpinnerComponent);
|
|
65
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: LoadingSpinnerComponent, decorators: [{
|
|
66
|
-
type: Component,
|
|
67
|
-
args: [{ standalone: true, selector: 'odx-loading-spinner', imports: [CircularProgressComponent], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
68
|
-
'[@hostAnimation]': 'true',
|
|
69
|
-
'(@hostAnimation.done)': 'animationFinished($event)',
|
|
70
|
-
}, animations: [trigger('hostAnimation', [transition(':enter', useAnimation(fadeIn())), transition(':leave', useAnimation(fadeOut()))])], template: "<odx-circular-progress size=\"auto\" value=\"-1\"></odx-circular-progress>\n<div class=\"odx-loading-spinner__backdrop\" [style.backgroundColor]=\"backgroundColor\"></div>\n" }]
|
|
71
|
-
}], propDecorators: { autoColor: [{
|
|
72
|
-
type: Input
|
|
73
|
-
}] } });
|
|
74
|
-
|
|
13
|
+
const LOADING_SPINNER_PARENT_CLASS = 'odx-loading-spinner-parent';
|
|
75
14
|
class LoadingSpinnerDirective {
|
|
76
15
|
constructor() {
|
|
77
16
|
this.dynamicViewService = inject(DynamicViewService);
|
|
78
|
-
this.hostElement =
|
|
17
|
+
this.hostElement = injectElement();
|
|
79
18
|
this.renderer = inject(Renderer2);
|
|
80
|
-
this.spinnerService = inject(LoadingSpinnerService);
|
|
81
19
|
this.injector = getInjector();
|
|
82
20
|
this.windowRef = inject(WindowRef);
|
|
83
|
-
this.parentMinHeight = 0;
|
|
84
21
|
this.viewRef = null;
|
|
85
22
|
this.autoColor = false;
|
|
86
|
-
this.spinnerService.spinnerDestroyed$.subscribe(() => this.resetParentElement());
|
|
87
23
|
}
|
|
88
24
|
set isLoading(value) {
|
|
89
|
-
var _a;
|
|
90
25
|
if (value) {
|
|
91
|
-
this.
|
|
92
|
-
this.appendSpinner();
|
|
26
|
+
this.createSpinner();
|
|
93
27
|
}
|
|
94
28
|
else {
|
|
95
|
-
|
|
29
|
+
this.removeSpinner();
|
|
96
30
|
}
|
|
97
31
|
}
|
|
32
|
+
get isLoading() {
|
|
33
|
+
return this.viewRef !== null;
|
|
34
|
+
}
|
|
98
35
|
set minHeight(value) {
|
|
99
36
|
this.parentMinHeight = coerceNumberProperty(value);
|
|
100
37
|
this.setParentHeight();
|
|
101
38
|
}
|
|
102
|
-
|
|
103
|
-
this.renderer.
|
|
39
|
+
setParentHeight() {
|
|
40
|
+
this.renderer.setStyle(this.hostElement.nativeElement, 'minHeight', this.parentMinHeight ? px(this.parentMinHeight) : 'inherit');
|
|
41
|
+
}
|
|
42
|
+
createSpinner() {
|
|
43
|
+
this.renderer.addClass(this.hostElement.nativeElement, LOADING_SPINNER_PARENT_CLASS);
|
|
104
44
|
this.setParentHeight();
|
|
105
45
|
if (this.hasStaticPosition()) {
|
|
106
46
|
this.renderer.setStyle(this.hostElement.nativeElement, 'position', 'relative');
|
|
107
47
|
}
|
|
48
|
+
this.viewRef = this.dynamicViewService.createView(LoadingSpinnerComponent, {
|
|
49
|
+
injector: this.injector,
|
|
50
|
+
context: { autoColor: this.autoColor },
|
|
51
|
+
host: this.hostElement.nativeElement,
|
|
52
|
+
});
|
|
53
|
+
deferFn(() => (this.hostElement.nativeElement.scrollTop = 0));
|
|
108
54
|
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
this.viewRef = this.dynamicViewService.createView(LoadingSpinnerComponent, { injector: this.injector, context: { autoColor: this.autoColor } });
|
|
114
|
-
this.renderer.appendChild(this.hostElement.nativeElement, this.viewRef.getElement());
|
|
55
|
+
removeSpinner() {
|
|
56
|
+
var _a;
|
|
57
|
+
(_a = this.viewRef) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
58
|
+
this.viewRef = null;
|
|
115
59
|
}
|
|
116
|
-
|
|
117
|
-
this.renderer.removeClass(this.hostElement.nativeElement,
|
|
60
|
+
resetParentStyles() {
|
|
61
|
+
this.renderer.removeClass(this.hostElement.nativeElement, LOADING_SPINNER_PARENT_CLASS);
|
|
118
62
|
this.renderer.removeStyle(this.hostElement.nativeElement, 'minHeight');
|
|
119
63
|
this.renderer.removeStyle(this.hostElement.nativeElement, 'position');
|
|
120
64
|
}
|
|
@@ -123,7 +67,7 @@ class LoadingSpinnerDirective {
|
|
|
123
67
|
}
|
|
124
68
|
}
|
|
125
69
|
LoadingSpinnerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: LoadingSpinnerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
126
|
-
LoadingSpinnerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.12", type: LoadingSpinnerDirective, isStandalone: true, selector: "[odxLoadingSpinner]", inputs: { autoColor: ["odxLoadingSpinnerAutoColor", "autoColor"], isLoading: ["odxLoadingSpinner", "isLoading"], minHeight: ["odxLoadingSpinnerMinHeight", "minHeight"] },
|
|
70
|
+
LoadingSpinnerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.12", type: LoadingSpinnerDirective, isStandalone: true, selector: "[odxLoadingSpinner]", inputs: { autoColor: ["odxLoadingSpinnerAutoColor", "autoColor"], isLoading: ["odxLoadingSpinner", "isLoading"], minHeight: ["odxLoadingSpinnerMinHeight", "minHeight"] }, ngImport: i0 });
|
|
127
71
|
__decorate([
|
|
128
72
|
Transform(coerceBooleanProperty),
|
|
129
73
|
__metadata("design:type", Object)
|
|
@@ -138,9 +82,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
138
82
|
args: [{
|
|
139
83
|
selector: '[odxLoadingSpinner]',
|
|
140
84
|
standalone: true,
|
|
141
|
-
providers: [LoadingSpinnerService],
|
|
142
85
|
}]
|
|
143
|
-
}],
|
|
86
|
+
}], propDecorators: { autoColor: [{
|
|
144
87
|
type: Input,
|
|
145
88
|
args: ['odxLoadingSpinnerAutoColor']
|
|
146
89
|
}], isLoading: [{
|
|
@@ -151,6 +94,53 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
151
94
|
args: ['odxLoadingSpinnerMinHeight']
|
|
152
95
|
}] } });
|
|
153
96
|
|
|
97
|
+
const BROWSER_TRANSPARENT_COLOR = 'rgba(0, 0, 0, 0)';
|
|
98
|
+
let LoadingSpinnerComponent = class LoadingSpinnerComponent {
|
|
99
|
+
constructor() {
|
|
100
|
+
this.host = inject(LoadingSpinnerDirective);
|
|
101
|
+
this.windowRef = inject(WindowRef);
|
|
102
|
+
this.backgroundColor = null;
|
|
103
|
+
this.element = injectElement();
|
|
104
|
+
this.autoColor = false;
|
|
105
|
+
}
|
|
106
|
+
ngOnInit() {
|
|
107
|
+
this.backgroundColor = this.resolveBackgroundColor(this.element.nativeElement);
|
|
108
|
+
}
|
|
109
|
+
animationFinished({ toState }) {
|
|
110
|
+
if (toState === 'void') {
|
|
111
|
+
this.host.resetParentStyles();
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
resolveBackgroundColor(element) {
|
|
115
|
+
const { backgroundColor } = this.windowRef.nativeWindow.getComputedStyle(element);
|
|
116
|
+
if (backgroundColor !== BROWSER_TRANSPARENT_COLOR) {
|
|
117
|
+
return backgroundColor;
|
|
118
|
+
}
|
|
119
|
+
if (element.parentElement) {
|
|
120
|
+
return this.resolveBackgroundColor(element.parentElement);
|
|
121
|
+
}
|
|
122
|
+
return null;
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
LoadingSpinnerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: LoadingSpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
126
|
+
LoadingSpinnerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: LoadingSpinnerComponent, isStandalone: true, selector: "odx-loading-spinner", inputs: { autoColor: "autoColor" }, host: { listeners: { "@hostAnimation.done": "animationFinished($event)" }, properties: { "@hostAnimation": "true" } }, ngImport: i0, template: "<odx-circular-progress size=\"auto\" value=\"-1\"></odx-circular-progress>\n<div class=\"odx-loading-spinner__backdrop\" [style.backgroundColor]=\"backgroundColor\"></div>\n", dependencies: [{ kind: "component", type: CircularProgressComponent, selector: "odx-circular-progress", inputs: ["stroke", "size", "value"] }], animations: [trigger('hostAnimation', [transition(':enter', useAnimation(fadeIn())), transition(':leave', useAnimation(fadeOut()))])], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
127
|
+
__decorate([
|
|
128
|
+
CSSModifier(),
|
|
129
|
+
__metadata("design:type", Object)
|
|
130
|
+
], LoadingSpinnerComponent.prototype, "autoColor", void 0);
|
|
131
|
+
LoadingSpinnerComponent = __decorate([
|
|
132
|
+
CSSComponent('loading-spinner')
|
|
133
|
+
], LoadingSpinnerComponent);
|
|
134
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: LoadingSpinnerComponent, decorators: [{
|
|
135
|
+
type: Component,
|
|
136
|
+
args: [{ standalone: true, selector: 'odx-loading-spinner', imports: [CircularProgressComponent], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
137
|
+
'[@hostAnimation]': 'true',
|
|
138
|
+
'(@hostAnimation.done)': 'animationFinished($event)',
|
|
139
|
+
}, animations: [trigger('hostAnimation', [transition(':enter', useAnimation(fadeIn())), transition(':leave', useAnimation(fadeOut()))])], template: "<odx-circular-progress size=\"auto\" value=\"-1\"></odx-circular-progress>\n<div class=\"odx-loading-spinner__backdrop\" [style.backgroundColor]=\"backgroundColor\"></div>\n" }]
|
|
140
|
+
}], propDecorators: { autoColor: [{
|
|
141
|
+
type: Input
|
|
142
|
+
}] } });
|
|
143
|
+
|
|
154
144
|
const modules = [LoadingSpinnerComponent, LoadingSpinnerDirective];
|
|
155
145
|
class LoadingSpinnerModule {
|
|
156
146
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odx-angular-components-loading-spinner.mjs","sources":["../../../../libs/angular/components/loading-spinner/src/lib/loading-spinner.service.ts","../../../../libs/angular/components/loading-spinner/src/lib/loading-spinner.component.ts","../../../../libs/angular/components/loading-spinner/src/lib/loading-spinner.component.html","../../../../libs/angular/components/loading-spinner/src/lib/loading-spinner.directive.ts","../../../../libs/angular/components/loading-spinner/src/lib/loading-spinner.module.ts","../../../../libs/angular/components/loading-spinner/src/odx-angular-components-loading-spinner.ts"],"sourcesContent":["import { Injectable, OnDestroy } from '@angular/core';\nimport { Subject } from 'rxjs';\n\n@Injectable()\nexport class LoadingSpinnerService implements OnDestroy {\n public readonly spinnerDestroyed$ = new Subject<void>();\n\n public ngOnDestroy(): void {\n this.spinnerDestroyed$.complete();\n }\n}\n","import { AnimationEvent, transition, trigger, useAnimation } from '@angular/animations';\nimport { ChangeDetectionStrategy, Component, inject, Input, OnInit, ViewEncapsulation } from '@angular/core';\nimport { WindowRef } from '@odx/angular';\nimport { fadeIn, fadeOut } from '@odx/angular/animations';\nimport { CircularProgressComponent } from '@odx/angular/components/circular-progress';\nimport { CSSComponent, CSSModifier } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\nimport { LoadingSpinnerService } from './loading-spinner.service';\n\nconst BROWSER_TRANSPARENT_COLOR = 'rgba(0, 0, 0, 0)';\n\n@CSSComponent('loading-spinner')\n@Component({\n standalone: true,\n selector: 'odx-loading-spinner',\n templateUrl: './loading-spinner.component.html',\n imports: [CircularProgressComponent],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[@hostAnimation]': 'true',\n '(@hostAnimation.done)': 'animationFinished($event)',\n },\n animations: [trigger('hostAnimation', [transition(':enter', useAnimation(fadeIn())), transition(':leave', useAnimation(fadeOut()))])],\n})\nexport class LoadingSpinnerComponent implements OnInit {\n private readonly spinnerService = inject(LoadingSpinnerService);\n private readonly windowRef = inject(WindowRef);\n\n protected backgroundColor: string | null = null;\n\n public readonly element = injectElement();\n\n @CSSModifier()\n @Input()\n public autoColor = false;\n\n public animationFinished({ toState }: AnimationEvent): void {\n if (toState === 'void') {\n this.spinnerService.spinnerDestroyed$.next();\n }\n }\n\n public ngOnInit(): void {\n this.backgroundColor = this.resolveBackgroundColor(this.element.nativeElement);\n }\n\n private resolveBackgroundColor(element: HTMLElement): string | null {\n const { backgroundColor } = this.windowRef.nativeWindow.getComputedStyle(element);\n if (backgroundColor !== BROWSER_TRANSPARENT_COLOR) {\n return backgroundColor;\n }\n if (element.parentElement) {\n return this.resolveBackgroundColor(element.parentElement);\n }\n return null;\n }\n}\n","<odx-circular-progress size=\"auto\" value=\"-1\"></odx-circular-progress>\n<div class=\"odx-loading-spinner__backdrop\" [style.backgroundColor]=\"backgroundColor\"></div>\n","import { BooleanInput, coerceBooleanProperty, coerceNumberProperty, NumberInput } from '@angular/cdk/coercion';\nimport { Directive, ElementRef, inject, Input, Renderer2 } from '@angular/core';\nimport { WindowRef } from '@odx/angular';\nimport { DynamicViewRef, DynamicViewService } from '@odx/angular/cdk/dynamic-view';\nimport { getInjector, px, Transform } from '@odx/angular/utils';\nimport { LoadingSpinnerComponent } from './loading-spinner.component';\nimport { LoadingSpinnerService } from './loading-spinner.service';\n\n@Directive({\n selector: '[odxLoadingSpinner]',\n standalone: true,\n providers: [LoadingSpinnerService],\n})\nexport class LoadingSpinnerDirective {\n public static ngAcceptInputType_autoColor: BooleanInput;\n public static ngAcceptInputType_isLoading: BooleanInput;\n public static ngAcceptInputType_minHeight: NumberInput;\n\n private readonly dynamicViewService = inject(DynamicViewService);\n private readonly hostElement = inject(ElementRef);\n private readonly renderer = inject(Renderer2);\n private readonly spinnerService = inject(LoadingSpinnerService);\n private readonly injector = getInjector();\n private readonly windowRef = inject(WindowRef);\n\n private parentMinHeight = 0;\n private viewRef: DynamicViewRef<typeof LoadingSpinnerComponent> | null = null;\n\n @Transform(coerceBooleanProperty)\n @Input('odxLoadingSpinnerAutoColor')\n public autoColor = false;\n\n @Input('odxLoadingSpinner')\n public set isLoading(value: boolean) {\n if (value) {\n this.setParent();\n this.appendSpinner();\n } else {\n this.viewRef?.destroy();\n }\n }\n\n @Transform(coerceNumberProperty)\n @Input('odxLoadingSpinnerMinHeight')\n public set minHeight(value: unknown) {\n this.parentMinHeight = coerceNumberProperty(value);\n this.setParentHeight();\n }\n\n private setParent(): void {\n this.renderer.addClass(this.hostElement.nativeElement, 'odx-loading-spinner-parent');\n this.setParentHeight();\n if (this.hasStaticPosition()) {\n this.renderer.setStyle(this.hostElement.nativeElement, 'position', 'relative');\n }\n }\n\n private setParentHeight(): void {\n this.renderer.setStyle(this.hostElement.nativeElement, 'minHeight', px(this.parentMinHeight));\n }\n\n private appendSpinner(): void {\n this.viewRef = this.dynamicViewService.createView(LoadingSpinnerComponent, { injector: this.injector, context: { autoColor: this.autoColor } });\n this.renderer.appendChild(this.hostElement.nativeElement, this.viewRef.getElement());\n }\n\n private resetParentElement(): void {\n this.renderer.removeClass(this.hostElement.nativeElement, 'odx-loading-spinner-parent');\n this.renderer.removeStyle(this.hostElement.nativeElement, 'minHeight');\n this.renderer.removeStyle(this.hostElement.nativeElement, 'position');\n }\n\n private hasStaticPosition(): boolean {\n return this.windowRef.nativeWindow.getComputedStyle(this.hostElement.nativeElement).position === 'static';\n }\n\n constructor() {\n this.spinnerService.spinnerDestroyed$.subscribe(() => this.resetParentElement());\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { LoadingSpinnerComponent } from './loading-spinner.component';\nimport { LoadingSpinnerDirective } from './loading-spinner.directive';\n\nconst modules = [LoadingSpinnerComponent, LoadingSpinnerDirective];\n\n@NgModule({\n imports: modules,\n exports: [CoreModule, ...modules],\n})\nexport class LoadingSpinnerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAIa,qBAAqB,CAAA;AADlC,IAAA,WAAA,GAAA;AAEkB,QAAA,IAAA,CAAA,iBAAiB,GAAG,IAAI,OAAO,EAAQ,CAAC;KAKzD;IAHQ,WAAW,GAAA;AAChB,QAAA,IAAI,CAAC,iBAAiB,CAAC,QAAQ,EAAE,CAAC;KACnC;;mHALU,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;uHAArB,qBAAqB,EAAA,CAAA,CAAA;4FAArB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBADjC,UAAU;;;ACMX,MAAM,yBAAyB,GAAG,kBAAkB,CAAC;AAgBxC,IAAA,uBAAuB,GAA7B,MAAM,uBAAuB,CAAA;AAA7B,IAAA,WAAA,GAAA;AACY,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAC;AAC/C,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S,EAAA,CAAA;sBADnB,KAAK;uBAAC,mBAAmB,CAAA;gBAYf,SAAS,EAAA,CAAA;sBADnB,KAAK;uBAAC,4BAA4B,CAAA;;;ACtCrC,MAAM,OAAO,GAAG,CAAC,uBAAuB,EAAE,uBAAuB,CAAC,CAAC;MAMtD,oBAAoB,CAAA;;kHAApB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;mHAApB,oBAAoB,EAAA,OAAA,EAAA,CANhB,uBAAuB,EAAE,uBAAuB,aAIrD,UAAU,EAJL,uBAAuB,EAAE,uBAAuB,CAAA,EAAA,CAAA,CAAA;mHAMpD,oBAAoB,EAAA,OAAA,EAAA,CANhB,uBAAuB,EAI5B,UAAU,CAAA,EAAA,CAAA,CAAA;4FAET,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAJhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,OAAO;AAChB,oBAAA,OAAO,EAAE,CAAC,UAAU,EAAE,GAAG,OAAO,CAAC;iBAClC,CAAA;;;ACVD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"odx-angular-components-loading-spinner.mjs","sources":["../../../../libs/angular/components/loading-spinner/src/lib/loading-spinner.directive.ts","../../../../libs/angular/components/loading-spinner/src/lib/loading-spinner.component.ts","../../../../libs/angular/components/loading-spinner/src/lib/loading-spinner.component.html","../../../../libs/angular/components/loading-spinner/src/lib/loading-spinner.module.ts","../../../../libs/angular/components/loading-spinner/src/odx-angular-components-loading-spinner.ts"],"sourcesContent":["import { BooleanInput, coerceBooleanProperty, coerceNumberProperty, NumberInput } from '@angular/cdk/coercion';\nimport { Directive, inject, Input, Renderer2 } from '@angular/core';\nimport { WindowRef } from '@odx/angular';\nimport { DynamicViewRef, DynamicViewService } from '@odx/angular/cdk/dynamic-view';\nimport { deferFn, getInjector, injectElement, px, Transform } from '@odx/angular/utils';\nimport { LoadingSpinnerComponent } from './loading-spinner.component';\n\nconst LOADING_SPINNER_PARENT_CLASS = 'odx-loading-spinner-parent';\n\n@Directive({\n selector: '[odxLoadingSpinner]',\n standalone: true,\n})\nexport class LoadingSpinnerDirective {\n public static ngAcceptInputType_autoColor: BooleanInput;\n public static ngAcceptInputType_isLoading: BooleanInput;\n public static ngAcceptInputType_minHeight: NumberInput;\n\n private readonly dynamicViewService = inject(DynamicViewService);\n private readonly hostElement = injectElement();\n private readonly renderer = inject(Renderer2);\n private readonly injector = getInjector();\n private readonly windowRef = inject(WindowRef);\n\n private parentMinHeight?: number;\n private viewRef: DynamicViewRef<typeof LoadingSpinnerComponent> | null = null;\n\n @Transform(coerceBooleanProperty)\n @Input('odxLoadingSpinnerAutoColor')\n public autoColor = false;\n\n @Input('odxLoadingSpinner')\n public set isLoading(value: boolean | null | undefined) {\n if (value) {\n this.createSpinner();\n } else {\n this.removeSpinner();\n }\n }\n public get isLoading(): boolean {\n return this.viewRef !== null;\n }\n\n @Transform(coerceNumberProperty)\n @Input('odxLoadingSpinnerMinHeight')\n public set minHeight(value: unknown) {\n this.parentMinHeight = coerceNumberProperty(value);\n this.setParentHeight();\n }\n\n private setParentHeight(): void {\n this.renderer.setStyle(this.hostElement.nativeElement, 'minHeight', this.parentMinHeight ? px(this.parentMinHeight) : 'inherit');\n }\n\n private createSpinner(): void {\n this.renderer.addClass(this.hostElement.nativeElement, LOADING_SPINNER_PARENT_CLASS);\n this.setParentHeight();\n if (this.hasStaticPosition()) {\n this.renderer.setStyle(this.hostElement.nativeElement, 'position', 'relative');\n }\n this.viewRef = this.dynamicViewService.createView(LoadingSpinnerComponent, {\n injector: this.injector,\n context: { autoColor: this.autoColor },\n host: this.hostElement.nativeElement,\n });\n deferFn(() => (this.hostElement.nativeElement.scrollTop = 0));\n }\n\n private removeSpinner(): void {\n this.viewRef?.destroy();\n this.viewRef = null;\n }\n\n public resetParentStyles(): void {\n this.renderer.removeClass(this.hostElement.nativeElement, LOADING_SPINNER_PARENT_CLASS);\n this.renderer.removeStyle(this.hostElement.nativeElement, 'minHeight');\n this.renderer.removeStyle(this.hostElement.nativeElement, 'position');\n }\n\n private hasStaticPosition(): boolean {\n return this.windowRef.nativeWindow.getComputedStyle(this.hostElement.nativeElement).position === 'static';\n }\n}\n","import { AnimationEvent, transition, trigger, useAnimation } from '@angular/animations';\nimport { ChangeDetectionStrategy, Component, inject, Input, OnInit, ViewEncapsulation } from '@angular/core';\nimport { WindowRef } from '@odx/angular';\nimport { fadeIn, fadeOut } from '@odx/angular/animations';\nimport { CircularProgressComponent } from '@odx/angular/components/circular-progress';\nimport { CSSComponent, CSSModifier } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\nimport { LoadingSpinnerDirective } from './loading-spinner.directive';\n\nconst BROWSER_TRANSPARENT_COLOR = 'rgba(0, 0, 0, 0)';\n\n@CSSComponent('loading-spinner')\n@Component({\n standalone: true,\n selector: 'odx-loading-spinner',\n templateUrl: './loading-spinner.component.html',\n imports: [CircularProgressComponent],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[@hostAnimation]': 'true',\n '(@hostAnimation.done)': 'animationFinished($event)',\n },\n animations: [trigger('hostAnimation', [transition(':enter', useAnimation(fadeIn())), transition(':leave', useAnimation(fadeOut()))])],\n})\nexport class LoadingSpinnerComponent implements OnInit {\n private readonly host = inject(LoadingSpinnerDirective);\n private readonly windowRef = inject(WindowRef);\n\n protected backgroundColor: string | null = null;\n\n public readonly element = injectElement();\n\n @CSSModifier()\n @Input()\n public autoColor = false;\n\n public ngOnInit(): void {\n this.backgroundColor = this.resolveBackgroundColor(this.element.nativeElement);\n }\n\n protected animationFinished({ toState }: AnimationEvent): void {\n if (toState === 'void') {\n this.host.resetParentStyles();\n }\n }\n\n private resolveBackgroundColor(element: HTMLElement): string | null {\n const { backgroundColor } = this.windowRef.nativeWindow.getComputedStyle(element);\n if (backgroundColor !== BROWSER_TRANSPARENT_COLOR) {\n return backgroundColor;\n }\n if (element.parentElement) {\n return this.resolveBackgroundColor(element.parentElement);\n }\n return null;\n }\n}\n","<odx-circular-progress size=\"auto\" value=\"-1\"></odx-circular-progress>\n<div class=\"odx-loading-spinner__backdrop\" [style.backgroundColor]=\"backgroundColor\"></div>\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { LoadingSpinnerComponent } from './loading-spinner.component';\nimport { LoadingSpinnerDirective } from './loading-spinner.directive';\n\nconst modules = [LoadingSpinnerComponent, LoadingSpinnerDirective];\n\n@NgModule({\n imports: modules,\n exports: [CoreModule, ...modules],\n})\nexport class LoadingSpinnerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAOA,MAAM,4BAA4B,GAAG,4BAA4B,CAAC;MAMrD,uBAAuB,CAAA;AAJpC,IAAA,WAAA,GAAA;AASmB,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,kBAAkB,CAAC,CAAC;AAChD,QAAA,IAAW,CAAA,WAAA,GAAG,aAAa,EAAE,CAAC;AAC9B,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;AAC7B,QAAA,IAAQ,CAAA,QAAA,GAAG,WAAW,EAAE,CAAC;AACzB,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;AAGvC,QAAA,IAAO,CAAA,OAAA,GAA0D,IAAI,CAAC;AAIvE,QAAA,IAAS,CAAA,SAAA,GAAG,KAAK,CAAC;KAqD1B;IAnDC,IACW,SAAS,CAAC,KAAiC,EAAA;AACpD,QAAA,IAAI,KAAK,EAAE;YACT,IAAI,CAAC,aAAa,EAAE,CAAC;AACtB,SAAA;AAAM,aAAA;YACL,IAAI,CAAC,aAAa,EAAE,CAAC;AACtB,SAAA;KACF;AACD,IAAA,IAAW,SAAS,GAAA;AAClB,QAAA,OA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