@trebco/treb 32.14.0 → 36.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/api-generator/api-generator-types.ts +3 -0
- package/api-generator/api-generator.ts +15 -1
- package/bun.lock +145 -99
- package/dist/chunk-43DLP2OX.mjs +11 -0
- package/dist/chunk-4CKS56PE.mjs +11 -0
- package/dist/chunk-75PARUQE.mjs +11 -0
- package/dist/chunk-7QD63AZS.mjs +24601 -0
- package/dist/chunk-A55ARVRD.mjs +11 -0
- package/dist/chunk-DESAKYW4.mjs +11 -0
- package/dist/chunk-EQ2R5W6P.mjs +24565 -0
- package/dist/chunk-IYJU2J6D.mjs +24601 -0
- package/dist/chunk-KSJFPGXT.mjs +11 -0
- package/dist/chunk-ORQFKLXM.mjs +24601 -0
- package/dist/chunk-SFDNNDHY.mjs +11 -0
- package/dist/chunk-T47DX5MI.mjs +11 -0
- package/dist/chunk-T6ILBVEX.mjs +11 -0
- package/dist/chunk-TPRCDYYG.mjs +11 -0
- package/dist/chunk-YAHNOOHO.mjs +11 -0
- package/dist/treb-export-worker.mjs +9 -2
- package/dist/treb-spreadsheet.mjs +7 -19
- package/dist/treb.d.ts +20 -4
- package/esbuild-composite.mjs +18 -6
- package/esbuild-utils.mjs +62 -3
- package/i18n/languages/treb-i18n-da.mjs +1 -1
- package/i18n/languages/treb-i18n-de.mjs +1 -1
- package/i18n/languages/treb-i18n-es.mjs +1 -1
- package/i18n/languages/treb-i18n-fr.mjs +1 -1
- package/i18n/languages/treb-i18n-it.mjs +1 -1
- package/i18n/languages/treb-i18n-nl.mjs +1 -1
- package/i18n/languages/treb-i18n-no.mjs +1 -1
- package/i18n/languages/treb-i18n-pl.mjs +1 -1
- package/i18n/languages/treb-i18n-pt.mjs +1 -1
- package/i18n/languages/treb-i18n-sv.mjs +1 -1
- package/ooxml-types/README.md +141 -0
- package/ooxml-types/package.json +5 -0
- package/ooxml-types/src/types/drawingml/chart.ts +327 -0
- package/ooxml-types/src/types/drawingml/index.ts +63 -0
- package/ooxml-types/src/types/drawingml/spreadsheetDrawing.ts +105 -0
- package/ooxml-types/src/types/drawingml/theme.ts +104 -0
- package/ooxml-types/src/types/index.ts +3 -0
- package/ooxml-types/src/types/package/contentTypes.ts +49 -0
- package/ooxml-types/src/types/package/docProps.ts +46 -0
- package/ooxml-types/src/types/package/index.ts +17 -0
- package/ooxml-types/src/types/package/relationships.ts +37 -0
- package/ooxml-types/src/types/spreadsheetml/columns.ts +20 -0
- package/ooxml-types/src/types/spreadsheetml/comments.ts +30 -0
- package/ooxml-types/src/types/spreadsheetml/dataFeatures.ts +261 -0
- package/ooxml-types/src/types/spreadsheetml/enums.ts +175 -0
- package/ooxml-types/src/types/spreadsheetml/index.ts +186 -0
- package/ooxml-types/src/types/spreadsheetml/metadata.ts +90 -0
- package/ooxml-types/src/types/spreadsheetml/misc.ts +35 -0
- package/ooxml-types/src/types/spreadsheetml/pageLayout.ts +83 -0
- package/ooxml-types/src/types/spreadsheetml/sharedStrings.ts +33 -0
- package/ooxml-types/src/types/spreadsheetml/sheetData.ts +70 -0
- package/ooxml-types/src/types/spreadsheetml/sheetProperties.ts +86 -0
- package/ooxml-types/src/types/spreadsheetml/sheetViews.ts +51 -0
- package/ooxml-types/src/types/spreadsheetml/sparkline.ts +46 -0
- package/ooxml-types/src/types/spreadsheetml/styles.ts +274 -0
- package/ooxml-types/src/types/spreadsheetml/table.ts +106 -0
- package/ooxml-types/src/types/spreadsheetml/util.ts +15 -0
- package/ooxml-types/src/types/spreadsheetml/workbook.ts +165 -0
- package/ooxml-types/src/types/spreadsheetml/worksheet.ts +60 -0
- package/package.json +13 -11
- 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 +1 -1
- package/treb-base-types/src/font-stack.ts +1 -1
- package/treb-base-types/src/gradient.ts +1 -1
- 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 +2 -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 +7 -1
- package/treb-base-types/src/style.ts +1 -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 +4 -1
- package/treb-base-types/src/value-type.ts +1 -1
- package/treb-base-types/src/worker-proxy.ts +294 -0
- package/treb-base-types/style/resizable.css +1 -1
- package/treb-calculator/src/calculator.ts +133 -14
- 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 +9 -1
- package/treb-calculator/src/expression-calculator.ts +1 -1
- 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 +8 -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 +2 -4
- package/treb-calculator/src/functions/fp.ts +1 -1
- package/treb-calculator/src/functions/function-utilities.ts +1 -1
- 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 +4 -1
- package/treb-calculator/src/functions/matrix-functions.ts +1 -1
- package/treb-calculator/src/functions/normal.ts +1 -1
- package/treb-calculator/src/functions/regex-functions.ts +13 -4
- package/treb-calculator/src/functions/sparkline.ts +1 -1
- package/treb-calculator/src/functions/statistics-functions.ts +1 -1
- package/treb-calculator/src/functions/students-t.ts +1 -1
- package/treb-calculator/src/functions/text-functions.ts +5 -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 +1 -1
- package/treb-charts/src/default-chart-renderer.ts +1 -1
- 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 +1 -1
- 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 +1 -1
- package/treb-data-model/src/data-validation.ts +1 -1
- package/treb-data-model/src/data_model.ts +32 -5
- 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 +1 -1
- package/treb-data-model/src/sheet_collection.ts +1 -1
- 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 +1 -1
- package/treb-embed/src/content-types.d.ts +1 -1
- package/treb-embed/src/custom-element/global.d.ts +1 -1
- package/treb-embed/src/custom-element/spreadsheet-constructor.ts +1 -1
- package/treb-embed/src/custom-element/treb-global.ts +1 -1
- package/treb-embed/src/custom-element/treb-spreadsheet-element.ts +1 -1
- package/treb-embed/src/embedded-spreadsheet.ts +342 -149
- package/treb-embed/src/index.ts +1 -1
- package/treb-embed/src/options.ts +4 -2
- package/treb-embed/src/plugin.ts +1 -1
- package/treb-embed/src/progress-dialog.ts +1 -1
- package/treb-embed/src/selection-state.ts +1 -1
- package/treb-embed/src/spinner.ts +1 -1
- package/treb-embed/src/toolbar-message.ts +6 -1
- package/treb-embed/src/types.ts +13 -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 +1 -1
- 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 +1 -1
- package/treb-embed/style/table.scss +1 -1
- package/treb-embed/style/theme-defaults.scss +1 -1
- package/treb-embed/style/toolbar.scss +1 -1
- package/treb-embed/style/tooltip.scss +1 -1
- package/treb-embed/style/treb-icons.scss +1 -1
- package/treb-embed/style/treb-spreadsheet-element.scss +1 -1
- 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/drawing/bubble-chart-template.ts +1 -1
- package/treb-export/src/drawing/chart-template-components2.ts +1 -1
- package/treb-export/src/drawing/chart.ts +1 -1
- package/treb-export/src/drawing/column-chart-template2.ts +1 -1
- package/treb-export/src/drawing/donut-chart-template2.ts +1 -1
- package/treb-export/src/drawing/drawing.ts +1 -1
- package/treb-export/src/drawing/embedded-image.ts +1 -1
- package/treb-export/src/drawing/scatter-chart-template2.ts +1 -1
- package/treb-export/src/export.ts +10 -6
- package/treb-export/src/import-export-messages.ts +61 -0
- package/treb-export/src/import.ts +318 -301
- package/treb-export/src/index.worker.ts +85 -53
- package/treb-export/src/metadata.ts +71 -3
- package/treb-export/src/ooxml.ts +47 -0
- package/treb-export/src/relationship.ts +1 -1
- package/treb-export/src/shared-strings.ts +19 -15
- package/treb-export/src/template-2.ts +1 -1
- package/treb-export/src/unescape_xml.ts +1 -1
- package/treb-export/src/workbook-sheet.ts +11 -6
- package/treb-export/src/workbook-style.ts +137 -25
- package/treb-export/src/workbook-theme.ts +20 -4
- package/treb-export/src/workbook.ts +85 -88
- package/treb-export/src/xml-test.ts +1 -1
- package/treb-export/src/xml-utils.ts +1 -1
- package/treb-export/src/zip-wrapper.ts +1 -1
- package/treb-export/tsconfig.json +2 -1
- package/treb-format/src/format.test.ts +1 -1
- package/treb-format/src/format.ts +12 -5
- package/treb-format/src/format_cache.ts +3 -3
- 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 +15 -6
- package/treb-grid/src/editors/external_editor.ts +33 -8
- package/treb-grid/src/editors/formula_bar.ts +12 -1
- package/treb-grid/src/editors/overlay_editor.ts +4 -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 +1 -1
- 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 +36 -7
- 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 +1 -1
- package/treb-grid/src/types/grid.ts +181 -40
- package/treb-grid/src/types/grid_base.ts +7 -4
- package/treb-grid/src/types/grid_command.ts +7 -1
- package/treb-grid/src/types/grid_events.ts +2 -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 +1 -1
- 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 +1 -1
- package/treb-parser/src/parser.ts +1 -1
- 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 +1 -1
- package/tsproject.json +2 -3
- package/treb-embed/src/export-worker.ts +0 -44
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
import type { OneOrMany, ValElement, XsdBoolean } from "./util.js";
|
|
2
|
+
import type { Color } from "./sheetProperties.js";
|
|
3
|
+
import type { ExtensionList } from "./misc.js";
|
|
4
|
+
import type {
|
|
5
|
+
ST_BorderStyle,
|
|
6
|
+
ST_HorizontalAlignment,
|
|
7
|
+
ST_VerticalAlignment,
|
|
8
|
+
ST_PatternType,
|
|
9
|
+
ST_UnderlineValues,
|
|
10
|
+
ST_FontScheme,
|
|
11
|
+
ST_GradientType,
|
|
12
|
+
} from "./enums.js";
|
|
13
|
+
|
|
14
|
+
// --- Number Formats ---
|
|
15
|
+
|
|
16
|
+
export interface NumFmt {
|
|
17
|
+
$attributes?: {
|
|
18
|
+
numFmtId: number;
|
|
19
|
+
formatCode: string;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface NumFmts {
|
|
24
|
+
$attributes?: {
|
|
25
|
+
count?: number;
|
|
26
|
+
};
|
|
27
|
+
numFmt: OneOrMany<NumFmt>;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// --- Fonts ---
|
|
31
|
+
|
|
32
|
+
export interface Font {
|
|
33
|
+
name?: ValElement;
|
|
34
|
+
charset?: ValElement<number>;
|
|
35
|
+
family?: ValElement<number>;
|
|
36
|
+
b?: ValElement<boolean> | Record<string, never>;
|
|
37
|
+
i?: ValElement<boolean> | Record<string, never>;
|
|
38
|
+
strike?: ValElement<boolean> | Record<string, never>;
|
|
39
|
+
outline?: ValElement<boolean> | Record<string, never>;
|
|
40
|
+
shadow?: ValElement<boolean> | Record<string, never>;
|
|
41
|
+
condense?: ValElement<boolean> | Record<string, never>;
|
|
42
|
+
extend?: ValElement<boolean> | Record<string, never>;
|
|
43
|
+
color?: Color;
|
|
44
|
+
sz?: ValElement<number>;
|
|
45
|
+
u?: ValElement<ST_UnderlineValues> | Record<string, never>;
|
|
46
|
+
vertAlign?: ValElement<"superscript" | "subscript" | "baseline">;
|
|
47
|
+
scheme?: ValElement<ST_FontScheme>;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface Fonts {
|
|
51
|
+
$attributes?: {
|
|
52
|
+
count?: number;
|
|
53
|
+
};
|
|
54
|
+
font: OneOrMany<Font>;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// --- Fills ---
|
|
58
|
+
|
|
59
|
+
export interface PatternFill {
|
|
60
|
+
$attributes?: {
|
|
61
|
+
patternType?: ST_PatternType;
|
|
62
|
+
};
|
|
63
|
+
fgColor?: Color;
|
|
64
|
+
bgColor?: Color;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export interface GradientStop {
|
|
68
|
+
$attributes?: {
|
|
69
|
+
position: number;
|
|
70
|
+
};
|
|
71
|
+
color: Color;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface GradientFill {
|
|
75
|
+
$attributes?: {
|
|
76
|
+
type?: ST_GradientType;
|
|
77
|
+
degree?: number;
|
|
78
|
+
left?: number;
|
|
79
|
+
right?: number;
|
|
80
|
+
top?: number;
|
|
81
|
+
bottom?: number;
|
|
82
|
+
};
|
|
83
|
+
stop: OneOrMany<GradientStop>;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export interface Fill {
|
|
87
|
+
patternFill?: PatternFill;
|
|
88
|
+
gradientFill?: GradientFill;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export interface Fills {
|
|
92
|
+
$attributes?: {
|
|
93
|
+
count?: number;
|
|
94
|
+
};
|
|
95
|
+
fill: OneOrMany<Fill>;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// --- Borders ---
|
|
99
|
+
|
|
100
|
+
export interface BorderEdge {
|
|
101
|
+
$attributes?: {
|
|
102
|
+
style?: ST_BorderStyle;
|
|
103
|
+
};
|
|
104
|
+
color?: Color;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export interface Border {
|
|
108
|
+
$attributes?: {
|
|
109
|
+
diagonalUp?: XsdBoolean;
|
|
110
|
+
diagonalDown?: XsdBoolean;
|
|
111
|
+
outline?: XsdBoolean;
|
|
112
|
+
};
|
|
113
|
+
left?: BorderEdge;
|
|
114
|
+
right?: BorderEdge;
|
|
115
|
+
top?: BorderEdge;
|
|
116
|
+
bottom?: BorderEdge;
|
|
117
|
+
diagonal?: BorderEdge;
|
|
118
|
+
vertical?: BorderEdge;
|
|
119
|
+
horizontal?: BorderEdge;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export interface Borders {
|
|
123
|
+
$attributes?: {
|
|
124
|
+
count?: number;
|
|
125
|
+
};
|
|
126
|
+
border: OneOrMany<Border>;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// --- Alignment & Protection ---
|
|
130
|
+
|
|
131
|
+
export interface Alignment {
|
|
132
|
+
$attributes?: {
|
|
133
|
+
horizontal?: ST_HorizontalAlignment;
|
|
134
|
+
vertical?: ST_VerticalAlignment;
|
|
135
|
+
textRotation?: number;
|
|
136
|
+
wrapText?: XsdBoolean;
|
|
137
|
+
indent?: number;
|
|
138
|
+
relativeIndent?: number;
|
|
139
|
+
justifyLastLine?: XsdBoolean;
|
|
140
|
+
shrinkToFit?: XsdBoolean;
|
|
141
|
+
readingOrder?: number;
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export interface CellProtection {
|
|
146
|
+
$attributes?: {
|
|
147
|
+
locked?: XsdBoolean;
|
|
148
|
+
hidden?: XsdBoolean;
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
// --- Cell Formats (xf) ---
|
|
153
|
+
|
|
154
|
+
export interface CellFormat {
|
|
155
|
+
$attributes?: {
|
|
156
|
+
numFmtId?: number;
|
|
157
|
+
fontId?: number;
|
|
158
|
+
fillId?: number;
|
|
159
|
+
borderId?: number;
|
|
160
|
+
xfId?: number;
|
|
161
|
+
quotePrefix?: XsdBoolean;
|
|
162
|
+
pivotButton?: XsdBoolean;
|
|
163
|
+
applyNumberFormat?: XsdBoolean;
|
|
164
|
+
applyFont?: XsdBoolean;
|
|
165
|
+
applyFill?: XsdBoolean;
|
|
166
|
+
applyBorder?: XsdBoolean;
|
|
167
|
+
applyAlignment?: XsdBoolean;
|
|
168
|
+
applyProtection?: XsdBoolean;
|
|
169
|
+
};
|
|
170
|
+
alignment?: Alignment;
|
|
171
|
+
protection?: CellProtection;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export interface CellFormats {
|
|
175
|
+
$attributes?: {
|
|
176
|
+
count?: number;
|
|
177
|
+
};
|
|
178
|
+
xf: OneOrMany<CellFormat>;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
// --- Cell Styles ---
|
|
182
|
+
|
|
183
|
+
export interface CellStyle {
|
|
184
|
+
$attributes?: {
|
|
185
|
+
name: string;
|
|
186
|
+
xfId: number;
|
|
187
|
+
builtinId?: number;
|
|
188
|
+
iLevel?: number;
|
|
189
|
+
hidden?: XsdBoolean;
|
|
190
|
+
customBuiltin?: XsdBoolean;
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
export interface CellStyles {
|
|
195
|
+
$attributes?: {
|
|
196
|
+
count?: number;
|
|
197
|
+
};
|
|
198
|
+
cellStyle: OneOrMany<CellStyle>;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
// --- Differential Formats (for conditional formatting) ---
|
|
202
|
+
|
|
203
|
+
export interface DifferentialFormat {
|
|
204
|
+
font?: Font;
|
|
205
|
+
numFmt?: NumFmt;
|
|
206
|
+
fill?: Fill;
|
|
207
|
+
alignment?: Alignment;
|
|
208
|
+
border?: Border;
|
|
209
|
+
protection?: CellProtection;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
export interface DifferentialFormats {
|
|
213
|
+
$attributes?: {
|
|
214
|
+
count?: number;
|
|
215
|
+
};
|
|
216
|
+
dxf?: OneOrMany<DifferentialFormat>;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
// --- Table Styles ---
|
|
220
|
+
|
|
221
|
+
export interface TableStyle {
|
|
222
|
+
$attributes?: {
|
|
223
|
+
name: string;
|
|
224
|
+
pivot?: XsdBoolean;
|
|
225
|
+
table?: XsdBoolean;
|
|
226
|
+
count?: number;
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export interface TableStyles {
|
|
231
|
+
$attributes?: {
|
|
232
|
+
count?: number;
|
|
233
|
+
defaultTableStyle?: string;
|
|
234
|
+
defaultPivotStyle?: string;
|
|
235
|
+
};
|
|
236
|
+
tableStyle?: OneOrMany<TableStyle>;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
// --- Index Color Palette ---
|
|
240
|
+
|
|
241
|
+
export interface RgbColor {
|
|
242
|
+
$attributes?: {
|
|
243
|
+
rgb: string;
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export interface IndexedColors {
|
|
248
|
+
rgbColor: OneOrMany<RgbColor>;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
export interface MruColors {
|
|
252
|
+
color: OneOrMany<Color>;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
export interface Colors {
|
|
256
|
+
indexedColors?: IndexedColors;
|
|
257
|
+
mruColors?: MruColors;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
// --- StyleSheet (root) ---
|
|
261
|
+
|
|
262
|
+
export interface StyleSheet {
|
|
263
|
+
numFmts?: NumFmts;
|
|
264
|
+
fonts?: Fonts;
|
|
265
|
+
fills?: Fills;
|
|
266
|
+
borders?: Borders;
|
|
267
|
+
cellStyleXfs?: CellFormats;
|
|
268
|
+
cellXfs?: CellFormats;
|
|
269
|
+
cellStyles?: CellStyles;
|
|
270
|
+
dxfs?: DifferentialFormats;
|
|
271
|
+
tableStyles?: TableStyles;
|
|
272
|
+
colors?: Colors;
|
|
273
|
+
extLst?: ExtensionList;
|
|
274
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import type { OneOrMany, XsdBoolean } from "./util.js";
|
|
2
|
+
import type { AutoFilter } from "./dataFeatures.js";
|
|
3
|
+
import type { ExtensionList } from "./misc.js";
|
|
4
|
+
|
|
5
|
+
// --- Table Columns ---
|
|
6
|
+
|
|
7
|
+
export interface TableColumn {
|
|
8
|
+
$attributes?: {
|
|
9
|
+
id: number;
|
|
10
|
+
uniqueName?: string;
|
|
11
|
+
name: string;
|
|
12
|
+
totalsRowFunction?:
|
|
13
|
+
| "none"
|
|
14
|
+
| "sum"
|
|
15
|
+
| "min"
|
|
16
|
+
| "max"
|
|
17
|
+
| "average"
|
|
18
|
+
| "count"
|
|
19
|
+
| "countNums"
|
|
20
|
+
| "stdDev"
|
|
21
|
+
| "var"
|
|
22
|
+
| "custom";
|
|
23
|
+
totalsRowLabel?: string;
|
|
24
|
+
queryTableFieldId?: number;
|
|
25
|
+
headerRowDxfId?: number;
|
|
26
|
+
dataDxfId?: number;
|
|
27
|
+
totalsRowDxfId?: number;
|
|
28
|
+
headerRowCellStyle?: string;
|
|
29
|
+
dataCellStyle?: string;
|
|
30
|
+
totalsRowCellStyle?: string;
|
|
31
|
+
};
|
|
32
|
+
calculatedColumnFormula?: { $text?: string };
|
|
33
|
+
totalsRowFormula?: { $text?: string };
|
|
34
|
+
extLst?: ExtensionList;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface TableColumns {
|
|
38
|
+
$attributes?: {
|
|
39
|
+
count?: number;
|
|
40
|
+
};
|
|
41
|
+
tableColumn: OneOrMany<TableColumn>;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// --- Table Style Info ---
|
|
45
|
+
|
|
46
|
+
export interface TableStyleInfo {
|
|
47
|
+
$attributes?: {
|
|
48
|
+
name?: string;
|
|
49
|
+
showFirstColumn?: XsdBoolean;
|
|
50
|
+
showLastColumn?: XsdBoolean;
|
|
51
|
+
showRowStripes?: XsdBoolean;
|
|
52
|
+
showColumnStripes?: XsdBoolean;
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// --- Sort & Filter ---
|
|
57
|
+
|
|
58
|
+
export interface SortCondition {
|
|
59
|
+
$attributes?: {
|
|
60
|
+
descending?: XsdBoolean;
|
|
61
|
+
ref: string;
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface SortState {
|
|
66
|
+
$attributes?: {
|
|
67
|
+
ref: string;
|
|
68
|
+
columnSort?: XsdBoolean;
|
|
69
|
+
caseSensitive?: XsdBoolean;
|
|
70
|
+
};
|
|
71
|
+
sortCondition?: OneOrMany<SortCondition>;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// --- Table (root) ---
|
|
75
|
+
|
|
76
|
+
export interface Table {
|
|
77
|
+
$attributes?: {
|
|
78
|
+
id: number;
|
|
79
|
+
name: string;
|
|
80
|
+
displayName: string;
|
|
81
|
+
ref: string;
|
|
82
|
+
tableType?: "worksheet" | "xml" | "queryTable";
|
|
83
|
+
comment?: string;
|
|
84
|
+
headerRowCount?: number;
|
|
85
|
+
insertRow?: XsdBoolean;
|
|
86
|
+
insertRowShift?: XsdBoolean;
|
|
87
|
+
totalsRowCount?: number;
|
|
88
|
+
totalsRowShown?: XsdBoolean;
|
|
89
|
+
published?: XsdBoolean;
|
|
90
|
+
headerRowDxfId?: number;
|
|
91
|
+
dataDxfId?: number;
|
|
92
|
+
totalsRowDxfId?: number;
|
|
93
|
+
headerRowBorderDxfId?: number;
|
|
94
|
+
tableBorderDxfId?: number;
|
|
95
|
+
totalsRowBorderDxfId?: number;
|
|
96
|
+
headerRowCellStyle?: string;
|
|
97
|
+
dataCellStyle?: string;
|
|
98
|
+
totalsRowCellStyle?: string;
|
|
99
|
+
connectionId?: number;
|
|
100
|
+
};
|
|
101
|
+
autoFilter?: AutoFilter;
|
|
102
|
+
sortState?: SortState;
|
|
103
|
+
tableColumns: TableColumns;
|
|
104
|
+
tableStyleInfo?: TableStyleInfo;
|
|
105
|
+
extLst?: ExtensionList;
|
|
106
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type OneOrMany<T> = T | T[];
|
|
2
|
+
|
|
3
|
+
/** xsd:boolean allows "true"/"false" and "1"/"0"; the parser produces boolean or number respectively. */
|
|
4
|
+
export type XsdBoolean = boolean | number;
|
|
5
|
+
|
|
6
|
+
export interface TextElement {
|
|
7
|
+
$text?: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/** Element whose only content is a `val` attribute, e.g. `<sz val="11"/>`. */
|
|
11
|
+
export interface ValElement<T = string> {
|
|
12
|
+
$attributes?: {
|
|
13
|
+
val: T;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import type { OneOrMany, TextElement, XsdBoolean } from "./util.js";
|
|
2
|
+
import type { ExtensionList } from "./misc.js";
|
|
3
|
+
|
|
4
|
+
export interface FileVersion {
|
|
5
|
+
$attributes?: {
|
|
6
|
+
appName?: string;
|
|
7
|
+
lastEdited?: string;
|
|
8
|
+
lowestEdited?: string;
|
|
9
|
+
rupBuild?: string;
|
|
10
|
+
codeName?: string;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface WorkbookPr {
|
|
15
|
+
$attributes?: {
|
|
16
|
+
date1904?: XsdBoolean;
|
|
17
|
+
showObjects?: "all" | "placeholders" | "none";
|
|
18
|
+
showBorderUnselectedTables?: XsdBoolean;
|
|
19
|
+
filterPrivacy?: XsdBoolean;
|
|
20
|
+
promptedSolutions?: XsdBoolean;
|
|
21
|
+
showInkAnnotation?: XsdBoolean;
|
|
22
|
+
backupFile?: XsdBoolean;
|
|
23
|
+
saveExternalLinkValues?: XsdBoolean;
|
|
24
|
+
updateLinks?: "userSet" | "never" | "always";
|
|
25
|
+
codeName?: string;
|
|
26
|
+
hidePivotFieldList?: XsdBoolean;
|
|
27
|
+
showPivotChartFilter?: XsdBoolean;
|
|
28
|
+
allowRefreshQuery?: XsdBoolean;
|
|
29
|
+
publishItems?: XsdBoolean;
|
|
30
|
+
checkCompatibility?: XsdBoolean;
|
|
31
|
+
autoCompressPictures?: XsdBoolean;
|
|
32
|
+
refreshAllConnections?: XsdBoolean;
|
|
33
|
+
defaultThemeVersion?: number;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface WorkbookProtection {
|
|
38
|
+
$attributes?: {
|
|
39
|
+
workbookAlgorithmName?: string;
|
|
40
|
+
workbookHashValue?: string;
|
|
41
|
+
workbookSaltValue?: string;
|
|
42
|
+
workbookSpinCount?: number;
|
|
43
|
+
workbookPassword?: string;
|
|
44
|
+
revisionsAlgorithmName?: string;
|
|
45
|
+
revisionsHashValue?: string;
|
|
46
|
+
revisionsSaltValue?: string;
|
|
47
|
+
revisionsSpinCount?: number;
|
|
48
|
+
revisionsPassword?: string;
|
|
49
|
+
lockStructure?: XsdBoolean;
|
|
50
|
+
lockWindows?: XsdBoolean;
|
|
51
|
+
lockRevision?: XsdBoolean;
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface WorkbookView {
|
|
56
|
+
$attributes?: {
|
|
57
|
+
visibility?: "visible" | "hidden" | "veryHidden";
|
|
58
|
+
minimized?: XsdBoolean;
|
|
59
|
+
showHorizontalScroll?: XsdBoolean;
|
|
60
|
+
showVerticalScroll?: XsdBoolean;
|
|
61
|
+
showSheetTabs?: XsdBoolean;
|
|
62
|
+
xWindow?: number;
|
|
63
|
+
yWindow?: number;
|
|
64
|
+
windowWidth?: number;
|
|
65
|
+
windowHeight?: number;
|
|
66
|
+
tabRatio?: number;
|
|
67
|
+
firstSheet?: number;
|
|
68
|
+
activeTab?: number;
|
|
69
|
+
autoFilterDateGrouping?: XsdBoolean;
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export interface BookViews {
|
|
74
|
+
workbookView: OneOrMany<WorkbookView>;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface Sheet {
|
|
78
|
+
$attributes?: {
|
|
79
|
+
name: string;
|
|
80
|
+
sheetId: number;
|
|
81
|
+
id: string;
|
|
82
|
+
state?: "visible" | "hidden" | "veryHidden";
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export interface Sheets {
|
|
87
|
+
sheet: OneOrMany<Sheet>;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export interface DefinedName extends TextElement {
|
|
91
|
+
$attributes?: {
|
|
92
|
+
name: string;
|
|
93
|
+
comment?: string;
|
|
94
|
+
customMenu?: string;
|
|
95
|
+
description?: string;
|
|
96
|
+
help?: string;
|
|
97
|
+
statusBar?: string;
|
|
98
|
+
localSheetId?: number;
|
|
99
|
+
hidden?: XsdBoolean;
|
|
100
|
+
function?: XsdBoolean;
|
|
101
|
+
vbProcedure?: XsdBoolean;
|
|
102
|
+
xlm?: XsdBoolean;
|
|
103
|
+
functionGroupId?: number;
|
|
104
|
+
shortcutKey?: string;
|
|
105
|
+
publishToServer?: XsdBoolean;
|
|
106
|
+
workbookParameter?: XsdBoolean;
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export interface DefinedNames {
|
|
111
|
+
definedName: OneOrMany<DefinedName>;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export interface CalcPr {
|
|
115
|
+
$attributes?: {
|
|
116
|
+
calcId?: number;
|
|
117
|
+
calcMode?: "manual" | "auto" | "autoNoTable";
|
|
118
|
+
fullCalcOnLoad?: XsdBoolean;
|
|
119
|
+
refMode?: "A1" | "R1C1";
|
|
120
|
+
iterate?: XsdBoolean;
|
|
121
|
+
iterateCount?: number;
|
|
122
|
+
iterateDelta?: number;
|
|
123
|
+
fullPrecision?: XsdBoolean;
|
|
124
|
+
calcCompleted?: XsdBoolean;
|
|
125
|
+
calcOnSave?: XsdBoolean;
|
|
126
|
+
concurrentCalc?: XsdBoolean;
|
|
127
|
+
concurrentManualCount?: number;
|
|
128
|
+
forceFullCalc?: XsdBoolean;
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export interface PivotCache {
|
|
133
|
+
$attributes?: {
|
|
134
|
+
cacheId: number;
|
|
135
|
+
id: string;
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export interface PivotCaches {
|
|
140
|
+
pivotCache: OneOrMany<PivotCache>;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export interface ExternalReference {
|
|
144
|
+
$attributes?: {
|
|
145
|
+
id: string;
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export interface ExternalReferences {
|
|
150
|
+
externalReference: OneOrMany<ExternalReference>;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export interface Workbook {
|
|
154
|
+
sheets: Sheets;
|
|
155
|
+
|
|
156
|
+
fileVersion?: FileVersion;
|
|
157
|
+
workbookPr?: WorkbookPr;
|
|
158
|
+
workbookProtection?: WorkbookProtection;
|
|
159
|
+
bookViews?: BookViews;
|
|
160
|
+
definedNames?: DefinedNames;
|
|
161
|
+
calcPr?: CalcPr;
|
|
162
|
+
pivotCaches?: PivotCaches;
|
|
163
|
+
externalReferences?: ExternalReferences;
|
|
164
|
+
extLst?: ExtensionList;
|
|
165
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { OneOrMany } from "./util.js";
|
|
2
|
+
import type { SheetData } from "./sheetData.js";
|
|
3
|
+
import type { SheetViews } from "./sheetViews.js";
|
|
4
|
+
import type { Cols } from "./columns.js";
|
|
5
|
+
import type {
|
|
6
|
+
SheetPr,
|
|
7
|
+
SheetDimension,
|
|
8
|
+
SheetFormatPr,
|
|
9
|
+
SheetProtection,
|
|
10
|
+
} from "./sheetProperties.js";
|
|
11
|
+
import type {
|
|
12
|
+
PageMargins,
|
|
13
|
+
PageSetup,
|
|
14
|
+
PrintOptions,
|
|
15
|
+
HeaderFooter,
|
|
16
|
+
PageBreak,
|
|
17
|
+
} from "./pageLayout.js";
|
|
18
|
+
import type {
|
|
19
|
+
MergeCells,
|
|
20
|
+
ConditionalFormatting,
|
|
21
|
+
DataValidations,
|
|
22
|
+
AutoFilter,
|
|
23
|
+
SortState,
|
|
24
|
+
Hyperlinks,
|
|
25
|
+
X14ConditionalFormattings,
|
|
26
|
+
} from "./dataFeatures.js";
|
|
27
|
+
import type { Drawing, TableParts, Extension, ExtensionList } from "./misc.js";
|
|
28
|
+
import type { SparklineGroups } from "./sparkline.js";
|
|
29
|
+
|
|
30
|
+
export interface WorksheetExtension extends Extension {
|
|
31
|
+
sparklineGroups?: SparklineGroups;
|
|
32
|
+
conditionalFormattings?: X14ConditionalFormattings;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface Worksheet {
|
|
36
|
+
sheetData: SheetData;
|
|
37
|
+
|
|
38
|
+
sheetPr?: SheetPr;
|
|
39
|
+
dimension?: SheetDimension;
|
|
40
|
+
sheetViews?: SheetViews;
|
|
41
|
+
sheetFormatPr?: SheetFormatPr;
|
|
42
|
+
sheetProtection?: SheetProtection;
|
|
43
|
+
autoFilter?: AutoFilter;
|
|
44
|
+
sortState?: SortState;
|
|
45
|
+
mergeCells?: MergeCells;
|
|
46
|
+
dataValidations?: DataValidations;
|
|
47
|
+
hyperlinks?: Hyperlinks;
|
|
48
|
+
printOptions?: PrintOptions;
|
|
49
|
+
pageMargins?: PageMargins;
|
|
50
|
+
pageSetup?: PageSetup;
|
|
51
|
+
headerFooter?: HeaderFooter;
|
|
52
|
+
rowBreaks?: PageBreak;
|
|
53
|
+
colBreaks?: PageBreak;
|
|
54
|
+
drawing?: Drawing;
|
|
55
|
+
tableParts?: TableParts;
|
|
56
|
+
extLst?: ExtensionList<WorksheetExtension>;
|
|
57
|
+
|
|
58
|
+
cols?: OneOrMany<Cols>;
|
|
59
|
+
conditionalFormatting?: OneOrMany<ConditionalFormatting>;
|
|
60
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trebco/treb",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "36.1.2",
|
|
4
4
|
"license": "LGPL-3.0-or-later",
|
|
5
5
|
"homepage": "https://treb.app",
|
|
6
6
|
"repository": {
|
|
@@ -11,16 +11,18 @@
|
|
|
11
11
|
"types": "dist/treb.d.ts",
|
|
12
12
|
"type": "module",
|
|
13
13
|
"devDependencies": {
|
|
14
|
-
"@types/html-minifier": "^4.0.
|
|
15
|
-
"@types/node": "^
|
|
14
|
+
"@types/html-minifier": "^4.0.6",
|
|
15
|
+
"@types/node": "^25.5.0",
|
|
16
16
|
"@types/uzip": "^0.20201231.2",
|
|
17
17
|
"base64-js": "^1.5.1",
|
|
18
|
-
"cssnano": "^7.1.
|
|
19
|
-
"esbuild": "^0.
|
|
20
|
-
"eslint": "^
|
|
21
|
-
"fast-xml-parser": "^5.2
|
|
18
|
+
"cssnano": "^7.1.3",
|
|
19
|
+
"esbuild": "^0.27.4",
|
|
20
|
+
"eslint": "^10.1.0",
|
|
21
|
+
"fast-xml-parser": "^5.3.2",
|
|
22
22
|
"html-minifier-terser": "^7.2.0",
|
|
23
|
-
"
|
|
23
|
+
"ooxml-types": "file:ooxml-types",
|
|
24
|
+
"postcss": "^8.5.8",
|
|
25
|
+
"sass": "^1.98.0",
|
|
24
26
|
"treb-base-types": "file:treb-base-types",
|
|
25
27
|
"treb-calculator": "file:treb-calculator",
|
|
26
28
|
"treb-charts": "file:treb-charts",
|
|
@@ -32,9 +34,9 @@
|
|
|
32
34
|
"treb-utils": "file:treb-utils",
|
|
33
35
|
"ts-node": "^10.9.2",
|
|
34
36
|
"tslib": "^2.8.1",
|
|
35
|
-
"tsx": "^4.20.
|
|
36
|
-
"typescript": "^
|
|
37
|
-
"typescript-eslint": "^8.
|
|
37
|
+
"tsx": "^4.20.6",
|
|
38
|
+
"typescript": "^6.0.2",
|
|
39
|
+
"typescript-eslint": "^8.57.2",
|
|
38
40
|
"uzip": "^0.20201231.0"
|
|
39
41
|
},
|
|
40
42
|
"scripts": {
|