@guildofgleks/ui 21.3.2 → 21.4.0

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.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, inject, input, ChangeDetectionStrategy, Component, output, computed, DestroyRef, TemplateRef, Directive, model, contentChild, ElementRef, signal, effect, untracked, PLATFORM_ID, ApplicationRef, viewChild, afterNextRender, booleanAttribute, Renderer2, viewChildren, contentChildren, forwardRef, Injectable, Injector, afterRenderEffect, ViewContainerRef, linkedSignal } from '@angular/core';
2
+ import { InjectionToken, inject, input, ChangeDetectionStrategy, Component, output, computed, DestroyRef, booleanAttribute, Directive, isDevMode, TemplateRef, model, contentChild, ElementRef, signal, effect, untracked, PLATFORM_ID, ApplicationRef, viewChild, afterNextRender, Renderer2, viewChildren, contentChildren, forwardRef, Injectable, Injector, afterRenderEffect, ViewContainerRef, linkedSignal } from '@angular/core';
3
3
  import { Subject, timer } from 'rxjs';
4
4
  import { throttle } from 'rxjs/operators';
5
5
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
@@ -118,7 +118,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
118
118
 
119
119
  const DEFAULT_DEBOUNCE = 300;
120
120
  /** Built-in default, used when neither the instance input nor `GOG_CONFIG` supplies one. */
121
- const DEFAULT_SIZE$9 = 'md';
121
+ const DEFAULT_SIZE$a = 'md';
122
122
  class ButtonComponent {
123
123
  variant = input('primary', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
124
124
  /** Unset, falls back to `GOG_CONFIG.control.size`, then to `'md'`. */
@@ -157,7 +157,7 @@ class ButtonComponent {
157
157
  };
158
158
  globalConfig = inject(GOG_CONFIG);
159
159
  /** Instance input → `GOG_CONFIG` → the component's own default. See `resolveConfigured`. */
160
- resolvedSize = computed(() => resolveConfigured(this.size(), this.globalConfig.control?.size, DEFAULT_SIZE$9), ...(ngDevMode ? [{ debugName: "resolvedSize" }] : /* istanbul ignore next */ []));
160
+ resolvedSize = computed(() => resolveConfigured(this.size(), this.globalConfig.control?.size, DEFAULT_SIZE$a), ...(ngDevMode ? [{ debugName: "resolvedSize" }] : /* istanbul ignore next */ []));
161
161
  spinnerSize = computed(() => ButtonComponent.SPINNER_SIZE_BY_BUTTON_SIZE[this.resolvedSize()], ...(ngDevMode ? [{ debugName: "spinnerSize" }] : /* istanbul ignore next */ []));
162
162
  resolvedDebounce = computed(() => resolveConfigured(this.debounce(), this.globalConfig.button?.debounce, DEFAULT_DEBOUNCE), ...(ngDevMode ? [{ debugName: "resolvedDebounce" }] : /* istanbul ignore next */ []));
163
163
  /**
@@ -178,7 +178,7 @@ class ButtonComponent {
178
178
  this.click$.next(event);
179
179
  }
180
180
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
181
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: ButtonComponent, isStandalone: true, selector: "gog-button", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, debounce: { classPropertyName: "debounce", publicName: "debounce", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { gogClick: "gogClick" }, host: { properties: { "class.gog-host--full-width": "fullWidth()" } }, ngImport: i0, template: "<button\r\n (click)=\"onClick($event)\"\r\n [attr.aria-busy]=\"loading() ? 'true' : null\"\r\n [attr.aria-disabled]=\"isDisabled() && !isNativeDisabled() ? 'true' : null\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [attr.disabled]=\"isNativeDisabled() ? true : null\"\r\n [class.gog-btn--ghost]=\"variant() === 'ghost'\"\r\n [class.gog-btn--loading]=\"loading()\"\r\n [class.gog-btn--outline]=\"variant() === 'outline'\"\r\n [class.gog-btn--primary]=\"variant() === 'primary'\"\r\n [class.gog-btn--secondary]=\"variant() === 'secondary'\"\r\n [class.gog-cursor-not-allowed]=\"isDisabled()\"\r\n [class.gog-cursor-pointer]=\"!isDisabled()\"\r\n [class.gog-cursor-wait]=\"loading()\"\r\n [type]=\"type()\"\r\n class=\"gog-btn gog-inline-center gog-contained-layout\"\r\n [class]=\"sizeClass()\"\r\n>\r\n @if (loading()) {\r\n <gog-spinner [size]=\"spinnerSize()\" aria-hidden=\"true\" class=\"gog-btn__spinner\" />\r\n }\r\n\r\n <span [class.gog-btn__content--hidden]=\"loading()\" class=\"gog-btn__content\">\r\n <ng-content></ng-content>\r\n </span>\r\n</button>\r\n", styles: [".gog-btn{--gog-spinner-color: var( --gog-btn-spinner-color, var(--gog-btn-variant-spinner-color, var(--gog-btn-primary-spinner-color)) );gap:var(--gog-btn-gap);border:var(--gog-btn-border-width) var(--gog-btn-border-style) var(--gog-btn-border, var(--gog-btn-variant-border, var(--gog-btn-primary-border)));border-radius:var(--gog-btn-radius);padding:var(--gog-btn-padding, var(--gog-btn-size-padding, var(--gog-btn-md-padding)));font-family:var(--gog-btn-font-family);font-weight:var(--gog-btn-font-weight);font-size:var(--gog-btn-font-size, var(--gog-btn-size-font-size, var(--gog-btn-md-font-size)));letter-spacing:var(--gog-btn-letter-spacing);text-transform:var(--gog-btn-text-transform);line-height:var(--gog-btn-line-height);background-color:var(--gog-btn-bg, var(--gog-btn-variant-bg, var(--gog-btn-primary-bg)));color:var(--gog-btn-color, var(--gog-btn-variant-color, var(--gog-btn-primary-color)));box-shadow:var(--gog-btn-shadow, var(--gog-btn-variant-shadow, var(--gog-btn-primary-shadow)));cursor:pointer;transition:background-color var(--gog-btn-transition-duration) var(--gog-easing),box-shadow var(--gog-btn-transition-duration) var(--gog-easing),color var(--gog-btn-transition-duration) var(--gog-easing)}.gog-btn:focus-visible{outline:var(--gog-btn-focus-ring-width) solid var(--gog-btn-hover-bg, var(--gog-btn-variant-hover-bg, var(--gog-btn-primary-hover-bg)));outline-offset:var(--gog-btn-focus-ring-offset)}.gog-btn:hover:not(:disabled){background-color:var(--gog-btn-hover-bg, var(--gog-btn-variant-hover-bg, var(--gog-btn-primary-hover-bg)));color:var(--gog-btn-hover-color, var(--gog-btn-variant-hover-color, var(--gog-btn-primary-hover-color)));box-shadow:var(--gog-btn-hover-shadow, var(--gog-btn-variant-hover-shadow, var(--gog-btn-primary-hover-shadow)))}.gog-btn:active:not(:disabled){transform:scale(var(--gog-btn-active-scale))}@media(prefers-reduced-motion:reduce){.gog-btn{transition:none}.gog-btn:active:not(:disabled){transform:none}}.gog-btn:disabled{opacity:var(--gog-btn-disabled-opacity);cursor:not-allowed}.gog-btn--primary{--gog-btn-variant-bg: var(--gog-btn-primary-bg);--gog-btn-variant-color: var(--gog-btn-primary-color);--gog-btn-variant-border: var(--gog-btn-primary-border);--gog-btn-variant-shadow: var(--gog-btn-primary-shadow);--gog-btn-variant-hover-bg: var(--gog-btn-primary-hover-bg);--gog-btn-variant-hover-color: var(--gog-btn-primary-hover-color);--gog-btn-variant-hover-shadow: var(--gog-btn-primary-hover-shadow);--gog-btn-variant-spinner-color: var(--gog-btn-primary-spinner-color)}.gog-btn--secondary{--gog-btn-variant-bg: var(--gog-btn-secondary-bg);--gog-btn-variant-color: var(--gog-btn-secondary-color);--gog-btn-variant-border: var(--gog-btn-secondary-border);--gog-btn-variant-shadow: var(--gog-btn-secondary-shadow);--gog-btn-variant-hover-bg: var(--gog-btn-secondary-hover-bg);--gog-btn-variant-hover-color: var(--gog-btn-secondary-hover-color);--gog-btn-variant-hover-shadow: var(--gog-btn-secondary-hover-shadow);--gog-btn-variant-spinner-color: var(--gog-btn-secondary-spinner-color)}.gog-btn--outline{--gog-btn-variant-bg: var(--gog-btn-outline-bg);--gog-btn-variant-color: var(--gog-btn-outline-color);--gog-btn-variant-border: var(--gog-btn-outline-border);--gog-btn-variant-shadow: var(--gog-btn-outline-shadow);--gog-btn-variant-hover-bg: var(--gog-btn-outline-hover-bg);--gog-btn-variant-hover-color: var(--gog-btn-outline-hover-color);--gog-btn-variant-hover-shadow: var(--gog-btn-outline-hover-shadow);--gog-btn-variant-spinner-color: var(--gog-btn-outline-spinner-color)}.gog-btn--ghost{--gog-btn-variant-bg: var(--gog-btn-ghost-bg);--gog-btn-variant-color: var(--gog-btn-ghost-color);--gog-btn-variant-border: var(--gog-btn-ghost-border);--gog-btn-variant-shadow: var(--gog-btn-ghost-shadow);--gog-btn-variant-hover-bg: var(--gog-btn-ghost-hover-bg);--gog-btn-variant-hover-color: var(--gog-btn-ghost-hover-color);--gog-btn-variant-hover-shadow: var(--gog-btn-ghost-hover-shadow);--gog-btn-variant-spinner-color: var(--gog-btn-ghost-spinner-color)}.gog-btn--xsm{--gog-btn-size-padding: var(--gog-btn-xsm-padding);--gog-btn-size-font-size: var(--gog-btn-xsm-font-size)}.gog-btn--sm{--gog-btn-size-padding: var(--gog-btn-sm-padding);--gog-btn-size-font-size: var(--gog-btn-sm-font-size)}.gog-btn--md{--gog-btn-size-padding: var(--gog-btn-md-padding);--gog-btn-size-font-size: var(--gog-btn-md-font-size)}.gog-btn--lg{--gog-btn-size-padding: var(--gog-btn-lg-padding);--gog-btn-size-font-size: var(--gog-btn-lg-font-size)}.gog-btn--slg{--gog-btn-size-padding: var(--gog-btn-slg-padding);--gog-btn-size-font-size: var(--gog-btn-slg-font-size)}:host(.gog-host--full-width){display:flex}:host(.gog-host--full-width) .gog-btn{width:100%}.gog-btn--loading{position:relative;pointer-events:none;opacity:var(--gog-btn-loading-opacity)}.gog-btn__content--hidden{visibility:hidden}.gog-btn__spinner{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);max-width:var(--gog-btn-spinner-max-size);max-height:var(--gog-btn-spinner-max-size)}\n"], dependencies: [{ kind: "component", type: SpinnerComponent, selector: "gog-spinner", inputs: ["size", "overlay", "ariaLabel", "variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
181
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: ButtonComponent, isStandalone: true, selector: "gog-button", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, debounce: { classPropertyName: "debounce", publicName: "debounce", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { gogClick: "gogClick" }, host: { properties: { "class.gog-host--full-width": "fullWidth()" } }, ngImport: i0, template: "<button\r\n (click)=\"onClick($event)\"\r\n [attr.aria-busy]=\"loading() ? 'true' : null\"\r\n [attr.aria-disabled]=\"isDisabled() && !isNativeDisabled() ? 'true' : null\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [attr.disabled]=\"isNativeDisabled() ? true : null\"\r\n [class.gog-btn--ghost]=\"variant() === 'ghost'\"\r\n [class.gog-btn--loading]=\"loading()\"\r\n [class.gog-btn--outline]=\"variant() === 'outline'\"\r\n [class.gog-btn--primary]=\"variant() === 'primary'\"\r\n [class.gog-btn--secondary]=\"variant() === 'secondary'\"\r\n [class.gog-cursor-not-allowed]=\"isDisabled()\"\r\n [class.gog-cursor-pointer]=\"!isDisabled()\"\r\n [class.gog-cursor-wait]=\"loading()\"\r\n [type]=\"type()\"\r\n class=\"gog-btn gog-inline-center gog-contained-layout\"\r\n [class]=\"sizeClass()\"\r\n>\r\n @if (loading()) {\r\n <gog-spinner [size]=\"spinnerSize()\" aria-hidden=\"true\" class=\"gog-btn__spinner\" />\r\n }\r\n\r\n <span [class.gog-btn__content--hidden]=\"loading()\" class=\"gog-btn__content\">\r\n <ng-content></ng-content>\r\n </span>\r\n</button>\r\n", styles: ["@charset \"UTF-8\";:host(.gog-host--full-width){display:flex}:host(.gog-host--full-width) .gog-btn{width:100%}\n"], dependencies: [{ kind: "component", type: SpinnerComponent, selector: "gog-spinner", inputs: ["size", "overlay", "ariaLabel", "variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
182
182
  }
183
183
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ButtonComponent, decorators: [{
184
184
  type: Component,
@@ -186,9 +186,87 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
186
186
  // Drives the :host(.gog-host--full-width) rules in the stylesheet — without this
187
187
  // binding the `fullWidth` input has no visible effect.
188
188
  '[class.gog-host--full-width]': 'fullWidth()',
189
- }, template: "<button\r\n (click)=\"onClick($event)\"\r\n [attr.aria-busy]=\"loading() ? 'true' : null\"\r\n [attr.aria-disabled]=\"isDisabled() && !isNativeDisabled() ? 'true' : null\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [attr.disabled]=\"isNativeDisabled() ? true : null\"\r\n [class.gog-btn--ghost]=\"variant() === 'ghost'\"\r\n [class.gog-btn--loading]=\"loading()\"\r\n [class.gog-btn--outline]=\"variant() === 'outline'\"\r\n [class.gog-btn--primary]=\"variant() === 'primary'\"\r\n [class.gog-btn--secondary]=\"variant() === 'secondary'\"\r\n [class.gog-cursor-not-allowed]=\"isDisabled()\"\r\n [class.gog-cursor-pointer]=\"!isDisabled()\"\r\n [class.gog-cursor-wait]=\"loading()\"\r\n [type]=\"type()\"\r\n class=\"gog-btn gog-inline-center gog-contained-layout\"\r\n [class]=\"sizeClass()\"\r\n>\r\n @if (loading()) {\r\n <gog-spinner [size]=\"spinnerSize()\" aria-hidden=\"true\" class=\"gog-btn__spinner\" />\r\n }\r\n\r\n <span [class.gog-btn__content--hidden]=\"loading()\" class=\"gog-btn__content\">\r\n <ng-content></ng-content>\r\n </span>\r\n</button>\r\n", styles: [".gog-btn{--gog-spinner-color: var( --gog-btn-spinner-color, var(--gog-btn-variant-spinner-color, var(--gog-btn-primary-spinner-color)) );gap:var(--gog-btn-gap);border:var(--gog-btn-border-width) var(--gog-btn-border-style) var(--gog-btn-border, var(--gog-btn-variant-border, var(--gog-btn-primary-border)));border-radius:var(--gog-btn-radius);padding:var(--gog-btn-padding, var(--gog-btn-size-padding, var(--gog-btn-md-padding)));font-family:var(--gog-btn-font-family);font-weight:var(--gog-btn-font-weight);font-size:var(--gog-btn-font-size, var(--gog-btn-size-font-size, var(--gog-btn-md-font-size)));letter-spacing:var(--gog-btn-letter-spacing);text-transform:var(--gog-btn-text-transform);line-height:var(--gog-btn-line-height);background-color:var(--gog-btn-bg, var(--gog-btn-variant-bg, var(--gog-btn-primary-bg)));color:var(--gog-btn-color, var(--gog-btn-variant-color, var(--gog-btn-primary-color)));box-shadow:var(--gog-btn-shadow, var(--gog-btn-variant-shadow, var(--gog-btn-primary-shadow)));cursor:pointer;transition:background-color var(--gog-btn-transition-duration) var(--gog-easing),box-shadow var(--gog-btn-transition-duration) var(--gog-easing),color var(--gog-btn-transition-duration) var(--gog-easing)}.gog-btn:focus-visible{outline:var(--gog-btn-focus-ring-width) solid var(--gog-btn-hover-bg, var(--gog-btn-variant-hover-bg, var(--gog-btn-primary-hover-bg)));outline-offset:var(--gog-btn-focus-ring-offset)}.gog-btn:hover:not(:disabled){background-color:var(--gog-btn-hover-bg, var(--gog-btn-variant-hover-bg, var(--gog-btn-primary-hover-bg)));color:var(--gog-btn-hover-color, var(--gog-btn-variant-hover-color, var(--gog-btn-primary-hover-color)));box-shadow:var(--gog-btn-hover-shadow, var(--gog-btn-variant-hover-shadow, var(--gog-btn-primary-hover-shadow)))}.gog-btn:active:not(:disabled){transform:scale(var(--gog-btn-active-scale))}@media(prefers-reduced-motion:reduce){.gog-btn{transition:none}.gog-btn:active:not(:disabled){transform:none}}.gog-btn:disabled{opacity:var(--gog-btn-disabled-opacity);cursor:not-allowed}.gog-btn--primary{--gog-btn-variant-bg: var(--gog-btn-primary-bg);--gog-btn-variant-color: var(--gog-btn-primary-color);--gog-btn-variant-border: var(--gog-btn-primary-border);--gog-btn-variant-shadow: var(--gog-btn-primary-shadow);--gog-btn-variant-hover-bg: var(--gog-btn-primary-hover-bg);--gog-btn-variant-hover-color: var(--gog-btn-primary-hover-color);--gog-btn-variant-hover-shadow: var(--gog-btn-primary-hover-shadow);--gog-btn-variant-spinner-color: var(--gog-btn-primary-spinner-color)}.gog-btn--secondary{--gog-btn-variant-bg: var(--gog-btn-secondary-bg);--gog-btn-variant-color: var(--gog-btn-secondary-color);--gog-btn-variant-border: var(--gog-btn-secondary-border);--gog-btn-variant-shadow: var(--gog-btn-secondary-shadow);--gog-btn-variant-hover-bg: var(--gog-btn-secondary-hover-bg);--gog-btn-variant-hover-color: var(--gog-btn-secondary-hover-color);--gog-btn-variant-hover-shadow: var(--gog-btn-secondary-hover-shadow);--gog-btn-variant-spinner-color: var(--gog-btn-secondary-spinner-color)}.gog-btn--outline{--gog-btn-variant-bg: var(--gog-btn-outline-bg);--gog-btn-variant-color: var(--gog-btn-outline-color);--gog-btn-variant-border: var(--gog-btn-outline-border);--gog-btn-variant-shadow: var(--gog-btn-outline-shadow);--gog-btn-variant-hover-bg: var(--gog-btn-outline-hover-bg);--gog-btn-variant-hover-color: var(--gog-btn-outline-hover-color);--gog-btn-variant-hover-shadow: var(--gog-btn-outline-hover-shadow);--gog-btn-variant-spinner-color: var(--gog-btn-outline-spinner-color)}.gog-btn--ghost{--gog-btn-variant-bg: var(--gog-btn-ghost-bg);--gog-btn-variant-color: var(--gog-btn-ghost-color);--gog-btn-variant-border: var(--gog-btn-ghost-border);--gog-btn-variant-shadow: var(--gog-btn-ghost-shadow);--gog-btn-variant-hover-bg: var(--gog-btn-ghost-hover-bg);--gog-btn-variant-hover-color: var(--gog-btn-ghost-hover-color);--gog-btn-variant-hover-shadow: var(--gog-btn-ghost-hover-shadow);--gog-btn-variant-spinner-color: var(--gog-btn-ghost-spinner-color)}.gog-btn--xsm{--gog-btn-size-padding: var(--gog-btn-xsm-padding);--gog-btn-size-font-size: var(--gog-btn-xsm-font-size)}.gog-btn--sm{--gog-btn-size-padding: var(--gog-btn-sm-padding);--gog-btn-size-font-size: var(--gog-btn-sm-font-size)}.gog-btn--md{--gog-btn-size-padding: var(--gog-btn-md-padding);--gog-btn-size-font-size: var(--gog-btn-md-font-size)}.gog-btn--lg{--gog-btn-size-padding: var(--gog-btn-lg-padding);--gog-btn-size-font-size: var(--gog-btn-lg-font-size)}.gog-btn--slg{--gog-btn-size-padding: var(--gog-btn-slg-padding);--gog-btn-size-font-size: var(--gog-btn-slg-font-size)}:host(.gog-host--full-width){display:flex}:host(.gog-host--full-width) .gog-btn{width:100%}.gog-btn--loading{position:relative;pointer-events:none;opacity:var(--gog-btn-loading-opacity)}.gog-btn__content--hidden{visibility:hidden}.gog-btn__spinner{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);max-width:var(--gog-btn-spinner-max-size);max-height:var(--gog-btn-spinner-max-size)}\n"] }]
189
+ }, template: "<button\r\n (click)=\"onClick($event)\"\r\n [attr.aria-busy]=\"loading() ? 'true' : null\"\r\n [attr.aria-disabled]=\"isDisabled() && !isNativeDisabled() ? 'true' : null\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [attr.disabled]=\"isNativeDisabled() ? true : null\"\r\n [class.gog-btn--ghost]=\"variant() === 'ghost'\"\r\n [class.gog-btn--loading]=\"loading()\"\r\n [class.gog-btn--outline]=\"variant() === 'outline'\"\r\n [class.gog-btn--primary]=\"variant() === 'primary'\"\r\n [class.gog-btn--secondary]=\"variant() === 'secondary'\"\r\n [class.gog-cursor-not-allowed]=\"isDisabled()\"\r\n [class.gog-cursor-pointer]=\"!isDisabled()\"\r\n [class.gog-cursor-wait]=\"loading()\"\r\n [type]=\"type()\"\r\n class=\"gog-btn gog-inline-center gog-contained-layout\"\r\n [class]=\"sizeClass()\"\r\n>\r\n @if (loading()) {\r\n <gog-spinner [size]=\"spinnerSize()\" aria-hidden=\"true\" class=\"gog-btn__spinner\" />\r\n }\r\n\r\n <span [class.gog-btn__content--hidden]=\"loading()\" class=\"gog-btn__content\">\r\n <ng-content></ng-content>\r\n </span>\r\n</button>\r\n", styles: ["@charset \"UTF-8\";:host(.gog-host--full-width){display:flex}:host(.gog-host--full-width) .gog-btn{width:100%}\n"] }]
190
190
  }], ctorParameters: () => [], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], debounce: [{ type: i0.Input, args: [{ isSignal: true, alias: "debounce", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], gogClick: [{ type: i0.Output, args: ["gogClick"] }] } });
191
191
 
192
+ /** Built-in default, used when neither the instance input nor `GOG_CONFIG` supplies one. */
193
+ const DEFAULT_SIZE$9 = 'md';
194
+ /**
195
+ * Makes a consumer's own `<a>` or `<button>` look like a `gog-button`.
196
+ *
197
+ * ```html
198
+ * <a gogButton routerLink="/pricing">See pricing</a>
199
+ * <a gogButton variant="ghost" href="https://example.com" target="_blank" rel="noreferrer">Docs</a>
200
+ * <button gogButton variant="outline" size="sm" type="submit">Save</button>
201
+ * ```
202
+ *
203
+ * ## Why this exists next to `gog-button`
204
+ *
205
+ * `gog-button` renders its own `<button>`, so it can never *be* a link — and making it one would
206
+ * mean brokering the router's entire input surface (`routerLink`, `routerLinkActive`,
207
+ * `queryParams`, `fragment`, `state`, …) through a component that would then have to depend on
208
+ * `@angular/router`. This package has four peer dependencies and no router, and a navigation
209
+ * button is not worth a fifth.
210
+ *
211
+ * Inverting it costs nothing: the consumer keeps their own element, so `routerLink`, `href`,
212
+ * `target`, `download`, `type="submit"`, `disabled` and every future directive keep working
213
+ * because they were never taken away. This is the "headless primitive" axis of
214
+ * `api-design.instructions.md` — expose the behaviour, not another input.
215
+ *
216
+ * ## Which to use
217
+ *
218
+ * Use `gog-button` for a button that *does* something in the page — it adds `loading` with a
219
+ * centred spinner, `debounce` click throttling and the `gogClick` output, none of which a bare
220
+ * element can provide. Use `[gogButton]` when the element must be a link, or when you need to
221
+ * keep directives of your own on it.
222
+ *
223
+ * ## Accessibility
224
+ *
225
+ * The element stays yours, so its semantics stay correct by construction: a link is a link and a
226
+ * button is a button. Two things this deliberately does **not** do:
227
+ *
228
+ * - It does not add `disabled` handling to an `<a>`. There is no such thing — a disabled link is
229
+ * just a link. Remove the `href` or render a real `<button>`.
230
+ * - It does not fake a loading state. `gog-button`'s spinner is a projected child; a directive
231
+ * cannot add one without taking over the element's content.
232
+ */
233
+ class GogButtonDirective {
234
+ variant = input('primary', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
235
+ /** Unset, falls back to `GOG_CONFIG.control.size`, then to `'md'` — as on `gog-button`. */
236
+ size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
237
+ /**
238
+ * Stretches the element to its container's width. A bare attribute is enough:
239
+ * `<a gogButton fullWidth>`.
240
+ */
241
+ fullWidth = input(false, { ...(ngDevMode ? { debugName: "fullWidth" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
242
+ globalConfig = inject(GOG_CONFIG);
243
+ resolvedSize = computed(() => resolveConfigured(this.size(), this.globalConfig.control?.size, DEFAULT_SIZE$9), ...(ngDevMode ? [{ debugName: "resolvedSize" }] : /* istanbul ignore next */ []));
244
+ variantClass = computed(() => `gog-btn--${this.variant()}`, ...(ngDevMode ? [{ debugName: "variantClass" }] : /* istanbul ignore next */ []));
245
+ /**
246
+ * Unlike `gog-button`, this emits a class for `'md'` too. The component can leave the default
247
+ * size unclassed because its own stylesheet bottoms out at `--gog-btn-md-*`; here the class is
248
+ * also what a consumer reads in devtools to see which size is applied, and a silently absent
249
+ * one reads as "no size resolved".
250
+ */
251
+ sizeClass = computed(() => `gog-btn--${this.resolvedSize()}`, ...(ngDevMode ? [{ debugName: "sizeClass" }] : /* istanbul ignore next */ []));
252
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: GogButtonDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
253
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.17", type: GogButtonDirective, isStandalone: true, selector: "a[gogButton], button[gogButton]", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "variantClass() + \" \" + sizeClass()", "class.gog-btn--full-width": "fullWidth()" }, classAttribute: "gog-btn gog-inline-center gog-contained-layout" }, ngImport: i0 });
254
+ }
255
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: GogButtonDirective, decorators: [{
256
+ type: Directive,
257
+ args: [{
258
+ // Restricted to `a` and `button` rather than a bare `[gogButton]`: on a `<div>` or `<span>` the
259
+ // result looks like a button and is invisible to the keyboard and to assistive tech, and that
260
+ // is exactly the mistake this directive would otherwise make easy.
261
+ selector: 'a[gogButton], button[gogButton]',
262
+ host: {
263
+ class: 'gog-btn gog-inline-center gog-contained-layout',
264
+ '[class]': 'variantClass() + " " + sizeClass()',
265
+ '[class.gog-btn--full-width]': 'fullWidth()',
266
+ },
267
+ }]
268
+ }], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }] } });
269
+
192
270
  const VERTICAL_ARROWS = ['ArrowDown', 'ArrowUp'];
193
271
  const HORIZONTAL_ARROWS = ['ArrowRight', 'ArrowLeft'];
194
272
  const EDGE_KEYS = ['Home', 'End'];
@@ -273,6 +351,31 @@ function handleRovingFocusKeydown(event, items, options = {}) {
273
351
  return true;
274
352
  }
275
353
 
354
+ /*
355
+ * The glyphs are from **Lucide** (https://lucide.dev), ISC licensed:
356
+ *
357
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather
358
+ * (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
359
+ *
360
+ * Permission to use, copy, modify, and/or distribute this software for any purpose with or
361
+ * without fee is hereby granted, provided that the above copyright notice and this permission
362
+ * notice appear in all copies.
363
+ *
364
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO
365
+ * THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT
366
+ * SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR
367
+ * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
368
+ * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
369
+ * OR PERFORMANCE OF THIS SOFTWARE.
370
+ *
371
+ * They are inlined rather than pulled from `lucide` so the package keeps zero runtime
372
+ * dependencies. Anything added here must be a Lucide glyph too: a 24×24 grid, `stroke-width`
373
+ * 2, round caps and joins. Mixing in a set drawn for a different weight (Heroicons is drawn for
374
+ * 1.5) shows up immediately as uneven visual mass in a row of icons.
375
+ *
376
+ * An app that wants a different set does not need a fork — `provideGogIcons` overrides any of
377
+ * these by name.
378
+ */
276
379
  const ICON_DEFS = {
277
380
  check: `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check-icon lucide-check"><path d="M20 6 9 17l-5-5"/></svg>`,
278
381
  close: `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-x-icon lucide-x"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>`,
@@ -294,38 +397,150 @@ const ICON_DEFS = {
294
397
  eye: `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-eye-icon lucide-eye"><path d="M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"/><circle cx="12" cy="12" r="3"/></svg>`,
295
398
  'eye-off': `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-eye-off-icon lucide-eye-off"><path d="M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"/><path d="M14.084 14.158a3 3 0 0 1-4.242-4.242"/><path d="M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"/><path d="m2 2 20 20"/></svg>`,
296
399
  copy: `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy-icon lucide-copy"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></svg>`,
400
+ /* ── Actions ─────────────────────────────────────────────────────────────── */
401
+ search: `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-search"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/></svg>`,
402
+ plus: `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-plus"><path d="M5 12h14"/><path d="M12 5v14"/></svg>`,
403
+ minus: `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-minus"><path d="M5 12h14"/></svg>`,
404
+ trash: `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-trash-2"><path d="M3 6h18"/><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"/><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"/><line x1="10" x2="10" y1="11" y2="17"/><line x1="14" x2="14" y1="11" y2="17"/></svg>`,
405
+ pencil: `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-pencil"><path d="M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"/><path d="m15 5 4 4"/></svg>`,
406
+ download: `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" x2="12" y1="15" y2="3"/></svg>`,
407
+ upload: `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-upload"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="17 8 12 3 7 8"/><line x1="12" x2="12" y1="3" y2="15"/></svg>`,
408
+ refresh: `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-refresh-cw"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"/><path d="M21 3v5h-5"/><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"/><path d="M8 16H3v5"/></svg>`,
409
+ filter: `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-filter"><polygon points="22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"/></svg>`,
410
+ 'external-link': `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-external-link"><path d="M15 3h6v6"/><path d="M10 14 21 3"/><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/></svg>`,
411
+ /* ── Navigation & chrome ─────────────────────────────────────────────────── */
412
+ menu: `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-menu"><line x1="4" x2="20" y1="12" y2="12"/><line x1="4" x2="20" y1="6" y2="6"/><line x1="4" x2="20" y1="18" y2="18"/></svg>`,
413
+ 'more-horizontal': `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-ellipsis"><circle cx="12" cy="12" r="1"/><circle cx="19" cy="12" r="1"/><circle cx="5" cy="12" r="1"/></svg>`,
414
+ 'more-vertical': `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-ellipsis-vertical"><circle cx="12" cy="12" r="1"/><circle cx="12" cy="5" r="1"/><circle cx="12" cy="19" r="1"/></svg>`,
415
+ 'arrow-left': `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-left"><path d="m12 19-7-7 7-7"/><path d="M19 12H5"/></svg>`,
416
+ 'arrow-right': `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-right"><path d="M5 12h14"/><path d="m12 5 7 7-7 7"/></svg>`,
417
+ /* ── Objects & state ─────────────────────────────────────────────────────── */
418
+ user: `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-user"><path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>`,
419
+ settings: `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-settings"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/></svg>`,
420
+ lock: `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-lock"><rect width="18" height="11" x="3" y="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/></svg>`,
421
+ mail: `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-mail"><rect width="20" height="16" x="2" y="4" rx="2"/><path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"/></svg>`,
422
+ star: `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-star"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"/></svg>`,
423
+ 'star-filled': `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-star"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" fill="currentColor"/></svg>`,
297
424
  };
298
425
 
426
+ /**
427
+ * Icons an app has registered, keyed by the name `gog-icon` will be asked for. Resolves to `{}`
428
+ * — only the built-ins are available — until a `provideGogIcons(...)` call fills it in.
429
+ *
430
+ * Values are raw `<svg>` markup, injected with `bypassSecurityTrustHtml` exactly like the
431
+ * built-ins. See `provideGogIcons` for what that means for you.
432
+ */
433
+ const GOG_ICONS = new InjectionToken('GOG_ICONS', {
434
+ providedIn: 'root',
435
+ factory: () => ({}),
436
+ });
437
+ /**
438
+ * Registers icons by name, so `<gog-icon name="cart" />` works for glyphs the library does not
439
+ * ship. This is the supported way to use your own icon set: the alternative — a `TemplateRef`
440
+ * per instance through the `template` input — costs a `<ng-template>` at every use site and is
441
+ * meant for one-offs, not for an icon set.
442
+ *
443
+ * ```ts
444
+ * // app.config.ts
445
+ * providers: [
446
+ * provideGogIcons({
447
+ * cart: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor">…</svg>',
448
+ * user: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor">…</svg>',
449
+ * }),
450
+ * ]
451
+ * ```
452
+ *
453
+ * **A registered name overrides a built-in of the same name**, which is how you swap the
454
+ * library's checkmark or chevron for your own without touching every component that renders one.
455
+ *
456
+ * **Providing this again further down the injector tree layers onto the parent's set** rather
457
+ * than replacing it, matching `provideGogConfig`: a lazy feature can register the three icons
458
+ * only it uses, and the app-wide set stays available inside it.
459
+ *
460
+ * ## What to put in the SVG
461
+ *
462
+ * Use `stroke="currentColor"` (or `fill="currentColor"`) and a `viewBox`, and leave the sizing
463
+ * alone — `gog-icon`'s stylesheet drives width, height and stroke width from the
464
+ * `--gog-icon-*` tokens, so an icon inherits size and colour from wherever it is used, the same
465
+ * as a built-in.
466
+ *
467
+ * ## Security
468
+ *
469
+ * The markup is inserted with `DomSanitizer.bypassSecurityTrustHtml`, because Angular's HTML
470
+ * sanitizer strips SVG and would leave you with nothing. That is safe for what this is for —
471
+ * static icon markup you wrote or imported at build time — and unsafe for anything derived from
472
+ * user input or fetched at runtime. **Never build a registered icon string from data you did
473
+ * not author.** If you need remote icons, fetch them yourself, sanitize them with a real SVG
474
+ * sanitizer, and register the result.
475
+ */
476
+ function provideGogIcons(icons) {
477
+ return {
478
+ provide: GOG_ICONS,
479
+ // skipSelf so this reads the *parent* injector's set rather than recursing into the provider
480
+ // being defined here; optional because at the root there is no parent providing it.
481
+ useFactory: () => ({
482
+ ...(inject(GOG_ICONS, { skipSelf: true, optional: true }) ?? {}),
483
+ ...icons,
484
+ }),
485
+ };
486
+ }
487
+
488
+ /**
489
+ * Names already warned about, so a missing icon rendered in a `@for` logs once rather than once
490
+ * per row. Module-level because the point is one message per name per page, not per component.
491
+ */
492
+ const warnedNames = new Set();
299
493
  class IconComponent {
300
494
  sanitizer = inject(DomSanitizer);
495
+ /** App-registered icons; overrides a built-in of the same name. See `provideGogIcons`. */
496
+ registered = inject(GOG_ICONS);
497
+ /** A built-in name, or one registered through `provideGogIcons(...)`. */
301
498
  name = input('close', ...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
302
499
  template = input(null, ...(ngDevMode ? [{ debugName: "template" }] : /* istanbul ignore next */ []));
303
500
  title = input('', ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
304
501
  ariaHidden = input(true, ...(ngDevMode ? [{ debugName: "ariaHidden" }] : /* istanbul ignore next */ []));
305
502
  ariaLabel = computed(() => this.ariaHidden() ? null : this.title() || this.name(), ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
306
- iconSvg = computed(() => this.sanitizer.bypassSecurityTrustHtml(ICON_DEFS[this.name()]), ...(ngDevMode ? [{ debugName: "iconSvg" }] : /* istanbul ignore next */ []));
503
+ /**
504
+ * The markup to render, or `null` when the name resolves to nothing.
505
+ *
506
+ * An unknown name renders **nothing** and warns in dev mode — it never throws. An icon is
507
+ * decoration: taking an app down mid-render over a typo in a glyph name would be a far worse
508
+ * failure than the missing glyph, and the warning is what gets the typo fixed.
509
+ */
510
+ iconSvg = computed(() => {
511
+ const name = this.name();
512
+ const markup = this.registered[name] ?? ICON_DEFS[name];
513
+ if (!markup) {
514
+ if (isDevMode() && !warnedNames.has(name)) {
515
+ warnedNames.add(name);
516
+ console.warn(`[gog-icon] No icon named "${name}". Register it with provideGogIcons({ '${name}': '<svg…>' }), or use one of the built-ins.`);
517
+ }
518
+ return null;
519
+ }
520
+ return this.sanitizer.bypassSecurityTrustHtml(markup);
521
+ }, ...(ngDevMode ? [{ debugName: "iconSvg" }] : /* istanbul ignore next */ []));
307
522
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: IconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
308
523
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: IconComponent, isStandalone: true, selector: "gog-icon", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, template: { classPropertyName: "template", publicName: "template", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, ariaHidden: { classPropertyName: "ariaHidden", publicName: "ariaHidden", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.aria-hidden": "ariaHidden() ? \"true\" : null", "attr.aria-label": "ariaHidden() ? null : ariaLabel()" }, classAttribute: "gog-icon" }, ngImport: i0, template: `
309
524
  @if (template(); as iconTpl) {
310
525
  <ng-container *ngTemplateOutlet="iconTpl" />
311
- } @else {
312
- <span [innerHTML]="iconSvg()"></span>
526
+ } @else if (iconSvg(); as svg) {
527
+ <span [innerHTML]="svg"></span>
313
528
  }
314
- `, isInline: true, styles: [":host{display:inline-flex;align-items:center;justify-content:center;line-height:0}:host ::ng-deep svg{width:var(--gog-icon-size, var(--gog-icon-fallback-size));height:var(--gog-icon-size, var(--gog-icon-fallback-size));display:block;color:currentColor}:host ::ng-deep svg path,:host ::ng-deep svg circle,:host ::ng-deep svg rect{stroke-width:var(--gog-icon-stroke-width)}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
529
+ `, isInline: true, styles: [":host{display:inline-flex;align-items:center;justify-content:center;line-height:0}:host ::ng-deep svg{width:var(--gog-icon-size, var(--gog-icon-fallback-size));height:var(--gog-icon-size, var(--gog-icon-fallback-size));display:block;color:currentColor}:host ::ng-deep svg path,:host ::ng-deep svg circle,:host ::ng-deep svg rect,:host ::ng-deep svg ellipse,:host ::ng-deep svg line,:host ::ng-deep svg polyline,:host ::ng-deep svg polygon{stroke-width:var(--gog-icon-stroke-width)}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
315
530
  }
316
531
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: IconComponent, decorators: [{
317
532
  type: Component,
318
533
  args: [{ selector: 'gog-icon', imports: [NgTemplateOutlet], template: `
319
534
  @if (template(); as iconTpl) {
320
535
  <ng-container *ngTemplateOutlet="iconTpl" />
321
- } @else {
322
- <span [innerHTML]="iconSvg()"></span>
536
+ } @else if (iconSvg(); as svg) {
537
+ <span [innerHTML]="svg"></span>
323
538
  }
324
539
  `, changeDetection: ChangeDetectionStrategy.OnPush, host: {
325
540
  class: 'gog-icon',
326
541
  '[attr.aria-hidden]': 'ariaHidden() ? "true" : null',
327
542
  '[attr.aria-label]': 'ariaHidden() ? null : ariaLabel()',
328
- }, styles: [":host{display:inline-flex;align-items:center;justify-content:center;line-height:0}:host ::ng-deep svg{width:var(--gog-icon-size, var(--gog-icon-fallback-size));height:var(--gog-icon-size, var(--gog-icon-fallback-size));display:block;color:currentColor}:host ::ng-deep svg path,:host ::ng-deep svg circle,:host ::ng-deep svg rect{stroke-width:var(--gog-icon-stroke-width)}\n"] }]
543
+ }, styles: [":host{display:inline-flex;align-items:center;justify-content:center;line-height:0}:host ::ng-deep svg{width:var(--gog-icon-size, var(--gog-icon-fallback-size));height:var(--gog-icon-size, var(--gog-icon-fallback-size));display:block;color:currentColor}:host ::ng-deep svg path,:host ::ng-deep svg circle,:host ::ng-deep svg rect,:host ::ng-deep svg ellipse,:host ::ng-deep svg line,:host ::ng-deep svg polyline,:host ::ng-deep svg polygon{stroke-width:var(--gog-icon-stroke-width)}\n"] }]
329
544
  }], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], template: [{ type: i0.Input, args: [{ isSignal: true, alias: "template", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], ariaHidden: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaHidden", required: false }] }] } });
330
545
 
331
546
  class SkeletonComponent {
@@ -3244,7 +3459,7 @@ const DEFAULT_LOCALE$1 = 'en-US';
3244
3459
  * input nor `GOG_CONFIG.labels` supplies one. Kept as one object so `resolvedLabels` stays a
3245
3460
  * single `computed` instead of nine, and so the set is obvious at a glance.
3246
3461
  */
3247
- const DEFAULT_LABELS$2 = {
3462
+ const DEFAULT_LABELS$3 = {
3248
3463
  today: 'Today',
3249
3464
  thisMonth: 'This month',
3250
3465
  previousMonth: 'Previous month',
@@ -3338,15 +3553,15 @@ class CalendarComponent {
3338
3553
  resolvedLabels = computed(() => {
3339
3554
  const configured = this.globalConfig.labels ?? {};
3340
3555
  return {
3341
- today: resolveConfigured(this.todayLabel(), configured.today, DEFAULT_LABELS$2.today),
3342
- thisMonth: resolveConfigured(this.thisMonthLabel(), configured.thisMonth, DEFAULT_LABELS$2.thisMonth),
3343
- previousMonth: resolveConfigured(this.previousMonthLabel(), configured.previousMonth, DEFAULT_LABELS$2.previousMonth),
3344
- nextMonth: resolveConfigured(this.nextMonthLabel(), configured.nextMonth, DEFAULT_LABELS$2.nextMonth),
3345
- previousYear: resolveConfigured(this.previousYearLabel(), configured.previousYear, DEFAULT_LABELS$2.previousYear),
3346
- nextYear: resolveConfigured(this.nextYearLabel(), configured.nextYear, DEFAULT_LABELS$2.nextYear),
3347
- hours: resolveConfigured(this.hoursLabel(), configured.hours, DEFAULT_LABELS$2.hours),
3348
- minutes: resolveConfigured(this.minutesLabel(), configured.minutes, DEFAULT_LABELS$2.minutes),
3349
- seconds: resolveConfigured(this.secondsLabel(), configured.seconds, DEFAULT_LABELS$2.seconds),
3556
+ today: resolveConfigured(this.todayLabel(), configured.today, DEFAULT_LABELS$3.today),
3557
+ thisMonth: resolveConfigured(this.thisMonthLabel(), configured.thisMonth, DEFAULT_LABELS$3.thisMonth),
3558
+ previousMonth: resolveConfigured(this.previousMonthLabel(), configured.previousMonth, DEFAULT_LABELS$3.previousMonth),
3559
+ nextMonth: resolveConfigured(this.nextMonthLabel(), configured.nextMonth, DEFAULT_LABELS$3.nextMonth),
3560
+ previousYear: resolveConfigured(this.previousYearLabel(), configured.previousYear, DEFAULT_LABELS$3.previousYear),
3561
+ nextYear: resolveConfigured(this.nextYearLabel(), configured.nextYear, DEFAULT_LABELS$3.nextYear),
3562
+ hours: resolveConfigured(this.hoursLabel(), configured.hours, DEFAULT_LABELS$3.hours),
3563
+ minutes: resolveConfigured(this.minutesLabel(), configured.minutes, DEFAULT_LABELS$3.minutes),
3564
+ seconds: resolveConfigured(this.secondsLabel(), configured.seconds, DEFAULT_LABELS$3.seconds),
3350
3565
  };
3351
3566
  }, ...(ngDevMode ? [{ debugName: "resolvedLabels" }] : /* istanbul ignore next */ []));
3352
3567
  /** First of the leftmost visible month. */
@@ -4958,7 +5173,7 @@ function toAnnouncement(toast) {
4958
5173
  const DEFAULT_SIZE$1 = 'md';
4959
5174
  const DEFAULT_ERROR_DISPLAY$2 = 'manual';
4960
5175
  const DEFAULT_SHOW_SPIN_BUTTONS = true;
4961
- const DEFAULT_LABELS$1 = {
5176
+ const DEFAULT_LABELS$2 = {
4962
5177
  clear: 'Clear',
4963
5178
  increment: 'Increment',
4964
5179
  decrement: 'Decrement',
@@ -5156,9 +5371,9 @@ class InputfieldComponent {
5156
5371
  */
5157
5372
  sizeClass = computed(() => this.resolvedSize() === 'md' ? '' : `gog-input-wrapper--${this.resolvedSize()}`, ...(ngDevMode ? [{ debugName: "sizeClass" }] : /* istanbul ignore next */ []));
5158
5373
  /** Instance input → `GOG_CONFIG.labels` → the built-in English default. */
5159
- resolvedClearLabel = computed(() => resolveConfigured(this.clearAriaLabel(), this.globalConfig.labels?.clear, DEFAULT_LABELS$1.clear), ...(ngDevMode ? [{ debugName: "resolvedClearLabel" }] : /* istanbul ignore next */ []));
5160
- resolvedIncrementLabel = computed(() => resolveConfigured(this.incrementLabel(), this.globalConfig.labels?.increment, DEFAULT_LABELS$1.increment), ...(ngDevMode ? [{ debugName: "resolvedIncrementLabel" }] : /* istanbul ignore next */ []));
5161
- resolvedDecrementLabel = computed(() => resolveConfigured(this.decrementLabel(), this.globalConfig.labels?.decrement, DEFAULT_LABELS$1.decrement), ...(ngDevMode ? [{ debugName: "resolvedDecrementLabel" }] : /* istanbul ignore next */ []));
5374
+ resolvedClearLabel = computed(() => resolveConfigured(this.clearAriaLabel(), this.globalConfig.labels?.clear, DEFAULT_LABELS$2.clear), ...(ngDevMode ? [{ debugName: "resolvedClearLabel" }] : /* istanbul ignore next */ []));
5375
+ resolvedIncrementLabel = computed(() => resolveConfigured(this.incrementLabel(), this.globalConfig.labels?.increment, DEFAULT_LABELS$2.increment), ...(ngDevMode ? [{ debugName: "resolvedIncrementLabel" }] : /* istanbul ignore next */ []));
5376
+ resolvedDecrementLabel = computed(() => resolveConfigured(this.decrementLabel(), this.globalConfig.labels?.decrement, DEFAULT_LABELS$2.decrement), ...(ngDevMode ? [{ debugName: "resolvedDecrementLabel" }] : /* istanbul ignore next */ []));
5162
5377
  resolvedShowSpinButtons = computed(() => resolveConfigured(this.showSpinButtons(), this.globalConfig.inputfield?.showSpinButtons, DEFAULT_SHOW_SPIN_BUTTONS), ...(ngDevMode ? [{ debugName: "resolvedShowSpinButtons" }] : /* istanbul ignore next */ []));
5163
5378
  isDisabled = computed(() => this.disabled() || this.cvaDisabled(), ...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
5164
5379
  /** Disabled and read-only both refuse edits; the affordances that offer one key off this. */
@@ -5224,8 +5439,8 @@ class InputfieldComponent {
5224
5439
  if (!this.isPasswordField())
5225
5440
  return this.iconEndLabel();
5226
5441
  return this.passwordVisible()
5227
- ? resolveConfigured(this.hidePasswordLabel(), this.globalConfig.labels?.hidePassword, DEFAULT_LABELS$1.hidePassword)
5228
- : resolveConfigured(this.showPasswordLabel(), this.globalConfig.labels?.showPassword, DEFAULT_LABELS$1.showPassword);
5442
+ ? resolveConfigured(this.hidePasswordLabel(), this.globalConfig.labels?.hidePassword, DEFAULT_LABELS$2.hidePassword)
5443
+ : resolveConfigured(this.showPasswordLabel(), this.globalConfig.labels?.showPassword, DEFAULT_LABELS$2.showPassword);
5229
5444
  }, ...(ngDevMode ? [{ debugName: "effectiveIconEndLabel" }] : /* istanbul ignore next */ []));
5230
5445
  hasIconEnd = computed(() => this.showClear() ||
5231
5446
  !!this.addonEnd() ||
@@ -6571,10 +6786,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
6571
6786
  }], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], showValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "showValue", required: false }] }], showThumb: [{ type: i0.Input, args: [{ isSignal: true, alias: "showThumb", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], errorDisplay: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorDisplay", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], range: [{ type: i0.Input, args: [{ isSignal: true, alias: "range", required: false }] }], startAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "startAriaLabel", required: false }] }], endAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "endAriaLabel", required: false }] }], startDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "startDisabled", required: false }] }], endDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "endDisabled", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], rangeValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "rangeValue", required: false }] }, { type: i0.Output, args: ["rangeValueChange"] }] } });
6572
6787
 
6573
6788
  /** Built-in defaults, used when neither the instance input nor `GOG_CONFIG.labels` supplies one. */
6574
- const DEFAULT_LABELS = {
6789
+ const DEFAULT_PAGE_SIZE = 10;
6790
+ const DEFAULT_PAGE_SIZE_OPTIONS = [10, 20, 30, 40, 50];
6791
+ /** Off by default: a paginator that silently grew a control would change every existing layout. */
6792
+ const DEFAULT_SHOW_PAGE_SIZE_SELECT = false;
6793
+ const DEFAULT_LABELS$1 = {
6575
6794
  pagination: 'Pagination',
6576
6795
  previousPage: 'Previous page',
6577
6796
  nextPage: 'Next page',
6797
+ rowsPerPage: 'Rows per page',
6578
6798
  page: (page, isCurrent) => isCurrent ? `Page ${page}, current page` : `Go to page ${page}`,
6579
6799
  };
6580
6800
  class PaginatorComponent {
@@ -6585,7 +6805,35 @@ class PaginatorComponent {
6585
6805
  * buttons instead.
6586
6806
  */
6587
6807
  fullWidth = input(true, ...(ngDevMode ? [{ debugName: "fullWidth" }] : /* istanbul ignore next */ []));
6808
+ /**
6809
+ * How many pages there are. Ignored when `totalRecords` is given — see there.
6810
+ */
6588
6811
  totalPages = input(1, ...(ngDevMode ? [{ debugName: "totalPages" }] : /* istanbul ignore next */ []));
6812
+ /**
6813
+ * How many rows exist in total. Given this, the paginator computes the page count itself from
6814
+ * `pageSize`, which is what removes the `computed(() => Math.ceil(total / size))` a consumer
6815
+ * would otherwise have to write and keep in sync with the select below.
6816
+ *
6817
+ * `null` (the default) keeps the old contract: you tell it `totalPages` directly.
6818
+ */
6819
+ totalRecords = input(null, ...(ngDevMode ? [{ debugName: "totalRecords" }] : /* istanbul ignore next */ []));
6820
+ /**
6821
+ * Rows per page. Two-way bindable — `[(pageSize)]="size"` — which is the whole point once
6822
+ * `showPageSizeSelect` is on: the select writes back through this, and nothing has to be
6823
+ * ferried between components by hand. `gog-table` binds its own `pageSize` model straight to
6824
+ * this one.
6825
+ */
6826
+ pageSize = model(DEFAULT_PAGE_SIZE, ...(ngDevMode ? [{ debugName: "pageSize" }] : /* istanbul ignore next */ []));
6827
+ /**
6828
+ * Whether to offer the rows-per-page select. Unset, falls back to
6829
+ * `GOG_CONFIG.paginator.showPageSizeSelect`, then to `false`.
6830
+ */
6831
+ showPageSizeSelect = input(undefined, ...(ngDevMode ? [{ debugName: "showPageSizeSelect" }] : /* istanbul ignore next */ []));
6832
+ /**
6833
+ * The choices the select offers. Unset, falls back to
6834
+ * `GOG_CONFIG.paginator.pageSizeOptions`, then to `[10, 20, 30, 40, 50]`.
6835
+ */
6836
+ pageSizeOptions = input(undefined, ...(ngDevMode ? [{ debugName: "pageSizeOptions" }] : /* istanbul ignore next */ []));
6589
6837
  /**
6590
6838
  * `window` (default): a fixed number of page buttons (`visiblePages`) that slides to keep
6591
6839
  * the current page centered, clamped at the edges — no ellipsis, no pinned boundaries
@@ -6612,34 +6860,58 @@ class PaginatorComponent {
6612
6860
  ariaLabel = input(undefined, ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
6613
6861
  globalConfig = inject(GOG_CONFIG);
6614
6862
  /** Instance input → `GOG_CONFIG.labels` → the built-in English default. */
6615
- resolvedAriaLabel = computed(() => resolveConfigured(this.ariaLabel(), this.globalConfig.labels?.pagination, DEFAULT_LABELS.pagination), ...(ngDevMode ? [{ debugName: "resolvedAriaLabel" }] : /* istanbul ignore next */ []));
6863
+ resolvedAriaLabel = computed(() => resolveConfigured(this.ariaLabel(), this.globalConfig.labels?.pagination, DEFAULT_LABELS$1.pagination), ...(ngDevMode ? [{ debugName: "resolvedAriaLabel" }] : /* istanbul ignore next */ []));
6616
6864
  /**
6617
6865
  * The two step buttons. Config-only: unlike the `<nav>` name, these say the same thing on
6618
6866
  * every paginator in an app, so a per-instance input would be dead weight.
6619
6867
  */
6620
- resolvedPreviousLabel = computed(() => resolveConfigured(undefined, this.globalConfig.labels?.previousPage, DEFAULT_LABELS.previousPage), ...(ngDevMode ? [{ debugName: "resolvedPreviousLabel" }] : /* istanbul ignore next */ []));
6621
- resolvedNextLabel = computed(() => resolveConfigured(undefined, this.globalConfig.labels?.nextPage, DEFAULT_LABELS.nextPage), ...(ngDevMode ? [{ debugName: "resolvedNextLabel" }] : /* istanbul ignore next */ []));
6868
+ resolvedPreviousLabel = computed(() => resolveConfigured(undefined, this.globalConfig.labels?.previousPage, DEFAULT_LABELS$1.previousPage), ...(ngDevMode ? [{ debugName: "resolvedPreviousLabel" }] : /* istanbul ignore next */ []));
6869
+ resolvedNextLabel = computed(() => resolveConfigured(undefined, this.globalConfig.labels?.nextPage, DEFAULT_LABELS$1.nextPage), ...(ngDevMode ? [{ debugName: "resolvedNextLabel" }] : /* istanbul ignore next */ []));
6622
6870
  /**
6623
6871
  * Names one page button. A method rather than a `computed`, since it takes the page number —
6624
6872
  * the formatter itself is resolved once and only re-read when the config object changes.
6625
6873
  */
6626
6874
  pageLabel(page) {
6627
- const format = this.globalConfig.labels?.page ?? DEFAULT_LABELS.page;
6875
+ const format = this.globalConfig.labels?.page ?? DEFAULT_LABELS$1.page;
6628
6876
  return format(page, page === this.page());
6629
6877
  }
6878
+ resolvedShowPageSizeSelect = computed(() => resolveConfigured(this.showPageSizeSelect(), this.globalConfig.paginator?.showPageSizeSelect, DEFAULT_SHOW_PAGE_SIZE_SELECT), ...(ngDevMode ? [{ debugName: "resolvedShowPageSizeSelect" }] : /* istanbul ignore next */ []));
6879
+ resolvedRowsPerPageLabel = computed(() => resolveConfigured(undefined, this.globalConfig.labels?.rowsPerPage, DEFAULT_LABELS$1.rowsPerPage), ...(ngDevMode ? [{ debugName: "resolvedRowsPerPageLabel" }] : /* istanbul ignore next */ []));
6880
+ /**
6881
+ * The select takes `{ id, name }` objects because that is `GogDropdownOption`'s default shape —
6882
+ * `optionLabel`/`optionValue` accessors for a list of plain numbers would be more API than the
6883
+ * mapping saves. The current `pageSize` is included even when it is not one of the offered
6884
+ * options, so a programmatic `[pageSize]="15"` shows 15 rather than an empty trigger.
6885
+ */
6886
+ resolvedPageSizeOptions = computed(() => {
6887
+ const options = resolveConfigured(this.pageSizeOptions(), this.globalConfig.paginator?.pageSizeOptions, DEFAULT_PAGE_SIZE_OPTIONS);
6888
+ const current = this.pageSize();
6889
+ const all = options.includes(current) ? options : [...options, current].sort((a, b) => a - b);
6890
+ return all.map((size) => ({ id: size, name: String(size) }));
6891
+ }, ...(ngDevMode ? [{ debugName: "resolvedPageSizeOptions" }] : /* istanbul ignore next */ []));
6892
+ /**
6893
+ * `totalRecords` when supplied, `totalPages` otherwise — every internal read goes through this
6894
+ * so the two inputs cannot disagree anywhere.
6895
+ */
6896
+ resolvedTotalPages = computed(() => {
6897
+ const records = this.totalRecords();
6898
+ if (records === null)
6899
+ return Math.max(1, this.totalPages());
6900
+ return Math.max(1, Math.ceil(Math.max(0, records) / Math.max(1, this.pageSize())));
6901
+ }, ...(ngDevMode ? [{ debugName: "resolvedTotalPages" }] : /* istanbul ignore next */ []));
6630
6902
  pageNumbers = computed(() => {
6631
- const total = Math.max(1, this.totalPages());
6903
+ const total = this.resolvedTotalPages();
6632
6904
  const current = this.page();
6633
6905
  return this.rangeMode() === 'ellipsis'
6634
6906
  ? this.ellipsisRange(total, current)
6635
6907
  : this.windowRange(total, current);
6636
6908
  }, ...(ngDevMode ? [{ debugName: "pageNumbers" }] : /* istanbul ignore next */ []));
6637
6909
  constructor() {
6638
- // Self-clamps whenever `totalPages` shrinks below the current page (or a consumer
6910
+ // Self-clamps whenever the page count shrinks below the current page (or a consumer
6639
6911
  // passes an out-of-range value directly), so every consumer gets correct bounds for
6640
6912
  // free instead of reimplementing this per usage.
6641
6913
  effect(() => {
6642
- const total = Math.max(1, this.totalPages());
6914
+ const total = this.resolvedTotalPages();
6643
6915
  const current = this.page();
6644
6916
  if (current > total) {
6645
6917
  this.page.set(total);
@@ -6648,6 +6920,26 @@ class PaginatorComponent {
6648
6920
  this.page.set(1);
6649
6921
  }
6650
6922
  });
6923
+ /*
6924
+ * A new page size invalidates the current page: "page 5" of 10-row pages is not "page 5" of
6925
+ * 50-row ones, and clamping alone would leave the user somewhere they did not ask to be.
6926
+ * Back to page 1, which is the only position that means the same thing at every size.
6927
+ * `untracked` so this reacts to the size and not to its own write.
6928
+ */
6929
+ let previousSize = null;
6930
+ effect(() => {
6931
+ const size = this.pageSize();
6932
+ // Guarded on an actual change, not on the effect running: the first run must leave an
6933
+ // initial `[page]="3"` alone, and re-running for an unrelated dependency must not snap the
6934
+ // user back to page 1.
6935
+ if (previousSize !== null && previousSize !== size) {
6936
+ untracked(() => {
6937
+ if (this.page() !== 1)
6938
+ this.page.set(1);
6939
+ });
6940
+ }
6941
+ previousSize = size;
6942
+ });
6651
6943
  }
6652
6944
  windowRange(total, current) {
6653
6945
  const windowSize = Math.min(Math.max(1, this.visiblePages()), total);
@@ -6685,7 +6977,7 @@ class PaginatorComponent {
6685
6977
  return typeof value === 'number';
6686
6978
  }
6687
6979
  goTo(target) {
6688
- if (this.disabled() || target < 1 || target > this.totalPages())
6980
+ if (this.disabled() || target < 1 || target > this.resolvedTotalPages())
6689
6981
  return;
6690
6982
  this.page.set(target);
6691
6983
  }
@@ -6695,12 +6987,16 @@ class PaginatorComponent {
6695
6987
  next() {
6696
6988
  this.goTo(this.page() + 1);
6697
6989
  }
6990
+ onPageSizeChange(size) {
6991
+ if (size !== null)
6992
+ this.pageSize.set(size);
6993
+ }
6698
6994
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: PaginatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
6699
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: PaginatorComponent, isStandalone: true, selector: "gog-paginator", inputs: { page: { classPropertyName: "page", publicName: "page", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, totalPages: { classPropertyName: "totalPages", publicName: "totalPages", isSignal: true, isRequired: false, transformFunction: null }, rangeMode: { classPropertyName: "rangeMode", publicName: "rangeMode", isSignal: true, isRequired: false, transformFunction: null }, visiblePages: { classPropertyName: "visiblePages", publicName: "visiblePages", isSignal: true, isRequired: false, transformFunction: null }, showFirstPage: { classPropertyName: "showFirstPage", publicName: "showFirstPage", isSignal: true, isRequired: false, transformFunction: null }, showLastPage: { classPropertyName: "showLastPage", publicName: "showLastPage", isSignal: true, isRequired: false, transformFunction: null }, siblingCount: { classPropertyName: "siblingCount", publicName: "siblingCount", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { page: "pageChange" }, host: { attributes: { "role": "navigation" }, properties: { "attr.aria-label": "resolvedAriaLabel()", "class.gog-host--auto-width": "!fullWidth()" }, classAttribute: "gog-paginator" }, ngImport: i0, template: "<gog-button\r\n variant=\"ghost\"\r\n [size]=\"size()\"\r\n [disabled]=\"disabled() || page() === 1\"\r\n [ariaLabel]=\"resolvedPreviousLabel()\"\r\n (gogClick)=\"prev()\"\r\n >\u2039</gog-button\r\n>\r\n\r\n@for (item of pageNumbers(); track $index) {\r\n @if (isNumber(item)) {\r\n <gog-button\r\n [size]=\"size()\"\r\n [variant]=\"item === page() ? 'primary' : 'ghost'\"\r\n [disabled]=\"disabled()\"\r\n [ariaLabel]=\"pageLabel(item)\"\r\n (gogClick)=\"goTo(item)\"\r\n >{{ item }}</gog-button\r\n >\r\n } @else {\r\n <span class=\"gog-paginator__ellipsis\">\u2026</span>\r\n }\r\n}\r\n\r\n<gog-button\r\n variant=\"ghost\"\r\n [size]=\"size()\"\r\n [disabled]=\"disabled() || page() === totalPages()\"\r\n [ariaLabel]=\"resolvedNextLabel()\"\r\n (gogClick)=\"next()\"\r\n >\u203A</gog-button\r\n>\r\n", styles: [":host{display:flex;align-items:center;gap:var(--gog-paginator-gap);flex-wrap:wrap}:host(.gog-host--auto-width){width:fit-content}.gog-paginator__ellipsis{display:inline-flex;align-items:center;justify-content:center;min-width:var(--gog-paginator-ellipsis-min-width);color:var(--gog-paginator-ellipsis-color);font-family:var(--gog-paginator-ellipsis-font-family);font-size:var(--gog-paginator-ellipsis-font-size);-webkit-user-select:none;user-select:none}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "gog-button", inputs: ["variant", "size", "disabled", "fullWidth", "type", "loading", "debounce", "ariaLabel"], outputs: ["gogClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
6995
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: PaginatorComponent, isStandalone: true, selector: "gog-paginator", inputs: { page: { classPropertyName: "page", publicName: "page", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, totalPages: { classPropertyName: "totalPages", publicName: "totalPages", isSignal: true, isRequired: false, transformFunction: null }, totalRecords: { classPropertyName: "totalRecords", publicName: "totalRecords", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, showPageSizeSelect: { classPropertyName: "showPageSizeSelect", publicName: "showPageSizeSelect", isSignal: true, isRequired: false, transformFunction: null }, pageSizeOptions: { classPropertyName: "pageSizeOptions", publicName: "pageSizeOptions", isSignal: true, isRequired: false, transformFunction: null }, rangeMode: { classPropertyName: "rangeMode", publicName: "rangeMode", isSignal: true, isRequired: false, transformFunction: null }, visiblePages: { classPropertyName: "visiblePages", publicName: "visiblePages", isSignal: true, isRequired: false, transformFunction: null }, showFirstPage: { classPropertyName: "showFirstPage", publicName: "showFirstPage", isSignal: true, isRequired: false, transformFunction: null }, showLastPage: { classPropertyName: "showLastPage", publicName: "showLastPage", isSignal: true, isRequired: false, transformFunction: null }, siblingCount: { classPropertyName: "siblingCount", publicName: "siblingCount", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { page: "pageChange", pageSize: "pageSizeChange" }, host: { attributes: { "role": "navigation" }, properties: { "attr.aria-label": "resolvedAriaLabel()", "class.gog-host--auto-width": "!fullWidth()" }, classAttribute: "gog-paginator" }, ngImport: i0, template: "<gog-button\r\n variant=\"ghost\"\r\n [size]=\"size()\"\r\n [disabled]=\"disabled() || page() === 1\"\r\n [ariaLabel]=\"resolvedPreviousLabel()\"\r\n (gogClick)=\"prev()\"\r\n >\u2039</gog-button\r\n>\r\n\r\n@for (item of pageNumbers(); track $index) {\r\n @if (isNumber(item)) {\r\n <gog-button\r\n [size]=\"size()\"\r\n [variant]=\"item === page() ? 'primary' : 'ghost'\"\r\n [disabled]=\"disabled()\"\r\n [ariaLabel]=\"pageLabel(item)\"\r\n (gogClick)=\"goTo(item)\"\r\n >{{ item }}</gog-button\r\n >\r\n } @else {\r\n <span class=\"gog-paginator__ellipsis\">\u2026</span>\r\n }\r\n}\r\n\r\n<gog-button\r\n variant=\"ghost\"\r\n [size]=\"size()\"\r\n [disabled]=\"disabled() || page() === resolvedTotalPages()\"\r\n [ariaLabel]=\"resolvedNextLabel()\"\r\n (gogClick)=\"next()\"\r\n >\u203A</gog-button\r\n>\r\n\r\n@if (resolvedShowPageSizeSelect()) {\r\n <!--\r\n Bound with `[(pageSize)]`'s writable half, so choosing a size writes straight back through the\r\n model the consumer bound \u2014 there is no intermediate state to keep in sync. `fullWidth` off so\r\n the select sizes to its content instead of stretching the paginator row.\r\n\r\n A plain `@if`, not `@defer`, and that was measured rather than assumed: `@defer` does move\r\n `SelectComponent` out of this component's static `dependencies` and into\r\n `deferBlockDependencies`, but ng-packagr flattens the whole library into one FESM, so the\r\n deferred reference compiles to `Promise.resolve().then(() => select_component)` \u2014 a binding in\r\n the *same module*, not a dynamic `import()`. With no import boundary there is nothing for a\r\n bundler to split on and nothing it may drop, so the consumer ships exactly the same bytes,\r\n minus a placeholder and an SSR pop-in. Making this genuinely lazy needs secondary entry\r\n points (`@guildofgleks/ui/select`), which is a packaging decision, not a template one.\r\n -->\r\n <gog-select\r\n class=\"gog-paginator__page-size\"\r\n [options]=\"resolvedPageSizeOptions()\"\r\n [value]=\"pageSize()\"\r\n [disabled]=\"disabled()\"\r\n [fullWidth]=\"false\"\r\n [size]=\"size()\"\r\n [ariaLabel]=\"resolvedRowsPerPageLabel()\"\r\n (valueChange)=\"onPageSizeChange($event)\"\r\n />\r\n}\r\n", styles: [":host{display:flex;align-items:center;gap:var(--gog-paginator-gap);flex-wrap:wrap}:host(.gog-host--auto-width){width:fit-content}.gog-paginator__ellipsis{display:inline-flex;align-items:center;justify-content:center;min-width:var(--gog-paginator-ellipsis-min-width);color:var(--gog-paginator-ellipsis-color);font-family:var(--gog-paginator-ellipsis-font-family);font-size:var(--gog-paginator-ellipsis-font-size);-webkit-user-select:none;user-select:none}.gog-paginator__page-size{margin-inline-start:auto;min-width:var(--gog-paginator-page-size-min-width)}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "gog-button", inputs: ["variant", "size", "disabled", "fullWidth", "type", "loading", "debounce", "ariaLabel"], outputs: ["gogClick"] }, { kind: "component", type: SelectComponent, selector: "gog-select", inputs: ["inputId", "value"], outputs: ["valueChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
6700
6996
  }
6701
6997
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: PaginatorComponent, decorators: [{
6702
6998
  type: Component,
6703
- args: [{ selector: 'gog-paginator', imports: [ButtonComponent], changeDetection: ChangeDetectionStrategy.OnPush, host: {
6999
+ args: [{ selector: 'gog-paginator', imports: [ButtonComponent, SelectComponent], changeDetection: ChangeDetectionStrategy.OnPush, host: {
6704
7000
  class: 'gog-paginator',
6705
7001
  role: 'navigation',
6706
7002
  '[attr.aria-label]': 'resolvedAriaLabel()',
@@ -6709,8 +7005,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
6709
7005
  // full-width class: this control is full width by default, so the class only
6710
7006
  // appears once a consumer opts *out* of that.
6711
7007
  '[class.gog-host--auto-width]': '!fullWidth()',
6712
- }, template: "<gog-button\r\n variant=\"ghost\"\r\n [size]=\"size()\"\r\n [disabled]=\"disabled() || page() === 1\"\r\n [ariaLabel]=\"resolvedPreviousLabel()\"\r\n (gogClick)=\"prev()\"\r\n >\u2039</gog-button\r\n>\r\n\r\n@for (item of pageNumbers(); track $index) {\r\n @if (isNumber(item)) {\r\n <gog-button\r\n [size]=\"size()\"\r\n [variant]=\"item === page() ? 'primary' : 'ghost'\"\r\n [disabled]=\"disabled()\"\r\n [ariaLabel]=\"pageLabel(item)\"\r\n (gogClick)=\"goTo(item)\"\r\n >{{ item }}</gog-button\r\n >\r\n } @else {\r\n <span class=\"gog-paginator__ellipsis\">\u2026</span>\r\n }\r\n}\r\n\r\n<gog-button\r\n variant=\"ghost\"\r\n [size]=\"size()\"\r\n [disabled]=\"disabled() || page() === totalPages()\"\r\n [ariaLabel]=\"resolvedNextLabel()\"\r\n (gogClick)=\"next()\"\r\n >\u203A</gog-button\r\n>\r\n", styles: [":host{display:flex;align-items:center;gap:var(--gog-paginator-gap);flex-wrap:wrap}:host(.gog-host--auto-width){width:fit-content}.gog-paginator__ellipsis{display:inline-flex;align-items:center;justify-content:center;min-width:var(--gog-paginator-ellipsis-min-width);color:var(--gog-paginator-ellipsis-color);font-family:var(--gog-paginator-ellipsis-font-family);font-size:var(--gog-paginator-ellipsis-font-size);-webkit-user-select:none;user-select:none}\n"] }]
6713
- }], ctorParameters: () => [], propDecorators: { page: [{ type: i0.Input, args: [{ isSignal: true, alias: "page", required: false }] }, { type: i0.Output, args: ["pageChange"] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], totalPages: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalPages", required: false }] }], rangeMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "rangeMode", required: false }] }], visiblePages: [{ type: i0.Input, args: [{ isSignal: true, alias: "visiblePages", required: false }] }], showFirstPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFirstPage", required: false }] }], showLastPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLastPage", required: false }] }], siblingCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "siblingCount", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }] } });
7008
+ }, template: "<gog-button\r\n variant=\"ghost\"\r\n [size]=\"size()\"\r\n [disabled]=\"disabled() || page() === 1\"\r\n [ariaLabel]=\"resolvedPreviousLabel()\"\r\n (gogClick)=\"prev()\"\r\n >\u2039</gog-button\r\n>\r\n\r\n@for (item of pageNumbers(); track $index) {\r\n @if (isNumber(item)) {\r\n <gog-button\r\n [size]=\"size()\"\r\n [variant]=\"item === page() ? 'primary' : 'ghost'\"\r\n [disabled]=\"disabled()\"\r\n [ariaLabel]=\"pageLabel(item)\"\r\n (gogClick)=\"goTo(item)\"\r\n >{{ item }}</gog-button\r\n >\r\n } @else {\r\n <span class=\"gog-paginator__ellipsis\">\u2026</span>\r\n }\r\n}\r\n\r\n<gog-button\r\n variant=\"ghost\"\r\n [size]=\"size()\"\r\n [disabled]=\"disabled() || page() === resolvedTotalPages()\"\r\n [ariaLabel]=\"resolvedNextLabel()\"\r\n (gogClick)=\"next()\"\r\n >\u203A</gog-button\r\n>\r\n\r\n@if (resolvedShowPageSizeSelect()) {\r\n <!--\r\n Bound with `[(pageSize)]`'s writable half, so choosing a size writes straight back through the\r\n model the consumer bound \u2014 there is no intermediate state to keep in sync. `fullWidth` off so\r\n the select sizes to its content instead of stretching the paginator row.\r\n\r\n A plain `@if`, not `@defer`, and that was measured rather than assumed: `@defer` does move\r\n `SelectComponent` out of this component's static `dependencies` and into\r\n `deferBlockDependencies`, but ng-packagr flattens the whole library into one FESM, so the\r\n deferred reference compiles to `Promise.resolve().then(() => select_component)` \u2014 a binding in\r\n the *same module*, not a dynamic `import()`. With no import boundary there is nothing for a\r\n bundler to split on and nothing it may drop, so the consumer ships exactly the same bytes,\r\n minus a placeholder and an SSR pop-in. Making this genuinely lazy needs secondary entry\r\n points (`@guildofgleks/ui/select`), which is a packaging decision, not a template one.\r\n -->\r\n <gog-select\r\n class=\"gog-paginator__page-size\"\r\n [options]=\"resolvedPageSizeOptions()\"\r\n [value]=\"pageSize()\"\r\n [disabled]=\"disabled()\"\r\n [fullWidth]=\"false\"\r\n [size]=\"size()\"\r\n [ariaLabel]=\"resolvedRowsPerPageLabel()\"\r\n (valueChange)=\"onPageSizeChange($event)\"\r\n />\r\n}\r\n", styles: [":host{display:flex;align-items:center;gap:var(--gog-paginator-gap);flex-wrap:wrap}:host(.gog-host--auto-width){width:fit-content}.gog-paginator__ellipsis{display:inline-flex;align-items:center;justify-content:center;min-width:var(--gog-paginator-ellipsis-min-width);color:var(--gog-paginator-ellipsis-color);font-family:var(--gog-paginator-ellipsis-font-family);font-size:var(--gog-paginator-ellipsis-font-size);-webkit-user-select:none;user-select:none}.gog-paginator__page-size{margin-inline-start:auto;min-width:var(--gog-paginator-page-size-min-width)}\n"] }]
7009
+ }], ctorParameters: () => [], propDecorators: { page: [{ type: i0.Input, args: [{ isSignal: true, alias: "page", required: false }] }, { type: i0.Output, args: ["pageChange"] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], totalPages: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalPages", required: false }] }], totalRecords: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalRecords", required: false }] }], pageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSize", required: false }] }, { type: i0.Output, args: ["pageSizeChange"] }], showPageSizeSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPageSizeSelect", required: false }] }], pageSizeOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSizeOptions", required: false }] }], rangeMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "rangeMode", required: false }] }], visiblePages: [{ type: i0.Input, args: [{ isSignal: true, alias: "visiblePages", required: false }] }], showFirstPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFirstPage", required: false }] }], showLastPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLastPage", required: false }] }], siblingCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "siblingCount", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }] } });
6714
7010
 
6715
7011
  class SpinnerOverlayComponent {
6716
7012
  loading = input(false, ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
@@ -6864,6 +7160,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
6864
7160
  }]
6865
7161
  }], propDecorators: { template: [{ type: i0.Input, args: [{ isSignal: true, alias: "template", required: true }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }] } });
6866
7162
 
7163
+ /** Built-in defaults, used when `GOG_CONFIG.labels` doesn't supply one. */
7164
+ const DEFAULT_LABELS = {
7165
+ total: 'Total',
7166
+ pagination: 'Table pagination',
7167
+ selectRow: 'Select row',
7168
+ selectAllRows: 'Select all rows on this page',
7169
+ };
6867
7170
  class TableComponent {
6868
7171
  /**
6869
7172
  * The single size modifier, replacing one `[class.gog-table--<size>]` binding per size.
@@ -6876,8 +7179,96 @@ class TableComponent {
6876
7179
  * its columns' content instead.
6877
7180
  */
6878
7181
  fullWidth = input(true, ...(ngDevMode ? [{ debugName: "fullWidth" }] : /* istanbul ignore next */ []));
6879
- /** 0 = no pagination */
6880
- pageSize = input(0, ...(ngDevMode ? [{ debugName: "pageSize" }] : /* istanbul ignore next */ []));
7182
+ /**
7183
+ * Rows per page; `0` (the default) means no pagination at all.
7184
+ *
7185
+ * A **`model`**, not an input, so `[pageSize]="20"` still works exactly as before *and*
7186
+ * `[(pageSize)]="size"` becomes possible. That is what lets `showPageSizeSelect` work without
7187
+ * any wiring: the table binds this model straight to its own paginator's `pageSize`, the
7188
+ * select writes back through it, and a consumer who wants to observe or persist the choice
7189
+ * binds two-way. Nothing is ferried between the two components by hand.
7190
+ *
7191
+ * In `lazy` mode a change here is a refetch signal, same as `gogPageChange` — bind
7192
+ * `[(pageSize)]` and reload from it. Changing the size always returns to page 1.
7193
+ */
7194
+ pageSize = model(0, ...(ngDevMode ? [{ debugName: "pageSize" }] : /* istanbul ignore next */ []));
7195
+ /**
7196
+ * Whether the paginator offers a rows-per-page select. Forwarded straight to `gog-paginator`;
7197
+ * unset, it falls back to `GOG_CONFIG.paginator.showPageSizeSelect`, then to `false`.
7198
+ */
7199
+ showPageSizeSelect = input(undefined, ...(ngDevMode ? [{ debugName: "showPageSizeSelect" }] : /* istanbul ignore next */ []));
7200
+ /**
7201
+ * The sizes that select offers. Forwarded to `gog-paginator`; unset, falls back to
7202
+ * `GOG_CONFIG.paginator.pageSizeOptions`, then to `[10, 20, 30, 40, 50]`.
7203
+ */
7204
+ pageSizeOptions = input(undefined, ...(ngDevMode ? [{ debugName: "pageSizeOptions" }] : /* istanbul ignore next */ []));
7205
+ /**
7206
+ * Hands sorting and paging to the server.
7207
+ *
7208
+ * Off (the default), the table owns the whole data set: it sorts and slices `value` itself, and
7209
+ * `totalPages` comes from `value.length`. On, `value` is **the current page, already sorted** —
7210
+ * the table renders it as given and never re-orders or re-slices it. Supply `totalRecords` so
7211
+ * the paginator knows how many pages exist, and refetch in response to `gogSortChange` /
7212
+ * `gogPageChange`.
7213
+ *
7214
+ * ```html
7215
+ * <gog-table
7216
+ * [value]="page()"
7217
+ * [lazy]="true"
7218
+ * [totalRecords]="total()"
7219
+ * [pageSize]="20"
7220
+ * [loading]="loading()"
7221
+ * (gogSortChange)="sort.set($event); reload()"
7222
+ * (gogPageChange)="page$.set($event); reload()"
7223
+ * />
7224
+ * ```
7225
+ */
7226
+ lazy = input(false, ...(ngDevMode ? [{ debugName: "lazy" }] : /* istanbul ignore next */ []));
7227
+ /**
7228
+ * How many rows exist on the server, across all pages. `lazy` only — without it the table
7229
+ * cannot know how many pages to offer, and pagination is disabled. Ignored when `lazy` is off,
7230
+ * where `value.length` is the truth.
7231
+ */
7232
+ totalRecords = input(null, ...(ngDevMode ? [{ debugName: "totalRecords" }] : /* istanbul ignore next */ []));
7233
+ /**
7234
+ * Makes rows focusable and styles them as clickable, for a table whose rows navigate or open
7235
+ * something. `gogRowClick` fires on a plain click regardless; this is what makes that
7236
+ * affordance **discoverable and reachable by keyboard** (Enter and Space activate the focused
7237
+ * row), which a bare `(gogRowClick)` on a `<tr>` is not.
7238
+ *
7239
+ * If the row's action is better expressed as a control — a link to a detail page, a delete
7240
+ * button — put that in a cell instead. This is for the whole-row-is-the-target case.
7241
+ */
7242
+ interactiveRows = input(false, ...(ngDevMode ? [{ debugName: "interactiveRows" }] : /* istanbul ignore next */ []));
7243
+ /**
7244
+ * Turns on row selection. `'single'` keeps at most one row selected, `'multiple'` any number.
7245
+ *
7246
+ * The selection itself is always a `T[]` (`[(selection)]`), including in `'single'` mode where
7247
+ * it holds zero or one row — one shape rather than a `T | T[] | null` union the consumer has to
7248
+ * narrow on every read.
7249
+ */
7250
+ selectionMode = input('none', ...(ngDevMode ? [{ debugName: "selectionMode" }] : /* istanbul ignore next */ []));
7251
+ /**
7252
+ * Two-way bindable selected rows: `[(selection)]="selected"`.
7253
+ *
7254
+ * Rows are matched by `dataKey` when one is set, and by object identity otherwise — so with no
7255
+ * `dataKey`, a refetch that produces new objects drops the selection. In `lazy` mode that is
7256
+ * almost always the wrong behaviour: set `dataKey`.
7257
+ */
7258
+ selection = model([], ...(ngDevMode ? [{ debugName: "selection" }] : /* istanbul ignore next */ []));
7259
+ /**
7260
+ * Field name (or dot-path) uniquely identifying a row — `'id'` in most data sets.
7261
+ *
7262
+ * Used for selection identity and, when set, as the `@for` track key, which is what lets the
7263
+ * DOM survive a re-fetch of the same page instead of being torn down and rebuilt.
7264
+ */
7265
+ dataKey = input('', ...(ngDevMode ? [{ debugName: "dataKey" }] : /* istanbul ignore next */ []));
7266
+ /**
7267
+ * Whether the checkbox column renders. On by default once `selectionMode` is set; turn it off
7268
+ * for a table that selects by clicking the row itself, and pair it with `interactiveRows` so
7269
+ * that stays reachable by keyboard.
7270
+ */
7271
+ showSelectionColumn = input(true, ...(ngDevMode ? [{ debugName: "showSelectionColumn" }] : /* istanbul ignore next */ []));
6881
7272
  showRowNumbers = input(true, ...(ngDevMode ? [{ debugName: "showRowNumbers" }] : /* istanbul ignore next */ []));
6882
7273
  showTotal = input(false, ...(ngDevMode ? [{ debugName: "showTotal" }] : /* istanbul ignore next */ []));
6883
7274
  emptyPlaceholder = input('-', ...(ngDevMode ? [{ debugName: "emptyPlaceholder" }] : /* istanbul ignore next */ []));
@@ -6893,10 +7284,30 @@ class TableComponent {
6893
7284
  stickyHeader = input(false, ...(ngDevMode ? [{ debugName: "stickyHeader" }] : /* istanbul ignore next */ []));
6894
7285
  /** Row density: lg (default) / md (compact) / sm (dense) */
6895
7286
  size = input('lg', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
7287
+ /**
7288
+ * Fires when a header cell changes the sort — including the third click that clears it, which
7289
+ * emits `{ field: '', direction: null }`. In `lazy` mode this is the refetch signal; the table
7290
+ * has already reset to page 1 by the time it fires.
7291
+ */
7292
+ gogSortChange = output();
7293
+ /**
7294
+ * Fires when the page changes, with the new 1-based page. Only ever fires for a *user* action
7295
+ * or a clamp — not for the initial render.
7296
+ */
7297
+ gogPageChange = output();
7298
+ /** Fires when a row is clicked, or activated with Enter/Space when `interactiveRows` is on. */
7299
+ gogRowClick = output();
6896
7300
  columns = contentChildren(GogColumn, ...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
6897
7301
  templates = contentChildren(TemplateDirective, ...(ngDevMode ? [{ debugName: "templates" }] : /* istanbul ignore next */ []));
6898
7302
  sortState = signal({ field: '', direction: null }, ...(ngDevMode ? [{ debugName: "sortState" }] : /* istanbul ignore next */ []));
7303
+ /**
7304
+ * In `lazy` mode `value` is the server's answer — already sorted, already the right page — so
7305
+ * both this and `visibleRows` become pass-throughs. Re-sorting it locally would reorder one
7306
+ * page against a global ordering, which looks like corruption rather than a bug.
7307
+ */
6899
7308
  sortedData = computed(() => {
7309
+ if (this.lazy())
7310
+ return this.value();
6900
7311
  const { field, direction } = this.sortState();
6901
7312
  const rows = [...this.value()];
6902
7313
  if (!field || !direction)
@@ -6917,11 +7328,16 @@ class TableComponent {
6917
7328
  return direction === 'asc' ? cmp : -cmp;
6918
7329
  });
6919
7330
  }, ...(ngDevMode ? [{ debugName: "sortedData" }] : /* istanbul ignore next */ []));
7331
+ /**
7332
+ * How many rows the paginator is dividing. `value.length` normally; `totalRecords` in `lazy`
7333
+ * mode, where `value` is only the current page. Also what `showTotal` reports.
7334
+ */
7335
+ rowCount = computed(() => this.lazy() ? Math.max(0, this.totalRecords() ?? 0) : this.value().length, ...(ngDevMode ? [{ debugName: "rowCount" }] : /* istanbul ignore next */ []));
6920
7336
  totalPages = computed(() => {
6921
7337
  const size = this.pageSize();
6922
7338
  if (!size)
6923
7339
  return 1;
6924
- return Math.max(1, Math.ceil(this.sortedData().length / size));
7340
+ return Math.max(1, Math.ceil(this.rowCount() / size));
6925
7341
  }, ...(ngDevMode ? [{ debugName: "totalPages" }] : /* istanbul ignore next */ []));
6926
7342
  /**
6927
7343
  * Resets to page 1 whenever the sort changes (a new sort re-orders the whole data set,
@@ -6930,22 +7346,128 @@ class TableComponent {
6930
7346
  * wherever the paginator navigated to. `gog-paginator`'s own `page` model additionally
6931
7347
  * self-clamps against `totalPages` on its own, so this only has to handle the reset case.
6932
7348
  */
6933
- currentPage = linkedSignal({ ...(ngDevMode ? { debugName: "currentPage" } : /* istanbul ignore next */ {}), source: () => ({ total: this.totalPages(), sortState: this.sortState() }),
7349
+ currentPage = linkedSignal({ ...(ngDevMode ? { debugName: "currentPage" } : /* istanbul ignore next */ {}), source: () => ({
7350
+ total: this.totalPages(),
7351
+ sortState: this.sortState(),
7352
+ pageSize: this.pageSize(),
7353
+ }),
6934
7354
  computation: (src, previous) => {
6935
- if (!previous || previous.source.sortState !== src.sortState)
7355
+ if (!previous)
7356
+ return 1;
7357
+ // A new sort re-orders everything, and a new page size redraws the boundaries — in both
7358
+ // cases the page the user was on no longer denotes the same rows.
7359
+ if (previous.source.sortState !== src.sortState)
7360
+ return 1;
7361
+ if (previous.source.pageSize !== src.pageSize)
6936
7362
  return 1;
6937
7363
  return Math.min(Math.max(1, previous.value), src.total);
6938
7364
  } });
7365
+ /** In `lazy` mode the server already sliced the page — see `sortedData`. */
6939
7366
  visibleRows = computed(() => {
6940
7367
  const size = this.pageSize();
6941
- if (!size)
7368
+ if (this.lazy() || !size)
6942
7369
  return this.sortedData();
6943
7370
  const page = this.currentPage();
6944
7371
  const start = (page - 1) * size;
6945
7372
  return this.sortedData().slice(start, start + size);
6946
7373
  }, ...(ngDevMode ? [{ debugName: "visibleRows" }] : /* istanbul ignore next */ []));
6947
- hasPagination = computed(() => !this.loading() && this.pageSize() > 0 && this.totalPages() > 1, ...(ngDevMode ? [{ debugName: "hasPagination" }] : /* istanbul ignore next */ []));
6948
- emptyColspan = computed(() => this.columns().length + (this.showRowNumbers() ? 1 : 0), ...(ngDevMode ? [{ debugName: "emptyColspan" }] : /* istanbul ignore next */ []));
7374
+ /**
7375
+ * Resolved the same way `gog-paginator` resolves it, because the footer's own visibility
7376
+ * depends on it — see `hasPagination`.
7377
+ */
7378
+ showsPageSizeSelect = computed(() => resolveConfigured(this.showPageSizeSelect(), this.globalConfig.paginator?.showPageSizeSelect, false), ...(ngDevMode ? [{ debugName: "showsPageSizeSelect" }] : /* istanbul ignore next */ []));
7379
+ /**
7380
+ * Normally the paginator only earns its space once there is more than one page — but the
7381
+ * rows-per-page select lives inside it, and hiding the whole thing at one page would strand the
7382
+ * user on whatever size produced that single page with no way back to a smaller one.
7383
+ */
7384
+ hasPagination = computed(() => !this.loading() &&
7385
+ this.pageSize() > 0 &&
7386
+ (this.totalPages() > 1 || this.showsPageSizeSelect()), ...(ngDevMode ? [{ debugName: "hasPagination" }] : /* istanbul ignore next */ []));
7387
+ globalConfig = inject(GOG_CONFIG);
7388
+ /** `GOG_CONFIG.labels` → the built-in English defaults. No per-instance inputs: these name
7389
+ * table chrome, and an app that relabels them does so once. */
7390
+ resolvedLabels = computed(() => {
7391
+ const configured = this.globalConfig.labels ?? {};
7392
+ return {
7393
+ total: resolveConfigured(undefined, configured.total, DEFAULT_LABELS.total),
7394
+ pagination: resolveConfigured(undefined, configured.tablePagination, DEFAULT_LABELS.pagination),
7395
+ selectRow: resolveConfigured(undefined, configured.selectRow, DEFAULT_LABELS.selectRow),
7396
+ selectAllRows: resolveConfigured(undefined, configured.selectAllRows, DEFAULT_LABELS.selectAllRows),
7397
+ };
7398
+ }, ...(ngDevMode ? [{ debugName: "resolvedLabels" }] : /* istanbul ignore next */ []));
7399
+ hasSelection = computed(() => this.selectionMode() !== 'none', ...(ngDevMode ? [{ debugName: "hasSelection" }] : /* istanbul ignore next */ []));
7400
+ hasSelectionColumn = computed(() => this.hasSelection() && this.showSelectionColumn(), ...(ngDevMode ? [{ debugName: "hasSelectionColumn" }] : /* istanbul ignore next */ []));
7401
+ emptyColspan = computed(() => this.columns().length + (this.showRowNumbers() ? 1 : 0) + (this.hasSelectionColumn() ? 1 : 0), ...(ngDevMode ? [{ debugName: "emptyColspan" }] : /* istanbul ignore next */ []));
7402
+ /**
7403
+ * Identity for selection and `@for` tracking. `dataKey`'s value when set, the row object
7404
+ * otherwise — the object works for a static data set and breaks the moment rows are re-fetched,
7405
+ * which is exactly what `dataKey` is for.
7406
+ */
7407
+ rowKey(row) {
7408
+ const key = this.dataKey();
7409
+ return key ? getByPath(row, key) : row;
7410
+ }
7411
+ isSelected(row) {
7412
+ const key = this.rowKey(row);
7413
+ return this.selection().some((selected) => this.rowKey(selected) === key);
7414
+ }
7415
+ /** All rows on the current page are selected — drives the header checkbox. */
7416
+ allPageRowsSelected = computed(() => {
7417
+ const rows = this.visibleRows();
7418
+ return rows.length > 0 && rows.every((row) => this.isSelected(row));
7419
+ }, ...(ngDevMode ? [{ debugName: "allPageRowsSelected" }] : /* istanbul ignore next */ []));
7420
+ /** Some but not all — the header checkbox's indeterminate state. */
7421
+ somePageRowsSelected = computed(() => {
7422
+ const rows = this.visibleRows();
7423
+ return rows.some((row) => this.isSelected(row)) && !this.allPageRowsSelected();
7424
+ }, ...(ngDevMode ? [{ debugName: "somePageRowsSelected" }] : /* istanbul ignore next */ []));
7425
+ toggleRowSelection(row, selected) {
7426
+ if (this.selectionMode() === 'single') {
7427
+ this.selection.set(selected ? [row] : []);
7428
+ return;
7429
+ }
7430
+ const key = this.rowKey(row);
7431
+ const without = this.selection().filter((entry) => this.rowKey(entry) !== key);
7432
+ this.selection.set(selected ? [...without, row] : without);
7433
+ }
7434
+ /**
7435
+ * Header checkbox: selects or clears **the current page**, not the whole data set. Anything
7436
+ * else would be a lie in `lazy` mode, where the table has never seen the other pages — and
7437
+ * inconsistent between the two modes, which is worse than either behaviour alone.
7438
+ */
7439
+ toggleAllOnPage(selected) {
7440
+ const rows = this.visibleRows();
7441
+ const pageKeys = new Set(rows.map((row) => this.rowKey(row)));
7442
+ const offPage = this.selection().filter((entry) => !pageKeys.has(this.rowKey(entry)));
7443
+ this.selection.set(selected ? [...offPage, ...rows] : offPage);
7444
+ }
7445
+ constructor() {
7446
+ /*
7447
+ * `gogPageChange` for user navigation and clamps, but *not* for the reset that follows a new
7448
+ * sort: `currentPage` snapping back to 1 there is part of the sort, and a lazy consumer
7449
+ * refetching from both events would fire two requests for one user action. Detected by the
7450
+ * sort having changed in the same computation, and skipped.
7451
+ */
7452
+ let previous = null;
7453
+ effect(() => {
7454
+ const page = this.currentPage();
7455
+ const sort = this.sortState();
7456
+ const size = this.pageSize();
7457
+ const causedByOther = previous && (previous.sort !== sort || previous.size !== size);
7458
+ if (previous && previous.page !== page && !causedByOther) {
7459
+ this.gogPageChange.emit(page);
7460
+ }
7461
+ previous = { page, sort, size };
7462
+ });
7463
+ effect(() => {
7464
+ if (!isDevMode() || !this.lazy() || this.pageSize() <= 0)
7465
+ return;
7466
+ if (this.totalRecords() === null) {
7467
+ console.warn("[gog-table] `lazy` with a `pageSize` but no `totalRecords`: the table cannot know how many pages exist, so pagination stays hidden. Pass the server's total row count.");
7468
+ }
7469
+ });
7470
+ }
6949
7471
  /**
6950
7472
  * A `gogColumnBody` template declared inside the column wins; the string-keyed
6951
7473
  * `<ng-template template="field" type="body">` is the deprecated fallback.
@@ -6968,6 +7490,10 @@ class TableComponent {
6968
7490
  headerContext(col) {
6969
7491
  return { $implicit: col.header(), field: col.field() };
6970
7492
  }
7493
+ /**
7494
+ * Cycles the clicked column asc → desc → unsorted, and emits the result. The emit is last, so
7495
+ * a `lazy` consumer refetching from it already sees `currentPage` reset to 1.
7496
+ */
6971
7497
  toggleSort(col) {
6972
7498
  if (!col.sortable())
6973
7499
  return;
@@ -6982,6 +7508,20 @@ class TableComponent {
6982
7508
  else {
6983
7509
  this.sortState.set({ field: '', direction: null });
6984
7510
  }
7511
+ this.gogSortChange.emit(this.sortState());
7512
+ }
7513
+ /** Click, or Enter/Space on a focused row when `interactiveRows` is on. */
7514
+ emitRowClick(row, index, originalEvent) {
7515
+ this.gogRowClick.emit({ row, index, originalEvent });
7516
+ }
7517
+ /** Enter and Space activate the focused row; Space must not also scroll the page. */
7518
+ onRowKeydown(row, index, event) {
7519
+ if (!this.interactiveRows())
7520
+ return;
7521
+ if (event.key !== 'Enter' && event.key !== ' ')
7522
+ return;
7523
+ event.preventDefault();
7524
+ this.emitRowClick(row, index, event);
6985
7525
  }
6986
7526
  getSortDirection(field) {
6987
7527
  const s = this.sortState();
@@ -7039,16 +7579,23 @@ class TableComponent {
7039
7579
  return map;
7040
7580
  }, ...(ngDevMode ? [{ debugName: "headerTemplateMap" }] : /* istanbul ignore next */ []));
7041
7581
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
7042
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: TableComponent, isStandalone: true, selector: "gog-table", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, showRowNumbers: { classPropertyName: "showRowNumbers", publicName: "showRowNumbers", isSignal: true, isRequired: false, transformFunction: null }, showTotal: { classPropertyName: "showTotal", publicName: "showTotal", isSignal: true, isRequired: false, transformFunction: null }, emptyPlaceholder: { classPropertyName: "emptyPlaceholder", publicName: "emptyPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, paginatorPosition: { classPropertyName: "paginatorPosition", publicName: "paginatorPosition", isSignal: true, isRequired: false, transformFunction: null }, totalPosition: { classPropertyName: "totalPosition", publicName: "totalPosition", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, showColumnBorders: { classPropertyName: "showColumnBorders", publicName: "showColumnBorders", isSignal: true, isRequired: false, transformFunction: null }, stickyHeader: { classPropertyName: "stickyHeader", publicName: "stickyHeader", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.display": "\"block\"", "style.width": "fullWidth() ? \"100%\" : \"fit-content\"" }, classAttribute: "gog-table-host" }, queries: [{ propertyName: "columns", predicate: GogColumn, isSignal: true }, { propertyName: "templates", predicate: TemplateDirective, isSignal: true }], ngImport: i0, template: "<div class=\"gog-table-wrapper gog-contained-layout\">\r\n <gog-scroll axis=\"horizontal\" class=\"gog-table-scroll\">\r\n <table\r\n class=\"gog-table\"\r\n [class]=\"sizeClass()\"\r\n [class.gog-table--col-borders]=\"showColumnBorders()\"\r\n [class.gog-table--loading]=\"loading()\"\r\n [class.gog-table--sticky-header]=\"stickyHeader()\"\r\n [style.width]=\"fullWidth() ? '100%' : 'fit-content'\"\r\n >\r\n <colgroup>\r\n @if (showRowNumbers()) {\r\n <col class=\"gog-table__col--num\" />\r\n }\r\n @for (col of columns(); track col.field()) {\r\n <col\r\n [style.width]=\"col.width() || null\"\r\n [style.min-width]=\"col.minWidth() || null\"\r\n [style.max-width]=\"col.maxWidth() || null\"\r\n />\r\n }\r\n </colgroup>\r\n <thead>\r\n <tr>\r\n @if (showRowNumbers()) {\r\n <th class=\"gog-table__th gog-table__th--num\" scope=\"col\">#</th>\r\n }\r\n @for (col of columns(); track col.field()) {\r\n <th\r\n class=\"gog-table__th\"\r\n scope=\"col\"\r\n [class.gog-table__th--sortable]=\"col.sortable() && !loading()\"\r\n [class.gog-table__th--sorted]=\"getSortDirection(col.field())\"\r\n [attr.aria-sort]=\"getAriaSort(col.field())\"\r\n [attr.tabindex]=\"col.sortable() && !loading() ? 0 : null\"\r\n (click)=\"handleSortClick(col)\"\r\n (keydown.enter)=\"handleSortClick(col)\"\r\n (keydown.space)=\"handleSortClick(col); $event.preventDefault()\"\r\n >\r\n @if (getHeaderTemplate(col); as headerTpl) {\r\n <ng-container *ngTemplateOutlet=\"headerTpl; context: headerContext(col)\" />\r\n } @else {\r\n <span class=\"gog-table__th-inner\">\r\n {{ col.header() || col.field() }}\r\n @if (col.sortable() && !loading()) {\r\n <span class=\"gog-table__sort-icon\" aria-hidden=\"true\">\r\n @if (getSortDirection(col.field()) === 'asc') {\r\n <gog-icon name=\"sort-up\" />\r\n } @else if (getSortDirection(col.field()) === 'desc') {\r\n <gog-icon name=\"sort-down\" />\r\n } @else {\r\n <gog-icon name=\"sort\" />\r\n }\r\n </span>\r\n }\r\n </span>\r\n }\r\n </th>\r\n }\r\n </tr>\r\n </thead>\r\n <tbody>\r\n @if (loading()) {\r\n <tr>\r\n <td class=\"gog-table__loading-cell\" [attr.colspan]=\"emptyColspan()\">\r\n <gog-spinner size=\"md\" />\r\n </td>\r\n </tr>\r\n } @else if (visibleRows().length === 0) {\r\n <tr>\r\n <td class=\"gog-table__empty\" [attr.colspan]=\"emptyColspan()\">\u2014</td>\r\n </tr>\r\n } @else {\r\n @for (row of visibleRows(); track $index; let i = $index) {\r\n <tr class=\"gog-table__row\">\r\n @if (showRowNumbers()) {\r\n <td class=\"gog-table__td gog-table__td--num\">{{ globalRowIndex(i) }}</td>\r\n }\r\n @for (col of columns(); track col.field()) {\r\n <td class=\"gog-table__td\">\r\n @if (getBodyTemplate(col); as bodyTpl) {\r\n <ng-container *ngTemplateOutlet=\"bodyTpl; context: bodyContext(row, col, i)\" />\r\n } @else {\r\n {{ formatCellValue(row, col.field()) }}\r\n }\r\n </td>\r\n }\r\n </tr>\r\n }\r\n }\r\n </tbody>\r\n </table>\r\n </gog-scroll>\r\n\r\n @if (hasPagination() || showTotal()) {\r\n <div class=\"gog-table__footer\">\r\n @if (showTotal()) {\r\n <span class=\"gog-table__total\" [style.grid-area]=\"totalGridArea()\">\r\n Total: {{ value().length }}\r\n </span>\r\n }\r\n\r\n @if (hasPagination()) {\r\n <gog-paginator\r\n class=\"gog-table__pagination\"\r\n [style.grid-area]=\"paginatorGridArea()\"\r\n [(page)]=\"currentPage\"\r\n [totalPages]=\"totalPages()\"\r\n rangeMode=\"ellipsis\"\r\n size=\"sm\"\r\n ariaLabel=\"Table pagination\"\r\n />\r\n }\r\n </div>\r\n }\r\n</div>\r\n", styles: [".gog-table-wrapper{display:flex;flex-direction:column;gap:var(--gog-table-gap);width:100%;overflow-anchor:none}.gog-table-scroll{width:100%}.gog-table{width:100%;border-collapse:collapse;border:var(--gog-table-border-width) var(--gog-table-border-style) var(--gog-table-border-color);background-color:var(--gog-table-surface);color:var(--gog-table-text-color);font-family:var(--gog-table-font-family);table-layout:fixed}.gog-table--slg{--gog-table-size-th-padding-v: var(--gog-table-slg-padding-v);--gog-table-size-td-padding-v: var(--gog-table-slg-padding-v);--gog-table-size-th-font-size: var(--gog-table-slg-th-font-size);--gog-table-size-td-font-size: var(--gog-table-slg-td-font-size)}.gog-table--md{--gog-table-size-th-padding-v: var(--gog-table-md-padding-v);--gog-table-size-td-padding-v: var(--gog-table-md-padding-v);--gog-table-size-th-font-size: var(--gog-table-md-th-font-size);--gog-table-size-td-font-size: var(--gog-table-md-td-font-size)}.gog-table--sm{--gog-table-size-th-padding-v: var(--gog-table-sm-padding-v);--gog-table-size-td-padding-v: var(--gog-table-sm-padding-v);--gog-table-size-th-font-size: var(--gog-table-sm-th-font-size);--gog-table-size-td-font-size: var(--gog-table-sm-td-font-size)}.gog-table--xsm{--gog-table-size-th-padding-v: var(--gog-table-xsm-padding-v);--gog-table-size-td-padding-v: var(--gog-table-xsm-padding-v);--gog-table-size-th-font-size: var(--gog-table-xsm-th-font-size);--gog-table-size-td-font-size: var(--gog-table-xsm-td-font-size)}.gog-table__col--num{width:var(--gog-table-num-col-width)}.gog-table__th{padding:var(--gog-table-th-padding-v, var(--gog-table-size-th-padding-v, var(--gog-table-lg-padding-v))) var(--gog-table-padding-h);text-align:left;font-family:var(--gog-table-header-font-family);font-size:var(--gog-table-th-font-size, var(--gog-table-size-th-font-size, var(--gog-table-lg-th-font-size)));text-transform:var(--gog-table-header-text-transform);letter-spacing:var(--gog-table-header-letter-spacing);color:var(--gog-table-accent-color);background-color:var(--gog-table-surface);border-bottom:var(--gog-table-border-width) var(--gog-table-border-style) var(--gog-table-border-color);white-space:normal;overflow:hidden}.gog-table--sticky-header .gog-table__th{position:sticky;top:0;z-index:1}.gog-table__th--num{width:var(--gog-table-num-col-width);text-align:center;color:var(--gog-table-muted-color)}.gog-table__th--sortable{cursor:pointer;-webkit-user-select:none;user-select:none}.gog-table__th--sortable:focus-visible{outline:var(--gog-table-focus-ring-width) solid var(--gog-table-focus-ring);outline-offset:calc(var(--gog-table-focus-ring-width) * -1)}.gog-table__th--sortable:hover,.gog-table__th--sorted{color:var(--gog-table-accent-bright)}.gog-table__th-inner{display:inline-flex;align-items:center;gap:var(--gog-table-th-inner-gap);width:100%}.gog-table__sort-icon{display:inline-block;width:var(--gog-table-sort-icon-width);text-align:center;font-size:var(--gog-table-sort-icon-size);opacity:var(--gog-table-sort-icon-opacity);flex-shrink:0}.gog-table__th--sorted .gog-table__sort-icon{opacity:1}.gog-table__td{padding:var(--gog-table-td-padding-v, var(--gog-table-size-td-padding-v, var(--gog-table-lg-padding-v))) var(--gog-table-padding-h);font-size:var(--gog-table-td-font-size, var(--gog-table-size-td-font-size, var(--gog-table-lg-td-font-size)));border-bottom:var(--gog-table-row-border-width) var(--gog-table-border-style) var(--gog-table-border-color);vertical-align:middle;overflow-wrap:break-word;word-break:break-word;overflow:hidden}.gog-table__td--num{text-align:center;color:var(--gog-table-muted-color);font-size:var(--gog-table-num-font-size);font-family:var(--gog-table-numeric-font-family);width:var(--gog-table-num-col-width)}.gog-table__row:last-child .gog-table__td{border-bottom:none}.gog-table__row{transition:background-color var(--gog-table-row-transition-duration) var(--gog-easing)}.gog-table__row:hover{background-color:var(--gog-table-hover-bg)}.gog-table__empty{padding:var(--gog-table-empty-padding);text-align:center;color:var(--gog-table-muted-color);font-size:var(--gog-table-empty-font-size)}.gog-table--loading thead{opacity:var(--gog-table-loading-opacity);pointer-events:none}.gog-table__loading-cell{padding:var(--gog-table-loading-padding);text-align:center}.gog-table--col-borders .gog-table__th:not(:last-child),.gog-table--col-borders .gog-table__td:not(:last-child){border-right:var(--gog-table-row-border-width) var(--gog-table-border-style) var(--gog-table-border-color)}.gog-table__footer{display:grid;grid-template-columns:1fr auto 1fr;grid-template-areas:\"left center right\";align-items:center;min-height:var(--gog-table-footer-min-height);gap:var(--gog-table-footer-gap)}.gog-table__total{font-size:var(--gog-table-total-font-size);color:var(--gog-table-muted-color);font-family:var(--gog-table-numeric-font-family);text-transform:var(--gog-table-total-text-transform);letter-spacing:var(--gog-table-total-letter-spacing)}.gog-table__total[style*=\"grid-area: right\"]{text-align:right}.gog-table__pagination[style*=\"grid-area: left\"]{justify-content:flex-start}.gog-table__pagination[style*=\"grid-area: center\"]{justify-content:center}.gog-table__pagination[style*=\"grid-area: right\"]{justify-content:flex-end}@media(prefers-reduced-motion:reduce){.gog-table__row{transition:none}}\n"], dependencies: [{ kind: "component", type: SpinnerComponent, selector: "gog-spinner", inputs: ["size", "overlay", "ariaLabel", "variant"] }, { kind: "component", type: PaginatorComponent, selector: "gog-paginator", inputs: ["page", "fullWidth", "totalPages", "rangeMode", "visiblePages", "showFirstPage", "showLastPage", "siblingCount", "size", "disabled", "ariaLabel"], outputs: ["pageChange"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: IconComponent, selector: "gog-icon", inputs: ["name", "template", "title", "ariaHidden"] }, { kind: "component", type: ScrollComponent, selector: "gog-scroll", inputs: ["axis", "size", "autoHide", "hideDelay", "reachThreshold", "focusable", "ariaLabel", "overscrollBehavior", "showTrack"], outputs: ["gogScroll", "gogReachStart", "gogReachEnd"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
7582
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: TableComponent, isStandalone: true, selector: "gog-table", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, showPageSizeSelect: { classPropertyName: "showPageSizeSelect", publicName: "showPageSizeSelect", isSignal: true, isRequired: false, transformFunction: null }, pageSizeOptions: { classPropertyName: "pageSizeOptions", publicName: "pageSizeOptions", isSignal: true, isRequired: false, transformFunction: null }, lazy: { classPropertyName: "lazy", publicName: "lazy", isSignal: true, isRequired: false, transformFunction: null }, totalRecords: { classPropertyName: "totalRecords", publicName: "totalRecords", isSignal: true, isRequired: false, transformFunction: null }, interactiveRows: { classPropertyName: "interactiveRows", publicName: "interactiveRows", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, selection: { classPropertyName: "selection", publicName: "selection", isSignal: true, isRequired: false, transformFunction: null }, dataKey: { classPropertyName: "dataKey", publicName: "dataKey", isSignal: true, isRequired: false, transformFunction: null }, showSelectionColumn: { classPropertyName: "showSelectionColumn", publicName: "showSelectionColumn", isSignal: true, isRequired: false, transformFunction: null }, showRowNumbers: { classPropertyName: "showRowNumbers", publicName: "showRowNumbers", isSignal: true, isRequired: false, transformFunction: null }, showTotal: { classPropertyName: "showTotal", publicName: "showTotal", isSignal: true, isRequired: false, transformFunction: null }, emptyPlaceholder: { classPropertyName: "emptyPlaceholder", publicName: "emptyPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, paginatorPosition: { classPropertyName: "paginatorPosition", publicName: "paginatorPosition", isSignal: true, isRequired: false, transformFunction: null }, totalPosition: { classPropertyName: "totalPosition", publicName: "totalPosition", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, showColumnBorders: { classPropertyName: "showColumnBorders", publicName: "showColumnBorders", isSignal: true, isRequired: false, transformFunction: null }, stickyHeader: { classPropertyName: "stickyHeader", publicName: "stickyHeader", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pageSize: "pageSizeChange", selection: "selectionChange", gogSortChange: "gogSortChange", gogPageChange: "gogPageChange", gogRowClick: "gogRowClick" }, host: { properties: { "style.display": "\"block\"", "style.width": "fullWidth() ? \"100%\" : \"fit-content\"" }, classAttribute: "gog-table-host" }, queries: [{ propertyName: "columns", predicate: GogColumn, isSignal: true }, { propertyName: "templates", predicate: TemplateDirective, isSignal: true }], ngImport: i0, template: "<div class=\"gog-table-wrapper gog-contained-layout\">\r\n <gog-scroll axis=\"horizontal\" class=\"gog-table-scroll\">\r\n <table\r\n class=\"gog-table\"\r\n [class]=\"sizeClass()\"\r\n [class.gog-table--col-borders]=\"showColumnBorders()\"\r\n [class.gog-table--loading]=\"loading()\"\r\n [class.gog-table--sticky-header]=\"stickyHeader()\"\r\n [style.width]=\"fullWidth() ? '100%' : 'fit-content'\"\r\n >\r\n <colgroup>\r\n @if (hasSelectionColumn()) {\r\n <col class=\"gog-table__col--select\" />\r\n }\r\n @if (showRowNumbers()) {\r\n <col class=\"gog-table__col--num\" />\r\n }\r\n @for (col of columns(); track col.field()) {\r\n <col\r\n [style.width]=\"col.width() || null\"\r\n [style.min-width]=\"col.minWidth() || null\"\r\n [style.max-width]=\"col.maxWidth() || null\"\r\n />\r\n }\r\n </colgroup>\r\n <thead>\r\n <tr>\r\n @if (hasSelectionColumn()) {\r\n <th class=\"gog-table__th gog-table__th--select\" scope=\"col\">\r\n <!--\r\n Only `multiple` gets a select-all: in `single` mode there is nothing to select\r\n all of, and a checkbox that can only ever check one row is a lie.\r\n -->\r\n @if (selectionMode() === 'multiple') {\r\n <gog-checkbox\r\n [checked]=\"allPageRowsSelected()\"\r\n [indeterminate]=\"somePageRowsSelected()\"\r\n [disabled]=\"loading() || visibleRows().length === 0\"\r\n [ariaLabel]=\"resolvedLabels().selectAllRows\"\r\n (checkedChange)=\"toggleAllOnPage($event)\"\r\n />\r\n }\r\n </th>\r\n }\r\n @if (showRowNumbers()) {\r\n <th class=\"gog-table__th gog-table__th--num\" scope=\"col\">#</th>\r\n }\r\n @for (col of columns(); track col.field()) {\r\n <th\r\n class=\"gog-table__th\"\r\n scope=\"col\"\r\n [class.gog-table__th--sortable]=\"col.sortable() && !loading()\"\r\n [class.gog-table__th--sorted]=\"getSortDirection(col.field())\"\r\n [attr.aria-sort]=\"getAriaSort(col.field())\"\r\n [attr.tabindex]=\"col.sortable() && !loading() ? 0 : null\"\r\n (click)=\"handleSortClick(col)\"\r\n (keydown.enter)=\"handleSortClick(col)\"\r\n (keydown.space)=\"handleSortClick(col); $event.preventDefault()\"\r\n >\r\n @if (getHeaderTemplate(col); as headerTpl) {\r\n <ng-container *ngTemplateOutlet=\"headerTpl; context: headerContext(col)\" />\r\n } @else {\r\n <span class=\"gog-table__th-inner\">\r\n {{ col.header() || col.field() }}\r\n @if (col.sortable() && !loading()) {\r\n <span class=\"gog-table__sort-icon\" aria-hidden=\"true\">\r\n @if (getSortDirection(col.field()) === 'asc') {\r\n <gog-icon name=\"sort-up\" />\r\n } @else if (getSortDirection(col.field()) === 'desc') {\r\n <gog-icon name=\"sort-down\" />\r\n } @else {\r\n <gog-icon name=\"sort\" />\r\n }\r\n </span>\r\n }\r\n </span>\r\n }\r\n </th>\r\n }\r\n </tr>\r\n </thead>\r\n <tbody>\r\n @if (loading()) {\r\n <tr>\r\n <td class=\"gog-table__loading-cell\" [attr.colspan]=\"emptyColspan()\">\r\n <gog-spinner size=\"md\" />\r\n </td>\r\n </tr>\r\n } @else if (visibleRows().length === 0) {\r\n <tr>\r\n <td class=\"gog-table__empty\" [attr.colspan]=\"emptyColspan()\">\u2014</td>\r\n </tr>\r\n } @else {\r\n @for (row of visibleRows(); track rowKey(row); let i = $index) {\r\n <tr\r\n class=\"gog-table__row\"\r\n [class.gog-table__row--interactive]=\"interactiveRows()\"\r\n [class.gog-table__row--selected]=\"isSelected(row)\"\r\n [attr.tabindex]=\"interactiveRows() ? 0 : null\"\r\n [attr.aria-selected]=\"hasSelection() ? isSelected(row) : null\"\r\n (click)=\"emitRowClick(row, i, $event)\"\r\n (keydown)=\"onRowKeydown(row, i, $event)\"\r\n >\r\n @if (hasSelectionColumn()) {\r\n <td class=\"gog-table__td gog-table__td--select\">\r\n <!--\r\n `$event.stopPropagation()` so ticking the box does not also count as a row\r\n click: with `interactiveRows` those are two different intents, and firing both\r\n from one gesture is how a \"select\" ends up navigating away.\r\n -->\r\n <gog-checkbox\r\n [checked]=\"isSelected(row)\"\r\n [ariaLabel]=\"resolvedLabels().selectRow\"\r\n (click)=\"$event.stopPropagation()\"\r\n (checkedChange)=\"toggleRowSelection(row, $event)\"\r\n />\r\n </td>\r\n }\r\n @if (showRowNumbers()) {\r\n <td class=\"gog-table__td gog-table__td--num\">{{ globalRowIndex(i) }}</td>\r\n }\r\n @for (col of columns(); track col.field()) {\r\n <td class=\"gog-table__td\">\r\n @if (getBodyTemplate(col); as bodyTpl) {\r\n <ng-container *ngTemplateOutlet=\"bodyTpl; context: bodyContext(row, col, i)\" />\r\n } @else {\r\n {{ formatCellValue(row, col.field()) }}\r\n }\r\n </td>\r\n }\r\n </tr>\r\n }\r\n }\r\n </tbody>\r\n </table>\r\n </gog-scroll>\r\n\r\n @if (hasPagination() || showTotal()) {\r\n <div class=\"gog-table__footer\">\r\n @if (showTotal()) {\r\n <span class=\"gog-table__total\" [style.grid-area]=\"totalGridArea()\">\r\n {{ resolvedLabels().total }}: {{ rowCount() }}\r\n </span>\r\n }\r\n\r\n @if (hasPagination()) {\r\n <!--\r\n `[(pageSize)]` straight through to the table's own model: the rows-per-page select\r\n writes back here, and a consumer binding `[(pageSize)]` on the table sees it. No\r\n intermediate signal, in either direction.\r\n -->\r\n <gog-paginator\r\n class=\"gog-table__pagination\"\r\n [style.grid-area]=\"paginatorGridArea()\"\r\n [(page)]=\"currentPage\"\r\n [(pageSize)]=\"pageSize\"\r\n [totalPages]=\"totalPages()\"\r\n [showPageSizeSelect]=\"showPageSizeSelect()\"\r\n [pageSizeOptions]=\"pageSizeOptions()\"\r\n rangeMode=\"ellipsis\"\r\n size=\"sm\"\r\n [ariaLabel]=\"resolvedLabels().pagination\"\r\n />\r\n }\r\n </div>\r\n }\r\n</div>\r\n", styles: ["@charset \"UTF-8\";.gog-table-wrapper{display:flex;flex-direction:column;gap:var(--gog-table-gap);width:100%;overflow-anchor:none}.gog-table-scroll{width:100%}.gog-table{width:100%;border-collapse:collapse;border:var(--gog-table-border-width) var(--gog-table-border-style) var(--gog-table-border-color);background-color:var(--gog-table-surface);color:var(--gog-table-text-color);font-family:var(--gog-table-font-family);table-layout:fixed}.gog-table--slg{--gog-table-size-th-padding-v: var(--gog-table-slg-padding-v);--gog-table-size-td-padding-v: var(--gog-table-slg-padding-v);--gog-table-size-th-font-size: var(--gog-table-slg-th-font-size);--gog-table-size-td-font-size: var(--gog-table-slg-td-font-size)}.gog-table--md{--gog-table-size-th-padding-v: var(--gog-table-md-padding-v);--gog-table-size-td-padding-v: var(--gog-table-md-padding-v);--gog-table-size-th-font-size: var(--gog-table-md-th-font-size);--gog-table-size-td-font-size: var(--gog-table-md-td-font-size)}.gog-table--sm{--gog-table-size-th-padding-v: var(--gog-table-sm-padding-v);--gog-table-size-td-padding-v: var(--gog-table-sm-padding-v);--gog-table-size-th-font-size: var(--gog-table-sm-th-font-size);--gog-table-size-td-font-size: var(--gog-table-sm-td-font-size)}.gog-table--xsm{--gog-table-size-th-padding-v: var(--gog-table-xsm-padding-v);--gog-table-size-td-padding-v: var(--gog-table-xsm-padding-v);--gog-table-size-th-font-size: var(--gog-table-xsm-th-font-size);--gog-table-size-td-font-size: var(--gog-table-xsm-td-font-size)}.gog-table__col--num{width:var(--gog-table-num-col-width)}.gog-table__th{padding:var(--gog-table-th-padding-v, var(--gog-table-size-th-padding-v, var(--gog-table-lg-padding-v))) var(--gog-table-padding-h);text-align:left;font-family:var(--gog-table-header-font-family);font-size:var(--gog-table-th-font-size, var(--gog-table-size-th-font-size, var(--gog-table-lg-th-font-size)));text-transform:var(--gog-table-header-text-transform);letter-spacing:var(--gog-table-header-letter-spacing);color:var(--gog-table-accent-color);background-color:var(--gog-table-surface);border-bottom:var(--gog-table-border-width) var(--gog-table-border-style) var(--gog-table-border-color);white-space:normal;overflow:hidden}.gog-table--sticky-header .gog-table__th{position:sticky;top:0;z-index:1}.gog-table__th--num{width:var(--gog-table-num-col-width);text-align:center;color:var(--gog-table-muted-color)}.gog-table__th--select,.gog-table__td--select{width:var(--gog-table-select-col-width);text-align:center}.gog-table__th--sortable{cursor:pointer;-webkit-user-select:none;user-select:none}.gog-table__th--sortable:focus-visible{outline:var(--gog-table-focus-ring-width) solid var(--gog-table-focus-ring);outline-offset:calc(var(--gog-table-focus-ring-width) * -1)}.gog-table__th--sortable:hover,.gog-table__th--sorted{color:var(--gog-table-accent-bright)}.gog-table__th-inner{display:inline-flex;align-items:center;gap:var(--gog-table-th-inner-gap);width:100%}.gog-table__sort-icon{display:inline-block;width:var(--gog-table-sort-icon-width);text-align:center;font-size:var(--gog-table-sort-icon-size);opacity:var(--gog-table-sort-icon-opacity);flex-shrink:0}.gog-table__th--sorted .gog-table__sort-icon{opacity:1}.gog-table__td{padding:var(--gog-table-td-padding-v, var(--gog-table-size-td-padding-v, var(--gog-table-lg-padding-v))) var(--gog-table-padding-h);font-size:var(--gog-table-td-font-size, var(--gog-table-size-td-font-size, var(--gog-table-lg-td-font-size)));border-bottom:var(--gog-table-row-border-width) var(--gog-table-border-style) var(--gog-table-border-color);vertical-align:middle;overflow-wrap:break-word;word-break:break-word;overflow:hidden}.gog-table__td--num{text-align:center;color:var(--gog-table-muted-color);font-size:var(--gog-table-num-font-size);font-family:var(--gog-table-numeric-font-family);width:var(--gog-table-num-col-width)}.gog-table__row:last-child .gog-table__td{border-bottom:none}.gog-table__row{transition:background-color var(--gog-table-row-transition-duration) var(--gog-easing)}.gog-table__row--interactive{cursor:pointer}.gog-table__row--interactive:focus-visible{outline:var(--gog-table-focus-ring-width) solid var(--gog-table-focus-ring);outline-offset:calc(var(--gog-table-focus-ring-width) * -1)}.gog-table__row:hover{background-color:var(--gog-table-hover-bg)}.gog-table__row--selected,.gog-table__row--selected:hover{background-color:var(--gog-table-selected-bg)}.gog-table__empty{padding:var(--gog-table-empty-padding);text-align:center;color:var(--gog-table-muted-color);font-size:var(--gog-table-empty-font-size)}.gog-table--loading thead{opacity:var(--gog-table-loading-opacity);pointer-events:none}.gog-table__loading-cell{padding:var(--gog-table-loading-padding);text-align:center}.gog-table--col-borders .gog-table__th:not(:last-child),.gog-table--col-borders .gog-table__td:not(:last-child){border-right:var(--gog-table-row-border-width) var(--gog-table-border-style) var(--gog-table-border-color)}.gog-table__footer{display:grid;grid-template-columns:1fr auto 1fr;grid-template-areas:\"left center right\";align-items:center;min-height:var(--gog-table-footer-min-height);gap:var(--gog-table-footer-gap)}.gog-table__total{font-size:var(--gog-table-total-font-size);color:var(--gog-table-muted-color);font-family:var(--gog-table-numeric-font-family);text-transform:var(--gog-table-total-text-transform);letter-spacing:var(--gog-table-total-letter-spacing)}.gog-table__total[style*=\"grid-area: right\"]{text-align:right}.gog-table__pagination[style*=\"grid-area: left\"]{justify-content:flex-start}.gog-table__pagination[style*=\"grid-area: center\"]{justify-content:center}.gog-table__pagination[style*=\"grid-area: right\"]{justify-content:flex-end}@media(prefers-reduced-motion:reduce){.gog-table__row{transition:none}}\n"], dependencies: [{ kind: "component", type: SpinnerComponent, selector: "gog-spinner", inputs: ["size", "overlay", "ariaLabel", "variant"] }, { kind: "component", type: PaginatorComponent, selector: "gog-paginator", inputs: ["page", "fullWidth", "totalPages", "totalRecords", "pageSize", "showPageSizeSelect", "pageSizeOptions", "rangeMode", "visiblePages", "showFirstPage", "showLastPage", "siblingCount", "size", "disabled", "ariaLabel"], outputs: ["pageChange", "pageSizeChange"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: IconComponent, selector: "gog-icon", inputs: ["name", "template", "title", "ariaHidden"] }, { kind: "component", type: ScrollComponent, selector: "gog-scroll", inputs: ["axis", "size", "autoHide", "hideDelay", "reachThreshold", "focusable", "ariaLabel", "overscrollBehavior", "showTrack"], outputs: ["gogScroll", "gogReachStart", "gogReachEnd"] }, { kind: "component", type: CheckboxComponent, selector: "gog-checkbox", inputs: ["label", "ariaLabel", "size", "indeterminate", "disabled", "fullWidth", "checkIconTemplate", "checked"], outputs: ["checkedChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
7043
7583
  }
7044
7584
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: TableComponent, decorators: [{
7045
7585
  type: Component,
7046
- args: [{ selector: 'gog-table', imports: [SpinnerComponent, PaginatorComponent, NgTemplateOutlet, IconComponent, ScrollComponent], changeDetection: ChangeDetectionStrategy.OnPush, host: {
7586
+ args: [{ selector: 'gog-table', imports: [
7587
+ SpinnerComponent,
7588
+ PaginatorComponent,
7589
+ NgTemplateOutlet,
7590
+ IconComponent,
7591
+ ScrollComponent,
7592
+ CheckboxComponent,
7593
+ ], changeDetection: ChangeDetectionStrategy.OnPush, host: {
7047
7594
  class: 'gog-table-host',
7048
7595
  '[style.display]': '"block"',
7049
7596
  '[style.width]': 'fullWidth() ? "100%" : "fit-content"',
7050
- }, template: "<div class=\"gog-table-wrapper gog-contained-layout\">\r\n <gog-scroll axis=\"horizontal\" class=\"gog-table-scroll\">\r\n <table\r\n class=\"gog-table\"\r\n [class]=\"sizeClass()\"\r\n [class.gog-table--col-borders]=\"showColumnBorders()\"\r\n [class.gog-table--loading]=\"loading()\"\r\n [class.gog-table--sticky-header]=\"stickyHeader()\"\r\n [style.width]=\"fullWidth() ? '100%' : 'fit-content'\"\r\n >\r\n <colgroup>\r\n @if (showRowNumbers()) {\r\n <col class=\"gog-table__col--num\" />\r\n }\r\n @for (col of columns(); track col.field()) {\r\n <col\r\n [style.width]=\"col.width() || null\"\r\n [style.min-width]=\"col.minWidth() || null\"\r\n [style.max-width]=\"col.maxWidth() || null\"\r\n />\r\n }\r\n </colgroup>\r\n <thead>\r\n <tr>\r\n @if (showRowNumbers()) {\r\n <th class=\"gog-table__th gog-table__th--num\" scope=\"col\">#</th>\r\n }\r\n @for (col of columns(); track col.field()) {\r\n <th\r\n class=\"gog-table__th\"\r\n scope=\"col\"\r\n [class.gog-table__th--sortable]=\"col.sortable() && !loading()\"\r\n [class.gog-table__th--sorted]=\"getSortDirection(col.field())\"\r\n [attr.aria-sort]=\"getAriaSort(col.field())\"\r\n [attr.tabindex]=\"col.sortable() && !loading() ? 0 : null\"\r\n (click)=\"handleSortClick(col)\"\r\n (keydown.enter)=\"handleSortClick(col)\"\r\n (keydown.space)=\"handleSortClick(col); $event.preventDefault()\"\r\n >\r\n @if (getHeaderTemplate(col); as headerTpl) {\r\n <ng-container *ngTemplateOutlet=\"headerTpl; context: headerContext(col)\" />\r\n } @else {\r\n <span class=\"gog-table__th-inner\">\r\n {{ col.header() || col.field() }}\r\n @if (col.sortable() && !loading()) {\r\n <span class=\"gog-table__sort-icon\" aria-hidden=\"true\">\r\n @if (getSortDirection(col.field()) === 'asc') {\r\n <gog-icon name=\"sort-up\" />\r\n } @else if (getSortDirection(col.field()) === 'desc') {\r\n <gog-icon name=\"sort-down\" />\r\n } @else {\r\n <gog-icon name=\"sort\" />\r\n }\r\n </span>\r\n }\r\n </span>\r\n }\r\n </th>\r\n }\r\n </tr>\r\n </thead>\r\n <tbody>\r\n @if (loading()) {\r\n <tr>\r\n <td class=\"gog-table__loading-cell\" [attr.colspan]=\"emptyColspan()\">\r\n <gog-spinner size=\"md\" />\r\n </td>\r\n </tr>\r\n } @else if (visibleRows().length === 0) {\r\n <tr>\r\n <td class=\"gog-table__empty\" [attr.colspan]=\"emptyColspan()\">\u2014</td>\r\n </tr>\r\n } @else {\r\n @for (row of visibleRows(); track $index; let i = $index) {\r\n <tr class=\"gog-table__row\">\r\n @if (showRowNumbers()) {\r\n <td class=\"gog-table__td gog-table__td--num\">{{ globalRowIndex(i) }}</td>\r\n }\r\n @for (col of columns(); track col.field()) {\r\n <td class=\"gog-table__td\">\r\n @if (getBodyTemplate(col); as bodyTpl) {\r\n <ng-container *ngTemplateOutlet=\"bodyTpl; context: bodyContext(row, col, i)\" />\r\n } @else {\r\n {{ formatCellValue(row, col.field()) }}\r\n }\r\n </td>\r\n }\r\n </tr>\r\n }\r\n }\r\n </tbody>\r\n </table>\r\n </gog-scroll>\r\n\r\n @if (hasPagination() || showTotal()) {\r\n <div class=\"gog-table__footer\">\r\n @if (showTotal()) {\r\n <span class=\"gog-table__total\" [style.grid-area]=\"totalGridArea()\">\r\n Total: {{ value().length }}\r\n </span>\r\n }\r\n\r\n @if (hasPagination()) {\r\n <gog-paginator\r\n class=\"gog-table__pagination\"\r\n [style.grid-area]=\"paginatorGridArea()\"\r\n [(page)]=\"currentPage\"\r\n [totalPages]=\"totalPages()\"\r\n rangeMode=\"ellipsis\"\r\n size=\"sm\"\r\n ariaLabel=\"Table pagination\"\r\n />\r\n }\r\n </div>\r\n }\r\n</div>\r\n", styles: [".gog-table-wrapper{display:flex;flex-direction:column;gap:var(--gog-table-gap);width:100%;overflow-anchor:none}.gog-table-scroll{width:100%}.gog-table{width:100%;border-collapse:collapse;border:var(--gog-table-border-width) var(--gog-table-border-style) var(--gog-table-border-color);background-color:var(--gog-table-surface);color:var(--gog-table-text-color);font-family:var(--gog-table-font-family);table-layout:fixed}.gog-table--slg{--gog-table-size-th-padding-v: var(--gog-table-slg-padding-v);--gog-table-size-td-padding-v: var(--gog-table-slg-padding-v);--gog-table-size-th-font-size: var(--gog-table-slg-th-font-size);--gog-table-size-td-font-size: var(--gog-table-slg-td-font-size)}.gog-table--md{--gog-table-size-th-padding-v: var(--gog-table-md-padding-v);--gog-table-size-td-padding-v: var(--gog-table-md-padding-v);--gog-table-size-th-font-size: var(--gog-table-md-th-font-size);--gog-table-size-td-font-size: var(--gog-table-md-td-font-size)}.gog-table--sm{--gog-table-size-th-padding-v: var(--gog-table-sm-padding-v);--gog-table-size-td-padding-v: var(--gog-table-sm-padding-v);--gog-table-size-th-font-size: var(--gog-table-sm-th-font-size);--gog-table-size-td-font-size: var(--gog-table-sm-td-font-size)}.gog-table--xsm{--gog-table-size-th-padding-v: var(--gog-table-xsm-padding-v);--gog-table-size-td-padding-v: var(--gog-table-xsm-padding-v);--gog-table-size-th-font-size: var(--gog-table-xsm-th-font-size);--gog-table-size-td-font-size: var(--gog-table-xsm-td-font-size)}.gog-table__col--num{width:var(--gog-table-num-col-width)}.gog-table__th{padding:var(--gog-table-th-padding-v, var(--gog-table-size-th-padding-v, var(--gog-table-lg-padding-v))) var(--gog-table-padding-h);text-align:left;font-family:var(--gog-table-header-font-family);font-size:var(--gog-table-th-font-size, var(--gog-table-size-th-font-size, var(--gog-table-lg-th-font-size)));text-transform:var(--gog-table-header-text-transform);letter-spacing:var(--gog-table-header-letter-spacing);color:var(--gog-table-accent-color);background-color:var(--gog-table-surface);border-bottom:var(--gog-table-border-width) var(--gog-table-border-style) var(--gog-table-border-color);white-space:normal;overflow:hidden}.gog-table--sticky-header .gog-table__th{position:sticky;top:0;z-index:1}.gog-table__th--num{width:var(--gog-table-num-col-width);text-align:center;color:var(--gog-table-muted-color)}.gog-table__th--sortable{cursor:pointer;-webkit-user-select:none;user-select:none}.gog-table__th--sortable:focus-visible{outline:var(--gog-table-focus-ring-width) solid var(--gog-table-focus-ring);outline-offset:calc(var(--gog-table-focus-ring-width) * -1)}.gog-table__th--sortable:hover,.gog-table__th--sorted{color:var(--gog-table-accent-bright)}.gog-table__th-inner{display:inline-flex;align-items:center;gap:var(--gog-table-th-inner-gap);width:100%}.gog-table__sort-icon{display:inline-block;width:var(--gog-table-sort-icon-width);text-align:center;font-size:var(--gog-table-sort-icon-size);opacity:var(--gog-table-sort-icon-opacity);flex-shrink:0}.gog-table__th--sorted .gog-table__sort-icon{opacity:1}.gog-table__td{padding:var(--gog-table-td-padding-v, var(--gog-table-size-td-padding-v, var(--gog-table-lg-padding-v))) var(--gog-table-padding-h);font-size:var(--gog-table-td-font-size, var(--gog-table-size-td-font-size, var(--gog-table-lg-td-font-size)));border-bottom:var(--gog-table-row-border-width) var(--gog-table-border-style) var(--gog-table-border-color);vertical-align:middle;overflow-wrap:break-word;word-break:break-word;overflow:hidden}.gog-table__td--num{text-align:center;color:var(--gog-table-muted-color);font-size:var(--gog-table-num-font-size);font-family:var(--gog-table-numeric-font-family);width:var(--gog-table-num-col-width)}.gog-table__row:last-child .gog-table__td{border-bottom:none}.gog-table__row{transition:background-color var(--gog-table-row-transition-duration) var(--gog-easing)}.gog-table__row:hover{background-color:var(--gog-table-hover-bg)}.gog-table__empty{padding:var(--gog-table-empty-padding);text-align:center;color:var(--gog-table-muted-color);font-size:var(--gog-table-empty-font-size)}.gog-table--loading thead{opacity:var(--gog-table-loading-opacity);pointer-events:none}.gog-table__loading-cell{padding:var(--gog-table-loading-padding);text-align:center}.gog-table--col-borders .gog-table__th:not(:last-child),.gog-table--col-borders .gog-table__td:not(:last-child){border-right:var(--gog-table-row-border-width) var(--gog-table-border-style) var(--gog-table-border-color)}.gog-table__footer{display:grid;grid-template-columns:1fr auto 1fr;grid-template-areas:\"left center right\";align-items:center;min-height:var(--gog-table-footer-min-height);gap:var(--gog-table-footer-gap)}.gog-table__total{font-size:var(--gog-table-total-font-size);color:var(--gog-table-muted-color);font-family:var(--gog-table-numeric-font-family);text-transform:var(--gog-table-total-text-transform);letter-spacing:var(--gog-table-total-letter-spacing)}.gog-table__total[style*=\"grid-area: right\"]{text-align:right}.gog-table__pagination[style*=\"grid-area: left\"]{justify-content:flex-start}.gog-table__pagination[style*=\"grid-area: center\"]{justify-content:center}.gog-table__pagination[style*=\"grid-area: right\"]{justify-content:flex-end}@media(prefers-reduced-motion:reduce){.gog-table__row{transition:none}}\n"] }]
7051
- }], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], pageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSize", required: false }] }], showRowNumbers: [{ type: i0.Input, args: [{ isSignal: true, alias: "showRowNumbers", required: false }] }], showTotal: [{ type: i0.Input, args: [{ isSignal: true, alias: "showTotal", required: false }] }], emptyPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyPlaceholder", required: false }] }], paginatorPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "paginatorPosition", required: false }] }], totalPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalPosition", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], showColumnBorders: [{ type: i0.Input, args: [{ isSignal: true, alias: "showColumnBorders", required: false }] }], stickyHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "stickyHeader", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], columns: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => GogColumn), { isSignal: true }] }], templates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => TemplateDirective), { isSignal: true }] }] } });
7597
+ }, template: "<div class=\"gog-table-wrapper gog-contained-layout\">\r\n <gog-scroll axis=\"horizontal\" class=\"gog-table-scroll\">\r\n <table\r\n class=\"gog-table\"\r\n [class]=\"sizeClass()\"\r\n [class.gog-table--col-borders]=\"showColumnBorders()\"\r\n [class.gog-table--loading]=\"loading()\"\r\n [class.gog-table--sticky-header]=\"stickyHeader()\"\r\n [style.width]=\"fullWidth() ? '100%' : 'fit-content'\"\r\n >\r\n <colgroup>\r\n @if (hasSelectionColumn()) {\r\n <col class=\"gog-table__col--select\" />\r\n }\r\n @if (showRowNumbers()) {\r\n <col class=\"gog-table__col--num\" />\r\n }\r\n @for (col of columns(); track col.field()) {\r\n <col\r\n [style.width]=\"col.width() || null\"\r\n [style.min-width]=\"col.minWidth() || null\"\r\n [style.max-width]=\"col.maxWidth() || null\"\r\n />\r\n }\r\n </colgroup>\r\n <thead>\r\n <tr>\r\n @if (hasSelectionColumn()) {\r\n <th class=\"gog-table__th gog-table__th--select\" scope=\"col\">\r\n <!--\r\n Only `multiple` gets a select-all: in `single` mode there is nothing to select\r\n all of, and a checkbox that can only ever check one row is a lie.\r\n -->\r\n @if (selectionMode() === 'multiple') {\r\n <gog-checkbox\r\n [checked]=\"allPageRowsSelected()\"\r\n [indeterminate]=\"somePageRowsSelected()\"\r\n [disabled]=\"loading() || visibleRows().length === 0\"\r\n [ariaLabel]=\"resolvedLabels().selectAllRows\"\r\n (checkedChange)=\"toggleAllOnPage($event)\"\r\n />\r\n }\r\n </th>\r\n }\r\n @if (showRowNumbers()) {\r\n <th class=\"gog-table__th gog-table__th--num\" scope=\"col\">#</th>\r\n }\r\n @for (col of columns(); track col.field()) {\r\n <th\r\n class=\"gog-table__th\"\r\n scope=\"col\"\r\n [class.gog-table__th--sortable]=\"col.sortable() && !loading()\"\r\n [class.gog-table__th--sorted]=\"getSortDirection(col.field())\"\r\n [attr.aria-sort]=\"getAriaSort(col.field())\"\r\n [attr.tabindex]=\"col.sortable() && !loading() ? 0 : null\"\r\n (click)=\"handleSortClick(col)\"\r\n (keydown.enter)=\"handleSortClick(col)\"\r\n (keydown.space)=\"handleSortClick(col); $event.preventDefault()\"\r\n >\r\n @if (getHeaderTemplate(col); as headerTpl) {\r\n <ng-container *ngTemplateOutlet=\"headerTpl; context: headerContext(col)\" />\r\n } @else {\r\n <span class=\"gog-table__th-inner\">\r\n {{ col.header() || col.field() }}\r\n @if (col.sortable() && !loading()) {\r\n <span class=\"gog-table__sort-icon\" aria-hidden=\"true\">\r\n @if (getSortDirection(col.field()) === 'asc') {\r\n <gog-icon name=\"sort-up\" />\r\n } @else if (getSortDirection(col.field()) === 'desc') {\r\n <gog-icon name=\"sort-down\" />\r\n } @else {\r\n <gog-icon name=\"sort\" />\r\n }\r\n </span>\r\n }\r\n </span>\r\n }\r\n </th>\r\n }\r\n </tr>\r\n </thead>\r\n <tbody>\r\n @if (loading()) {\r\n <tr>\r\n <td class=\"gog-table__loading-cell\" [attr.colspan]=\"emptyColspan()\">\r\n <gog-spinner size=\"md\" />\r\n </td>\r\n </tr>\r\n } @else if (visibleRows().length === 0) {\r\n <tr>\r\n <td class=\"gog-table__empty\" [attr.colspan]=\"emptyColspan()\">\u2014</td>\r\n </tr>\r\n } @else {\r\n @for (row of visibleRows(); track rowKey(row); let i = $index) {\r\n <tr\r\n class=\"gog-table__row\"\r\n [class.gog-table__row--interactive]=\"interactiveRows()\"\r\n [class.gog-table__row--selected]=\"isSelected(row)\"\r\n [attr.tabindex]=\"interactiveRows() ? 0 : null\"\r\n [attr.aria-selected]=\"hasSelection() ? isSelected(row) : null\"\r\n (click)=\"emitRowClick(row, i, $event)\"\r\n (keydown)=\"onRowKeydown(row, i, $event)\"\r\n >\r\n @if (hasSelectionColumn()) {\r\n <td class=\"gog-table__td gog-table__td--select\">\r\n <!--\r\n `$event.stopPropagation()` so ticking the box does not also count as a row\r\n click: with `interactiveRows` those are two different intents, and firing both\r\n from one gesture is how a \"select\" ends up navigating away.\r\n -->\r\n <gog-checkbox\r\n [checked]=\"isSelected(row)\"\r\n [ariaLabel]=\"resolvedLabels().selectRow\"\r\n (click)=\"$event.stopPropagation()\"\r\n (checkedChange)=\"toggleRowSelection(row, $event)\"\r\n />\r\n </td>\r\n }\r\n @if (showRowNumbers()) {\r\n <td class=\"gog-table__td gog-table__td--num\">{{ globalRowIndex(i) }}</td>\r\n }\r\n @for (col of columns(); track col.field()) {\r\n <td class=\"gog-table__td\">\r\n @if (getBodyTemplate(col); as bodyTpl) {\r\n <ng-container *ngTemplateOutlet=\"bodyTpl; context: bodyContext(row, col, i)\" />\r\n } @else {\r\n {{ formatCellValue(row, col.field()) }}\r\n }\r\n </td>\r\n }\r\n </tr>\r\n }\r\n }\r\n </tbody>\r\n </table>\r\n </gog-scroll>\r\n\r\n @if (hasPagination() || showTotal()) {\r\n <div class=\"gog-table__footer\">\r\n @if (showTotal()) {\r\n <span class=\"gog-table__total\" [style.grid-area]=\"totalGridArea()\">\r\n {{ resolvedLabels().total }}: {{ rowCount() }}\r\n </span>\r\n }\r\n\r\n @if (hasPagination()) {\r\n <!--\r\n `[(pageSize)]` straight through to the table's own model: the rows-per-page select\r\n writes back here, and a consumer binding `[(pageSize)]` on the table sees it. No\r\n intermediate signal, in either direction.\r\n -->\r\n <gog-paginator\r\n class=\"gog-table__pagination\"\r\n [style.grid-area]=\"paginatorGridArea()\"\r\n [(page)]=\"currentPage\"\r\n [(pageSize)]=\"pageSize\"\r\n [totalPages]=\"totalPages()\"\r\n [showPageSizeSelect]=\"showPageSizeSelect()\"\r\n [pageSizeOptions]=\"pageSizeOptions()\"\r\n rangeMode=\"ellipsis\"\r\n size=\"sm\"\r\n [ariaLabel]=\"resolvedLabels().pagination\"\r\n />\r\n }\r\n </div>\r\n }\r\n</div>\r\n", styles: ["@charset \"UTF-8\";.gog-table-wrapper{display:flex;flex-direction:column;gap:var(--gog-table-gap);width:100%;overflow-anchor:none}.gog-table-scroll{width:100%}.gog-table{width:100%;border-collapse:collapse;border:var(--gog-table-border-width) var(--gog-table-border-style) var(--gog-table-border-color);background-color:var(--gog-table-surface);color:var(--gog-table-text-color);font-family:var(--gog-table-font-family);table-layout:fixed}.gog-table--slg{--gog-table-size-th-padding-v: var(--gog-table-slg-padding-v);--gog-table-size-td-padding-v: var(--gog-table-slg-padding-v);--gog-table-size-th-font-size: var(--gog-table-slg-th-font-size);--gog-table-size-td-font-size: var(--gog-table-slg-td-font-size)}.gog-table--md{--gog-table-size-th-padding-v: var(--gog-table-md-padding-v);--gog-table-size-td-padding-v: var(--gog-table-md-padding-v);--gog-table-size-th-font-size: var(--gog-table-md-th-font-size);--gog-table-size-td-font-size: var(--gog-table-md-td-font-size)}.gog-table--sm{--gog-table-size-th-padding-v: var(--gog-table-sm-padding-v);--gog-table-size-td-padding-v: var(--gog-table-sm-padding-v);--gog-table-size-th-font-size: var(--gog-table-sm-th-font-size);--gog-table-size-td-font-size: var(--gog-table-sm-td-font-size)}.gog-table--xsm{--gog-table-size-th-padding-v: var(--gog-table-xsm-padding-v);--gog-table-size-td-padding-v: var(--gog-table-xsm-padding-v);--gog-table-size-th-font-size: var(--gog-table-xsm-th-font-size);--gog-table-size-td-font-size: var(--gog-table-xsm-td-font-size)}.gog-table__col--num{width:var(--gog-table-num-col-width)}.gog-table__th{padding:var(--gog-table-th-padding-v, var(--gog-table-size-th-padding-v, var(--gog-table-lg-padding-v))) var(--gog-table-padding-h);text-align:left;font-family:var(--gog-table-header-font-family);font-size:var(--gog-table-th-font-size, var(--gog-table-size-th-font-size, var(--gog-table-lg-th-font-size)));text-transform:var(--gog-table-header-text-transform);letter-spacing:var(--gog-table-header-letter-spacing);color:var(--gog-table-accent-color);background-color:var(--gog-table-surface);border-bottom:var(--gog-table-border-width) var(--gog-table-border-style) var(--gog-table-border-color);white-space:normal;overflow:hidden}.gog-table--sticky-header .gog-table__th{position:sticky;top:0;z-index:1}.gog-table__th--num{width:var(--gog-table-num-col-width);text-align:center;color:var(--gog-table-muted-color)}.gog-table__th--select,.gog-table__td--select{width:var(--gog-table-select-col-width);text-align:center}.gog-table__th--sortable{cursor:pointer;-webkit-user-select:none;user-select:none}.gog-table__th--sortable:focus-visible{outline:var(--gog-table-focus-ring-width) solid var(--gog-table-focus-ring);outline-offset:calc(var(--gog-table-focus-ring-width) * -1)}.gog-table__th--sortable:hover,.gog-table__th--sorted{color:var(--gog-table-accent-bright)}.gog-table__th-inner{display:inline-flex;align-items:center;gap:var(--gog-table-th-inner-gap);width:100%}.gog-table__sort-icon{display:inline-block;width:var(--gog-table-sort-icon-width);text-align:center;font-size:var(--gog-table-sort-icon-size);opacity:var(--gog-table-sort-icon-opacity);flex-shrink:0}.gog-table__th--sorted .gog-table__sort-icon{opacity:1}.gog-table__td{padding:var(--gog-table-td-padding-v, var(--gog-table-size-td-padding-v, var(--gog-table-lg-padding-v))) var(--gog-table-padding-h);font-size:var(--gog-table-td-font-size, var(--gog-table-size-td-font-size, var(--gog-table-lg-td-font-size)));border-bottom:var(--gog-table-row-border-width) var(--gog-table-border-style) var(--gog-table-border-color);vertical-align:middle;overflow-wrap:break-word;word-break:break-word;overflow:hidden}.gog-table__td--num{text-align:center;color:var(--gog-table-muted-color);font-size:var(--gog-table-num-font-size);font-family:var(--gog-table-numeric-font-family);width:var(--gog-table-num-col-width)}.gog-table__row:last-child .gog-table__td{border-bottom:none}.gog-table__row{transition:background-color var(--gog-table-row-transition-duration) var(--gog-easing)}.gog-table__row--interactive{cursor:pointer}.gog-table__row--interactive:focus-visible{outline:var(--gog-table-focus-ring-width) solid var(--gog-table-focus-ring);outline-offset:calc(var(--gog-table-focus-ring-width) * -1)}.gog-table__row:hover{background-color:var(--gog-table-hover-bg)}.gog-table__row--selected,.gog-table__row--selected:hover{background-color:var(--gog-table-selected-bg)}.gog-table__empty{padding:var(--gog-table-empty-padding);text-align:center;color:var(--gog-table-muted-color);font-size:var(--gog-table-empty-font-size)}.gog-table--loading thead{opacity:var(--gog-table-loading-opacity);pointer-events:none}.gog-table__loading-cell{padding:var(--gog-table-loading-padding);text-align:center}.gog-table--col-borders .gog-table__th:not(:last-child),.gog-table--col-borders .gog-table__td:not(:last-child){border-right:var(--gog-table-row-border-width) var(--gog-table-border-style) var(--gog-table-border-color)}.gog-table__footer{display:grid;grid-template-columns:1fr auto 1fr;grid-template-areas:\"left center right\";align-items:center;min-height:var(--gog-table-footer-min-height);gap:var(--gog-table-footer-gap)}.gog-table__total{font-size:var(--gog-table-total-font-size);color:var(--gog-table-muted-color);font-family:var(--gog-table-numeric-font-family);text-transform:var(--gog-table-total-text-transform);letter-spacing:var(--gog-table-total-letter-spacing)}.gog-table__total[style*=\"grid-area: right\"]{text-align:right}.gog-table__pagination[style*=\"grid-area: left\"]{justify-content:flex-start}.gog-table__pagination[style*=\"grid-area: center\"]{justify-content:center}.gog-table__pagination[style*=\"grid-area: right\"]{justify-content:flex-end}@media(prefers-reduced-motion:reduce){.gog-table__row{transition:none}}\n"] }]
7598
+ }], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], pageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSize", required: false }] }, { type: i0.Output, args: ["pageSizeChange"] }], showPageSizeSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPageSizeSelect", required: false }] }], pageSizeOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSizeOptions", required: false }] }], lazy: [{ type: i0.Input, args: [{ isSignal: true, alias: "lazy", required: false }] }], totalRecords: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalRecords", required: false }] }], interactiveRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "interactiveRows", required: false }] }], selectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionMode", required: false }] }], selection: [{ type: i0.Input, args: [{ isSignal: true, alias: "selection", required: false }] }, { type: i0.Output, args: ["selectionChange"] }], dataKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataKey", required: false }] }], showSelectionColumn: [{ type: i0.Input, args: [{ isSignal: true, alias: "showSelectionColumn", required: false }] }], showRowNumbers: [{ type: i0.Input, args: [{ isSignal: true, alias: "showRowNumbers", required: false }] }], showTotal: [{ type: i0.Input, args: [{ isSignal: true, alias: "showTotal", required: false }] }], emptyPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyPlaceholder", required: false }] }], paginatorPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "paginatorPosition", required: false }] }], totalPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalPosition", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], showColumnBorders: [{ type: i0.Input, args: [{ isSignal: true, alias: "showColumnBorders", required: false }] }], stickyHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "stickyHeader", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], gogSortChange: [{ type: i0.Output, args: ["gogSortChange"] }], gogPageChange: [{ type: i0.Output, args: ["gogPageChange"] }], gogRowClick: [{ type: i0.Output, args: ["gogRowClick"] }], columns: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => GogColumn), { isSignal: true }] }], templates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => TemplateDirective), { isSignal: true }] }] } });
7052
7599
 
7053
7600
  /** Built-in defaults, used when `GOG_CONFIG.theme` doesn't supply one. */
7054
7601
  const DEFAULT_THEME = 'light';
@@ -8168,6 +8715,7 @@ const GOG_TOKEN_GROUPS = [
8168
8715
  '--gog-paginator-ellipsis-font-size',
8169
8716
  '--gog-paginator-ellipsis-min-width',
8170
8717
  '--gog-paginator-gap',
8718
+ '--gog-paginator-page-size-min-width',
8171
8719
  ],
8172
8720
  },
8173
8721
  {
@@ -8438,6 +8986,8 @@ const GOG_TOKEN_GROUPS = [
8438
8986
  '--gog-table-padding-h',
8439
8987
  '--gog-table-row-border-width',
8440
8988
  '--gog-table-row-transition-duration',
8989
+ '--gog-table-select-col-width',
8990
+ '--gog-table-selected-bg',
8441
8991
  '--gog-table-slg-padding-v',
8442
8992
  '--gog-table-slg-td-font-size',
8443
8993
  '--gog-table-slg-th-font-size',
@@ -8777,5 +9327,5 @@ const GOG_TOKEN_GROUPS = [
8777
9327
  * Generated bundle index. Do not edit.
8778
9328
  */
8779
9329
 
8780
- export { AccordionComponent, AutocompleteComponent, ButtonComponent, ButtonToggleGroupComponent, CalendarComponent, CheckboxComponent, ChipComponent, CollapsibleComponent, Column, ConfirmationDialogComponent, DIALOG_DATA, DIALOG_REF, DatepickerComponent, DialogComponent, DialogService, DividerComponent, GOG_CONFIG, GOG_TABS_STATE, GOG_TOKEN_GROUPS, GogAccordionChevronDirective, GogAccordionContentDirective, GogAccordionHeaderDirective, GogBadgeDirective, GogButtonToggleOptionDirective, GogCheckboxIconDirective, GogCollapsibleContentDirective, GogCollapsibleTriggerDirective, GogColumn, GogColumnBodyDirective, GogColumnHeaderDirective, GogDropdownBase, GogDropdownChevronDirective, GogDropdownOptionDirective, GogFloatLabelState, GogInputAddonEndDirective, GogInputAddonStartDirective, GogMultiselectClearIconDirective, GogTabContentDirective, GogTabHeaderDirective, GogTagIconDirective, GogTooltipDirective, ICON_DEFS, IconComponent, InputfieldComponent, MultiselectComponent, PaginatorComponent, ProgressbarComponent, RadioGroupComponent, ScrollComponent, SelectComponent, SkeletonComponent, SliderComponent, SpinnerComponent, SpinnerOverlayComponent, TabComponent, TableComponent, TabsComponent, TagComponent, TemplateDirective, TextareaComponent, ThemeService, ToastComponent, ToastContainerComponent, ToastService, ToggleComponent, addDays, addMonths, addYears, buildMonthGrid, clampDate, copyTimeOnto, daysInMonth, defaultCompare, formatDate, getByPath, isAfterDay, isBeforeDay, isInRange, isSameDay, isSameMonth, isSameOptionValue, isWithinBounds, localeFirstDayOfWeek, monthNames, parseDate, provideGogConfig, readOption, resolveConfigured, startOfDay, weekdayNames, withTime };
9330
+ export { AccordionComponent, AutocompleteComponent, ButtonComponent, ButtonToggleGroupComponent, CalendarComponent, CheckboxComponent, ChipComponent, CollapsibleComponent, Column, ConfirmationDialogComponent, DIALOG_DATA, DIALOG_REF, DatepickerComponent, DialogComponent, DialogService, DividerComponent, GOG_CONFIG, GOG_ICONS, GOG_TABS_STATE, GOG_TOKEN_GROUPS, GogAccordionChevronDirective, GogAccordionContentDirective, GogAccordionHeaderDirective, GogBadgeDirective, GogButtonDirective, GogButtonToggleOptionDirective, GogCheckboxIconDirective, GogCollapsibleContentDirective, GogCollapsibleTriggerDirective, GogColumn, GogColumnBodyDirective, GogColumnHeaderDirective, GogDropdownBase, GogDropdownChevronDirective, GogDropdownOptionDirective, GogFloatLabelState, GogInputAddonEndDirective, GogInputAddonStartDirective, GogMultiselectClearIconDirective, GogTabContentDirective, GogTabHeaderDirective, GogTagIconDirective, GogTooltipDirective, ICON_DEFS, IconComponent, InputfieldComponent, MultiselectComponent, PaginatorComponent, ProgressbarComponent, RadioGroupComponent, ScrollComponent, SelectComponent, SkeletonComponent, SliderComponent, SpinnerComponent, SpinnerOverlayComponent, TabComponent, TableComponent, TabsComponent, TagComponent, TemplateDirective, TextareaComponent, ThemeService, ToastComponent, ToastContainerComponent, ToastService, ToggleComponent, addDays, addMonths, addYears, buildMonthGrid, clampDate, copyTimeOnto, daysInMonth, defaultCompare, formatDate, getByPath, isAfterDay, isBeforeDay, isInRange, isSameDay, isSameMonth, isSameOptionValue, isWithinBounds, localeFirstDayOfWeek, monthNames, parseDate, provideGogConfig, provideGogIcons, readOption, resolveConfigured, startOfDay, weekdayNames, withTime };
8781
9331
  //# sourceMappingURL=guildofgleks-ui.mjs.map