@trebco/treb 21.7.0 → 22.12.1
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/package.json +1 -1
- package/treb-bundle.css +2 -2
- package/treb-bundle.mjs +11 -11
- package/treb.d.ts +30 -5
package/treb.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! API
|
|
1
|
+
/*! API v22.12. Copyright 2018-2022 trebco, llc. All rights reserved. LGPL: https://treb.app/license */
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Global instance. In the base script, this object will be created as an
|
|
@@ -203,13 +203,17 @@ export declare class EmbeddedSpreadsheet {
|
|
|
203
203
|
AddSheet(name?: string): void;
|
|
204
204
|
|
|
205
205
|
/**
|
|
206
|
-
* Insert an annotation node. Usually this means inserting a chart.
|
|
206
|
+
* Insert an annotation node. Usually this means inserting a chart. Regarding
|
|
207
|
+
* the argument separator, see the Evaluate function.
|
|
207
208
|
*
|
|
208
209
|
* @param formula - annotation formula. For charts, the chart formula.
|
|
209
210
|
* @param type - annotation type. Defaults to `treb-chart`.
|
|
210
211
|
* @param rect - coordinates, or a range reference for layout.
|
|
212
|
+
*
|
|
213
|
+
* @param argument_separator - the argument separator to use when evaluating
|
|
214
|
+
* the function. defaults to current locale.
|
|
211
215
|
*/
|
|
212
|
-
InsertAnnotation(formula: string, type?: string, rect?: IRectangle | RangeReference): void;
|
|
216
|
+
InsertAnnotation(formula: string, type?: string, rect?: IRectangle | RangeReference, argument_separator?: ',' | ';'): void;
|
|
213
217
|
|
|
214
218
|
/**
|
|
215
219
|
* Insert an image. This method will open a file chooser and (if an image
|
|
@@ -545,9 +549,29 @@ export declare class EmbeddedSpreadsheet {
|
|
|
545
549
|
* use sheet names when referring to cells, to avoid ambiguity. Otherwise
|
|
546
550
|
* cell references will resolve to the active sheet.
|
|
547
551
|
*
|
|
552
|
+
* By default, this function will evaluate the expression in the current
|
|
553
|
+
* locale, meaning it will use the current locale's decimal separator and
|
|
554
|
+
* argument separator.
|
|
555
|
+
*
|
|
556
|
+
* If you do not want that behavior, set the argument separator explicitly.
|
|
557
|
+
* That will force evaluation using either comma (,) or semicolon (;) as the
|
|
558
|
+
* argument separator.
|
|
559
|
+
*
|
|
560
|
+
* Decimal separator is implied by the argument separator. If you set the
|
|
561
|
+
* argument separator to comma, the decimal separator will be dot (.). If you
|
|
562
|
+
* set the argument separator to semicolon, the decimal separator will be
|
|
563
|
+
* comma (,). You cannot mix-and-match these characters.
|
|
564
|
+
*
|
|
565
|
+
* Since you may not know where the code is being executed at run-time,
|
|
566
|
+
* using consistent argument and decimal separators makes sense. However we
|
|
567
|
+
* are leaving the original behavior as default for backwards compatibility.
|
|
568
|
+
*
|
|
569
|
+
* @param expression - an expression in spreadsheet language
|
|
570
|
+
* @param argument_separator - comma or semicolon, or leave undefined to use current locale
|
|
571
|
+
*
|
|
548
572
|
* @public
|
|
549
573
|
*/
|
|
550
|
-
Evaluate(expression: string): CellValue | CellValue[][];
|
|
574
|
+
Evaluate(expression: string, argument_separator?: ',' | ';'): CellValue | CellValue[][];
|
|
551
575
|
|
|
552
576
|
/**
|
|
553
577
|
* Returns the current selection, as a string address or range.
|
|
@@ -639,7 +663,8 @@ export declare class EmbeddedSpreadsheet {
|
|
|
639
663
|
SetLink(address?: AddressReference, target?: string): void;
|
|
640
664
|
|
|
641
665
|
/**
|
|
642
|
-
* Select a range.
|
|
666
|
+
* Select a range. This function will change sheets if your reference
|
|
667
|
+
* refers to a different sheet.
|
|
643
668
|
*
|
|
644
669
|
* @public
|
|
645
670
|
*/
|