@aquera/ngx-smart-table 0.0.28 → 0.0.32
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.
|
@@ -529,6 +529,14 @@ declare class TableState {
|
|
|
529
529
|
readonly requestAddRow$: Observable<{
|
|
530
530
|
focusColumn: number;
|
|
531
531
|
}>;
|
|
532
|
+
private _requestFocusTabs$;
|
|
533
|
+
readonly requestFocusTabs$: Observable<void>;
|
|
534
|
+
private _requestEditFocusedCell$;
|
|
535
|
+
readonly requestEditFocusedCell$: Observable<void>;
|
|
536
|
+
private _requestFocusRowActions$;
|
|
537
|
+
readonly requestFocusRowActions$: Observable<number>;
|
|
538
|
+
private _requestFocusHeader$;
|
|
539
|
+
readonly requestFocusHeader$: Observable<number>;
|
|
532
540
|
private _pendingFocusAfterRowAdd;
|
|
533
541
|
private _rowCount;
|
|
534
542
|
private _columnCount;
|
|
@@ -731,6 +739,9 @@ declare class TableState {
|
|
|
731
739
|
* Focus a cell by position
|
|
732
740
|
*/
|
|
733
741
|
focusCell(rowIndex: number, columnIndex: number): void;
|
|
742
|
+
get rowCount(): number;
|
|
743
|
+
get columnCount(): number;
|
|
744
|
+
requestEditFocusedCell(): void;
|
|
734
745
|
/**
|
|
735
746
|
* Get currently focused position
|
|
736
747
|
*/
|
|
@@ -761,6 +772,8 @@ declare class TableState {
|
|
|
761
772
|
* Clear focus
|
|
762
773
|
*/
|
|
763
774
|
clearFocus(): void;
|
|
775
|
+
/** Emit requestFocusTabs$ to signal that focus should return to the sheet tabs/headers. */
|
|
776
|
+
requestFocusTabs(): void;
|
|
764
777
|
/**
|
|
765
778
|
* Check if navigation is active
|
|
766
779
|
*/
|
|
@@ -976,6 +989,12 @@ interface ColumnConfig<T = any> {
|
|
|
976
989
|
* Edit mode trigger
|
|
977
990
|
*/
|
|
978
991
|
readonly editMode?: EditMode;
|
|
992
|
+
/**
|
|
993
|
+
* When `true` with {@link CellDataType.BOOLEAN}, the cell shows a `nile-checkbox` in display mode (inline toggle).
|
|
994
|
+
* When `false` or unset on other column setups, display uses the formatter (e.g. Yes/No).
|
|
995
|
+
* With `Columns.nileCheckbox(...)`, defaults to `true` unless you pass `booleanDisplayAsCheckbox: false`.
|
|
996
|
+
*/
|
|
997
|
+
readonly booleanDisplayAsCheckbox?: boolean;
|
|
979
998
|
/**
|
|
980
999
|
* Whether this column is sortable
|
|
981
1000
|
*/
|
|
@@ -1081,6 +1100,11 @@ interface ColumnConfig<T = any> {
|
|
|
1081
1100
|
* @default true
|
|
1082
1101
|
*/
|
|
1083
1102
|
readonly showStickyShadow?: boolean;
|
|
1103
|
+
/**
|
|
1104
|
+
* Background for this column’s cells when `sticky` is set (header + body).
|
|
1105
|
+
* Falls back to `TableConfig.display.stickyColumnBackground` when omitted.
|
|
1106
|
+
*/
|
|
1107
|
+
readonly stickyBackground?: string;
|
|
1084
1108
|
/**
|
|
1085
1109
|
* Cell content alignment
|
|
1086
1110
|
*/
|
|
@@ -1361,6 +1385,11 @@ declare class Cell<T = any> {
|
|
|
1361
1385
|
* @param newValue The new value from editor
|
|
1362
1386
|
*/
|
|
1363
1387
|
saveEdit(newValue: T): boolean;
|
|
1388
|
+
/**
|
|
1389
|
+
* Apply a new value from an inline display control (e.g. `nile-checkbox`) without entering edit mode.
|
|
1390
|
+
* Runs the same validation, dirty-state, history, and save hooks as {@link saveEdit}.
|
|
1391
|
+
*/
|
|
1392
|
+
commitDisplayValue(newValue: T): boolean;
|
|
1364
1393
|
/**
|
|
1365
1394
|
* Cancel edit and revert to previous value
|
|
1366
1395
|
*/
|
|
@@ -1591,7 +1620,11 @@ declare enum NavigationKey {
|
|
|
1591
1620
|
/**
|
|
1592
1621
|
* Escape key
|
|
1593
1622
|
*/
|
|
1594
|
-
ESCAPE = "Escape"
|
|
1623
|
+
ESCAPE = "Escape",
|
|
1624
|
+
/**
|
|
1625
|
+
* Space key — starts cell editing
|
|
1626
|
+
*/
|
|
1627
|
+
SPACE = " "
|
|
1595
1628
|
}
|
|
1596
1629
|
/**
|
|
1597
1630
|
* Navigation directions
|
|
@@ -1958,6 +1991,10 @@ interface RowActionContext {
|
|
|
1958
1991
|
* Provides a single source of truth for pagination, sorting, filtering, and display options
|
|
1959
1992
|
*/
|
|
1960
1993
|
|
|
1994
|
+
/** Context passed to `TableConfig.display.rowBackground`. */
|
|
1995
|
+
interface TableRowBackgroundContext {
|
|
1996
|
+
rowIndex: number;
|
|
1997
|
+
}
|
|
1961
1998
|
/**
|
|
1962
1999
|
* Comprehensive table configuration interface
|
|
1963
2000
|
*/
|
|
@@ -2061,6 +2098,11 @@ interface TableConfig {
|
|
|
2061
2098
|
* Display configuration
|
|
2062
2099
|
*/
|
|
2063
2100
|
display?: {
|
|
2101
|
+
/**
|
|
2102
|
+
* Accessible label for the table element (exposed as `aria-label`).
|
|
2103
|
+
* Used by screen readers to identify the table. Defaults to `'Data table'`.
|
|
2104
|
+
*/
|
|
2105
|
+
ariaLabel?: string;
|
|
2064
2106
|
/**
|
|
2065
2107
|
* Make table header sticky on scroll
|
|
2066
2108
|
* @default true
|
|
@@ -2072,10 +2114,73 @@ interface TableConfig {
|
|
|
2072
2114
|
*/
|
|
2073
2115
|
hover?: boolean;
|
|
2074
2116
|
/**
|
|
2075
|
-
* Max height of the table in pixels
|
|
2117
|
+
* Max height of the table body scroll area in pixels (standard / non–virtual-scroll mode).
|
|
2118
|
+
* Applied as `max-height` on the `.st-table` wrapper. Ignored for that sizing when `visibleBodyRows` is set.
|
|
2119
|
+
* The host uses `min-height: 0` so flex parents (e.g. workbook tabs) honor the cap.
|
|
2076
2120
|
* @default 300
|
|
2077
2121
|
*/
|
|
2078
2122
|
maxHeight?: number;
|
|
2123
|
+
/**
|
|
2124
|
+
* Number of **data** (body) rows to keep visible before vertical scroll (standard mode only).
|
|
2125
|
+
* Use **`0`** to show **all** rows: no row-count viewport and no `display.maxHeight` cap on `.st-table`
|
|
2126
|
+
* (natural table height; page/parent may still scroll).
|
|
2127
|
+
* For **positive** N, the table measures the header and the sum of the first N body row heights (capped
|
|
2128
|
+
* by actual row count) and sets that viewport; it takes precedence over `maxHeight` for that wrapper.
|
|
2129
|
+
* Not used when virtual scroll is enabled.
|
|
2130
|
+
*/
|
|
2131
|
+
visibleBodyRows?: number;
|
|
2132
|
+
/**
|
|
2133
|
+
* Default background for sticky columns (row #, sticky-left / sticky-right cells) when the column has no `stickyBackground`.
|
|
2134
|
+
*/
|
|
2135
|
+
stickyColumnBackground?: string;
|
|
2136
|
+
/**
|
|
2137
|
+
* When true, applies the sticky row background to every cell in each row (not only sticky-positioned columns).
|
|
2138
|
+
* Each cell uses `column.stickyBackground` when set, otherwise `stickyColumnBackground`.
|
|
2139
|
+
* @default false
|
|
2140
|
+
*/
|
|
2141
|
+
stickyColumnBackgroundFullRow?: boolean;
|
|
2142
|
+
/**
|
|
2143
|
+
* Per-row background from row data. When a non-empty string is returned, it applies to every body cell in that row
|
|
2144
|
+
* (row number, data cells, settings column). Return `undefined` / `null` / `''` to fall back to sticky / default styling.
|
|
2145
|
+
* Not serializable in JSON configs (TypeScript only).
|
|
2146
|
+
*/
|
|
2147
|
+
rowBackground?: (rowData: any, context: TableRowBackgroundContext) => string | null | undefined;
|
|
2148
|
+
/**
|
|
2149
|
+
* Optional icon shown next to the row number from row data — useful for status badges
|
|
2150
|
+
* like "disabled", "warning", "locked". Return a Nile icon name to render the icon next
|
|
2151
|
+
* to the row number inside the same sticky row-number cell. Return `null` / `undefined` / `''`
|
|
2152
|
+
* to show no icon for that row. Has no effect when `showRowNumber` is `false`.
|
|
2153
|
+
*
|
|
2154
|
+
* Optionally return `{ name, tooltip }` to also surface a hover tooltip on the icon.
|
|
2155
|
+
* Not serializable in JSON configs (TypeScript only).
|
|
2156
|
+
*
|
|
2157
|
+
* @example
|
|
2158
|
+
* display: {
|
|
2159
|
+
* showRowNumber: true,
|
|
2160
|
+
* rowNumberIcon: (row) => row.disabled ? 'disabled' : null,
|
|
2161
|
+
* }
|
|
2162
|
+
*/
|
|
2163
|
+
rowNumberIcon?: (rowData: any, context: TableRowBackgroundContext) => string | {
|
|
2164
|
+
name: string;
|
|
2165
|
+
tooltip?: string;
|
|
2166
|
+
} | null | undefined;
|
|
2167
|
+
/**
|
|
2168
|
+
* Explicit pixel width of the row-number column. Defaults to `30` when no
|
|
2169
|
+
* `rowNumberIcon` is configured, and `60` when one is — auto-sized to fit
|
|
2170
|
+
* triple-digit numbers plus the trailing status icon. Override if you have
|
|
2171
|
+
* very large row counts (4+ digits) or want a wider gutter.
|
|
2172
|
+
*/
|
|
2173
|
+
rowNumberWidth?: number;
|
|
2174
|
+
/**
|
|
2175
|
+
* Customize the keyboard-focused cell outline (`.cell-focused` when keyboard navigation is enabled).
|
|
2176
|
+
* Any property omitted keeps the library default.
|
|
2177
|
+
*/
|
|
2178
|
+
focusedCell?: {
|
|
2179
|
+
outlineColor?: string;
|
|
2180
|
+
outlineWidth?: string;
|
|
2181
|
+
boxShadow?: string;
|
|
2182
|
+
editingBoxShadow?: string;
|
|
2183
|
+
};
|
|
2079
2184
|
/**
|
|
2080
2185
|
* Virtual scroll configuration for large datasets
|
|
2081
2186
|
* Enables efficient rendering by only showing visible rows
|
|
@@ -2262,10 +2367,286 @@ interface SheetActionContext {
|
|
|
2262
2367
|
actions: SheetAction[];
|
|
2263
2368
|
}
|
|
2264
2369
|
|
|
2370
|
+
/**
|
|
2371
|
+
* Condition builder operator types.
|
|
2372
|
+
*
|
|
2373
|
+
* Operator definitions are consumer-provided via ConditionBuilderConfig.operators.
|
|
2374
|
+
* The library does not ship a default operator set.
|
|
2375
|
+
*/
|
|
2376
|
+
/**
|
|
2377
|
+
* Arity of an operator — how many value inputs the operator needs.
|
|
2378
|
+
* - 'none' : operator takes no value (e.g. IS_CHANGED, IS_EMPTY)
|
|
2379
|
+
* - 'single' : operator takes one value
|
|
2380
|
+
* - 'multi' : operator takes a list of values
|
|
2381
|
+
*/
|
|
2382
|
+
type OperatorArity = 'none' | 'single' | 'multi';
|
|
2383
|
+
/**
|
|
2384
|
+
* Logical connector between two adjacent conditions.
|
|
2385
|
+
* The first condition in a list has an unused connector (defaults to 'AND').
|
|
2386
|
+
*/
|
|
2387
|
+
type LogicalConnector = 'AND' | 'OR';
|
|
2388
|
+
/**
|
|
2389
|
+
* Group type — how subConditions inside a group are combined.
|
|
2390
|
+
* - 'all' : all subConditions must be true (AND)
|
|
2391
|
+
* - 'any' : at least one subCondition must be true (OR)
|
|
2392
|
+
*/
|
|
2393
|
+
type GroupType = 'all' | 'any';
|
|
2394
|
+
/**
|
|
2395
|
+
* Declarative definition of one comparison operator.
|
|
2396
|
+
*/
|
|
2397
|
+
interface OperatorDefinition {
|
|
2398
|
+
/** Stable identifier used in the saved condition (e.g. 'EQUAL'). */
|
|
2399
|
+
key: string;
|
|
2400
|
+
/** User-visible label (e.g. 'Equals to'). */
|
|
2401
|
+
label: string;
|
|
2402
|
+
/** Whether this operator needs a value, a single value, or multiple values. */
|
|
2403
|
+
arity: OperatorArity;
|
|
2404
|
+
}
|
|
2405
|
+
|
|
2406
|
+
/**
|
|
2407
|
+
* Field (attribute) schema for the condition builder.
|
|
2408
|
+
*
|
|
2409
|
+
* Fields are consumer-provided via ConditionBuilderConfig.fields.
|
|
2410
|
+
* The library does not ship default fields.
|
|
2411
|
+
*/
|
|
2412
|
+
/**
|
|
2413
|
+
* Editor variant used to render a field's value input.
|
|
2414
|
+
* - 'text' : free-form text, single value
|
|
2415
|
+
* - 'chip' : free-form text, multi-value (chips)
|
|
2416
|
+
* - 'select' : dropdown of predefined options, single value
|
|
2417
|
+
* - 'multi-select' : dropdown of predefined options, multi value
|
|
2418
|
+
*/
|
|
2419
|
+
type FieldValueEditor = 'text' | 'chip' | 'select' | 'multi-select';
|
|
2420
|
+
/**
|
|
2421
|
+
* A predefined option for select / multi-select editors.
|
|
2422
|
+
*/
|
|
2423
|
+
interface FieldOption {
|
|
2424
|
+
/** Stable value stored in the condition. */
|
|
2425
|
+
value: string;
|
|
2426
|
+
/** User-visible label. */
|
|
2427
|
+
label: string;
|
|
2428
|
+
}
|
|
2429
|
+
/**
|
|
2430
|
+
* Declarative definition of one attribute the user can build conditions against.
|
|
2431
|
+
*/
|
|
2432
|
+
interface FieldDefinition {
|
|
2433
|
+
/** Stable identifier stored in the condition (e.g. 'userStatus'). */
|
|
2434
|
+
attribute: string;
|
|
2435
|
+
/** User-visible label (e.g. 'User Status'). */
|
|
2436
|
+
screenName: string;
|
|
2437
|
+
/** Which value editor to render once the user picks this field. */
|
|
2438
|
+
valueEditor: FieldValueEditor;
|
|
2439
|
+
/**
|
|
2440
|
+
* Operator keys this field supports. If omitted, all operators from the
|
|
2441
|
+
* builder config are allowed. Operator keys must match an OperatorDefinition.key.
|
|
2442
|
+
*/
|
|
2443
|
+
operators?: string[];
|
|
2444
|
+
/** Predefined options — required when valueEditor is 'select' or 'multi-select'. */
|
|
2445
|
+
options?: FieldOption[];
|
|
2446
|
+
/**
|
|
2447
|
+
* Placeholder text shown in the value editor when nothing is selected.
|
|
2448
|
+
* Falls back to a sensible default per editor type when omitted.
|
|
2449
|
+
*/
|
|
2450
|
+
valuePlaceholder?: string;
|
|
2451
|
+
}
|
|
2452
|
+
/**
|
|
2453
|
+
* Grouped fields shown as a submenu in the field picker. Matches the v1 admin-ui
|
|
2454
|
+
* pattern where top-level options ("Groups Membership", "Operation") sit alongside
|
|
2455
|
+
* a nested "Attributes" category whose entries (often dozens or hundreds, fetched
|
|
2456
|
+
* dynamically per tenant) live behind a searchable submenu.
|
|
2457
|
+
*/
|
|
2458
|
+
interface FieldCategory {
|
|
2459
|
+
/** Stable identifier for the category. */
|
|
2460
|
+
id: string;
|
|
2461
|
+
/** User-visible label (e.g. 'Attributes'). */
|
|
2462
|
+
label: string;
|
|
2463
|
+
/** Fields shown inside this category's submenu. */
|
|
2464
|
+
fields: FieldDefinition[];
|
|
2465
|
+
/**
|
|
2466
|
+
* Show a search input above the field list. Recommended for categories
|
|
2467
|
+
* with more than a handful of fields.
|
|
2468
|
+
* @default true
|
|
2469
|
+
*/
|
|
2470
|
+
searchable?: boolean;
|
|
2471
|
+
}
|
|
2472
|
+
|
|
2473
|
+
/**
|
|
2474
|
+
* Condition builder configuration — provided by the consuming application.
|
|
2475
|
+
*
|
|
2476
|
+
* The library ships no defaults. The consumer is responsible for supplying
|
|
2477
|
+
* the field schema, operator catalogue, and feature flags.
|
|
2478
|
+
*/
|
|
2479
|
+
|
|
2480
|
+
interface ConditionBuilderConfig {
|
|
2481
|
+
/** Top-level fields, shown directly in the field picker. */
|
|
2482
|
+
fields: FieldDefinition[];
|
|
2483
|
+
/**
|
|
2484
|
+
* Optional grouped fields. Each category shows as one entry in the top-level
|
|
2485
|
+
* picker with a chevron — clicking it opens a submenu containing the
|
|
2486
|
+
* category's fields (with optional search).
|
|
2487
|
+
*/
|
|
2488
|
+
categories?: FieldCategory[];
|
|
2489
|
+
/** Available comparison operators. */
|
|
2490
|
+
operators: OperatorDefinition[];
|
|
2491
|
+
/**
|
|
2492
|
+
* Allow toggling between condition-builder UI and raw expression mode.
|
|
2493
|
+
* When false, the expression-mode toggle is hidden.
|
|
2494
|
+
* @default false
|
|
2495
|
+
*/
|
|
2496
|
+
allowExpressionMode?: boolean;
|
|
2497
|
+
/**
|
|
2498
|
+
* Allow adding group conditions (1-level nesting).
|
|
2499
|
+
* When false, only flat single conditions can be added.
|
|
2500
|
+
* @default true
|
|
2501
|
+
*/
|
|
2502
|
+
allowGroups?: boolean;
|
|
2503
|
+
/**
|
|
2504
|
+
* Maximum number of top-level conditions. Add buttons disable once reached.
|
|
2505
|
+
* @default 10
|
|
2506
|
+
*/
|
|
2507
|
+
maxConditions?: number;
|
|
2508
|
+
/**
|
|
2509
|
+
* Language token-set for syntax highlighting in expression mode.
|
|
2510
|
+
* Passed to nile-code-editor's `language` prop.
|
|
2511
|
+
* @default 'javascript'
|
|
2512
|
+
*/
|
|
2513
|
+
expressionLanguage?: 'javascript' | 'sql' | 'json' | 'html';
|
|
2514
|
+
/**
|
|
2515
|
+
* Nested autocompletion tree forwarded to nile-code-editor's
|
|
2516
|
+
* `customAutoCompletions`. Same shape v1 used in admin-ui — typically a
|
|
2517
|
+
* nested object describing variable hierarchies, e.g.:
|
|
2518
|
+
* { DEST: { target: {...}, projected: {...}, meta: {...} } }
|
|
2519
|
+
* Pair with `expressionAutoCompletionPaths` to control which paths show up.
|
|
2520
|
+
*/
|
|
2521
|
+
expressionAutoCompletions?: Record<string, unknown>;
|
|
2522
|
+
/**
|
|
2523
|
+
* Dot-separated paths exposed by the autocompletion engine, forwarded to
|
|
2524
|
+
* nile-code-editor's `customCompletionsPaths`. Example:
|
|
2525
|
+
* ['DEST.target.email', 'DEST.projected.email', 'DEST.config.operation']
|
|
2526
|
+
*/
|
|
2527
|
+
expressionAutoCompletionPaths?: string[];
|
|
2528
|
+
}
|
|
2529
|
+
/**
|
|
2530
|
+
* Validation error reported by the condition builder.
|
|
2531
|
+
*/
|
|
2532
|
+
interface ConditionValidationError {
|
|
2533
|
+
/** Stable error code (e.g. 'empty-attribute'). */
|
|
2534
|
+
code: string;
|
|
2535
|
+
/** Human-readable message. */
|
|
2536
|
+
message: string;
|
|
2537
|
+
/** Index of the offending top-level condition, if applicable. */
|
|
2538
|
+
index?: number;
|
|
2539
|
+
/** Index of the offending subCondition within a group, if applicable. */
|
|
2540
|
+
subIndex?: number;
|
|
2541
|
+
}
|
|
2542
|
+
/**
|
|
2543
|
+
* Validity payload emitted by the condition builder.
|
|
2544
|
+
*/
|
|
2545
|
+
interface ConditionBuilderValidity {
|
|
2546
|
+
valid: boolean;
|
|
2547
|
+
errors: ConditionValidationError[];
|
|
2548
|
+
}
|
|
2549
|
+
|
|
2550
|
+
/**
|
|
2551
|
+
* Strict types for the condition tree the builder produces.
|
|
2552
|
+
*
|
|
2553
|
+
* The shape is a discriminated union: a node is either a 'single' condition
|
|
2554
|
+
* (one field/operator/value triple) or a 'group' (a list of subConditions
|
|
2555
|
+
* combined by the group's groupType).
|
|
2556
|
+
*
|
|
2557
|
+
* Nesting depth is one level — groups contain only single subConditions,
|
|
2558
|
+
* not other groups. This matches the v1 admin-ui implementation.
|
|
2559
|
+
*/
|
|
2560
|
+
|
|
2561
|
+
/**
|
|
2562
|
+
* Value held by a single condition. Shape depends on the operator's arity:
|
|
2563
|
+
* - 'none' → empty array
|
|
2564
|
+
* - 'single' → single-element array (or scalar — the builder normalises to array)
|
|
2565
|
+
* - 'multi' → array of strings
|
|
2566
|
+
*/
|
|
2567
|
+
type ConditionValue = string[];
|
|
2568
|
+
/**
|
|
2569
|
+
* One leaf condition: field · operator · value, plus the logical connector
|
|
2570
|
+
* that ties it to the previous condition in its parent list.
|
|
2571
|
+
*/
|
|
2572
|
+
interface SingleCondition {
|
|
2573
|
+
type: 'single';
|
|
2574
|
+
/** Logical connector to the previous condition in the parent list. First condition's connector is ignored. */
|
|
2575
|
+
connector: LogicalConnector;
|
|
2576
|
+
/** Field attribute key — references FieldDefinition.attribute. */
|
|
2577
|
+
attribute: string;
|
|
2578
|
+
/** Operator key — references OperatorDefinition.key. */
|
|
2579
|
+
operator: string;
|
|
2580
|
+
/** Value(s) for this condition. Empty array when operator arity is 'none'. */
|
|
2581
|
+
value: ConditionValue;
|
|
2582
|
+
}
|
|
2583
|
+
/**
|
|
2584
|
+
* A condition that lives inside a group. Same shape as SingleCondition but
|
|
2585
|
+
* typed separately to make the 1-level nesting rule explicit at compile time.
|
|
2586
|
+
*/
|
|
2587
|
+
interface SubCondition {
|
|
2588
|
+
/** Logical connector to the previous subCondition in the parent group. First subCondition's connector is ignored. */
|
|
2589
|
+
connector: LogicalConnector;
|
|
2590
|
+
attribute: string;
|
|
2591
|
+
operator: string;
|
|
2592
|
+
value: ConditionValue;
|
|
2593
|
+
}
|
|
2594
|
+
/**
|
|
2595
|
+
* A group condition: bundles a list of subConditions combined by groupType.
|
|
2596
|
+
*/
|
|
2597
|
+
interface GroupCondition {
|
|
2598
|
+
type: 'group';
|
|
2599
|
+
/** Logical connector to the previous condition in the parent list. */
|
|
2600
|
+
connector: LogicalConnector;
|
|
2601
|
+
/** How the subConditions are combined: 'all' = AND, 'any' = OR. */
|
|
2602
|
+
groupType: GroupType;
|
|
2603
|
+
/** List of subConditions in this group. Always at least one. */
|
|
2604
|
+
subConditions: SubCondition[];
|
|
2605
|
+
}
|
|
2606
|
+
/**
|
|
2607
|
+
* Discriminated union — a top-level condition is either single or a group.
|
|
2608
|
+
*/
|
|
2609
|
+
type ConditionNode = SingleCondition | GroupCondition;
|
|
2610
|
+
/**
|
|
2611
|
+
* Builder mode for a rule.
|
|
2612
|
+
* - 'builder' : GUI condition builder (the default)
|
|
2613
|
+
* - 'expression' : raw expression text editor
|
|
2614
|
+
* The two modes are mutually exclusive per rule.
|
|
2615
|
+
*/
|
|
2616
|
+
type ConditionBuilderMode = 'builder' | 'expression';
|
|
2617
|
+
/**
|
|
2618
|
+
* The full value the condition builder reads and writes.
|
|
2619
|
+
* Either `conditions` (when mode is 'builder') or `expression` (when mode is 'expression')
|
|
2620
|
+
* is the authoritative source — the unused one is preserved as-is.
|
|
2621
|
+
*/
|
|
2622
|
+
interface ConditionBuilderValue {
|
|
2623
|
+
/** Current mode of this rule. */
|
|
2624
|
+
mode: ConditionBuilderMode;
|
|
2625
|
+
/** Condition tree — authoritative when mode is 'builder'. */
|
|
2626
|
+
conditions: ConditionNode[];
|
|
2627
|
+
/** Raw expression text — authoritative when mode is 'expression'. */
|
|
2628
|
+
expression: string;
|
|
2629
|
+
}
|
|
2630
|
+
|
|
2265
2631
|
/**
|
|
2266
2632
|
* Sheet configuration interface - wraps table with sheet-level settings
|
|
2267
2633
|
*/
|
|
2268
2634
|
|
|
2635
|
+
/**
|
|
2636
|
+
* Discriminator for the sheet's content type. Defaults to 'table' for back-compat.
|
|
2637
|
+
*/
|
|
2638
|
+
type SheetContentType = 'table' | 'condition-builder';
|
|
2639
|
+
/**
|
|
2640
|
+
* Condition-builder branch of a sheet. Present when contentType is 'condition-builder'.
|
|
2641
|
+
*/
|
|
2642
|
+
interface SheetConditionBuilder {
|
|
2643
|
+
/** Builder configuration — fields, operators, feature flags. */
|
|
2644
|
+
config: ConditionBuilderConfig;
|
|
2645
|
+
/** Current rule value — mode, conditions, expression. */
|
|
2646
|
+
value: ConditionBuilderValue;
|
|
2647
|
+
/** Whether the rule is enabled. Surface as a sheet-level toggle action. */
|
|
2648
|
+
isEnabled?: boolean;
|
|
2649
|
+
}
|
|
2269
2650
|
/**
|
|
2270
2651
|
* Comprehensive sheet configuration interface
|
|
2271
2652
|
*/
|
|
@@ -2279,9 +2660,19 @@ interface SheetConfig {
|
|
|
2279
2660
|
*/
|
|
2280
2661
|
name: string;
|
|
2281
2662
|
/**
|
|
2282
|
-
*
|
|
2663
|
+
* Sheet content type. When omitted, defaults to 'table' (back-compat).
|
|
2283
2664
|
*/
|
|
2284
|
-
|
|
2665
|
+
contentType?: SheetContentType;
|
|
2666
|
+
/**
|
|
2667
|
+
* Table configuration (existing TableConfig).
|
|
2668
|
+
* Required when contentType is 'table' (or omitted).
|
|
2669
|
+
*/
|
|
2670
|
+
tableConfig?: TableConfig;
|
|
2671
|
+
/**
|
|
2672
|
+
* Condition builder configuration + value.
|
|
2673
|
+
* Required when contentType is 'condition-builder'.
|
|
2674
|
+
*/
|
|
2675
|
+
conditionBuilder?: SheetConditionBuilder;
|
|
2285
2676
|
/**
|
|
2286
2677
|
* Sheet-level actions (similar to RowAction pattern)
|
|
2287
2678
|
*/
|
|
@@ -2537,9 +2928,17 @@ interface AutosaveConfig {
|
|
|
2537
2928
|
* - 'eager': Saves on every change (100ms debounce)
|
|
2538
2929
|
*/
|
|
2539
2930
|
strategy: AutosaveStrategy;
|
|
2931
|
+
/**
|
|
2932
|
+
* Whether to render the small save / spinner indicator in the workbook
|
|
2933
|
+
* toolbar. Independent of `enabled` so a consumer can autosave silently
|
|
2934
|
+
* without surfacing it to the user.
|
|
2935
|
+
* @default false
|
|
2936
|
+
*/
|
|
2937
|
+
showIndicator?: boolean;
|
|
2540
2938
|
}
|
|
2541
2939
|
/**
|
|
2542
|
-
* Default autosave configuration
|
|
2940
|
+
* Default autosave configuration. Autosave itself is on by default but the
|
|
2941
|
+
* UI indicator is hidden — consumers must opt in via `showIndicator: true`.
|
|
2543
2942
|
*/
|
|
2544
2943
|
declare const DEFAULT_AUTOSAVE_CONFIG: AutosaveConfig;
|
|
2545
2944
|
|
|
@@ -2560,9 +2959,19 @@ interface WorkbookSheetConfig {
|
|
|
2560
2959
|
*/
|
|
2561
2960
|
name: string;
|
|
2562
2961
|
/**
|
|
2563
|
-
*
|
|
2962
|
+
* Sheet content type. When omitted, defaults to 'table' (back-compat).
|
|
2564
2963
|
*/
|
|
2565
|
-
|
|
2964
|
+
contentType?: SheetContentType;
|
|
2965
|
+
/**
|
|
2966
|
+
* Table configuration for this sheet.
|
|
2967
|
+
* Required when contentType is 'table' (or omitted).
|
|
2968
|
+
*/
|
|
2969
|
+
tableConfig?: TableConfig;
|
|
2970
|
+
/**
|
|
2971
|
+
* Condition builder configuration + value.
|
|
2972
|
+
* Required when contentType is 'condition-builder'.
|
|
2973
|
+
*/
|
|
2974
|
+
conditionBuilder?: SheetConditionBuilder;
|
|
2566
2975
|
/**
|
|
2567
2976
|
* Optional per-sheet tab actions (overrides workbook defaults)
|
|
2568
2977
|
*/
|
|
@@ -3495,11 +3904,36 @@ declare class NileSelectEditor<T = string> implements CellEditor<T> {
|
|
|
3495
3904
|
private select?;
|
|
3496
3905
|
private eventListeners;
|
|
3497
3906
|
private optionsSubscription?;
|
|
3907
|
+
private dropdownOpen;
|
|
3908
|
+
private documentKeyForwarder;
|
|
3909
|
+
private wheelLockHandler;
|
|
3910
|
+
private highlightedOptionIndex;
|
|
3498
3911
|
private currentOptions;
|
|
3499
3912
|
private trackedValues;
|
|
3500
3913
|
private hasChangeOccurred;
|
|
3501
3914
|
constructor(options: NileSelectEditorOptions);
|
|
3502
3915
|
edit(context: CellEditorContext<T>): void;
|
|
3916
|
+
private setupDocumentKeyForwarder;
|
|
3917
|
+
/** Dispatch mouseup on the currently highlighted virtual-scroll portal option */
|
|
3918
|
+
private selectHighlightedVirtualOption;
|
|
3919
|
+
/** Navigate options — delegates to virtual or regular path */
|
|
3920
|
+
private navigateOption;
|
|
3921
|
+
/** Virtual-scroll: options live in the portal DOM, queried directly */
|
|
3922
|
+
private navigateVirtualOption;
|
|
3923
|
+
/** Regular (non-virtual) select: options are in nile-select's light DOM */
|
|
3924
|
+
private navigateRegularOption;
|
|
3925
|
+
/** Apply data-kb-active on the portal option matching highlightedOptionIndex */
|
|
3926
|
+
private syncPortalHighlight;
|
|
3927
|
+
/** Return the active portal element for the current select mode */
|
|
3928
|
+
private getActivePortal;
|
|
3929
|
+
private getPortalOptions;
|
|
3930
|
+
/**
|
|
3931
|
+
* Prevent the table (and page) from scrolling while the dropdown is open.
|
|
3932
|
+
* Wheel events that originate inside the portal are allowed (so the dropdown
|
|
3933
|
+
* list can still be scrolled); all others are cancelled.
|
|
3934
|
+
*/
|
|
3935
|
+
private setupScrollLock;
|
|
3936
|
+
private teardownScrollLock;
|
|
3503
3937
|
private activateSelectAfterMount;
|
|
3504
3938
|
/** Lit @query('nile-popup') / .select — must exist before handleOpenChange touches this.popup.popup */
|
|
3505
3939
|
private isNileSelectPopupMounted;
|
|
@@ -3911,8 +4345,15 @@ declare class NileChipEditor implements CellEditor<string[]> {
|
|
|
3911
4345
|
private eventListeners;
|
|
3912
4346
|
private trackedValues;
|
|
3913
4347
|
private hasChangeOccurred;
|
|
4348
|
+
private focusRetryHandle;
|
|
3914
4349
|
constructor(options?: NileChipEditorOptions | undefined);
|
|
3915
4350
|
edit(context: CellEditorContext<string[]>): void;
|
|
4351
|
+
/**
|
|
4352
|
+
* Retry focusing the chip's internal text input using requestAnimationFrame until
|
|
4353
|
+
* nile-chip's Lit shadow DOM has finished rendering (avoids fixed-timeout races).
|
|
4354
|
+
* Reads nile-chip's internal autoComplete reference for the most reliable access.
|
|
4355
|
+
*/
|
|
4356
|
+
private scheduleFocusRetry;
|
|
3916
4357
|
private positionPopover;
|
|
3917
4358
|
private setInitialValue;
|
|
3918
4359
|
private applyOptions;
|
|
@@ -4035,6 +4476,8 @@ declare class NileCodeEditor<T = string> implements CellEditor<T> {
|
|
|
4035
4476
|
private context?;
|
|
4036
4477
|
private dialogOpen;
|
|
4037
4478
|
private expandButtonClicked;
|
|
4479
|
+
/** Pointer is down on a CodeMirror tooltip — skip blur-save so completion clicks are not treated as leaving the cell */
|
|
4480
|
+
private codeMirrorUiPointerDown;
|
|
4038
4481
|
private documentClickHandler?;
|
|
4039
4482
|
private trackedValue;
|
|
4040
4483
|
private syncingFromDialog;
|
|
@@ -4042,6 +4485,13 @@ declare class NileCodeEditor<T = string> implements CellEditor<T> {
|
|
|
4042
4485
|
private dialogOriginalValue;
|
|
4043
4486
|
private dialogCurrentValue;
|
|
4044
4487
|
constructor(options?: NileCodeEditorOptions | undefined);
|
|
4488
|
+
/**
|
|
4489
|
+
* Parent CodeMirror tooltips to `document.body` so autocomplete is not clipped by the table/cell
|
|
4490
|
+
* overflow chain. Uses runtime `import()` only — no extra entries in this library's package.json;
|
|
4491
|
+
* modules resolve from the app via `@aquera/nile-elements` / `codemirror` (unchanged consumer graph).
|
|
4492
|
+
*/
|
|
4493
|
+
private attachCodeMirrorTooltipsToBody;
|
|
4494
|
+
private onNileCodeMirrorAfterUpdate;
|
|
4045
4495
|
edit(context: CellEditorContext<T>): void;
|
|
4046
4496
|
/**
|
|
4047
4497
|
* Focus the editor and place cursor
|
|
@@ -4102,6 +4552,38 @@ declare class NileCodeEditor<T = string> implements CellEditor<T> {
|
|
|
4102
4552
|
getEditorInstance(): any;
|
|
4103
4553
|
}
|
|
4104
4554
|
|
|
4555
|
+
/**
|
|
4556
|
+
* Boolean cell editor using `<nile-checkbox>` from @aquera/nile-elements`.
|
|
4557
|
+
*
|
|
4558
|
+
* For display (inline checkbox vs Yes/No text), set `booleanDisplayAsCheckbox` on the column config
|
|
4559
|
+
* (`Columns.nileCheckbox` defaults it to `true`; pass `booleanDisplayAsCheckbox: false` for text until edit).
|
|
4560
|
+
*/
|
|
4561
|
+
|
|
4562
|
+
interface NileCheckboxEditorOptions {
|
|
4563
|
+
/** Checkbox size (default `small` for compact table cells) */
|
|
4564
|
+
size?: 'small' | 'medium' | 'large';
|
|
4565
|
+
disabled?: boolean;
|
|
4566
|
+
/** Optional label text (Nile `label` attribute); leave empty for icon-only in-cell */
|
|
4567
|
+
label?: string;
|
|
4568
|
+
/** When true (default), each toggle calls `onSave` immediately */
|
|
4569
|
+
saveOnChange?: boolean;
|
|
4570
|
+
autoFocus?: boolean;
|
|
4571
|
+
}
|
|
4572
|
+
/**
|
|
4573
|
+
* Uses Nile checkbox styling/behavior instead of a native `<input type="checkbox">`.
|
|
4574
|
+
*/
|
|
4575
|
+
declare class NileCheckboxEditor implements CellEditor<boolean> {
|
|
4576
|
+
private readonly options?;
|
|
4577
|
+
readonly acceptsInitialKeypress = false;
|
|
4578
|
+
private checkbox?;
|
|
4579
|
+
private readonly listeners;
|
|
4580
|
+
constructor(options?: NileCheckboxEditorOptions | undefined);
|
|
4581
|
+
edit(context: CellEditorContext<boolean>): void;
|
|
4582
|
+
destroy(): void;
|
|
4583
|
+
focus(): void;
|
|
4584
|
+
getCurrentValue(): boolean;
|
|
4585
|
+
}
|
|
4586
|
+
|
|
4105
4587
|
/**
|
|
4106
4588
|
* Column configuration factory
|
|
4107
4589
|
* Simplifies creation of common column types with sensible defaults
|
|
@@ -4141,6 +4623,19 @@ declare class ColumnConfigFactory {
|
|
|
4141
4623
|
trueValue?: string;
|
|
4142
4624
|
falseValue?: string;
|
|
4143
4625
|
}): ColumnConfig<boolean>;
|
|
4626
|
+
/**
|
|
4627
|
+
* Boolean column using {@link NileCheckboxEditor} (`<nile-checkbox>`) instead of a native checkbox.
|
|
4628
|
+
*
|
|
4629
|
+
* Display mode:
|
|
4630
|
+
* - `booleanDisplayAsCheckbox` omitted or `true` — inline `nile-checkbox` in the cell (toggle without opening editor).
|
|
4631
|
+
* - `booleanDisplayAsCheckbox: false` — show formatted text (`trueValue` / `falseValue`, default Yes/No) until the user edits the cell.
|
|
4632
|
+
*/
|
|
4633
|
+
static nileCheckbox(key: string, options?: Partial<ColumnConfig<boolean>> & {
|
|
4634
|
+
trueValue?: string;
|
|
4635
|
+
falseValue?: string;
|
|
4636
|
+
/** Options passed to {@link NileCheckboxEditor} */
|
|
4637
|
+
nileCheckbox?: NileCheckboxEditorOptions;
|
|
4638
|
+
}): ColumnConfig<boolean>;
|
|
4144
4639
|
/**
|
|
4145
4640
|
* Create a select/dropdown column
|
|
4146
4641
|
*/
|
|
@@ -4205,6 +4700,9 @@ declare class StCellComponent implements OnInit, OnDestroy, AfterViewInit {
|
|
|
4205
4700
|
rowData: any;
|
|
4206
4701
|
rowIndex: number | undefined;
|
|
4207
4702
|
} | null>;
|
|
4703
|
+
/** Boolean column: show `nile-checkbox` in display mode instead of Yes/No text */
|
|
4704
|
+
readonly showBooleanCheckboxDisplay: _angular_core.Signal<boolean>;
|
|
4705
|
+
readonly booleanCheckboxChecked: _angular_core.Signal<boolean>;
|
|
4208
4706
|
ngOnInit(): void;
|
|
4209
4707
|
ngAfterViewInit(): void;
|
|
4210
4708
|
ngOnDestroy(): void;
|
|
@@ -4215,6 +4713,7 @@ declare class StCellComponent implements OnInit, OnDestroy, AfterViewInit {
|
|
|
4215
4713
|
private startEditWithKey;
|
|
4216
4714
|
onCellClick(): void;
|
|
4217
4715
|
onCellDoubleClick(): void;
|
|
4716
|
+
onBooleanCheckboxDisplayChange(event: Event): void;
|
|
4218
4717
|
private startEdit;
|
|
4219
4718
|
private renderEditor;
|
|
4220
4719
|
private saveEdit;
|
|
@@ -4314,6 +4813,7 @@ declare class VirtualScrollService {
|
|
|
4314
4813
|
|
|
4315
4814
|
declare class StTableComponent implements OnInit, OnChanges, OnDestroy, AfterViewInit {
|
|
4316
4815
|
private destroyRef;
|
|
4816
|
+
private injector;
|
|
4317
4817
|
private schemaValidator;
|
|
4318
4818
|
private logger;
|
|
4319
4819
|
private virtualScrollService;
|
|
@@ -4341,6 +4841,7 @@ declare class StTableComponent implements OnInit, OnChanges, OnDestroy, AfterVie
|
|
|
4341
4841
|
readonly requestAddRow: _angular_core.OutputEmitterRef<{
|
|
4342
4842
|
focusColumn?: number;
|
|
4343
4843
|
}>;
|
|
4844
|
+
readonly requestFocusTabs: _angular_core.OutputEmitterRef<void>;
|
|
4344
4845
|
readonly mergedConfig: _angular_core.WritableSignal<TableConfig | null>;
|
|
4345
4846
|
readonly visibleColumns: _angular_core.WritableSignal<ColumnConfig<any>[]>;
|
|
4346
4847
|
readonly visibleCellGrid: _angular_core.WritableSignal<Cell<any>[][]>;
|
|
@@ -4353,6 +4854,7 @@ declare class StTableComponent implements OnInit, OnChanges, OnDestroy, AfterVie
|
|
|
4353
4854
|
triggerTop?: number;
|
|
4354
4855
|
}>;
|
|
4355
4856
|
readonly dropdownContext: _angular_core.WritableSignal<RowActionContext | null>;
|
|
4857
|
+
private dropdownTriggerEl;
|
|
4356
4858
|
readonly columnMenuIsOpen: _angular_core.WritableSignal<boolean>;
|
|
4357
4859
|
readonly columnMenuPosition: _angular_core.WritableSignal<{
|
|
4358
4860
|
x: number;
|
|
@@ -4383,12 +4885,12 @@ declare class StTableComponent implements OnInit, OnChanges, OnDestroy, AfterVie
|
|
|
4383
4885
|
};
|
|
4384
4886
|
context: ColumnActionContext | null;
|
|
4385
4887
|
}>;
|
|
4888
|
+
skeletonColumns?: number[];
|
|
4889
|
+
skeletonRows?: number[];
|
|
4386
4890
|
readonly virtualScrollTotalHeight$: BehaviorSubject<number>;
|
|
4387
4891
|
readonly virtualScrollOffsetY$: BehaviorSubject<number>;
|
|
4388
4892
|
readonly virtualScrollOffsetYNeg$: BehaviorSubject<number>;
|
|
4389
4893
|
readonly visibleRows$: BehaviorSubject<Cell<any>[][]>;
|
|
4390
|
-
skeletonColumns?: number[];
|
|
4391
|
-
skeletonRows?: number[];
|
|
4392
4894
|
private internalTableState?;
|
|
4393
4895
|
private internalCellGrid?;
|
|
4394
4896
|
private stateSubscription?;
|
|
@@ -4401,6 +4903,12 @@ declare class StTableComponent implements OnInit, OnChanges, OnDestroy, AfterVie
|
|
|
4401
4903
|
private scrollContainer?;
|
|
4402
4904
|
private scrollSubscription?;
|
|
4403
4905
|
scrollViewport?: ElementRef<HTMLElement>;
|
|
4906
|
+
/** Pixel height for `.st-table` when `display.visibleBodyRows` is set (measured from DOM). */
|
|
4907
|
+
private readonly scrollViewportHeightPx;
|
|
4908
|
+
private viewportMeasureRaf;
|
|
4909
|
+
private tableResizeObserver;
|
|
4910
|
+
private observedTableElement;
|
|
4911
|
+
private readonly fallbackBodyRowPx;
|
|
4404
4912
|
constructor();
|
|
4405
4913
|
ngOnInit(): void;
|
|
4406
4914
|
ngAfterViewInit(): void;
|
|
@@ -4454,8 +4962,18 @@ declare class StTableComponent implements OnInit, OnChanges, OnDestroy, AfterVie
|
|
|
4454
4962
|
getRowActions(): RowAction[];
|
|
4455
4963
|
getRowData(rowIndex: number): any;
|
|
4456
4964
|
openRowActionsDropdown(event: MouseEvent, rowData: any, rowIndex: number): void;
|
|
4457
|
-
closeRowActionsDropdown(): void;
|
|
4965
|
+
closeRowActionsDropdown(returnFocus?: boolean): void;
|
|
4966
|
+
/** Tab pressed inside the row-actions dropdown: close + exit the table. */
|
|
4967
|
+
onDropdownTabbed(payload: {
|
|
4968
|
+
shift: boolean;
|
|
4969
|
+
}): void;
|
|
4458
4970
|
onRowActionClicked(event: RowActionEvent): void;
|
|
4971
|
+
onSettingsTriggerKeydown(event: KeyboardEvent, rowData: any, rowIndex: number): void;
|
|
4972
|
+
/** Move focus to the first focusable element after the table host. */
|
|
4973
|
+
private focusNextOutsideTable;
|
|
4974
|
+
/** Move focus to the last focusable element before the table host. */
|
|
4975
|
+
private focusPrevOutsideTable;
|
|
4976
|
+
openColumnMenuFromKeyboard(columnIndex: number, isFirst: boolean, isLast: boolean): void;
|
|
4459
4977
|
openColumnMenu(event: MouseEvent, column: ColumnConfig<any>, columnIndex: number, isFirst: boolean, isLast: boolean): void;
|
|
4460
4978
|
closeColumnMenu(): void;
|
|
4461
4979
|
onColumnActionClicked(event: ColumnActionEvent): void;
|
|
@@ -4470,6 +4988,67 @@ declare class StTableComponent implements OnInit, OnChanges, OnDestroy, AfterVie
|
|
|
4470
4988
|
scrollToLastRow(focusFirstCell?: boolean): void;
|
|
4471
4989
|
private getScrollContainerElement;
|
|
4472
4990
|
private calculateStickyWidths;
|
|
4991
|
+
/**
|
|
4992
|
+
* Resolved CSS color from `display.rowBackground` for this row index, if any.
|
|
4993
|
+
*/
|
|
4994
|
+
resolveRowBackground(rowIndex: number): string | undefined;
|
|
4995
|
+
/**
|
|
4996
|
+
* Pixel width of the row-number column. Honors `display.rowNumberWidth` when
|
|
4997
|
+
* set, else defaults to 60 when an icon function is configured (room for
|
|
4998
|
+
* triple-digit + icon), else 30 (matches the historical narrow gutter).
|
|
4999
|
+
* `table-layout: fixed` makes this width authoritative for the column.
|
|
5000
|
+
*/
|
|
5001
|
+
get rowNumberColumnWidth(): number;
|
|
5002
|
+
/**
|
|
5003
|
+
* True when `display.rowNumberIcon` is configured. Toggles the
|
|
5004
|
+
* `--with-icon` CSS modifier on the row-number cells, switching the layout
|
|
5005
|
+
* from "centered single number" to "right-aligned slot + trailing icon" so
|
|
5006
|
+
* the icon's x position stays stable across digit counts.
|
|
5007
|
+
*/
|
|
5008
|
+
get hasRowNumberIcon(): boolean;
|
|
5009
|
+
/**
|
|
5010
|
+
* Resolved row-number icon descriptor for this row, or `null` if the row has none.
|
|
5011
|
+
* Supports both shorthand (`'iconName'`) and object (`{ name, tooltip }`) return values
|
|
5012
|
+
* from `display.rowNumberIcon`.
|
|
5013
|
+
*/
|
|
5014
|
+
resolveRowNumberIcon(rowIndex: number): {
|
|
5015
|
+
name: string;
|
|
5016
|
+
tooltip?: string;
|
|
5017
|
+
} | null;
|
|
5018
|
+
/**
|
|
5019
|
+
* Body cell background: `rowBackground` wins when set; otherwise sticky / full-row tint via `stickyColumnBackground`.
|
|
5020
|
+
*/
|
|
5021
|
+
bodyCellBackground(column: ColumnConfig | undefined, rowIndex: number): string | undefined;
|
|
5022
|
+
/**
|
|
5023
|
+
* Row-number cell background: conditional row color, else table sticky row-number tint.
|
|
5024
|
+
*/
|
|
5025
|
+
rowNumberCellBackground(rowIndex: number): string | undefined;
|
|
5026
|
+
/**
|
|
5027
|
+
* Trailing settings / row-actions body cell background.
|
|
5028
|
+
*/
|
|
5029
|
+
settingsColumnBodyBackground(rowIndex: number): string | undefined;
|
|
5030
|
+
/**
|
|
5031
|
+
* Cell background from sticky styling: per-column `stickyBackground`, else `display.stickyColumnBackground`.
|
|
5032
|
+
* When `display.stickyColumnBackgroundFullRow` is true, applies to every data cell (not only sticky columns).
|
|
5033
|
+
*/
|
|
5034
|
+
stickyColumnBackground(column: ColumnConfig | undefined): string | undefined;
|
|
5035
|
+
/** Row # column is sticky-left; uses table-level `display.stickyColumnBackground` only. */
|
|
5036
|
+
rowNumberStickyBackground(): string | undefined;
|
|
5037
|
+
/** Positive row counts only (caller must ensure `raw > 0`). */
|
|
5038
|
+
private clampPositiveVisibleBodyRows;
|
|
5039
|
+
private fallbackViewportPxForRowCount;
|
|
5040
|
+
/** Effective body rows for viewport math: never more than rows actually rendered. */
|
|
5041
|
+
private effectiveVisibleBodyRows;
|
|
5042
|
+
private scheduleScrollViewportMeasure;
|
|
5043
|
+
/**
|
|
5044
|
+
* Sets `scrollViewportHeightPx` from measured thead/tbody row heights so `visibleBodyRows` maps to real pixels.
|
|
5045
|
+
*/
|
|
5046
|
+
private updateScrollViewportMeasurement;
|
|
5047
|
+
private ensureTableResizeObserver;
|
|
5048
|
+
private detachTableResizeObserver;
|
|
5049
|
+
/** Host styles: max-height plus CSS variables for keyboard-focused cell (see `display.focusedCell`). */
|
|
5050
|
+
tableWrapperStyle(): Record<string, string | number | null>;
|
|
5051
|
+
getColumnAriaSort(column: ColumnConfig<any>): string | null;
|
|
4473
5052
|
onCellClick(rowIndex: number, columnIndex: number): void;
|
|
4474
5053
|
onCellEdit(event: CellEditEvent): void;
|
|
4475
5054
|
onCellSave(event: CellSaveEvent): void;
|
|
@@ -4478,13 +5057,24 @@ declare class StTableComponent implements OnInit, OnChanges, OnDestroy, AfterVie
|
|
|
4478
5057
|
event: KeyboardEvent;
|
|
4479
5058
|
direction: NavigationDirection;
|
|
4480
5059
|
}): void;
|
|
5060
|
+
onHeaderTabOut(): void;
|
|
5061
|
+
/** Get the column-action button at a given column index, if it exists. */
|
|
5062
|
+
private getHeaderMenuButton;
|
|
5063
|
+
/**
|
|
5064
|
+
* Focus the column-action button at colIndex, or — if that column has no
|
|
5065
|
+
* action button — the nearest column to its right (then left) that does.
|
|
5066
|
+
*/
|
|
5067
|
+
private focusHeader;
|
|
5068
|
+
/** Focus the next/previous column-action button after colIndex, skipping columns without actions. */
|
|
5069
|
+
private focusAdjacentHeader;
|
|
5070
|
+
onHeaderNavigate(direction: 'left' | 'right' | 'up' | 'down', colIndex: number): void;
|
|
4481
5071
|
onTableContainerFocus(event: FocusEvent): void;
|
|
4482
5072
|
isKeyboardNavigationEnabled(): boolean;
|
|
4483
5073
|
getEditModeForCells(): EditMode;
|
|
4484
5074
|
onDocumentClick(event: MouseEvent): void;
|
|
4485
5075
|
ngOnDestroy(): void;
|
|
4486
5076
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StTableComponent, never>;
|
|
4487
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StTableComponent, "st-table", never, { "tableConfig": { "alias": "tableConfig"; "required": true; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "data$": { "alias": "data$"; "required": false; "isSignal": true; }; "tableState": { "alias": "tableState"; "required": false; "isSignal": true; }; "enableSorting": { "alias": "enableSorting"; "required": false; "isSignal": true; }; "enableFiltering": { "alias": "enableFiltering"; "required": false; "isSignal": true; }; "validateConfig": { "alias": "validateConfig"; "required": false; "isSignal": true; }; }, { "stateChange": "stateChange"; "dataChange": "dataChange"; "cellEdit": "cellEdit"; "cellSave": "cellSave"; "cellCancel": "cellCancel"; "cellChange": "cellChange"; "columnResized": "columnResized"; "columnMoved": "columnMoved"; "configValidationErrors": "configValidationErrors"; "columnAdded": "columnAdded"; "rowAction": "rowAction"; "validationStateChange": "validationStateChange"; "requestAddRow": "requestAddRow"; }, never, never, true, never>;
|
|
5077
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StTableComponent, "st-table", never, { "tableConfig": { "alias": "tableConfig"; "required": true; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "data$": { "alias": "data$"; "required": false; "isSignal": true; }; "tableState": { "alias": "tableState"; "required": false; "isSignal": true; }; "enableSorting": { "alias": "enableSorting"; "required": false; "isSignal": true; }; "enableFiltering": { "alias": "enableFiltering"; "required": false; "isSignal": true; }; "validateConfig": { "alias": "validateConfig"; "required": false; "isSignal": true; }; }, { "stateChange": "stateChange"; "dataChange": "dataChange"; "cellEdit": "cellEdit"; "cellSave": "cellSave"; "cellCancel": "cellCancel"; "cellChange": "cellChange"; "columnResized": "columnResized"; "columnMoved": "columnMoved"; "configValidationErrors": "configValidationErrors"; "columnAdded": "columnAdded"; "rowAction": "rowAction"; "validationStateChange": "validationStateChange"; "requestAddRow": "requestAddRow"; "requestFocusTabs": "requestFocusTabs"; }, never, never, true, never>;
|
|
4488
5078
|
}
|
|
4489
5079
|
|
|
4490
5080
|
/**
|
|
@@ -4537,10 +5127,26 @@ declare class StHeaderComponent implements OnDestroy {
|
|
|
4537
5127
|
* Emits when column menu button is clicked
|
|
4538
5128
|
*/
|
|
4539
5129
|
menuClick: EventEmitter<MouseEvent>;
|
|
5130
|
+
/**
|
|
5131
|
+
* Emits when Tab is pressed on the header cell itself (not on child elements),
|
|
5132
|
+
* signalling the table should receive focus next.
|
|
5133
|
+
*/
|
|
5134
|
+
tabOut: EventEmitter<void>;
|
|
5135
|
+
/** Emits ArrowLeft / ArrowRight / ArrowUp / ArrowDown pressed on the header itself. */
|
|
5136
|
+
headerNavigate: EventEmitter<"left" | "right" | "up" | "down">;
|
|
5137
|
+
/** Emits when Space is pressed on the header to open the column menu via keyboard. */
|
|
5138
|
+
menuKeyboard: EventEmitter<void>;
|
|
4540
5139
|
/**
|
|
4541
5140
|
* Cleanup on destroy
|
|
4542
5141
|
*/
|
|
4543
5142
|
ngOnDestroy(): void;
|
|
5143
|
+
/**
|
|
5144
|
+
* Tab pressed directly on the header div (not bubbled from a child):
|
|
5145
|
+
* forward focus to the table body so the flow is sheet-tab → header → cells.
|
|
5146
|
+
*/
|
|
5147
|
+
onHeaderKeyDown(event: KeyboardEvent): void;
|
|
5148
|
+
/** Arrow key navigation from the column-menu-trigger button — mirrors header nav. */
|
|
5149
|
+
onMenuTriggerKeyDown(event: KeyboardEvent): void;
|
|
4544
5150
|
/**
|
|
4545
5151
|
* Handle column menu button click
|
|
4546
5152
|
*/
|
|
@@ -4574,7 +5180,7 @@ declare class StHeaderComponent implements OnDestroy {
|
|
|
4574
5180
|
*/
|
|
4575
5181
|
onMoveRight(): void;
|
|
4576
5182
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StHeaderComponent, never>;
|
|
4577
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StHeaderComponent, "st-header", never, { "column": { "alias": "column"; "required": false; }; "columnIndex": { "alias": "columnIndex"; "required": false; }; "isFirstColumn": { "alias": "isFirstColumn"; "required": false; }; "isLastColumn": { "alias": "isLastColumn"; "required": false; }; "tableState": { "alias": "tableState"; "required": false; }; "enableSorting": { "alias": "enableSorting"; "required": false; }; "enableFiltering": { "alias": "enableFiltering"; "required": false; }; }, { "sortToggle": "sortToggle"; "filterChange": "filterChange"; "columnMoved": "columnMoved"; "menuClick": "menuClick"; }, never, never, true, never>;
|
|
5183
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StHeaderComponent, "st-header", never, { "column": { "alias": "column"; "required": false; }; "columnIndex": { "alias": "columnIndex"; "required": false; }; "isFirstColumn": { "alias": "isFirstColumn"; "required": false; }; "isLastColumn": { "alias": "isLastColumn"; "required": false; }; "tableState": { "alias": "tableState"; "required": false; }; "enableSorting": { "alias": "enableSorting"; "required": false; }; "enableFiltering": { "alias": "enableFiltering"; "required": false; }; }, { "sortToggle": "sortToggle"; "filterChange": "filterChange"; "columnMoved": "columnMoved"; "menuClick": "menuClick"; "tabOut": "tabOut"; "headerNavigate": "headerNavigate"; "menuKeyboard": "menuKeyboard"; }, never, never, true, never>;
|
|
4578
5184
|
}
|
|
4579
5185
|
|
|
4580
5186
|
/**
|
|
@@ -4778,6 +5384,7 @@ declare class StColumnMenuDropdownComponent implements OnChanges {
|
|
|
4778
5384
|
* Close dropdown when clicking backdrop
|
|
4779
5385
|
*/
|
|
4780
5386
|
onBackdropClick(event: MouseEvent): void;
|
|
5387
|
+
onKeydown(event: KeyboardEvent): void;
|
|
4781
5388
|
onFilterClosed(): void;
|
|
4782
5389
|
onFilterApplied(event: {
|
|
4783
5390
|
operator: any;
|
|
@@ -5081,6 +5688,14 @@ declare class StRowActionsDropdownComponent implements OnChanges {
|
|
|
5081
5688
|
* Emitted when the dropdown should close
|
|
5082
5689
|
*/
|
|
5083
5690
|
closed: EventEmitter<void>;
|
|
5691
|
+
/**
|
|
5692
|
+
* Emitted when Tab / Shift+Tab is pressed while the dropdown is open.
|
|
5693
|
+
* The parent should close the dropdown WITHOUT returning focus to the trigger
|
|
5694
|
+
* and instead move focus to the next/previous element outside the table.
|
|
5695
|
+
*/
|
|
5696
|
+
tabbed: EventEmitter<{
|
|
5697
|
+
shift: boolean;
|
|
5698
|
+
}>;
|
|
5084
5699
|
dropdownPanel?: ElementRef<HTMLElement>;
|
|
5085
5700
|
/**
|
|
5086
5701
|
* Visible actions (filtered by hidden property)
|
|
@@ -5115,12 +5730,22 @@ declare class StRowActionsDropdownComponent implements OnChanges {
|
|
|
5115
5730
|
* Handle ESC key press
|
|
5116
5731
|
*/
|
|
5117
5732
|
onEscapeKey(event: Event): void;
|
|
5733
|
+
/**
|
|
5734
|
+
* Space closes the dropdown (focus is on a menu item after open, so the trigger
|
|
5735
|
+
* button's keydown never fires — handle it here at the document level instead).
|
|
5736
|
+
*/
|
|
5737
|
+
onSpaceKey(event: Event): void;
|
|
5738
|
+
/**
|
|
5739
|
+
* Tab / Shift+Tab: close the dropdown AND tell the parent to move focus
|
|
5740
|
+
* outside the table (skipping subsequent rows' settings buttons).
|
|
5741
|
+
*/
|
|
5742
|
+
onTabKey(event: Event): void;
|
|
5118
5743
|
/**
|
|
5119
5744
|
* Prevent dropdown click from closing
|
|
5120
5745
|
*/
|
|
5121
5746
|
onDropdownClick(event: Event): void;
|
|
5122
5747
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StRowActionsDropdownComponent, never>;
|
|
5123
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StRowActionsDropdownComponent, "st-row-actions-dropdown", never, { "isOpen": { "alias": "isOpen"; "required": false; }; "position": { "alias": "position"; "required": false; }; "context": { "alias": "context"; "required": false; }; }, { "actionClicked": "actionClicked"; "closed": "closed"; }, never, never, true, never>;
|
|
5748
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StRowActionsDropdownComponent, "st-row-actions-dropdown", never, { "isOpen": { "alias": "isOpen"; "required": false; }; "position": { "alias": "position"; "required": false; }; "context": { "alias": "context"; "required": false; }; }, { "actionClicked": "actionClicked"; "closed": "closed"; "tabbed": "tabbed"; }, never, never, true, never>;
|
|
5124
5749
|
}
|
|
5125
5750
|
|
|
5126
5751
|
declare class StSheetComponent implements OnInit, OnChanges {
|
|
@@ -5161,6 +5786,14 @@ declare class StSheetComponent implements OnInit, OnChanges {
|
|
|
5161
5786
|
* Emitted when data changes (via Observable)
|
|
5162
5787
|
*/
|
|
5163
5788
|
dataChange: EventEmitter<DataChangeEvent>;
|
|
5789
|
+
/**
|
|
5790
|
+
* Emitted when the condition-builder value changes (only when contentType is 'condition-builder').
|
|
5791
|
+
*/
|
|
5792
|
+
conditionBuilderValueChange: EventEmitter<ConditionBuilderValue>;
|
|
5793
|
+
/**
|
|
5794
|
+
* Emitted when the condition-builder validity changes (only when contentType is 'condition-builder').
|
|
5795
|
+
*/
|
|
5796
|
+
conditionBuilderValidityChange: EventEmitter<ConditionBuilderValidity>;
|
|
5164
5797
|
/**
|
|
5165
5798
|
* Internal state instance
|
|
5166
5799
|
*/
|
|
@@ -5174,9 +5807,14 @@ declare class StSheetComponent implements OnInit, OnChanges {
|
|
|
5174
5807
|
ngOnInit(): void;
|
|
5175
5808
|
ngOnChanges(changes: SimpleChanges): void;
|
|
5176
5809
|
/**
|
|
5177
|
-
* Initialize sheet state
|
|
5810
|
+
* Initialize sheet state. Only table-typed sheets need SheetState — condition-builder
|
|
5811
|
+
* sheets don't have pagination/columns, so we skip state creation for them.
|
|
5178
5812
|
*/
|
|
5179
5813
|
private initializeState;
|
|
5814
|
+
/** Resolved content type — defaults to 'table' when unset. */
|
|
5815
|
+
get contentType(): 'table' | 'condition-builder';
|
|
5816
|
+
onConditionBuilderValueChange(value: ConditionBuilderValue): void;
|
|
5817
|
+
onConditionBuilderValidityChange(validity: ConditionBuilderValidity): void;
|
|
5180
5818
|
/**
|
|
5181
5819
|
* Get active state (external or internal)
|
|
5182
5820
|
*/
|
|
@@ -5210,7 +5848,7 @@ declare class StSheetComponent implements OnInit, OnChanges {
|
|
|
5210
5848
|
*/
|
|
5211
5849
|
get headerVariant(): string;
|
|
5212
5850
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StSheetComponent, never>;
|
|
5213
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StSheetComponent, "st-sheet", never, { "config": { "alias": "config"; "required": false; }; "data": { "alias": "data"; "required": false; }; "data$": { "alias": "data$"; "required": false; }; "state": { "alias": "state"; "required": false; }; }, { "sheetActionClicked": "sheetActionClicked"; "stateChange": "stateChange"; "cellChange": "cellChange"; "tableStateChange": "tableStateChange"; "dataChange": "dataChange"; }, never, never, true, never>;
|
|
5851
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StSheetComponent, "st-sheet", never, { "config": { "alias": "config"; "required": false; }; "data": { "alias": "data"; "required": false; }; "data$": { "alias": "data$"; "required": false; }; "state": { "alias": "state"; "required": false; }; }, { "sheetActionClicked": "sheetActionClicked"; "stateChange": "stateChange"; "cellChange": "cellChange"; "tableStateChange": "tableStateChange"; "dataChange": "dataChange"; "conditionBuilderValueChange": "conditionBuilderValueChange"; "conditionBuilderValidityChange": "conditionBuilderValidityChange"; }, never, never, true, never>;
|
|
5214
5852
|
}
|
|
5215
5853
|
|
|
5216
5854
|
declare class StSheetActionsComponent {
|
|
@@ -5273,6 +5911,7 @@ declare class StWorkbookComponent implements OnInit, OnChanges, OnDestroy {
|
|
|
5273
5911
|
private destroyRef;
|
|
5274
5912
|
private autosaveService;
|
|
5275
5913
|
private cdr;
|
|
5914
|
+
private injector;
|
|
5276
5915
|
readonly config: _angular_core.InputSignal<WorkbookConfig>;
|
|
5277
5916
|
readonly sheetsData: _angular_core.InputSignal<BehaviorSubject<Map<string, any[]>>>;
|
|
5278
5917
|
readonly state: _angular_core.InputSignal<WorkbookState | undefined>;
|
|
@@ -5288,7 +5927,16 @@ declare class StWorkbookComponent implements OnInit, OnChanges, OnDestroy {
|
|
|
5288
5927
|
sheetId: string;
|
|
5289
5928
|
focusColumn?: number;
|
|
5290
5929
|
}>;
|
|
5930
|
+
readonly conditionBuilderValueChange: _angular_core.OutputEmitterRef<{
|
|
5931
|
+
sheetId: string;
|
|
5932
|
+
value: ConditionBuilderValue;
|
|
5933
|
+
}>;
|
|
5934
|
+
readonly conditionBuilderValidityChange: _angular_core.OutputEmitterRef<{
|
|
5935
|
+
sheetId: string;
|
|
5936
|
+
validity: ConditionBuilderValidity;
|
|
5937
|
+
}>;
|
|
5291
5938
|
tableComponent?: StTableComponent;
|
|
5939
|
+
workbookTabGroup?: ElementRef<HTMLElement>;
|
|
5292
5940
|
readonly sheets: _angular_core.WritableSignal<WorkbookSheetConfig[]>;
|
|
5293
5941
|
readonly activeSheetIndex: _angular_core.WritableSignal<number>;
|
|
5294
5942
|
readonly currentTableConfig: _angular_core.WritableSignal<TableConfig | null>;
|
|
@@ -5300,11 +5948,18 @@ declare class StWorkbookComponent implements OnInit, OnChanges, OnDestroy {
|
|
|
5300
5948
|
readonly selectedSheet: _angular_core.WritableSignal<WorkbookSheetConfig | null>;
|
|
5301
5949
|
readonly selectedSheetIndex: _angular_core.WritableSignal<number>;
|
|
5302
5950
|
readonly tabActionsPosition: _angular_core.WritableSignal<any>;
|
|
5951
|
+
/**
|
|
5952
|
+
* The sheet currently rendered in the workbook panel. Derived from sheets +
|
|
5953
|
+
* activeSheetIndex so it stays stable even while the tab-actions dropdown
|
|
5954
|
+
* is opening/closing (which mutates `selectedSheet`).
|
|
5955
|
+
*/
|
|
5956
|
+
readonly activeSheet: _angular_core.Signal<WorkbookSheetConfig | null>;
|
|
5303
5957
|
readonly workbookActionsOpen: _angular_core.WritableSignal<boolean>;
|
|
5304
5958
|
readonly workbookActionsPosition: _angular_core.WritableSignal<any>;
|
|
5305
5959
|
readonly visibleWorkbookActions: _angular_core.WritableSignal<WorkbookAction[]>;
|
|
5306
5960
|
readonly toolbarWorkbookActions: _angular_core.WritableSignal<WorkbookAction[]>;
|
|
5307
5961
|
readonly autosaveEnabled: _angular_core.WritableSignal<boolean>;
|
|
5962
|
+
readonly autosaveIndicatorVisible: _angular_core.WritableSignal<boolean>;
|
|
5308
5963
|
readonly lastSaveTime: _angular_core.WritableSignal<Date | null>;
|
|
5309
5964
|
readonly isSaving: _angular_core.WritableSignal<boolean>;
|
|
5310
5965
|
readonly isFullscreen$: BehaviorSubject<boolean>;
|
|
@@ -5312,13 +5967,39 @@ declare class StWorkbookComponent implements OnInit, OnChanges, OnDestroy {
|
|
|
5312
5967
|
private internalState?;
|
|
5313
5968
|
private autosaveStrategy;
|
|
5314
5969
|
private beforeUnloadHandler;
|
|
5970
|
+
/** Sheet ID rendered in the last updateActiveSheet — used to skip key bumps that would otherwise re-mount the content on every config update. */
|
|
5971
|
+
private lastRenderedSheetId;
|
|
5315
5972
|
constructor();
|
|
5316
5973
|
ngOnInit(): void;
|
|
5317
5974
|
ngOnChanges(changes: SimpleChanges): void;
|
|
5318
5975
|
private initializeComponent;
|
|
5319
5976
|
get activeState(): WorkbookState;
|
|
5320
5977
|
onTabChange(event: any): void;
|
|
5978
|
+
onSheetTabKeydown(event: KeyboardEvent, index: number): void;
|
|
5979
|
+
private openTabActionsForFocusedTab;
|
|
5980
|
+
private lockBodyScroll;
|
|
5981
|
+
private unlockBodyScroll;
|
|
5982
|
+
onTabActionsKeydown(event: KeyboardEvent): void;
|
|
5983
|
+
private focusToolbar;
|
|
5984
|
+
onToolbarKeydown(event: KeyboardEvent): void;
|
|
5985
|
+
private focusSheetTab;
|
|
5986
|
+
private focusTablePanel;
|
|
5321
5987
|
private updateActiveSheet;
|
|
5988
|
+
/** Content type of the currently-active sheet. Defaults to 'table'. */
|
|
5989
|
+
get activeSheetContentType(): 'table' | 'condition-builder';
|
|
5990
|
+
onConditionBuilderValueChange(value: ConditionBuilderValue): void;
|
|
5991
|
+
onConditionBuilderValidityChange(validity: ConditionBuilderValidity): void;
|
|
5992
|
+
/**
|
|
5993
|
+
* After a new sheet is appended, scroll the tab strip so the new tab clears the sticky toolbar overlay
|
|
5994
|
+
* and move keyboard focus to that tab.
|
|
5995
|
+
*/
|
|
5996
|
+
private scheduleScrollAndFocusNewSheetTab;
|
|
5997
|
+
/**
|
|
5998
|
+
* Scroll the active sheet tab into the visible part of the nav (left of the sticky toolbar).
|
|
5999
|
+
* No extra flex margin — avoids a permanent gap between the last sheet tab and the toolbar.
|
|
6000
|
+
*/
|
|
6001
|
+
private queueScrollActiveSheetTabClearOfToolbar;
|
|
6002
|
+
private scrollSheetTabIntoNav;
|
|
5322
6003
|
onAddSheet(): void;
|
|
5323
6004
|
trackByKey(index: number, key: string): string;
|
|
5324
6005
|
get canAddSheet(): boolean;
|
|
@@ -5329,16 +6010,23 @@ declare class StWorkbookComponent implements OnInit, OnChanges, OnDestroy {
|
|
|
5329
6010
|
onTabActionClick(action: any, event: Event): void;
|
|
5330
6011
|
toggleWorkbookActions(event: MouseEvent): void;
|
|
5331
6012
|
closeWorkbookActions(): void;
|
|
6013
|
+
onWorkbookActionsKeydown(event: KeyboardEvent): void;
|
|
5332
6014
|
private updateVisibleWorkbookActions;
|
|
5333
6015
|
isActionDisabled(action: WorkbookAction): boolean;
|
|
5334
6016
|
onWorkbookActionClick(action: WorkbookAction, event: Event): void;
|
|
5335
6017
|
toggleFullscreen(): void;
|
|
6018
|
+
/**
|
|
6019
|
+
* Keeps `sheetsData` in sync with the grid: patches `row[columnKey]` from the cell event then `next()`s the map.
|
|
6020
|
+
* Initial rows still come from the host (e.g. demo `loadSheetsData`); edits persist here in memory.
|
|
6021
|
+
*/
|
|
5336
6022
|
onCellChange(event: CellChangeEvent): void;
|
|
6023
|
+
/** Same row patch as {@link onCellChange}; host apps receive this output after data is updated. */
|
|
5337
6024
|
onCellSave(event: any): void;
|
|
5338
6025
|
onTableStateChange(event: TableStateChangeEvent): void;
|
|
5339
6026
|
onRequestAddRow(event: {
|
|
5340
6027
|
focusColumn?: number;
|
|
5341
6028
|
}): void;
|
|
6029
|
+
onRequestFocusTabs(): void;
|
|
5342
6030
|
ngOnDestroy(): void;
|
|
5343
6031
|
private initializeAutosave;
|
|
5344
6032
|
private performAutosave;
|
|
@@ -5347,7 +6035,370 @@ declare class StWorkbookComponent implements OnInit, OnChanges, OnDestroy {
|
|
|
5347
6035
|
scrollToRow(rowIndex: number, focusFirstCell?: boolean): void;
|
|
5348
6036
|
scrollToLastRow(focusFirstCell?: boolean): void;
|
|
5349
6037
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StWorkbookComponent, never>;
|
|
5350
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StWorkbookComponent, "st-workbook", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; "sheetsData": { "alias": "sheetsData"; "required": false; "isSignal": true; }; "state": { "alias": "state"; "required": false; "isSignal": true; }; }, { "sheetChanged": "sheetChanged"; "addSheet": "addSheet"; "sheetTabAction": "sheetTabAction"; "workbookAction": "workbookAction"; "cellChange": "cellChange"; "cellSave": "cellSave"; "tableStateChange": "tableStateChange"; "fullscreenToggle": "fullscreenToggle"; "requestAddRow": "requestAddRow"; }, never, never, true, never>;
|
|
6038
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StWorkbookComponent, "st-workbook", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; "sheetsData": { "alias": "sheetsData"; "required": false; "isSignal": true; }; "state": { "alias": "state"; "required": false; "isSignal": true; }; }, { "sheetChanged": "sheetChanged"; "addSheet": "addSheet"; "sheetTabAction": "sheetTabAction"; "workbookAction": "workbookAction"; "cellChange": "cellChange"; "cellSave": "cellSave"; "tableStateChange": "tableStateChange"; "fullscreenToggle": "fullscreenToggle"; "requestAddRow": "requestAddRow"; "conditionBuilderValueChange": "conditionBuilderValueChange"; "conditionBuilderValidityChange": "conditionBuilderValidityChange"; }, never, never, true, never>;
|
|
6039
|
+
}
|
|
6040
|
+
|
|
6041
|
+
/**
|
|
6042
|
+
* Root condition builder. Renders either:
|
|
6043
|
+
* - the GUI condition list (single conditions + groups), or
|
|
6044
|
+
* - a raw expression code editor,
|
|
6045
|
+
* depending on `value.mode`. The mode toggle itself is surfaced at the sheet
|
|
6046
|
+
* level via SheetAction; consumers flip `value.mode` and the builder reacts.
|
|
6047
|
+
*
|
|
6048
|
+
* Owns the editable copy of the tree and emits the full ConditionBuilderValue
|
|
6049
|
+
* on every change. Persistence is the consumer's concern.
|
|
6050
|
+
*/
|
|
6051
|
+
declare class StConditionBuilderComponent implements OnInit, OnChanges {
|
|
6052
|
+
private validator;
|
|
6053
|
+
private cdr;
|
|
6054
|
+
private host;
|
|
6055
|
+
private injector;
|
|
6056
|
+
config: ConditionBuilderConfig;
|
|
6057
|
+
value: ConditionBuilderValue;
|
|
6058
|
+
disabled: boolean;
|
|
6059
|
+
readonly valueChange: EventEmitter<ConditionBuilderValue>;
|
|
6060
|
+
readonly validityChange: EventEmitter<ConditionBuilderValidity>;
|
|
6061
|
+
/** Local editable copy of the value — the source of truth between input changes. */
|
|
6062
|
+
internalValue: ConditionBuilderValue;
|
|
6063
|
+
/** Latest validation summary, rendered into the aria-live region for SR users. */
|
|
6064
|
+
validityAnnouncement: string;
|
|
6065
|
+
/**
|
|
6066
|
+
* Flag set the moment we emit a valueChange. The parent typically feeds
|
|
6067
|
+
* the new value back through @Input (controlled-component pattern), which
|
|
6068
|
+
* triggers ngOnChanges → re-clone → re-render. That re-render destroys the
|
|
6069
|
+
* focused <nile-input> mid-typing. When this flag is true, ngOnChanges
|
|
6070
|
+
* recognises the inbound value as our own echo and skips the re-clone.
|
|
6071
|
+
*/
|
|
6072
|
+
private skipNextValueChange;
|
|
6073
|
+
get maxConditions(): number;
|
|
6074
|
+
get allowGroups(): boolean;
|
|
6075
|
+
get canAddCondition(): boolean;
|
|
6076
|
+
ngOnInit(): void;
|
|
6077
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
6078
|
+
trackByIndex(index: number): number;
|
|
6079
|
+
isSingle(node: ConditionNode): node is SingleCondition;
|
|
6080
|
+
isGroup(node: ConditionNode): node is GroupCondition;
|
|
6081
|
+
onSingleChange(index: number, next: SubCondition): void;
|
|
6082
|
+
onGroupChange(index: number, next: GroupCondition): void;
|
|
6083
|
+
onRemoveCondition(index: number): void;
|
|
6084
|
+
/**
|
|
6085
|
+
* Insert a fresh single condition directly below `index`. Triggered by the
|
|
6086
|
+
* hover "+" → Condition menu option on a top-level rule or group row.
|
|
6087
|
+
* Honours `maxConditions`.
|
|
6088
|
+
*/
|
|
6089
|
+
onInsertBelow(index: number): void;
|
|
6090
|
+
/**
|
|
6091
|
+
* Insert a fresh group directly below `index`. Triggered by the hover "+"
|
|
6092
|
+
* → Group menu option on a top-level rule or group row. Honours both
|
|
6093
|
+
* `maxConditions` and `allowGroups`.
|
|
6094
|
+
*/
|
|
6095
|
+
onInsertGroupBelow(index: number): void;
|
|
6096
|
+
/**
|
|
6097
|
+
* Wait for the next render pass, then move keyboard focus into the row at
|
|
6098
|
+
* `index`. Focus lands on the first interactive element of the row — the
|
|
6099
|
+
* field-picker chip trigger — so a screen-reader user is taken straight to
|
|
6100
|
+
* the new condition's editable state.
|
|
6101
|
+
*/
|
|
6102
|
+
private focusRowAfterRender;
|
|
6103
|
+
onAddCondition(): void;
|
|
6104
|
+
onAddGroup(): void;
|
|
6105
|
+
onExpressionInput(event: Event): void;
|
|
6106
|
+
get expressionLanguage(): 'javascript' | 'sql' | 'json' | 'html';
|
|
6107
|
+
/** Autocompletion tree forwarded to nile-code-editor — empty object when unset. */
|
|
6108
|
+
get expressionAutoCompletions(): Record<string, unknown>;
|
|
6109
|
+
/** Autocompletion paths forwarded to nile-code-editor — empty array when unset. */
|
|
6110
|
+
get expressionAutoCompletionPaths(): string[];
|
|
6111
|
+
/** Toggle between builder and expression mode. Triggered by the footer "Use advanced expression" link. */
|
|
6112
|
+
onToggleMode(): void;
|
|
6113
|
+
get isExpressionMode(): boolean;
|
|
6114
|
+
get expressionToggleLabel(): string;
|
|
6115
|
+
get allowExpressionMode(): boolean;
|
|
6116
|
+
private patchConditions;
|
|
6117
|
+
private emitValidity;
|
|
6118
|
+
/** Build an aria-label for a top-level node — read aloud when the row gains focus. */
|
|
6119
|
+
ariaLabelForNode(node: ConditionNode, index: number): string;
|
|
6120
|
+
private cloneValue;
|
|
6121
|
+
private cloneNode;
|
|
6122
|
+
private buildEmptySingle;
|
|
6123
|
+
private buildEmptyGroup;
|
|
6124
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StConditionBuilderComponent, never>;
|
|
6125
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StConditionBuilderComponent, "st-condition-builder", never, { "config": { "alias": "config"; "required": true; }; "value": { "alias": "value"; "required": true; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "valueChange": "valueChange"; "validityChange": "validityChange"; }, never, never, true, never>;
|
|
6126
|
+
}
|
|
6127
|
+
|
|
6128
|
+
/**
|
|
6129
|
+
* One group condition: a connector, a group-type selector (any/all of),
|
|
6130
|
+
* and a list of subConditions rendered via st-condition-rule.
|
|
6131
|
+
*
|
|
6132
|
+
* Groups do not nest further — this matches v1 (1-level nesting).
|
|
6133
|
+
*/
|
|
6134
|
+
declare class StConditionGroupComponent {
|
|
6135
|
+
group: GroupCondition;
|
|
6136
|
+
config: ConditionBuilderConfig;
|
|
6137
|
+
/** When true, hide the leading connector (first top-level condition). */
|
|
6138
|
+
isFirst: boolean;
|
|
6139
|
+
canRemove: boolean;
|
|
6140
|
+
disabled: boolean;
|
|
6141
|
+
readonly groupChange: EventEmitter<GroupCondition>;
|
|
6142
|
+
readonly remove: EventEmitter<void>;
|
|
6143
|
+
/** User asked to insert a fresh peer Condition directly below this group. */
|
|
6144
|
+
readonly insertBelow: EventEmitter<void>;
|
|
6145
|
+
/** User asked to insert a fresh peer Group directly below this group. */
|
|
6146
|
+
readonly insertGroupBelow: EventEmitter<void>;
|
|
6147
|
+
readonly connectorOptions: LogicalConnector[];
|
|
6148
|
+
readonly groupTypeOptions: GroupType[];
|
|
6149
|
+
groupTypeLabel(type: GroupType): string;
|
|
6150
|
+
trackBySubIndex(index: number): number;
|
|
6151
|
+
onConnectorChange(event: Event): void;
|
|
6152
|
+
onGroupTypeChange(event: Event): void;
|
|
6153
|
+
onSubConditionChange(index: number, next: SubCondition): void;
|
|
6154
|
+
onSubConditionRemove(index: number): void;
|
|
6155
|
+
onSubConditionInsertBelow(index: number): void;
|
|
6156
|
+
onAddSubCondition(): void;
|
|
6157
|
+
onRemoveGroup(): void;
|
|
6158
|
+
onInsertBelowGroup(): void;
|
|
6159
|
+
onAddMenuSelect(event: Event): void;
|
|
6160
|
+
private buildEmptySubCondition;
|
|
6161
|
+
private emit;
|
|
6162
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StConditionGroupComponent, never>;
|
|
6163
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StConditionGroupComponent, "st-condition-group", never, { "group": { "alias": "group"; "required": true; }; "config": { "alias": "config"; "required": true; }; "isFirst": { "alias": "isFirst"; "required": false; }; "canRemove": { "alias": "canRemove"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "groupChange": "groupChange"; "remove": "remove"; "insertBelow": "insertBelow"; "insertGroupBelow": "insertGroupBelow"; }, never, never, true, never>;
|
|
6164
|
+
}
|
|
6165
|
+
|
|
6166
|
+
/**
|
|
6167
|
+
* One condition row: connector · field · operator · value · delete.
|
|
6168
|
+
*
|
|
6169
|
+
* Works with the structural `SubCondition` shape (no `type: 'single'` discriminator)
|
|
6170
|
+
* so the same component renders both top-level single conditions and subConditions
|
|
6171
|
+
* inside a group. The parent container wraps/unwraps the discriminator.
|
|
6172
|
+
*/
|
|
6173
|
+
declare class StConditionRuleComponent {
|
|
6174
|
+
rule: SubCondition;
|
|
6175
|
+
config: ConditionBuilderConfig;
|
|
6176
|
+
/** When true, hide the connector picker — the first condition has no preceding peer. */
|
|
6177
|
+
isFirst: boolean;
|
|
6178
|
+
/** When false, hide the delete button (e.g. last remaining condition in a group). */
|
|
6179
|
+
canRemove: boolean;
|
|
6180
|
+
disabled: boolean;
|
|
6181
|
+
/**
|
|
6182
|
+
* When true, clicking the hover "+" opens a menu offering Condition or Group.
|
|
6183
|
+
* When false, clicking the hover "+" directly inserts a Condition (used for
|
|
6184
|
+
* sub-rules inside a group — v1's 1-level nesting forbids groups-in-groups).
|
|
6185
|
+
*/
|
|
6186
|
+
canInsertGroup: boolean;
|
|
6187
|
+
readonly ruleChange: EventEmitter<SubCondition>;
|
|
6188
|
+
readonly remove: EventEmitter<void>;
|
|
6189
|
+
/** User asked to insert a fresh peer Condition directly below this row. */
|
|
6190
|
+
readonly insertBelow: EventEmitter<void>;
|
|
6191
|
+
/** User asked to insert a fresh peer Group directly below this row. Only fired when `canInsertGroup` is true. */
|
|
6192
|
+
readonly insertGroupBelow: EventEmitter<void>;
|
|
6193
|
+
readonly connectorOptions: LogicalConnector[];
|
|
6194
|
+
/** Resolve the FieldDefinition for the currently selected attribute — looks across top-level fields and nested categories. */
|
|
6195
|
+
get field(): FieldDefinition | undefined;
|
|
6196
|
+
/** Resolve the OperatorDefinition for the currently selected operator. */
|
|
6197
|
+
get operator(): OperatorDefinition | undefined;
|
|
6198
|
+
/** Operators allowed for the current field (or all operators if field has no restriction). */
|
|
6199
|
+
get availableOperators(): OperatorDefinition[];
|
|
6200
|
+
onConnectorChange(event: Event): void;
|
|
6201
|
+
onAttributeChange(nextAttr: string): void;
|
|
6202
|
+
/** Look up a field by attribute key across flat fields and nested categories. */
|
|
6203
|
+
private findField;
|
|
6204
|
+
onOperatorChange(event: Event): void;
|
|
6205
|
+
onValueChange(value: ConditionValue): void;
|
|
6206
|
+
onRemoveClick(): void;
|
|
6207
|
+
onInsertBelowClick(): void;
|
|
6208
|
+
onAddMenuSelect(event: Event): void;
|
|
6209
|
+
/** Pick a sensible default operator for a given field: first allowed operator. */
|
|
6210
|
+
private pickDefaultOperator;
|
|
6211
|
+
private emit;
|
|
6212
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StConditionRuleComponent, never>;
|
|
6213
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StConditionRuleComponent, "st-condition-rule", never, { "rule": { "alias": "rule"; "required": true; }; "config": { "alias": "config"; "required": true; }; "isFirst": { "alias": "isFirst"; "required": false; }; "canRemove": { "alias": "canRemove"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "canInsertGroup": { "alias": "canInsertGroup"; "required": false; }; }, { "ruleChange": "ruleChange"; "remove": "remove"; "insertBelow": "insertBelow"; "insertGroupBelow": "insertGroupBelow"; }, never, never, true, never>;
|
|
6214
|
+
}
|
|
6215
|
+
|
|
6216
|
+
/**
|
|
6217
|
+
* Renders the value input for a single condition row. Picks the editor variant
|
|
6218
|
+
* based on the field's `valueEditor` and the operator's arity:
|
|
6219
|
+
* - operator arity 'none' → no input rendered
|
|
6220
|
+
* - 'text' → single nile-input (text)
|
|
6221
|
+
* - 'chip' → nile-chip multi-value input
|
|
6222
|
+
* - 'select' → nile-select single
|
|
6223
|
+
* - 'multi-select' → nile-select multi
|
|
6224
|
+
*
|
|
6225
|
+
* Value is always handled as `string[]`. Single-value editors use the first array
|
|
6226
|
+
* element; empty array means "no value".
|
|
6227
|
+
*/
|
|
6228
|
+
declare class StConditionValueEditorComponent implements OnInit, OnDestroy {
|
|
6229
|
+
field?: FieldDefinition;
|
|
6230
|
+
operator?: OperatorDefinition;
|
|
6231
|
+
value: ConditionValue;
|
|
6232
|
+
disabled: boolean;
|
|
6233
|
+
readonly valueChange: EventEmitter<ConditionValue>;
|
|
6234
|
+
private elementRef;
|
|
6235
|
+
/** Open/close + highlighted-option state for the slotted-trigger select. */
|
|
6236
|
+
private dropdownOpen;
|
|
6237
|
+
private highlightedIndex;
|
|
6238
|
+
private kbForwarder;
|
|
6239
|
+
/** The slot trigger that owns the open dropdown — used to refocus on close. */
|
|
6240
|
+
private activeSlot;
|
|
6241
|
+
/** The <nile-select> host that owns the open dropdown. */
|
|
6242
|
+
private activeHost;
|
|
6243
|
+
constructor();
|
|
6244
|
+
ngOnInit(): void;
|
|
6245
|
+
/**
|
|
6246
|
+
* Host class flag — when true, the value editor host stretches to take the
|
|
6247
|
+
* remaining flex space in the rule (so the chip can grow up to the row's
|
|
6248
|
+
* right edge, then scroll internally). For other variants we keep the host
|
|
6249
|
+
* content-sized so the inner select/input renders at its constant width.
|
|
6250
|
+
*/
|
|
6251
|
+
get isChipMode(): boolean;
|
|
6252
|
+
/** True when operator arity is 'none' — input is hidden. */
|
|
6253
|
+
get hidden(): boolean;
|
|
6254
|
+
/** Placeholder for the current editor — field override wins, else a sensible default per editor type. */
|
|
6255
|
+
get placeholder(): string;
|
|
6256
|
+
/** Convenience: first element for single-value editors. */
|
|
6257
|
+
get singleValue(): string;
|
|
6258
|
+
/**
|
|
6259
|
+
* Convenience: array for multi-value editors. Returns the input array directly
|
|
6260
|
+
* — NOT a clone. Cloning here returns a new reference on every CD cycle, which
|
|
6261
|
+
* makes Angular rebind `[value]` on nile-select even when nothing changed,
|
|
6262
|
+
* causing the multi-select chip to flicker on every keystroke / selection.
|
|
6263
|
+
* The component never mutates this array in place, so sharing the ref is safe.
|
|
6264
|
+
*/
|
|
6265
|
+
get multiValue(): string[];
|
|
6266
|
+
/**
|
|
6267
|
+
* Label shown for the first selected value in the multi-select chip's
|
|
6268
|
+
* custom display. Resolves the option's `label`; falls back to the raw value
|
|
6269
|
+
* if no matching option exists.
|
|
6270
|
+
*/
|
|
6271
|
+
get firstSelectedLabel(): string;
|
|
6272
|
+
/** Count of additional selected values beyond the first — used for "+N More". */
|
|
6273
|
+
get overflowCount(): number;
|
|
6274
|
+
onTextInput(event: Event): void;
|
|
6275
|
+
onChipChange(event: Event): void;
|
|
6276
|
+
onSelectChange(event: Event): void;
|
|
6277
|
+
/**
|
|
6278
|
+
* Open Nile's dropdown using the most reliable path available. `host.show()`
|
|
6279
|
+
* is the documented Nile API; if it's missing or throws, fall back to
|
|
6280
|
+
* dispatching a real mouse-down on the host (Nile's own mousedown handler
|
|
6281
|
+
* opens the popup). Then dispatching a click event ensures any other Nile
|
|
6282
|
+
* listeners on the host get the expected sequence.
|
|
6283
|
+
*
|
|
6284
|
+
* State (activeHost / activeSlot / dropdownOpen) is set here so the doc
|
|
6285
|
+
* forwarder is responsive immediately — `nile-show` from Nile will run
|
|
6286
|
+
* `onSelectShow` shortly after and re-confirm the same state.
|
|
6287
|
+
*/
|
|
6288
|
+
private openHost;
|
|
6289
|
+
/**
|
|
6290
|
+
* Nile emits `nile-show` when its dropdown opens — whether from our
|
|
6291
|
+
* `openHost()`, a click on the trigger, or any other path. We use it to
|
|
6292
|
+
* keep `dropdownOpen` truthful even when the user opens via mouse (skipping
|
|
6293
|
+
* `openHost()` entirely). The doc-level forwarder is already installed
|
|
6294
|
+
* (it lives for the component's lifetime).
|
|
6295
|
+
*/
|
|
6296
|
+
onSelectShow(event: Event): void;
|
|
6297
|
+
/**
|
|
6298
|
+
* Nile emits `nile-hide` when its dropdown closes — for any reason (Esc,
|
|
6299
|
+
* click-outside, single-select pick, programmatic .hide()). Returning focus
|
|
6300
|
+
* to the slot is what makes Tab continue cleanly to the row's hover actions.
|
|
6301
|
+
* The document forwarder stays installed (it lives for the whole component
|
|
6302
|
+
* lifetime); only the open-state flags reset.
|
|
6303
|
+
*/
|
|
6304
|
+
onSelectAfterHide(_event: Event): void;
|
|
6305
|
+
/**
|
|
6306
|
+
* Document-level keydown forwarder, installed for the lifetime of this
|
|
6307
|
+
* component instance. Runs in CAPTURE phase so it fires BEFORE any
|
|
6308
|
+
* bubble-phase listener — including Nile's internal listeners inside the
|
|
6309
|
+
* shadow DOM that would otherwise stop the event from ever reaching our
|
|
6310
|
+
* template-bound (keydown).
|
|
6311
|
+
*
|
|
6312
|
+
* Two distinct flows, gated by `dropdownOpen`:
|
|
6313
|
+
*
|
|
6314
|
+
* - Closed + focus is inside this component's host: Enter / Space / ↓ / ↑
|
|
6315
|
+
* opens our nile-select via `openHost()`.
|
|
6316
|
+
* - Open: ↑/↓ navigate options regardless of where focus has moved
|
|
6317
|
+
* (Nile may have taken focus into its portal listbox). PageUp/PageDown/
|
|
6318
|
+
* Home/End are swallowed so the page behind the dropdown doesn't scroll.
|
|
6319
|
+
* Enter, Space, Esc, Tab, type-to-search all pass through to Nile.
|
|
6320
|
+
*
|
|
6321
|
+
* The `focusIsInOurComponent` check ensures that across many co-existing
|
|
6322
|
+
* value-editor instances (one per condition row), only the editor the user
|
|
6323
|
+
* is actually interacting with reacts to the keystroke.
|
|
6324
|
+
*/
|
|
6325
|
+
private installKeyForwarder;
|
|
6326
|
+
/**
|
|
6327
|
+
* True when document focus is on (or inside) our component's host element.
|
|
6328
|
+
* Shadow-DOM focus reports the SHADOW HOST in `document.activeElement` (it
|
|
6329
|
+
* does not pierce shadow boundaries), so `host.contains(...)` works even
|
|
6330
|
+
* when the user is actually focused on an element inside nile-select's
|
|
6331
|
+
* shadow root.
|
|
6332
|
+
*/
|
|
6333
|
+
private focusIsInOurComponent;
|
|
6334
|
+
private removeKeyForwarder;
|
|
6335
|
+
/**
|
|
6336
|
+
* Walk options by `direction` (+1 or -1), update `highlightedIndex`, and
|
|
6337
|
+
* synchronise the visual highlight on both the light-DOM `<nile-option>` and
|
|
6338
|
+
* its portal counterpart.
|
|
6339
|
+
*
|
|
6340
|
+
* Strategies (matches `NileSelectEditor`):
|
|
6341
|
+
* - `setCurrentOption()` — preferred; Nile's documented API to mark the
|
|
6342
|
+
* "current" option so its native Enter handler picks the right one.
|
|
6343
|
+
* - `[data-kb-active]` attribute — the visual highlight, styled by our
|
|
6344
|
+
* injected CSS (matches the cell-editor look).
|
|
6345
|
+
* - `scrollIntoView` — keeps the highlighted option in view for long lists.
|
|
6346
|
+
*
|
|
6347
|
+
* We do NOT move DOM focus to the option — that would blur the trigger and
|
|
6348
|
+
* some Nile builds auto-close on blur. Focus stays on the trigger; Nile's
|
|
6349
|
+
* Enter handler reads `currentOption` from `setCurrentOption` to commit.
|
|
6350
|
+
*/
|
|
6351
|
+
private navigateOption;
|
|
6352
|
+
ngOnDestroy(): void;
|
|
6353
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StConditionValueEditorComponent, never>;
|
|
6354
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StConditionValueEditorComponent, "st-condition-value-editor", never, { "field": { "alias": "field"; "required": false; }; "operator": { "alias": "operator"; "required": false; }; "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
|
|
6355
|
+
}
|
|
6356
|
+
|
|
6357
|
+
/**
|
|
6358
|
+
* Field picker — direct port of v1's `criteriaDropdown` template
|
|
6359
|
+
* (advanced-filter.component.html:533-629).
|
|
6360
|
+
*
|
|
6361
|
+
* Structure:
|
|
6362
|
+
* <nile-dropdown> ← outer dropdown anchored to the chip
|
|
6363
|
+
* <button slot="trigger"> ← the chip-style trigger
|
|
6364
|
+
* <nile-menu> ← main menu list
|
|
6365
|
+
* <nile-menu-item>flat field</nile-menu-item>
|
|
6366
|
+
* <nile-menu-item> ← one per category
|
|
6367
|
+
* <nile-dropdown placement="right-end"> ← nested flyout submenu
|
|
6368
|
+
* <span slot="trigger">{{ label }} ›</span>
|
|
6369
|
+
* <nile-menu searchEnabled> ← built-in search input
|
|
6370
|
+
* <nile-menu-item>category field</nile-menu-item>
|
|
6371
|
+
* </nile-menu>
|
|
6372
|
+
* </nile-dropdown>
|
|
6373
|
+
* </nile-menu-item>
|
|
6374
|
+
* </nile-menu>
|
|
6375
|
+
* </nile-dropdown>
|
|
6376
|
+
*
|
|
6377
|
+
* Nile handles positioning, click-outside, keyboard nav, and the search box —
|
|
6378
|
+
* we just emit valueChange when a field is picked.
|
|
6379
|
+
*/
|
|
6380
|
+
declare class StConditionFieldPickerComponent {
|
|
6381
|
+
private cdr;
|
|
6382
|
+
/** Currently selected attribute key. */
|
|
6383
|
+
value: string;
|
|
6384
|
+
/** Top-level fields. */
|
|
6385
|
+
fields: FieldDefinition[];
|
|
6386
|
+
/** Optional grouped fields rendered as flyout submenus. */
|
|
6387
|
+
categories: FieldCategory[];
|
|
6388
|
+
disabled: boolean;
|
|
6389
|
+
placeholder: string;
|
|
6390
|
+
readonly valueChange: EventEmitter<string>;
|
|
6391
|
+
dropdownRef?: ElementRef<HTMLElement>;
|
|
6392
|
+
/** Resolved display label for the chip — searches flat fields, then category fields. */
|
|
6393
|
+
get displayLabel(): string;
|
|
6394
|
+
trackByAttribute: (_: number, f: FieldDefinition) => string;
|
|
6395
|
+
trackByCategoryId: (_: number, c: FieldCategory) => string;
|
|
6396
|
+
onFieldSelect(attribute: string, event?: Event): void;
|
|
6397
|
+
/** Swallow the click on a category menu-item so the outer dropdown stays open. */
|
|
6398
|
+
onCategoryItemClick(event: Event): void;
|
|
6399
|
+
private closeOuter;
|
|
6400
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StConditionFieldPickerComponent, never>;
|
|
6401
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StConditionFieldPickerComponent, "st-condition-field-picker", never, { "value": { "alias": "value"; "required": false; }; "fields": { "alias": "fields"; "required": false; }; "categories": { "alias": "categories"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
|
|
5351
6402
|
}
|
|
5352
6403
|
|
|
5353
6404
|
declare class ClickOutsideDirective {
|
|
@@ -5409,12 +6460,14 @@ declare class StColumnResizeDirective implements OnDestroy {
|
|
|
5409
6460
|
* Directive to handle keyboard navigation in table cells
|
|
5410
6461
|
*/
|
|
5411
6462
|
declare class StKeyboardNavigationDirective {
|
|
6463
|
+
private readonly el;
|
|
5412
6464
|
tableState: TableState;
|
|
5413
6465
|
/**
|
|
5414
6466
|
* When enabled, pressing arrow down at the last row will emit requestAddRow event
|
|
5415
6467
|
*/
|
|
5416
6468
|
addRowOnNavigatePastEnd: boolean;
|
|
5417
6469
|
onKeyDown(event: KeyboardEvent): void;
|
|
6470
|
+
private focusNextOutside;
|
|
5418
6471
|
/**
|
|
5419
6472
|
* Convert navigation key to direction using enums
|
|
5420
6473
|
*/
|
|
@@ -5431,7 +6484,7 @@ declare class SharedTableComponentsModule {
|
|
|
5431
6484
|
|
|
5432
6485
|
declare class SmartTableModule {
|
|
5433
6486
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SmartTableModule, never>;
|
|
5434
|
-
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<SmartTableModule, never, [typeof SharedTableComponentsModule, typeof StCellComponent, typeof StTableComponent, typeof StHeaderComponent, typeof StColumnMenuDropdownComponent, typeof StColumnVisibilityComponent, typeof StColumnFilterComponent, typeof StPaginationComponent, typeof StAddColumnButtonComponent, typeof StColumnEditorModalComponent, typeof StTableActionsComponent, typeof StRowActionsDropdownComponent, typeof StSheetComponent, typeof StSheetActionsComponent, typeof StWorkbookComponent, typeof ClickOutsideDirective, typeof StColumnResizeDirective, typeof StKeyboardNavigationDirective], [typeof StCellComponent, typeof StTableComponent, typeof StHeaderComponent, typeof StColumnMenuDropdownComponent, typeof StColumnVisibilityComponent, typeof StColumnFilterComponent, typeof StPaginationComponent, typeof StAddColumnButtonComponent, typeof StColumnEditorModalComponent, typeof StTableActionsComponent, typeof StRowActionsDropdownComponent, typeof StSheetComponent, typeof StSheetActionsComponent, typeof StWorkbookComponent, typeof ClickOutsideDirective, typeof StColumnResizeDirective, typeof StKeyboardNavigationDirective]>;
|
|
6487
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<SmartTableModule, never, [typeof SharedTableComponentsModule, typeof StCellComponent, typeof StTableComponent, typeof StHeaderComponent, typeof StColumnMenuDropdownComponent, typeof StColumnVisibilityComponent, typeof StColumnFilterComponent, typeof StPaginationComponent, typeof StAddColumnButtonComponent, typeof StColumnEditorModalComponent, typeof StTableActionsComponent, typeof StRowActionsDropdownComponent, typeof StSheetComponent, typeof StSheetActionsComponent, typeof StWorkbookComponent, typeof StConditionBuilderComponent, typeof StConditionGroupComponent, typeof StConditionRuleComponent, typeof StConditionValueEditorComponent, typeof StConditionFieldPickerComponent, typeof ClickOutsideDirective, typeof StColumnResizeDirective, typeof StKeyboardNavigationDirective], [typeof StCellComponent, typeof StTableComponent, typeof StHeaderComponent, typeof StColumnMenuDropdownComponent, typeof StColumnVisibilityComponent, typeof StColumnFilterComponent, typeof StPaginationComponent, typeof StAddColumnButtonComponent, typeof StColumnEditorModalComponent, typeof StTableActionsComponent, typeof StRowActionsDropdownComponent, typeof StSheetComponent, typeof StSheetActionsComponent, typeof StWorkbookComponent, typeof StConditionBuilderComponent, typeof StConditionGroupComponent, typeof StConditionRuleComponent, typeof StConditionValueEditorComponent, typeof StConditionFieldPickerComponent, typeof ClickOutsideDirective, typeof StColumnResizeDirective, typeof StKeyboardNavigationDirective]>;
|
|
5435
6488
|
static ɵinj: _angular_core.ɵɵInjectorDeclaration<SmartTableModule>;
|
|
5436
6489
|
}
|
|
5437
6490
|
|
|
@@ -6278,5 +7331,29 @@ declare class AutosaveService {
|
|
|
6278
7331
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AutosaveService>;
|
|
6279
7332
|
}
|
|
6280
7333
|
|
|
6281
|
-
|
|
6282
|
-
|
|
7334
|
+
/**
|
|
7335
|
+
* Stateless validator for ConditionBuilderValue. Ported from v1's `conditionsValidator`.
|
|
7336
|
+
*
|
|
7337
|
+
* Rules:
|
|
7338
|
+
* - In 'expression' mode: the expression string must be non-empty.
|
|
7339
|
+
* - In 'builder' mode:
|
|
7340
|
+
* - At least one top-level condition.
|
|
7341
|
+
* - For every single condition and subCondition:
|
|
7342
|
+
* - `attribute` must be set.
|
|
7343
|
+
* - `operator` must be set.
|
|
7344
|
+
* - `value` must be non-empty unless the operator's arity is 'none'.
|
|
7345
|
+
* - For every group: must have at least one subCondition.
|
|
7346
|
+
*/
|
|
7347
|
+
declare class ConditionValidationService {
|
|
7348
|
+
validate(value: ConditionBuilderValue, config: ConditionBuilderConfig): ConditionBuilderValidity;
|
|
7349
|
+
private validateExpression;
|
|
7350
|
+
private validateBuilder;
|
|
7351
|
+
private validateGroup;
|
|
7352
|
+
private validateRule;
|
|
7353
|
+
private locator;
|
|
7354
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ConditionValidationService, never>;
|
|
7355
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ConditionValidationService>;
|
|
7356
|
+
}
|
|
7357
|
+
|
|
7358
|
+
export { ArrayFormatter, AutosaveService, BaseColumnConfig, BooleanEditor, BooleanFormatter, BuilderPreviewComponent, BuilderToolbarComponent, Cell, CellAlignment, CellDataType, CellLifecycleState, CellVerticalAlignment, ChainValidator, ClickOutsideDirective, ColumnConfigFactory, ColumnEditorComponent, ColumnListComponent, Columns, ConditionValidationService, CurrencyFormatter, DEFAULT_AUTOSAVE_CONFIG, DEFAULT_COLUMN_CONFIG, DEFAULT_TABLE_CONFIG, DateEditor, DateFormatter, DateRangeValidator, DefaultFormatter, DefinitionBuilderComponent, DefinitionBuilderModule, DefinitionBuilderService, DefinitionExportService, DefinitionImportService, EditMode, EmailValidator, FilterOperator, FunctionFormatter, FunctionValidator, JsonSchemaValidatorService, LengthValidator, NavigationDirection, NavigationKey, NileAutoCompleteEditor, NileCalendarEditor, NileCheckboxEditor, NileChipEditor, NileCodeEditor, NileDatePickerEditor, NileInputEditor, NileSelectEditor, NumberEditor, NumberFormatter, OUFormatter, PatternValidators, PercentageFormatter, RangeValidator, RegexValidator, RequiredValidator, RowValidationService, SampleDataGeneratorService, SelectEditor, SharedTableComponentsModule, SheetState, SimpleColumnConfig, SmartTableModule, SortDirection, StAddColumnButtonComponent, StCellComponent, StColumnEditorModalComponent, StColumnFilterComponent, StColumnMenuDropdownComponent, StColumnResizeDirective, StColumnVisibilityComponent, StConditionBuilderComponent, StConditionFieldPickerComponent, StConditionGroupComponent, StConditionRuleComponent, StConditionValueEditorComponent, StHeaderComponent, StKeyboardNavigationDirective, StPaginationComponent, StRowActionsDropdownComponent, StSheetActionsComponent, StSheetComponent, StTableActionsComponent, StTableComponent, StWorkbookComponent, StringFormatter, TableConfigEditorComponent, TableState, TableZIndex, TemplateFormatter, TextAreaEditor, TextEditor, UrlValidator, ValidationLoggerService, VirtualScrollService, WorkbookState, canEdit, createCellState, createMemento, dnToHumanReadable, isCellValid, isDisplayMode, isNullOrUndefined, isValidDate, isValidationSuccess, mergeTableConfig, registerFormatter, resolveFormatter, restoreFromMemento };
|
|
7359
|
+
export type { AllowedDatesRange, AsyncCellValidator, AutoCompleteOption, AutoCompleteStyle, AutosaveConfig, AutosaveData, AutosaveStrategy, BuilderState, CellCancelEvent, CellChangeEvent, CellEditEvent, CellEditor, CellEditorContext, CellEvent, CellEventHandler, CellFocusPosition, CellFormatter, CellLifecycleHooks, CellParser, CellSaveEvent, CellState, CellStateMemento, CellValidator, CellValue, ChipOption, CodeEditorCompletion, ColumnAction, ColumnActionContext, ColumnActionEvent, ColumnAddEvent, ColumnConfig, ColumnConfigOptions, ColumnConfigWithKey, ColumnFilterEvent, ColumnFilterState, ColumnMoveEvent, ColumnResizeEvent, ColumnSortEvent, ColumnSortState, CompositeValidator, ConditionBuilderConfig, ConditionBuilderMode, ConditionBuilderValidity, ConditionBuilderValue, ConditionNode, ConditionValidationError, ConditionValue, DataChangeEvent, DateRange, ExportOptions, FieldCategory, FieldDefinition, FieldOption, FieldValueEditor, FilterContext, FilterOptions, GroupCondition, GroupType, ImportResult, LogicalConnector, NileAutoCompleteEditorOptions, NileCalendarEditorOptions, NileCheckboxEditorOptions, NileChipEditorOptions, NileCodeEditorOptions, NileDatePickerEditorOptions, NileInputEditorOptions, NileSelectEditorOptions, OUFormatterOptions, OperatorArity, OperatorDefinition, PaginationState, PartialColumnConfig, RowAction, RowActionContext, RowActionEvent, RowManagementConfig, RowValidationState, SelectOption, SheetAction, SheetActionContext, SheetActionEvent, SheetConditionBuilder, SheetConfig, SheetContentType, SheetMetadata, SheetStateConfig, SheetStateSnapshot, SheetTabAction, SheetTabActionEvent, SingleCondition, SubCondition, TableConfig, TableRowBackgroundContext, TableStateChangeEvent, TableStateConfig, TableStateSnapshot, TableValidationState, ValidationError, ValidationLogEntry, ValidationResult, VirtualScrollState, WorkbookAction, WorkbookActionEvent, WorkbookConfig, WorkbookMetadata, WorkbookSheetConfig, WorkbookStateConfig, WorkbookStateSnapshot };
|