@mozaic-ds/angular 2.0.47 → 2.0.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/mozaic-ds-angular.mjs +4007 -100
- package/fesm2022/mozaic-ds-angular.mjs.map +1 -1
- package/package.json +1 -1
- package/types/mozaic-ds-angular.d.ts +465 -5
|
@@ -2473,6 +2473,16 @@ interface ColumnDef<T = unknown> {
|
|
|
2473
2473
|
filterTemplate?: TemplateRef<unknown>;
|
|
2474
2474
|
/** Validation function for cell values. Returns CellError or null. */
|
|
2475
2475
|
cellValidator?: (value: unknown, row: T) => CellError | null;
|
|
2476
|
+
/**
|
|
2477
|
+
* Enables spreadsheet-style formulas for this column. Setting this to
|
|
2478
|
+
* `true` implies `editable: true` (users need to type the formula). When
|
|
2479
|
+
* the committed value starts with `=`, it is routed to the `FormulaEngine`
|
|
2480
|
+
* and the evaluated result is rendered in place of the raw formula text.
|
|
2481
|
+
*
|
|
2482
|
+
* Requires the grid-level `formulas` input to be `true` and the row to
|
|
2483
|
+
* expose a stable id via `rowIdField`.
|
|
2484
|
+
*/
|
|
2485
|
+
allowFormula?: boolean;
|
|
2476
2486
|
}
|
|
2477
2487
|
interface ColumnStateEntry {
|
|
2478
2488
|
field: string;
|
|
@@ -2718,6 +2728,10 @@ declare class GridStateManager<T = unknown> {
|
|
|
2718
2728
|
readonly draggingColumn: _angular_core.WritableSignal<string | null>;
|
|
2719
2729
|
readonly dropIndicatorIndex: _angular_core.WritableSignal<number | null>;
|
|
2720
2730
|
readonly cellEditState: _angular_core.WritableSignal<CellEditState>;
|
|
2731
|
+
/** `true` while the user is editing a formula inside the top formula bar
|
|
2732
|
+
* (outside any cell). Consumed by `FormulaEngine.isFormulaEditActive`
|
|
2733
|
+
* so headers show column-letter badges during bar-driven edits too. */
|
|
2734
|
+
readonly formulaBarEditingActive: _angular_core.WritableSignal<boolean>;
|
|
2721
2735
|
readonly visibleColumns: _angular_core.Signal<ColumnStateEntry[]>;
|
|
2722
2736
|
readonly pinnedLeftColumns: _angular_core.Signal<ColumnStateEntry[]>;
|
|
2723
2737
|
readonly unpinnedColumns: _angular_core.Signal<ColumnStateEntry[]>;
|
|
@@ -2743,6 +2757,8 @@ declare class GridStateManager<T = unknown> {
|
|
|
2743
2757
|
readonly leadingColumnSpacer: _angular_core.Signal<number>;
|
|
2744
2758
|
readonly trailingColumnSpacer: _angular_core.Signal<number>;
|
|
2745
2759
|
readonly columnDefMap: _angular_core.Signal<Map<string, ColumnDef<T>>>;
|
|
2760
|
+
/** `true` when at least one column declares `allowFormula: true`. */
|
|
2761
|
+
readonly hasFormulaColumns: _angular_core.Signal<boolean>;
|
|
2746
2762
|
readonly gridTemplateColumns: _angular_core.Signal<string>;
|
|
2747
2763
|
readonly totalContentWidth: _angular_core.Signal<number>;
|
|
2748
2764
|
readonly totalPages: _angular_core.Signal<number>;
|
|
@@ -2790,6 +2806,293 @@ declare class RowSelectionEngine<T = unknown> {
|
|
|
2790
2806
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<RowSelectionEngine<any>>;
|
|
2791
2807
|
}
|
|
2792
2808
|
|
|
2809
|
+
/**
|
|
2810
|
+
* Public types for the formula engine. These are the only symbols consumers
|
|
2811
|
+
* of the grid need to interact with. The parser / evaluator / DAG live in
|
|
2812
|
+
* `features/formula/` and expose the public surface through `FormulaEngine`.
|
|
2813
|
+
*
|
|
2814
|
+
* Shape overview:
|
|
2815
|
+
* - `CellAddress` — stable (rowId, field) tuple.
|
|
2816
|
+
* - `FormulaValue` — tagged union of numbers, strings, booleans, empty
|
|
2817
|
+
* and errors. Errors propagate through operators.
|
|
2818
|
+
* - `FormulaError` — Excel-compatible error codes + `#PARSE!`.
|
|
2819
|
+
* - `FormulaFunction*` — registration shape for built-in + custom funcs.
|
|
2820
|
+
* - `FormulaChange*` / `FormulaError*` — events emitted by the grid.
|
|
2821
|
+
*/
|
|
2822
|
+
/** Stable cell identifier, resistant to sort/filter/pagination. */
|
|
2823
|
+
interface CellAddress {
|
|
2824
|
+
rowId: string | number;
|
|
2825
|
+
field: string;
|
|
2826
|
+
}
|
|
2827
|
+
/** Excel-compatible error codes, plus mozaic-specific `#PARSE!`. */
|
|
2828
|
+
type FormulaError = '#DIV/0!' | '#VALUE!' | '#REF!' | '#NAME?' | '#NUM!' | '#N/A' | '#CYCLE!' | '#PARSE!';
|
|
2829
|
+
/**
|
|
2830
|
+
* Tagged union for any value that can appear as a formula operand or result.
|
|
2831
|
+
* `empty` represents a cell with no source value (distinct from the empty
|
|
2832
|
+
* string) and coerces to 0 in arithmetic contexts, `""` in textual ones.
|
|
2833
|
+
*/
|
|
2834
|
+
type FormulaValue = {
|
|
2835
|
+
kind: 'number';
|
|
2836
|
+
value: number;
|
|
2837
|
+
} | {
|
|
2838
|
+
kind: 'string';
|
|
2839
|
+
value: string;
|
|
2840
|
+
} | {
|
|
2841
|
+
kind: 'boolean';
|
|
2842
|
+
value: boolean;
|
|
2843
|
+
} | {
|
|
2844
|
+
kind: 'empty';
|
|
2845
|
+
} | {
|
|
2846
|
+
kind: 'error';
|
|
2847
|
+
error: FormulaError;
|
|
2848
|
+
};
|
|
2849
|
+
/**
|
|
2850
|
+
* Context passed to every function implementation. Keeps evaluation
|
|
2851
|
+
* side-effect free: the engine owns the cell store and only exposes a
|
|
2852
|
+
* `resolveRef` primitive. Range expansion is handled by the engine before
|
|
2853
|
+
* the function is invoked, so implementations receive a flat value array.
|
|
2854
|
+
*/
|
|
2855
|
+
interface FormulaEvalContext {
|
|
2856
|
+
/** Current cell being evaluated (used for diagnostics only). */
|
|
2857
|
+
readonly addr?: CellAddress;
|
|
2858
|
+
/**
|
|
2859
|
+
* Resolve a long-form reference. Returns `#REF!` when the target is
|
|
2860
|
+
* missing (column removed, row deleted). The engine is responsible for
|
|
2861
|
+
* cycle protection — functions must not worry about recursion.
|
|
2862
|
+
*/
|
|
2863
|
+
resolveRef(target: CellAddress): FormulaValue;
|
|
2864
|
+
/** Active locale, used by date/text helpers that are locale-aware. */
|
|
2865
|
+
readonly locale: 'en' | 'fr';
|
|
2866
|
+
}
|
|
2867
|
+
/** Arity constraint for a function registration. */
|
|
2868
|
+
type FormulaArity = number | 'variadic' | readonly [min: number, max: number];
|
|
2869
|
+
/**
|
|
2870
|
+
* Human-readable metadata shown in the autocomplete panel. When absent, the
|
|
2871
|
+
* suggestion listing falls back to the function name only.
|
|
2872
|
+
*/
|
|
2873
|
+
interface FormulaFunctionDocs {
|
|
2874
|
+
/** Canonical signature string, e.g. `SUM(number1, [number2, ...])`. */
|
|
2875
|
+
readonly signature: string;
|
|
2876
|
+
/** One-line summary — displayed next to the signature in FR by default. */
|
|
2877
|
+
readonly summary: string;
|
|
2878
|
+
}
|
|
2879
|
+
interface FormulaFunctionImpl {
|
|
2880
|
+
/** Number of arguments accepted. */
|
|
2881
|
+
readonly arity: FormulaArity;
|
|
2882
|
+
/**
|
|
2883
|
+
* Whether the function accepts a range argument (e.g. `SUM(A1:B3)`).
|
|
2884
|
+
* When `true`, each range is flattened into the `args` array in
|
|
2885
|
+
* row-major order. When `false`, passing a range yields `#VALUE!`.
|
|
2886
|
+
*
|
|
2887
|
+
* Defaults to `false`.
|
|
2888
|
+
*/
|
|
2889
|
+
readonly acceptsRange?: boolean;
|
|
2890
|
+
/** Optional documentation — consumed by the editor's autocomplete panel. */
|
|
2891
|
+
readonly docs?: FormulaFunctionDocs;
|
|
2892
|
+
/** Evaluate the function. Must be pure (no I/O, no mutation). */
|
|
2893
|
+
evaluate(args: FormulaValue[], ctx: FormulaEvalContext): FormulaValue;
|
|
2894
|
+
}
|
|
2895
|
+
/** Lookup table of function name (uppercase) → implementation. */
|
|
2896
|
+
type FormulaFunctionRegistry = Readonly<Record<string, FormulaFunctionImpl>>;
|
|
2897
|
+
/**
|
|
2898
|
+
* Source for storing formulas externally (instead of serialising the raw
|
|
2899
|
+
* formula into the row's field). Mirror of AG-Grid's `formulaDataSource`.
|
|
2900
|
+
*/
|
|
2901
|
+
interface FormulaDataSource {
|
|
2902
|
+
getFormula(addr: CellAddress): string | undefined;
|
|
2903
|
+
setFormula(addr: CellAddress, formula: string | undefined): void;
|
|
2904
|
+
/** Optional bulk hydration — useful for persistence layers. */
|
|
2905
|
+
hydrate?(entries: Iterable<{
|
|
2906
|
+
addr: CellAddress;
|
|
2907
|
+
formula: string;
|
|
2908
|
+
}>): void;
|
|
2909
|
+
}
|
|
2910
|
+
interface FormulaChangeEvent {
|
|
2911
|
+
addr: CellAddress;
|
|
2912
|
+
/** Canonical long-form formula (references keyed by rowId/field). */
|
|
2913
|
+
formula: string;
|
|
2914
|
+
/** Last evaluated value after the change. */
|
|
2915
|
+
evaluated: FormulaValue;
|
|
2916
|
+
}
|
|
2917
|
+
interface FormulaErrorEvent {
|
|
2918
|
+
addr: CellAddress;
|
|
2919
|
+
formula: string;
|
|
2920
|
+
error: FormulaError;
|
|
2921
|
+
}
|
|
2922
|
+
/** Factory helpers for callers that prefer not to build literals by hand. */
|
|
2923
|
+
declare const FormulaValues: {
|
|
2924
|
+
readonly number: (value: number) => FormulaValue;
|
|
2925
|
+
readonly string: (value: string) => FormulaValue;
|
|
2926
|
+
readonly boolean: (value: boolean) => FormulaValue;
|
|
2927
|
+
readonly empty: () => FormulaValue;
|
|
2928
|
+
readonly error: (error: FormulaError) => FormulaValue;
|
|
2929
|
+
};
|
|
2930
|
+
/** Narrow a value to a number, following Excel coercion rules. */
|
|
2931
|
+
declare function toNumber(v: FormulaValue): number | FormulaError;
|
|
2932
|
+
/** Narrow a value to a string, following Excel coercion rules. */
|
|
2933
|
+
declare function toStringValue(v: FormulaValue): string | FormulaError;
|
|
2934
|
+
/** Narrow a value to a boolean, following Excel coercion rules. */
|
|
2935
|
+
declare function toBoolean(v: FormulaValue): boolean | FormulaError;
|
|
2936
|
+
/** Returns the first error found in the given values, or `null`. */
|
|
2937
|
+
declare function firstError(values: readonly FormulaValue[]): FormulaError | null;
|
|
2938
|
+
|
|
2939
|
+
/**
|
|
2940
|
+
* Maps structured refs (A1-backed, field-keyed) to / from long-form
|
|
2941
|
+
* `CellAddress` tuples, and converts formula *source strings* between the
|
|
2942
|
+
* A1 edit surface and the `REF(COLUMN("…"),ROW(N))` storage form.
|
|
2943
|
+
*
|
|
2944
|
+
* The mapper is the only component aware of the grid's current column
|
|
2945
|
+
* order — every other layer works exclusively with addresses, so reordering
|
|
2946
|
+
* columns or renaming a field's display label never breaks a stored formula.
|
|
2947
|
+
*
|
|
2948
|
+
* Surface round-trip:
|
|
2949
|
+
*
|
|
2950
|
+
* Editor types → a1ToLongForm(ctx) → REF(COLUMN(…),ROW(…)) (stored)
|
|
2951
|
+
* Stored REF long-form → longFormToA1(ctx) → A1 (displayed)
|
|
2952
|
+
*
|
|
2953
|
+
* The mapper is intentionally stateless and receives its dependencies
|
|
2954
|
+
* (fields list + row id list) through the method parameters. This keeps
|
|
2955
|
+
* it unit-testable without instantiating the whole grid.
|
|
2956
|
+
*/
|
|
2957
|
+
|
|
2958
|
+
interface RefMapperContext {
|
|
2959
|
+
/**
|
|
2960
|
+
* Ordered list of column fields that can participate in formulas. Used
|
|
2961
|
+
* for A1 letter ↔ field conversion and for existence checks (an unknown
|
|
2962
|
+
* field yields `#REF!`).
|
|
2963
|
+
*/
|
|
2964
|
+
readonly fields: readonly string[];
|
|
2965
|
+
/**
|
|
2966
|
+
* Row identifiers in display order. Index 0 = row `1` in the user-facing
|
|
2967
|
+
* surface syntax. For grids in server mode, callers typically provide the
|
|
2968
|
+
* *currently loaded* subset — unresolved references surface as `#REF!`
|
|
2969
|
+
* which is the expected behaviour for page-scoped formulas.
|
|
2970
|
+
*/
|
|
2971
|
+
readonly rowIds: readonly (string | number)[];
|
|
2972
|
+
/**
|
|
2973
|
+
* Row id of the formula being resolved. The editor-side A1 helpers use
|
|
2974
|
+
* this to detect same-row refs (so the display can be relative by
|
|
2975
|
+
* default).
|
|
2976
|
+
*/
|
|
2977
|
+
readonly currentRowId?: string | number;
|
|
2978
|
+
}
|
|
2979
|
+
/** `(addr) → "A1"` using the current column order. */
|
|
2980
|
+
declare function addressToA1(addr: CellAddress, ctx: RefMapperContext): string | undefined;
|
|
2981
|
+
|
|
2982
|
+
/**
|
|
2983
|
+
* `FormulaEngine` — grid-scoped service that owns every formula cell, the
|
|
2984
|
+
* dependency DAG linking them, and the evaluator that turns stored
|
|
2985
|
+
* formulas into `FormulaValue`s.
|
|
2986
|
+
*
|
|
2987
|
+
* Responsibilities (Phase 1):
|
|
2988
|
+
* - Parse + resolve a raw formula when the user commits an edit.
|
|
2989
|
+
* - Update the dependency graph and detect cycles (`#CYCLE!`).
|
|
2990
|
+
* - Re-evaluate the mutated cell and every descendant in topological order.
|
|
2991
|
+
* - Expose a `values` signal the grid renders against.
|
|
2992
|
+
* - Provide an explicit `invalidate(addr)` so inline-edit can refresh
|
|
2993
|
+
* dependents after a *non-formula* source cell changes — avoiding a
|
|
2994
|
+
* blanket re-eval of the whole dataset.
|
|
2995
|
+
*
|
|
2996
|
+
* Out of scope (Phase ≥ 2):
|
|
2997
|
+
* - Editor component + autocomplete (uses `longFormToA1` under the hood).
|
|
2998
|
+
* - Clipboard / fill-handle rebasing of relative refs.
|
|
2999
|
+
* - History integration (undo/redo of formula mutations).
|
|
3000
|
+
*/
|
|
3001
|
+
|
|
3002
|
+
declare class FormulaEngine<T = unknown> {
|
|
3003
|
+
private readonly state;
|
|
3004
|
+
private readonly cells;
|
|
3005
|
+
private readonly dag;
|
|
3006
|
+
/** Last-evaluated values keyed by `rowId|field`. */
|
|
3007
|
+
private readonly valuesSignal;
|
|
3008
|
+
/** Function registry — consumers can replace via `setFunctions`. */
|
|
3009
|
+
private functions;
|
|
3010
|
+
/** Active locale for the parser/evaluator. */
|
|
3011
|
+
private locale;
|
|
3012
|
+
/** Snapshot of all evaluated formula values. Consumers read by key. */
|
|
3013
|
+
readonly values: Signal<ReadonlyMap<string, FormulaValue>>;
|
|
3014
|
+
/** Whether any formula is currently tracked. */
|
|
3015
|
+
readonly hasAnyFormula: Signal<boolean>;
|
|
3016
|
+
/**
|
|
3017
|
+
* `true` when the user is currently editing a cell whose column has
|
|
3018
|
+
* `allowFormula: true`. The grid's header uses this to surface the
|
|
3019
|
+
* structured-ref column badges (`[price]`, `[qty]`, …) above each
|
|
3020
|
+
* header, matching what the user types in their formula.
|
|
3021
|
+
*/
|
|
3022
|
+
readonly isFormulaEditActive: Signal<boolean>;
|
|
3023
|
+
/** Merge / replace the function registry (called once at grid init). */
|
|
3024
|
+
setFunctions(functions: FormulaFunctionRegistry): void;
|
|
3025
|
+
/** Read-only view of the current function registry — used by the editor's
|
|
3026
|
+
* autocomplete panel to enumerate available names + their docs. */
|
|
3027
|
+
getFunctions(): FormulaFunctionRegistry;
|
|
3028
|
+
setLocale(locale: 'en' | 'fr'): void;
|
|
3029
|
+
hasFormula(addr: CellAddress): boolean;
|
|
3030
|
+
/** Raw formula string, or `undefined` when none is stored. */
|
|
3031
|
+
getFormula(addr: CellAddress): string | undefined;
|
|
3032
|
+
/** Last-evaluated value, or `undefined` when no formula is stored. */
|
|
3033
|
+
valueAt(addr: CellAddress): FormulaValue | undefined;
|
|
3034
|
+
/**
|
|
3035
|
+
* Formula re-presented as A1 surface syntax for the current column /
|
|
3036
|
+
* row order. Returns `undefined` when the cell has no formula. Used by
|
|
3037
|
+
* the editor when opening a cell for edit.
|
|
3038
|
+
*/
|
|
3039
|
+
displayFormula(addr: CellAddress): string | undefined;
|
|
3040
|
+
/**
|
|
3041
|
+
* Registers or updates a formula at `addr`. Returns the freshly-computed
|
|
3042
|
+
* value. Invalid formulas are stored with their error as value so the
|
|
3043
|
+
* grid can render `#PARSE!` / `#REF!` etc. instead of silently dropping.
|
|
3044
|
+
*/
|
|
3045
|
+
set(addr: CellAddress, rawFormula: string): FormulaValue;
|
|
3046
|
+
/** Removes the formula at `addr`. Descendants are re-evaluated. */
|
|
3047
|
+
remove(addr: CellAddress): void;
|
|
3048
|
+
/**
|
|
3049
|
+
* Notifies the engine that a non-formula cell changed. Only dependents
|
|
3050
|
+
* are re-evaluated — this is the hook used by `InlineEditEngine` after
|
|
3051
|
+
* committing a plain value edit.
|
|
3052
|
+
*/
|
|
3053
|
+
invalidate(addr: CellAddress): void;
|
|
3054
|
+
/** Wipes every formula / value. */
|
|
3055
|
+
clear(): void;
|
|
3056
|
+
/**
|
|
3057
|
+
* Reconciles the engine against `sourceData()`: any cell whose column
|
|
3058
|
+
* declares `allowFormula: true` and whose value is a `=…` string is
|
|
3059
|
+
* registered (or updated). Cells previously registered but no longer
|
|
3060
|
+
* present (row removed, value changed to a literal) are dropped.
|
|
3061
|
+
*
|
|
3062
|
+
* Designed to be called from a grid-level effect tracking
|
|
3063
|
+
* `(formulas, sourceData, columnDefMap)` so that formulas baked into
|
|
3064
|
+
* the initial dataset are evaluated on first render — without it, the
|
|
3065
|
+
* engine would only learn about a formula after the user committed an
|
|
3066
|
+
* inline edit on it.
|
|
3067
|
+
*
|
|
3068
|
+
* The reconciliation is incremental: identical formula strings short-
|
|
3069
|
+
* circuit (no re-parse, no re-eval) so the call is cheap on stable data.
|
|
3070
|
+
*/
|
|
3071
|
+
syncFromSource(allowFormula: (field: string) => boolean): void;
|
|
3072
|
+
/**
|
|
3073
|
+
* Re-parses every stored formula so refs pick up the latest column
|
|
3074
|
+
* order / row list. Called by the grid shell when visibility or row
|
|
3075
|
+
* identity changes (reorder, filter flip, …).
|
|
3076
|
+
*/
|
|
3077
|
+
rebuild(): void;
|
|
3078
|
+
private refMapperContext;
|
|
3079
|
+
private storeError;
|
|
3080
|
+
/**
|
|
3081
|
+
* Evaluate the given seeds and every descendant in topological order.
|
|
3082
|
+
* Each node is first checked for cycle participation — any node inside
|
|
3083
|
+
* a cycle reports `#CYCLE!` without attempting evaluation (which would
|
|
3084
|
+
* recurse through the cached values and either spin or yield garbage).
|
|
3085
|
+
*/
|
|
3086
|
+
private revalidateFrom;
|
|
3087
|
+
private makeEvalContext;
|
|
3088
|
+
/** Resolve a reference: formula cell → cached value, else source data. */
|
|
3089
|
+
private resolveRef;
|
|
3090
|
+
private readSourceValue;
|
|
3091
|
+
private commitValues;
|
|
3092
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FormulaEngine<any>, never>;
|
|
3093
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<FormulaEngine<any>>;
|
|
3094
|
+
}
|
|
3095
|
+
|
|
2793
3096
|
interface GridPlugin {
|
|
2794
3097
|
name: string;
|
|
2795
3098
|
init(state: GridStateManager<never>): void;
|
|
@@ -2860,6 +3163,8 @@ declare class MozGridComponent<T = unknown> {
|
|
|
2860
3163
|
private readonly historyEngine;
|
|
2861
3164
|
private readonly groupEngine;
|
|
2862
3165
|
private readonly filterEngine;
|
|
3166
|
+
protected readonly formulaEngine: FormulaEngine<T>;
|
|
3167
|
+
private readonly refHighlight;
|
|
2863
3168
|
private readonly persistenceEngine;
|
|
2864
3169
|
private readonly exportEngine;
|
|
2865
3170
|
private readonly validationEngine;
|
|
@@ -2885,6 +3190,12 @@ declare class MozGridComponent<T = unknown> {
|
|
|
2885
3190
|
readonly rowSelection: _angular_core.InputSignal<boolean>;
|
|
2886
3191
|
readonly expandable: _angular_core.InputSignal<boolean>;
|
|
2887
3192
|
readonly rowIdField: _angular_core.InputSignal<string>;
|
|
3193
|
+
/**
|
|
3194
|
+
* Enables the spreadsheet-style formula engine. When `true`, any cell
|
|
3195
|
+
* committed with a leading `=` in a column declaring `allowFormula: true`
|
|
3196
|
+
* is routed to `FormulaEngine` and its evaluated value is rendered.
|
|
3197
|
+
*/
|
|
3198
|
+
readonly formulas: _angular_core.InputSignal<boolean>;
|
|
2888
3199
|
readonly detailTemplate: _angular_core.InputSignal<TemplateRef<unknown> | null>;
|
|
2889
3200
|
readonly fullscreen: _angular_core.InputSignal<boolean>;
|
|
2890
3201
|
readonly reorderable: _angular_core.InputSignal<boolean>;
|
|
@@ -2968,6 +3279,39 @@ declare class MozGridComponent<T = unknown> {
|
|
|
2968
3279
|
protected readonly selectionTotalCount: _angular_core.Signal<number>;
|
|
2969
3280
|
protected readonly showPagination: _angular_core.Signal<boolean>;
|
|
2970
3281
|
protected readonly showInfiniteScrollLoader: _angular_core.Signal<boolean>;
|
|
3282
|
+
/** Focused cell coord picked up by the formula bar — falls back to the
|
|
3283
|
+
* selected cell so the bar stays populated after focus is lost (e.g.
|
|
3284
|
+
* the user clicked outside to dismiss an overlay). */
|
|
3285
|
+
private readonly formulaBarCoord;
|
|
3286
|
+
/** Snapshot coord captured at edit entry — kept as a signal so the
|
|
3287
|
+
* bar's address reads from it reactively and stays pinned to the
|
|
3288
|
+
* original cell even when the user clicks elsewhere to pick refs. */
|
|
3289
|
+
private readonly formulaBarActiveCoord;
|
|
3290
|
+
/** A1 address (`A5`, `$A$5`) of the formula-bar target cell. While the
|
|
3291
|
+
* bar is editing the address stays pinned to the snapshot so ref
|
|
3292
|
+
* picking doesn't visually jump the label around. */
|
|
3293
|
+
protected readonly formulaBarAddress: _angular_core.Signal<string>;
|
|
3294
|
+
/** Formula source if the target cell holds one, otherwise the displayed
|
|
3295
|
+
* value as a string. Mirrors Excel's formula-bar behaviour. */
|
|
3296
|
+
protected readonly formulaBarContent: _angular_core.Signal<string>;
|
|
3297
|
+
/** `true` while the user is editing in the formula bar (mounts the
|
|
3298
|
+
* full-featured formula editor with ref highlights + autocomplete). */
|
|
3299
|
+
protected readonly formulaBarEditing: _angular_core.WritableSignal<boolean>;
|
|
3300
|
+
/** Live draft while the formula-bar input is focused. `null` means
|
|
3301
|
+
* "not editing" and the input mirrors `formulaBarContent()`. */
|
|
3302
|
+
protected readonly formulaBarDraft: _angular_core.WritableSignal<string | null>;
|
|
3303
|
+
/** Snapshot of the cell targeted when the formula bar gained focus.
|
|
3304
|
+
* Needed because blur fires *after* the click that moved the
|
|
3305
|
+
* selection elsewhere — without this we'd commit into the new cell. */
|
|
3306
|
+
private formulaBarEditSnapshot;
|
|
3307
|
+
/** Value shown in the bar input — draft while editing, committed value otherwise. */
|
|
3308
|
+
protected readonly formulaBarDisplay: _angular_core.Signal<string>;
|
|
3309
|
+
/** Address of the cell the formula bar is editing (for `@row`
|
|
3310
|
+
* highlighting inside the embedded editor). Reads from the snapshot
|
|
3311
|
+
* so it stays stable while the user clicks other cells to pick refs. */
|
|
3312
|
+
protected readonly formulaBarEditingAddr: _angular_core.Signal<CellAddress | null>;
|
|
3313
|
+
/** `true` when the target cell sits in an editable column. */
|
|
3314
|
+
protected readonly formulaBarEditable: _angular_core.Signal<boolean>;
|
|
2971
3315
|
private columnsInitialized;
|
|
2972
3316
|
private stateRestored;
|
|
2973
3317
|
private documentMouseUpHandler;
|
|
@@ -2996,6 +3340,12 @@ declare class MozGridComponent<T = unknown> {
|
|
|
2996
3340
|
private resetInfiniteScrollIfActive;
|
|
2997
3341
|
private refocusGrid;
|
|
2998
3342
|
onMouseUp(): void;
|
|
3343
|
+
/**
|
|
3344
|
+
* Shifts a formula's relative refs by the given (row, col) delta when the
|
|
3345
|
+
* value is a formula string dropped on a new cell during a fill. Non-formula
|
|
3346
|
+
* values are returned as-is so downstream code can still see the raw value.
|
|
3347
|
+
*/
|
|
3348
|
+
private shiftFormulaForFill;
|
|
2999
3349
|
/**
|
|
3000
3350
|
* Maps a display row index (from displayRow.index) to the actual index in
|
|
3001
3351
|
* sourceData(). When grouping or sorting is active the display index doesn't
|
|
@@ -3027,6 +3377,27 @@ declare class MozGridComponent<T = unknown> {
|
|
|
3027
3377
|
onGroupClick(): void;
|
|
3028
3378
|
private applyGroupResult;
|
|
3029
3379
|
onKeyboardShortcutsClick(): void;
|
|
3380
|
+
/** Clicking the readonly preview flips the bar into edit mode: we mount
|
|
3381
|
+
* the full formula editor on the next tick (it auto-focuses) and
|
|
3382
|
+
* snapshot the target cell so blur-ordering races can't mis-route
|
|
3383
|
+
* the commit to a different row. */
|
|
3384
|
+
onFormulaBarInputFocus(): void;
|
|
3385
|
+
onFormulaBarEditorChange(value: string): void;
|
|
3386
|
+
onFormulaBarEditorCommit(): void;
|
|
3387
|
+
onFormulaBarEditorCancel(): void;
|
|
3388
|
+
/** Commit-on-outside-focus: when the user tabs or clicks truly away
|
|
3389
|
+
* from the bar (not onto a grid cell — cells aren't focusable so they
|
|
3390
|
+
* don't steal focus), persist the draft. */
|
|
3391
|
+
onFormulaBarWrapperFocusout(event: FocusEvent): void;
|
|
3392
|
+
private exitFormulaBarEdit;
|
|
3393
|
+
private commitFormulaBar;
|
|
3394
|
+
/**
|
|
3395
|
+
* Convert a formula-bar A1 draft to REF long-form storage. Kept as a
|
|
3396
|
+
* member so it can re-use the grid's reactive context without threading
|
|
3397
|
+
* `fields` / `rowIds` through every caller.
|
|
3398
|
+
*/
|
|
3399
|
+
private a1FormulaToStorage;
|
|
3400
|
+
onFormulaReferenceClick(): void;
|
|
3030
3401
|
private static readonly DENSITY_ROW_HEIGHT;
|
|
3031
3402
|
onSettingsClick(): void;
|
|
3032
3403
|
private applySettings;
|
|
@@ -3054,7 +3425,7 @@ declare class MozGridComponent<T = unknown> {
|
|
|
3054
3425
|
private deleteSelectedRows;
|
|
3055
3426
|
private coerceAndValidate;
|
|
3056
3427
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MozGridComponent<any>, never>;
|
|
3057
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MozGridComponent<any>, "moz-grid", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "totalItems": { "alias": "totalItems"; "required": false; "isSignal": true; }; "pagination": { "alias": "pagination"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; "isSignal": true; }; "rowHeight": { "alias": "rowHeight"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "rowSelection": { "alias": "rowSelection"; "required": false; "isSignal": true; }; "expandable": { "alias": "expandable"; "required": false; "isSignal": true; }; "rowIdField": { "alias": "rowIdField"; "required": false; "isSignal": true; }; "detailTemplate": { "alias": "detailTemplate"; "required": false; "isSignal": true; }; "fullscreen": { "alias": "fullscreen"; "required": false; "isSignal": true; }; "reorderable": { "alias": "reorderable"; "required": false; "isSignal": true; }; "stateKey": { "alias": "stateKey"; "required": false; "isSignal": true; }; "emptyDataTitle": { "alias": "emptyDataTitle"; "required": false; "isSignal": true; }; "emptyDataDescription": { "alias": "emptyDataDescription"; "required": false; "isSignal": true; }; "noResultsTitle": { "alias": "noResultsTitle"; "required": false; "isSignal": true; }; "noResultsDescription": { "alias": "noResultsDescription"; "required": false; "isSignal": true; }; "noResultsActionLabel": { "alias": "noResultsActionLabel"; "required": false; "isSignal": true; }; "exportable": { "alias": "exportable"; "required": false; "isSignal": true; }; "horizontalVirtualScroll": { "alias": "horizontalVirtualScroll"; "required": false; "isSignal": true; }; "loadingStrategy": { "alias": "loadingStrategy"; "required": false; "isSignal": true; }; "scrollThreshold": { "alias": "scrollThreshold"; "required": false; "isSignal": true; }; "plugins": { "alias": "plugins"; "required": false; "isSignal": true; }; "filterApplyMode": { "alias": "filterApplyMode"; "required": false; "isSignal": true; }; }, { "sortChange": "sortChange"; "pageChange": "pageChange"; "loadMore": "loadMore"; "cellEdit": "cellEdit"; "cellEditCancel": "cellEditCancel"; "selectionChange": "selectionChange"; "cellSelectionChange": "cellSelectionChange"; "groupChange": "groupChange"; "filterChange": "filterChange"; "bulkEdit": "bulkEdit"; "bulkCopy": "bulkCopy"; "bulkPaste": "bulkPaste"; "bulkDelete": "bulkDelete"; "fillDown": "fillDown"; "settingsChange": "settingsChange"; }, ["columnDefs", "toolbarDefs", "emptyDefs"], ["[mozGridFilterTags]"], true, never>;
|
|
3428
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MozGridComponent<any>, "moz-grid", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "totalItems": { "alias": "totalItems"; "required": false; "isSignal": true; }; "pagination": { "alias": "pagination"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; "isSignal": true; }; "rowHeight": { "alias": "rowHeight"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "rowSelection": { "alias": "rowSelection"; "required": false; "isSignal": true; }; "expandable": { "alias": "expandable"; "required": false; "isSignal": true; }; "rowIdField": { "alias": "rowIdField"; "required": false; "isSignal": true; }; "formulas": { "alias": "formulas"; "required": false; "isSignal": true; }; "detailTemplate": { "alias": "detailTemplate"; "required": false; "isSignal": true; }; "fullscreen": { "alias": "fullscreen"; "required": false; "isSignal": true; }; "reorderable": { "alias": "reorderable"; "required": false; "isSignal": true; }; "stateKey": { "alias": "stateKey"; "required": false; "isSignal": true; }; "emptyDataTitle": { "alias": "emptyDataTitle"; "required": false; "isSignal": true; }; "emptyDataDescription": { "alias": "emptyDataDescription"; "required": false; "isSignal": true; }; "noResultsTitle": { "alias": "noResultsTitle"; "required": false; "isSignal": true; }; "noResultsDescription": { "alias": "noResultsDescription"; "required": false; "isSignal": true; }; "noResultsActionLabel": { "alias": "noResultsActionLabel"; "required": false; "isSignal": true; }; "exportable": { "alias": "exportable"; "required": false; "isSignal": true; }; "horizontalVirtualScroll": { "alias": "horizontalVirtualScroll"; "required": false; "isSignal": true; }; "loadingStrategy": { "alias": "loadingStrategy"; "required": false; "isSignal": true; }; "scrollThreshold": { "alias": "scrollThreshold"; "required": false; "isSignal": true; }; "plugins": { "alias": "plugins"; "required": false; "isSignal": true; }; "filterApplyMode": { "alias": "filterApplyMode"; "required": false; "isSignal": true; }; }, { "sortChange": "sortChange"; "pageChange": "pageChange"; "loadMore": "loadMore"; "cellEdit": "cellEdit"; "cellEditCancel": "cellEditCancel"; "selectionChange": "selectionChange"; "cellSelectionChange": "cellSelectionChange"; "groupChange": "groupChange"; "filterChange": "filterChange"; "bulkEdit": "bulkEdit"; "bulkCopy": "bulkCopy"; "bulkPaste": "bulkPaste"; "bulkDelete": "bulkDelete"; "fillDown": "fillDown"; "settingsChange": "settingsChange"; }, ["columnDefs", "toolbarDefs", "emptyDefs"], ["[mozGridFilterTags]"], true, never>;
|
|
3058
3429
|
}
|
|
3059
3430
|
|
|
3060
3431
|
interface GroupRow<T = unknown> {
|
|
@@ -3128,6 +3499,13 @@ declare class MozGridColumnDef<T = unknown> {
|
|
|
3128
3499
|
readonly hideable: _angular_core.InputSignal<boolean>;
|
|
3129
3500
|
readonly freezable: _angular_core.InputSignal<boolean>;
|
|
3130
3501
|
readonly headerMenuDisabled: _angular_core.InputSignal<boolean>;
|
|
3502
|
+
/**
|
|
3503
|
+
* Mirrors `ColumnDef.allowFormula`. Required so the template binding
|
|
3504
|
+
* `[allowFormula]="true"` is forwarded into the generated column def —
|
|
3505
|
+
* without it, `FormulaEngine.syncFromSource` cannot detect this column
|
|
3506
|
+
* and any baked-in `=…` value is rendered as a raw string.
|
|
3507
|
+
*/
|
|
3508
|
+
readonly allowFormula: _angular_core.InputSignal<boolean>;
|
|
3131
3509
|
readonly pinned: _angular_core.InputSignal<"start" | "end" | null>;
|
|
3132
3510
|
readonly cellEditor: _angular_core.InputSignal<CellEditorType | undefined>;
|
|
3133
3511
|
readonly cellEditorOptions: _angular_core.InputSignal<MozSelectOption[] | undefined>;
|
|
@@ -3140,7 +3518,7 @@ declare class MozGridColumnDef<T = unknown> {
|
|
|
3140
3518
|
readonly filterTemplateContent: _angular_core.Signal<TemplateRef<unknown> | undefined>;
|
|
3141
3519
|
toColumnDef(): ColumnDef<T>;
|
|
3142
3520
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MozGridColumnDef<any>, never>;
|
|
3143
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<MozGridColumnDef<any>, "moz-grid-column-def", never, { "field": { "alias": "field"; "required": true; "isSignal": true; }; "headerName": { "alias": "headerName"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "minWidth": { "alias": "minWidth"; "required": false; "isSignal": true; }; "maxWidth": { "alias": "maxWidth"; "required": false; "isSignal": true; }; "flex": { "alias": "flex"; "required": false; "isSignal": true; }; "sortable": { "alias": "sortable"; "required": false; "isSignal": true; }; "resizable": { "alias": "resizable"; "required": false; "isSignal": true; }; "reorderable": { "alias": "reorderable"; "required": false; "isSignal": true; }; "groupable": { "alias": "groupable"; "required": false; "isSignal": true; }; "filterable": { "alias": "filterable"; "required": false; "isSignal": true; }; "editable": { "alias": "editable"; "required": false; "isSignal": true; }; "visible": { "alias": "visible"; "required": false; "isSignal": true; }; "hideable": { "alias": "hideable"; "required": false; "isSignal": true; }; "freezable": { "alias": "freezable"; "required": false; "isSignal": true; }; "headerMenuDisabled": { "alias": "headerMenuDisabled"; "required": false; "isSignal": true; }; "pinned": { "alias": "pinned"; "required": false; "isSignal": true; }; "cellEditor": { "alias": "cellEditor"; "required": false; "isSignal": true; }; "cellEditorOptions": { "alias": "cellEditorOptions"; "required": false; "isSignal": true; }; "cellValidator": { "alias": "cellValidator"; "required": false; "isSignal": true; }; "cellTemplateInput": { "alias": "cellTemplate"; "required": false; "isSignal": true; }; "editTemplateInput": { "alias": "editTemplate"; "required": false; "isSignal": true; }; "filterTemplateInput": { "alias": "filterTemplate"; "required": false; "isSignal": true; }; }, {}, ["cellTemplateContent", "editTemplateContent", "filterTemplateContent"], never, true, never>;
|
|
3521
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<MozGridColumnDef<any>, "moz-grid-column-def", never, { "field": { "alias": "field"; "required": true; "isSignal": true; }; "headerName": { "alias": "headerName"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "minWidth": { "alias": "minWidth"; "required": false; "isSignal": true; }; "maxWidth": { "alias": "maxWidth"; "required": false; "isSignal": true; }; "flex": { "alias": "flex"; "required": false; "isSignal": true; }; "sortable": { "alias": "sortable"; "required": false; "isSignal": true; }; "resizable": { "alias": "resizable"; "required": false; "isSignal": true; }; "reorderable": { "alias": "reorderable"; "required": false; "isSignal": true; }; "groupable": { "alias": "groupable"; "required": false; "isSignal": true; }; "filterable": { "alias": "filterable"; "required": false; "isSignal": true; }; "editable": { "alias": "editable"; "required": false; "isSignal": true; }; "visible": { "alias": "visible"; "required": false; "isSignal": true; }; "hideable": { "alias": "hideable"; "required": false; "isSignal": true; }; "freezable": { "alias": "freezable"; "required": false; "isSignal": true; }; "headerMenuDisabled": { "alias": "headerMenuDisabled"; "required": false; "isSignal": true; }; "allowFormula": { "alias": "allowFormula"; "required": false; "isSignal": true; }; "pinned": { "alias": "pinned"; "required": false; "isSignal": true; }; "cellEditor": { "alias": "cellEditor"; "required": false; "isSignal": true; }; "cellEditorOptions": { "alias": "cellEditorOptions"; "required": false; "isSignal": true; }; "cellValidator": { "alias": "cellValidator"; "required": false; "isSignal": true; }; "cellTemplateInput": { "alias": "cellTemplate"; "required": false; "isSignal": true; }; "editTemplateInput": { "alias": "editTemplate"; "required": false; "isSignal": true; }; "filterTemplateInput": { "alias": "filterTemplate"; "required": false; "isSignal": true; }; }, {}, ["cellTemplateContent", "editTemplateContent", "filterTemplateContent"], never, true, never>;
|
|
3144
3522
|
}
|
|
3145
3523
|
|
|
3146
3524
|
declare class GridEngine<T = unknown> {
|
|
@@ -3219,6 +3597,7 @@ declare class InlineEditEngine<T = unknown> {
|
|
|
3219
3597
|
private readonly state;
|
|
3220
3598
|
private readonly history;
|
|
3221
3599
|
private readonly gridEngine;
|
|
3600
|
+
private readonly formulaEngine;
|
|
3222
3601
|
startEdit(rowIndex: number, field: string): void;
|
|
3223
3602
|
/**
|
|
3224
3603
|
* Excel-style "typing-to-edit": starts the editor with the cell value replaced
|
|
@@ -3231,7 +3610,22 @@ declare class InlineEditEngine<T = unknown> {
|
|
|
3231
3610
|
commitEdit(): CellEditEvent<T> | null;
|
|
3232
3611
|
cancelEdit(): CellEditCancelEvent | null;
|
|
3233
3612
|
isEditing(rowIndex: number, colIndex: number): boolean;
|
|
3613
|
+
/**
|
|
3614
|
+
* Convert an A1-surface formula draft to REF long-form storage. Strings
|
|
3615
|
+
* that do not start with `=` are returned untouched — callers should
|
|
3616
|
+
* only invoke this on values they already know to be formulas.
|
|
3617
|
+
*/
|
|
3618
|
+
private a1DraftToStorage;
|
|
3234
3619
|
resolveEditorType(field: string, value: unknown): CellEditorType;
|
|
3620
|
+
/**
|
|
3621
|
+
* Route a cell-edit commit through the formula engine when appropriate:
|
|
3622
|
+
* - `allowFormula` column + new value starts with `=` → register formula.
|
|
3623
|
+
* - `allowFormula` column + old value was a formula but new one isn't
|
|
3624
|
+
* → remove the stored formula (reverts to a plain literal).
|
|
3625
|
+
* - Any cell change → invalidate dependents so their cached value
|
|
3626
|
+
* refreshes (no-op when the engine has zero dependents on this cell).
|
|
3627
|
+
*/
|
|
3628
|
+
private updateFormulaEngine;
|
|
3235
3629
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<InlineEditEngine<any>, never>;
|
|
3236
3630
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<InlineEditEngine<any>>;
|
|
3237
3631
|
}
|
|
@@ -3589,6 +3983,27 @@ declare class InfiniteScrollEngine<T = unknown> {
|
|
|
3589
3983
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<InfiniteScrollEngine<any>>;
|
|
3590
3984
|
}
|
|
3591
3985
|
|
|
3986
|
+
/**
|
|
3987
|
+
* Default registry of formula functions (Phase 1 scope).
|
|
3988
|
+
*
|
|
3989
|
+
* Implementations are intentionally compact and reuse the coercion helpers
|
|
3990
|
+
* in `models/formula.model.ts`. Each entry is pure, side-effect free and
|
|
3991
|
+
* returns a `FormulaValue` — errors are data, never exceptions.
|
|
3992
|
+
*
|
|
3993
|
+
* Naming: keys are uppercase; the parser uppercases every identifier before
|
|
3994
|
+
* dispatch so consumers can write `sum(a, b)` or `SUM(a,b)` interchangeably.
|
|
3995
|
+
*/
|
|
3996
|
+
|
|
3997
|
+
/**
|
|
3998
|
+
* Default function registry. Consumers can spread this into their own
|
|
3999
|
+
* registry to extend it:
|
|
4000
|
+
*
|
|
4001
|
+
* ```
|
|
4002
|
+
* const registry = { ...DEFAULT_FORMULA_FUNCTIONS, TVA: myTvaFn };
|
|
4003
|
+
* ```
|
|
4004
|
+
*/
|
|
4005
|
+
declare const DEFAULT_FORMULA_FUNCTIONS: FormulaFunctionRegistry;
|
|
4006
|
+
|
|
3592
4007
|
declare function trackDisplayRow<T>(_index: number, row: DisplayRow<T>): string;
|
|
3593
4008
|
declare function trackByField(_index: number, col: {
|
|
3594
4009
|
field: string;
|
|
@@ -3662,6 +4077,8 @@ declare class MozGridFilterOverlayDirective implements OnDestroy {
|
|
|
3662
4077
|
declare class MozGridHeaderCellComponent<T = unknown> {
|
|
3663
4078
|
private readonly state;
|
|
3664
4079
|
private readonly filterEngine;
|
|
4080
|
+
/** Optional — only present when the grid provides `FormulaEngine`. */
|
|
4081
|
+
private readonly formulaEngine;
|
|
3665
4082
|
readonly columnState: _angular_core.InputSignal<ColumnStateEntry>;
|
|
3666
4083
|
readonly def: _angular_core.InputSignal<ColumnDef<T>>;
|
|
3667
4084
|
readonly isLast: _angular_core.InputSignal<boolean>;
|
|
@@ -3684,6 +4101,19 @@ declare class MozGridHeaderCellComponent<T = unknown> {
|
|
|
3684
4101
|
}>;
|
|
3685
4102
|
readonly resizeStart: _angular_core.OutputEmitterRef<MouseEvent>;
|
|
3686
4103
|
readonly label: _angular_core.Signal<string>;
|
|
4104
|
+
/**
|
|
4105
|
+
* Spreadsheet-style column letter (`A`, `B`, …, `AA`, `AB`, …) matching
|
|
4106
|
+
* this column's position in the visible column order. Shown above each
|
|
4107
|
+
* header while a formula is being edited so the user sees exactly what
|
|
4108
|
+
* letter to type to reference a cell in this column.
|
|
4109
|
+
*/
|
|
4110
|
+
readonly columnLetter: _angular_core.Signal<string>;
|
|
4111
|
+
/**
|
|
4112
|
+
* `true` when the user is editing a formula-capable cell. The header
|
|
4113
|
+
* uses this to show the column-letter badge — a visual cue matching the
|
|
4114
|
+
* A1 references the user types in the formula bar.
|
|
4115
|
+
*/
|
|
4116
|
+
readonly showColumnLetter: _angular_core.Signal<boolean>;
|
|
3687
4117
|
readonly menuItems: _angular_core.Signal<MozActionListItem[]>;
|
|
3688
4118
|
onHeaderClick(event: MouseEvent): void;
|
|
3689
4119
|
onMenuItemClick(item: MozActionListItem): void;
|
|
@@ -3765,6 +4195,9 @@ declare class MozGridCellComponent<T = unknown> {
|
|
|
3765
4195
|
private readonly validationEngine;
|
|
3766
4196
|
private readonly clipboard;
|
|
3767
4197
|
private readonly gridEngine;
|
|
4198
|
+
/** Optional: present only when the grid provides `FormulaEngine`. */
|
|
4199
|
+
private readonly formulaEngine;
|
|
4200
|
+
private readonly refHighlight;
|
|
3768
4201
|
private readonly elRef;
|
|
3769
4202
|
private preEditWidth;
|
|
3770
4203
|
constructor();
|
|
@@ -3781,12 +4214,37 @@ declare class MozGridCellComponent<T = unknown> {
|
|
|
3781
4214
|
readonly resolvedMinWidth: _angular_core.Signal<number>;
|
|
3782
4215
|
readonly commitEdit: _angular_core.OutputEmitterRef<void>;
|
|
3783
4216
|
readonly cancelEdit: _angular_core.OutputEmitterRef<void>;
|
|
4217
|
+
onFormulaCancel(): void;
|
|
3784
4218
|
readonly cellTemplate: _angular_core.Signal<_angular_core.TemplateRef<unknown> | null>;
|
|
3785
4219
|
readonly editTemplate: _angular_core.Signal<_angular_core.TemplateRef<unknown> | null>;
|
|
3786
4220
|
readonly updateDraftFn: (value: unknown) => void;
|
|
3787
4221
|
readonly commitEditFn: () => void;
|
|
4222
|
+
/**
|
|
4223
|
+
* Stable cell address for the formula engine. `null` when the column
|
|
4224
|
+
* isn't formula-enabled or the row lacks a stable id (e.g. headers).
|
|
4225
|
+
*/
|
|
4226
|
+
private readonly formulaAddr;
|
|
4227
|
+
/**
|
|
4228
|
+
* Last-evaluated `FormulaValue` for this cell, or `null` when the cell
|
|
4229
|
+
* holds no formula. Reactivity is driven by `formulaEngine.values`.
|
|
4230
|
+
*/
|
|
4231
|
+
readonly formulaValue: _angular_core.Signal<FormulaValue | null>;
|
|
3788
4232
|
readonly value: _angular_core.Signal<unknown>;
|
|
3789
4233
|
readonly displayValue: _angular_core.Signal<string>;
|
|
4234
|
+
/** `true` when the current cell value is a formula error (e.g. `#DIV/0!`). */
|
|
4235
|
+
readonly hasFormulaError: _angular_core.Signal<boolean>;
|
|
4236
|
+
/**
|
|
4237
|
+
* Currently editing and the draft is a formula (starts with `=`).
|
|
4238
|
+
* Drives the switch to `MozGridFormulaEditorComponent` instead of the
|
|
4239
|
+
* default text input.
|
|
4240
|
+
*/
|
|
4241
|
+
readonly isFormulaEditing: _angular_core.Signal<boolean>;
|
|
4242
|
+
/**
|
|
4243
|
+
* Palette CSS var for the coloured border shown when this cell is
|
|
4244
|
+
* currently referenced by the formula being edited elsewhere. `null`
|
|
4245
|
+
* when no editor is active or this cell is not referenced.
|
|
4246
|
+
*/
|
|
4247
|
+
readonly refHighlightColor: _angular_core.Signal<string | null>;
|
|
3790
4248
|
readonly editState: _angular_core.Signal<_mozaic_ds_angular.CellEditState>;
|
|
3791
4249
|
readonly isEditing: _angular_core.Signal<boolean>;
|
|
3792
4250
|
readonly editorType: _angular_core.Signal<CellEditorType>;
|
|
@@ -4303,8 +4761,10 @@ declare class MozTreeComponent<T = unknown> {
|
|
|
4303
4761
|
readonly selectedIds: _angular_core.InputSignal<Set<string | number>>;
|
|
4304
4762
|
readonly loadChildren: _angular_core.InputSignal<LoadChildrenFn<T> | null>;
|
|
4305
4763
|
readonly indentSize: _angular_core.InputSignal<number>;
|
|
4764
|
+
readonly virtualScroll: _angular_core.InputSignal<boolean | "auto">;
|
|
4306
4765
|
readonly virtualScrollThreshold: _angular_core.InputSignal<number>;
|
|
4307
4766
|
readonly rowHeight: _angular_core.InputSignal<number>;
|
|
4767
|
+
readonly viewportHeight: _angular_core.InputSignal<string>;
|
|
4308
4768
|
readonly _defaultTemplate: _angular_core.Signal<MozTreeNodeTemplateDirective | undefined>;
|
|
4309
4769
|
readonly _typedTemplates: _angular_core.Signal<readonly MozTreeNodeTemplateDirective[]>;
|
|
4310
4770
|
readonly nodeTemplate: _angular_core.Signal<TemplateRef<TreeNodeContext<T>> | null>;
|
|
@@ -4325,7 +4785,7 @@ declare class MozTreeComponent<T = unknown> {
|
|
|
4325
4785
|
trackNode(_index: number, node: TreeNode<T>): string | number;
|
|
4326
4786
|
trackFlatNode(_index: number, flat: FlatNode<T>): string | number;
|
|
4327
4787
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MozTreeComponent<any>, never>;
|
|
4328
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MozTreeComponent<any>, "moz-tree", never, { "nodes": { "alias": "nodes"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "expandedIds": { "alias": "expandedIds"; "required": false; "isSignal": true; }; "selectedIds": { "alias": "selectedIds"; "required": false; "isSignal": true; }; "loadChildren": { "alias": "loadChildren"; "required": false; "isSignal": true; }; "indentSize": { "alias": "indentSize"; "required": false; "isSignal": true; }; "virtualScrollThreshold": { "alias": "virtualScrollThreshold"; "required": false; "isSignal": true; }; "rowHeight": { "alias": "rowHeight"; "required": false; "isSignal": true; }; }, { "expandedIdsChange": "expandedIdsChange"; "selectionChange": "selectionChange"; }, ["_defaultTemplate", "_typedTemplates"], never, true, never>;
|
|
4788
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MozTreeComponent<any>, "moz-tree", never, { "nodes": { "alias": "nodes"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "expandedIds": { "alias": "expandedIds"; "required": false; "isSignal": true; }; "selectedIds": { "alias": "selectedIds"; "required": false; "isSignal": true; }; "loadChildren": { "alias": "loadChildren"; "required": false; "isSignal": true; }; "indentSize": { "alias": "indentSize"; "required": false; "isSignal": true; }; "virtualScroll": { "alias": "virtualScroll"; "required": false; "isSignal": true; }; "virtualScrollThreshold": { "alias": "virtualScrollThreshold"; "required": false; "isSignal": true; }; "rowHeight": { "alias": "rowHeight"; "required": false; "isSignal": true; }; "viewportHeight": { "alias": "viewportHeight"; "required": false; "isSignal": true; }; }, { "expandedIdsChange": "expandedIdsChange"; "selectionChange": "selectionChange"; }, ["_defaultTemplate", "_typedTemplates"], never, true, never>;
|
|
4329
4789
|
}
|
|
4330
4790
|
|
|
4331
4791
|
declare class MozTreeNodeComponent<T = unknown> {
|
|
@@ -4366,5 +4826,5 @@ declare class MozTreeNodeComponent<T = unknown> {
|
|
|
4366
4826
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MozTreeNodeComponent<any>, "moz-tree-node", never, { "node": { "alias": "node"; "required": true; "isSignal": true; }; "depth": { "alias": "depth"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "indentSize": { "alias": "indentSize"; "required": false; "isSignal": true; }; "nodeTemplate": { "alias": "nodeTemplate"; "required": false; "isSignal": true; }; "nodeTemplates": { "alias": "nodeTemplates"; "required": false; "isSignal": true; }; "loadChildren": { "alias": "loadChildren"; "required": false; "isSignal": true; }; "ancestors": { "alias": "ancestors"; "required": false; "isSignal": true; }; "flat": { "alias": "flat"; "required": false; "isSignal": true; }; "noResultText": { "alias": "noResultText"; "required": false; "isSignal": true; }; }, { "expandChange": "expandChange"; "selectionChange": "selectionChange"; }, never, never, true, never>;
|
|
4367
4827
|
}
|
|
4368
4828
|
|
|
4369
|
-
export { ACTION_LISTBOX_CONFIG, ActionListboxContainerComponent, ActionListboxRef, BuiltInMenuComponent, CellSelectionEngine, CellValidationEngine, ColumnReorderEngine, ColumnResizeEngine, DEFAULT_ACTION_LISTBOX_CONFIG, DEFAULT_GRID_OPTIONS, DEFAULT_MODAL_CONFIG, DEFAULT_TOASTER_CONFIG, DRAWER_CONFIG, DRAWER_DATA, DrawerContainerComponent, ExpandableRowEngine, ExportEngine, FilterEngine, GridEngine, GridGroupDrawerComponent, GridSettingsDrawerComponent, GridStateManager, GroupEngine, HorizontalVirtualScrollEngine, InfiniteScrollEngine, InlineEditEngine, KeyboardEngine, MODAL_CONFIG, MODAL_DATA, MozAccordionComponent, MozAccordionContentComponent, MozAccordionHeaderComponent, MozAccordionPanelComponent, MozActionBottomBarComponent, MozActionListboxComponent, MozActionListboxTriggerDirective, MozAvatarComponent, MozBreadcrumbComponent, MozButtonComponent, MozCalloutComponent, MozCarouselComponent, MozCheckListMenuComponent, MozCheckboxComponent, MozCheckboxGroupComponent, MozCircularProgressBarComponent, MozComboboxComponent, MozComboboxHarness, MozComboboxOptionHarness, MozDatepickerComponent, MozDividerComponent, MozDrawerComponent, MozDrawerFooterDirective, MozDrawerRef, MozDrawerService, MozFieldComponent, MozFieldGroupComponent, MozFileUploaderComponent, MozFileUploaderItemComponent, MozFlagComponent, MozGridBodyComponent, MozGridCellComponent, MozGridColumnDef, MozGridColumnVisibilityPanelComponent, MozGridComponent, MozGridDetailRowComponent, MozGridEmptyDef, MozGridFooterComponent, MozGridGroupRowComponent, MozGridHeaderCellComponent, MozGridHeaderComponent, MozGridHeaderMenuComponent, MozGridLoadingIndicatorComponent, MozGridRowComponent, MozGridToolbarDef, MozIconButtonComponent, MozKpiComponent, MozLinearProgressBarBufferComponent, MozLinearProgressBarPercentageComponent, MozLinkComponent, MozLoaderComponent, MozLoadingOverlayComponent, MozModalComponent, MozModalFooterDirective, MozModalRef, MozModalService, MozNavigationIndicatorComponent, MozNumberBadgeComponent, MozOverlayComponent, MozPageHeaderComponent, MozPaginationComponent, MozPasswordInputDirective, MozPhoneNumberComponent, MozPincodeInputComponent, MozPopoverComponent, MozPopoverFooterDirective, MozPopoverTriggerDirective, MozQuantitySelectorComponent, MozRadioComponent, MozRadioGroupComponent, MozSegmentedControlComponent, MozSelectComponent, MozSidebarComponent, MozStarRatingComponent, MozStatusBadgeComponent, MozStatusDotComponent, MozStatusMessageComponent, MozStatusNotificationComponent, MozStepperBottomBarComponent, MozStepperCompactComponent, MozStepperInlineComponent, MozStepperStackedComponent, MozTabComponent, MozTabsComponent, MozTagComponent, MozTextInput, MozTextarea, MozTileComponent, MozTileExpandableComponent, MozTileSelectableComponent, MozToasterComponent, MozToasterRef, MozToasterService, MozToggleComponent, MozTooltipComponent, MozTooltipDirective, MozTreeComponent, MozTreeNodeComponent, MozTreeNodeTemplateDirective, POPOVER_CONFIG, POPOVER_DATA, PaginationEngine, PopoverContainerComponent, PopoverRef, PopoverService, RowSelectionEngine, SortEngine, StatePersistenceEngine, TOASTER_CONFIG, TreeEngine, TreeKeyboardService, TreeSelectionService, TreeStateService, isSection, trackByField, trackDisplayRow };
|
|
4370
|
-
export type { ActionListboxConfig, ActionListboxPosition, ActiveFilter, BulkCellChange, BulkCopyEvent, BulkDeleteEvent, BulkEditEvent, BulkPasteEvent, CellCoord, CellEditCancelEvent, CellEditEvent, CellEditState, CellEditorType, CellError, CellRange, CellSelectionEvent, ColumnDef, ColumnFreezeEvent, ColumnReorderEvent, ColumnResizeEvent, ColumnSearchToggleEvent, ColumnStateEntry, ColumnVisibilityEvent, DisplayRow, ExportOptions, FillDownEvent, FilterEvent, FlatNode, GridDensity, GridEmptyContext, GridEmptyKind, GridEventMap, GridEventType, GridOptions, GridPlugin, GridSettingsData, GridSettingsResult, GridToolbarSlot, GroupDrawerData, GroupDrawerResult, GroupEntry, GroupEvent, GroupRow, HeaderMenuActionId, HeaderMenuConfig, KeyboardActions, LoadChildrenFn, LoadMoreEvent, LoadingStrategy, MozActionListItem, MozActionListItemAppearance, MozAvatarSize, MozBreadcrumbAppearance, MozBreadcrumbLink, MozBuiltInMenuItem, MozBuiltInMenuItemTarget, MozButtonAppearance, MozButtonIconPosition, MozButtonSize, MozButtonType, MozCalloutVariant, MozCheckListMenuItem, MozCircularProgessBarSize, MozComboboxItem, MozComboboxOption, MozComboboxSection, MozComboboxSize, MozDatepickerSize, MozDividerAppearance, MozDividerOrientation, MozDividerSize, MozDrawerConfig, MozDrawerPosition, MozFileUploaderFormat, MozFileUploaderItemFormat, MozFlagType, MozIconButtonAppearance, MozIconButtonSize, MozIconButtonType, MozKpiSize, MozKpiStatus, MozKpiTrend, MozLinearProgressBarBufferSize, MozLinkAppearance, MozLinkIconPosition, MozLinkSize, MozLoaderAppearance, MozLoaderSize, MozNavigationIndicatorAction, MozNumberBadgeAppearance, MozNumberBadgeSize, MozPageHeaderScope, MozPhoneNumberCountry, MozPhoneNumberSize, MozPhoneNumberValue, MozPincodeLength, MozPopoverAppearance, MozPopoverPosition, MozPopoverSize, MozQuantitySelectorSize, MozSegmentedControlSize, MozSegmentedItem, MozSelectOption, MozSelectSize, MozSelectValue, MozSidebarItem, MozSidebarSubItem, MozStarRatingAppearance, MozStarRatingSize, MozStatusBadgeStatus, MozStatusDotSize, MozStatusDotStatus, MozStatusMessageStatus, MozStatusNotificationStatus, MozStepperBottomBarStep, MozStepperInlineStep, MozStepperStackedStep, MozTabItem, MozTagSize, MozTagType, MozTextInputSize, MozTileAppearance, MozTileExpandableTrigger, MozTileInputPosition, MozTileInputVerticalPosition, MozTileSelectableAppearance, MozTileSelectableType, MozToasterPosition, MozToasterRole, MozToasterStatus, MozToggleSize, MozTooltipPosition, PageEvent, PaginationState, PersistedGridState, PopoverConfig, PopoverTriggerMode, RowSelectionEvent, SelectAllMode, SortDef, SortDirection, SortEvent, TreeDisplayRow, TreeNode, TreeNodeConfig, TreeNodeContext, TreeSelectionMode };
|
|
4829
|
+
export { ACTION_LISTBOX_CONFIG, ActionListboxContainerComponent, ActionListboxRef, BuiltInMenuComponent, CellSelectionEngine, CellValidationEngine, ColumnReorderEngine, ColumnResizeEngine, DEFAULT_ACTION_LISTBOX_CONFIG, DEFAULT_FORMULA_FUNCTIONS, DEFAULT_GRID_OPTIONS, DEFAULT_MODAL_CONFIG, DEFAULT_TOASTER_CONFIG, DRAWER_CONFIG, DRAWER_DATA, DrawerContainerComponent, ExpandableRowEngine, ExportEngine, FilterEngine, FormulaEngine, FormulaValues, GridEngine, GridGroupDrawerComponent, GridSettingsDrawerComponent, GridStateManager, GroupEngine, HorizontalVirtualScrollEngine, InfiniteScrollEngine, InlineEditEngine, KeyboardEngine, MODAL_CONFIG, MODAL_DATA, MozAccordionComponent, MozAccordionContentComponent, MozAccordionHeaderComponent, MozAccordionPanelComponent, MozActionBottomBarComponent, MozActionListboxComponent, MozActionListboxTriggerDirective, MozAvatarComponent, MozBreadcrumbComponent, MozButtonComponent, MozCalloutComponent, MozCarouselComponent, MozCheckListMenuComponent, MozCheckboxComponent, MozCheckboxGroupComponent, MozCircularProgressBarComponent, MozComboboxComponent, MozComboboxHarness, MozComboboxOptionHarness, MozDatepickerComponent, MozDividerComponent, MozDrawerComponent, MozDrawerFooterDirective, MozDrawerRef, MozDrawerService, MozFieldComponent, MozFieldGroupComponent, MozFileUploaderComponent, MozFileUploaderItemComponent, MozFlagComponent, MozGridBodyComponent, MozGridCellComponent, MozGridColumnDef, MozGridColumnVisibilityPanelComponent, MozGridComponent, MozGridDetailRowComponent, MozGridEmptyDef, MozGridFooterComponent, MozGridGroupRowComponent, MozGridHeaderCellComponent, MozGridHeaderComponent, MozGridHeaderMenuComponent, MozGridLoadingIndicatorComponent, MozGridRowComponent, MozGridToolbarDef, MozIconButtonComponent, MozKpiComponent, MozLinearProgressBarBufferComponent, MozLinearProgressBarPercentageComponent, MozLinkComponent, MozLoaderComponent, MozLoadingOverlayComponent, MozModalComponent, MozModalFooterDirective, MozModalRef, MozModalService, MozNavigationIndicatorComponent, MozNumberBadgeComponent, MozOverlayComponent, MozPageHeaderComponent, MozPaginationComponent, MozPasswordInputDirective, MozPhoneNumberComponent, MozPincodeInputComponent, MozPopoverComponent, MozPopoverFooterDirective, MozPopoverTriggerDirective, MozQuantitySelectorComponent, MozRadioComponent, MozRadioGroupComponent, MozSegmentedControlComponent, MozSelectComponent, MozSidebarComponent, MozStarRatingComponent, MozStatusBadgeComponent, MozStatusDotComponent, MozStatusMessageComponent, MozStatusNotificationComponent, MozStepperBottomBarComponent, MozStepperCompactComponent, MozStepperInlineComponent, MozStepperStackedComponent, MozTabComponent, MozTabsComponent, MozTagComponent, MozTextInput, MozTextarea, MozTileComponent, MozTileExpandableComponent, MozTileSelectableComponent, MozToasterComponent, MozToasterRef, MozToasterService, MozToggleComponent, MozTooltipComponent, MozTooltipDirective, MozTreeComponent, MozTreeNodeComponent, MozTreeNodeTemplateDirective, POPOVER_CONFIG, POPOVER_DATA, PaginationEngine, PopoverContainerComponent, PopoverRef, PopoverService, RowSelectionEngine, SortEngine, StatePersistenceEngine, TOASTER_CONFIG, TreeEngine, TreeKeyboardService, TreeSelectionService, TreeStateService, addressToA1, firstError, isSection, toBoolean, toNumber, toStringValue, trackByField, trackDisplayRow };
|
|
4830
|
+
export type { ActionListboxConfig, ActionListboxPosition, ActiveFilter, BulkCellChange, BulkCopyEvent, BulkDeleteEvent, BulkEditEvent, BulkPasteEvent, CellAddress, CellCoord, CellEditCancelEvent, CellEditEvent, CellEditState, CellEditorType, CellError, CellRange, CellSelectionEvent, ColumnDef, ColumnFreezeEvent, ColumnReorderEvent, ColumnResizeEvent, ColumnSearchToggleEvent, ColumnStateEntry, ColumnVisibilityEvent, DisplayRow, ExportOptions, FillDownEvent, FilterEvent, FlatNode, FormulaArity, FormulaChangeEvent, FormulaDataSource, FormulaError, FormulaErrorEvent, FormulaEvalContext, FormulaFunctionDocs, FormulaFunctionImpl, FormulaFunctionRegistry, FormulaValue, GridDensity, GridEmptyContext, GridEmptyKind, GridEventMap, GridEventType, GridOptions, GridPlugin, GridSettingsData, GridSettingsResult, GridToolbarSlot, GroupDrawerData, GroupDrawerResult, GroupEntry, GroupEvent, GroupRow, HeaderMenuActionId, HeaderMenuConfig, KeyboardActions, LoadChildrenFn, LoadMoreEvent, LoadingStrategy, MozActionListItem, MozActionListItemAppearance, MozAvatarSize, MozBreadcrumbAppearance, MozBreadcrumbLink, MozBuiltInMenuItem, MozBuiltInMenuItemTarget, MozButtonAppearance, MozButtonIconPosition, MozButtonSize, MozButtonType, MozCalloutVariant, MozCheckListMenuItem, MozCircularProgessBarSize, MozComboboxItem, MozComboboxOption, MozComboboxSection, MozComboboxSize, MozDatepickerSize, MozDividerAppearance, MozDividerOrientation, MozDividerSize, MozDrawerConfig, MozDrawerPosition, MozFileUploaderFormat, MozFileUploaderItemFormat, MozFlagType, MozIconButtonAppearance, MozIconButtonSize, MozIconButtonType, MozKpiSize, MozKpiStatus, MozKpiTrend, MozLinearProgressBarBufferSize, MozLinkAppearance, MozLinkIconPosition, MozLinkSize, MozLoaderAppearance, MozLoaderSize, MozNavigationIndicatorAction, MozNumberBadgeAppearance, MozNumberBadgeSize, MozPageHeaderScope, MozPhoneNumberCountry, MozPhoneNumberSize, MozPhoneNumberValue, MozPincodeLength, MozPopoverAppearance, MozPopoverPosition, MozPopoverSize, MozQuantitySelectorSize, MozSegmentedControlSize, MozSegmentedItem, MozSelectOption, MozSelectSize, MozSelectValue, MozSidebarItem, MozSidebarSubItem, MozStarRatingAppearance, MozStarRatingSize, MozStatusBadgeStatus, MozStatusDotSize, MozStatusDotStatus, MozStatusMessageStatus, MozStatusNotificationStatus, MozStepperBottomBarStep, MozStepperInlineStep, MozStepperStackedStep, MozTabItem, MozTagSize, MozTagType, MozTextInputSize, MozTileAppearance, MozTileExpandableTrigger, MozTileInputPosition, MozTileInputVerticalPosition, MozTileSelectableAppearance, MozTileSelectableType, MozToasterPosition, MozToasterRole, MozToasterStatus, MozToggleSize, MozTooltipPosition, PageEvent, PaginationState, PersistedGridState, PopoverConfig, PopoverTriggerMode, RowSelectionEvent, SelectAllMode, SortDef, SortDirection, SortEvent, TreeDisplayRow, TreeNode, TreeNodeConfig, TreeNodeContext, TreeSelectionMode };
|