@theseam/ui-common 1.0.0-beta.6 → 1.0.0-beta.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/breadcrumbs/index.d.ts +1 -2
- package/buttons/index.d.ts +20 -13
- package/datatable/index.d.ts +8 -8
- package/dynamic/index.d.ts +5 -5
- package/fesm2022/theseam-ui-common-asset-reader.mjs +28 -29
- package/fesm2022/theseam-ui-common-asset-reader.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-breadcrumbs.mjs +25 -31
- package/fesm2022/theseam-ui-common-breadcrumbs.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-buttons.mjs +108 -66
- package/fesm2022/theseam-ui-common-buttons.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-card.mjs +21 -21
- package/fesm2022/theseam-ui-common-card.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-carousel.mjs +28 -30
- package/fesm2022/theseam-ui-common-carousel.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-checkbox.mjs +27 -27
- package/fesm2022/theseam-ui-common-checkbox.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-confirm-dialog.mjs +23 -27
- package/fesm2022/theseam-ui-common-confirm-dialog.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-core.mjs +31 -11
- package/fesm2022/theseam-ui-common-core.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-data-exporter.mjs +18 -19
- package/fesm2022/theseam-ui-common-data-exporter.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-data-filters.mjs +80 -64
- package/fesm2022/theseam-ui-common-data-filters.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-datatable-alterations-display.mjs +51 -49
- package/fesm2022/theseam-ui-common-datatable-alterations-display.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-datatable-dynamic.mjs +145 -112
- package/fesm2022/theseam-ui-common-datatable-dynamic.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-datatable.mjs +581 -385
- package/fesm2022/theseam-ui-common-datatable.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-dynamic-component-loader.mjs +12 -14
- package/fesm2022/theseam-ui-common-dynamic-component-loader.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-dynamic.mjs +60 -48
- package/fesm2022/theseam-ui-common-dynamic.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-footer-bar.mjs +9 -15
- package/fesm2022/theseam-ui-common-footer-bar.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-form-field-error.mjs +60 -43
- package/fesm2022/theseam-ui-common-form-field-error.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-form-field.mjs +120 -74
- package/fesm2022/theseam-ui-common-form-field.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-framework.mjs +669 -543
- package/fesm2022/theseam-ui-common-framework.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-google-maps.mjs +206 -149
- package/fesm2022/theseam-ui-common-google-maps.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-graphql.mjs +252 -195
- package/fesm2022/theseam-ui-common-graphql.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-icon.mjs +125 -89
- package/fesm2022/theseam-ui-common-icon.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-layout.mjs +18 -26
- package/fesm2022/theseam-ui-common-layout.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-loading.mjs +19 -28
- package/fesm2022/theseam-ui-common-loading.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-menu.mjs +124 -95
- package/fesm2022/theseam-ui-common-menu.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-modal.mjs +177 -129
- package/fesm2022/theseam-ui-common-modal.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-models.mjs +3 -3
- package/fesm2022/theseam-ui-common-models.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-navigation-reload.mjs +13 -11
- package/fesm2022/theseam-ui-common-navigation-reload.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-popover.mjs +81 -88
- package/fesm2022/theseam-ui-common-popover.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-progress.mjs +15 -19
- package/fesm2022/theseam-ui-common-progress.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-rich-text.mjs +65 -52
- package/fesm2022/theseam-ui-common-rich-text.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-scrollbar.mjs +12 -9
- package/fesm2022/theseam-ui-common-scrollbar.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-services.mjs +41 -26
- package/fesm2022/theseam-ui-common-services.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-shared.mjs +123 -67
- package/fesm2022/theseam-ui-common-shared.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-storage.mjs +9 -6
- package/fesm2022/theseam-ui-common-storage.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-story-helpers.mjs +148 -86
- package/fesm2022/theseam-ui-common-story-helpers.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-tabbed.mjs +43 -39
- package/fesm2022/theseam-ui-common-tabbed.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-table-cell-type.mjs +34 -38
- package/fesm2022/theseam-ui-common-table-cell-type.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-table-cell-types.mjs +182 -144
- package/fesm2022/theseam-ui-common-table-cell-types.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-table.mjs +50 -39
- package/fesm2022/theseam-ui-common-table.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-tel-input.mjs +98 -63
- package/fesm2022/theseam-ui-common-tel-input.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-testing.mjs +13 -10
- package/fesm2022/theseam-ui-common-testing.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-tiled-select.mjs +54 -50
- package/fesm2022/theseam-ui-common-tiled-select.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-toggle-edit.mjs +41 -37
- package/fesm2022/theseam-ui-common-toggle-edit.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-toggle-group.mjs +30 -31
- package/fesm2022/theseam-ui-common-toggle-group.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-tooltip.mjs +225 -66
- package/fesm2022/theseam-ui-common-tooltip.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-unsaved-changes-dialog.mjs +14 -12
- package/fesm2022/theseam-ui-common-unsaved-changes-dialog.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-utils.mjs +113 -77
- package/fesm2022/theseam-ui-common-utils.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-validators.mjs +10 -9
- package/fesm2022/theseam-ui-common-validators.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-vertical-list-filter.mjs +39 -17
- package/fesm2022/theseam-ui-common-vertical-list-filter.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-viewers.mjs +79 -56
- package/fesm2022/theseam-ui-common-viewers.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-widget.mjs +288 -314
- package/fesm2022/theseam-ui-common-widget.mjs.map +1 -1
- package/framework/base-layout/base-layout.component.scss +9 -4
- package/framework/base-layout/styles/_variables.scss +4 -9
- package/framework/dashboard/dashboard-widgets/dashboard-widgets.component.scss +6 -4
- package/framework/index.d.ts +6 -6
- package/framework/nav/nav-item/nav-item.component.scss +7 -6
- package/framework/nav/styles/_themes/light/_variables.scss +21 -5
- package/framework/nav/styles/_themes/primary/_variables.scss +21 -5
- package/framework/side-nav/side-nav-item/side-nav-item.component.scss +5 -2
- package/framework/side-nav/styles/_themes/light/_variables.scss +5 -1
- package/framework/side-nav/styles/_themes/primary/_variables.scss +25 -5
- package/graphql/index.d.ts +5 -5
- package/modal/README.md +5 -5
- package/modal/index.d.ts +1 -1
- package/models/index.d.ts +1 -1
- package/package.json +59 -59
- package/popover/index.d.ts +0 -2
- package/progress/progress-circle/styles/_variables.scss +15 -3
- package/story-helpers/index.d.ts +11 -1
- package/styles/bootstrap/_bootstrap.scss +34 -34
- package/styles/bootstrap/_bs-styles.scss +4 -8
- package/styles/bootstrap/_bs-utilities.scss +4 -4
- package/styles/bootstrap/_bs-variables.scss +65 -70
- package/styles/common/_forms.scss +9 -10
- package/styles/common/_global.scss +0 -1
- package/styles/common/_hacks.scss +1 -1
- package/styles/common/_table.scss +0 -1
- package/styles/common/_text.scss +3 -1
- package/styles/theme.scss +1 -1
- package/styles/vendor/ng-select/_ng-select-bs4.scss +292 -294
- package/styles/vendor/ngx-datatable/_ngx-datatable.scss +63 -32
- package/styles/vendor/ngx-datatable/_themes/bootstrap/_variables.scss +37 -10
- package/styles/vendor/ngx-datatable/_themes/material/_variables.scss +3 -1
- package/styles/vendor/quill/_quill.scss +15 -9
- package/tel-input/README.md +27 -27
- package/utils/index.d.ts +3 -3
- package/viewers/index.d.ts +9 -2
- package/widget/_widget-theme.scss +1 -1
- package/widget/styles/_variables.scss +2 -2
- package/widget/widget/widget.component.scss +0 -2
- package/widget/widget-content-components/widget-tile/widget-tile.component.scss +1 -3
- package/widget/widget-footer/widget-footer.component.scss +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theseam-ui-common-shared.mjs","sources":["../../../projects/ui-common/shared/components/password-input-reveal/password-input-reveal.component.ts","../../../projects/ui-common/shared/directives/auto-focus.directive.ts","../../../projects/ui-common/shared/directives/click-outside.directive.ts","../../../projects/ui-common/shared/directives/disable-control.directive.ts","../../../projects/ui-common/shared/directives/elem-resized.directive.ts","../../../projects/ui-common/shared/directives/hover-class-toggle.directive.ts","../../../projects/ui-common/shared/directives/hover-class.directive.ts","../../../projects/ui-common/shared/directives/ng-select-extra.directive.ts","../../../projects/ui-common/shared/directives/ngx-quill-extra.directive.ts","../../../projects/ui-common/shared/pipes/mask-chars.pipe.ts","../../../projects/ui-common/shared/pipes/truncate.pipe.ts","../../../projects/ui-common/shared/shared.module.ts","../../../projects/ui-common/shared/theseam-ui-common-shared.ts"],"sourcesContent":["import { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion'\nimport { Component, Input } from '@angular/core'\n\nimport { FontAwesomeModule } from '@fortawesome/angular-fontawesome'\nimport { faEye, faEyeSlash } from '@fortawesome/free-regular-svg-icons'\n\n@Component({\n selector: 'seam-password-input-reveal',\n template: `\n <fa-icon [icon]=\"passwordVisible ? faEyeSlash : faEye\" class=\"password-reveal-icon\" (click)=\"revealPassword()\"></fa-icon>\n `,\n styles: [`\n :host {\n display: flex;\n align-items: center;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n width: 30px;\n transform: translateZ(0);\n z-index: 50;\n }\n\n :host fa-icon {\n opacity: 1;\n color: #bababa;\n /* margin-top: 3px; */ /* Not needed now? */\n cursor: pointer;\n }\n\n :host fa-icon ::ng-deep .svg-inline--fa {\n vertical-align: middle;\n }\n `],\n imports: [\n FontAwesomeModule,\n ],\n})\nexport class TheSeamPasswordInputRevealComponent {\n static ngAcceptInputType_passwordVisible: BooleanInput\n\n readonly faEye = faEye\n readonly faEyeSlash = faEyeSlash\n\n @Input()\n get inputRef(): HTMLInputElement | undefined | null { return this._passwordInput }\n set inputRef(value: HTMLInputElement | undefined | null) {\n this._passwordInput = value\n this.updateRevealState()\n if (this._passwordInput) {\n this._passwordInput.style.paddingRight = '40px'\n this._passwordInput.classList.add('no-native-eye')\n }\n }\n private _passwordInput: HTMLInputElement | undefined | null\n\n @Input()\n get passwordVisible() { return this._passwordVisible }\n set passwordVisible(value: boolean) {\n this._passwordVisible = coerceBooleanProperty(value)\n this.updateRevealState()\n }\n public _passwordVisible = false\n\n public updateRevealState(): void {\n if (this._passwordInput) {\n this._passwordInput.type = this.passwordVisible ? 'text' : 'password'\n }\n }\n\n public revealPassword(): void {\n this.passwordVisible = !this.passwordVisible\n }\n\n}\n","import { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion'\nimport { Directive, ElementRef, inject, Input, OnInit } from '@angular/core'\n\nimport { getClosestModal, Modal, ModalRef } from '@theseam/ui-common/modal'\n\n/**\n * Directive that will focus the element when initialized.\n *\n * If the element is inside a modal, it will wait until the modal is opened before focusing.\n *\n * If the element will be initialized multiple times or while a form is being filled out\n * don't use this directive.\n *\n * Usage:\n * ```html\n * <input type=\"text\" seamAutoFocus />\n * ```\n */\n@Directive({\n selector: '[seamAutoFocus]',\n exportAs: 'seamAutoFocus',\n})\nexport class TheSeamAutoFocusDirective implements OnInit {\n static ngAcceptInputType_seamAutoFocus: BooleanInput\n\n private readonly _elementRef = inject(ElementRef<HTMLElement>)\n private readonly _modal = inject(Modal, { optional: true })\n private readonly _modalRef = inject(ModalRef, { optional: true })\n\n private _focus = true\n\n public modalRef: ModalRef<any> | undefined | null = this._modalRef\n\n @Input()\n set seamAutoFocus(condition: boolean) {\n this._focus = coerceBooleanProperty(condition) !== false\n }\n\n ngOnInit() {\n if (!this.modalRef && this._modal) {\n // When this directive is included in a dialog via TemplateRef (rather than being\n // in a Component), the DialogRef isn't available via injection because embedded\n // views cannot be given a custom injector. Instead, we look up the DialogRef by\n // ID. This must occur in `onInit`, as the ID binding for the dialog container won't\n // be resolved at constructor time.\n this.modalRef = getClosestModal(this._elementRef, this._modal.openDialogs)\n }\n\n if (!this.modalRef) {\n if (this._focus) {\n setTimeout(() => { this.focus() })\n }\n } else {\n this.modalRef.afterOpened().subscribe(() => {\n setTimeout(() => { this.focus() })\n })\n }\n }\n\n public focus() {\n this._elementRef.nativeElement.focus()\n }\n}\n","import { Directive, ElementRef, EventEmitter, HostListener, inject, Input, Output } from '@angular/core'\n\n@Directive({\n selector: '[seamClickOutside]',\n exportAs: 'seamClickOutside',\n})\nexport class TheSeamClickOutsideDirective {\n\n private readonly _elementRef = inject(ElementRef<HTMLElement>)\n\n @Input()\n get seamClickOutsideActive(): boolean {\n return this._active\n }\n set seamClickOutsideActive(value: boolean) {\n if (this._active === value) { return }\n\n if (value) {\n // `setTimeout` is used to avoid the click event triggering when the value\n // changes if the value was changed with a click.\n setTimeout(() => { this._active = value })\n } else {\n this._active = value\n }\n }\n private _active = true\n\n @Output() seamClickOutside = new EventEmitter<MouseEvent>()\n\n // NOTE: This should probably be changed from a `HostListener` to allow the\n // subscription to be unsubscribed.\n @HostListener('document:click', ['$event'])\n public onDocumentClick(event: MouseEvent): void {\n if (this._active) {\n const targetElement = event.target as HTMLElement\n // Check if the click was outside the element\n if (targetElement && !this._elementRef.nativeElement.contains(targetElement)) {\n this.seamClickOutside.emit(event)\n }\n }\n }\n\n}\n","import { Directive, inject, Input } from '@angular/core'\nimport { NgControl } from '@angular/forms'\n\n// Source: https://netbasal.com/disabling-form-controls-when-working-with-reactive-forms-in-angular-549dd7b42110\n\n@Directive({\n selector: '[seamDisableControl]',\n exportAs: 'seamDisableControl',\n})\nexport class TheSeamDisableControlDirective {\n\n private readonly _ngControl = inject(NgControl)\n\n @Input() set seamDisableControl(condition: boolean) {\n const action = condition ? 'disable' : 'enable'\n const control = this._ngControl.control\n if (control) {\n control[action]()\n }\n }\n\n}\n","import { AfterViewInit, Directive, ElementRef, EventEmitter, inject, OnDestroy, Output } from '@angular/core'\n\nimport { ResizeSensor } from 'css-element-queries'\n\nexport interface TheSeamElementResizedEvent {\n element: HTMLElement\n size: { width: number, height: number }\n}\n\n@Directive({\n selector: '[seamElemResized]',\n exportAs: 'seamElemResized',\n})\nexport class TheSeamElemResizedDirective implements OnDestroy, AfterViewInit {\n\n private readonly _elementRef = inject(ElementRef<HTMLElement>)\n\n @Output() seamElemResized = new EventEmitter<TheSeamElementResizedEvent>()\n\n sensor?: ResizeSensor\n\n ngAfterViewInit() {\n this.sensor = new ResizeSensor(this._elementRef.nativeElement, event => {\n this.seamElemResized.emit({ element: this._elementRef.nativeElement, size: event })\n })\n }\n\n ngOnDestroy() {\n this.sensor?.detach()\n }\n\n}\n","import { Directive, ElementRef, HostListener, inject, Input } from '@angular/core'\n\ndeclare type _PointerEvent = PointerEvent | PointerEvent\n\nexport interface TheSeamHoverClassToggleRecord {\n default: string\n hover: string\n}\n\n/**\n * Don't use this directive unless there is a reason not to use css `:hover`,\n * because the accuracy of detecting the hover is not as good. If an element is\n * moved while the mouse is idle the hover class will remain until the mouse\n * enters and leaves again.\n *\n * I have tried multiple ways of detecting the mouse no longer hovering, but all\n * have introduced a slight performance issue that just builds for each element\n * containing this directive.\n */\n@Directive({\n selector: '[seamHoverClassToggle]',\n exportAs: 'seamHoverClassToggle',\n})\nexport class TheSeamHoverClassToggleDirective {\n\n private readonly _elementRef = inject(ElementRef<HTMLElement>)\n\n private _hovered = false\n private _defaultClasses: string[] = []\n private _hoverClasses: string[] = []\n\n @HostListener('mouseover', ['$event']) onMouseOver($event: MouseEvent) {\n this._setHovered(true)\n }\n\n @HostListener('mouseout', ['$event']) onMouseOut($event: MouseEvent) {\n this._setHovered(false)\n }\n\n @HostListener('pointerover', ['$event']) onPointerOver($event: _PointerEvent) {\n this._setHovered(true)\n }\n\n @HostListener('pointerout', ['$event']) onPointerOut($event: _PointerEvent) {\n this._setHovered(false)\n }\n\n @Input()\n set seamHoverClassToggle(value: TheSeamHoverClassToggleRecord) {\n if (value) {\n if (value.default) {\n this._defaultClasses = value.default.split(' ').filter(c => c.length > 0)\n }\n if (value.hover) {\n this._hoverClasses = value.hover.split(' ').filter(c => c.length > 0)\n }\n }\n\n this._hoverClasses = this._hoverClasses.filter(v => !this._defaultClasses.find(_v => _v === v))\n\n this._update()\n }\n\n private _update(): void {\n for (const c of this._defaultClasses) {\n this._hovered ? this._removeClass(c) : this._addClass(c)\n }\n for (const c of this._hoverClasses) {\n this._hovered ? this._addClass(c) : this._removeClass(c)\n }\n }\n\n private _setHovered(hovered: boolean) {\n const doUpdate = this._hovered !== hovered\n this._hovered = hovered\n if (doUpdate) {\n this._update()\n }\n }\n\n private _addClass(c: string): void {\n this._elementRef.nativeElement.classList.add(c)\n }\n\n public _removeClass(c: string): void {\n this._elementRef.nativeElement.classList.remove(c)\n }\n\n}\n","import { Directive, ElementRef, HostListener, inject, Input } from '@angular/core'\n\ndeclare type _PointerEvent = PointerEvent | PointerEvent\n\n/**\n * Changes a css class on mouse pointer hover.\n *\n * NOTE: Only use this if css `:hover` can't be used, because css is more\n * accurate and better performing.\n *\n * NOTE: Don't use this directive unless there is a reason not to use css\n * `:hover`, because the accuracy of detecting the hover is not as good. If an\n * element is moved while the mouse is idle the hover class will remain until\n * the mouse enters and leaves again.\n *\n * NOTE: I have tried multiple ways of detecting the mouse no longer hovering,\n * but all have introduced a slight performance issue that just builds for each\n * element containing this directive.\n */\n@Directive({\n selector: '[seamHoverClass]',\n exportAs: 'seamHoverClass',\n})\nexport class TheSeamHoverClassDirective {\n\n private readonly _elementRef = inject(ElementRef<HTMLElement>)\n\n private _hovered = false\n private _classes: string[] = []\n\n @HostListener('mouseover', ['$event']) onMouseOver($event: MouseEvent) {\n this._setHovered(true)\n }\n\n @HostListener('mouseout', ['$event']) onMouseOut($event: MouseEvent) {\n this._setHovered(false)\n }\n\n @HostListener('pointerover', ['$event']) onPointerOver($event: _PointerEvent) {\n this._setHovered(true)\n }\n\n @HostListener('pointerout', ['$event']) onPointerOut($event: _PointerEvent) {\n this._setHovered(false)\n }\n\n @Input()\n set seamHoverClass(classList: string) {\n const newClasses = classList.split(' ').filter(c => c.length > 0)\n for (const c of this._classes) {\n if (newClasses.indexOf(c) !== 0) {\n this._removeClass(c)\n }\n }\n this._classes = newClasses\n this._update()\n }\n\n private _update(): void {\n for (const c of this._classes) {\n this._hovered ? this._addClass(c) : this._removeClass(c)\n }\n }\n\n private _setHovered(hovered: boolean) {\n const doUpdate = this._hovered !== hovered\n this._hovered = hovered\n if (doUpdate) {\n this._update()\n }\n }\n\n private _addClass(c: string): void {\n this._elementRef.nativeElement.classList.add(c)\n }\n\n public _removeClass(c: string): void {\n this._elementRef.nativeElement.classList.remove(c)\n }\n\n}\n","import {\n AfterViewChecked,\n Directive,\n ElementRef,\n EventEmitter,\n HostBinding,\n HostListener,\n inject,\n NgZone,\n OnDestroy,\n OnInit,\n} from '@angular/core'\nimport { NgControl } from '@angular/forms'\nimport { Subject, Subscription } from 'rxjs'\nimport { filter, takeUntil } from 'rxjs/operators'\n\nimport { NgOption, NgSelectComponent } from '@ng-select/ng-select'\n// import { ResizeSensor } from 'css-element-queries'\n\n// import { TheSeamElementResizedEvent } from './elem-resized.directive'\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'ng-select',\n exportAs: 'seamNgSelectExtra',\n})\nexport class TheSeamNgSelectExtraDirective implements OnInit, AfterViewChecked, OnDestroy {\n\n private readonly _elementRef = inject(ElementRef<HTMLElement>)\n private readonly _ngSelect = inject(NgSelectComponent)\n private readonly _ngControl = inject<NgControl | null>(NgControl, { optional: true, self: true })\n\n /**\n * Set the tab index to `-1` to allow the root element of the ng-select\n * component to receive `focus` event from javascript, but not get focused by\n * keyboard navigation.\n */\n @HostBinding('attr.tabIndex')\n get _tabIndex() { return this._ngSelect.disabled() ? undefined : -1 }\n\n /**\n * Listening for focus event on root of component to allow javascript\n * `focus()` function to trigger the components focus.\n */\n @HostListener('focus', ['$event']) onFocus($event: FocusEvent) {\n const target = $event.target as HTMLElement\n if (target === this._elementRef.nativeElement && !this._ngSelect.disabled()) {\n this._ngSelect.focus()\n }\n }\n\n @HostBinding('class.is-invalid') get _isInvalid() {\n return this._ngControl ? this._ngControl.invalid && (this._ngControl.dirty || this._ngControl.touched) : false\n }\n\n @HostBinding('class.ng-empty-string-value') get _isEmptyStringValue() {\n return this._ngControl ? this._ngControl.value === '' : false\n }\n\n ngOnInit() {\n // this._ngSelect.focusEvent\n // .subscribe(v => this._enableKeyPressWorkaround())\n\n // this._ngSelect.blurEvent\n // .subscribe(v => this._disableKeyPressWorkaround())\n\n window.addEventListener('scroll', this._onScroll, true)\n\n // When the input is allowed to change its height the position doesn't update itself.\n // this._resizedEvent.pipe(\n // auditTime(30)\n // ).subscribe(event => {\n // if (this._elementRef && this._elementRef.nativeElement) {\n // if (this._elementRef.nativeElement.classList.contains('ng-select-value-grow-h')) {\n // if (this._ngSelect.isOpen && this._ngSelect.dropdownPanel) {\n // this._ngSelect.dropdownPanel.updateDropdownPosition()\n // }\n // } else {\n // this._elementRef.nativeElement.classList.remove('ng-select-value-grow-h')\n // }\n // }\n // })\n\n // this._patch_ngSelect_open()\n }\n\n ngOnDestroy() {\n // this._resizeSensor?.detach()\n\n window.removeEventListener('scroll', this._onScroll, true)\n\n // this._ngUnsubscribe.next(undefined)\n // this._ngUnsubscribe.complete()\n }\n\n ngAfterViewChecked() {\n // const dropPanel = this._ngSelect.dropdownPanel() as any\n // if (dropPanel) {\n // if (this._checkMarked) {\n // if (dropPanel && this._markedItem !== null) {\n // if (this._markedItem.index !== dropPanel.markedItem.index) {\n // dropPanel.scrollTo(dropPanel.markedItem)\n // }\n // }\n // }\n // }\n // this._checkMarked = false\n\n // this._resizeSensor = new ResizeSensor(this._elementRef.nativeElement, event => {\n // this._resizedEvent.emit({ element: this._elementRef.nativeElement, size: event })\n // })\n }\n\n private _onScroll = (event: any) => {\n if (this._ngSelect && this._ngSelect.isOpen()) {\n const isScrollingInScrollHost = (event.target.className as string).indexOf('ng-dropdown-panel-items') !== -1\n const isInSensor = (event.target.className as string).indexOf('resize-sensor-shrink') !== -1 ||\n (event.target.className as string).indexOf('os-resize-observer-host') !== -1\n if (isScrollingInScrollHost || isInSensor) { return }\n this._ngSelect.close()\n }\n }\n\n /**\n * Temp fix for: https://github.com/ng-select/ng-select/issues/1122\n */\n // private _patch_ngSelect_open() {\n // const original = this._ngSelect.open\n // const _self = this\n // this._ngSelect.open = function() {\n // original.apply(this, arguments)\n // _self._patch_ngSelectDropdownPanel_updateDropdownPosition()\n // }\n // }\n\n /** Should ONLY be called by `_patch_ngSelect_open`. */\n // private _patch_ngSelectDropdownPanel_updateDropdownPosition() {\n // if (!this._ngSelect.dropdownPanel) { return }\n // const drop: any = this._ngSelect.dropdownPanel\n // // Only needed once, to update the position before the timeout in\n // // `updateDropdownPosition()`. So, using this variable to check if I already called\n // // `_updateAppendedDropdownPosition()`.\n // if (!drop.__libPatched) {\n // drop.__libPatched = 'patched'\n // const original = drop.updateDropdownPosition\n // const _self = this\n // drop.updateDropdownPosition = function() {\n // original.apply(this, arguments)\n // if (!!_self._ngSelect.appendTo) {\n // drop._updateAppendedDropdownPosition()\n // }\n // }\n // }\n // }\n\n // private _enableKeyPressWorkaround() {\n // if (this._keyPressWorkaroundSub) { return }\n // const _ngSelect = this._ngSelect as any\n\n // this._keyPressWorkaroundSub = _ngSelect._keyPress$\n // .pipe(takeUntil(this._ngUnsubscribe))\n // .pipe(filter(() => !this._ngSelect.searchable()))\n // .subscribe(() => {\n // this._ngZone.runOutsideAngular(() => {\n // window.requestAnimationFrame(() => {\n // if (this._ngSelect.dropdownPanel()) {\n // this._markedItem = this._ngSelect.dropdownPanel().markedItem()\n // }\n // this._checkMarked = true\n // })\n // })\n // })\n // }\n\n // private _disableKeyPressWorkaround() {\n // if (this._keyPressWorkaroundSub) {\n // this._keyPressWorkaroundSub.unsubscribe()\n // this._keyPressWorkaroundSub = null\n // }\n // }\n\n}\n","import { coerceNumberProperty } from '@angular/cdk/coercion'\nimport { AfterViewInit, Directive, ElementRef, HostBinding, inject, Input, OnDestroy } from '@angular/core'\nimport { fromEvent, Subject } from 'rxjs'\nimport { filter, takeUntil, tap } from 'rxjs/operators'\n\nimport { QuillEditorComponent } from 'ngx-quill'\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'quill-editor',\n exportAs: 'seamNgxQuillExtra',\n})\nexport class TheSeamNgxQuillExtraDirective implements OnDestroy, AfterViewInit {\n\n private readonly _elementRef: ElementRef<HTMLElement> = inject(ElementRef<HTMLElement>)\n private readonly _quillEditor: QuillEditorComponent = inject(QuillEditorComponent)\n\n private readonly _ngUnsubscribe = new Subject<void>()\n\n private _tabIndex = -1\n\n /**\n * Set the tab index to `-1` to allow the root element of the\n * component to receive `focus` event from javascript, but not get focused by\n * keyboard navigation.\n */\n @Input()\n set tabIndex(value: number) { this._tabIndex = coerceNumberProperty(value) }\n get tabIndex(): number { return this._tabIndex }\n\n @HostBinding('attr.tabindex')\n get _attrTabIndex() { return this._quillEditor.disabled ? -1 : (this.tabIndex || 0) }\n\n ngOnDestroy() {\n this._ngUnsubscribe.next(undefined)\n this._ngUnsubscribe.complete()\n }\n\n ngAfterViewInit() {\n const parent = this._getParentElementForLabelFocusIssue()\n if (parent) {\n // NOTE: This is a hack to avoid an issue letting a label with \"for\"\n // attribute focus the control.\n fromEvent(parent, 'click').pipe(\n takeUntil(this._ngUnsubscribe),\n filter(e => (e.target as HTMLElement)?.getAttribute('for') === this._elementRef.nativeElement.id),\n tap(() => this._quillEditor.quillEditor.focus())\n ).subscribe()\n }\n }\n\n private _getParentElementForLabelFocusIssue(): HTMLElement | undefined {\n const findElem = (elem: HTMLElement): any => {\n if (elem.nodeName.toLowerCase() === 'seam-form-field') {\n return elem\n }\n\n if (elem.parentElement) {\n return findElem(elem.parentElement)\n }\n\n return elem\n }\n\n return findElem(this._elementRef.nativeElement)\n }\n\n}\n","import { Pipe, PipeTransform } from '@angular/core'\n\nimport { padEnd, padStart } from '@theseam/ui-common/utils'\n\n@Pipe({\n name: 'maskChars',\n})\nexport class TheSeamMaskCharsPipe implements PipeTransform {\n\n transform(value: string, replacementChar: string = '*', ignoreCount: number = 0, ignoreFrom: 'left' | 'right' = 'right'): string {\n if (ignoreFrom === 'right') {\n const s = value || ''\n return padStart(s.substring(s.length - ignoreCount, s.length), s.length, replacementChar)\n } else if (ignoreFrom === 'left') {\n const s = value || ''\n return padEnd(s.substring(0, ignoreCount), s.length, replacementChar)\n }\n\n return value\n }\n\n}\n","import { Pipe, PipeTransform } from '@angular/core'\n\n@Pipe({\n name: 'truncate',\n})\nexport class TheSeamTruncatePipe implements PipeTransform {\n\n transform(value: string, length: number = 30, appendEllipsis: boolean = true): string {\n let val = value\n\n if (value && typeof value === 'string' && value.length > length) {\n val = value.substr(0, length)\n if (appendEllipsis) {\n val += '...'\n }\n }\n\n return val\n }\n\n}\n","import { NgModule } from '@angular/core'\n\nimport { TheSeamAutoFocusDirective } from './directives/auto-focus.directive'\nimport { TheSeamClickOutsideDirective } from './directives/click-outside.directive'\nimport { TheSeamDisableControlDirective } from './directives/disable-control.directive'\nimport { TheSeamElemResizedDirective } from './directives/elem-resized.directive'\nimport { TheSeamHoverClassToggleDirective } from './directives/hover-class-toggle.directive'\nimport { TheSeamHoverClassDirective } from './directives/hover-class.directive'\nimport { TheSeamNgSelectExtraDirective } from './directives/ng-select-extra.directive'\nimport { TheSeamNgxQuillExtraDirective } from './directives/ngx-quill-extra.directive'\n\nimport { TheSeamMaskCharsPipe } from './pipes/mask-chars.pipe'\nimport { TheSeamTruncatePipe } from './pipes/truncate.pipe'\n\nimport { TheSeamPasswordInputRevealComponent } from './components/password-input-reveal/password-input-reveal.component'\n\n@NgModule({\n imports: [\n TheSeamAutoFocusDirective,\n TheSeamElemResizedDirective,\n TheSeamHoverClassToggleDirective,\n TheSeamNgSelectExtraDirective,\n TheSeamHoverClassDirective,\n TheSeamClickOutsideDirective,\n TheSeamDisableControlDirective,\n TheSeamNgxQuillExtraDirective,\n TheSeamMaskCharsPipe,\n TheSeamTruncatePipe,\n TheSeamPasswordInputRevealComponent,\n ],\n exports: [\n TheSeamAutoFocusDirective,\n TheSeamElemResizedDirective,\n TheSeamPasswordInputRevealComponent,\n TheSeamNgSelectExtraDirective,\n TheSeamHoverClassDirective,\n TheSeamHoverClassToggleDirective,\n TheSeamClickOutsideDirective,\n TheSeamDisableControlDirective,\n TheSeamMaskCharsPipe,\n TheSeamTruncatePipe,\n TheSeamNgxQuillExtraDirective,\n ]\n})\nexport class TheSeamSharedModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;MAuCa,mCAAmC,CAAA;IAC9C,OAAO,iCAAiC;IAE/B,KAAK,GAAG,KAAK;IACb,UAAU,GAAG,UAAU;IAEhC,IACI,QAAQ,KAA0C,OAAO,IAAI,CAAC,cAAc,CAAA,CAAC;IACjF,IAAI,QAAQ,CA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AAmB,YAhB5B,mCAAmC,CAAA,EAAA,CAAA;;2FAgB1B,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBA5B/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,yBAAyB;wBACzB,2BAA2B;wBAC3B,gCAAgC;wBAChC,6BAA6B;wBAC7B,0BAA0B;wBAC1B,4BAA4B;wBAC5B,8BAA8B;wBAC9B,6BAA6B;wBAC7B,oBAAoB;wBACpB,mBAAmB;wBACnB,mCAAmC;AACpC,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,yBAAyB;wBACzB,2BAA2B;wBAC3B,mCAAmC;wBACnC,6BAA6B;wBAC7B,0BAA0B;wBAC1B,gCAAgC;wBAChC,4BAA4B;wBAC5B,8BAA8B;wBAC9B,oBAAoB;wBACpB,mBAAmB;wBACnB,6BAA6B;AAC9B;AACF,iBAAA;;;AC3CD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"theseam-ui-common-shared.mjs","sources":["../../../projects/ui-common/shared/components/password-input-reveal/password-input-reveal.component.ts","../../../projects/ui-common/shared/directives/auto-focus.directive.ts","../../../projects/ui-common/shared/directives/click-outside.directive.ts","../../../projects/ui-common/shared/directives/disable-control.directive.ts","../../../projects/ui-common/shared/directives/elem-resized.directive.ts","../../../projects/ui-common/shared/directives/hover-class-toggle.directive.ts","../../../projects/ui-common/shared/directives/hover-class.directive.ts","../../../projects/ui-common/shared/directives/ng-select-extra.directive.ts","../../../projects/ui-common/shared/directives/ngx-quill-extra.directive.ts","../../../projects/ui-common/shared/pipes/mask-chars.pipe.ts","../../../projects/ui-common/shared/pipes/truncate.pipe.ts","../../../projects/ui-common/shared/shared.module.ts","../../../projects/ui-common/shared/theseam-ui-common-shared.ts"],"sourcesContent":["import { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion'\nimport { Component, Input } from '@angular/core'\n\nimport { FontAwesomeModule } from '@fortawesome/angular-fontawesome'\nimport { faEye, faEyeSlash } from '@fortawesome/free-regular-svg-icons'\n\n@Component({\n selector: 'seam-password-input-reveal',\n template: `\n <fa-icon\n [icon]=\"passwordVisible ? faEyeSlash : faEye\"\n class=\"password-reveal-icon\"\n (click)=\"revealPassword()\"\n ></fa-icon>\n `,\n styles: [\n `\n :host {\n display: flex;\n align-items: center;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n width: 30px;\n transform: translateZ(0);\n z-index: 50;\n }\n\n :host fa-icon {\n opacity: 1;\n color: #bababa;\n /* margin-top: 3px; */ /* Not needed now? */\n cursor: pointer;\n }\n\n :host fa-icon ::ng-deep .svg-inline--fa {\n vertical-align: middle;\n }\n `,\n ],\n imports: [FontAwesomeModule],\n})\nexport class TheSeamPasswordInputRevealComponent {\n static ngAcceptInputType_passwordVisible: BooleanInput\n\n readonly faEye = faEye\n readonly faEyeSlash = faEyeSlash\n\n @Input()\n get inputRef(): HTMLInputElement | undefined | null {\n return this._passwordInput\n }\n set inputRef(value: HTMLInputElement | undefined | null) {\n this._passwordInput = value\n this.updateRevealState()\n if (this._passwordInput) {\n this._passwordInput.style.paddingRight = '40px'\n this._passwordInput.classList.add('no-native-eye')\n }\n }\n private _passwordInput: HTMLInputElement | undefined | null\n\n @Input()\n get passwordVisible() {\n return this._passwordVisible\n }\n set passwordVisible(value: boolean) {\n this._passwordVisible = coerceBooleanProperty(value)\n this.updateRevealState()\n }\n public _passwordVisible = false\n\n public updateRevealState(): void {\n if (this._passwordInput) {\n this._passwordInput.type = this.passwordVisible ? 'text' : 'password'\n }\n }\n\n public revealPassword(): void {\n this.passwordVisible = !this.passwordVisible\n }\n}\n","import { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion'\nimport { Directive, ElementRef, inject, Input, OnInit } from '@angular/core'\n\nimport { getClosestModal, Modal, ModalRef } from '@theseam/ui-common/modal'\n\n/**\n * Directive that will focus the element when initialized.\n *\n * If the element is inside a modal, it will wait until the modal is opened before focusing.\n *\n * If the element will be initialized multiple times or while a form is being filled out\n * don't use this directive.\n *\n * Usage:\n * ```html\n * <input type=\"text\" seamAutoFocus />\n * ```\n */\n@Directive({\n selector: '[seamAutoFocus]',\n exportAs: 'seamAutoFocus',\n})\nexport class TheSeamAutoFocusDirective implements OnInit {\n static ngAcceptInputType_seamAutoFocus: BooleanInput\n\n private readonly _elementRef = inject(ElementRef<HTMLElement>)\n private readonly _modal = inject(Modal, { optional: true })\n private readonly _modalRef = inject(ModalRef, { optional: true })\n\n private _focus = true\n\n public modalRef: ModalRef<any> | undefined | null = this._modalRef\n\n @Input()\n set seamAutoFocus(condition: boolean) {\n this._focus = coerceBooleanProperty(condition) !== false\n }\n\n ngOnInit() {\n if (!this.modalRef && this._modal) {\n // When this directive is included in a dialog via TemplateRef (rather than being\n // in a Component), the DialogRef isn't available via injection because embedded\n // views cannot be given a custom injector. Instead, we look up the DialogRef by\n // ID. This must occur in `onInit`, as the ID binding for the dialog container won't\n // be resolved at constructor time.\n this.modalRef = getClosestModal(this._elementRef, this._modal.openDialogs)\n }\n\n if (!this.modalRef) {\n if (this._focus) {\n setTimeout(() => {\n this.focus()\n })\n }\n } else {\n this.modalRef.afterOpened().subscribe(() => {\n setTimeout(() => {\n this.focus()\n })\n })\n }\n }\n\n public focus() {\n this._elementRef.nativeElement.focus()\n }\n}\n","import {\n Directive,\n ElementRef,\n EventEmitter,\n HostListener,\n inject,\n Input,\n Output,\n} from '@angular/core'\n\n@Directive({\n selector: '[seamClickOutside]',\n exportAs: 'seamClickOutside',\n})\nexport class TheSeamClickOutsideDirective {\n private readonly _elementRef = inject(ElementRef<HTMLElement>)\n\n @Input()\n get seamClickOutsideActive(): boolean {\n return this._active\n }\n set seamClickOutsideActive(value: boolean) {\n if (this._active === value) {\n return\n }\n\n if (value) {\n // `setTimeout` is used to avoid the click event triggering when the value\n // changes if the value was changed with a click.\n setTimeout(() => {\n this._active = value\n })\n } else {\n this._active = value\n }\n }\n private _active = true\n\n @Output() seamClickOutside = new EventEmitter<MouseEvent>()\n\n // NOTE: This should probably be changed from a `HostListener` to allow the\n // subscription to be unsubscribed.\n @HostListener('document:click', ['$event'])\n public onDocumentClick(event: MouseEvent): void {\n if (this._active) {\n const targetElement = event.target as HTMLElement\n // Check if the click was outside the element\n if (\n targetElement &&\n !this._elementRef.nativeElement.contains(targetElement)\n ) {\n this.seamClickOutside.emit(event)\n }\n }\n }\n}\n","import { Directive, inject, Input } from '@angular/core'\nimport { NgControl } from '@angular/forms'\n\n// Source: https://netbasal.com/disabling-form-controls-when-working-with-reactive-forms-in-angular-549dd7b42110\n\n@Directive({\n selector: '[seamDisableControl]',\n exportAs: 'seamDisableControl',\n})\nexport class TheSeamDisableControlDirective {\n private readonly _ngControl = inject(NgControl)\n\n @Input() set seamDisableControl(condition: boolean) {\n const action = condition ? 'disable' : 'enable'\n const control = this._ngControl.control\n if (control) {\n control[action]()\n }\n }\n}\n","import {\n AfterViewInit,\n Directive,\n ElementRef,\n EventEmitter,\n inject,\n OnDestroy,\n Output,\n} from '@angular/core'\n\nimport { ResizeSensor } from 'css-element-queries'\n\nexport interface TheSeamElementResizedEvent {\n element: HTMLElement\n size: { width: number; height: number }\n}\n\n@Directive({\n selector: '[seamElemResized]',\n exportAs: 'seamElemResized',\n})\nexport class TheSeamElemResizedDirective implements OnDestroy, AfterViewInit {\n private readonly _elementRef = inject(ElementRef<HTMLElement>)\n\n @Output() seamElemResized = new EventEmitter<TheSeamElementResizedEvent>()\n\n sensor?: ResizeSensor\n\n ngAfterViewInit() {\n this.sensor = new ResizeSensor(this._elementRef.nativeElement, (event) => {\n this.seamElemResized.emit({\n element: this._elementRef.nativeElement,\n size: event,\n })\n })\n }\n\n ngOnDestroy() {\n this.sensor?.detach()\n }\n}\n","import {\n Directive,\n ElementRef,\n HostListener,\n inject,\n Input,\n} from '@angular/core'\n\ndeclare type _PointerEvent = PointerEvent | PointerEvent\n\nexport interface TheSeamHoverClassToggleRecord {\n default: string\n hover: string\n}\n\n/**\n * Don't use this directive unless there is a reason not to use css `:hover`,\n * because the accuracy of detecting the hover is not as good. If an element is\n * moved while the mouse is idle the hover class will remain until the mouse\n * enters and leaves again.\n *\n * I have tried multiple ways of detecting the mouse no longer hovering, but all\n * have introduced a slight performance issue that just builds for each element\n * containing this directive.\n */\n@Directive({\n selector: '[seamHoverClassToggle]',\n exportAs: 'seamHoverClassToggle',\n})\nexport class TheSeamHoverClassToggleDirective {\n private readonly _elementRef = inject(ElementRef<HTMLElement>)\n\n private _hovered = false\n private _defaultClasses: string[] = []\n private _hoverClasses: string[] = []\n\n @HostListener('mouseover', ['$event']) onMouseOver($event: MouseEvent) {\n this._setHovered(true)\n }\n\n @HostListener('mouseout', ['$event']) onMouseOut($event: MouseEvent) {\n this._setHovered(false)\n }\n\n @HostListener('pointerover', ['$event']) onPointerOver(\n $event: _PointerEvent,\n ) {\n this._setHovered(true)\n }\n\n @HostListener('pointerout', ['$event']) onPointerOut($event: _PointerEvent) {\n this._setHovered(false)\n }\n\n @Input()\n set seamHoverClassToggle(value: TheSeamHoverClassToggleRecord) {\n if (value) {\n if (value.default) {\n this._defaultClasses = value.default\n .split(' ')\n .filter((c) => c.length > 0)\n }\n if (value.hover) {\n this._hoverClasses = value.hover.split(' ').filter((c) => c.length > 0)\n }\n }\n\n this._hoverClasses = this._hoverClasses.filter(\n (v) => !this._defaultClasses.find((_v) => _v === v),\n )\n\n this._update()\n }\n\n private _update(): void {\n for (const c of this._defaultClasses) {\n if (this._hovered) {\n this._removeClass(c)\n } else {\n this._addClass(c)\n }\n }\n for (const c of this._hoverClasses) {\n if (this._hovered) {\n this._addClass(c)\n } else {\n this._removeClass(c)\n }\n }\n }\n\n private _setHovered(hovered: boolean) {\n const doUpdate = this._hovered !== hovered\n this._hovered = hovered\n if (doUpdate) {\n this._update()\n }\n }\n\n private _addClass(c: string): void {\n this._elementRef.nativeElement.classList.add(c)\n }\n\n public _removeClass(c: string): void {\n this._elementRef.nativeElement.classList.remove(c)\n }\n}\n","import {\n Directive,\n ElementRef,\n HostListener,\n inject,\n Input,\n} from '@angular/core'\n\ndeclare type _PointerEvent = PointerEvent | PointerEvent\n\n/**\n * Changes a css class on mouse pointer hover.\n *\n * NOTE: Only use this if css `:hover` can't be used, because css is more\n * accurate and better performing.\n *\n * NOTE: Don't use this directive unless there is a reason not to use css\n * `:hover`, because the accuracy of detecting the hover is not as good. If an\n * element is moved while the mouse is idle the hover class will remain until\n * the mouse enters and leaves again.\n *\n * NOTE: I have tried multiple ways of detecting the mouse no longer hovering,\n * but all have introduced a slight performance issue that just builds for each\n * element containing this directive.\n */\n@Directive({\n selector: '[seamHoverClass]',\n exportAs: 'seamHoverClass',\n})\nexport class TheSeamHoverClassDirective {\n private readonly _elementRef = inject(ElementRef<HTMLElement>)\n\n private _hovered = false\n private _classes: string[] = []\n\n @HostListener('mouseover', ['$event']) onMouseOver($event: MouseEvent) {\n this._setHovered(true)\n }\n\n @HostListener('mouseout', ['$event']) onMouseOut($event: MouseEvent) {\n this._setHovered(false)\n }\n\n @HostListener('pointerover', ['$event']) onPointerOver(\n $event: _PointerEvent,\n ) {\n this._setHovered(true)\n }\n\n @HostListener('pointerout', ['$event']) onPointerOut($event: _PointerEvent) {\n this._setHovered(false)\n }\n\n @Input()\n set seamHoverClass(classList: string) {\n const newClasses = classList.split(' ').filter((c) => c.length > 0)\n for (const c of this._classes) {\n if (newClasses.indexOf(c) !== 0) {\n this._removeClass(c)\n }\n }\n this._classes = newClasses\n this._update()\n }\n\n private _update(): void {\n for (const c of this._classes) {\n if (this._hovered) {\n this._addClass(c)\n } else {\n this._removeClass(c)\n }\n }\n }\n\n private _setHovered(hovered: boolean) {\n const doUpdate = this._hovered !== hovered\n this._hovered = hovered\n if (doUpdate) {\n this._update()\n }\n }\n\n private _addClass(c: string): void {\n this._elementRef.nativeElement.classList.add(c)\n }\n\n public _removeClass(c: string): void {\n this._elementRef.nativeElement.classList.remove(c)\n }\n}\n","import {\n AfterViewChecked,\n Directive,\n ElementRef,\n EventEmitter,\n HostBinding,\n HostListener,\n inject,\n NgZone,\n OnDestroy,\n OnInit,\n} from '@angular/core'\nimport { NgControl } from '@angular/forms'\nimport { Subject, Subscription } from 'rxjs'\nimport { filter, takeUntil } from 'rxjs/operators'\n\nimport { NgOption, NgSelectComponent } from '@ng-select/ng-select'\n// import { ResizeSensor } from 'css-element-queries'\n\n// import { TheSeamElementResizedEvent } from './elem-resized.directive'\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'ng-select',\n exportAs: 'seamNgSelectExtra',\n})\nexport class TheSeamNgSelectExtraDirective\n implements OnInit, AfterViewChecked, OnDestroy\n{\n private readonly _elementRef = inject(ElementRef<HTMLElement>)\n private readonly _ngSelect = inject(NgSelectComponent)\n private readonly _ngControl = inject<NgControl | null>(NgControl, {\n optional: true,\n self: true,\n })\n\n /**\n * Set the tab index to `-1` to allow the root element of the ng-select\n * component to receive `focus` event from javascript, but not get focused by\n * keyboard navigation.\n */\n @HostBinding('attr.tabIndex')\n get _tabIndex() {\n return this._ngSelect.disabled() ? undefined : -1\n }\n\n /**\n * Listening for focus event on root of component to allow javascript\n * `focus()` function to trigger the components focus.\n */\n @HostListener('focus', ['$event']) onFocus($event: FocusEvent) {\n const target = $event.target as HTMLElement\n if (\n target === this._elementRef.nativeElement &&\n !this._ngSelect.disabled()\n ) {\n this._ngSelect.focus()\n }\n }\n\n @HostBinding('class.is-invalid') get _isInvalid() {\n return this._ngControl\n ? this._ngControl.invalid &&\n (this._ngControl.dirty || this._ngControl.touched)\n : false\n }\n\n @HostBinding('class.ng-empty-string-value') get _isEmptyStringValue() {\n return this._ngControl ? this._ngControl.value === '' : false\n }\n\n ngOnInit() {\n // this._ngSelect.focusEvent\n // .subscribe(v => this._enableKeyPressWorkaround())\n\n // this._ngSelect.blurEvent\n // .subscribe(v => this._disableKeyPressWorkaround())\n\n window.addEventListener('scroll', this._onScroll, true)\n\n // When the input is allowed to change its height the position doesn't update itself.\n // this._resizedEvent.pipe(\n // auditTime(30)\n // ).subscribe(event => {\n // if (this._elementRef && this._elementRef.nativeElement) {\n // if (this._elementRef.nativeElement.classList.contains('ng-select-value-grow-h')) {\n // if (this._ngSelect.isOpen && this._ngSelect.dropdownPanel) {\n // this._ngSelect.dropdownPanel.updateDropdownPosition()\n // }\n // } else {\n // this._elementRef.nativeElement.classList.remove('ng-select-value-grow-h')\n // }\n // }\n // })\n\n // this._patch_ngSelect_open()\n }\n\n ngOnDestroy() {\n // this._resizeSensor?.detach()\n\n window.removeEventListener('scroll', this._onScroll, true)\n\n // this._ngUnsubscribe.next(undefined)\n // this._ngUnsubscribe.complete()\n }\n\n ngAfterViewChecked() {\n // const dropPanel = this._ngSelect.dropdownPanel() as any\n // if (dropPanel) {\n // if (this._checkMarked) {\n // if (dropPanel && this._markedItem !== null) {\n // if (this._markedItem.index !== dropPanel.markedItem.index) {\n // dropPanel.scrollTo(dropPanel.markedItem)\n // }\n // }\n // }\n // }\n // this._checkMarked = false\n // this._resizeSensor = new ResizeSensor(this._elementRef.nativeElement, event => {\n // this._resizedEvent.emit({ element: this._elementRef.nativeElement, size: event })\n // })\n }\n\n private _onScroll = (event: any) => {\n if (this._ngSelect && this._ngSelect.isOpen()) {\n const isScrollingInScrollHost =\n (event.target.className as string).indexOf(\n 'ng-dropdown-panel-items',\n ) !== -1\n const isInSensor =\n (event.target.className as string).indexOf('resize-sensor-shrink') !==\n -1 ||\n (event.target.className as string).indexOf(\n 'os-resize-observer-host',\n ) !== -1\n if (isScrollingInScrollHost || isInSensor) {\n return\n }\n this._ngSelect.close()\n }\n }\n\n /**\n * Temp fix for: https://github.com/ng-select/ng-select/issues/1122\n */\n // private _patch_ngSelect_open() {\n // const original = this._ngSelect.open\n // const _self = this\n // this._ngSelect.open = function() {\n // original.apply(this, arguments)\n // _self._patch_ngSelectDropdownPanel_updateDropdownPosition()\n // }\n // }\n\n /** Should ONLY be called by `_patch_ngSelect_open`. */\n // private _patch_ngSelectDropdownPanel_updateDropdownPosition() {\n // if (!this._ngSelect.dropdownPanel) { return }\n // const drop: any = this._ngSelect.dropdownPanel\n // // Only needed once, to update the position before the timeout in\n // // `updateDropdownPosition()`. So, using this variable to check if I already called\n // // `_updateAppendedDropdownPosition()`.\n // if (!drop.__libPatched) {\n // drop.__libPatched = 'patched'\n // const original = drop.updateDropdownPosition\n // const _self = this\n // drop.updateDropdownPosition = function() {\n // original.apply(this, arguments)\n // if (!!_self._ngSelect.appendTo) {\n // drop._updateAppendedDropdownPosition()\n // }\n // }\n // }\n // }\n\n // private _enableKeyPressWorkaround() {\n // if (this._keyPressWorkaroundSub) { return }\n // const _ngSelect = this._ngSelect as any\n\n // this._keyPressWorkaroundSub = _ngSelect._keyPress$\n // .pipe(takeUntil(this._ngUnsubscribe))\n // .pipe(filter(() => !this._ngSelect.searchable()))\n // .subscribe(() => {\n // this._ngZone.runOutsideAngular(() => {\n // window.requestAnimationFrame(() => {\n // if (this._ngSelect.dropdownPanel()) {\n // this._markedItem = this._ngSelect.dropdownPanel().markedItem()\n // }\n // this._checkMarked = true\n // })\n // })\n // })\n // }\n\n // private _disableKeyPressWorkaround() {\n // if (this._keyPressWorkaroundSub) {\n // this._keyPressWorkaroundSub.unsubscribe()\n // this._keyPressWorkaroundSub = null\n // }\n // }\n}\n","import { coerceNumberProperty } from '@angular/cdk/coercion'\nimport {\n AfterViewInit,\n Directive,\n ElementRef,\n HostBinding,\n inject,\n Input,\n OnDestroy,\n} from '@angular/core'\nimport { fromEvent, Subject } from 'rxjs'\nimport { filter, takeUntil, tap } from 'rxjs/operators'\n\nimport { QuillEditorComponent } from 'ngx-quill'\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'quill-editor',\n exportAs: 'seamNgxQuillExtra',\n})\nexport class TheSeamNgxQuillExtraDirective implements OnDestroy, AfterViewInit {\n private readonly _elementRef: ElementRef<HTMLElement> = inject(\n ElementRef<HTMLElement>,\n )\n private readonly _quillEditor: QuillEditorComponent =\n inject(QuillEditorComponent)\n\n private readonly _ngUnsubscribe = new Subject<void>()\n\n private _tabIndex = -1\n\n /**\n * Set the tab index to `-1` to allow the root element of the\n * component to receive `focus` event from javascript, but not get focused by\n * keyboard navigation.\n */\n @Input()\n set tabIndex(value: number) {\n this._tabIndex = coerceNumberProperty(value)\n }\n get tabIndex(): number {\n return this._tabIndex\n }\n\n @HostBinding('attr.tabindex')\n get _attrTabIndex() {\n return this._quillEditor.disabled ? -1 : this.tabIndex || 0\n }\n\n ngOnDestroy() {\n this._ngUnsubscribe.next(undefined)\n this._ngUnsubscribe.complete()\n }\n\n ngAfterViewInit() {\n const parent = this._getParentElementForLabelFocusIssue()\n if (parent) {\n // NOTE: This is a hack to avoid an issue letting a label with \"for\"\n // attribute focus the control.\n fromEvent(parent, 'click')\n .pipe(\n takeUntil(this._ngUnsubscribe),\n filter(\n (e) =>\n (e.target as HTMLElement)?.getAttribute('for') ===\n this._elementRef.nativeElement.id,\n ),\n tap(() => this._quillEditor.quillEditor.focus()),\n )\n .subscribe()\n }\n }\n\n private _getParentElementForLabelFocusIssue(): HTMLElement | undefined {\n const findElem = (elem: HTMLElement): any => {\n if (elem.nodeName.toLowerCase() === 'seam-form-field') {\n return elem\n }\n\n if (elem.parentElement) {\n return findElem(elem.parentElement)\n }\n\n return elem\n }\n\n return findElem(this._elementRef.nativeElement)\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core'\n\nimport { padEnd, padStart } from '@theseam/ui-common/utils'\n\n@Pipe({\n name: 'maskChars',\n})\nexport class TheSeamMaskCharsPipe implements PipeTransform {\n transform(\n value: string,\n replacementChar: string = '*',\n ignoreCount: number = 0,\n ignoreFrom: 'left' | 'right' = 'right',\n ): string {\n if (ignoreFrom === 'right') {\n const s = value || ''\n return padStart(\n s.substring(s.length - ignoreCount, s.length),\n s.length,\n replacementChar,\n )\n } else if (ignoreFrom === 'left') {\n const s = value || ''\n return padEnd(s.substring(0, ignoreCount), s.length, replacementChar)\n }\n\n return value\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core'\n\n@Pipe({\n name: 'truncate',\n})\nexport class TheSeamTruncatePipe implements PipeTransform {\n transform(\n value: string,\n length: number = 30,\n appendEllipsis: boolean = true,\n ): string {\n let val = value\n\n if (value && typeof value === 'string' && value.length > length) {\n val = value.substr(0, length)\n if (appendEllipsis) {\n val += '...'\n }\n }\n\n return val\n }\n}\n","import { NgModule } from '@angular/core'\n\nimport { TheSeamAutoFocusDirective } from './directives/auto-focus.directive'\nimport { TheSeamClickOutsideDirective } from './directives/click-outside.directive'\nimport { TheSeamDisableControlDirective } from './directives/disable-control.directive'\nimport { TheSeamElemResizedDirective } from './directives/elem-resized.directive'\nimport { TheSeamHoverClassToggleDirective } from './directives/hover-class-toggle.directive'\nimport { TheSeamHoverClassDirective } from './directives/hover-class.directive'\nimport { TheSeamNgSelectExtraDirective } from './directives/ng-select-extra.directive'\nimport { TheSeamNgxQuillExtraDirective } from './directives/ngx-quill-extra.directive'\n\nimport { TheSeamMaskCharsPipe } from './pipes/mask-chars.pipe'\nimport { TheSeamTruncatePipe } from './pipes/truncate.pipe'\n\nimport { TheSeamPasswordInputRevealComponent } from './components/password-input-reveal/password-input-reveal.component'\n\n@NgModule({\n imports: [\n TheSeamAutoFocusDirective,\n TheSeamElemResizedDirective,\n TheSeamHoverClassToggleDirective,\n TheSeamNgSelectExtraDirective,\n TheSeamHoverClassDirective,\n TheSeamClickOutsideDirective,\n TheSeamDisableControlDirective,\n TheSeamNgxQuillExtraDirective,\n TheSeamMaskCharsPipe,\n TheSeamTruncatePipe,\n TheSeamPasswordInputRevealComponent,\n ],\n exports: [\n TheSeamAutoFocusDirective,\n TheSeamElemResizedDirective,\n TheSeamPasswordInputRevealComponent,\n TheSeamNgSelectExtraDirective,\n TheSeamHoverClassDirective,\n TheSeamHoverClassToggleDirective,\n TheSeamClickOutsideDirective,\n TheSeamDisableControlDirective,\n TheSeamMaskCharsPipe,\n TheSeamTruncatePipe,\n TheSeamNgxQuillExtraDirective,\n ],\n})\nexport class TheSeamSharedMod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R,oBAAA,OAAO,EAAE;wBACP,yBAAyB;wBACzB,2BAA2B;wBAC3B,gCAAgC;wBAChC,6BAA6B;wBAC7B,0BAA0B;wBAC1B,4BAA4B;wBAC5B,8BAA8B;wBAC9B,6BAA6B;wBAC7B,oBAAoB;wBACpB,mBAAmB;wBACnB,mCAAmC;AACpC,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,yBAAyB;wBACzB,2BAA2B;wBAC3B,mCAAmC;wBACnC,6BAA6B;wBAC7B,0BAA0B;wBAC1B,gCAAgC;wBAChC,4BAA4B;wBAC5B,8BAA8B;wBAC9B,oBAAoB;wBACpB,mBAAmB;wBACnB,6BAA6B;AAC9B,qBAAA;AACF,iBAAA;;;AC3CD;;AAEG;;;;"}
|
|
@@ -67,13 +67,16 @@ class LocalStorageMemory {
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
// NOTE: Temporary localStorage polyfill just to get the app running without localStorage for now.
|
|
70
|
-
const localStorage = 'localStorage' in window && window.localStorage != null
|
|
70
|
+
const localStorage = 'localStorage' in window && window.localStorage != null
|
|
71
|
+
? window.localStorage
|
|
72
|
+
: new LocalStorageMemory();
|
|
71
73
|
class LocalStorageService {
|
|
72
74
|
subjects = {};
|
|
73
75
|
/** This is only here for testing/debugging. */
|
|
74
76
|
_localStorage = localStorage;
|
|
75
77
|
constructor() {
|
|
76
|
-
fromEvent(window, 'storage')
|
|
78
|
+
fromEvent(window, 'storage')
|
|
79
|
+
.pipe(map((e) => e.key), filter(notNullOrUndefined), tap((key) => {
|
|
77
80
|
const subjectValue = this.get(key);
|
|
78
81
|
const storedValue = this._localStorage.getItem(key);
|
|
79
82
|
if (subjectValue !== storedValue) {
|
|
@@ -128,13 +131,13 @@ class LocalStorageService {
|
|
|
128
131
|
this.subjects[key].next(null);
|
|
129
132
|
}
|
|
130
133
|
}
|
|
131
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
132
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
134
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: LocalStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
135
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: LocalStorageService, providedIn: 'root' });
|
|
133
136
|
}
|
|
134
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
137
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: LocalStorageService, decorators: [{
|
|
135
138
|
type: Injectable,
|
|
136
139
|
args: [{
|
|
137
|
-
providedIn: 'root'
|
|
140
|
+
providedIn: 'root',
|
|
138
141
|
}]
|
|
139
142
|
}], ctorParameters: () => [] });
|
|
140
143
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theseam-ui-common-storage.mjs","sources":["../../../projects/ui-common/storage/localstorage-memory.ts","../../../projects/ui-common/storage/local-storage.service.ts","../../../projects/ui-common/storage/theseam-ui-common-storage.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"theseam-ui-common-storage.mjs","sources":["../../../projects/ui-common/storage/localstorage-memory.ts","../../../projects/ui-common/storage/local-storage.service.ts","../../../projects/ui-common/storage/theseam-ui-common-storage.ts"],"sourcesContent":["export class LocalStorageMemory implements Storage {\n [name: string]: any\n\n private _cache: { [key: string]: string } = {}\n\n /**\n * Number of stored items.\n */\n public length = 0\n\n /**\n * Removes all stored items and sets length to 0.\n */\n public clear(): void {\n this._cache = {}\n this.length = 0\n }\n\n /**\n * Returns item for passed key, or null.\n *\n * @param key name of item to be returned.\n */\n public getItem(key: string): string | null {\n if (key in this._cache) {\n return this._cache[key]\n }\n\n return null\n }\n\n /**\n * Returns name of key at passed index.\n *\n * @param index position for key to be returned (starts at 0).\n */\n public key(index: number): string | null {\n return Object.keys(this._cache)[index] || null\n }\n\n /**\n * Removes item for passed key.\n *\n * @param key name of item to be removed.\n */\n public removeItem(key: string): void {\n if (Object.prototype.hasOwnProperty.call(this._cache, key)) {\n delete this._cache[key]\n this.length--\n }\n }\n\n /**\n * Sets item for key to passed value, as string.\n *\n * @param key name of item to be set.\n * @param value value, will always be turned into a string.\n */\n public setItem(key: string, value: string): void {\n if (typeof value === 'undefined') {\n this.removeItem(key)\n } else {\n if (!Object.prototype.hasOwnProperty.call(this._cache, key)) {\n this.length++\n }\n\n this._cache[key] = `${value}`\n }\n }\n}\n","import { Injectable } from '@angular/core'\nimport { BehaviorSubject, fromEvent, Observable } from 'rxjs'\nimport { filter, map, tap } from 'rxjs/operators'\n\nimport { notNullOrUndefined } from '@theseam/ui-common/utils'\n\nimport { LocalStorageMemory } from './localstorage-memory'\n\n// NOTE: Temporary localStorage polyfill just to get the app running without localStorage for now.\nconst localStorage: Storage =\n 'localStorage' in window && window.localStorage != null\n ? window.localStorage\n : new LocalStorageMemory()\n\nexport interface ILocalStorageService {\n select(key: string, defaultValue: string | null): Observable<string | null>\n get(key: string, defaultValue: string | null): string | null\n set(key: string, value: string): void\n remove(key: string): void\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class LocalStorageService implements ILocalStorageService {\n protected readonly subjects: {\n [key: string]: BehaviorSubject<string | null>\n } = {}\n\n /** This is only here for testing/debugging. */\n private readonly _localStorage = localStorage\n\n constructor() {\n fromEvent<StorageEvent>(window, 'storage')\n .pipe(\n map((e) => e.key),\n filter(notNullOrUndefined),\n tap((key) => {\n const subjectValue = this.get(key)\n const storedValue = this._localStorage.getItem(key)\n if (subjectValue !== storedValue) {\n if (storedValue) {\n this.set(key, storedValue)\n } else {\n this.remove(key)\n }\n }\n }),\n )\n .subscribe()\n }\n\n /**\n * Observe a localStorage item.\n *\n * NOTE: Only emits changes if the item is changed with the set method of this\n * class instance.\n */\n public select(\n key: string,\n defaultValue: string | null = null,\n ): Observable<string | null> {\n if (Object.prototype.hasOwnProperty.call(this.subjects, key)) {\n return this.subjects[key]\n }\n\n if (!this._localStorage.getItem(key) && defaultValue) {\n this._localStorage.setItem(key, defaultValue)\n }\n\n const value = this._localStorage.getItem(key) || defaultValue\n\n return (this.subjects[key] = new BehaviorSubject(value))\n }\n\n /** Get a localStorage item. */\n public get(key: string, defaultValue: string | null = null): string | null {\n if (Object.prototype.hasOwnProperty.call(this.subjects, key)) {\n return this.subjects[key].value\n }\n\n if (!this._localStorage.getItem(key) && defaultValue) {\n this._localStorage.setItem(key, defaultValue)\n }\n\n const value = this._localStorage.getItem(key) || defaultValue\n\n return (this.subjects[key] = new BehaviorSubject(value)).value\n }\n\n /** Set a localStorage item. */\n public set(key: string, value: string): void {\n this._localStorage.setItem(key, value)\n\n if (Object.prototype.hasOwnProperty.call(this.subjects, key)) {\n this.subjects[key].next(value)\n }\n }\n\n /** Remove a localStorage item. */\n public remove(key: string): void {\n this._localStorage.removeItem(key)\n\n if (Object.prototype.hasOwnProperty.call(this.subjects, key)) {\n this.subjects[key].next(null)\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAAa,kBAAkB,CAAA;IAGrB,MAAM,GAA8B,EAAE;AAE9C;;AAEG;IACI,MAAM,GAAG,CAAC;AAEjB;;AAEG;IACI,KAAK,GAAA;AACV,QAAA,IAAI,CAAC,MAAM,GAAG,EAAE;AAChB,QAAA,IAAI,CAAC,MAAM,GAAG,CAAC;IACjB;AAEA;;;;AAIG;AACI,IAAA,OAAO,CAAC,GAAW,EAAA;AACxB,QAAA,IAAI,GAAG,IAAI,IAAI,CAAC,MAAM,EAAE;AACtB,YAAA,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC;QACzB;AAEA,QAAA,OAAO,IAAI;IACb;AAEA;;;;AAIG;AACI,IAAA,GAAG,CAAC,KAAa,EAAA;AACtB,QAAA,OAAO,MAAM,CA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