@akcelik/strct 4.8.0 → 4.10.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.8.0",
3
+ "version": "4.10.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",
@@ -2367,6 +2367,35 @@ declare class StrctCellStatus {
2367
2367
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctCellStatus, "strct-cell-status, [strct-cell-status]", never, { "state": { "alias": "state"; "required": true; "isSignal": true; }; "loadingLabel": { "alias": "loadingLabel"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
2368
2368
  }
2369
2369
 
2370
+ /** Text or a control rendered inside the field's box, before the input. */
2371
+ declare class StrctFieldPrefix {
2372
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrctFieldPrefix, never>;
2373
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<StrctFieldPrefix, "[strctFieldPrefix]", never, {}, {}, never, never, true, never>;
2374
+ }
2375
+ /** Text or a control rendered inside the field's box, after the input. */
2376
+ declare class StrctFieldSuffix {
2377
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrctFieldSuffix, never>;
2378
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<StrctFieldSuffix, "[strctFieldSuffix]", never, {}, {}, never, never, true, never>;
2379
+ }
2380
+ /**
2381
+ * A hint with markup in it, rendered where the string `hint` renders and
2382
+ * carrying the same id, so it is still the control's description.
2383
+ *
2384
+ * <ng-template strctFieldHint>Hosts with a switch named <strong>{{ n }}</strong> join it.</ng-template>
2385
+ */
2386
+ declare class StrctFieldHint {
2387
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrctFieldHint, never>;
2388
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<StrctFieldHint, "ng-template[strctFieldHint]", never, {}, {}, never, never, true, never>;
2389
+ }
2390
+ /**
2391
+ * Wrapper that opts a run of `layout="inline"` fields out of the hairlines
2392
+ * between them — for settings that belong together and should read as one
2393
+ * block.
2394
+ */
2395
+ declare class StrctFieldGroup {
2396
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrctFieldGroup, never>;
2397
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<StrctFieldGroup, "[strctFieldGroup]", never, {}, {}, never, never, true, never>;
2398
+ }
2370
2399
  /**
2371
2400
  * Form-field wrapper: a label (with optional required marker), the projected
2372
2401
  * control, and a hint or error message. It auto-links the control via
@@ -2385,6 +2414,12 @@ declare class StrctField {
2385
2414
  readonly hint: _angular_core.InputSignal<string>;
2386
2415
  /** Error message (string or first-of array); falsy clears the error state. */
2387
2416
  readonly error: _angular_core.InputSignal<string | string[] | null | undefined>;
2417
+ /**
2418
+ * `'inline'` puts the label and its hint in a fixed-width column
2419
+ * (`--strct-field-label-w`, 220px) and the control beside them — how a long
2420
+ * settings form reads. Below 480px of field width it falls back to stacked.
2421
+ */
2422
+ readonly layout: _angular_core.InputSignal<"stacked" | "inline">;
2388
2423
  /**
2389
2424
  * Async-validation state rendered as a trailing adornment (spinner / check /
2390
2425
  * warning) plus its message in the hint/error slot — so apps stop composing a
@@ -2395,7 +2430,12 @@ declare class StrctField {
2395
2430
  private readonly n;
2396
2431
  protected readonly hintId: string;
2397
2432
  protected readonly errorId: string;
2433
+ protected readonly prefixId: string;
2434
+ protected readonly suffixId: string;
2398
2435
  protected readonly controlId: _angular_core.WritableSignal<string>;
2436
+ protected readonly hintTpl: _angular_core.Signal<TemplateRef<any> | undefined>;
2437
+ protected readonly hasPrefix: _angular_core.Signal<StrctFieldPrefix | undefined>;
2438
+ protected readonly hasSuffix: _angular_core.Signal<StrctFieldSuffix | undefined>;
2399
2439
  protected readonly errorText: _angular_core.Signal<string>;
2400
2440
  /** Effective validation status ('idle' when no state supplied). */
2401
2441
  protected readonly stateStatus: _angular_core.Signal<_akcelik_strct.StrctValidationStatus>;
@@ -2409,9 +2449,15 @@ declare class StrctField {
2409
2449
  constructor();
2410
2450
  private control;
2411
2451
  private link;
2452
+ /**
2453
+ * A text addon belongs to the control's description — "Minimum memory, MB" —
2454
+ * while an addon holding its own control (a send button) is a tab stop of its
2455
+ * own and says nothing about the value.
2456
+ */
2457
+ private addonDescription;
2412
2458
  private applyAria;
2413
2459
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrctField, never>;
2414
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctField, "strct-field", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "validationState": { "alias": "validationState"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
2460
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctField, "strct-field", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "layout": { "alias": "layout"; "required": false; "isSignal": true; }; "validationState": { "alias": "validationState"; "required": false; "isSignal": true; }; }, {}, ["hintTpl", "hasPrefix", "hasSuffix"], ["[strctFieldPrefix]", "[strctFieldSuffix]", "*"], true, never>;
2415
2461
  }
2416
2462
 
2417
2463
  /**
@@ -3457,6 +3503,19 @@ interface StrctDatagridColumn {
3457
3503
  * change in your handler and pass the updated array back in.
3458
3504
  */
3459
3505
  editable?: boolean;
3506
+ /**
3507
+ * Which editor an `editable` column opens. `'text'` (the default) is the
3508
+ * free-text box; `'number'` opens `strct-number`, and `'select'` opens
3509
+ * `strct-select` over `editorOptions` — a value that is one of a set is
3510
+ * chosen, not typed. The cell shows the chosen option's label at rest.
3511
+ */
3512
+ editor?: 'text' | 'number' | 'select';
3513
+ /** Options for `editor: 'select'` (the library's own option shape). */
3514
+ editorOptions?: StrctOption[];
3515
+ /** Bounds and step for `editor: 'number'`. */
3516
+ editorMin?: number;
3517
+ editorMax?: number;
3518
+ editorStep?: number;
3460
3519
  }
3461
3520
  /** Per-column filter state: contains-text, or the checked value set. */
3462
3521
  type StrctDatagridFilters = Record<string, string | unknown[]>;
@@ -3696,12 +3755,20 @@ declare class StrctDatagrid {
3696
3755
  }>;
3697
3756
  /** Server-side data request (lazy mode): load this page / sort and set `rows`. */
3698
3757
  readonly lazyLoad: _angular_core.OutputEmitterRef<StrctDatagridLazyState>;
3699
- /** An editable cell was committed (Enter / blur). The grid does not mutate
3700
- * rows — apply `value` to your data and pass the updated array back in. */
3758
+ /** An editable cell was committed (Enter / blur, or choosing in a `select`
3759
+ * editor). The grid does not mutate rows — apply the value to your data and
3760
+ * pass the updated array back in. */
3701
3761
  readonly cellEdit: _angular_core.OutputEmitterRef<{
3702
3762
  row: StrctRow;
3703
3763
  column: StrctDatagridColumn;
3764
+ /** The committed value as text — what a `text` editor produces. */
3704
3765
  value: string;
3766
+ /**
3767
+ * The same commit, typed: the number a `number` editor holds, or the
3768
+ * option's `value` a `select` editor chose. `value` stays a string so
3769
+ * handlers written against it keep working.
3770
+ */
3771
+ typedValue: unknown;
3705
3772
  previous: unknown;
3706
3773
  }>;
3707
3774
  private readonly menu;
@@ -3790,7 +3857,26 @@ declare class StrctDatagrid {
3790
3857
  colKey: string;
3791
3858
  } | null>;
3792
3859
  protected isEditingCell(row: StrctRow, col: StrctDatagridColumn): boolean;
3860
+ /** The value a typed editor holds while it is open (committed on Enter / blur). */
3861
+ protected readonly editDraft: _angular_core.WritableSignal<unknown>;
3793
3862
  protected startEdit(row: StrctRow, col: StrctDatagridColumn): void;
3863
+ /** A select column reads as its option's label, not as the stored value. */
3864
+ protected displayValue(row: StrctRow, col: StrctDatagridColumn): unknown;
3865
+ /** Close the editor and emit `cellEdit` when the value actually changed. */
3866
+ protected commitValue(row: StrctRow, col: StrctDatagridColumn, raw: unknown): void;
3867
+ /** Enter / blur on a typed editor commits what it currently holds. */
3868
+ protected commitDraft(row: StrctRow, col: StrctDatagridColumn, event?: Event): void;
3869
+ /**
3870
+ * A column that declares bounds means them: Enter commits what the field
3871
+ * holds, and `strct-number` only clamps on blur, so the grid clamps here
3872
+ * rather than letting an out-of-range value reach `cellEdit`.
3873
+ */
3874
+ private clampToColumn;
3875
+ /**
3876
+ * A number editor is a field between two stepper buttons, so focus moves
3877
+ * inside it — only a move that actually leaves the editor is a blur.
3878
+ */
3879
+ protected commitOnLeave(row: StrctRow, col: StrctDatagridColumn, event: FocusEvent): void;
3794
3880
  protected commitEdit(row: StrctRow, col: StrctDatagridColumn, event: Event): void;
3795
3881
  protected cancelEdit(event?: Event): void;
3796
3882
  /**
@@ -6238,5 +6324,5 @@ declare class StrctHeatmap {
6238
6324
  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; }; "colLabelEvery": { "alias": "colLabelEvery"; "required": false; "isSignal": true; }; "colLabel": { "alias": "colLabel"; "required": false; "isSignal": true; }; "valueFormat": { "alias": "valueFormat"; "required": false; "isSignal": true; }; "thresholds": { "alias": "thresholds"; "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>;
6239
6325
  }
6240
6326
 
6241
- 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, StrctCardHeaderActions, StrctCardHeaderMeta, StrctCardHeaderNote, StrctCascadeColumn, StrctCascadeHost, StrctCascadeSelect, StrctCellDef, StrctCellStatus, StrctChart, StrctCheckbox, StrctChips, StrctCode, StrctCodeInline, StrctColorPicker, StrctCombobox, StrctCommandPalette, StrctConfirmOutlet, StrctConfirmService, StrctContextMenu, StrctContextMenuTrigger, StrctCopy, StrctDatagrid, StrctDatagridActionBar, StrctDatagridActionBarCaption, 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, StrctList, StrctListItem, StrctListItemDescription, StrctListItemLeading, StrctListItemMeta, StrctListItemTrailing, StrctLogViewer, StrctLogin, StrctMenuPanel, StrctMenuService, StrctMenubar, StrctMetricTile, StrctModal, StrctModalContent, StrctNav, StrctNavItem, StrctNotificationCenter, StrctNumber, StrctOverlay, StrctPageHeader, StrctPageHeaderActions, StrctPageHeaderCrumbs, StrctPageHeaderTitleMeta, StrctPagination, StrctPassword, StrctPopover, StrctPopoverTrigger, StrctProgress, StrctRadio, StrctRadioGroup, StrctRail, StrctRange, StrctRatePipe, StrctRating, StrctReorder, StrctReorderItem, StrctRowDetailDef, StrctSearchbox, StrctSectionHeader, StrctSectionHeaderActions, StrctSectionHeaderMeta, 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, StrctToolbarCaption, 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 };
6327
+ 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, StrctCardHeaderActions, StrctCardHeaderMeta, StrctCardHeaderNote, StrctCascadeColumn, StrctCascadeHost, StrctCascadeSelect, StrctCellDef, StrctCellStatus, StrctChart, StrctCheckbox, StrctChips, StrctCode, StrctCodeInline, StrctColorPicker, StrctCombobox, StrctCommandPalette, StrctConfirmOutlet, StrctConfirmService, StrctContextMenu, StrctContextMenuTrigger, StrctCopy, StrctDatagrid, StrctDatagridActionBar, StrctDatagridActionBarCaption, StrctDatepicker, StrctDatetimePicker, StrctDesc, StrctDescriptionList, StrctDiff, StrctDivider, StrctDonut, StrctDrawer, StrctDrawerFooter, StrctDropdown, StrctDropdownDivider, StrctDropdownItem, StrctDropdownTrigger, StrctDurationPipe, StrctEmptyState, StrctField, StrctFieldGroup, StrctFieldHint, StrctFieldPrefix, StrctFieldSuffix, StrctFile, StrctFilterBar, StrctFlow, StrctFooter, StrctGauge, StrctHeader, StrctHeatmap, StrctHero, StrctHotkeysHelp, StrctHotkeysService, StrctIcon, StrctInlineEdit, StrctInput, StrctInputMask, StrctInputOtp, StrctKbd, StrctKnob, StrctList, StrctListItem, StrctListItemDescription, StrctListItemLeading, StrctListItemMeta, StrctListItemTrailing, StrctLogViewer, StrctLogin, StrctMenuPanel, StrctMenuService, StrctMenubar, StrctMetricTile, StrctModal, StrctModalContent, StrctNav, StrctNavItem, StrctNotificationCenter, StrctNumber, StrctOverlay, StrctPageHeader, StrctPageHeaderActions, StrctPageHeaderCrumbs, StrctPageHeaderTitleMeta, StrctPagination, StrctPassword, StrctPopover, StrctPopoverTrigger, StrctProgress, StrctRadio, StrctRadioGroup, StrctRail, StrctRange, StrctRatePipe, StrctRating, StrctReorder, StrctReorderItem, StrctRowDetailDef, StrctSearchbox, StrctSectionHeader, StrctSectionHeaderActions, StrctSectionHeaderMeta, 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, StrctToolbarCaption, 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 };
6242
6328
  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, StrctProgressSegment, StrctProgressStatus, StrctRailItem, StrctRailStatus, StrctReorderEvent, StrctRow, StrctRowId, StrctSegmentedOption, StrctSegmentedSize, StrctSignpostPosition, StrctSpeedDialDirection, StrctSpinnerSize, StrctStatus, StrctStatusDotSize, StrctTagStatus, StrctThresholds, StrctTimeRange, StrctTimeRangePreset, StrctTimelineState, StrctToast, StrctToastOptions, StrctToastType, StrctTooltipPosition, StrctTourStep, StrctTransferItem, StrctTreeDropEvent, StrctTreeMenuEvent, StrctTreeNodeData, StrctTreeNodeMenuFn, StrctValidationState, StrctValidationStatus, StrctWizardDefaults };