@akcelik/strct 4.0.0 → 4.1.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akcelik/strct",
3
- "version": "4.0.0",
3
+ "version": "4.1.0",
4
4
  "description": "UIStruct — a standalone Angular component library with a tokenised, multi-palette theme system, built for datacenter / infrastructure management UIs.",
5
5
  "author": "Serkan Akcelik <serkan.akcelik@gmail.com>",
6
6
  "license": "MIT",
@@ -1,5 +1,5 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { OnDestroy, ElementRef, InjectionToken, Provider, TemplateRef, PipeTransform } from '@angular/core';
2
+ import { OnDestroy, TemplateRef, ElementRef, InjectionToken, Provider, PipeTransform } from '@angular/core';
3
3
  import { SafeHtml, SafeStyle } from '@angular/platform-browser';
4
4
  import { ControlValueAccessor } from '@angular/forms';
5
5
  import * as _akcelik_strct from '@akcelik/strct';
@@ -1179,6 +1179,23 @@ declare class StrctTree {
1179
1179
 
1180
1180
  /** Fixed modal width presets: sm 480 · md 640 · lg 860 · xl 1080 (px). */
1181
1181
  type StrctModalSize = 'sm' | 'md' | 'lg' | 'xl';
1182
+ /**
1183
+ * Lazily rendered modal body. Plain projected content is created by the PARENT
1184
+ * with the parent's own view, so it is instantiated — and costs — even while
1185
+ * the modal is closed. Content inside this template is created only while the
1186
+ * modal is open, and destroyed when it closes (state does not survive a close):
1187
+ *
1188
+ * <strct-modal [(open)]="show" title="Import hosts">
1189
+ * <ng-template strctModalContent>
1190
+ * <strct-datagrid [rows]="hosts" … />
1191
+ * </ng-template>
1192
+ * </strct-modal>
1193
+ */
1194
+ declare class StrctModalContent {
1195
+ readonly template: TemplateRef<void>;
1196
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrctModalContent, never>;
1197
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<StrctModalContent, "[strctModalContent]", never, {}, {}, never, never, true, never>;
1198
+ }
1182
1199
  /**
1183
1200
  * Overlay dialog with two-way `open`:
1184
1201
  * <strct-modal [(open)]="show" title="Confirm">
@@ -1195,7 +1212,8 @@ declare class StrctModal {
1195
1212
  readonly open: _angular_core.ModelSignal<boolean>;
1196
1213
  /** Dialog title. */
1197
1214
  readonly title: _angular_core.InputSignal<string>;
1198
- /** Size variant (fixed scale; defaults to `sm` = 480px). */
1215
+ /** Size variant (fixed scale; defaults to `sm` = 480px). Ignored by
1216
+ * `chromeless`, which sizes from the wizard it hosts. */
1199
1217
  readonly size: _angular_core.InputSignal<StrctModalSize>;
1200
1218
  /** Hide the footer slot. */
1201
1219
  readonly hideFooter: _angular_core.InputSignalWithTransform<boolean, unknown>;
@@ -1204,6 +1222,11 @@ declare class StrctModal {
1204
1222
  * content (a `flush` vertical wizard) is the dialog surface. `title` still
1205
1223
  * names the dialog for assistive tech; backdrop/Escape dismissal follow
1206
1224
  * `dismissible` as usual.
1225
+ *
1226
+ * The dialog's width comes from the wizard's geometry, not from `size`:
1227
+ * rail + `--strct-wiz-content-min` (default 864px) [+ aside]. To change it,
1228
+ * set that variable on this `strct-modal` or an ancestor — the dialog reads
1229
+ * it on itself, so setting it on the `strct-wizard` inside does not reach it.
1207
1230
  */
1208
1231
  readonly chromeless: _angular_core.InputSignalWithTransform<boolean, unknown>;
1209
1232
  /** Accessible label of the X close button (localizable). */
@@ -1225,6 +1248,9 @@ declare class StrctModal {
1225
1248
  readonly variant: _angular_core.InputSignal<"solid" | "glass">;
1226
1249
  /** Emitted when the alert is dismissed. */
1227
1250
  readonly closed: _angular_core.OutputEmitterRef<void>;
1251
+ /** Lazily rendered body, if one is provided (see {@link StrctModalContent}). */
1252
+ protected readonly lazyContent: _angular_core.Signal<StrctModalContent | undefined>;
1253
+ private readonly sizeDiagnostic;
1228
1254
  protected readonly titleId: string;
1229
1255
  /** Element that had focus before the dialog opened, restored on close. */
1230
1256
  private previousActive;
@@ -1248,7 +1274,7 @@ declare class StrctModal {
1248
1274
  private focusable;
1249
1275
  private focusInitial;
1250
1276
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrctModal, never>;
1251
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctModal, "strct-modal", never, { "open": { "alias": "open"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "hideFooter": { "alias": "hideFooter"; "required": false; "isSignal": true; }; "chromeless": { "alias": "chromeless"; "required": false; "isSignal": true; }; "closeLabel": { "alias": "closeLabel"; "required": false; "isSignal": true; }; "dismissible": { "alias": "dismissible"; "required": false; "isSignal": true; }; "draggable": { "alias": "draggable"; "required": false; "isSignal": true; }; "panelClass": { "alias": "panelClass"; "required": false; "isSignal": true; }; "backdropClass": { "alias": "backdropClass"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; }, { "open": "openChange"; "closed": "closed"; }, never, ["*", "[strctModalFooter]"], true, never>;
1277
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctModal, "strct-modal", never, { "open": { "alias": "open"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "hideFooter": { "alias": "hideFooter"; "required": false; "isSignal": true; }; "chromeless": { "alias": "chromeless"; "required": false; "isSignal": true; }; "closeLabel": { "alias": "closeLabel"; "required": false; "isSignal": true; }; "dismissible": { "alias": "dismissible"; "required": false; "isSignal": true; }; "draggable": { "alias": "draggable"; "required": false; "isSignal": true; }; "panelClass": { "alias": "panelClass"; "required": false; "isSignal": true; }; "backdropClass": { "alias": "backdropClass"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; }, { "open": "openChange"; "closed": "closed"; }, ["lazyContent"], ["*", "[strctModalFooter]"], true, never>;
1252
1278
  }
1253
1279
 
1254
1280
  /** Marks the drawer's footer action area: `<ng-container strctDrawerFooter>…`. */
@@ -1556,7 +1582,10 @@ declare class StrctWizard {
1556
1582
  * ~720px of component width — it never flips horizontal.
1557
1583
  *
1558
1584
  * The default can be flipped app-wide via `provideStrctWizardDefaults`;
1559
- * this input always wins when bound.
1585
+ * this input always wins when bound. **Tests:** a spec that renders a
1586
+ * component using `strct-wizard` must provide the same defaults the app
1587
+ * does, or it renders the horizontal layout — a different DOM, no rail,
1588
+ * no title.
1560
1589
  */
1561
1590
  readonly vertical: _angular_core.InputSignalWithTransform<boolean, unknown>;
1562
1591
  /**
@@ -1566,7 +1595,8 @@ declare class StrctWizard {
1566
1595
  * Size the host with width/height only; do not override its `display`.
1567
1596
  */
1568
1597
  readonly flush: _angular_core.InputSignalWithTransform<boolean, unknown>;
1569
- /** Rail heading shown above the progress bar (vertical mode). */
1598
+ /** Rail heading shown above the progress bar. Vertical mode only — the
1599
+ * horizontal layout has no title band (a dev-mode warning says so). */
1570
1600
  readonly title: _angular_core.InputSignal<string>;
1571
1601
  /**
1572
1602
  * Name the content pane after the active step (vertical mode): the step's
@@ -1605,6 +1635,8 @@ declare class StrctWizard {
1605
1635
  /** Whether the current step permits advancing (its `canAdvance`). */
1606
1636
  protected readonly canAdvance: _angular_core.Signal<boolean>;
1607
1637
  constructor();
1638
+ /** Dev-mode warnings for inputs the current layout silently ignores. */
1639
+ private diagnose;
1608
1640
  next(): void;
1609
1641
  back(): void;
1610
1642
  /** Jump to a visited step (rail click). Forward moves still go through Next. */
@@ -3004,8 +3036,12 @@ interface StrctColumn {
3004
3036
  type StrctRow = Record<string, unknown>;
3005
3037
  /** Context passed to a per-column cell template. */
3006
3038
  interface StrctCellContext {
3007
- /** The row object. */
3039
+ /** The row object — `let-row`. */
3008
3040
  $implicit: StrctRow;
3041
+ /** The row object again, by name — so `let-row="row"` works too. Without it
3042
+ * that spelling bound `undefined` silently, because `value` and `column`
3043
+ * ARE named properties and `row` looked like one of them. */
3044
+ row: StrctRow;
3009
3045
  /** The raw value for this column (`row[column.key]`). */
3010
3046
  value: unknown;
3011
3047
  /** The column definition. */
@@ -3015,7 +3051,7 @@ interface StrctCellContext {
3015
3051
  * Per-column cell template for `strct-table` / `strct-datagrid`. The column key
3016
3052
  * is the directive value; the row, value and column are the template context:
3017
3053
  *
3018
- * <ng-template strctCell="status" let-row let-value="value">
3054
+ * <ng-template strctCell="status" let-row let-value="value"> (let-row="row" also works)
3019
3055
  * <strct-badge [status]="row['success'] ? 'success' : 'critical'">{{ value }}</strct-badge>
3020
3056
  * </ng-template>
3021
3057
  */
@@ -3142,7 +3178,7 @@ interface DgItem {
3142
3178
  }
3143
3179
  /**
3144
3180
  * Marks the expandable-row detail template. The row is the template's implicit
3145
- * context: `<ng-template strctRowDetail let-row> … {{ row['name'] }} … </ng-template>`.
3181
+ * context (`let-row`, or `let-row="row"`): `<ng-template strctRowDetail let-row> … {{ row['name'] }} … </ng-template>`.
3146
3182
  */
3147
3183
  declare class StrctRowDetailDef {
3148
3184
  readonly template: TemplateRef<any>;
@@ -3470,6 +3506,8 @@ declare class StrctDatagrid {
3470
3506
  private readonly selectionRows;
3471
3507
  protected readonly allPageSelected: _angular_core.Signal<boolean>;
3472
3508
  protected readonly somePageSelected: _angular_core.Signal<boolean>;
3509
+ /** Dev-mode check that row identities can do their job (see util/dev-warn). */
3510
+ private diagnoseIdentity;
3473
3511
  /** Resolve a row's stable identity: its `rowId` value, or the row object
3474
3512
  * itself when there is no `rowId` or it resolves to null/undefined. */
3475
3513
  private idOf;
@@ -5786,5 +5824,5 @@ declare class StrctHeatmap {
5786
5824
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctHeatmap, "strct-heatmap", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "rows": { "alias": "rows"; "required": false; "isSignal": true; }; "cols": { "alias": "cols"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "status": { "alias": "status"; "required": false; "isSignal": true; }; "emptyText": { "alias": "emptyText"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "summaryFormat": { "alias": "summaryFormat"; "required": false; "isSignal": true; }; "cellHeight": { "alias": "cellHeight"; "required": false; "isSignal": true; }; "gap": { "alias": "gap"; "required": false; "isSignal": true; }; "rowLabelWidth": { "alias": "rowLabelWidth"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
5787
5825
  }
5788
5826
 
5789
- export { FOCUSABLE_SELECTOR, STRCT_DP_DOW, STRCT_DP_DOW_FULL, STRCT_DP_MONTHS, STRCT_ICONS, STRCT_ICON_GROUPS, STRCT_ICON_NAMES, STRCT_MASKS, STRCT_NOTIFICATION_HISTORY_LIMIT, STRCT_PALETTES, STRCT_RAW_ICONS, STRCT_TIME_RANGE_PRESETS, STRCT_WIZARD_DEFAULTS, StrctAccordion, StrctAccordionPanel, StrctAlert, StrctAnnouncer, StrctAvatar, StrctBadge, StrctBreadcrumb, StrctBreadcrumbItem, StrctButton, StrctButtonGroup, StrctBytesPipe, StrctCard, StrctCardBlock, StrctCardFooter, StrctCardHeader, StrctCascadeColumn, StrctCascadeHost, StrctCascadeSelect, StrctCellDef, StrctCellStatus, StrctChart, StrctCheckbox, StrctChips, StrctCode, StrctColorPicker, StrctCombobox, StrctCommandPalette, StrctConfirmOutlet, StrctConfirmService, StrctContextMenu, StrctContextMenuTrigger, StrctCopy, StrctDatagrid, StrctDatagridActionBar, StrctDatepicker, StrctDatetimePicker, StrctDesc, StrctDescriptionList, StrctDiff, StrctDivider, StrctDonut, StrctDrawer, StrctDrawerFooter, StrctDropdown, StrctDropdownDivider, StrctDropdownItem, StrctDropdownTrigger, StrctDurationPipe, StrctEmptyState, StrctField, StrctFile, StrctFilterBar, StrctFlow, StrctFooter, StrctGauge, StrctHeader, StrctHeatmap, StrctHero, StrctHotkeysHelp, StrctHotkeysService, StrctIcon, StrctInlineEdit, StrctInput, StrctInputMask, StrctInputOtp, StrctKbd, StrctKnob, StrctLogViewer, StrctLogin, StrctMenuPanel, StrctMenuService, StrctMenubar, StrctMetricTile, StrctModal, StrctNav, StrctNavItem, StrctNotificationCenter, StrctNumber, StrctOverlay, StrctPageHeader, StrctPageHeaderActions, StrctPageHeaderCrumbs, StrctPagination, StrctPassword, StrctPopover, StrctPopoverTrigger, StrctProgress, StrctRadio, StrctRadioGroup, StrctRail, StrctRange, StrctRatePipe, StrctRating, StrctReorder, StrctReorderItem, StrctRowDetailDef, StrctSearchbox, StrctSectionMenu, StrctSegmented, StrctSelect, StrctShell, StrctShellService, StrctSiPipe, StrctSignpost, StrctSignpostTrigger, StrctSkeleton, StrctSparkline, StrctSpeedDial, StrctSpinner, StrctSplitButton, StrctSplitter, StrctStack, StrctStackItem, StrctStatusDot, StrctStep, StrctSubmenu, StrctTab, StrctTable, StrctTabs, StrctTag, StrctThemeService, StrctThemeSwitcher, StrctTimeRangePicker, StrctTimeline, StrctTimelineItem, StrctToastOutlet, StrctToastService, StrctToggle, StrctToolbar, StrctToolbarSpacer, StrctTooltip, StrctTour, StrctTransfer, StrctTree, StrctTreeNode, StrctTreeSelect, StrctVerticalNav, StrctWatermark, StrctWizard, StrctWizardAside, focusFirstIn, keepTabInside, lockBodyScroll, parseAnsi, provideStrctWizardDefaults, registerStrctIcon, restoreFocus, saveFocusedElement, strctComputeDiff, strctDpPad, strctFormatBytes, strctFormatDuration, strctFormatRate, strctFormatSi, strctValidationIcon, strctValidationTone, unlockBodyScroll };
5827
+ export { FOCUSABLE_SELECTOR, STRCT_DP_DOW, STRCT_DP_DOW_FULL, STRCT_DP_MONTHS, STRCT_ICONS, STRCT_ICON_GROUPS, STRCT_ICON_NAMES, STRCT_MASKS, STRCT_NOTIFICATION_HISTORY_LIMIT, STRCT_PALETTES, STRCT_RAW_ICONS, STRCT_TIME_RANGE_PRESETS, STRCT_WIZARD_DEFAULTS, StrctAccordion, StrctAccordionPanel, StrctAlert, StrctAnnouncer, StrctAvatar, StrctBadge, StrctBreadcrumb, StrctBreadcrumbItem, StrctButton, StrctButtonGroup, StrctBytesPipe, StrctCard, StrctCardBlock, StrctCardFooter, StrctCardHeader, StrctCascadeColumn, StrctCascadeHost, StrctCascadeSelect, StrctCellDef, StrctCellStatus, StrctChart, StrctCheckbox, StrctChips, StrctCode, StrctColorPicker, StrctCombobox, StrctCommandPalette, StrctConfirmOutlet, StrctConfirmService, StrctContextMenu, StrctContextMenuTrigger, StrctCopy, StrctDatagrid, StrctDatagridActionBar, StrctDatepicker, StrctDatetimePicker, StrctDesc, StrctDescriptionList, StrctDiff, StrctDivider, StrctDonut, StrctDrawer, StrctDrawerFooter, StrctDropdown, StrctDropdownDivider, StrctDropdownItem, StrctDropdownTrigger, StrctDurationPipe, StrctEmptyState, StrctField, StrctFile, StrctFilterBar, StrctFlow, StrctFooter, StrctGauge, StrctHeader, StrctHeatmap, StrctHero, StrctHotkeysHelp, StrctHotkeysService, StrctIcon, StrctInlineEdit, StrctInput, StrctInputMask, StrctInputOtp, StrctKbd, StrctKnob, StrctLogViewer, StrctLogin, StrctMenuPanel, StrctMenuService, StrctMenubar, StrctMetricTile, StrctModal, StrctModalContent, StrctNav, StrctNavItem, StrctNotificationCenter, StrctNumber, StrctOverlay, StrctPageHeader, StrctPageHeaderActions, StrctPageHeaderCrumbs, StrctPagination, StrctPassword, StrctPopover, StrctPopoverTrigger, StrctProgress, StrctRadio, StrctRadioGroup, StrctRail, StrctRange, StrctRatePipe, StrctRating, StrctReorder, StrctReorderItem, StrctRowDetailDef, StrctSearchbox, StrctSectionMenu, StrctSegmented, StrctSelect, StrctShell, StrctShellService, StrctSiPipe, StrctSignpost, StrctSignpostTrigger, StrctSkeleton, StrctSparkline, StrctSpeedDial, StrctSpinner, StrctSplitButton, StrctSplitter, StrctStack, StrctStackItem, StrctStatusDot, StrctStep, StrctSubmenu, StrctTab, StrctTable, StrctTabs, StrctTag, StrctThemeService, StrctThemeSwitcher, StrctTimeRangePicker, StrctTimeline, StrctTimelineItem, StrctToastOutlet, StrctToastService, StrctToggle, StrctToolbar, StrctToolbarSpacer, StrctTooltip, StrctTour, StrctTransfer, StrctTree, StrctTreeNode, StrctTreeSelect, StrctVerticalNav, StrctWatermark, StrctWizard, StrctWizardAside, focusFirstIn, keepTabInside, lockBodyScroll, parseAnsi, provideStrctWizardDefaults, registerStrctIcon, restoreFocus, saveFocusedElement, strctComputeDiff, strctDpPad, strctFormatBytes, strctFormatDuration, strctFormatRate, strctFormatSi, strctValidationIcon, strctValidationTone, unlockBodyScroll };
5790
5828
  export type { StrctAlertType, StrctAvatarSize, StrctAvatarStatus, StrctBadgeStatus, StrctButtonSize, StrctButtonVariant, StrctCascadeOption, StrctCellContext, StrctChartAnnotation, StrctChartColor, StrctChartCurve, StrctChartSeries, StrctChartSlot, StrctChartStatus, StrctChartSummaryInfo, StrctChartThreshold, StrctChartType, StrctColumn, StrctCommandItem, StrctConfirmOptions, StrctConfirmTone, StrctDatagridColumn, StrctDatagridColumnState, StrctDatagridFilters, StrctDatagridLabels, StrctDatagridLazyState, StrctDescAlign, StrctDescItem, StrctDiffRow, StrctDonutSegment, StrctDrawerSide, StrctDrawerSize, StrctEmptyVariant, StrctFilterChip, StrctFlowDirection, StrctFlowNode, StrctFlowOrientation, StrctHeatmapCell, StrctHeatmapSummaryInfo, StrctHotkey, StrctIconBadge, StrctIconName, StrctKnobStatus, StrctLogLine, StrctMenuItem, StrctMenuLink, StrctMenuOpenOptions, StrctMenuSection, StrctMenubarItem, StrctMetricStatus, StrctModalSize, StrctMode, StrctNotification, StrctOption, StrctOverlayPlacement, StrctPalette, StrctPaletteInfo, StrctProgressStatus, StrctRailItem, StrctRailStatus, StrctReorderEvent, StrctRow, StrctRowId, StrctSegmentedOption, StrctSegmentedSize, StrctSignpostPosition, StrctSpeedDialDirection, StrctSpinnerSize, StrctStatus, StrctStatusDotSize, StrctTagStatus, StrctThresholds, StrctTimeRange, StrctTimeRangePreset, StrctTimelineState, StrctToast, StrctToastOptions, StrctToastType, StrctTooltipPosition, StrctTourStep, StrctTransferItem, StrctTreeMenuEvent, StrctTreeNodeData, StrctTreeNodeMenuFn, StrctValidationState, StrctValidationStatus, StrctWizardDefaults };