@masterteam/components 0.0.280 → 0.0.281
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/assets/i18n/ar.json +368 -366
- package/assets/i18n/en.json +368 -366
- package/fesm2022/masterteam-components-formula.mjs +82 -3
- package/fesm2022/masterteam-components-formula.mjs.map +1 -1
- package/package.json +1 -1
- package/types/masterteam-components-formula.d.ts +63 -2
package/package.json
CHANGED
|
@@ -477,6 +477,22 @@ interface FormulaToolbarPropertyItem {
|
|
|
477
477
|
key: string;
|
|
478
478
|
name?: string;
|
|
479
479
|
description?: string;
|
|
480
|
+
/**
|
|
481
|
+
* Marks a property whose comparison values come from a real source (a
|
|
482
|
+
* lookup, a lookup matrix, a status set) instead of being typed by hand.
|
|
483
|
+
* The toolbar renders a values toggle on such chips and asks the host for
|
|
484
|
+
* the items through `onPropertyValuesRequest`.
|
|
485
|
+
*/
|
|
486
|
+
hasValues?: boolean;
|
|
487
|
+
}
|
|
488
|
+
/**
|
|
489
|
+
* One selectable value of a value-backed property. `key` is what the formula
|
|
490
|
+
* stores and what the engine compares against; `name` is only the label shown
|
|
491
|
+
* on the chip.
|
|
492
|
+
*/
|
|
493
|
+
interface FormulaToolbarValueItem {
|
|
494
|
+
key: string;
|
|
495
|
+
name: string;
|
|
480
496
|
}
|
|
481
497
|
interface OperatorGroup {
|
|
482
498
|
type: string;
|
|
@@ -490,6 +506,14 @@ declare class FormulaToolbar {
|
|
|
490
506
|
readonly propertiesTemplate: _angular_core.InputSignal<TemplateRef<FormulaToolbarPropertiesContext> | null>;
|
|
491
507
|
/** Projected properties template */
|
|
492
508
|
readonly projectedPropertiesTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
509
|
+
/**
|
|
510
|
+
* Values of value-backed properties, keyed by property key. Supplied by the
|
|
511
|
+
* host (usually lazily, in response to `onPropertyValuesRequest`); a key
|
|
512
|
+
* present here — even with an empty array — counts as loaded.
|
|
513
|
+
*/
|
|
514
|
+
readonly propertyValues: _angular_core.InputSignal<Record<string, readonly FormulaToolbarValueItem[]>>;
|
|
515
|
+
/** Property key whose values are currently being fetched by the host. */
|
|
516
|
+
readonly loadingValuesFor: _angular_core.InputSignal<string | null>;
|
|
493
517
|
/** Function categories (from API or static data) */
|
|
494
518
|
readonly functionCategories: _angular_core.InputSignal<FunctionCategoryGroup[]>;
|
|
495
519
|
/** Operators list (overridable) */
|
|
@@ -508,11 +532,18 @@ declare class FormulaToolbar {
|
|
|
508
532
|
noFunctionsFound?: string;
|
|
509
533
|
noPropertiesAvailable?: string;
|
|
510
534
|
noOperatorsFound?: string;
|
|
535
|
+
values?: string;
|
|
536
|
+
noValuesAvailable?: string;
|
|
511
537
|
}>;
|
|
512
538
|
/** Insert event - emits SmartBlock for the editor */
|
|
513
539
|
readonly onBlockInsert: _angular_core.OutputEmitterRef<SmartBlock>;
|
|
514
540
|
/** Tab change event */
|
|
515
541
|
readonly onTabChange: _angular_core.OutputEmitterRef<ToolbarTab>;
|
|
542
|
+
/**
|
|
543
|
+
* A value-backed property was expanded and its values are not in
|
|
544
|
+
* `propertyValues` yet — the host should fetch them for this key.
|
|
545
|
+
*/
|
|
546
|
+
readonly onPropertyValuesRequest: _angular_core.OutputEmitterRef<string>;
|
|
516
547
|
/** Active tab */
|
|
517
548
|
readonly activeTab: _angular_core.WritableSignal<ToolbarTab>;
|
|
518
549
|
/** Tab options */
|
|
@@ -529,6 +560,8 @@ declare class FormulaToolbar {
|
|
|
529
560
|
protected readonly propertiesTemplateContext: FormulaToolbarPropertiesContext;
|
|
530
561
|
/** Resolve properties template (projected first, input fallback) */
|
|
531
562
|
readonly resolvedPropertiesTemplate: _angular_core.Signal<TemplateRef<any> | null>;
|
|
563
|
+
/** Property key whose value list is currently expanded, if any. */
|
|
564
|
+
readonly expandedPropertyKey: _angular_core.WritableSignal<string | null>;
|
|
532
565
|
/** Search query */
|
|
533
566
|
readonly searchQuery: _angular_core.WritableSignal<string>;
|
|
534
567
|
/** Custom value input */
|
|
@@ -552,6 +585,20 @@ declare class FormulaToolbar {
|
|
|
552
585
|
readonly propertyItems: _angular_core.Signal<FormulaToolbarPropertyItem[]>;
|
|
553
586
|
/** Filtered properties based on search */
|
|
554
587
|
readonly filteredProperties: _angular_core.Signal<FormulaToolbarPropertyItem[]>;
|
|
588
|
+
/**
|
|
589
|
+
* The expanded property, but only while it survives the current search —
|
|
590
|
+
* filtering it away collapses the panel without touching the stored key.
|
|
591
|
+
*/
|
|
592
|
+
readonly expandedProperty: _angular_core.Signal<FormulaToolbarPropertyItem | null>;
|
|
593
|
+
/** Values of the expanded property, or an empty list while none is open. */
|
|
594
|
+
readonly expandedPropertyValues: _angular_core.Signal<readonly FormulaToolbarValueItem[]>;
|
|
595
|
+
/** True while the expanded property's values are still being fetched. */
|
|
596
|
+
readonly isLoadingExpandedValues: _angular_core.Signal<boolean>;
|
|
597
|
+
/**
|
|
598
|
+
* True when the expanded property finished loading and genuinely has no
|
|
599
|
+
* values — distinct from "still loading", so the empty note does not flash.
|
|
600
|
+
*/
|
|
601
|
+
readonly hasNoExpandedValues: _angular_core.Signal<boolean>;
|
|
555
602
|
/** Operators translated through the active locale */
|
|
556
603
|
private readonly translatedOperators;
|
|
557
604
|
/** Filtered operators based on search */
|
|
@@ -581,6 +628,8 @@ declare class FormulaToolbar {
|
|
|
581
628
|
readonly labelNoFunctions: _angular_core.Signal<string>;
|
|
582
629
|
readonly labelNoProperties: _angular_core.Signal<string>;
|
|
583
630
|
readonly labelNoOperators: _angular_core.Signal<string>;
|
|
631
|
+
readonly labelValues: _angular_core.Signal<string>;
|
|
632
|
+
readonly labelNoValues: _angular_core.Signal<string>;
|
|
584
633
|
/** Get count for a specific tab (filtered when searching) */
|
|
585
634
|
getTabCount(tab: ToolbarTab): number;
|
|
586
635
|
/** Check if a tab has results when searching */
|
|
@@ -591,12 +640,24 @@ declare class FormulaToolbar {
|
|
|
591
640
|
insertBlock(block: SmartBlock): void;
|
|
592
641
|
/** Clear search */
|
|
593
642
|
clearSearch(): void;
|
|
643
|
+
/**
|
|
644
|
+
* Open (or close) the value list of a value-backed property, asking the host
|
|
645
|
+
* to load the items the first time that key is opened.
|
|
646
|
+
*/
|
|
647
|
+
togglePropertyValues(property: FormulaToolbarPropertyItem): void;
|
|
648
|
+
/** Whether a property's value list is the one currently expanded. */
|
|
649
|
+
isPropertyExpanded(propertyKey: string): boolean;
|
|
650
|
+
/**
|
|
651
|
+
* Insert a picked value as a literal. The item's `key` is what gets stored
|
|
652
|
+
* and compared; the name rides along as the chip's display label only.
|
|
653
|
+
*/
|
|
654
|
+
insertPropertyValue(item: FormulaToolbarValueItem): void;
|
|
594
655
|
/** Insert custom value */
|
|
595
656
|
insertCustomValue(): void;
|
|
596
657
|
/** Clear custom value input */
|
|
597
658
|
clearCustomValue(): void;
|
|
598
659
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FormulaToolbar, never>;
|
|
599
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FormulaToolbar, "mt-formula-toolbar", never, { "knownProperties": { "alias": "knownProperties"; "required": false; "isSignal": true; }; "propertiesTemplate": { "alias": "propertiesTemplate"; "required": false; "isSignal": true; }; "functionCategories": { "alias": "functionCategories"; "required": false; "isSignal": true; }; "operators": { "alias": "operators"; "required": false; "isSignal": true; }; "initialTab": { "alias": "initialTab"; "required": false; "isSignal": true; }; "visibleTabs": { "alias": "visibleTabs"; "required": false; "isSignal": true; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; "isSignal": true; }; "labels": { "alias": "labels"; "required": false; "isSignal": true; }; }, { "onBlockInsert": "onBlockInsert"; "onTabChange": "onTabChange"; }, ["projectedPropertiesTemplate"], never, true, never>;
|
|
660
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FormulaToolbar, "mt-formula-toolbar", never, { "knownProperties": { "alias": "knownProperties"; "required": false; "isSignal": true; }; "propertiesTemplate": { "alias": "propertiesTemplate"; "required": false; "isSignal": true; }; "propertyValues": { "alias": "propertyValues"; "required": false; "isSignal": true; }; "loadingValuesFor": { "alias": "loadingValuesFor"; "required": false; "isSignal": true; }; "functionCategories": { "alias": "functionCategories"; "required": false; "isSignal": true; }; "operators": { "alias": "operators"; "required": false; "isSignal": true; }; "initialTab": { "alias": "initialTab"; "required": false; "isSignal": true; }; "visibleTabs": { "alias": "visibleTabs"; "required": false; "isSignal": true; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; "isSignal": true; }; "labels": { "alias": "labels"; "required": false; "isSignal": true; }; }, { "onBlockInsert": "onBlockInsert"; "onTabChange": "onTabChange"; "onPropertyValuesRequest": "onPropertyValuesRequest"; }, ["projectedPropertiesTemplate"], never, true, never>;
|
|
600
661
|
}
|
|
601
662
|
|
|
602
663
|
declare const OPERATOR_SYMBOL_TO_TRANSLATION_KEY: Record<string, string>;
|
|
@@ -756,4 +817,4 @@ declare class FormulaRuntimeEngine {
|
|
|
756
817
|
}
|
|
757
818
|
|
|
758
819
|
export { CONDITION_FUNCTION_CATEGORIES, CONDITION_OPERATORS, CONDITION_RUNTIME_CATALOG, DEFAULT_OPERATORS, FormulaEditor, FormulaEditorCode, FormulaRuntimeEngine, FormulaStatusBar, FormulaToolbar, FormulaToolbarItem, OPERATOR_SYMBOL_TO_TRANSLATION_KEY, VALIDATION_FUNCTION_CATEGORIES, VALIDATION_OPERATORS, VALIDATION_RUNTIME_CATALOG, cloneBlock, cloneToken, cloneTokens, createFunctionBlock, createFunctionTokens, createLiteralBlock, createLiteralToken, createOperatorBlock, createOperatorToken, createPropertyBlock, createPropertyToken, createTextToken, findFunctionRange, generateFunctionId, generateSmartBlockId, generateTokenId, getArgumentIndexAtPosition, getFunctionTokens, isValidDropPosition, parseSignature, recalculateDepths, serializeTokens, serializeTokensForDisplay, shouldInsertSpace, tokenizeFormulaTemplate };
|
|
759
|
-
export type { ApiErrorResponse, ArgumentSlot, AutocompleteContext, AutocompleteRequest, AutocompleteResponse, AutocompleteSuggestion, BlockType, DragBehavior, ExampleItem, FormulaConditionEvaluation, FormulaEvaluationContext, FormulaRuntimeCatalog, FormulaRuntimeDomain, FormulaRuntimeEngineError, FormulaRuntimeEngineErrorCode, FormulaToken, FormulaToolbarPropertiesContext, FormulaToolbarPropertyItem, FormulaValidationEvaluation, FormulaValidationRulesEvaluation, FunctionCategory, FunctionCategoryGroup, FunctionDefinition, FunctionExample, FunctionInfo, OperatorDefinition, ParameterDefinition, SmartBlock, TokenType, ToolbarItemType, ToolbarTab, ValidationError, ValidationRequest, ValidationResult, ValidationSeverity, ValidationWarning };
|
|
820
|
+
export type { ApiErrorResponse, ArgumentSlot, AutocompleteContext, AutocompleteRequest, AutocompleteResponse, AutocompleteSuggestion, BlockType, DragBehavior, ExampleItem, FormulaConditionEvaluation, FormulaEvaluationContext, FormulaRuntimeCatalog, FormulaRuntimeDomain, FormulaRuntimeEngineError, FormulaRuntimeEngineErrorCode, FormulaToken, FormulaToolbarPropertiesContext, FormulaToolbarPropertyItem, FormulaToolbarValueItem, FormulaValidationEvaluation, FormulaValidationRulesEvaluation, FunctionCategory, FunctionCategoryGroup, FunctionDefinition, FunctionExample, FunctionInfo, OperatorDefinition, ParameterDefinition, SmartBlock, TokenType, ToolbarItemType, ToolbarTab, ValidationError, ValidationRequest, ValidationResult, ValidationSeverity, ValidationWarning };
|