@masterteam/components 0.0.85 → 0.0.86
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/assets/common.css +1 -1
- package/fesm2022/masterteam-components-formula.mjs +674 -7
- package/fesm2022/masterteam-components-formula.mjs.map +1 -1
- package/fesm2022/masterteam-components-pick-list-field.mjs +14 -0
- package/fesm2022/masterteam-components-pick-list-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-sidebar.mjs +2 -2
- package/fesm2022/masterteam-components-sidebar.mjs.map +1 -1
- package/fesm2022/masterteam-components-table.mjs +2 -2
- package/fesm2022/masterteam-components-table.mjs.map +1 -1
- package/fesm2022/masterteam-components-tree.mjs +14 -0
- package/fesm2022/masterteam-components-tree.mjs.map +1 -1
- package/fesm2022/masterteam-components-user-search-field.mjs.map +1 -1
- package/fesm2022/masterteam-components.mjs +1 -1
- package/fesm2022/masterteam-components.mjs.map +1 -1
- package/package.json +3 -2
- package/types/masterteam-components-formula.d.ts +72 -4
- package/types/masterteam-components-pick-list-field.d.ts +1 -0
- package/types/masterteam-components-tree.d.ts +1 -0
- package/types/masterteam-components-user-search-field.d.ts +1 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { TemplateRef } from '@angular/core';
|
|
2
|
+
import { AfterViewInit, OnDestroy, TemplateRef } from '@angular/core';
|
|
3
3
|
import { ControlValueAccessor } from '@angular/forms';
|
|
4
4
|
import { CdkDragStart, CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
5
|
+
import { Observable } from 'rxjs';
|
|
5
6
|
import * as _masterteam_components_formula from '@masterteam/components/formula';
|
|
6
7
|
|
|
7
8
|
/**
|
|
@@ -189,10 +190,11 @@ interface ValidationRequest {
|
|
|
189
190
|
interface AutocompleteSuggestion {
|
|
190
191
|
text: string;
|
|
191
192
|
displayText: string;
|
|
192
|
-
type: 'Function' | 'Property' | 'Operator' | 'Context';
|
|
193
|
+
type: 'Function' | 'Property' | 'Operator' | 'Context' | 'Keyword';
|
|
193
194
|
description: string;
|
|
194
195
|
insertText: string;
|
|
195
196
|
category?: string;
|
|
197
|
+
cursorOffset?: number;
|
|
196
198
|
}
|
|
197
199
|
/** Autocomplete context */
|
|
198
200
|
interface AutocompleteContext {
|
|
@@ -211,6 +213,7 @@ interface AutocompleteRequest {
|
|
|
211
213
|
cursorPosition: number;
|
|
212
214
|
knownProperties?: string[];
|
|
213
215
|
levelSchemaId?: number;
|
|
216
|
+
contextEntityTypeKey?: string;
|
|
214
217
|
}
|
|
215
218
|
/** API error response */
|
|
216
219
|
interface ApiErrorResponse {
|
|
@@ -260,6 +263,7 @@ declare class FormulaEditor implements ControlValueAccessor {
|
|
|
260
263
|
readonly placeholder: _angular_core.InputSignal<string>;
|
|
261
264
|
readonly initialTokens: _angular_core.InputSignal<FormulaToken[]>;
|
|
262
265
|
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
266
|
+
readonly borderless: _angular_core.InputSignal<boolean>;
|
|
263
267
|
readonly formulaChange: _angular_core.OutputEmitterRef<string>;
|
|
264
268
|
readonly tokensChange: _angular_core.OutputEmitterRef<FormulaToken[]>;
|
|
265
269
|
readonly onBlur: _angular_core.OutputEmitterRef<void>;
|
|
@@ -275,6 +279,8 @@ declare class FormulaEditor implements ControlValueAccessor {
|
|
|
275
279
|
readonly isFocused: _angular_core.WritableSignal<boolean>;
|
|
276
280
|
private onChange;
|
|
277
281
|
private onTouched;
|
|
282
|
+
readonly containerClasses: _angular_core.Signal<"flex min-h-20 font-mono text-sm bg-white dark:bg-surface-800" | "flex min-h-20 font-mono text-sm bg-white dark:bg-surface-800 border border-surface-200 dark:border-surface-700 rounded-md focus-within:border-primary focus-within:ring-2 focus-within:ring-primary/10">;
|
|
283
|
+
readonly lineNumberClasses: _angular_core.Signal<"flex flex-col px-1.5 py-2 bg-surface-50 dark:bg-surface-900 border-r border-surface-200 dark:border-surface-700 select-none min-w-6 text-right" | "flex flex-col px-1.5 py-2 bg-surface-50 dark:bg-surface-900 border-r border-surface-200 dark:border-surface-700 select-none min-w-6 text-right rounded-l-md">;
|
|
278
284
|
/** Line numbers based on token count */
|
|
279
285
|
readonly lines: _angular_core.Signal<any[]>;
|
|
280
286
|
/** Serialized formula string */
|
|
@@ -351,7 +357,69 @@ declare class FormulaEditor implements ControlValueAccessor {
|
|
|
351
357
|
*/
|
|
352
358
|
trackByToken(_index: number, token: FormulaToken): string;
|
|
353
359
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FormulaEditor, never>;
|
|
354
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FormulaEditor, "mt-formula-editor", never, { "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "initialTokens": { "alias": "initialTokens"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "formulaChange": "formulaChange"; "tokensChange": "tokensChange"; "onBlur": "onBlur"; "onFocus": "onFocus"; }, never, never, true, never>;
|
|
360
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FormulaEditor, "mt-formula-editor", never, { "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "initialTokens": { "alias": "initialTokens"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "borderless": { "alias": "borderless"; "required": false; "isSignal": true; }; }, { "formulaChange": "formulaChange"; "tokensChange": "tokensChange"; "onBlur": "onBlur"; "onFocus": "onFocus"; }, never, never, true, never>;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
type AutocompleteProvider = (request: AutocompleteRequest) => AutocompleteResponse | Promise<AutocompleteResponse | null> | Observable<AutocompleteResponse | null> | null;
|
|
364
|
+
declare class FormulaEditorCode implements ControlValueAccessor, AfterViewInit, OnDestroy {
|
|
365
|
+
readonly placeholder: _angular_core.InputSignal<string>;
|
|
366
|
+
readonly initialFormula: _angular_core.InputSignal<string>;
|
|
367
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
368
|
+
readonly language: _angular_core.InputSignal<string>;
|
|
369
|
+
readonly theme: _angular_core.InputSignal<"vs" | "vs-dark" | "hc-black" | "formula-light" | "formula-dark">;
|
|
370
|
+
readonly borderless: _angular_core.InputSignal<boolean>;
|
|
371
|
+
readonly autocompleteProvider: _angular_core.InputSignal<AutocompleteProvider | null>;
|
|
372
|
+
readonly autocompleteDebounceMs: _angular_core.InputSignal<number>;
|
|
373
|
+
readonly formulaChange: _angular_core.OutputEmitterRef<string>;
|
|
374
|
+
readonly onBlur: _angular_core.OutputEmitterRef<void>;
|
|
375
|
+
readonly onFocus: _angular_core.OutputEmitterRef<void>;
|
|
376
|
+
private readonly editorHost;
|
|
377
|
+
private readonly zone;
|
|
378
|
+
private monaco;
|
|
379
|
+
private editor;
|
|
380
|
+
private model;
|
|
381
|
+
private readonly disposables;
|
|
382
|
+
private resizeObserver;
|
|
383
|
+
private completionProvider;
|
|
384
|
+
private readonly autocompleteSubject;
|
|
385
|
+
private autocompleteSubscription;
|
|
386
|
+
private readonly cancelAutocomplete$;
|
|
387
|
+
private currentAutocompleteRequestId;
|
|
388
|
+
private static formulaAssetsReady;
|
|
389
|
+
readonly value: _angular_core.WritableSignal<string>;
|
|
390
|
+
readonly isFocused: _angular_core.WritableSignal<boolean>;
|
|
391
|
+
readonly showPlaceholder: _angular_core.Signal<boolean>;
|
|
392
|
+
readonly containerClasses: _angular_core.Signal<"relative flex min-h-20 flex-col bg-white dark:bg-surface-800 font-mono text-sm" | "relative flex min-h-20 flex-col bg-white dark:bg-surface-800 font-mono text-sm rounded-md border border-surface-200 dark:border-surface-700 focus-within:border-primary focus-within:ring-2 focus-within:ring-primary/10">;
|
|
393
|
+
private hasWrittenValue;
|
|
394
|
+
private isApplyingExternalValue;
|
|
395
|
+
private onChange;
|
|
396
|
+
private onTouched;
|
|
397
|
+
constructor();
|
|
398
|
+
ngAfterViewInit(): void;
|
|
399
|
+
ngOnDestroy(): void;
|
|
400
|
+
writeValue(value: string | null): void;
|
|
401
|
+
registerOnChange(fn: (value: string) => void): void;
|
|
402
|
+
registerOnTouched(fn: () => void): void;
|
|
403
|
+
addBlock(block: SmartBlock): void;
|
|
404
|
+
insertText(text: string, cursorOffset?: number): void;
|
|
405
|
+
clear(): void;
|
|
406
|
+
getValue(): string;
|
|
407
|
+
private initEditor;
|
|
408
|
+
private ensureFormulaAssets;
|
|
409
|
+
private attachEditorListeners;
|
|
410
|
+
private setupResizeObserver;
|
|
411
|
+
private scheduleAutocomplete;
|
|
412
|
+
private setupAutocompleteStream;
|
|
413
|
+
private registerCompletionProvider;
|
|
414
|
+
private resolveAutocompleteResponse;
|
|
415
|
+
private applyCursorOffset;
|
|
416
|
+
private mapSuggestionKind;
|
|
417
|
+
private syncEditorValue;
|
|
418
|
+
private smartBlockToText;
|
|
419
|
+
private formatLiteral;
|
|
420
|
+
private emitValue;
|
|
421
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FormulaEditorCode, never>;
|
|
422
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FormulaEditorCode, "mt-formula-editor-code", never, { "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "initialFormula": { "alias": "initialFormula"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "language": { "alias": "language"; "required": false; "isSignal": true; }; "theme": { "alias": "theme"; "required": false; "isSignal": true; }; "borderless": { "alias": "borderless"; "required": false; "isSignal": true; }; "autocompleteProvider": { "alias": "autocompleteProvider"; "required": false; "isSignal": true; }; "autocompleteDebounceMs": { "alias": "autocompleteDebounceMs"; "required": false; "isSignal": true; }; }, { "formulaChange": "formulaChange"; "onBlur": "onBlur"; "onFocus": "onFocus"; }, never, never, true, never>;
|
|
355
423
|
}
|
|
356
424
|
|
|
357
425
|
type ToolbarTab = 'functions' | 'properties' | 'operators';
|
|
@@ -522,5 +590,5 @@ declare class FormulaStatusBar {
|
|
|
522
590
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FormulaStatusBar, "mt-formula-status-bar", never, { "validation": { "alias": "validation"; "required": false; "isSignal": true; }; "labels": { "alias": "labels"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
523
591
|
}
|
|
524
592
|
|
|
525
|
-
export { DEFAULT_OPERATORS, FormulaEditor, FormulaStatusBar, FormulaToolbar, FormulaToolbarItem, cloneBlock, cloneToken, cloneTokens, createFunctionBlock, createFunctionTokens, createLiteralBlock, createLiteralToken, createOperatorBlock, createOperatorToken, createPropertyBlock, createPropertyToken, findFunctionRange, generateFunctionId, generateSmartBlockId, generateTokenId, getArgumentIndexAtPosition, getFunctionTokens, isValidDropPosition, parseSignature, recalculateDepths, serializeTokens };
|
|
593
|
+
export { DEFAULT_OPERATORS, FormulaEditor, FormulaEditorCode, FormulaStatusBar, FormulaToolbar, FormulaToolbarItem, cloneBlock, cloneToken, cloneTokens, createFunctionBlock, createFunctionTokens, createLiteralBlock, createLiteralToken, createOperatorBlock, createOperatorToken, createPropertyBlock, createPropertyToken, findFunctionRange, generateFunctionId, generateSmartBlockId, generateTokenId, getArgumentIndexAtPosition, getFunctionTokens, isValidDropPosition, parseSignature, recalculateDepths, serializeTokens };
|
|
526
594
|
export type { ApiErrorResponse, ArgumentSlot, AutocompleteContext, AutocompleteRequest, AutocompleteResponse, AutocompleteSuggestion, BlockType, DragBehavior, ExampleItem, FormulaToken, FormulaToolbarPropertiesContext, FunctionCategory, FunctionCategoryGroup, FunctionDefinition, FunctionInfo, OperatorDefinition, ParameterDefinition, SmartBlock, TokenType, ToolbarItemType, ToolbarTab, ValidationError, ValidationRequest, ValidationResult, ValidationSeverity, ValidationWarning };
|
|
@@ -45,6 +45,7 @@ declare class PickListField implements ControlValueAccessor, OnInit {
|
|
|
45
45
|
onInteractiveChange(): void;
|
|
46
46
|
handleBlur(): void;
|
|
47
47
|
displayLabel(item: any): string;
|
|
48
|
+
private getNestedValue;
|
|
48
49
|
private syncLists;
|
|
49
50
|
private syncFromPickList;
|
|
50
51
|
private normalizeValueToOptions;
|
|
@@ -70,6 +70,7 @@ declare class Tree {
|
|
|
70
70
|
CheckAllValue: _angular_core.WritableSignal<boolean>;
|
|
71
71
|
readonly treeValue: Signal<TreeNode[]>;
|
|
72
72
|
constructor();
|
|
73
|
+
private isProcessingBatchSelection;
|
|
73
74
|
onSelectionChange(event: TreeNode | TreeNode[] | null): void;
|
|
74
75
|
onNodeSelect(event: {
|
|
75
76
|
node: TreeNode;
|