@bravobit/bb-foundation 0.44.1 → 0.44.4

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 (151) hide show
  1. package/esm2022/auth/lib/auth.interceptor.mjs +3 -3
  2. package/esm2022/auth/lib/auth.module.mjs +4 -4
  3. package/esm2022/auth/lib/auth.service.mjs +3 -3
  4. package/esm2022/auth/lib/directives/authenticated.directive.mjs +3 -3
  5. package/esm2022/collections/lib/collections.module.mjs +4 -4
  6. package/esm2022/collections/lib/components/collections-actions/collections-actions.component.mjs +3 -3
  7. package/esm2022/collections/lib/components/collections-grid/collections-grid.component.mjs +3 -3
  8. package/esm2022/collections/lib/components/collections-pager/collections-pager.component.mjs +3 -3
  9. package/esm2022/collections/lib/components/collections-table/collections-table.component.mjs +3 -3
  10. package/esm2022/collections/lib/components/collections-table-label/collections-table-label.component.mjs +3 -3
  11. package/esm2022/collections/lib/components/collections-table-sorting/collections-table-sorting.component.mjs +3 -3
  12. package/esm2022/collections/lib/components/collections-viewer/collections-viewer.component.mjs +3 -3
  13. package/esm2022/collections/lib/directives/collections-data-row.directive.mjs +3 -3
  14. package/esm2022/collections/lib/directives/collections-data.directive.mjs +3 -3
  15. package/esm2022/collections/lib/directives/collections-empty.directive.mjs +3 -3
  16. package/esm2022/collections/lib/directives/collections-error.directive.mjs +3 -3
  17. package/esm2022/collections/lib/directives/collections-initial.directive.mjs +3 -3
  18. package/esm2022/collections/lib/directives/collections-item.directive.mjs +3 -3
  19. package/esm2022/combobox/combobox/combobox-container.directive.mjs +3 -3
  20. package/esm2022/combobox/combobox/combobox.component.mjs +3 -3
  21. package/esm2022/combobox/combobox-label.directive.mjs +3 -3
  22. package/esm2022/combobox/combobox-option.directive.mjs +3 -3
  23. package/esm2022/combobox/combobox-panel/combobox-panel.component.mjs +3 -3
  24. package/esm2022/dashboard/lib/dashboard/dashboard.component.mjs +3 -3
  25. package/esm2022/dashboard/lib/dashboard-header/dashboard-header.component.mjs +3 -3
  26. package/esm2022/dashboard/lib/dashboard-menu/dashboard-menu.component.mjs +3 -3
  27. package/esm2022/dashboard/lib/dashboard-menu-item/dashboard-menu-item.component.mjs +3 -3
  28. package/esm2022/dashboard/lib/dashboard-sidebar/dashboard-sidebar.component.mjs +3 -3
  29. package/esm2022/dashboard/lib/dashboard-sidebar-group/dashboard-sidebar-group.component.mjs +3 -3
  30. package/esm2022/dashboard/lib/dashboard-sidebar-item/dashboard-sidebar-item.component.mjs +3 -3
  31. package/esm2022/dashboard/lib/dashboard.module.mjs +4 -4
  32. package/esm2022/dialog/lib/dialog-actions/dialog-actions.component.mjs +3 -3
  33. package/esm2022/dialog/lib/dialog-confirm/dialog-confirm.component.mjs +3 -3
  34. package/esm2022/dialog/lib/dialog-container/dialog-container.component.mjs +3 -3
  35. package/esm2022/dialog/lib/dialog-header/dialog-header.component.mjs +3 -3
  36. package/esm2022/dialog/lib/dialog-link/dialog-link.component.mjs +3 -3
  37. package/esm2022/dialog/lib/dialog-modal/dialog-modal.component.mjs +3 -3
  38. package/esm2022/dialog/lib/dialog-overlay/dialog-overlay.component.mjs +3 -3
  39. package/esm2022/dialog/lib/dialog.insertion.mjs +3 -3
  40. package/esm2022/dialog/lib/dialog.module.mjs +4 -4
  41. package/esm2022/dialog/lib/dialog.service.mjs +3 -3
  42. package/esm2022/dialog/lib/directives/confirm.directive.mjs +3 -3
  43. package/esm2022/elements/lib/avatar/avatar.component.mjs +3 -3
  44. package/esm2022/elements/lib/button/button.component.mjs +9 -9
  45. package/esm2022/elements/lib/checkbox/checkbox.component.mjs +3 -3
  46. package/esm2022/elements/lib/checkbox-group/checkbox-group.component.mjs +3 -3
  47. package/esm2022/elements/lib/date-picker/date-picker.component.mjs +3 -3
  48. package/esm2022/elements/lib/directives/addon.directive.mjs +6 -6
  49. package/esm2022/elements/lib/directives/extra-error-controls.directive.mjs +3 -3
  50. package/esm2022/elements/lib/directives/file-drop.directive.mjs +3 -3
  51. package/esm2022/elements/lib/directives/form-submit.directive.mjs +3 -3
  52. package/esm2022/elements/lib/directives/form-submitter.directive.mjs +3 -3
  53. package/esm2022/elements/lib/directives/image-upload.directive.mjs +3 -3
  54. package/esm2022/elements/lib/directives/input.directive.mjs +3 -3
  55. package/esm2022/elements/lib/elements.module.mjs +4 -4
  56. package/esm2022/elements/lib/file-picker/file-picker.component.mjs +3 -3
  57. package/esm2022/elements/lib/form-control/form-control.component.mjs +3 -3
  58. package/esm2022/elements/lib/form-error/form-error.component.mjs +3 -3
  59. package/esm2022/elements/lib/form-group/form-group.component.mjs +3 -3
  60. package/esm2022/elements/lib/icon/icon.component.mjs +3 -3
  61. package/esm2022/elements/lib/image-picker/image-picker.component.mjs +3 -3
  62. package/esm2022/elements/lib/multi-file-control/multi-file-control.component.mjs +3 -3
  63. package/esm2022/elements/lib/pipes/date.pipe.mjs +3 -3
  64. package/esm2022/elements/lib/pipes/file-image.pipe.mjs +3 -3
  65. package/esm2022/elements/lib/pipes/file-size.pipe.mjs +3 -3
  66. package/esm2022/elements/lib/pipes/relative-time.pipe.mjs +3 -3
  67. package/esm2022/elements/lib/radio-button/radio-button.component.mjs +3 -3
  68. package/esm2022/elements/lib/radio-group/radio-group.component.mjs +3 -3
  69. package/esm2022/elements/lib/spinner/spinner.component.mjs +3 -3
  70. package/esm2022/http/lib/http.module.mjs +4 -4
  71. package/esm2022/http/lib/interceptors/base-url.interceptor.mjs +3 -3
  72. package/esm2022/http/lib/interceptors/error.interceptor.mjs +3 -3
  73. package/esm2022/lib/core/services/exif.service.mjs +3 -3
  74. package/esm2022/lib/core/services/file-loader.service.mjs +3 -3
  75. package/esm2022/lib/core/services/files.service.mjs +3 -3
  76. package/esm2022/lib/core/services/image-converter.service.mjs +3 -3
  77. package/esm2022/lib/core/services/languages.service.mjs +3 -3
  78. package/esm2022/lib/core/services/network.service.mjs +3 -3
  79. package/esm2022/lib/core/services/patch.service.mjs +3 -3
  80. package/esm2022/lib/core/tokens/global-focus-mode.token.mjs +10 -0
  81. package/esm2022/localize/lib/localize.module.mjs +4 -4
  82. package/esm2022/localize/lib/localize.pipe.mjs +3 -3
  83. package/esm2022/localize/lib/localize.service.mjs +3 -3
  84. package/esm2022/localize/lib/views/localize-string/localize-string.component.mjs +3 -3
  85. package/esm2022/localize/lib/views/localize-template.directive.mjs +3 -3
  86. package/esm2022/masking/lib/directives/currency-mask.directive.mjs +3 -3
  87. package/esm2022/masking/lib/directives/date-mask.directive.mjs +3 -3
  88. package/esm2022/masking/lib/directives/input-mask.directive.mjs +3 -3
  89. package/esm2022/masking/lib/masking.module.mjs +4 -4
  90. package/esm2022/masking/lib/masking.service.mjs +3 -3
  91. package/esm2022/notifications/lib/notifications-item/notifications-item.component.mjs +3 -3
  92. package/esm2022/notifications/lib/notifications-list/notifications-list.component.mjs +3 -3
  93. package/esm2022/notifications/lib/notifications.module.mjs +4 -4
  94. package/esm2022/notifications/lib/notifications.service.mjs +3 -3
  95. package/esm2022/permissions/lib/directives/permission.directive.mjs +3 -3
  96. package/esm2022/permissions/lib/permissions.module.mjs +4 -4
  97. package/esm2022/permissions/lib/permissions.service.mjs +3 -3
  98. package/esm2022/public_api.mjs +2 -1
  99. package/esm2022/recaptcha/lib/recaptcha/recaptcha.component.mjs +3 -3
  100. package/esm2022/recaptcha/lib/recaptcha-loader.service.mjs +3 -3
  101. package/esm2022/recaptcha/lib/recaptcha.module.mjs +4 -4
  102. package/esm2022/select/lib/select/select.component.mjs +17 -11
  103. package/esm2022/select/lib/select-label.directive.mjs +3 -3
  104. package/esm2022/select/lib/select-multi-label.directive.mjs +3 -3
  105. package/esm2022/select/lib/select-option-group.directive.mjs +3 -3
  106. package/esm2022/select/lib/select-option.directive.mjs +3 -3
  107. package/esm2022/select/lib/select.module.mjs +4 -4
  108. package/esm2022/storage/lib/storage.service.mjs +3 -3
  109. package/esm2022/table/lib/components/table/table.component.mjs +9 -9
  110. package/esm2022/table/lib/components/table-cell/table-cell.component.mjs +3 -3
  111. package/esm2022/table/lib/components/table-header-cell/table-header-cell.component.mjs +3 -3
  112. package/esm2022/table/lib/components/table-pager/table-pager.component.mjs +3 -3
  113. package/esm2022/table/lib/table.module.mjs +4 -4
  114. package/esm2022/tooltip/lib/tooltip-container/tooltip-container.component.mjs +3 -3
  115. package/esm2022/tooltip/lib/tooltip.directive.mjs +3 -3
  116. package/esm2022/tooltip/lib/tooltip.module.mjs +4 -4
  117. package/esm2022/utils/lib/directives/autosize.directive.mjs +3 -3
  118. package/esm2022/utils/lib/directives/focus-trap.directive.mjs +3 -3
  119. package/esm2022/utils/lib/directives/focus.directive.mjs +13 -10
  120. package/esm2022/utils/lib/directives/template.directive.mjs +3 -3
  121. package/esm2022/utils/lib/utils.module.mjs +4 -4
  122. package/fesm2022/bravobit-bb-foundation-auth.mjs +13 -13
  123. package/fesm2022/bravobit-bb-foundation-collections.mjs +43 -43
  124. package/fesm2022/bravobit-bb-foundation-combobox.mjs +15 -15
  125. package/fesm2022/bravobit-bb-foundation-dashboard.mjs +25 -25
  126. package/fesm2022/bravobit-bb-foundation-dialog.mjs +34 -34
  127. package/fesm2022/bravobit-bb-foundation-elements.mjs +90 -90
  128. package/fesm2022/bravobit-bb-foundation-elements.mjs.map +1 -1
  129. package/fesm2022/bravobit-bb-foundation-http.mjs +10 -10
  130. package/fesm2022/bravobit-bb-foundation-localize.mjs +16 -16
  131. package/fesm2022/bravobit-bb-foundation-masking.mjs +16 -16
  132. package/fesm2022/bravobit-bb-foundation-notifications.mjs +13 -13
  133. package/fesm2022/bravobit-bb-foundation-permissions.mjs +10 -10
  134. package/fesm2022/bravobit-bb-foundation-recaptcha.mjs +10 -10
  135. package/fesm2022/bravobit-bb-foundation-select.mjs +32 -26
  136. package/fesm2022/bravobit-bb-foundation-select.mjs.map +1 -1
  137. package/fesm2022/bravobit-bb-foundation-storage.mjs +3 -3
  138. package/fesm2022/bravobit-bb-foundation-table.mjs +22 -22
  139. package/fesm2022/bravobit-bb-foundation-tooltip.mjs +10 -10
  140. package/fesm2022/bravobit-bb-foundation-utils.mjs +25 -22
  141. package/fesm2022/bravobit-bb-foundation-utils.mjs.map +1 -1
  142. package/fesm2022/bravobit-bb-foundation.mjs +32 -23
  143. package/fesm2022/bravobit-bb-foundation.mjs.map +1 -1
  144. package/lib/core/tokens/global-focus-mode.token.d.ts +4 -0
  145. package/localize/lib/transforms/interpolate.transform.d.ts +1 -1
  146. package/localize/lib/transforms/plural.transform.d.ts +1 -1
  147. package/localize/lib/transforms/reference.transform.d.ts +1 -1
  148. package/package.json +25 -25
  149. package/public_api.d.ts +1 -0
  150. package/select/lib/select/select.component.d.ts +5 -3
  151. package/utils/lib/directives/focus.directive.d.ts +4 -3
@@ -220,12 +220,12 @@ class BbTablePager {
220
220
  .filter(page => page > 0 && page <= totalPages)
221
221
  .map(page => ({ page, active: pageNumber === page }));
222
222
  }
223
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: BbTablePager, deps: [], target: i0.ɵɵFactoryTarget.Component });
224
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.4", type: BbTablePager, isStandalone: true, selector: "bb-table-pager", inputs: { amountOfButtons: "amountOfButtons", showArrowButtons: "showArrowButtons", disabled: ["disabled", "disabled", booleanAttribute], pageNumber: "pageNumber", totalPages: "totalPages" }, host: { properties: { "class.disabled": "disabled" }, classAttribute: "bb-table-pager" }, providers: [
223
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: BbTablePager, deps: [], target: i0.ɵɵFactoryTarget.Component });
224
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.8", type: BbTablePager, isStandalone: true, selector: "bb-table-pager", inputs: { amountOfButtons: "amountOfButtons", showArrowButtons: "showArrowButtons", disabled: ["disabled", "disabled", booleanAttribute], pageNumber: "pageNumber", totalPages: "totalPages" }, host: { properties: { "class.disabled": "disabled" }, classAttribute: "bb-table-pager" }, providers: [
225
225
  { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BbTablePager), multi: true }
226
226
  ], ngImport: i0, template: "<ul class=\"bb-pager-list\">\n <!-- The previous page arrow button. -->\n @if (showArrowButtons) {\n <li class=\"bb-pager-list-item\"\n title=\"Previous page\">\n <button [disabled]=\"isPreviousDisabled$ | async\"\n (click)=\"goToPrevious()\"\n class=\"bb-pager-list-button\"\n type=\"button\">\n <bb-icon src=\"material:keyboard_arrow_left\"></bb-icon>\n </button>\n </li>\n }\n\n <!-- The list of number buttons to navigate through the list. -->\n @if (list$ | async; as list) {\n @for (item of list; track $index) {\n <li [title]=\"'Page ' + item?.page\"\n class=\"bb-pager-list-item\">\n <button (click)=\"goToIndex(item?.page)\"\n [class.active]=\"item?.active\"\n class=\"bb-pager-list-button\"\n type=\"button\">\n {{ item?.page }}\n </button>\n </li>\n }\n }\n\n <!-- The next page arrow button. -->\n @if (showArrowButtons) {\n <li class=\"bb-pager-list-item\"\n title=\"Next page\">\n <button [disabled]=\"isNextDisabled$ | async\"\n (click)=\"goToNext()\"\n class=\"bb-pager-list-button\"\n type=\"button\">\n <bb-icon src=\"material:keyboard_arrow_right\"></bb-icon>\n </button>\n </li>\n }\n</ul>\n", styles: [".bb-table-pager{flex:1;display:flex;align-items:center;justify-content:flex-end}.bb-table-pager.disabled{opacity:.5;-webkit-user-select:none;user-select:none;pointer-events:none}.bb-pager-list{display:flex}.bb-pager-list-item{margin-left:.5rem}.bb-pager-list-button{padding:0;color:#3d464d;line-height:1;min-width:2rem;font-size:1rem;appearance:none;font-weight:500;min-height:2rem;-webkit-user-select:none;user-select:none;align-items:center;display:inline-flex;border-radius:.25rem;justify-content:center;border:1px solid #b6bbc1;transition-duration:.2s;background-color:transparent;transition-timing-function:cubic-bezier(0,0,.2,1);box-shadow:0 .375rem .375rem -.375rem #0000001a;transition-property:color,border-color,opacity,background-color}.bb-pager-list-button:hover,.bb-pager-list-button:focus{background-color:#0000000a}.bb-pager-list-button.active,.bb-pager-list-button.active:hover{color:#2196f3;cursor:default;border-color:#2196f3;background-color:transparent}.bb-pager-list-button:disabled{opacity:.35;cursor:default;pointer-events:none}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "component", type: BbIcon, selector: "bb-icon", inputs: ["alt", "size", "ariaHidden", "unit", "src"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
227
227
  }
228
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: BbTablePager, decorators: [{
228
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: BbTablePager, decorators: [{
229
229
  type: Component,
230
230
  args: [{ selector: 'bb-table-pager', changeDetection: ChangeDetectionStrategy.OnPush, host: {
231
231
  'class': 'bb-table-pager',
@@ -247,10 +247,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImpor
247
247
  }] } });
248
248
 
249
249
  class BbTableColumnDef {
250
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: BbTableColumnDef, deps: [], target: i0.ɵɵFactoryTarget.Directive });
251
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.4", type: BbTableColumnDef, isStandalone: true, selector: "[bbTableColumnDef]", ngImport: i0 });
250
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: BbTableColumnDef, deps: [], target: i0.ɵɵFactoryTarget.Directive });
251
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.8", type: BbTableColumnDef, isStandalone: true, selector: "[bbTableColumnDef]", ngImport: i0 });
252
252
  }
253
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: BbTableColumnDef, decorators: [{
253
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: BbTableColumnDef, decorators: [{
254
254
  type: Directive,
255
255
  args: [{
256
256
  selector: '[bbTableColumnDef]',
@@ -258,10 +258,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImpor
258
258
  }]
259
259
  }] });
260
260
  class BbTableRowDef {
261
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: BbTableRowDef, deps: [], target: i0.ɵɵFactoryTarget.Directive });
262
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.4", type: BbTableRowDef, isStandalone: true, selector: "[bbTableRowDef]", ngImport: i0 });
261
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: BbTableRowDef, deps: [], target: i0.ɵɵFactoryTarget.Directive });
262
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.8", type: BbTableRowDef, isStandalone: true, selector: "[bbTableRowDef]", ngImport: i0 });
263
263
  }
264
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: BbTableRowDef, decorators: [{
264
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: BbTableRowDef, decorators: [{
265
265
  type: Directive,
266
266
  args: [{
267
267
  selector: '[bbTableRowDef]',
@@ -407,10 +407,10 @@ class BbTable {
407
407
  getFormChanges() {
408
408
  return this.form.valueChanges.pipe(startWith(this.form.value));
409
409
  }
410
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: BbTable, deps: [], target: i0.ɵɵFactoryTarget.Component });
411
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.4", type: BbTable, isStandalone: true, selector: "bb-table", inputs: { identifier: "identifier", dataSource: "dataSource", queryFields: "queryFields", sortingStrategy: "sortingStrategy", header: "header", footer: "footer", sizes: "sizes" }, host: { classAttribute: "bb-table" }, queries: [{ propertyName: "tableRowTemplate", first: true, predicate: BbTableRowDef, descendants: true, read: TemplateRef }, { propertyName: "tableColumnTemplates", predicate: BbTableColumnDef, read: TemplateRef }], ngImport: i0, template: "<!--\n This is the header of the table. It can be a user\n defined custom header or just the default header.\n-->\n\n@if ((header === true ? headerTemplate : header); as template) {\n <header class=\"bb-table-top-actions\">\n <ng-container *ngTemplateOutlet=\"template\"></ng-container>\n </header>\n}\n\n<!--\n This is the table that contains the\n rows and columns.\n-->\n\n<div class=\"bb-table-wrapper\">\n @if (isLoading$ | async) {\n <div class=\"bb-table-progress\">\n <div class=\"bb-table-indeterminate\"></div>\n </div>\n }\n <table class=\"bb-table-container\">\n <thead>\n <tr>\n <ng-content select=\"bb-table-header-cell\"></ng-content>\n </tr>\n </thead>\n <tbody>\n @if (data$ | async; as data) {\n @switch (data?.state) {\n @case ('success') {\n @if (!!tableRowTemplate) {\n <ng-container\n *ngTemplateOutlet=\"tableRowTemplate; context: {data: data?.result?.data ?? []}\"></ng-container>\n } @else {\n @for (item of data?.result?.data; track (identifier ? item[identifier] : $index)) {\n <tr>\n @for (template of tableColumnTemplates; track $index) {\n <ng-container\n *ngTemplateOutlet=\"template; context: {item: item}\"></ng-container>\n }\n </tr>\n }\n }\n }\n @case ('empty') {\n <ng-container *ngTemplateOutlet=\"errorTemplate; context: data\"></ng-container>\n }\n @case ('error_datasource') {\n <ng-container *ngTemplateOutlet=\"errorTemplate; context: data\"></ng-container>\n }\n @case ('error_not_found') {\n <ng-container *ngTemplateOutlet=\"errorTemplate; context: data\"></ng-container>\n }\n @case ('error_server') {\n <ng-container *ngTemplateOutlet=\"errorTemplate; context: data\"></ng-container>\n }\n @case ('error_down') {\n <ng-container *ngTemplateOutlet=\"errorTemplate; context: data\"></ng-container>\n }\n @default {\n <ng-container *ngTemplateOutlet=\"errorTemplate; context: data\"></ng-container>\n }\n }\n\n } @else {\n <tr>\n <td [attr.colspan]=\"headerCount\"\n class=\"bb-table-template\">\n <div class=\"bb-table-template-content\">\n {{ 'tables.loading' | bbLocalize }}\n </div>\n </td>\n </tr>\n }\n </tbody>\n </table>\n</div>\n\n@if ((footer === true ? footerTemplate : footer); as template) {\n <footer class=\"bb-table-bottom-actions\">\n <ng-container *ngTemplateOutlet=\"template\"></ng-container>\n </footer>\n}\n\n<!--\n This is the template that will be used when the user has not\n supplied a custom header template.\n-->\n\n<ng-template #headerTemplate>\n <ng-content></ng-content>\n <bb-form-control>\n <input [formControl]=\"queryControl\"\n [placeholder]=\"'tables.search' | bbLocalize\"\n bbInput\n autocomplete=\"off\">\n @if (queryControl?.value?.length <= 0) {\n <bb-icon bbSuffix\n src=\"material:search\">\n </bb-icon>\n } @else {\n <button (click)=\"queryControl?.patchValue('')\"\n bbSuffix\n type=\"button\"\n class=\"bb-table-progress-close-query\">\n <bb-icon src=\"material:close\"></bb-icon>\n </button>\n }\n </bb-form-control>\n</ng-template>\n\n<!--\n This is the template that will be used when the user has not\n supplied a custom footer template.\n-->\n\n<ng-template #footerTemplate>\n @if (sizes?.length > 1) {\n <bb-form-control>\n <select [formControl]=\"pageSizeControl\"\n bbInput\n title=\"Sizes\">\n @for (item of sizes; track item) {\n <option [ngValue]=\"item\">\n {{ item }} / {{ 'tables.page' | bbLocalize }}\n </option>\n }\n </select>\n </bb-form-control>\n }\n\n <bb-table-pager [totalPages]=\"(data$ | async)?.result?.totalPages\"\n [formControl]=\"pageNumberControl\">\n </bb-table-pager>\n</ng-template>\n\n<ng-template #errorTemplate\n let-state=\"state\"\n let-status=\"statusCode\">\n <tr>\n <td [attr.colspan]=\"headerCount\"\n class=\"bb-table-template\">\n <div class=\"bb-table-template-content\">\n <svg xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 64 41\"\n width=\"4rem\"\n height=\"2.5625rem\">\n <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(0 1)\">\n <ellipse cx=\"32\" cy=\"33\" fill=\"#F5F5F5\" rx=\"32\" ry=\"7\"></ellipse>\n <g fill-rule=\"nonzero\" stroke=\"#D9D9D9\">\n <path\n d=\"M55 12.7605604L44.8543047 1.25739633C44.3674414.47382661 43.6558789 0 42.9067617 0H21.0932383c-.7491172 0-1.4606797.47395025-1.947543 1.25739633L9 12.7605604V22h46v-9.2394396z\"></path>\n <path fill=\"#FAFAFA\"\n d=\"M41.6132813 15.9315c0-1.6056489.9936718-2.931266 2.2264179-2.9315H55v18.1371277C55 33.2589574 53.6793867 35 52.0504297 35H11.94957031C10.32052344 35 9 33.2588404 9 31.1371277V13h11.1603008c1.2327461 0 2.226418 1.3228085 2.226418 2.9284574v.0211809c0 1.6056489 1.0049921 2.9015426 2.2377382 2.9015426h14.751086c1.2327461 0 2.2377383-1.3078298 2.2377383-2.9134788V15.9315z\"></path>\n </g>\n </g>\n </svg>\n @if (state; as stateLabel) {\n <span>{{ ('tables.' + stateLabel) | bbLocalize }}</span>\n }\n @if (status; as statusCode) {\n <span class=\"bb-table-template-content-code\">(HTTP {{ statusCode }})</span>\n }\n </div>\n </td>\n </tr>\n</ng-template>\n", styles: [".bb-table{width:100%;display:block;box-shadow:0 .375rem .375rem -.375rem #0000001a}.bb-table.plain{box-shadow:none}.bb-table.plain>.bb-table-wrapper{border-top-left-radius:0;border-top-right-radius:0}.bb-table-wrapper{overflow-x:auto;position:relative;background-color:#fff;border-top-left-radius:.25rem;border-top-right-radius:.25rem}.bb-table-container{width:100%}.bb-table-container td{border-bottom:1px solid #d8d8d8}.bb-table-top-actions{display:flex;flex-wrap:wrap;flex-direction:column;background-color:#fff;justify-content:flex-end;padding:1.5rem 1.5rem .75rem;border-top-left-radius:.25rem;border-bottom:1px solid #d8d8d8;border-top-right-radius:.25rem}.bb-table-top-actions>*{margin-left:0;margin-bottom:.75rem}.bb-table-top-actions+.bb-table-wrapper{border-radius:0}.bb-table-bottom-actions{height:4rem;display:flex;overflow-x:auto;padding:0 1.5rem;align-items:center;background-color:#fff;border-bottom-left-radius:.25rem;border-bottom-right-radius:.25rem}.bb-table-template{border:none;background-color:#f5f5f5;border-bottom:1px solid #d8d8d8}.bb-table-template-content{display:flex;color:#3d464d;padding:1.5rem;line-height:1.2;font-weight:400;text-align:center;font-size:.875rem;min-height:8.75rem;align-items:center;flex-direction:column;justify-content:center}.bb-table-template-content>svg{margin-bottom:.75rem}.bb-table-template-content-code{opacity:.5;margin-top:.25rem;display:inline-block}.bb-table-progress{top:0;left:0;right:0;opacity:0;width:100%;display:block;height:.25rem;overflow:hidden;position:absolute;background-color:#2f408b4d;animation:fadeIn .25s cubic-bezier(0,0,.2,1) .1s forwards}.bb-table-progress .bb-table-indeterminate{background-color:#2f408b}.bb-table-progress .bb-table-indeterminate:before{top:0;left:0;bottom:0;content:\"\";position:absolute;will-change:left,right;background-color:inherit;animation:indeterminate 2.1s cubic-bezier(.65,.815,.735,.395) infinite}.bb-table-progress .bb-table-indeterminate:after{top:0;left:0;bottom:0;content:\"\";position:absolute;animation-delay:1.15s;will-change:left,right;background-color:inherit;animation:indeterminate-short 2.1s cubic-bezier(.165,.84,.44,1) infinite}.bb-table-progress-close-query{padding:0;border:none;border-radius:.25rem;background-color:transparent;transition:background-color .25s cubic-bezier(0,0,.2,1)}.bb-table-progress-close-query:hover{background-color:#00000014}.bb-table-progress-close-query:focus{background-color:#0000001f}.bb-table-progress-close-query:active{background-color:#00000029}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes indeterminate{0%{left:-35%;right:100%}60%{left:100%;right:-90%}to{left:100%;right:-90%}}@keyframes indeterminate-short{0%{left:-200%;right:100%}60%{left:107%;right:-8%}to{left:107%;right:-8%}}@media only screen and (min-width: 768px){.bb-table-top-actions{flex-direction:row}.bb-table-top-actions>*:not(:first-child){margin-left:.75rem;margin-bottom:.75rem}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: BbLocalize, name: "bbLocalize" }, { kind: "component", type: BbFormControl, selector: "bb-form-control", inputs: ["label", "hint", "grouped", "hideErrors"] }, { kind: "directive", type: BbInput, selector: "input[bbInput],textarea[bbInput],select[bbInput]", inputs: ["required"] }, { kind: "component", type: BbIcon, selector: "bb-icon", inputs: ["alt", "size", "ariaHidden", "unit", "src"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: BbSuffix, selector: "[bbSuffix]" }, { kind: "component", type: BbTablePager, selector: "bb-table-pager", inputs: ["amountOfButtons", "showArrowButtons", "disabled", "pageNumber", "totalPages"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
410
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: BbTable, deps: [], target: i0.ɵɵFactoryTarget.Component });
411
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.8", type: BbTable, isStandalone: true, selector: "bb-table", inputs: { identifier: "identifier", dataSource: "dataSource", queryFields: "queryFields", sortingStrategy: "sortingStrategy", header: "header", footer: "footer", sizes: "sizes" }, host: { classAttribute: "bb-table" }, queries: [{ propertyName: "tableRowTemplate", first: true, predicate: BbTableRowDef, descendants: true, read: TemplateRef }, { propertyName: "tableColumnTemplates", predicate: BbTableColumnDef, read: TemplateRef }], ngImport: i0, template: "<!--\n This is the header of the table. It can be a user\n defined custom header or just the default header.\n-->\n\n@if ((header === true ? headerTemplate : header); as template) {\n <header class=\"bb-table-top-actions\">\n <ng-container *ngTemplateOutlet=\"template\"></ng-container>\n </header>\n}\n\n<!--\n This is the table that contains the\n rows and columns.\n-->\n\n<div class=\"bb-table-wrapper\">\n @if (isLoading$ | async) {\n <div class=\"bb-table-progress\">\n <div class=\"bb-table-indeterminate\"></div>\n </div>\n }\n <table class=\"bb-table-container\">\n <thead>\n <tr>\n <ng-content select=\"bb-table-header-cell\"></ng-content>\n </tr>\n </thead>\n <tbody>\n @if (data$ | async; as data) {\n @switch (data?.state) {\n @case ('success') {\n @if (!!tableRowTemplate) {\n <ng-container\n *ngTemplateOutlet=\"tableRowTemplate; context: {data: data?.result?.data ?? []}\"></ng-container>\n } @else {\n @for (item of data?.result?.data; track (identifier ? item[identifier] : $index)) {\n <tr>\n @for (template of tableColumnTemplates; track $index) {\n <ng-container\n *ngTemplateOutlet=\"template; context: {item: item}\"></ng-container>\n }\n </tr>\n }\n }\n }\n @case ('empty') {\n <ng-container *ngTemplateOutlet=\"errorTemplate; context: data\"></ng-container>\n }\n @case ('error_datasource') {\n <ng-container *ngTemplateOutlet=\"errorTemplate; context: data\"></ng-container>\n }\n @case ('error_not_found') {\n <ng-container *ngTemplateOutlet=\"errorTemplate; context: data\"></ng-container>\n }\n @case ('error_server') {\n <ng-container *ngTemplateOutlet=\"errorTemplate; context: data\"></ng-container>\n }\n @case ('error_down') {\n <ng-container *ngTemplateOutlet=\"errorTemplate; context: data\"></ng-container>\n }\n @default {\n <ng-container *ngTemplateOutlet=\"errorTemplate; context: data\"></ng-container>\n }\n }\n\n } @else {\n <tr>\n <td [attr.colspan]=\"headerCount\"\n class=\"bb-table-template\">\n <div class=\"bb-table-template-content\">\n {{ 'tables.loading' | bbLocalize }}\n </div>\n </td>\n </tr>\n }\n </tbody>\n </table>\n</div>\n\n@if ((footer === true ? footerTemplate : footer); as template) {\n <footer class=\"bb-table-bottom-actions\">\n <ng-container *ngTemplateOutlet=\"template\"></ng-container>\n </footer>\n}\n\n<!--\n This is the template that will be used when the user has not\n supplied a custom header template.\n-->\n\n<ng-template #headerTemplate>\n <ng-content></ng-content>\n <bb-form-control>\n <input [formControl]=\"queryControl\"\n [placeholder]=\"'tables.search' | bbLocalize\"\n bbInput\n autocomplete=\"off\">\n @if (queryControl?.value?.length <= 0) {\n <bb-icon bbSuffix\n src=\"material:search\">\n </bb-icon>\n } @else {\n <button (click)=\"queryControl?.patchValue('')\"\n bbSuffix\n type=\"button\"\n class=\"bb-table-progress-close-query\">\n <bb-icon src=\"material:close\"></bb-icon>\n </button>\n }\n </bb-form-control>\n</ng-template>\n\n<!--\n This is the template that will be used when the user has not\n supplied a custom footer template.\n-->\n\n<ng-template #footerTemplate>\n @if (sizes?.length > 1) {\n <bb-form-control>\n <select [formControl]=\"pageSizeControl\"\n bbInput\n title=\"Sizes\">\n @for (item of sizes; track item) {\n <option [ngValue]=\"item\">\n {{ item }} / {{ 'tables.page' | bbLocalize }}\n </option>\n }\n </select>\n </bb-form-control>\n }\n\n <bb-table-pager [totalPages]=\"(data$ | async)?.result?.totalPages\"\n [formControl]=\"pageNumberControl\">\n </bb-table-pager>\n</ng-template>\n\n<ng-template #errorTemplate\n let-state=\"state\"\n let-status=\"statusCode\">\n <tr>\n <td [attr.colspan]=\"headerCount\"\n class=\"bb-table-template\">\n <div class=\"bb-table-template-content\">\n <svg xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 64 41\"\n width=\"4rem\"\n height=\"2.5625rem\">\n <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(0 1)\">\n <ellipse cx=\"32\" cy=\"33\" fill=\"#F5F5F5\" rx=\"32\" ry=\"7\"></ellipse>\n <g fill-rule=\"nonzero\" stroke=\"#D9D9D9\">\n <path\n d=\"M55 12.7605604L44.8543047 1.25739633C44.3674414.47382661 43.6558789 0 42.9067617 0H21.0932383c-.7491172 0-1.4606797.47395025-1.947543 1.25739633L9 12.7605604V22h46v-9.2394396z\"></path>\n <path fill=\"#FAFAFA\"\n d=\"M41.6132813 15.9315c0-1.6056489.9936718-2.931266 2.2264179-2.9315H55v18.1371277C55 33.2589574 53.6793867 35 52.0504297 35H11.94957031C10.32052344 35 9 33.2588404 9 31.1371277V13h11.1603008c1.2327461 0 2.226418 1.3228085 2.226418 2.9284574v.0211809c0 1.6056489 1.0049921 2.9015426 2.2377382 2.9015426h14.751086c1.2327461 0 2.2377383-1.3078298 2.2377383-2.9134788V15.9315z\"></path>\n </g>\n </g>\n </svg>\n @if (state; as stateLabel) {\n <span>{{ ('tables.' + stateLabel) | bbLocalize }}</span>\n }\n @if (status; as statusCode) {\n <span class=\"bb-table-template-content-code\">(HTTP {{ statusCode }})</span>\n }\n </div>\n </td>\n </tr>\n</ng-template>\n", styles: [".bb-table{width:100%;display:block;box-shadow:0 .375rem .375rem -.375rem #0000001a}.bb-table.plain{box-shadow:none}.bb-table.plain>.bb-table-wrapper{border-top-left-radius:0;border-top-right-radius:0}.bb-table-wrapper{overflow-x:auto;position:relative;background-color:#fff;border-top-left-radius:.25rem;border-top-right-radius:.25rem}.bb-table-container{width:100%}.bb-table-container td{border-bottom:1px solid #d8d8d8}.bb-table-top-actions{display:flex;flex-wrap:wrap;flex-direction:column;background-color:#fff;justify-content:flex-end;padding:1.5rem 1.5rem .75rem;border-top-left-radius:.25rem;border-bottom:1px solid #d8d8d8;border-top-right-radius:.25rem}.bb-table-top-actions>*{margin-left:0;margin-bottom:.75rem}.bb-table-top-actions+.bb-table-wrapper{border-radius:0}.bb-table-bottom-actions{height:4rem;display:flex;overflow-x:auto;padding:0 1.5rem;align-items:center;background-color:#fff;border-bottom-left-radius:.25rem;border-bottom-right-radius:.25rem}.bb-table-template{border:none;background-color:#f5f5f5;border-bottom:1px solid #d8d8d8}.bb-table-template-content{display:flex;color:#3d464d;padding:1.5rem;line-height:1.2;font-weight:400;text-align:center;font-size:.875rem;min-height:8.75rem;align-items:center;flex-direction:column;justify-content:center}.bb-table-template-content>svg{margin-bottom:.75rem}.bb-table-template-content-code{opacity:.5;margin-top:.25rem;display:inline-block}.bb-table-progress{top:0;left:0;right:0;opacity:0;width:100%;display:block;height:.25rem;overflow:hidden;position:absolute;background-color:#2f408b4d;animation:fadeIn .25s cubic-bezier(0,0,.2,1) .1s forwards}.bb-table-progress .bb-table-indeterminate{background-color:#2f408b}.bb-table-progress .bb-table-indeterminate:before{top:0;left:0;bottom:0;content:\"\";position:absolute;will-change:left,right;background-color:inherit;animation:indeterminate 2.1s cubic-bezier(.65,.815,.735,.395) infinite}.bb-table-progress .bb-table-indeterminate:after{top:0;left:0;bottom:0;content:\"\";position:absolute;animation-delay:1.15s;will-change:left,right;background-color:inherit;animation:indeterminate-short 2.1s cubic-bezier(.165,.84,.44,1) infinite}.bb-table-progress-close-query{padding:0;border:none;border-radius:.25rem;background-color:transparent;transition:background-color .25s cubic-bezier(0,0,.2,1)}.bb-table-progress-close-query:hover{background-color:#00000014}.bb-table-progress-close-query:focus{background-color:#0000001f}.bb-table-progress-close-query:active{background-color:#00000029}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes indeterminate{0%{left:-35%;right:100%}60%{left:100%;right:-90%}to{left:100%;right:-90%}}@keyframes indeterminate-short{0%{left:-200%;right:100%}60%{left:107%;right:-8%}to{left:107%;right:-8%}}@media only screen and (min-width: 768px){.bb-table-top-actions{flex-direction:row}.bb-table-top-actions>*:not(:first-child){margin-left:.75rem;margin-bottom:.75rem}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: BbLocalize, name: "bbLocalize" }, { kind: "component", type: BbFormControl, selector: "bb-form-control", inputs: ["label", "hint", "grouped", "hideErrors"] }, { kind: "directive", type: BbInput, selector: "input[bbInput],textarea[bbInput],select[bbInput]", inputs: ["required"] }, { kind: "component", type: BbIcon, selector: "bb-icon", inputs: ["alt", "size", "ariaHidden", "unit", "src"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: BbSuffix, selector: "[bbSuffix]" }, { kind: "component", type: BbTablePager, selector: "bb-table-pager", inputs: ["amountOfButtons", "showArrowButtons", "disabled", "pageNumber", "totalPages"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
412
412
  }
413
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: BbTable, decorators: [{
413
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: BbTable, decorators: [{
414
414
  type: Component,
415
415
  args: [{ selector: 'bb-table', host: { 'class': 'bb-table' }, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, preserveWhitespaces: false, standalone: true, imports: [NgTemplateOutlet, AsyncPipe, BbLocalize, BbFormControl, BbInput, BbIcon, ReactiveFormsModule, BbSuffix, BbTablePager, BbLocalize], template: "<!--\n This is the header of the table. It can be a user\n defined custom header or just the default header.\n-->\n\n@if ((header === true ? headerTemplate : header); as template) {\n <header class=\"bb-table-top-actions\">\n <ng-container *ngTemplateOutlet=\"template\"></ng-container>\n </header>\n}\n\n<!--\n This is the table that contains the\n rows and columns.\n-->\n\n<div class=\"bb-table-wrapper\">\n @if (isLoading$ | async) {\n <div class=\"bb-table-progress\">\n <div class=\"bb-table-indeterminate\"></div>\n </div>\n }\n <table class=\"bb-table-container\">\n <thead>\n <tr>\n <ng-content select=\"bb-table-header-cell\"></ng-content>\n </tr>\n </thead>\n <tbody>\n @if (data$ | async; as data) {\n @switch (data?.state) {\n @case ('success') {\n @if (!!tableRowTemplate) {\n <ng-container\n *ngTemplateOutlet=\"tableRowTemplate; context: {data: data?.result?.data ?? []}\"></ng-container>\n } @else {\n @for (item of data?.result?.data; track (identifier ? item[identifier] : $index)) {\n <tr>\n @for (template of tableColumnTemplates; track $index) {\n <ng-container\n *ngTemplateOutlet=\"template; context: {item: item}\"></ng-container>\n }\n </tr>\n }\n }\n }\n @case ('empty') {\n <ng-container *ngTemplateOutlet=\"errorTemplate; context: data\"></ng-container>\n }\n @case ('error_datasource') {\n <ng-container *ngTemplateOutlet=\"errorTemplate; context: data\"></ng-container>\n }\n @case ('error_not_found') {\n <ng-container *ngTemplateOutlet=\"errorTemplate; context: data\"></ng-container>\n }\n @case ('error_server') {\n <ng-container *ngTemplateOutlet=\"errorTemplate; context: data\"></ng-container>\n }\n @case ('error_down') {\n <ng-container *ngTemplateOutlet=\"errorTemplate; context: data\"></ng-container>\n }\n @default {\n <ng-container *ngTemplateOutlet=\"errorTemplate; context: data\"></ng-container>\n }\n }\n\n } @else {\n <tr>\n <td [attr.colspan]=\"headerCount\"\n class=\"bb-table-template\">\n <div class=\"bb-table-template-content\">\n {{ 'tables.loading' | bbLocalize }}\n </div>\n </td>\n </tr>\n }\n </tbody>\n </table>\n</div>\n\n@if ((footer === true ? footerTemplate : footer); as template) {\n <footer class=\"bb-table-bottom-actions\">\n <ng-container *ngTemplateOutlet=\"template\"></ng-container>\n </footer>\n}\n\n<!--\n This is the template that will be used when the user has not\n supplied a custom header template.\n-->\n\n<ng-template #headerTemplate>\n <ng-content></ng-content>\n <bb-form-control>\n <input [formControl]=\"queryControl\"\n [placeholder]=\"'tables.search' | bbLocalize\"\n bbInput\n autocomplete=\"off\">\n @if (queryControl?.value?.length <= 0) {\n <bb-icon bbSuffix\n src=\"material:search\">\n </bb-icon>\n } @else {\n <button (click)=\"queryControl?.patchValue('')\"\n bbSuffix\n type=\"button\"\n class=\"bb-table-progress-close-query\">\n <bb-icon src=\"material:close\"></bb-icon>\n </button>\n }\n </bb-form-control>\n</ng-template>\n\n<!--\n This is the template that will be used when the user has not\n supplied a custom footer template.\n-->\n\n<ng-template #footerTemplate>\n @if (sizes?.length > 1) {\n <bb-form-control>\n <select [formControl]=\"pageSizeControl\"\n bbInput\n title=\"Sizes\">\n @for (item of sizes; track item) {\n <option [ngValue]=\"item\">\n {{ item }} / {{ 'tables.page' | bbLocalize }}\n </option>\n }\n </select>\n </bb-form-control>\n }\n\n <bb-table-pager [totalPages]=\"(data$ | async)?.result?.totalPages\"\n [formControl]=\"pageNumberControl\">\n </bb-table-pager>\n</ng-template>\n\n<ng-template #errorTemplate\n let-state=\"state\"\n let-status=\"statusCode\">\n <tr>\n <td [attr.colspan]=\"headerCount\"\n class=\"bb-table-template\">\n <div class=\"bb-table-template-content\">\n <svg xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 64 41\"\n width=\"4rem\"\n height=\"2.5625rem\">\n <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(0 1)\">\n <ellipse cx=\"32\" cy=\"33\" fill=\"#F5F5F5\" rx=\"32\" ry=\"7\"></ellipse>\n <g fill-rule=\"nonzero\" stroke=\"#D9D9D9\">\n <path\n d=\"M55 12.7605604L44.8543047 1.25739633C44.3674414.47382661 43.6558789 0 42.9067617 0H21.0932383c-.7491172 0-1.4606797.47395025-1.947543 1.25739633L9 12.7605604V22h46v-9.2394396z\"></path>\n <path fill=\"#FAFAFA\"\n d=\"M41.6132813 15.9315c0-1.6056489.9936718-2.931266 2.2264179-2.9315H55v18.1371277C55 33.2589574 53.6793867 35 52.0504297 35H11.94957031C10.32052344 35 9 33.2588404 9 31.1371277V13h11.1603008c1.2327461 0 2.226418 1.3228085 2.226418 2.9284574v.0211809c0 1.6056489 1.0049921 2.9015426 2.2377382 2.9015426h14.751086c1.2327461 0 2.2377383-1.3078298 2.2377383-2.9134788V15.9315z\"></path>\n </g>\n </g>\n </svg>\n @if (state; as stateLabel) {\n <span>{{ ('tables.' + stateLabel) | bbLocalize }}</span>\n }\n @if (status; as statusCode) {\n <span class=\"bb-table-template-content-code\">(HTTP {{ statusCode }})</span>\n }\n </div>\n </td>\n </tr>\n</ng-template>\n", styles: [".bb-table{width:100%;display:block;box-shadow:0 .375rem .375rem -.375rem #0000001a}.bb-table.plain{box-shadow:none}.bb-table.plain>.bb-table-wrapper{border-top-left-radius:0;border-top-right-radius:0}.bb-table-wrapper{overflow-x:auto;position:relative;background-color:#fff;border-top-left-radius:.25rem;border-top-right-radius:.25rem}.bb-table-container{width:100%}.bb-table-container td{border-bottom:1px solid #d8d8d8}.bb-table-top-actions{display:flex;flex-wrap:wrap;flex-direction:column;background-color:#fff;justify-content:flex-end;padding:1.5rem 1.5rem .75rem;border-top-left-radius:.25rem;border-bottom:1px solid #d8d8d8;border-top-right-radius:.25rem}.bb-table-top-actions>*{margin-left:0;margin-bottom:.75rem}.bb-table-top-actions+.bb-table-wrapper{border-radius:0}.bb-table-bottom-actions{height:4rem;display:flex;overflow-x:auto;padding:0 1.5rem;align-items:center;background-color:#fff;border-bottom-left-radius:.25rem;border-bottom-right-radius:.25rem}.bb-table-template{border:none;background-color:#f5f5f5;border-bottom:1px solid #d8d8d8}.bb-table-template-content{display:flex;color:#3d464d;padding:1.5rem;line-height:1.2;font-weight:400;text-align:center;font-size:.875rem;min-height:8.75rem;align-items:center;flex-direction:column;justify-content:center}.bb-table-template-content>svg{margin-bottom:.75rem}.bb-table-template-content-code{opacity:.5;margin-top:.25rem;display:inline-block}.bb-table-progress{top:0;left:0;right:0;opacity:0;width:100%;display:block;height:.25rem;overflow:hidden;position:absolute;background-color:#2f408b4d;animation:fadeIn .25s cubic-bezier(0,0,.2,1) .1s forwards}.bb-table-progress .bb-table-indeterminate{background-color:#2f408b}.bb-table-progress .bb-table-indeterminate:before{top:0;left:0;bottom:0;content:\"\";position:absolute;will-change:left,right;background-color:inherit;animation:indeterminate 2.1s cubic-bezier(.65,.815,.735,.395) infinite}.bb-table-progress .bb-table-indeterminate:after{top:0;left:0;bottom:0;content:\"\";position:absolute;animation-delay:1.15s;will-change:left,right;background-color:inherit;animation:indeterminate-short 2.1s cubic-bezier(.165,.84,.44,1) infinite}.bb-table-progress-close-query{padding:0;border:none;border-radius:.25rem;background-color:transparent;transition:background-color .25s cubic-bezier(0,0,.2,1)}.bb-table-progress-close-query:hover{background-color:#00000014}.bb-table-progress-close-query:focus{background-color:#0000001f}.bb-table-progress-close-query:active{background-color:#00000029}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes indeterminate{0%{left:-35%;right:100%}60%{left:100%;right:-90%}to{left:100%;right:-90%}}@keyframes indeterminate-short{0%{left:-200%;right:100%}60%{left:107%;right:-8%}to{left:107%;right:-8%}}@media only screen and (min-width: 768px){.bb-table-top-actions{flex-direction:row}.bb-table-top-actions>*:not(:first-child){margin-left:.75rem;margin-bottom:.75rem}}\n"] }]
416
416
  }], propDecorators: { tableColumnTemplates: [{
@@ -436,10 +436,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImpor
436
436
  }] } });
437
437
 
438
438
  class BbTableCell {
439
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: BbTableCell, deps: [], target: i0.ɵɵFactoryTarget.Component });
440
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.4", type: BbTableCell, isStandalone: true, selector: "bb-table-cell", host: { classAttribute: "bb-table-cell" }, ngImport: i0, template: "<div>\n <ng-content></ng-content>\n</div>", styles: [".bb-table-cell{color:#848f99;text-align:left;line-height:1.2;font-weight:400;display:table-cell;font-size:.875rem;word-wrap:break-word;vertical-align:middle;padding:.75rem 1.5rem;background-color:#f5f5f5;border-bottom:1px solid #d8d8d8}.bb-table-cell:not(:last-child){border-right:1px solid #d8d8d8}.bb-table-cell.fit{width:1%;white-space:nowrap}.bb-table-cell.left{text-align:left}.bb-table-cell.center{text-align:center}.bb-table-cell.right{text-align:right}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
439
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: BbTableCell, deps: [], target: i0.ɵɵFactoryTarget.Component });
440
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.8", type: BbTableCell, isStandalone: true, selector: "bb-table-cell", host: { classAttribute: "bb-table-cell" }, ngImport: i0, template: "<div>\n <ng-content></ng-content>\n</div>", styles: [".bb-table-cell{color:#848f99;text-align:left;line-height:1.2;font-weight:400;display:table-cell;font-size:.875rem;word-wrap:break-word;vertical-align:middle;padding:.75rem 1.5rem;background-color:#f5f5f5;border-bottom:1px solid #d8d8d8}.bb-table-cell:not(:last-child){border-right:1px solid #d8d8d8}.bb-table-cell.fit{width:1%;white-space:nowrap}.bb-table-cell.left{text-align:left}.bb-table-cell.center{text-align:center}.bb-table-cell.right{text-align:right}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
441
441
  }
442
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: BbTableCell, decorators: [{
442
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: BbTableCell, decorators: [{
443
443
  type: Component,
444
444
  args: [{ selector: 'bb-table-cell', changeDetection: ChangeDetectionStrategy.OnPush, host: { 'class': 'bb-table-cell' }, encapsulation: ViewEncapsulation.None, preserveWhitespaces: false, standalone: true, template: "<div>\n <ng-content></ng-content>\n</div>", styles: [".bb-table-cell{color:#848f99;text-align:left;line-height:1.2;font-weight:400;display:table-cell;font-size:.875rem;word-wrap:break-word;vertical-align:middle;padding:.75rem 1.5rem;background-color:#f5f5f5;border-bottom:1px solid #d8d8d8}.bb-table-cell:not(:last-child){border-right:1px solid #d8d8d8}.bb-table-cell.fit{width:1%;white-space:nowrap}.bb-table-cell.left{text-align:left}.bb-table-cell.center{text-align:center}.bb-table-cell.right{text-align:right}\n"] }]
445
445
  }] });
@@ -545,10 +545,10 @@ class BbTableHeaderCell {
545
545
  logWarning = (message) => {
546
546
  console && console.warn && console.warn(message);
547
547
  };
548
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: BbTableHeaderCell, deps: [{ token: BbTable, host: true, optional: true }, { token: 'name', attribute: true, optional: true }], target: i0.ɵɵFactoryTarget.Component });
549
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.4", type: BbTableHeaderCell, isStandalone: true, selector: "bb-table-header-cell", inputs: { disabled: ["disabled", "disabled", booleanAttribute], sort: "sort" }, host: { listeners: { "click": "onClick()" }, properties: { "class.disabled": "isDisabled" }, classAttribute: "bb-table-header-cell" }, ngImport: i0, template: "<!-- The content. -->\n<ng-content></ng-content>\n\n<!-- The indicator for the sort direction. -->\n@if (valueChanges$ | async; as value) {\n @if (!isDisabled) {\n <button [class.asc]=\"value === 'asc'\"\n [class.desc]=\"value === 'desc'\"\n class=\"bb-table-header-cell-toggle\"\n type=\"button\"></button>\n }\n}\n", styles: [".bb-table-header-cell{height:3rem;color:#212529;cursor:pointer;font-size:1rem;font-weight:500;-webkit-user-select:none;user-select:none;position:relative;display:table-cell;vertical-align:middle;padding:.75rem 1.5rem;border-bottom:1px solid #d8d8d8}.bb-table-header-cell:active>.bb-table-header-cell-toggle{background-color:#00000014}.bb-table-header-cell:not(.disabled){padding-right:3.25rem}.bb-table-header-cell.fit{width:1%;white-space:nowrap}.bb-table-header-cell.left{text-align:left}.bb-table-header-cell.center{text-align:center}.bb-table-header-cell.right{text-align:right}.bb-table-header-cell.disabled{cursor:default;pointer-events:none}.bb-table-header-cell-toggle{top:50%;right:1rem;border:none;width:1.5rem;height:1.5rem;margin-left:auto;position:absolute;border-radius:.25rem;transform:translateY(-50%);background-position:center;background-repeat:no-repeat;background-color:transparent;transition:background-color .2s cubic-bezier(0,0,.2,1);background-image:url('data:image/svg+xml,%3Csvg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 9 15\" width=\"9\" height=\"15\"%3E%3Cpath fill=\"%23dcdcdc\" d=\"M4.5 0L0 7h9z\"%3E%3C/path%3E%3Cpath fill=\"%23dcdcdc\" d=\"M4.5 15L9 8H0z\"%3E%3C/path%3E%3C/svg%3E')}.bb-table-header-cell-toggle.desc{background-image:url('data:image/svg+xml,%3Csvg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 9 15\" width=\"9\" height=\"15\"%3E%3Cpath fill=\"%23dcdcdc\" d=\"M4.5 0L0 7h9z\"%3E%3C/path%3E%3Cpath fill=\"black\" d=\"M4.5 15L9 8H0z\"%3E%3C/path%3E%3C/svg%3E')}.bb-table-header-cell-toggle.asc{background-image:url('data:image/svg+xml,%3Csvg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 9 15\" width=\"9\" height=\"15\"%3E%3Cpath fill=\"black\" d=\"M4.5 0L0 7h9z\"%3E%3C/path%3E%3Cpath fill=\"%23dcdcdc\" d=\"M4.5 15L9 8H0z\"%3E%3C/path%3E%3C/svg%3E')}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
548
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: BbTableHeaderCell, deps: [{ token: BbTable, host: true, optional: true }, { token: 'name', attribute: true, optional: true }], target: i0.ɵɵFactoryTarget.Component });
549
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.8", type: BbTableHeaderCell, isStandalone: true, selector: "bb-table-header-cell", inputs: { disabled: ["disabled", "disabled", booleanAttribute], sort: "sort" }, host: { listeners: { "click": "onClick()" }, properties: { "class.disabled": "isDisabled" }, classAttribute: "bb-table-header-cell" }, ngImport: i0, template: "<!-- The content. -->\n<ng-content></ng-content>\n\n<!-- The indicator for the sort direction. -->\n@if (valueChanges$ | async; as value) {\n @if (!isDisabled) {\n <button [class.asc]=\"value === 'asc'\"\n [class.desc]=\"value === 'desc'\"\n class=\"bb-table-header-cell-toggle\"\n type=\"button\"></button>\n }\n}\n", styles: [".bb-table-header-cell{height:3rem;color:#212529;cursor:pointer;font-size:1rem;font-weight:500;-webkit-user-select:none;user-select:none;position:relative;display:table-cell;vertical-align:middle;padding:.75rem 1.5rem;border-bottom:1px solid #d8d8d8}.bb-table-header-cell:active>.bb-table-header-cell-toggle{background-color:#00000014}.bb-table-header-cell:not(.disabled){padding-right:3.25rem}.bb-table-header-cell.fit{width:1%;white-space:nowrap}.bb-table-header-cell.left{text-align:left}.bb-table-header-cell.center{text-align:center}.bb-table-header-cell.right{text-align:right}.bb-table-header-cell.disabled{cursor:default;pointer-events:none}.bb-table-header-cell-toggle{top:50%;right:1rem;border:none;width:1.5rem;height:1.5rem;margin-left:auto;position:absolute;border-radius:.25rem;transform:translateY(-50%);background-position:center;background-repeat:no-repeat;background-color:transparent;transition:background-color .2s cubic-bezier(0,0,.2,1);background-image:url('data:image/svg+xml,%3Csvg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 9 15\" width=\"9\" height=\"15\"%3E%3Cpath fill=\"%23dcdcdc\" d=\"M4.5 0L0 7h9z\"%3E%3C/path%3E%3Cpath fill=\"%23dcdcdc\" d=\"M4.5 15L9 8H0z\"%3E%3C/path%3E%3C/svg%3E')}.bb-table-header-cell-toggle.desc{background-image:url('data:image/svg+xml,%3Csvg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 9 15\" width=\"9\" height=\"15\"%3E%3Cpath fill=\"%23dcdcdc\" d=\"M4.5 0L0 7h9z\"%3E%3C/path%3E%3Cpath fill=\"black\" d=\"M4.5 15L9 8H0z\"%3E%3C/path%3E%3C/svg%3E')}.bb-table-header-cell-toggle.asc{background-image:url('data:image/svg+xml,%3Csvg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 9 15\" width=\"9\" height=\"15\"%3E%3Cpath fill=\"black\" d=\"M4.5 0L0 7h9z\"%3E%3C/path%3E%3Cpath fill=\"%23dcdcdc\" d=\"M4.5 15L9 8H0z\"%3E%3C/path%3E%3C/svg%3E')}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
550
550
  }
551
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: BbTableHeaderCell, decorators: [{
551
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: BbTableHeaderCell, decorators: [{
552
552
  type: Component,
553
553
  args: [{ selector: 'bb-table-header-cell', changeDetection: ChangeDetectionStrategy.OnPush, host: {
554
554
  'class': 'bb-table-header-cell',
@@ -574,8 +574,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImpor
574
574
  }] } });
575
575
 
576
576
  class TableModule {
577
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: TableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
578
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.4", ngImport: i0, type: TableModule, imports: [BbTable,
577
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: TableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
578
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.8", ngImport: i0, type: TableModule, imports: [BbTable,
579
579
  BbTableColumnDef,
580
580
  BbTableRowDef,
581
581
  BbTableHeaderCell,
@@ -586,10 +586,10 @@ class TableModule {
586
586
  BbTableHeaderCell,
587
587
  BbTableCell,
588
588
  BbTablePager] });
589
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: TableModule, imports: [BbTable,
589
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: TableModule, imports: [BbTable,
590
590
  BbTablePager] });
591
591
  }
592
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: TableModule, decorators: [{
592
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: TableModule, decorators: [{
593
593
  type: NgModule,
594
594
  args: [{
595
595
  imports: [
@@ -15,10 +15,10 @@ class TooltipContainerComponent {
15
15
  .filter(item => !!item)
16
16
  .join(' ');
17
17
  }
18
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: TooltipContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
19
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.4", type: TooltipContainerComponent, isStandalone: true, selector: "bb-tooltip-container", host: { properties: { "class": "this.classBinding" }, classAttribute: "bb-tooltip-container" }, ngImport: i0, template: "<ng-template [bbTemplate]=\"data\">{{ data }}</ng-template>\n", styles: [".bb-tooltip-container{color:#fff;display:block;max-width:25rem;line-height:1.5;-webkit-user-select:none;user-select:none;position:relative;font-size:.875rem;pointer-events:none;border-radius:.5rem;padding:.5rem .75rem;background-color:#111}.bb-tooltip-container:after{width:0;height:0;content:\"\";display:block;position:absolute;border-style:solid}.bb-tooltip-container>small{display:block;font-size:.75rem;margin-top:.25rem;color:#fff6}.bb-tooltip-container-bottom,.bb-tooltip-container-top,.bb-tooltip-container-left,.bb-tooltip-container-right{pointer-events:none}.bb-tooltip-container-top .bb-tooltip-container:after{left:50%;top:100%;transform:translate(-50%);border-width:.5rem .5rem 0 .5rem;border-color:#111111 transparent transparent transparent}.bb-tooltip-container-bottom .bb-tooltip-container:after{left:50%;bottom:100%;transform:translate(-50%);border-width:0 .5rem .5rem .5rem;border-color:transparent transparent #111111 transparent}.bb-tooltip-container-left .bb-tooltip-container:after{top:50%;left:100%;transform:translateY(-50%);border-width:.5rem 0 .5rem .5rem;border-color:transparent transparent transparent #111111}.bb-tooltip-container-right .bb-tooltip-container:after{top:50%;right:100%;transform:translateY(-50%);border-width:.5rem .5rem .5rem 0;border-color:transparent #111111 transparent transparent}\n"], dependencies: [{ kind: "directive", type: BbTemplate, selector: "[bbTemplate]", inputs: ["bbTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
18
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: TooltipContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
19
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.8", type: TooltipContainerComponent, isStandalone: true, selector: "bb-tooltip-container", host: { properties: { "class": "this.classBinding" }, classAttribute: "bb-tooltip-container" }, ngImport: i0, template: "<ng-template [bbTemplate]=\"data\">{{ data }}</ng-template>\n", styles: [".bb-tooltip-container{color:#fff;display:block;max-width:25rem;line-height:1.5;-webkit-user-select:none;user-select:none;position:relative;font-size:.875rem;pointer-events:none;border-radius:.5rem;padding:.5rem .75rem;background-color:#111}.bb-tooltip-container:after{width:0;height:0;content:\"\";display:block;position:absolute;border-style:solid}.bb-tooltip-container>small{display:block;font-size:.75rem;margin-top:.25rem;color:#fff6}.bb-tooltip-container-bottom,.bb-tooltip-container-top,.bb-tooltip-container-left,.bb-tooltip-container-right{pointer-events:none}.bb-tooltip-container-top .bb-tooltip-container:after{left:50%;top:100%;transform:translate(-50%);border-width:.5rem .5rem 0 .5rem;border-color:#111111 transparent transparent transparent}.bb-tooltip-container-bottom .bb-tooltip-container:after{left:50%;bottom:100%;transform:translate(-50%);border-width:0 .5rem .5rem .5rem;border-color:transparent transparent #111111 transparent}.bb-tooltip-container-left .bb-tooltip-container:after{top:50%;left:100%;transform:translateY(-50%);border-width:.5rem 0 .5rem .5rem;border-color:transparent transparent transparent #111111}.bb-tooltip-container-right .bb-tooltip-container:after{top:50%;right:100%;transform:translateY(-50%);border-width:.5rem .5rem .5rem 0;border-color:transparent #111111 transparent transparent}\n"], dependencies: [{ kind: "directive", type: BbTemplate, selector: "[bbTemplate]", inputs: ["bbTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
20
20
  }
21
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: TooltipContainerComponent, decorators: [{
21
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: TooltipContainerComponent, decorators: [{
22
22
  type: Component,
23
23
  args: [{ selector: 'bb-tooltip-container', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: { 'class': 'bb-tooltip-container' }, preserveWhitespaces: false, standalone: true, imports: [BbTemplate], template: "<ng-template [bbTemplate]=\"data\">{{ data }}</ng-template>\n", styles: [".bb-tooltip-container{color:#fff;display:block;max-width:25rem;line-height:1.5;-webkit-user-select:none;user-select:none;position:relative;font-size:.875rem;pointer-events:none;border-radius:.5rem;padding:.5rem .75rem;background-color:#111}.bb-tooltip-container:after{width:0;height:0;content:\"\";display:block;position:absolute;border-style:solid}.bb-tooltip-container>small{display:block;font-size:.75rem;margin-top:.25rem;color:#fff6}.bb-tooltip-container-bottom,.bb-tooltip-container-top,.bb-tooltip-container-left,.bb-tooltip-container-right{pointer-events:none}.bb-tooltip-container-top .bb-tooltip-container:after{left:50%;top:100%;transform:translate(-50%);border-width:.5rem .5rem 0 .5rem;border-color:#111111 transparent transparent transparent}.bb-tooltip-container-bottom .bb-tooltip-container:after{left:50%;bottom:100%;transform:translate(-50%);border-width:0 .5rem .5rem .5rem;border-color:transparent transparent #111111 transparent}.bb-tooltip-container-left .bb-tooltip-container:after{top:50%;left:100%;transform:translateY(-50%);border-width:.5rem 0 .5rem .5rem;border-color:transparent transparent transparent #111111}.bb-tooltip-container-right .bb-tooltip-container:after{top:50%;right:100%;transform:translateY(-50%);border-width:.5rem .5rem .5rem 0;border-color:transparent #111111 transparent transparent}\n"] }]
24
24
  }], propDecorators: { classBinding: [{
@@ -116,10 +116,10 @@ class TooltipDirective {
116
116
  }
117
117
  ];
118
118
  }
119
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: TooltipDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
120
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.4", type: TooltipDirective, isStandalone: true, selector: "[bbTooltip]", inputs: { bbTooltip: "bbTooltip", bbTooltipClass: "bbTooltipClass", bbTooltipOrigin: "bbTooltipOrigin", bbTooltipPositions: "bbTooltipPositions", bbTooltipDisabled: ["bbTooltipDisabled", "bbTooltipDisabled", booleanAttribute] }, host: { listeners: { "mouseenter": "showTooltip()", "focus": "showTooltip()", "mouseleave": "hideTooltip()", "blur": "hideTooltip()" } }, ngImport: i0 });
119
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: TooltipDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
120
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.8", type: TooltipDirective, isStandalone: true, selector: "[bbTooltip]", inputs: { bbTooltip: "bbTooltip", bbTooltipClass: "bbTooltipClass", bbTooltipOrigin: "bbTooltipOrigin", bbTooltipPositions: "bbTooltipPositions", bbTooltipDisabled: ["bbTooltipDisabled", "bbTooltipDisabled", booleanAttribute] }, host: { listeners: { "mouseenter": "showTooltip()", "focus": "showTooltip()", "mouseleave": "hideTooltip()", "blur": "hideTooltip()" } }, ngImport: i0 });
121
121
  }
122
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: TooltipDirective, decorators: [{
122
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: TooltipDirective, decorators: [{
123
123
  type: Directive,
124
124
  args: [{
125
125
  selector: '[bbTooltip]',
@@ -151,11 +151,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImpor
151
151
  }] } });
152
152
 
153
153
  class TooltipModule {
154
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: TooltipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
155
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.4", ngImport: i0, type: TooltipModule, imports: [TooltipDirective], exports: [TooltipDirective] });
156
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: TooltipModule });
154
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: TooltipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
155
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.8", ngImport: i0, type: TooltipModule, imports: [TooltipDirective], exports: [TooltipDirective] });
156
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: TooltipModule });
157
157
  }
158
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: TooltipModule, decorators: [{
158
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: TooltipModule, decorators: [{
159
159
  type: NgModule,
160
160
  args: [{
161
161
  imports: [TooltipDirective],
@@ -1,5 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
- import { TemplateRef, Directive, Input, numberAttribute, HostBinding, HostListener, booleanAttribute, NgModule } from '@angular/core';
2
+ import { TemplateRef, Directive, Input, numberAttribute, HostBinding, HostListener, inject, NgModule } from '@angular/core';
3
+ import { GLOBAL_FOCUS_MODE } from '@bravobit/bb-foundation';
3
4
  import * as i1 from '@angular/cdk/platform';
4
5
 
5
6
  class BbTemplate {
@@ -20,10 +21,10 @@ class BbTemplate {
20
21
  }
21
22
  // Required so that the template type checker can infer the type of the coerced inputs.
22
23
  static ngAcceptInputType_bbTemplate;
23
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: BbTemplate, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
24
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.4", type: BbTemplate, isStandalone: true, selector: "[bbTemplate]", inputs: { bbTemplate: "bbTemplate" }, ngImport: i0 });
24
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: BbTemplate, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
25
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.8", type: BbTemplate, isStandalone: true, selector: "[bbTemplate]", inputs: { bbTemplate: "bbTemplate" }, ngImport: i0 });
25
26
  }
26
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: BbTemplate, decorators: [{
27
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: BbTemplate, decorators: [{
27
28
  type: Directive,
28
29
  args: [{
29
30
  selector: '[bbTemplate]',
@@ -74,10 +75,10 @@ class BbAutosize {
74
75
  setHeight(value) {
75
76
  this._renderer.setStyle(this.element, 'height', value);
76
77
  }
77
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: BbAutosize, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
78
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.4", type: BbAutosize, isStandalone: true, selector: "textarea[bbAutosize]", inputs: { minHeight: "minHeight", maxHeight: "maxHeight", rows: ["rows", "rows", numberAttribute] }, host: { listeners: { "window:resize": "onWindowResize()", "input": "onInputReceived()" }, properties: { "style.min-height": "this.minHeight", "style.max-height": "this.maxHeight", "rows": "this.rows" } }, ngImport: i0 });
78
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: BbAutosize, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
79
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.8", type: BbAutosize, isStandalone: true, selector: "textarea[bbAutosize]", inputs: { minHeight: "minHeight", maxHeight: "maxHeight", rows: ["rows", "rows", numberAttribute] }, host: { listeners: { "window:resize": "onWindowResize()", "input": "onInputReceived()" }, properties: { "style.min-height": "this.minHeight", "style.max-height": "this.maxHeight", "rows": "this.rows" } }, ngImport: i0 });
79
80
  }
80
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: BbAutosize, decorators: [{
81
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: BbAutosize, decorators: [{
81
82
  type: Directive,
82
83
  args: [{
83
84
  selector: 'textarea[bbAutosize]',
@@ -111,8 +112,10 @@ class BbFocus {
111
112
  _zone;
112
113
  _platform;
113
114
  _elementRef;
115
+ // Dependencies.
116
+ _globalFocusMode = inject(GLOBAL_FOCUS_MODE);
114
117
  // Inputs.
115
- bbFocusOnlyDesktop = false;
118
+ bbFocusMode = null;
116
119
  constructor(_zone, _platform, _elementRef) {
117
120
  this._zone = _zone;
118
121
  this._platform = _platform;
@@ -129,7 +132,8 @@ class BbFocus {
129
132
  return this._platform.IOS || this._platform.ANDROID;
130
133
  }
131
134
  focus() {
132
- if (this.bbFocusOnlyDesktop && this.isMobile()) {
135
+ const focusMode = this.bbFocusMode ?? this._globalFocusMode;
136
+ if (focusMode === 'only-desktop' && this.isMobile()) {
133
137
  return;
134
138
  }
135
139
  // Check if set timeout exists and the user is
@@ -144,18 +148,17 @@ class BbFocus {
144
148
  // Execute the focus method in a timeout.
145
149
  setTimeout(() => this.nativeElement.focus(), 0);
146
150
  }
147
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: BbFocus, deps: [{ token: i0.NgZone }, { token: i1.Platform }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
148
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.4", type: BbFocus, isStandalone: true, selector: "[bbFocus]", inputs: { bbFocusOnlyDesktop: ["bbFocusOnlyDesktop", "bbFocusOnlyDesktop", booleanAttribute] }, ngImport: i0 });
151
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: BbFocus, deps: [{ token: i0.NgZone }, { token: i1.Platform }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
152
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.8", type: BbFocus, isStandalone: true, selector: "[bbFocus]", inputs: { bbFocusMode: "bbFocusMode" }, ngImport: i0 });
149
153
  }
150
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: BbFocus, decorators: [{
154
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: BbFocus, decorators: [{
151
155
  type: Directive,
152
156
  args: [{
153
157
  selector: '[bbFocus]',
154
158
  standalone: true
155
159
  }]
156
- }], ctorParameters: () => [{ type: i0.NgZone }, { type: i1.Platform }, { type: i0.ElementRef }], propDecorators: { bbFocusOnlyDesktop: [{
157
- type: Input,
158
- args: [{ transform: booleanAttribute }]
160
+ }], ctorParameters: () => [{ type: i0.NgZone }, { type: i1.Platform }, { type: i0.ElementRef }], propDecorators: { bbFocusMode: [{
161
+ type: Input
159
162
  }] } });
160
163
 
161
164
  class BbFocusTrap {
@@ -221,10 +224,10 @@ class BbFocusTrap {
221
224
  isTabEvent = (event) => {
222
225
  return event?.key === 'Tab' || event?.keyCode === 9;
223
226
  };
224
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: BbFocusTrap, deps: [{ token: i1.Platform }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
225
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.4", type: BbFocusTrap, isStandalone: true, selector: "[bbFocusTrap]", host: { listeners: { "keydown": "onKeydown($event)" } }, ngImport: i0 });
227
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: BbFocusTrap, deps: [{ token: i1.Platform }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
228
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.8", type: BbFocusTrap, isStandalone: true, selector: "[bbFocusTrap]", host: { listeners: { "keydown": "onKeydown($event)" } }, ngImport: i0 });
226
229
  }
227
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: BbFocusTrap, decorators: [{
230
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: BbFocusTrap, decorators: [{
228
231
  type: Directive,
229
232
  args: [{
230
233
  selector: '[bbFocusTrap]',
@@ -236,17 +239,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImpor
236
239
  }] } });
237
240
 
238
241
  class UtilsModule {
239
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: UtilsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
240
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.4", ngImport: i0, type: UtilsModule, imports: [BbTemplate,
242
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: UtilsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
243
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.8", ngImport: i0, type: UtilsModule, imports: [BbTemplate,
241
244
  BbAutosize,
242
245
  BbFocus,
243
246
  BbFocusTrap], exports: [BbTemplate,
244
247
  BbAutosize,
245
248
  BbFocus,
246
249
  BbFocusTrap] });
247
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: UtilsModule });
250
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: UtilsModule });
248
251
  }
249
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: UtilsModule, decorators: [{
252
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: UtilsModule, decorators: [{
250
253
  type: NgModule,
251
254
  args: [{
252
255
  imports: [
@@ -1 +1 @@
1
- {"version":3,"file":"bravobit-bb-foundation-utils.mjs","sources":["../../../projects/bb-foundation/utils/src/lib/directives/template.directive.ts","../../../projects/bb-foundation/utils/src/lib/directives/autosize.directive.ts","../../../projects/bb-foundation/utils/src/lib/directives/focus.directive.ts","../../../projects/bb-foundation/utils/src/lib/directives/focus-trap.directive.ts","../../../projects/bb-foundation/utils/src/lib/utils.module.ts","../../../projects/bb-foundation/utils/src/bravobit-bb-foundation-utils.ts"],"sourcesContent":["import {Directive, Input, TemplateRef, ViewContainerRef} from '@angular/core';\n\n@Directive({\n selector: '[bbTemplate]',\n standalone: true\n})\nexport class BbTemplate {\n\n @Input() set bbTemplate(content: string | TemplateRef<any>) {\n // Get the template.\n const template = content instanceof TemplateRef\n ? content\n : this._templateRef;\n\n // Clear the view container ref and create the view.\n this._viewContainerRef.clear();\n this._viewContainerRef.createEmbeddedView(template);\n }\n\n constructor(private _templateRef: TemplateRef<any>,\n private _viewContainerRef: ViewContainerRef) {\n }\n\n\n // Required so that the template type checker can infer the type of the coerced inputs.\n static ngAcceptInputType_bbTemplate: string | TemplateRef<any>;\n\n}\n","import {AfterViewInit, Directive, ElementRef, HostBinding, HostListener, Input, numberAttribute, Renderer2} from '@angular/core';\n\n@Directive({\n selector: 'textarea[bbAutosize]',\n standalone: true\n})\nexport class BbAutosize implements AfterViewInit {\n\n // Min/max heights for the textarea.\n @Input() @HostBinding('style.min-height') minHeight: string | null = null;\n @Input() @HostBinding('style.max-height') maxHeight: string | null = null;\n @Input({transform: numberAttribute}) @HostBinding('rows') rows: number = 1;\n\n constructor(private _renderer: Renderer2,\n private _elementRef: ElementRef) {\n }\n\n get element() {\n return this._elementRef?.nativeElement as HTMLTextAreaElement;\n }\n\n ngAfterViewInit() {\n // Update the styles after the DOM has loaded.\n this.updateStyles();\n }\n\n @HostListener('window:resize')\n onWindowResize() {\n // Update the styles when the window is resized.\n this.updateStyles();\n }\n\n @HostListener('input')\n onInputReceived() {\n // Update the styles after the textarea received input.\n this.updateStyles();\n }\n\n private updateStyles() {\n // Validate the element exists.\n if (!this.element) {\n return;\n }\n\n // Calculate border height which is not included in the scroll height.\n const borderHeight = this.element?.offsetHeight - this.element?.clientHeight;\n\n // Reset textarea height to auto that correctly calculate the new height.\n this.setHeight('auto');\n\n // Set new height.\n this.setHeight(`${this.element?.scrollHeight + borderHeight}px`);\n }\n\n private setHeight(value: string) {\n this._renderer.setStyle(this.element, 'height', value);\n }\n\n}\n","import {AfterViewInit, booleanAttribute, Directive, ElementRef, Input, NgZone} from '@angular/core';\nimport {Platform} from '@angular/cdk/platform';\n\n@Directive({\n selector: '[bbFocus]',\n standalone: true\n})\nexport class BbFocus implements AfterViewInit {\n\n // Inputs.\n @Input({transform: booleanAttribute}) bbFocusOnlyDesktop: boolean = false;\n\n constructor(private _zone: NgZone,\n private _platform: Platform,\n private _elementRef: ElementRef) {\n }\n\n private get nativeElement() {\n return this._elementRef.nativeElement;\n }\n\n ngAfterViewInit() {\n // Run the method outside the Angular zone.\n this._zone.runOutsideAngular(() => this.focus());\n }\n\n private isMobile() {\n return this._platform.IOS || this._platform.ANDROID;\n }\n\n private focus() {\n if (this.bbFocusOnlyDesktop && this.isMobile()) {\n return;\n }\n\n // Check if set timeout exists and the user is\n // using the site on desktop devices.\n if (!setTimeout) {\n return;\n }\n\n // Check if the element and the focus method exist, if so focus the element.\n if (!this.nativeElement || !this.nativeElement.focus) {\n return;\n }\n\n // Execute the focus method in a timeout.\n setTimeout(() => this.nativeElement.focus(), 0);\n }\n\n}\n","import {Directive, ElementRef, HostListener} from '@angular/core';\nimport {Platform} from '@angular/cdk/platform';\n\n@Directive({\n selector: '[bbFocusTrap]',\n standalone: true\n})\nexport class BbFocusTrap {\n\n private readonly _focusableElements = [\n 'a[href]',\n 'area[href]',\n 'input:not([disabled]):not([type=\"hidden\"]):not([aria-hidden])',\n 'select:not([disabled]):not([aria-hidden])',\n 'textarea:not([disabled]):not([aria-hidden])',\n 'button:not([disabled]):not([aria-hidden])',\n 'iframe',\n 'object',\n 'embed',\n '[contenteditable]',\n '[tabindex]:not([tabindex^=\"-\"])'\n ];\n\n constructor(private _platform: Platform,\n private _elementRef: ElementRef) {\n }\n\n @HostListener('keydown', ['$event'])\n onKeydown(event: KeyboardEvent) {\n // Validate it is a tab event.\n if (!this.isTabEvent(event)) {\n return;\n }\n\n // Trap the focus inside the element.\n return this.trapFocus(event);\n }\n\n trapFocus(event: KeyboardEvent) {\n // Validate that the DOM is available.\n if (!this._platform.isBrowser) {\n return;\n }\n\n // Get all focusable nodes.\n const focusableNodes = this.getFocusableNodes();\n\n // Focus the first available element if the focus\n // is not in the modal.\n if (!this.element.contains(document.activeElement)) {\n return this.focus(focusableNodes[0]);\n }\n\n const focusedItemIndex = focusableNodes.indexOf(document.activeElement);\n\n if (event.shiftKey && focusedItemIndex === 0) {\n this.focus(focusableNodes[focusableNodes.length - 1]);\n return event.preventDefault();\n }\n\n if (!event.shiftKey && focusedItemIndex === focusableNodes.length - 1) {\n this.focus(focusableNodes[0]);\n return event.preventDefault();\n }\n }\n\n private get element() {\n return this._elementRef.nativeElement;\n }\n\n private getFocusableNodes() {\n const nodes = this.element.querySelectorAll(this._focusableElements);\n return Array(...nodes);\n }\n\n private focus = (element: HTMLElement) => {\n return element && element.focus && element.focus();\n };\n\n private isTabEvent = (event: KeyboardEvent) => {\n return event?.key === 'Tab' || event?.keyCode === 9;\n };\n\n}\n","import {BbFocusTrap} from './directives/focus-trap.directive';\nimport {BbTemplate} from './directives/template.directive';\nimport {BbAutosize} from './directives/autosize.directive';\nimport {BbFocus} from './directives/focus.directive';\nimport {NgModule} from '@angular/core';\n\n@NgModule({\n imports: [\n BbTemplate,\n BbAutosize,\n BbFocus,\n BbFocusTrap\n ],\n exports: [\n BbTemplate,\n BbAutosize,\n BbFocus,\n BbFocusTrap\n ]\n})\nexport class UtilsModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;MAMa,UAAU,CAAA;AAaC,IAAA,YAAA,CAAA;AACA,IAAA,iBAAA,CAAA;IAZpB,IAAa,UAAU,CAAC,OAAkC,EAAA;;AAEtD,QAAA,MAAM,QAAQ,GAAG,OAAO,YAAY,WAAW;AAC3C,cAAE,OAAO;AACT,cAAE,IAAI,CAAC,YAAY,CAAC;;AAGxB,QAAA,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE,CAAC;AAC/B,QAAA,IAAI,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;KACvD;IAED,WAAoB,CAAA,YAA8B,EAC9B,iBAAmC,EAAA;QADnC,IAAY,CAAA,YAAA,GAAZ,YAAY,CAAkB;QAC9B,IAAiB,CAAA,iBAAA,GAAjB,iBAAiB,CAAkB;KACtD;;IAID,OAAO,4BAA4B,CAA4B;uGAnBtD,UAAU,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,WAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;2FAAV,UAAU,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,cAAA,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ACN,oBAAA,OAAO,EAAE;wBACL,UAAU;wBACV,UAAU;wBACV,OAAO;wBACP,WAAW;AACd,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL,UAAU;wBACV,UAAU;wBACV,OAAO;wBACP,WAAW;AACd,qBAAA;AACJ,iBAAA,CAAA;;;ACnBD;;AAEG;;;;"}
1
+ {"version":3,"file":"bravobit-bb-foundation-utils.mjs","sources":["../../../projects/bb-foundation/utils/src/lib/directives/template.directive.ts","../../../projects/bb-foundation/utils/src/lib/directives/autosize.directive.ts","../../../projects/bb-foundation/utils/src/lib/directives/focus.directive.ts","../../../projects/bb-foundation/utils/src/lib/directives/focus-trap.directive.ts","../../../projects/bb-foundation/utils/src/lib/utils.module.ts","../../../projects/bb-foundation/utils/src/bravobit-bb-foundation-utils.ts"],"sourcesContent":["import {Directive, Input, TemplateRef, ViewContainerRef} from '@angular/core';\n\n@Directive({\n selector: '[bbTemplate]',\n standalone: true\n})\nexport class BbTemplate {\n\n @Input() set bbTemplate(content: string | TemplateRef<any>) {\n // Get the template.\n const template = content instanceof TemplateRef\n ? content\n : this._templateRef;\n\n // Clear the view container ref and create the view.\n this._viewContainerRef.clear();\n this._viewContainerRef.createEmbeddedView(template);\n }\n\n constructor(private _templateRef: TemplateRef<any>,\n private _viewContainerRef: ViewContainerRef) {\n }\n\n\n // Required so that the template type checker can infer the type of the coerced inputs.\n static ngAcceptInputType_bbTemplate: string | TemplateRef<any>;\n\n}\n","import {AfterViewInit, Directive, ElementRef, HostBinding, HostListener, Input, numberAttribute, Renderer2} from '@angular/core';\n\n@Directive({\n selector: 'textarea[bbAutosize]',\n standalone: true\n})\nexport class BbAutosize implements AfterViewInit {\n\n // Min/max heights for the textarea.\n @Input() @HostBinding('style.min-height') minHeight: string | null = null;\n @Input() @HostBinding('style.max-height') maxHeight: string | null = null;\n @Input({transform: numberAttribute}) @HostBinding('rows') rows: number = 1;\n\n constructor(private _renderer: Renderer2,\n private _elementRef: ElementRef) {\n }\n\n get element() {\n return this._elementRef?.nativeElement as HTMLTextAreaElement;\n }\n\n ngAfterViewInit() {\n // Update the styles after the DOM has loaded.\n this.updateStyles();\n }\n\n @HostListener('window:resize')\n onWindowResize() {\n // Update the styles when the window is resized.\n this.updateStyles();\n }\n\n @HostListener('input')\n onInputReceived() {\n // Update the styles after the textarea received input.\n this.updateStyles();\n }\n\n private updateStyles() {\n // Validate the element exists.\n if (!this.element) {\n return;\n }\n\n // Calculate border height which is not included in the scroll height.\n const borderHeight = this.element?.offsetHeight - this.element?.clientHeight;\n\n // Reset textarea height to auto that correctly calculate the new height.\n this.setHeight('auto');\n\n // Set new height.\n this.setHeight(`${this.element?.scrollHeight + borderHeight}px`);\n }\n\n private setHeight(value: string) {\n this._renderer.setStyle(this.element, 'height', value);\n }\n\n}\n","import {AfterViewInit, Directive, ElementRef, inject, Input, NgZone} from '@angular/core';\nimport {GLOBAL_FOCUS_MODE, FocusMode} from '@bravobit/bb-foundation';\nimport {Platform} from '@angular/cdk/platform';\n\n@Directive({\n selector: '[bbFocus]',\n standalone: true\n})\nexport class BbFocus implements AfterViewInit {\n\n // Dependencies.\n private readonly _globalFocusMode: FocusMode = inject(GLOBAL_FOCUS_MODE);\n\n // Inputs.\n @Input() bbFocusMode: FocusMode | null = null;\n\n constructor(private _zone: NgZone,\n private _platform: Platform,\n private _elementRef: ElementRef) {\n }\n\n private get nativeElement() {\n return this._elementRef.nativeElement;\n }\n\n ngAfterViewInit() {\n // Run the method outside the Angular zone.\n this._zone.runOutsideAngular(() => this.focus());\n }\n\n private isMobile() {\n return this._platform.IOS || this._platform.ANDROID;\n }\n\n private focus() {\n const focusMode = this.bbFocusMode ?? this._globalFocusMode;\n if (focusMode === 'only-desktop' && this.isMobile()) {\n return;\n }\n\n // Check if set timeout exists and the user is\n // using the site on desktop devices.\n if (!setTimeout) {\n return;\n }\n\n // Check if the element and the focus method exist, if so focus the element.\n if (!this.nativeElement || !this.nativeElement.focus) {\n return;\n }\n\n // Execute the focus method in a timeout.\n setTimeout(() => this.nativeElement.focus(), 0);\n }\n\n}\n","import {Directive, ElementRef, HostListener} from '@angular/core';\nimport {Platform} from '@angular/cdk/platform';\n\n@Directive({\n selector: '[bbFocusTrap]',\n standalone: true\n})\nexport class BbFocusTrap {\n\n private readonly _focusableElements = [\n 'a[href]',\n 'area[href]',\n 'input:not([disabled]):not([type=\"hidden\"]):not([aria-hidden])',\n 'select:not([disabled]):not([aria-hidden])',\n 'textarea:not([disabled]):not([aria-hidden])',\n 'button:not([disabled]):not([aria-hidden])',\n 'iframe',\n 'object',\n 'embed',\n '[contenteditable]',\n '[tabindex]:not([tabindex^=\"-\"])'\n ];\n\n constructor(private _platform: Platform,\n private _elementRef: ElementRef) {\n }\n\n @HostListener('keydown', ['$event'])\n onKeydown(event: KeyboardEvent) {\n // Validate it is a tab event.\n if (!this.isTabEvent(event)) {\n return;\n }\n\n // Trap the focus inside the element.\n return this.trapFocus(event);\n }\n\n trapFocus(event: KeyboardEvent) {\n // Validate that the DOM is available.\n if (!this._platform.isBrowser) {\n return;\n }\n\n // Get all focusable nodes.\n const focusableNodes = this.getFocusableNodes();\n\n // Focus the first available element if the focus\n // is not in the modal.\n if (!this.element.contains(document.activeElement)) {\n return this.focus(focusableNodes[0]);\n }\n\n const focusedItemIndex = focusableNodes.indexOf(document.activeElement);\n\n if (event.shiftKey && focusedItemIndex === 0) {\n this.focus(focusableNodes[focusableNodes.length - 1]);\n return event.preventDefault();\n }\n\n if (!event.shiftKey && focusedItemIndex === focusableNodes.length - 1) {\n this.focus(focusableNodes[0]);\n return event.preventDefault();\n }\n }\n\n private get element() {\n return this._elementRef.nativeElement;\n }\n\n private getFocusableNodes() {\n const nodes = this.element.querySelectorAll(this._focusableElements);\n return Array(...nodes);\n }\n\n private focus = (element: HTMLElement) => {\n return element && element.focus && element.focus();\n };\n\n private isTabEvent = (event: KeyboardEvent) => {\n return event?.key === 'Tab' || event?.keyCode === 9;\n };\n\n}\n","import {BbFocusTrap} from './directives/focus-trap.directive';\nimport {BbTemplate} from './directives/template.directive';\nimport {BbAutosize} from './directives/autosize.directive';\nimport {BbFocus} from './directives/focus.directive';\nimport {NgModule} from '@angular/core';\n\n@NgModule({\n imports: [\n BbTemplate,\n BbAutosize,\n BbFocus,\n BbFocusTrap\n ],\n exports: [\n BbTemplate,\n BbAutosize,\n BbFocus,\n BbFocusTrap\n ]\n})\nexport class UtilsModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;MAMa,UAAU,CAAA;AAaC,IAAA,YAAA,CAAA;AACA,IAAA,iBAAA,CAAA;IAZpB,IAAa,UAAU,CAAC,OAAkC,EAAA;;AAEtD,QAAA,MAAM,QAAQ,GAAG,OAAO,YAAY,WAAW;AAC3C,cAAE,OAAO;AACT,cAAE,IAAI,CAAC,YAAY,CAAC;;AAGxB,QAAA,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE,CAAC;AAC/B,QAAA,IAAI,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;KACvD;IAED,WAAoB,CAAA,YAA8B,EAC9B,iBAAmC,EAAA;QADnC,IAAY,CAAA,YAAA,GAAZ,YAAY,CAAkB;QAC9B,IAAiB,CAAA,iBAAA,GAAjB,iBAAiB,CAAkB;KACtD;;IAID,OAAO,4BAA4B,CAA4B;uGAnBtD,UAAU,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,WAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;2FAAV,UAAU,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,EAAA,UAAA,EAAA,YAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAV,UAAU,EAAA,UAAA,EAAA,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