@trebco/treb 27.0.0 → 27.1.2
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/dist/treb.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trebco/treb",
|
|
3
|
-
"version": "27.
|
|
3
|
+
"version": "27.1.2",
|
|
4
4
|
"license": "LGPL-3.0-or-later",
|
|
5
5
|
"homepage": "https://treb.app",
|
|
6
6
|
"repository": {
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"devDependencies": {
|
|
14
14
|
"@types/html-minifier": "^4.0.2",
|
|
15
15
|
"@types/node": "^20.4.0",
|
|
16
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
17
|
-
"@typescript-eslint/parser": "^
|
|
16
|
+
"@typescript-eslint/eslint-plugin": "^6.1.0",
|
|
17
|
+
"@typescript-eslint/parser": "^6.1.0",
|
|
18
18
|
"archiver": "^5.3.0",
|
|
19
19
|
"cssnano": "^6.0.0",
|
|
20
20
|
"esbuild": "^0.18.11",
|
|
@@ -811,6 +811,33 @@ export class Calculator extends Graph {
|
|
|
811
811
|
},
|
|
812
812
|
},
|
|
813
813
|
|
|
814
|
+
|
|
815
|
+
/** not sure when this one appeared, but it's what I was looking for */
|
|
816
|
+
FormulaText: {
|
|
817
|
+
description: 'Returns a formula as a string',
|
|
818
|
+
arguments: [
|
|
819
|
+
{ name: 'reference', description: 'Cell reference', metadata: true, },
|
|
820
|
+
],
|
|
821
|
+
fn: Utilities.ApplyAsArray((reference: UnionValue): UnionValue => {
|
|
822
|
+
|
|
823
|
+
if (!UnionIsMetadata(reference)) {
|
|
824
|
+
return ReferenceError();
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
const sheet = this.model.sheets.Find(reference.value?.address?.sheet_id || 0);
|
|
828
|
+
if (sheet) {
|
|
829
|
+
const cell = sheet.cells.GetCell(reference.value.address, false);
|
|
830
|
+
return {
|
|
831
|
+
type: ValueType.string,
|
|
832
|
+
value: cell?.value?.toString() || '',
|
|
833
|
+
};
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
return ReferenceError();
|
|
837
|
+
|
|
838
|
+
}),
|
|
839
|
+
},
|
|
840
|
+
|
|
814
841
|
/**
|
|
815
842
|
* this should be in the 'information' library but it needs reference
|
|
816
843
|
* to the underlying cell (unresolved)
|
|
@@ -38,6 +38,13 @@
|
|
|
38
38
|
* UPDATE: back to sass, but still using this file (compiles fine)
|
|
39
39
|
*/
|
|
40
40
|
|
|
41
|
+
.treb-main.treb-main .treb-chart, .treb-chart {
|
|
42
|
+
|
|
43
|
+
// this was getting lost by the new higher-specificity reset
|
|
44
|
+
background: var(--treb-chart-background, #fff);
|
|
45
|
+
|
|
46
|
+
}
|
|
47
|
+
|
|
41
48
|
|
|
42
49
|
/* container style */
|
|
43
50
|
.treb-chart {
|
|
@@ -48,7 +55,7 @@
|
|
|
48
55
|
* of times we have to define the same colors.
|
|
49
56
|
*/
|
|
50
57
|
|
|
51
|
-
background: var(--treb-chart-background, #fff);
|
|
58
|
+
// moved // background: var(--treb-chart-background, #fff);
|
|
52
59
|
|
|
53
60
|
.series-1 { color: var(--treb-chart-color-series-1, #80B1D3); }
|
|
54
61
|
.series-2 { color: var(--treb-chart-color-series-2, #8DD3C7); }
|
|
@@ -887,6 +887,9 @@ export class EmbeddedSpreadsheet {
|
|
|
887
887
|
if (data) {
|
|
888
888
|
this.LoadDocument(data as TREBDocument, { recalculate: !!this.options.recalculate, source});
|
|
889
889
|
}
|
|
890
|
+
else {
|
|
891
|
+
this.UpdateDocumentStyles();
|
|
892
|
+
}
|
|
890
893
|
}
|
|
891
894
|
else if (!network_document) {
|
|
892
895
|
|
|
@@ -894,6 +897,7 @@ export class EmbeddedSpreadsheet {
|
|
|
894
897
|
// and the calculator, which would otherwise happen on document load
|
|
895
898
|
|
|
896
899
|
this.calculator.RebuildClean(true);
|
|
900
|
+
this.UpdateDocumentStyles();
|
|
897
901
|
|
|
898
902
|
}
|
|
899
903
|
|
|
@@ -2410,17 +2414,7 @@ export class EmbeddedSpreadsheet {
|
|
|
2410
2414
|
}
|
|
2411
2415
|
|
|
2412
2416
|
if (blob) {
|
|
2413
|
-
|
|
2414
|
-
/*
|
|
2415
|
-
const a = document.createElement('a');
|
|
2416
|
-
a.href = URL.createObjectURL(blob);
|
|
2417
|
-
a.download = filename + '.xlsx';
|
|
2418
|
-
a.click();
|
|
2419
|
-
URL.revokeObjectURL(a.href);
|
|
2420
|
-
// FileSaver.saveAs(blob, filename + '.xlsx', { autoBom: false });
|
|
2421
|
-
*/
|
|
2422
2417
|
this.SaveAs(blob, filename + '.xlsx');
|
|
2423
|
-
|
|
2424
2418
|
this.last_save_version = this.file_version; // even though it's an export, consider it clean
|
|
2425
2419
|
}
|
|
2426
2420
|
|