@masterteam/components 0.0.285 → 0.0.286
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/i18n/ar.json +1 -1
- package/assets/i18n/en.json +1 -1
- package/fesm2022/masterteam-components-business-fields.mjs +49 -13
- package/fesm2022/masterteam-components-business-fields.mjs.map +1 -1
- package/fesm2022/masterteam-components-entities.mjs +48 -8
- package/fesm2022/masterteam-components-entities.mjs.map +1 -1
- package/fesm2022/masterteam-components-formula.mjs +12 -1
- package/fesm2022/masterteam-components-formula.mjs.map +1 -1
- package/package.json +1 -1
- package/types/masterteam-components-business-fields.d.ts +3 -1
- package/types/masterteam-components-entities.d.ts +45 -2
- package/types/masterteam-components-formula.d.ts +12 -0
|
@@ -2687,9 +2687,20 @@ class FormulaToolbar {
|
|
|
2687
2687
|
/**
|
|
2688
2688
|
* Insert a picked value as a literal. The item's `key` is what gets stored
|
|
2689
2689
|
* and compared; the name rides along as the chip's display label only.
|
|
2690
|
+
*
|
|
2691
|
+
* A numeric item serializes as a number literal rather than a quoted string —
|
|
2692
|
+
* `createLiteralBlock` keeps the JS type on `literalValue`, which is what the
|
|
2693
|
+
* editor reads to stamp `literalType`. Never infer this from the key looking
|
|
2694
|
+
* numeric: lookup keys fall back to the item id and still compare as strings.
|
|
2690
2695
|
*/
|
|
2691
2696
|
insertPropertyValue(item) {
|
|
2692
|
-
|
|
2697
|
+
const numeric = Number(item.key);
|
|
2698
|
+
const value = item.valueType === 'number' &&
|
|
2699
|
+
item.key.trim() !== '' &&
|
|
2700
|
+
Number.isFinite(numeric)
|
|
2701
|
+
? numeric
|
|
2702
|
+
: item.key;
|
|
2703
|
+
this.insertBlock({ ...createLiteralBlock(value), display: item.name });
|
|
2693
2704
|
}
|
|
2694
2705
|
/** Insert custom value */
|
|
2695
2706
|
insertCustomValue() {
|