@tedi-design-system/angular 8.2.0-rc.1 → 8.2.0-rc.2

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.
@@ -16932,6 +16932,9 @@ function resolveSlotOptions(value, defaults) {
16932
16932
  }
16933
16933
  return merged;
16934
16934
  }
16935
+ function slotShowsResults(slot) {
16936
+ return slot !== null && slot.hideResults !== true;
16937
+ }
16935
16938
  class TediTableComponent {
16936
16939
  /** Stable identifier used for synthetic ids. */
16937
16940
  id = input(undefined, ...(ngDevMode ? [{ debugName: "id" }] : []));
@@ -17360,32 +17363,19 @@ class TediTableComponent {
17360
17363
  return null;
17361
17364
  return resolveSlotOptions(this.paginationTop(), SLOT_DEFAULTS_TOP);
17362
17365
  }, ...(ngDevMode ? [{ debugName: "resolvedTopSlot" }] : []));
17363
- /**
17364
- * Which slot the `[tediPaginationResults]` projection should be rendered in.
17365
- * Picks whichever paginator actually shows results; defaults to the bottom
17366
- * when both do, falls back to the top when bottom hides results.
17367
- */
17368
- resultsRenderTarget = computed(() => {
17369
- const top = this.resolvedTopSlot();
17370
- const bottom = this.resolvedBottomSlot();
17371
- const topShows = top !== null && top.hideResults !== true;
17372
- const bottomShows = bottom !== null && bottom.hideResults !== true;
17373
- if (bottomShows)
17374
- return "bottom";
17375
- if (topShows)
17376
- return "top";
17377
- return null;
17378
- }, ...(ngDevMode ? [{ debugName: "resultsRenderTarget" }] : []));
17379
17366
  /**
17380
17367
  * Captures a `<ng-template tediPaginationResults>` declared inside the
17381
17368
  * `<tedi-table>` host. Read as a `TemplateRef` (the directive is a bare
17382
17369
  * marker) and forwarded — projected as `<span tediPaginationResults>` — into
17383
- * whichever paginator slot is set to display results.
17370
+ * every paginator slot that displays results, so the top and bottom
17371
+ * paginators show the same label.
17384
17372
  */
17385
17373
  customResultsTemplateRef = contentChild(TediPaginationResultsDirective, ...(ngDevMode ? [{ debugName: "customResultsTemplateRef", read: TemplateRef }] : [{ read: TemplateRef }]));
17386
17374
  customResultsTemplate = computed(() => this.customResultsTemplateRef() ?? null, ...(ngDevMode ? [{ debugName: "customResultsTemplate" }] : []));
17387
- topResultsTemplate = computed(() => this.resultsRenderTarget() === "top" ? this.customResultsTemplate() : null, ...(ngDevMode ? [{ debugName: "topResultsTemplate" }] : []));
17388
- bottomResultsTemplate = computed(() => this.resultsRenderTarget() === "bottom"
17375
+ topResultsTemplate = computed(() => slotShowsResults(this.resolvedTopSlot())
17376
+ ? this.customResultsTemplate()
17377
+ : null, ...(ngDevMode ? [{ debugName: "topResultsTemplate" }] : []));
17378
+ bottomResultsTemplate = computed(() => slotShowsResults(this.resolvedBottomSlot())
17389
17379
  ? this.customResultsTemplate()
17390
17380
  : null, ...(ngDevMode ? [{ debugName: "bottomResultsTemplate" }] : []));
17391
17381
  paginationHostClasses = computed(() => {