@trebco/treb 32.3.3 → 32.5.0
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/README.md +0 -6
- package/dist/treb-spreadsheet.mjs +10 -10
- package/package.json +2 -2
- package/treb-base-types/src/api_types.ts +1 -1
- package/treb-base-types/src/area-utils.ts +1 -1
- package/treb-base-types/src/area.ts +1 -1
- package/treb-base-types/src/basic_types.ts +1 -1
- package/treb-base-types/src/cell.ts +1 -1
- package/treb-base-types/src/cells.ts +1 -1
- package/treb-base-types/src/color.ts +1 -1
- package/treb-base-types/src/dom-utilities.ts +1 -1
- package/treb-base-types/src/evaluate-options.ts +21 -0
- package/treb-base-types/src/font-stack.ts +1 -1
- package/treb-base-types/src/gradient.ts +21 -0
- package/treb-base-types/src/import.ts +1 -1
- package/treb-base-types/src/index-standalone.ts +1 -1
- package/treb-base-types/src/index.ts +1 -1
- package/treb-base-types/src/layout.ts +1 -1
- package/treb-base-types/src/localization.ts +1 -1
- package/treb-base-types/src/rectangle.ts +1 -1
- package/treb-base-types/src/render_text.ts +1 -1
- package/treb-base-types/src/style.ts +20 -1
- package/treb-base-types/src/table.ts +1 -1
- package/treb-base-types/src/text_part.ts +1 -1
- package/treb-base-types/src/theme.ts +1 -1
- package/treb-base-types/src/union.ts +1 -1
- package/treb-base-types/src/value-type.ts +1 -1
- package/treb-base-types/style/resizable.css +1 -1
- package/treb-calculator/src/calculator.ts +5 -4
- package/treb-calculator/src/complex-math.ts +1 -1
- package/treb-calculator/src/dag/array-vertex.ts +1 -1
- package/treb-calculator/src/dag/calculation_leaf_vertex.ts +1 -1
- package/treb-calculator/src/dag/graph.ts +1 -1
- package/treb-calculator/src/dag/spreadsheet_vertex.ts +1 -1
- package/treb-calculator/src/dag/spreadsheet_vertex_base.ts +1 -1
- package/treb-calculator/src/dag/state_leaf_vertex.ts +1 -1
- package/treb-calculator/src/dag/vertex.ts +1 -1
- package/treb-calculator/src/descriptors.ts +1 -1
- package/treb-calculator/src/expression-calculator.ts +2 -2
- package/treb-calculator/src/function-error.ts +1 -1
- package/treb-calculator/src/function-library.ts +1 -1
- package/treb-calculator/src/functions/base-functions.ts +26 -4
- package/treb-calculator/src/functions/beta.ts +1 -1
- package/treb-calculator/src/functions/checkbox.ts +1 -1
- package/treb-calculator/src/functions/complex-functions.ts +1 -1
- package/treb-calculator/src/functions/date-utils.ts +1 -1
- package/treb-calculator/src/functions/finance-functions.ts +1 -1
- package/treb-calculator/src/functions/fp.ts +1 -1
- package/treb-calculator/src/functions/function-utilities.ts +21 -0
- package/treb-calculator/src/functions/gamma.ts +1 -1
- package/treb-calculator/src/functions/information-functions.ts +1 -1
- package/treb-calculator/src/functions/lambda-functions.ts +1 -1
- package/treb-calculator/src/functions/matrix-functions.ts +1 -1
- package/treb-calculator/src/functions/regex-functions.ts +1 -1
- package/treb-calculator/src/functions/sparkline.ts +1 -1
- package/treb-calculator/src/functions/statistics-functions.ts +1 -1
- package/treb-calculator/src/functions/text-functions.ts +1 -1
- package/treb-calculator/src/index.ts +1 -1
- package/treb-calculator/src/notifier-types.ts +1 -1
- package/treb-calculator/src/primitives.ts +1 -1
- package/treb-calculator/src/utilities.ts +1 -1
- package/treb-charts/src/chart-functions.ts +1 -1
- package/treb-charts/src/chart-types.ts +1 -1
- package/treb-charts/src/chart-utils.ts +1 -1
- package/treb-charts/src/chart.ts +21 -0
- package/treb-charts/src/default-chart-renderer.ts +21 -0
- package/treb-charts/src/index.ts +1 -1
- package/treb-charts/src/main.ts +1 -1
- package/treb-charts/src/quicksort.ts +1 -1
- package/treb-charts/src/rectangle.ts +1 -1
- package/treb-charts/src/renderer-type.ts +21 -0
- package/treb-charts/src/renderer.ts +1 -1
- package/treb-charts/src/util.ts +1 -1
- package/treb-charts/style/charts.scss +1 -1
- package/treb-data-model/src/annotation.ts +1 -1
- package/treb-data-model/src/conditional_format.ts +34 -2
- package/treb-data-model/src/data-validation.ts +21 -0
- package/treb-data-model/src/data_model.ts +1 -1
- package/treb-data-model/src/index.ts +1 -1
- package/treb-data-model/src/language-model.ts +1 -1
- package/treb-data-model/src/named.ts +1 -1
- package/treb-data-model/src/serialize_options.ts +1 -1
- package/treb-data-model/src/sheet.ts +43 -30
- package/treb-data-model/src/sheet_collection.ts +21 -0
- package/treb-data-model/src/sheet_selection.ts +1 -1
- package/treb-data-model/src/sheet_types.ts +1 -1
- package/treb-data-model/src/types.ts +21 -0
- package/treb-embed/src/content-types.d.ts +21 -0
- package/treb-embed/src/custom-element/global.d.ts +21 -0
- package/treb-embed/src/custom-element/spreadsheet-constructor.ts +21 -0
- package/treb-embed/src/custom-element/treb-global.ts +21 -0
- package/treb-embed/src/custom-element/treb-spreadsheet-element.ts +21 -0
- package/treb-embed/src/embedded-spreadsheet.ts +40 -1
- package/treb-embed/src/export-worker.ts +1 -1
- package/treb-embed/src/index.ts +21 -0
- package/treb-embed/src/options.ts +1 -1
- package/treb-embed/src/plugin.ts +1 -1
- package/treb-embed/src/progress-dialog.ts +1 -1
- package/treb-embed/src/selection-state.ts +21 -0
- package/treb-embed/src/spinner.ts +1 -1
- package/treb-embed/src/toolbar-message.ts +21 -0
- package/treb-embed/src/types.ts +1 -1
- package/treb-embed/style/autocomplete.scss +1 -1
- package/treb-embed/style/dark-theme.scss +1 -1
- package/treb-embed/style/defaults.scss +1 -1
- package/treb-embed/style/dialog.scss +1 -1
- package/treb-embed/style/dropdown-select.scss +1 -1
- package/treb-embed/style/font-stacks.scss +1 -1
- package/treb-embed/style/formula-bar.scss +1 -1
- package/treb-embed/style/grid.scss +1 -1
- package/treb-embed/style/layout.scss +21 -0
- package/treb-embed/style/mouse-mask.scss +1 -1
- package/treb-embed/style/note.scss +1 -1
- package/treb-embed/style/overlay-editor.scss +1 -1
- package/treb-embed/style/spinner.scss +1 -1
- package/treb-embed/style/tab-bar.scss +2 -1
- package/treb-embed/style/table.scss +1 -1
- package/treb-embed/style/theme-defaults.scss +1 -1
- package/treb-embed/style/toolbar.scss +26 -0
- package/treb-embed/style/tooltip.scss +1 -1
- package/treb-embed/style/treb-icons.scss +21 -0
- package/treb-embed/style/treb-spreadsheet-element.scss +21 -0
- package/treb-embed/style/z-index.scss +1 -1
- package/treb-export/src/address-type.ts +1 -1
- package/treb-export/src/base-template.ts +1 -1
- package/treb-export/src/column-width.ts +1 -1
- package/treb-export/src/{drawing2 → drawing}/bubble-chart-template.ts +1 -1
- package/treb-export/src/{drawing2 → drawing}/chart-template-components2.ts +1 -1
- package/treb-export/src/{drawing2/chart2.ts → drawing/chart.ts} +1 -1
- package/treb-export/src/{drawing2 → drawing}/column-chart-template2.ts +1 -1
- package/treb-export/src/{drawing2 → drawing}/donut-chart-template2.ts +1 -1
- package/treb-export/src/{drawing2/drawing2.ts → drawing/drawing.ts} +3 -3
- package/treb-export/src/{drawing2 → drawing}/embedded-image.ts +1 -1
- package/treb-export/src/{drawing2 → drawing}/scatter-chart-template2.ts +1 -1
- package/treb-export/src/export.ts +13 -13
- package/treb-export/src/import.ts +70 -8
- package/treb-export/src/index.worker.ts +1 -1
- package/treb-export/src/relationship.ts +1 -1
- package/treb-export/src/{shared-strings2.ts → shared-strings.ts} +1 -1
- package/treb-export/src/template-2.ts +1 -1
- package/treb-export/src/unescape_xml.ts +21 -0
- package/treb-export/src/{workbook-sheet2.ts → workbook-sheet.ts} +3 -3
- package/treb-export/src/{workbook-style2.ts → workbook-style.ts} +2 -2
- package/treb-export/src/{workbook-theme2.ts → workbook-theme.ts} +1 -3
- package/treb-export/src/{workbook2.ts → workbook.ts} +7 -7
- package/treb-export/src/xml-test.ts +21 -0
- package/treb-export/src/xml-utils.ts +1 -1
- package/treb-export/src/zip-wrapper.ts +21 -0
- package/treb-format/src/format.test.ts +1 -1
- package/treb-format/src/format.ts +1 -1
- package/treb-format/src/format_cache.ts +1 -1
- package/treb-format/src/format_parser.ts +1 -1
- package/treb-format/src/index.ts +1 -1
- package/treb-format/src/number_format_section.ts +1 -1
- package/treb-format/src/value_parser.ts +1 -1
- package/treb-grid/src/editors/autocomplete.ts +1 -1
- package/treb-grid/src/editors/autocomplete_matcher.ts +1 -1
- package/treb-grid/src/editors/editor.ts +1 -1
- package/treb-grid/src/editors/external_editor.ts +21 -0
- package/treb-grid/src/editors/formula_bar.ts +1 -1
- package/treb-grid/src/editors/overlay_editor.ts +1 -1
- package/treb-grid/src/index.ts +1 -1
- package/treb-grid/src/layout/base_layout.ts +1 -1
- package/treb-grid/src/layout/grid_layout.ts +1 -1
- package/treb-grid/src/layout/mock-layout.ts +21 -0
- package/treb-grid/src/render/selection-renderer.ts +1 -1
- package/treb-grid/src/render/svg_header_overlay.ts +1 -1
- package/treb-grid/src/render/svg_selection_block.ts +1 -1
- package/treb-grid/src/render/tile_renderer.ts +45 -3
- package/treb-grid/src/types/border_constants.ts +1 -1
- package/treb-grid/src/types/clipboard_data.ts +1 -1
- package/treb-grid/src/types/clipboard_data2.ts +1 -1
- package/treb-grid/src/types/drag_mask.ts +1 -1
- package/treb-grid/src/types/external_editor_config.ts +21 -0
- package/treb-grid/src/types/grid.ts +10 -10
- package/treb-grid/src/types/grid_base.ts +3 -2
- package/treb-grid/src/types/grid_command.ts +4 -1
- package/treb-grid/src/types/grid_events.ts +1 -1
- package/treb-grid/src/types/grid_options.ts +1 -1
- package/treb-grid/src/types/scale-control.ts +1 -1
- package/treb-grid/src/types/set_range_options.ts +1 -1
- package/treb-grid/src/types/tab_bar.ts +37 -8
- package/treb-grid/src/types/tile.ts +1 -1
- package/treb-grid/src/types/update_flags.ts +1 -1
- package/treb-grid/src/util/fontmetrics.ts +1 -1
- package/treb-grid/src/util/ua.ts +1 -1
- package/treb-parser/src/csv-parser.ts +1 -1
- package/treb-parser/src/index.ts +1 -1
- package/treb-parser/src/md-parser.ts +1 -1
- package/treb-parser/src/parser-types.ts +15 -1
- package/treb-parser/src/parser.ts +40 -7
- package/treb-utils/src/event_source.ts +1 -1
- package/treb-utils/src/ievent_source.ts +1 -1
- package/treb-utils/src/index.ts +1 -1
- package/treb-utils/src/measurement.ts +1 -1
- package/treb-utils/src/scale.ts +1 -1
- package/treb-utils/src/serialize_html.ts +1 -1
- package/treb-utils/src/validate_uri.ts +21 -0
|
@@ -14,15 +14,15 @@
|
|
|
14
14
|
* You should have received a copy of the GNU General Public License along
|
|
15
15
|
* with TREB. If not, see <https://www.gnu.org/licenses/>.
|
|
16
16
|
*
|
|
17
|
-
* Copyright 2022-
|
|
17
|
+
* Copyright 2022-2025 trebco, llc.
|
|
18
18
|
* info@treb.app
|
|
19
19
|
*
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
22
|
import type { ImageOptions } from './embedded-image';
|
|
23
23
|
import { EmbeddedImage } from './embedded-image';
|
|
24
|
-
import type { ChartOptions} from './
|
|
25
|
-
import { Chart} from './
|
|
24
|
+
import type { ChartOptions} from './chart';
|
|
25
|
+
import { Chart} from './chart';
|
|
26
26
|
import type { RelationshipMap} from '../relationship';
|
|
27
27
|
import { AddRel } from '../relationship';
|
|
28
28
|
import type { DOMContent } from '../xml-utils';
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* You should have received a copy of the GNU General Public License along
|
|
15
15
|
* with TREB. If not, see <https://www.gnu.org/licenses/>.
|
|
16
16
|
*
|
|
17
|
-
* Copyright 2022-
|
|
17
|
+
* Copyright 2022-2025 trebco, llc.
|
|
18
18
|
* info@treb.app
|
|
19
19
|
*
|
|
20
20
|
*/
|
|
@@ -44,10 +44,10 @@ import { Area, Cells, ValueType, Style, IsHTMLColor, IsThemeColor, ThemeColorInd
|
|
|
44
44
|
import type { XmlBuilderOptions} from 'fast-xml-parser';
|
|
45
45
|
import { XMLParser } from 'fast-xml-parser';
|
|
46
46
|
|
|
47
|
-
import { SharedStrings } from './shared-
|
|
48
|
-
import type { XlColor, BorderEdge } from './workbook-
|
|
49
|
-
import { StyleCache } from './workbook-
|
|
50
|
-
import { Theme } from './workbook-
|
|
47
|
+
import { SharedStrings } from './shared-strings';
|
|
48
|
+
import type { XlColor, BorderEdge } from './workbook-style';
|
|
49
|
+
import { StyleCache } from './workbook-style';
|
|
50
|
+
import { Theme } from './workbook-theme';
|
|
51
51
|
|
|
52
52
|
import type { RelationshipMap} from './relationship';
|
|
53
53
|
import { AddRel } from './relationship';
|
|
@@ -57,12 +57,12 @@ import type { UnitAddress, UnitRange, ExpressionUnit} from 'treb-parser';
|
|
|
57
57
|
import { Parser } from 'treb-parser';
|
|
58
58
|
|
|
59
59
|
// FIXME: move
|
|
60
|
-
import type { ChartOptions } from './
|
|
61
|
-
import { Chart } from './
|
|
62
|
-
import type { ImageOptions } from './
|
|
63
|
-
import type { TwoCellAnchor } from './
|
|
64
|
-
import { Drawing } from './
|
|
65
|
-
import { ConditionalFormatOperators, type TableDescription, type TableFooterType } from './
|
|
60
|
+
import type { ChartOptions } from './drawing/chart';
|
|
61
|
+
import { Chart } from './drawing/chart';
|
|
62
|
+
import type { ImageOptions } from './drawing/embedded-image';
|
|
63
|
+
import type { TwoCellAnchor } from './drawing/drawing';
|
|
64
|
+
import { Drawing } from './drawing/drawing';
|
|
65
|
+
import { ConditionalFormatOperators, type TableDescription, type TableFooterType } from './workbook';
|
|
66
66
|
import type { AnnotationData } from 'treb-data-model/src/annotation';
|
|
67
67
|
import { ZipWrapper } from './zip-wrapper';
|
|
68
68
|
|
|
@@ -179,7 +179,7 @@ export class Exporter {
|
|
|
179
179
|
}
|
|
180
180
|
|
|
181
181
|
const parsed = Base64JS.toByteArray(template);
|
|
182
|
-
this.zip = new ZipWrapper(parsed);
|
|
182
|
+
this.zip = new ZipWrapper(parsed.buffer as ArrayBuffer);
|
|
183
183
|
|
|
184
184
|
}
|
|
185
185
|
|
|
@@ -1909,7 +1909,7 @@ export class Exporter {
|
|
|
1909
1909
|
|
|
1910
1910
|
let dxf_index = 0;
|
|
1911
1911
|
|
|
1912
|
-
if (format.type !== 'gradient') {
|
|
1912
|
+
if (format.type !== 'gradient' && format.type !== 'data-bar') {
|
|
1913
1913
|
|
|
1914
1914
|
// these are zero-based? I thought everything in there
|
|
1915
1915
|
// was 1-based. [A: yes, these are indexed from 0].
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* You should have received a copy of the GNU General Public License along
|
|
15
15
|
* with TREB. If not, see <https://www.gnu.org/licenses/>.
|
|
16
16
|
*
|
|
17
|
-
* Copyright 2022-
|
|
17
|
+
* Copyright 2022-2025 trebco, llc.
|
|
18
18
|
* info@treb.app
|
|
19
19
|
*
|
|
20
20
|
*/
|
|
@@ -24,17 +24,17 @@
|
|
|
24
24
|
// import UZip from 'uzip';
|
|
25
25
|
import Base64JS from 'base64-js';
|
|
26
26
|
|
|
27
|
-
import type { AnchoredChartDescription, AnchoredImageDescription, AnchoredTextBoxDescription} from './
|
|
28
|
-
import { ChartType, ConditionalFormatOperators, Workbook } from './
|
|
27
|
+
import type { AnchoredChartDescription, AnchoredImageDescription, AnchoredTextBoxDescription} from './workbook';
|
|
28
|
+
import { ChartType, ConditionalFormatOperators, Workbook } from './workbook';
|
|
29
29
|
import type { ParseResult } from 'treb-parser';
|
|
30
30
|
import { DecimalMarkType, Parser } from 'treb-parser';
|
|
31
31
|
import type { RangeType, AddressType, HyperlinkType } from './address-type';
|
|
32
32
|
import { is_range, ShiftRange, InRange, is_address } from './address-type';
|
|
33
33
|
import { type ImportedSheetData, type AnchoredAnnotation, type CellParseResult, type AnnotationLayout, type Corner as LayoutCorner, type IArea, type GradientStop, type Color, type HTMLColor, type ThemeColor, Area } from 'treb-base-types';
|
|
34
34
|
import type { SerializedValueType } from 'treb-base-types';
|
|
35
|
-
import type { Sheet} from './workbook-
|
|
36
|
-
import { VisibleState } from './workbook-
|
|
37
|
-
import type { CellAnchor } from './
|
|
35
|
+
import type { Sheet} from './workbook-sheet';
|
|
36
|
+
import { VisibleState } from './workbook-sheet';
|
|
37
|
+
import type { CellAnchor } from './drawing/drawing';
|
|
38
38
|
import { type GenericDOMElement, XMLUtils } from './xml-utils';
|
|
39
39
|
|
|
40
40
|
// import { one_hundred_pixels } from './constants';
|
|
@@ -79,7 +79,26 @@ interface ConditionalFormatRule {
|
|
|
79
79
|
priority?: string;
|
|
80
80
|
operator?: string;
|
|
81
81
|
};
|
|
82
|
+
|
|
82
83
|
formula?: string|[number,number]|{t$: string};
|
|
84
|
+
|
|
85
|
+
dataBar?: {
|
|
86
|
+
a$?: {
|
|
87
|
+
showValue?: string;
|
|
88
|
+
},
|
|
89
|
+
color?: {
|
|
90
|
+
a$: {
|
|
91
|
+
rgb?: string;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
extLst?: {
|
|
97
|
+
ext?: {
|
|
98
|
+
'x14:id'?: string;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
83
102
|
colorScale?: {
|
|
84
103
|
cfvo?: {
|
|
85
104
|
a$: {
|
|
@@ -383,7 +402,7 @@ export class Importer {
|
|
|
383
402
|
|
|
384
403
|
}
|
|
385
404
|
|
|
386
|
-
public ParseConditionalFormat(address: RangeType|AddressType, rule: ConditionalFormatRule): ConditionalFormat|ConditionalFormat[]|undefined {
|
|
405
|
+
public ParseConditionalFormat(address: RangeType|AddressType, rule: ConditionalFormatRule, extensions?: any[]): ConditionalFormat|ConditionalFormat[]|undefined {
|
|
387
406
|
|
|
388
407
|
const area = this.AddressToArea(address);
|
|
389
408
|
const operators = ConditionalFormatOperators;
|
|
@@ -543,6 +562,44 @@ export class Importer {
|
|
|
543
562
|
}
|
|
544
563
|
break;
|
|
545
564
|
|
|
565
|
+
case 'dataBar':
|
|
566
|
+
{
|
|
567
|
+
const hide_values = (rule.dataBar?.a$?.showValue === '0');
|
|
568
|
+
let extension: any = undefined;
|
|
569
|
+
|
|
570
|
+
if (rule.extLst?.ext?.['x14:id']) {
|
|
571
|
+
for (const test of (extensions || [])) {
|
|
572
|
+
if (test['x14:cfRule']?.a$?.id === rule.extLst.ext['x14:id']) {
|
|
573
|
+
extension = test;
|
|
574
|
+
break;
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
if (!extension) {
|
|
578
|
+
console.info("conditional format extension not found");
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
if (rule.dataBar?.color?.a$?.rgb) {
|
|
583
|
+
|
|
584
|
+
let negative: Color|undefined = undefined;
|
|
585
|
+
|
|
586
|
+
if (extension?.['x14:cfRule']?.['x14:dataBar']?.['x14:negativeFillColor']?.a$?.rgb) {
|
|
587
|
+
const rgb = extension['x14:cfRule']['x14:dataBar']['x14:negativeFillColor'].a$.rgb;
|
|
588
|
+
negative = { text: '#' + rgb.toString().substring(2) };
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
const fill: Color = { text: '#' + rule.dataBar.color.a$.rgb.substring(2) };
|
|
592
|
+
return {
|
|
593
|
+
type: 'data-bar',
|
|
594
|
+
area,
|
|
595
|
+
fill,
|
|
596
|
+
hide_values,
|
|
597
|
+
negative,
|
|
598
|
+
};
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
break;
|
|
602
|
+
|
|
546
603
|
case 'colorScale':
|
|
547
604
|
if (rule.colorScale && Array.isArray(rule.colorScale.cfvo) && Array.isArray(rule.colorScale.color)) {
|
|
548
605
|
|
|
@@ -665,6 +722,11 @@ export class Importer {
|
|
|
665
722
|
// conditionals
|
|
666
723
|
|
|
667
724
|
const conditional_formatting = FindAll('worksheet/conditionalFormatting');
|
|
725
|
+
|
|
726
|
+
// we might need extensions as well? TODO
|
|
727
|
+
|
|
728
|
+
const conditional_formattings = FindAll('worksheet/extLst/ext/x14:conditionalFormattings/x14:conditionalFormatting');
|
|
729
|
+
|
|
668
730
|
for (const element of conditional_formatting) {
|
|
669
731
|
if (element.a$?.sqref ){
|
|
670
732
|
|
|
@@ -678,7 +740,7 @@ export class Importer {
|
|
|
678
740
|
if (element.cfRule) {
|
|
679
741
|
const rules = Array.isArray(element.cfRule) ? element.cfRule : [element.cfRule];
|
|
680
742
|
for (const rule of rules) {
|
|
681
|
-
const format = this.ParseConditionalFormat(area, rule as unknown as ConditionalFormatRule);
|
|
743
|
+
const format = this.ParseConditionalFormat(area, rule as unknown as ConditionalFormatRule, conditional_formattings);
|
|
682
744
|
if (format) {
|
|
683
745
|
if (Array.isArray(format)) {
|
|
684
746
|
conditional_formats.push(...format);
|
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* This file is part of TREB.
|
|
3
|
+
*
|
|
4
|
+
* TREB is free software: you can redistribute it and/or modify it under the
|
|
5
|
+
* terms of the GNU General Public License as published by the Free Software
|
|
6
|
+
* Foundation, either version 3 of the License, or (at your option) any
|
|
7
|
+
* later version.
|
|
8
|
+
*
|
|
9
|
+
* TREB is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
10
|
+
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
11
|
+
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
|
12
|
+
* details.
|
|
13
|
+
*
|
|
14
|
+
* You should have received a copy of the GNU General Public License along
|
|
15
|
+
* with TREB. If not, see <https://www.gnu.org/licenses/>.
|
|
16
|
+
*
|
|
17
|
+
* Copyright 2022-2025 trebco, llc.
|
|
18
|
+
* info@treb.app
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
|
|
1
22
|
|
|
2
23
|
/*==============================================================================
|
|
3
24
|
*
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* You should have received a copy of the GNU General Public License along
|
|
15
15
|
* with TREB. If not, see <https://www.gnu.org/licenses/>.
|
|
16
16
|
*
|
|
17
|
-
* Copyright 2022-
|
|
17
|
+
* Copyright 2022-2025 trebco, llc.
|
|
18
18
|
* info@treb.app
|
|
19
19
|
*
|
|
20
20
|
*/
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
|
|
44
44
|
import type { AddressType, RangeType} from './address-type';
|
|
45
45
|
import { is_range } from './address-type';
|
|
46
|
-
import type { SharedStrings } from './shared-
|
|
47
|
-
import type { Drawing } from './
|
|
46
|
+
import type { SharedStrings } from './shared-strings';
|
|
47
|
+
import type { Drawing } from './drawing/drawing';
|
|
48
48
|
import type { RelationshipMap } from './relationship';
|
|
49
49
|
|
|
50
50
|
export interface SheetOptions {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* You should have received a copy of the GNU General Public License along
|
|
15
15
|
* with TREB. If not, see <https://www.gnu.org/licenses/>.
|
|
16
16
|
*
|
|
17
|
-
* Copyright 2022-
|
|
17
|
+
* Copyright 2022-2025 trebco, llc.
|
|
18
18
|
* info@treb.app
|
|
19
19
|
*
|
|
20
20
|
*/
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
// import { Element, ElementTree as Tree } from 'elementtree';
|
|
24
24
|
|
|
25
25
|
import { type CompositeBorderEdge, Style, type CellStyle, type PropertyKeys, type Color, IsHTMLColor, IsThemeColor, type ThemeColor, type HTMLColor, ThemeColorIndex } from 'treb-base-types';
|
|
26
|
-
import { Theme } from './workbook-
|
|
26
|
+
import { Theme } from './workbook-theme';
|
|
27
27
|
import { NumberFormatCache } from 'treb-format';
|
|
28
28
|
import { XMLUtils } from './xml-utils';
|
|
29
29
|
|
|
@@ -14,13 +14,11 @@
|
|
|
14
14
|
* You should have received a copy of the GNU General Public License along
|
|
15
15
|
* with TREB. If not, see <https://www.gnu.org/licenses/>.
|
|
16
16
|
*
|
|
17
|
-
* Copyright 2022-
|
|
17
|
+
* Copyright 2022-2025 trebco, llc.
|
|
18
18
|
* info@treb.app
|
|
19
19
|
*
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
-
import { XMLUtils } from './xml-utils';
|
|
23
|
-
|
|
24
22
|
export interface ColorSchemeElement {
|
|
25
23
|
name?: string;
|
|
26
24
|
value?: string;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* You should have received a copy of the GNU General Public License along
|
|
15
15
|
* with TREB. If not, see <https://www.gnu.org/licenses/>.
|
|
16
16
|
*
|
|
17
|
-
* Copyright 2022-
|
|
17
|
+
* Copyright 2022-2025 trebco, llc.
|
|
18
18
|
* info@treb.app
|
|
19
19
|
*
|
|
20
20
|
*/
|
|
@@ -28,15 +28,15 @@ const xmlparser2 = new XMLParser(XMLOptions2);
|
|
|
28
28
|
|
|
29
29
|
// import * as he from 'he';
|
|
30
30
|
|
|
31
|
-
import type { TwoCellAnchor, CellAnchor } from './
|
|
31
|
+
import type { TwoCellAnchor, CellAnchor } from './drawing/drawing';
|
|
32
32
|
|
|
33
|
-
import { SharedStrings } from './shared-
|
|
34
|
-
import { StyleCache } from './workbook-
|
|
35
|
-
import { Theme } from './workbook-
|
|
36
|
-
import { Sheet, VisibleState } from './workbook-
|
|
33
|
+
import { SharedStrings } from './shared-strings';
|
|
34
|
+
import { StyleCache } from './workbook-style';
|
|
35
|
+
import { Theme } from './workbook-theme';
|
|
36
|
+
import { Sheet, VisibleState } from './workbook-sheet';
|
|
37
37
|
import type { RelationshipMap } from './relationship';
|
|
38
38
|
import { ZipWrapper } from './zip-wrapper';
|
|
39
|
-
import type { CellStyle,
|
|
39
|
+
import type { CellStyle, ThemeColor } from 'treb-base-types';
|
|
40
40
|
import type { SerializedNamed } from 'treb-data-model';
|
|
41
41
|
|
|
42
42
|
/**
|
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* This file is part of TREB.
|
|
3
|
+
*
|
|
4
|
+
* TREB is free software: you can redistribute it and/or modify it under the
|
|
5
|
+
* terms of the GNU General Public License as published by the Free Software
|
|
6
|
+
* Foundation, either version 3 of the License, or (at your option) any
|
|
7
|
+
* later version.
|
|
8
|
+
*
|
|
9
|
+
* TREB is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
10
|
+
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
11
|
+
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
|
12
|
+
* details.
|
|
13
|
+
*
|
|
14
|
+
* You should have received a copy of the GNU General Public License along
|
|
15
|
+
* with TREB. If not, see <https://www.gnu.org/licenses/>.
|
|
16
|
+
*
|
|
17
|
+
* Copyright 2022-2025 trebco, llc.
|
|
18
|
+
* info@treb.app
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
|
|
1
22
|
|
|
2
23
|
export const attrs = Symbol('attrs');
|
|
3
24
|
export const text = Symbol('text');
|
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* This file is part of TREB.
|
|
3
|
+
*
|
|
4
|
+
* TREB is free software: you can redistribute it and/or modify it under the
|
|
5
|
+
* terms of the GNU General Public License as published by the Free Software
|
|
6
|
+
* Foundation, either version 3 of the License, or (at your option) any
|
|
7
|
+
* later version.
|
|
8
|
+
*
|
|
9
|
+
* TREB is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
10
|
+
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
11
|
+
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
|
12
|
+
* details.
|
|
13
|
+
*
|
|
14
|
+
* You should have received a copy of the GNU General Public License along
|
|
15
|
+
* with TREB. If not, see <https://www.gnu.org/licenses/>.
|
|
16
|
+
*
|
|
17
|
+
* Copyright 2022-2025 trebco, llc.
|
|
18
|
+
* info@treb.app
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
|
|
1
22
|
|
|
2
23
|
import UZip from 'uzip';
|
|
3
24
|
import Base64JS from 'base64-js';
|
package/treb-format/src/index.ts
CHANGED
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* This file is part of TREB.
|
|
3
|
+
*
|
|
4
|
+
* TREB is free software: you can redistribute it and/or modify it under the
|
|
5
|
+
* terms of the GNU General Public License as published by the Free Software
|
|
6
|
+
* Foundation, either version 3 of the License, or (at your option) any
|
|
7
|
+
* later version.
|
|
8
|
+
*
|
|
9
|
+
* TREB is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
10
|
+
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
11
|
+
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
|
12
|
+
* details.
|
|
13
|
+
*
|
|
14
|
+
* You should have received a copy of the GNU General Public License along
|
|
15
|
+
* with TREB. If not, see <https://www.gnu.org/licenses/>.
|
|
16
|
+
*
|
|
17
|
+
* Copyright 2022-2025 trebco, llc.
|
|
18
|
+
* info@treb.app
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
|
|
1
22
|
|
|
2
23
|
import { Editor, type NodeDescriptor } from './editor';
|
|
3
24
|
|
package/treb-grid/src/index.ts
CHANGED