@theseam/ui-common 1.0.0-beta.0 → 1.0.0-beta.10

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.
Files changed (153) hide show
  1. package/breadcrumbs/index.d.ts +1 -2
  2. package/buttons/index.d.ts +20 -13
  3. package/datatable/index.d.ts +77 -39
  4. package/dynamic/index.d.ts +5 -5
  5. package/fesm2022/theseam-ui-common-asset-reader.mjs +28 -29
  6. package/fesm2022/theseam-ui-common-asset-reader.mjs.map +1 -1
  7. package/fesm2022/theseam-ui-common-breadcrumbs.mjs +25 -31
  8. package/fesm2022/theseam-ui-common-breadcrumbs.mjs.map +1 -1
  9. package/fesm2022/theseam-ui-common-buttons.mjs +108 -66
  10. package/fesm2022/theseam-ui-common-buttons.mjs.map +1 -1
  11. package/fesm2022/theseam-ui-common-card.mjs +21 -21
  12. package/fesm2022/theseam-ui-common-card.mjs.map +1 -1
  13. package/fesm2022/theseam-ui-common-carousel.mjs +28 -30
  14. package/fesm2022/theseam-ui-common-carousel.mjs.map +1 -1
  15. package/fesm2022/theseam-ui-common-checkbox.mjs +27 -27
  16. package/fesm2022/theseam-ui-common-checkbox.mjs.map +1 -1
  17. package/fesm2022/theseam-ui-common-confirm-dialog.mjs +23 -27
  18. package/fesm2022/theseam-ui-common-confirm-dialog.mjs.map +1 -1
  19. package/fesm2022/theseam-ui-common-core.mjs +31 -11
  20. package/fesm2022/theseam-ui-common-core.mjs.map +1 -1
  21. package/fesm2022/theseam-ui-common-data-exporter.mjs +18 -19
  22. package/fesm2022/theseam-ui-common-data-exporter.mjs.map +1 -1
  23. package/fesm2022/theseam-ui-common-data-filters.mjs +80 -64
  24. package/fesm2022/theseam-ui-common-data-filters.mjs.map +1 -1
  25. package/fesm2022/theseam-ui-common-datatable-alterations-display.mjs +51 -49
  26. package/fesm2022/theseam-ui-common-datatable-alterations-display.mjs.map +1 -1
  27. package/fesm2022/theseam-ui-common-datatable-dynamic.mjs +145 -112
  28. package/fesm2022/theseam-ui-common-datatable-dynamic.mjs.map +1 -1
  29. package/fesm2022/theseam-ui-common-datatable.mjs +727 -420
  30. package/fesm2022/theseam-ui-common-datatable.mjs.map +1 -1
  31. package/fesm2022/theseam-ui-common-dynamic-component-loader.mjs +12 -14
  32. package/fesm2022/theseam-ui-common-dynamic-component-loader.mjs.map +1 -1
  33. package/fesm2022/theseam-ui-common-dynamic.mjs +60 -48
  34. package/fesm2022/theseam-ui-common-dynamic.mjs.map +1 -1
  35. package/fesm2022/theseam-ui-common-footer-bar.mjs +9 -15
  36. package/fesm2022/theseam-ui-common-footer-bar.mjs.map +1 -1
  37. package/fesm2022/theseam-ui-common-form-field-error.mjs +60 -43
  38. package/fesm2022/theseam-ui-common-form-field-error.mjs.map +1 -1
  39. package/fesm2022/theseam-ui-common-form-field.mjs +129 -76
  40. package/fesm2022/theseam-ui-common-form-field.mjs.map +1 -1
  41. package/fesm2022/theseam-ui-common-framework.mjs +669 -543
  42. package/fesm2022/theseam-ui-common-framework.mjs.map +1 -1
  43. package/fesm2022/theseam-ui-common-google-maps.mjs +206 -149
  44. package/fesm2022/theseam-ui-common-google-maps.mjs.map +1 -1
  45. package/fesm2022/theseam-ui-common-graphql.mjs +311 -254
  46. package/fesm2022/theseam-ui-common-graphql.mjs.map +1 -1
  47. package/fesm2022/theseam-ui-common-icon.mjs +125 -89
  48. package/fesm2022/theseam-ui-common-icon.mjs.map +1 -1
  49. package/fesm2022/theseam-ui-common-layout.mjs +18 -26
  50. package/fesm2022/theseam-ui-common-layout.mjs.map +1 -1
  51. package/fesm2022/theseam-ui-common-loading.mjs +19 -28
  52. package/fesm2022/theseam-ui-common-loading.mjs.map +1 -1
  53. package/fesm2022/theseam-ui-common-menu.mjs +124 -95
  54. package/fesm2022/theseam-ui-common-menu.mjs.map +1 -1
  55. package/fesm2022/theseam-ui-common-modal.mjs +178 -129
  56. package/fesm2022/theseam-ui-common-modal.mjs.map +1 -1
  57. package/fesm2022/theseam-ui-common-models.mjs +3 -3
  58. package/fesm2022/theseam-ui-common-models.mjs.map +1 -1
  59. package/fesm2022/theseam-ui-common-navigation-reload.mjs +13 -11
  60. package/fesm2022/theseam-ui-common-navigation-reload.mjs.map +1 -1
  61. package/fesm2022/theseam-ui-common-popover.mjs +81 -88
  62. package/fesm2022/theseam-ui-common-popover.mjs.map +1 -1
  63. package/fesm2022/theseam-ui-common-progress.mjs +15 -19
  64. package/fesm2022/theseam-ui-common-progress.mjs.map +1 -1
  65. package/fesm2022/theseam-ui-common-rich-text.mjs +65 -52
  66. package/fesm2022/theseam-ui-common-rich-text.mjs.map +1 -1
  67. package/fesm2022/theseam-ui-common-scrollbar.mjs +12 -9
  68. package/fesm2022/theseam-ui-common-scrollbar.mjs.map +1 -1
  69. package/fesm2022/theseam-ui-common-services.mjs +41 -26
  70. package/fesm2022/theseam-ui-common-services.mjs.map +1 -1
  71. package/fesm2022/theseam-ui-common-shared.mjs +149 -159
  72. package/fesm2022/theseam-ui-common-shared.mjs.map +1 -1
  73. package/fesm2022/theseam-ui-common-storage.mjs +9 -6
  74. package/fesm2022/theseam-ui-common-storage.mjs.map +1 -1
  75. package/fesm2022/theseam-ui-common-story-helpers.mjs +148 -86
  76. package/fesm2022/theseam-ui-common-story-helpers.mjs.map +1 -1
  77. package/fesm2022/theseam-ui-common-tabbed.mjs +43 -39
  78. package/fesm2022/theseam-ui-common-tabbed.mjs.map +1 -1
  79. package/fesm2022/theseam-ui-common-table-cell-type.mjs +63 -39
  80. package/fesm2022/theseam-ui-common-table-cell-type.mjs.map +1 -1
  81. package/fesm2022/theseam-ui-common-table-cell-types.mjs +182 -144
  82. package/fesm2022/theseam-ui-common-table-cell-types.mjs.map +1 -1
  83. package/fesm2022/theseam-ui-common-table.mjs +62 -41
  84. package/fesm2022/theseam-ui-common-table.mjs.map +1 -1
  85. package/fesm2022/theseam-ui-common-tel-input.mjs +98 -63
  86. package/fesm2022/theseam-ui-common-tel-input.mjs.map +1 -1
  87. package/fesm2022/theseam-ui-common-testing.mjs +13 -10
  88. package/fesm2022/theseam-ui-common-testing.mjs.map +1 -1
  89. package/fesm2022/theseam-ui-common-tiled-select.mjs +54 -50
  90. package/fesm2022/theseam-ui-common-tiled-select.mjs.map +1 -1
  91. package/fesm2022/theseam-ui-common-toggle-edit.mjs +41 -37
  92. package/fesm2022/theseam-ui-common-toggle-edit.mjs.map +1 -1
  93. package/fesm2022/theseam-ui-common-toggle-group.mjs +30 -31
  94. package/fesm2022/theseam-ui-common-toggle-group.mjs.map +1 -1
  95. package/fesm2022/theseam-ui-common-tooltip.mjs +225 -66
  96. package/fesm2022/theseam-ui-common-tooltip.mjs.map +1 -1
  97. package/fesm2022/theseam-ui-common-unsaved-changes-dialog.mjs +14 -12
  98. package/fesm2022/theseam-ui-common-unsaved-changes-dialog.mjs.map +1 -1
  99. package/fesm2022/theseam-ui-common-utils.mjs +113 -77
  100. package/fesm2022/theseam-ui-common-utils.mjs.map +1 -1
  101. package/fesm2022/theseam-ui-common-validators.mjs +10 -9
  102. package/fesm2022/theseam-ui-common-validators.mjs.map +1 -1
  103. package/fesm2022/theseam-ui-common-vertical-list-filter.mjs +39 -17
  104. package/fesm2022/theseam-ui-common-vertical-list-filter.mjs.map +1 -1
  105. package/fesm2022/theseam-ui-common-viewers.mjs +80 -53
  106. package/fesm2022/theseam-ui-common-viewers.mjs.map +1 -1
  107. package/fesm2022/theseam-ui-common-widget.mjs +288 -314
  108. package/fesm2022/theseam-ui-common-widget.mjs.map +1 -1
  109. package/form-field/index.d.ts +1 -1
  110. package/framework/base-layout/base-layout.component.scss +9 -4
  111. package/framework/base-layout/styles/_variables.scss +4 -9
  112. package/framework/dashboard/dashboard-widgets/dashboard-widgets.component.scss +6 -4
  113. package/framework/index.d.ts +6 -6
  114. package/framework/nav/nav-item/nav-item.component.scss +7 -6
  115. package/framework/nav/styles/_themes/light/_variables.scss +21 -5
  116. package/framework/nav/styles/_themes/primary/_variables.scss +21 -5
  117. package/framework/side-nav/side-nav-item/side-nav-item.component.scss +5 -2
  118. package/framework/side-nav/styles/_themes/light/_variables.scss +5 -1
  119. package/framework/side-nav/styles/_themes/primary/_variables.scss +25 -5
  120. package/graphql/index.d.ts +49 -7
  121. package/modal/README.md +5 -5
  122. package/modal/index.d.ts +1 -1
  123. package/models/index.d.ts +1 -1
  124. package/package.json +59 -60
  125. package/popover/index.d.ts +0 -2
  126. package/progress/progress-circle/styles/_variables.scss +15 -3
  127. package/shared/index.d.ts +0 -13
  128. package/story-helpers/index.d.ts +11 -1
  129. package/styles/bootstrap/_bootstrap.scss +34 -34
  130. package/styles/bootstrap/_bs-styles.scss +4 -8
  131. package/styles/bootstrap/_bs-utilities.scss +4 -4
  132. package/styles/bootstrap/_bs-variables.scss +65 -70
  133. package/styles/common/_forms.scss +9 -10
  134. package/styles/common/_global.scss +0 -1
  135. package/styles/common/_hacks.scss +1 -1
  136. package/styles/common/_table.scss +0 -1
  137. package/styles/common/_text.scss +3 -1
  138. package/styles/theme.scss +1 -1
  139. package/styles/vendor/ng-select/_ng-select-bs4.scss +292 -294
  140. package/styles/vendor/ngx-datatable/_ngx-datatable.scss +63 -32
  141. package/styles/vendor/ngx-datatable/_themes/bootstrap/_variables.scss +37 -10
  142. package/styles/vendor/ngx-datatable/_themes/material/_variables.scss +3 -1
  143. package/styles/vendor/quill/_quill.scss +15 -9
  144. package/table/index.d.ts +4 -1
  145. package/table-cell-type/index.d.ts +27 -2
  146. package/tel-input/README.md +27 -27
  147. package/utils/index.d.ts +3 -3
  148. package/viewers/index.d.ts +9 -2
  149. package/widget/_widget-theme.scss +1 -1
  150. package/widget/styles/_variables.scss +2 -2
  151. package/widget/widget/widget.component.scss +0 -2
  152. package/widget/widget-content-components/widget-tile/widget-tile.component.scss +1 -3
  153. package/widget/widget-footer/widget-footer.component.scss +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"theseam-ui-common-toggle-group.mjs","sources":["../../../projects/ui-common/toggle-group/toggle-group-option.directive.ts","../../../projects/ui-common/toggle-group/toggle-group.directive.ts","../../../projects/ui-common/toggle-group/toggle-group.module.ts","../../../projects/ui-common/toggle-group/theseam-ui-common-toggle-group.ts"],"sourcesContent":["import { coerceBooleanProperty } from '@angular/cdk/coercion'\nimport { ChangeDetectorRef, Directive, EventEmitter, HostBinding, inject, Input, Output } from '@angular/core'\n\n@Directive({\n selector: '[seamToggleGroupOption]',\n exportAs: 'seamToggleGroupOption',\n})\nexport class ToggleGroupOptionDirective {\n\n private readonly _cdr = inject(ChangeDetectorRef)\n\n @Input() seamToggleGroupOption: string | undefined | null\n\n @Input()\n get selected(): boolean { return this._selected }\n set selected(value: boolean) {\n if (!this._canUnselect && !value) { return }\n this._selected = coerceBooleanProperty(value)\n this.selectionChange.emit(this._selected)\n this._cdr.markForCheck()\n }\n private _selected = false\n\n /** Internal use only for now. */\n _canUnselect = true\n\n @Output() selectionChange = new EventEmitter<boolean>()\n\n @HostBinding('class.lib-toggle-group-option-selected') get _checkioSelectedClass() {\n return this._selected\n }\n\n get value(): string | undefined | null {\n return this.seamToggleGroupOption\n }\n\n}\n","import { BooleanInput, coerceArray } from '@angular/cdk/coercion'\nimport { AfterViewInit, ContentChildren, Directive, EventEmitter, forwardRef, Input, OnDestroy, Output, QueryList } from '@angular/core'\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'\nimport { combineLatest, from, Observable, of, Subject } from 'rxjs'\nimport { filter, map, startWith, switchMap, takeUntil, tap } from 'rxjs/operators'\n\nimport { InputBoolean } from '@theseam/ui-common/core'\n\nimport { ToggleGroupOptionDirective } from './toggle-group-option.directive'\n\nexport const TOGGLE_GROUP_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ToggleGroupDirective),\n multi: true,\n}\n\n@Directive({\n selector: '[seamToggleGroup]',\n exportAs: 'seamToggleGroup',\n providers: [ TOGGLE_GROUP_VALUE_ACCESSOR ],\n})\nexport class ToggleGroupDirective implements OnDestroy, AfterViewInit, ControlValueAccessor {\n static ngAcceptInputType_disabled: BooleanInput\n static ngAcceptInputType_multiple: BooleanInput\n static ngAcceptInputType_selectionToggleable: BooleanInput\n\n private readonly _ngUnsubscribe = new Subject<void>()\n\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('value') val: string | string[] | undefined | null\n\n @Input() @InputBoolean() disabled = false\n @Input() @InputBoolean() multiple = false\n @Input() @InputBoolean() selectionToggleable = true\n\n // TODO: Add min/max selected inputs to make toggling better for multi select\n\n // eslint-disable-next-line @angular-eslint/no-output-native\n @Output() readonly change = new EventEmitter<string | string[] | undefined | null>()\n\n @ContentChildren(ToggleGroupOptionDirective) optionDirectives?: QueryList<ToggleGroupOptionDirective>\n\n public options?: Observable<ToggleGroupOptionDirective[]>\n\n onChange: any\n onTouched: any\n\n ngOnDestroy() {\n this._ngUnsubscribe.next()\n this._ngUnsubscribe.complete()\n }\n\n ngAfterViewInit() {\n setTimeout(() => {\n this._updateDirectiveStates()\n\n if (this.optionDirectives) {\n this.options = this.optionDirectives.changes.pipe(\n startWith(this.optionDirectives),\n map(v => v.toArray() as ToggleGroupOptionDirective[]),\n takeUntil(this._ngUnsubscribe),\n )\n\n this.options.pipe(\n switchMap(opts => {\n const _tmp = of(undefined)\n if (opts) {\n const _v: Observable<boolean>[] = []\n for (const opt of opts) {\n _v.push(opt.selectionChange.pipe(\n filter(v => opt.selected !== this.isSelected(opt.value)),\n tap(v => {\n if (this.isSelected(opt.value)) {\n this.unselectValue(opt.value)\n } else {\n this.selectValue(opt.value)\n }\n })\n ))\n }\n return combineLatest(_v)\n }\n return _tmp\n }),\n takeUntil(this._ngUnsubscribe),\n ).subscribe()\n }\n\n this.change.pipe(\n switchMap(_ => from(this.optionDirectives?.toArray() || []).pipe(\n tap(opt => { this._updateDirectiveState(opt) }),\n )),\n takeUntil(this._ngUnsubscribe),\n ).subscribe()\n })\n\n this.optionDirectives?.changes.subscribe(() => this._updateDirectiveStates())\n }\n\n get value(): string | string[] | undefined | null {\n return this.val\n }\n\n set value(value: string | string[] | undefined | null) {\n const _value = this.multiple\n ? value !== null && value !== undefined\n ? coerceArray(value)\n : value\n : value\n\n this.val = (this.multiple) ? [ ...(_value as string[] || []) ] : _value || ''\n this.change.emit(this.val)\n if (this.onChange) { this.onChange(_value) }\n if (this.onTouched) { this.onTouched() }\n }\n\n writeValue(value: any): void {\n this.value = value\n }\n\n registerOnChange(fn: any): void {\n this.onChange = fn\n }\n\n registerOnTouched(fn: any): void {\n this.onTouched = fn\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled\n }\n\n isSelected(value: string | undefined | null) {\n if (this.multiple) {\n const idx = (this.value as string[] || []).findIndex(v => v === value)\n return idx !== -1\n } else {\n // TODO: Clean this up when the directive no longer allows array value type when multiple is false\n const v = Array.isArray(this.value) && this.value.length === 1\n ? this.value[0]\n : this.value\n return v === value\n }\n }\n\n unselectValue(value: string | undefined | null) {\n if (this.multiple) {\n this.value = (this.value as string[] || []).filter(v => v !== value)\n } else {\n this.value = undefined\n }\n }\n\n selectValue(value: string | undefined | null) {\n if (this.multiple) {\n const _value = [ ...(this.value as string[] || []) ]\n this.value = value ? [ ..._value, value ] : _value\n } else {\n this.value = value\n }\n }\n\n getOptionDirectiveByValue(value: string) {\n if (!this.optionDirectives || this.optionDirectives.length < 1) {\n return null\n }\n\n return this.optionDirectives.toArray()\n .find(opt => opt.value === value)\n }\n\n private _updateDirectiveStates(): void {\n if (this.optionDirectives) {\n for (const opt of this.optionDirectives.toArray()) {\n this._updateDirectiveState(opt)\n }\n }\n }\n\n private _updateDirectiveState(opt: ToggleGroupOptionDirective): void {\n const selected = this.isSelected(opt.value)\n if (opt.selected !== selected) {\n if (!opt._canUnselect) {\n opt._canUnselect = true\n }\n opt.selected = selected\n }\n if (!this.selectionToggleable) {\n if (!this.multiple || (this.value && this.value.length <= 1)) {\n if (opt.selected) {\n if (opt._canUnselect) {\n opt._canUnselect = false\n }\n } else {\n if (!opt._canUnselect) {\n opt._canUnselect = true\n }\n }\n } else {\n if (!opt._canUnselect) {\n opt._canUnselect = true\n }\n }\n }\n }\n\n}\n","import { NgModule } from '@angular/core'\n\nimport { ToggleGroupOptionDirective } from './toggle-group-option.directive'\nimport { ToggleGroupDirective } from './toggle-group.directive'\n\n@NgModule({\n imports: [\n ToggleGroupDirective,\n ToggleGroupOptionDirective\n ],\n exports: [\n ToggleGroupDirective,\n ToggleGroupOptionDirective\n ]\n})\nexport class TheSeamToggleGroupModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;MAOa,0BAA0B,CAAA;AAEpB,IAAA,IAAI,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAExC,IAAA,qBAAqB;IAE9B,IACI,QAAQ,KAAc,OAAO,IAAI,CAAC,SAAS,CAAA,CAAC;IAChD,IAAI,QAAQ,CAAC,KAAc,EAAA;QACzB,IAAI,CAAC,IAAI,CAAC,YAAY,IAAI,CAAC,KAAK,EAAE;YAAE;QAAO;AAC3C,QAAA,IAAI,CAAC,SAAS,GAAG,qBAAqB,CAAC,KAAK,CAAC;QAC7C,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC;AACzC,QAAA,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE;IAC1B;IACQ,SAAS,GAAG,KAAK;;IAGzB,YAAY,GAAG,IAAI;AAET,IAAA,eAAe,GAAG,IAAI,YAAY,EAAW;AAEvD,IAAA,IAA2D,qBAAqB,GAAA;QAC9E,OAAO,IAAI,CAAC,SAAS;IACvB;AAEA,IAAA,IAAI,KAAK,GAAA;QACP,OAAO,IAAI,CAAC,qBAAqB;IACnC;uGA3BW,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAA1B,0BAA0B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,yBAAA,EAAA,MAAA,EAAA,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oBAAA,QAAQ,EAAE,iBAAiB;oBAC3B,SAAS,EAAE,CAAE,2BAA2B,CAAE;AAC3C,iBAAA;8BASiB,GAAG,EAAA,CAAA;sBAAlB,KAAK;uBAAC,OAAO;gBAEW,QAAQ,EAAA,CAAA;sBAAhC;gBACwB,QAAQ,EAAA,CAAA;sBAAhC;gBACwB,mBAAmB,EAAA,CAAA;sBAA3C;gBAKkB,MAAM,EAAA,CAAA;sBAAxB;gBAE4C,gBAAgB,EAAA,CAAA;sBAA5D,eAAe;uBAAC,0BAA0B;;;MCzBhC,wBAAwB,CAAA;uGAAxB,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAxB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,wBAAwB,YARjC,oBAAoB;AACpB,YAAA,0BAA0B,aAG1B,oBAAoB;YACpB,0BAA0B,CAAA,EAAA,CAAA;wGAGjB,wBAAwB,EAAA,CAAA;;2FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAVpC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,oBAAoB;wBACpB;AACD,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,oBAAoB;wBACpB;AACD;AACF,iBAAA;;;ACdD;;AAEG;;;;"}
1
+ {"version":3,"file":"theseam-ui-common-toggle-group.mjs","sources":["../../../projects/ui-common/toggle-group/toggle-group-option.directive.ts","../../../projects/ui-common/toggle-group/toggle-group.directive.ts","../../../projects/ui-common/toggle-group/toggle-group.module.ts","../../../projects/ui-common/toggle-group/theseam-ui-common-toggle-group.ts"],"sourcesContent":["import { coerceBooleanProperty } from '@angular/cdk/coercion'\nimport {\n ChangeDetectorRef,\n Directive,\n EventEmitter,\n HostBinding,\n inject,\n Input,\n Output,\n} from '@angular/core'\n\n@Directive({\n selector: '[seamToggleGroupOption]',\n exportAs: 'seamToggleGroupOption',\n})\nexport class ToggleGroupOptionDirective {\n private readonly _cdr = inject(ChangeDetectorRef)\n\n @Input() seamToggleGroupOption: string | undefined | null\n\n @Input()\n get selected(): boolean {\n return this._selected\n }\n set selected(value: boolean) {\n if (!this._canUnselect && !value) {\n return\n }\n this._selected = coerceBooleanProperty(value)\n this.selectionChange.emit(this._selected)\n this._cdr.markForCheck()\n }\n private _selected = false\n\n /** Internal use only for now. */\n _canUnselect = true\n\n @Output() selectionChange = new EventEmitter<boolean>()\n\n @HostBinding('class.lib-toggle-group-option-selected')\n get _checkioSelectedClass() {\n return this._selected\n }\n\n get value(): string | undefined | null {\n return this.seamToggleGroupOption\n }\n}\n","import { BooleanInput, coerceArray } from '@angular/cdk/coercion'\nimport {\n AfterViewInit,\n ContentChildren,\n Directive,\n EventEmitter,\n forwardRef,\n Input,\n OnDestroy,\n Output,\n QueryList,\n} from '@angular/core'\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'\nimport { combineLatest, from, Observable, of, Subject } from 'rxjs'\nimport {\n filter,\n map,\n startWith,\n switchMap,\n takeUntil,\n tap,\n} from 'rxjs/operators'\n\nimport { InputBoolean } from '@theseam/ui-common/core'\n\nimport { ToggleGroupOptionDirective } from './toggle-group-option.directive'\n\nexport const TOGGLE_GROUP_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ToggleGroupDirective),\n multi: true,\n}\n\n@Directive({\n selector: '[seamToggleGroup]',\n exportAs: 'seamToggleGroup',\n providers: [TOGGLE_GROUP_VALUE_ACCESSOR],\n})\nexport class ToggleGroupDirective\n implements OnDestroy, AfterViewInit, ControlValueAccessor\n{\n static ngAcceptInputType_disabled: BooleanInput\n static ngAcceptInputType_multiple: BooleanInput\n static ngAcceptInputType_selectionToggleable: BooleanInput\n\n private readonly _ngUnsubscribe = new Subject<void>()\n\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('value') val: string | string[] | undefined | null\n\n @Input() @InputBoolean() disabled = false\n @Input() @InputBoolean() multiple = false\n @Input() @InputBoolean() selectionToggleable = true\n\n // TODO: Add min/max selected inputs to make toggling better for multi select\n\n // eslint-disable-next-line @angular-eslint/no-output-native\n @Output() readonly change = new EventEmitter<\n string | string[] | undefined | null\n >()\n\n @ContentChildren(ToggleGroupOptionDirective)\n optionDirectives?: QueryList<ToggleGroupOptionDirective>\n\n public options?: Observable<ToggleGroupOptionDirective[]>\n\n onChange: any\n onTouched: any\n\n ngOnDestroy() {\n this._ngUnsubscribe.next()\n this._ngUnsubscribe.complete()\n }\n\n ngAfterViewInit() {\n setTimeout(() => {\n this._updateDirectiveStates()\n\n if (this.optionDirectives) {\n this.options = this.optionDirectives.changes.pipe(\n startWith(this.optionDirectives),\n map((v) => v.toArray() as ToggleGroupOptionDirective[]),\n takeUntil(this._ngUnsubscribe),\n )\n\n this.options\n .pipe(\n switchMap((opts) => {\n const _tmp = of(undefined)\n if (opts) {\n const _v: Observable<boolean>[] = []\n for (const opt of opts) {\n _v.push(\n opt.selectionChange.pipe(\n filter(\n (v) => opt.selected !== this.isSelected(opt.value),\n ),\n tap((v) => {\n if (this.isSelected(opt.value)) {\n this.unselectValue(opt.value)\n } else {\n this.selectValue(opt.value)\n }\n }),\n ),\n )\n }\n return combineLatest(_v)\n }\n return _tmp\n }),\n takeUntil(this._ngUnsubscribe),\n )\n .subscribe()\n }\n\n this.change\n .pipe(\n switchMap((_) =>\n from(this.optionDirectives?.toArray() || []).pipe(\n tap((opt) => {\n this._updateDirectiveState(opt)\n }),\n ),\n ),\n takeUntil(this._ngUnsubscribe),\n )\n .subscribe()\n })\n\n this.optionDirectives?.changes.subscribe(() =>\n this._updateDirectiveStates(),\n )\n }\n\n get value(): string | string[] | undefined | null {\n return this.val\n }\n\n set value(value: string | string[] | undefined | null) {\n const _value = this.multiple\n ? value !== null && value !== undefined\n ? coerceArray(value)\n : value\n : value\n\n this.val = this.multiple ? [...((_value as string[]) || [])] : _value || ''\n this.change.emit(this.val)\n if (this.onChange) {\n this.onChange(_value)\n }\n if (this.onTouched) {\n this.onTouched()\n }\n }\n\n writeValue(value: any): void {\n this.value = value\n }\n\n registerOnChange(fn: any): void {\n this.onChange = fn\n }\n\n registerOnTouched(fn: any): void {\n this.onTouched = fn\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled\n }\n\n isSelected(value: string | undefined | null) {\n if (this.multiple) {\n const idx = ((this.value as string[]) || []).findIndex((v) => v === value)\n return idx !== -1\n } else {\n // TODO: Clean this up when the directive no longer allows array value type when multiple is false\n const v =\n Array.isArray(this.value) && this.value.length === 1\n ? this.value[0]\n : this.value\n return v === value\n }\n }\n\n unselectValue(value: string | undefined | null) {\n if (this.multiple) {\n this.value = ((this.value as string[]) || []).filter((v) => v !== value)\n } else {\n this.value = undefined\n }\n }\n\n selectValue(value: string | undefined | null) {\n if (this.multiple) {\n const _value = [...((this.value as string[]) || [])]\n this.value = value ? [..._value, value] : _value\n } else {\n this.value = value\n }\n }\n\n getOptionDirectiveByValue(value: string) {\n if (!this.optionDirectives || this.optionDirectives.length < 1) {\n return null\n }\n\n return this.optionDirectives.toArray().find((opt) => opt.value === value)\n }\n\n private _updateDirectiveStates(): void {\n if (this.optionDirectives) {\n for (const opt of this.optionDirectives.toArray()) {\n this._updateDirectiveState(opt)\n }\n }\n }\n\n private _updateDirectiveState(opt: ToggleGroupOptionDirective): void {\n const selected = this.isSelected(opt.value)\n if (opt.selected !== selected) {\n if (!opt._canUnselect) {\n opt._canUnselect = true\n }\n opt.selected = selected\n }\n if (!this.selectionToggleable) {\n if (!this.multiple || (this.value && this.value.length <= 1)) {\n if (opt.selected) {\n if (opt._canUnselect) {\n opt._canUnselect = false\n }\n } else {\n if (!opt._canUnselect) {\n opt._canUnselect = true\n }\n }\n } else {\n if (!opt._canUnselect) {\n opt._canUnselect = true\n }\n }\n }\n }\n}\n","import { NgModule } from '@angular/core'\n\nimport { ToggleGroupOptionDirective } from './toggle-group-option.directive'\nimport { ToggleGroupDirective } from './toggle-group.directive'\n\n@NgModule({\n imports: [ToggleGroupDirective, ToggleGroupOptionDirective],\n exports: [ToggleGroupDirective, ToggleGroupOptionDirective],\n})\nexport class TheSeamToggleGroupModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;MAea,0BAA0B,CAAA;AACpB,IAAA,IAAI,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAExC,IAAA,qBAAqB;AAE9B,IAAA,IACI,QAAQ,GAAA;QACV,OAAO,IAAI,CAAC,SAAS;IACvB;IACA,IAAI,QAAQ,CAAC,KAAc,EAAA;QACzB,IAAI,CAAC,IAAI,CAAC,YAAY,IAAI,CAAC,KAAK,EAAE;YAChC;QACF;AACA,QAAA,IAAI,CAAC,SAAS,GAAG,qBAAqB,CAAC,KAAK,CAAC;QAC7C,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC;AACzC,QAAA,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE;IAC1B;IACQ,SAAS,GAAG,KAAK;;IAGzB,YAAY,GAAG,IAAI;AAET,IAAA,eAAe,GAAG,IAAI,YAAY,EAAW;AAEvD,IAAA,IACI,qBAAqB,GAAA;QACvB,OAAO,IAAI,CAAC,SAAS;IACvB;AAEA,IAAA,IAAI,KAAK,GAAA;QACP,OAAO,IAAI,CAAC,qBAAqB;IACnC;uGA/BW,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAA1B,0BAA0B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,yBAAA,EAAA,MAAA,EAAA,EAAA,qBAAA,EAAA,uBAAA,EAAA,QAAA,EAAA,UAAA,EAAA,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BACA;;sBACA;;sBAKA;;sBAIA,eAAe;uBAAC,0BAA0B;;;MCpDhC,wBAAwB,CAAA;uGAAxB,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAxB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,wBAAwB,YAHzB,oBAAoB,EAAE,0BAA0B,CAAA,EAAA,OAAA,EAAA,CAChD,oBAAoB,EAAE,0BAA0B,CAAA,EAAA,CAAA;wGAE/C,wBAAwB,EAAA,CAAA;;2FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAJpC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,oBAAoB,EAAE,0BAA0B,CAAC;AAC3D,oBAAA,OAAO,EAAE,CAAC,oBAAoB,EAAE,0BAA0B,CAAC;AAC5D,iBAAA;;;ACRD;;AAEG;;;;"}
@@ -80,8 +80,13 @@ class TheSeamTooltipComponent {
80
80
  const tooltipRect = this.innerElement.nativeElement.getBoundingClientRect();
81
81
  const arrowRect = this.arrowElement.nativeElement.getBoundingClientRect();
82
82
  // Default arrow offset (8px padding + half arrow size)
83
- const defaultArrowOffset = paddingOffset + (effectivePlacement.startsWith('top') || effectivePlacement.startsWith('bottom') ? arrowRect.width / 2 : arrowRect.height / 2);
84
- if (effectivePlacement.startsWith('top') || effectivePlacement.startsWith('bottom')) {
83
+ const defaultArrowOffset = paddingOffset +
84
+ (effectivePlacement.startsWith('top') ||
85
+ effectivePlacement.startsWith('bottom')
86
+ ? arrowRect.width / 2
87
+ : arrowRect.height / 2);
88
+ if (effectivePlacement.startsWith('top') ||
89
+ effectivePlacement.startsWith('bottom')) {
85
90
  // Check if tooltip is too narrow for trigger-aligned positioning
86
91
  if (tooltipRect.width < minDimension) {
87
92
  const arrowLeft = (tooltipRect.width - arrowRect.width) / 2;
@@ -98,11 +103,12 @@ class TheSeamTooltipComponent {
98
103
  return;
99
104
  }
100
105
  // Ensure arrow's left is within rounded corner bounds
101
- const maxArrowLeft = (tooltipRect.width - arrowRect.width) - defaultArrowOffset;
106
+ const maxArrowLeft = tooltipRect.width - arrowRect.width - defaultArrowOffset;
102
107
  const arrowLeft = Math.min(maxArrowLeft, Math.max(defaultArrowOffset, adjustedArrowLeft));
103
108
  this.arrowElement.nativeElement.style.left = `${arrowLeft}px`;
104
109
  }
105
- else if (effectivePlacement.startsWith('left') || effectivePlacement.startsWith('right')) {
110
+ else if (effectivePlacement.startsWith('left') ||
111
+ effectivePlacement.startsWith('right')) {
106
112
  // Check if tooltip is too short for trigger-aligned positioning
107
113
  if (tooltipRect.height < minDimension) {
108
114
  const arrowTop = (tooltipRect.height - arrowRect.height) / 2;
@@ -119,7 +125,7 @@ class TheSeamTooltipComponent {
119
125
  return;
120
126
  }
121
127
  // Ensure arrow's top is within rounded corner bounds
122
- const maxArrowTop = (tooltipRect.height - arrowRect.height) - defaultArrowOffset;
128
+ const maxArrowTop = tooltipRect.height - arrowRect.height - defaultArrowOffset;
123
129
  const arrowTop = Math.min(maxArrowTop, Math.max(defaultArrowOffset, adjustedArrowTop));
124
130
  this.arrowElement.nativeElement.style.top = `${arrowTop}px`;
125
131
  }
@@ -139,8 +145,8 @@ class TheSeamTooltipComponent {
139
145
  this._afterEnter.complete();
140
146
  }
141
147
  }
142
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: TheSeamTooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
143
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.0", type: TheSeamTooltipComponent, isStandalone: true, selector: "seam-tooltip", inputs: { content: "content", tooltipClass: "tooltipClass", context: "context", placement: "placement", actualPlacement: "actualPlacement", tooltipId: "tooltipId", triggerElement: "triggerElement" }, host: { listeners: { "@fadeInOut.start": "_onAnimationStart($event)", "@fadeInOut.done": "_onAnimationDone($event)" }, properties: { "id": "tooltipId", "@fadeInOut": "", "class": "this.hostClasses" }, classAttribute: "tooltip show" }, viewQueries: [{ propertyName: "innerElement", first: true, predicate: ["inner"], descendants: true, static: true }, { propertyName: "arrowElement", first: true, predicate: ["arrow"], descendants: true, static: true }], ngImport: i0, template: "<div #inner class=\"tooltip-inner\" [ngClass]=\"tooltipClass\">\n <!-- String content -->\n <span *ngIf=\"isStringContent\">{{ content }}</span>\n\n <!-- Template content -->\n <ng-container *ngIf=\"isTemplateContent\">\n <ng-container *ngTemplateOutlet=\"templateContent; context: context\"></ng-container>\n </ng-container>\n</div>\n<div #arrow class=\"arrow\"></div>\n", styles: ["::ng-deep .cdk-overlay-pane .tooltip{position:relative}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], animations: [
148
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: TheSeamTooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
149
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.7", type: TheSeamTooltipComponent, isStandalone: true, selector: "seam-tooltip", inputs: { content: "content", tooltipClass: "tooltipClass", context: "context", placement: "placement", actualPlacement: "actualPlacement", tooltipId: "tooltipId", triggerElement: "triggerElement" }, host: { listeners: { "@fadeInOut.start": "_onAnimationStart($event)", "@fadeInOut.done": "_onAnimationDone($event)" }, properties: { "id": "tooltipId", "@fadeInOut": "", "class": "this.hostClasses" }, classAttribute: "tooltip show" }, viewQueries: [{ propertyName: "innerElement", first: true, predicate: ["inner"], descendants: true, static: true }, { propertyName: "arrowElement", first: true, predicate: ["arrow"], descendants: true, static: true }], ngImport: i0, template: "<div #inner class=\"tooltip-inner\" [ngClass]=\"tooltipClass\">\n <!-- String content -->\n <span *ngIf=\"isStringContent\">{{ content }}</span>\n\n <!-- Template content -->\n <ng-container *ngIf=\"isTemplateContent\">\n <ng-container\n *ngTemplateOutlet=\"templateContent; context: context\"\n ></ng-container>\n </ng-container>\n</div>\n<div #arrow class=\"arrow\"></div>\n", styles: ["::ng-deep .cdk-overlay-pane .tooltip{position:relative}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], animations: [
144
150
  trigger('fadeInOut', [
145
151
  transition(':enter', [
146
152
  style({ opacity: 0 }),
@@ -153,7 +159,7 @@ class TheSeamTooltipComponent {
153
159
  ]),
154
160
  ], changeDetection: i0.ChangeDetectionStrategy.OnPush });
155
161
  }
156
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: TheSeamTooltipComponent, decorators: [{
162
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: TheSeamTooltipComponent, decorators: [{
157
163
  type: Component,
158
164
  args: [{ selector: 'seam-tooltip', animations: [
159
165
  trigger('fadeInOut', [
@@ -172,11 +178,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
172
178
  '[@fadeInOut]': '',
173
179
  '(@fadeInOut.start)': '_onAnimationStart($event)',
174
180
  '(@fadeInOut.done)': '_onAnimationDone($event)',
175
- }, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
176
- NgIf,
177
- NgClass,
178
- NgTemplateOutlet,
179
- ], template: "<div #inner class=\"tooltip-inner\" [ngClass]=\"tooltipClass\">\n <!-- String content -->\n <span *ngIf=\"isStringContent\">{{ content }}</span>\n\n <!-- Template content -->\n <ng-container *ngIf=\"isTemplateContent\">\n <ng-container *ngTemplateOutlet=\"templateContent; context: context\"></ng-container>\n </ng-container>\n</div>\n<div #arrow class=\"arrow\"></div>\n", styles: ["::ng-deep .cdk-overlay-pane .tooltip{position:relative}\n"] }]
181
+ }, changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgIf, NgClass, NgTemplateOutlet], template: "<div #inner class=\"tooltip-inner\" [ngClass]=\"tooltipClass\">\n <!-- String content -->\n <span *ngIf=\"isStringContent\">{{ content }}</span>\n\n <!-- Template content -->\n <ng-container *ngIf=\"isTemplateContent\">\n <ng-container\n *ngTemplateOutlet=\"templateContent; context: context\"\n ></ng-container>\n </ng-container>\n</div>\n<div #arrow class=\"arrow\"></div>\n", styles: ["::ng-deep .cdk-overlay-pane .tooltip{position:relative}\n"] }]
180
182
  }], propDecorators: { content: [{
181
183
  type: Input
182
184
  }], tooltipClass: [{
@@ -234,14 +236,26 @@ class TheSeamTooltipDirective {
234
236
  tooltipClass;
235
237
  placement = 'top';
236
238
  container;
237
- get disableTooltip() { return this._disableTooltip.value; }
238
- set disableTooltip(val) { this._disableTooltip.next(coerceBooleanProperty(val)); }
239
+ get disableTooltip() {
240
+ return this._disableTooltip.value;
241
+ }
242
+ set disableTooltip(val) {
243
+ this._disableTooltip.next(coerceBooleanProperty(val));
244
+ }
239
245
  _disableTooltip = new BehaviorSubject(false);
240
- get showDelay() { return this._showDelay.value; }
241
- set showDelay(val) { this._showDelay.next(coerceNumberProperty(val, 500)); }
246
+ get showDelay() {
247
+ return this._showDelay.value;
248
+ }
249
+ set showDelay(val) {
250
+ this._showDelay.next(coerceNumberProperty(val, 500));
251
+ }
242
252
  _showDelay = new BehaviorSubject(500);
243
- get hideDelay() { return this._hideDelay.value; }
244
- set hideDelay(val) { this._hideDelay.next(coerceNumberProperty(val, 0)); }
253
+ get hideDelay() {
254
+ return this._hideDelay.value;
255
+ }
256
+ set hideDelay(val) {
257
+ this._hideDelay.next(coerceNumberProperty(val, 0));
258
+ }
245
259
  _hideDelay = new BehaviorSubject(0);
246
260
  trigger = 'both';
247
261
  _active = false;
@@ -283,13 +297,21 @@ class TheSeamTooltipDirective {
283
297
  const element = this._elementRef.nativeElement;
284
298
  // Mouse events for hover trigger
285
299
  if (this.trigger === 'hover' || this.trigger === 'both') {
286
- fromEvent(element, 'mouseenter').pipe(filter(() => !this._disableTooltip.value && !!this.seamTooltip), takeUntil(this._eventListenersSubject)).subscribe(() => this._scheduleShow());
287
- fromEvent(element, 'mouseleave').pipe(takeUntil(this._eventListenersSubject)).subscribe(() => this._scheduleHide());
300
+ fromEvent(element, 'mouseenter')
301
+ .pipe(filter(() => !this._disableTooltip.value && !!this.seamTooltip), takeUntil(this._eventListenersSubject))
302
+ .subscribe(() => this._scheduleShow());
303
+ fromEvent(element, 'mouseleave')
304
+ .pipe(takeUntil(this._eventListenersSubject))
305
+ .subscribe(() => this._scheduleHide());
288
306
  }
289
307
  // Focus events for focus trigger
290
308
  if (this.trigger === 'focus' || this.trigger === 'both') {
291
- fromEvent(element, 'focus').pipe(filter(() => !this._disableTooltip.value && !!this.seamTooltip), takeUntil(this._eventListenersSubject)).subscribe(() => this._scheduleShow());
292
- fromEvent(element, 'blur').pipe(takeUntil(this._eventListenersSubject)).subscribe(() => this._scheduleHide());
309
+ fromEvent(element, 'focus')
310
+ .pipe(filter(() => !this._disableTooltip.value && !!this.seamTooltip), takeUntil(this._eventListenersSubject))
311
+ .subscribe(() => this._scheduleShow());
312
+ fromEvent(element, 'blur')
313
+ .pipe(takeUntil(this._eventListenersSubject))
314
+ .subscribe(() => this._scheduleHide());
293
315
  }
294
316
  }
295
317
  _scheduleShow() {
@@ -340,7 +362,9 @@ class TheSeamTooltipDirective {
340
362
  this._compRef.instance.triggerElement = this._elementRef.nativeElement;
341
363
  this._compRef.changeDetectorRef.markForCheck();
342
364
  // Listen for position changes to update placement class
343
- positionStrategy.positionChanges.pipe(takeUntil(this._ngUnsubscribe)).subscribe(positionChange => {
365
+ positionStrategy.positionChanges
366
+ .pipe(takeUntil(this._ngUnsubscribe))
367
+ .subscribe((positionChange) => {
344
368
  if (this._compRef && positionChange.connectionPair) {
345
369
  const actualPlacement = this._getPlacementFromConnectionPair(positionChange.connectionPair);
346
370
  this._compRef.instance.actualPlacement = actualPlacement;
@@ -348,7 +372,9 @@ class TheSeamTooltipDirective {
348
372
  }
349
373
  });
350
374
  // Listen for tooltip exit animation
351
- this._compRef.instance._afterExit.pipe(takeUntil(this._ngUnsubscribe)).subscribe(() => {
375
+ this._compRef.instance._afterExit
376
+ .pipe(takeUntil(this._ngUnsubscribe))
377
+ .subscribe(() => {
352
378
  // Only detach if still attached (defensive check since _closeTooltip may have already detached)
353
379
  if (this._overlayRef?.hasAttached()) {
354
380
  this._overlayRef.detach();
@@ -367,10 +393,12 @@ class TheSeamTooltipDirective {
367
393
  this._documentKeydownSubject.complete();
368
394
  this._documentKeydownSubject = new Subject();
369
395
  // Set up document-level Escape key listener
370
- fromEvent(document, 'keydown').pipe(filter(event => {
396
+ fromEvent(document, 'keydown')
397
+ .pipe(filter((event) => {
371
398
  // Check both keyCode and key for better compatibility
372
- return (event.keyCode === ESCAPE || event.key === 'Escape') && this._active;
373
- }), takeUntil(this._documentKeydownSubject), takeUntil(this._ngUnsubscribe)).subscribe(() => this._closeTooltip());
399
+ return ((event.keyCode === ESCAPE || event.key === 'Escape') && this._active);
400
+ }), takeUntil(this._documentKeydownSubject), takeUntil(this._ngUnsubscribe))
401
+ .subscribe(() => this._closeTooltip());
374
402
  }
375
403
  _closeTooltip() {
376
404
  if (!this._active || !this._compRef) {
@@ -408,27 +436,36 @@ class TheSeamTooltipDirective {
408
436
  return ['auto'];
409
437
  }
410
438
  // Parse space-delimited string
411
- const placements = placement.split(/\s+/).filter(p => p.trim());
412
- return placements.filter(p => this._isValidPlacement(p));
439
+ const placements = placement.split(/\s+/).filter((p) => p.trim());
440
+ return placements.filter((p) => this._isValidPlacement(p));
413
441
  }
414
442
  if (Array.isArray(placement)) {
415
- return placement.filter(p => this._isValidPlacement(p));
443
+ return placement.filter((p) => this._isValidPlacement(p));
416
444
  }
417
445
  return [placement];
418
446
  }
419
447
  _isValidPlacement(placement) {
420
448
  const validPlacements = [
421
- 'top', 'top-left', 'top-right',
422
- 'bottom', 'bottom-left', 'bottom-right',
423
- 'left', 'left-top', 'left-bottom',
424
- 'right', 'right-top', 'right-bottom',
449
+ 'top',
450
+ 'top-left',
451
+ 'top-right',
452
+ 'bottom',
453
+ 'bottom-left',
454
+ 'bottom-right',
455
+ 'left',
456
+ 'left-top',
457
+ 'left-bottom',
458
+ 'right',
459
+ 'right-top',
460
+ 'right-bottom',
425
461
  'auto',
426
462
  ];
427
463
  return validPlacements.includes(placement);
428
464
  }
429
465
  _getOverlayPosition() {
430
466
  const positions = this._getPositions();
431
- return this._overlay.position()
467
+ return this._overlay
468
+ .position()
432
469
  .flexibleConnectedTo(this._elementRef)
433
470
  .withPositions(positions)
434
471
  .withFlexibleDimensions(false)
@@ -439,10 +476,30 @@ class TheSeamTooltipDirective {
439
476
  // If 'auto' is specified or no valid placements, return all positions
440
477
  if (parsedPlacements.includes('auto') || parsedPlacements.length === 0) {
441
478
  return [
442
- { originX: 'center', originY: 'top', overlayX: 'center', overlayY: 'bottom' },
443
- { originX: 'center', originY: 'bottom', overlayX: 'center', overlayY: 'top' },
444
- { originX: 'end', originY: 'center', overlayX: 'start', overlayY: 'center' },
445
- { originX: 'start', originY: 'center', overlayX: 'end', overlayY: 'center' },
479
+ {
480
+ originX: 'center',
481
+ originY: 'top',
482
+ overlayX: 'center',
483
+ overlayY: 'bottom',
484
+ },
485
+ {
486
+ originX: 'center',
487
+ originY: 'bottom',
488
+ overlayX: 'center',
489
+ overlayY: 'top',
490
+ },
491
+ {
492
+ originX: 'end',
493
+ originY: 'center',
494
+ overlayX: 'start',
495
+ overlayY: 'center',
496
+ },
497
+ {
498
+ originX: 'start',
499
+ originY: 'center',
500
+ overlayX: 'end',
501
+ overlayY: 'center',
502
+ },
446
503
  ];
447
504
  }
448
505
  // Return positions for specified placements only
@@ -456,36 +513,140 @@ class TheSeamTooltipDirective {
456
513
  _getPositionForPlacement(placement) {
457
514
  switch (placement) {
458
515
  case 'top':
459
- return [{ originX: 'center', originY: 'top', overlayX: 'center', overlayY: 'bottom' }];
516
+ return [
517
+ {
518
+ originX: 'center',
519
+ originY: 'top',
520
+ overlayX: 'center',
521
+ overlayY: 'bottom',
522
+ },
523
+ ];
460
524
  case 'top-left':
461
- return [{ originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' }];
525
+ return [
526
+ {
527
+ originX: 'start',
528
+ originY: 'top',
529
+ overlayX: 'start',
530
+ overlayY: 'bottom',
531
+ },
532
+ ];
462
533
  case 'top-right':
463
- return [{ originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom' }];
534
+ return [
535
+ {
536
+ originX: 'end',
537
+ originY: 'top',
538
+ overlayX: 'end',
539
+ overlayY: 'bottom',
540
+ },
541
+ ];
464
542
  case 'bottom':
465
- return [{ originX: 'center', originY: 'bottom', overlayX: 'center', overlayY: 'top' }];
543
+ return [
544
+ {
545
+ originX: 'center',
546
+ originY: 'bottom',
547
+ overlayX: 'center',
548
+ overlayY: 'top',
549
+ },
550
+ ];
466
551
  case 'bottom-left':
467
- return [{ originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' }];
552
+ return [
553
+ {
554
+ originX: 'start',
555
+ originY: 'bottom',
556
+ overlayX: 'start',
557
+ overlayY: 'top',
558
+ },
559
+ ];
468
560
  case 'bottom-right':
469
- return [{ originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top' }];
561
+ return [
562
+ {
563
+ originX: 'end',
564
+ originY: 'bottom',
565
+ overlayX: 'end',
566
+ overlayY: 'top',
567
+ },
568
+ ];
470
569
  case 'left':
471
- return [{ originX: 'start', originY: 'center', overlayX: 'end', overlayY: 'center' }];
570
+ return [
571
+ {
572
+ originX: 'start',
573
+ originY: 'center',
574
+ overlayX: 'end',
575
+ overlayY: 'center',
576
+ },
577
+ ];
472
578
  case 'left-top':
473
- return [{ originX: 'start', originY: 'top', overlayX: 'end', overlayY: 'top' }];
579
+ return [
580
+ {
581
+ originX: 'start',
582
+ originY: 'top',
583
+ overlayX: 'end',
584
+ overlayY: 'top',
585
+ },
586
+ ];
474
587
  case 'left-bottom':
475
- return [{ originX: 'start', originY: 'bottom', overlayX: 'end', overlayY: 'bottom' }];
588
+ return [
589
+ {
590
+ originX: 'start',
591
+ originY: 'bottom',
592
+ overlayX: 'end',
593
+ overlayY: 'bottom',
594
+ },
595
+ ];
476
596
  case 'right':
477
- return [{ originX: 'end', originY: 'center', overlayX: 'start', overlayY: 'center' }];
597
+ return [
598
+ {
599
+ originX: 'end',
600
+ originY: 'center',
601
+ overlayX: 'start',
602
+ overlayY: 'center',
603
+ },
604
+ ];
478
605
  case 'right-top':
479
- return [{ originX: 'end', originY: 'top', overlayX: 'start', overlayY: 'top' }];
606
+ return [
607
+ {
608
+ originX: 'end',
609
+ originY: 'top',
610
+ overlayX: 'start',
611
+ overlayY: 'top',
612
+ },
613
+ ];
480
614
  case 'right-bottom':
481
- return [{ originX: 'end', originY: 'bottom', overlayX: 'start', overlayY: 'bottom' }];
615
+ return [
616
+ {
617
+ originX: 'end',
618
+ originY: 'bottom',
619
+ overlayX: 'start',
620
+ overlayY: 'bottom',
621
+ },
622
+ ];
482
623
  case 'auto':
483
624
  default:
484
625
  return [
485
- { originX: 'center', originY: 'top', overlayX: 'center', overlayY: 'bottom' },
486
- { originX: 'center', originY: 'bottom', overlayX: 'center', overlayY: 'top' },
487
- { originX: 'end', originY: 'center', overlayX: 'start', overlayY: 'center' },
488
- { originX: 'start', originY: 'center', overlayX: 'end', overlayY: 'center' },
626
+ {
627
+ originX: 'center',
628
+ originY: 'top',
629
+ overlayX: 'center',
630
+ overlayY: 'bottom',
631
+ },
632
+ {
633
+ originX: 'center',
634
+ originY: 'bottom',
635
+ overlayX: 'center',
636
+ overlayY: 'top',
637
+ },
638
+ {
639
+ originX: 'end',
640
+ originY: 'center',
641
+ overlayX: 'start',
642
+ overlayY: 'center',
643
+ },
644
+ {
645
+ originX: 'start',
646
+ originY: 'center',
647
+ overlayX: 'end',
648
+ overlayY: 'center',
649
+ },
489
650
  ];
490
651
  }
491
652
  }
@@ -530,10 +691,10 @@ class TheSeamTooltipDirective {
530
691
  // Default fallback
531
692
  return 'top';
532
693
  }
533
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: TheSeamTooltipDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
534
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.0", type: TheSeamTooltipDirective, isStandalone: true, selector: "[seamTooltip]", inputs: { seamTooltip: "seamTooltip", tooltipClass: "tooltipClass", placement: "placement", container: "container", disableTooltip: "disableTooltip", showDelay: "showDelay", hideDelay: "hideDelay", trigger: "trigger" }, host: { properties: { "attr.aria-describedby": "tooltipOpen() ? _tooltipId : null" } }, exportAs: ["seamTooltip"], usesOnChanges: true, ngImport: i0 });
694
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: TheSeamTooltipDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
695
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.7", type: TheSeamTooltipDirective, isStandalone: true, selector: "[seamTooltip]", inputs: { seamTooltip: "seamTooltip", tooltipClass: "tooltipClass", placement: "placement", container: "container", disableTooltip: "disableTooltip", showDelay: "showDelay", hideDelay: "hideDelay", trigger: "trigger" }, host: { properties: { "attr.aria-describedby": "tooltipOpen() ? _tooltipId : null" } }, exportAs: ["seamTooltip"], usesOnChanges: true, ngImport: i0 });
535
696
  }
536
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: TheSeamTooltipDirective, decorators: [{
697
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: TheSeamTooltipDirective, decorators: [{
537
698
  type: Directive,
538
699
  args: [{
539
700
  selector: '[seamTooltip]',
@@ -561,15 +722,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
561
722
  }] } });
562
723
 
563
724
  class TheSeamTooltipModule {
564
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: TheSeamTooltipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
565
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.0", ngImport: i0, type: TheSeamTooltipModule, imports: [CommonModule,
725
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: TheSeamTooltipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
726
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.7", ngImport: i0, type: TheSeamTooltipModule, imports: [CommonModule,
566
727
  OverlayModule,
567
728
  TheSeamTooltipComponent,
568
729
  TheSeamTooltipDirective], exports: [TheSeamTooltipDirective] });
569
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: TheSeamTooltipModule, imports: [CommonModule,
730
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: TheSeamTooltipModule, imports: [CommonModule,
570
731
  OverlayModule] });
571
732
  }
572
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: TheSeamTooltipModule, decorators: [{
733
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: TheSeamTooltipModule, decorators: [{
573
734
  type: NgModule,
574
735
  args: [{
575
736
  imports: [
@@ -578,9 +739,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
578
739
  TheSeamTooltipComponent,
579
740
  TheSeamTooltipDirective,
580
741
  ],
581
- exports: [
582
- TheSeamTooltipDirective,
583
- ],
742
+ exports: [TheSeamTooltipDirective],
584
743
  }]
585
744
  }] });
586
745