@node-projects/excelforge 2.0.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.
Files changed (48) hide show
  1. package/README.md +566 -0
  2. package/dist/core/SharedStrings.d.ts +11 -0
  3. package/dist/core/SharedStrings.js +67 -0
  4. package/dist/core/SharedStrings.js.map +1 -0
  5. package/dist/core/Workbook.d.ts +42 -0
  6. package/dist/core/Workbook.js +459 -0
  7. package/dist/core/Workbook.js.map +1 -0
  8. package/dist/core/WorkbookReader.d.ts +43 -0
  9. package/dist/core/WorkbookReader.js +563 -0
  10. package/dist/core/WorkbookReader.js.map +1 -0
  11. package/dist/core/Worksheet.d.ts +78 -0
  12. package/dist/core/Worksheet.js +568 -0
  13. package/dist/core/Worksheet.js.map +1 -0
  14. package/dist/core/properties.d.ts +91 -0
  15. package/dist/core/properties.js +265 -0
  16. package/dist/core/properties.js.map +1 -0
  17. package/dist/core/types.d.ts +388 -0
  18. package/dist/core/types.js +2 -0
  19. package/dist/core/types.js.map +1 -0
  20. package/dist/features/ChartBuilder.d.ts +2 -0
  21. package/dist/features/ChartBuilder.js +165 -0
  22. package/dist/features/ChartBuilder.js.map +1 -0
  23. package/dist/features/TableBuilder.d.ts +2 -0
  24. package/dist/features/TableBuilder.js +36 -0
  25. package/dist/features/TableBuilder.js.map +1 -0
  26. package/dist/index-min.js +259 -0
  27. package/dist/index.d.ts +7 -0
  28. package/dist/index.js +7 -0
  29. package/dist/index.js.map +1 -0
  30. package/dist/styles/StyleRegistry.d.ts +19 -0
  31. package/dist/styles/StyleRegistry.js +215 -0
  32. package/dist/styles/StyleRegistry.js.map +1 -0
  33. package/dist/styles/builders.d.ts +91 -0
  34. package/dist/styles/builders.js +136 -0
  35. package/dist/styles/builders.js.map +1 -0
  36. package/dist/utils/helpers.d.ts +26 -0
  37. package/dist/utils/helpers.js +85 -0
  38. package/dist/utils/helpers.js.map +1 -0
  39. package/dist/utils/xmlParser.d.ts +17 -0
  40. package/dist/utils/xmlParser.js +179 -0
  41. package/dist/utils/xmlParser.js.map +1 -0
  42. package/dist/utils/zip.d.ts +11 -0
  43. package/dist/utils/zip.js +571 -0
  44. package/dist/utils/zip.js.map +1 -0
  45. package/dist/utils/zipReader.d.ts +6 -0
  46. package/dist/utils/zipReader.js +84 -0
  47. package/dist/utils/zipReader.js.map +1 -0
  48. package/package.json +28 -0
@@ -0,0 +1,388 @@
1
+ export type Color = string;
2
+ export type BorderStyle = 'thin' | 'medium' | 'thick' | 'dashed' | 'dotted' | 'double' | 'hair' | 'mediumDashed' | 'dashDot' | 'mediumDashDot' | 'dashDotDot' | 'mediumDashDotDot' | 'slantDashDot';
3
+ export interface BorderSide {
4
+ style?: BorderStyle;
5
+ color?: Color;
6
+ }
7
+ export interface Border {
8
+ left?: BorderSide;
9
+ right?: BorderSide;
10
+ top?: BorderSide;
11
+ bottom?: BorderSide;
12
+ diagonal?: BorderSide;
13
+ diagonalUp?: boolean;
14
+ diagonalDown?: boolean;
15
+ }
16
+ export interface Font {
17
+ name?: string;
18
+ size?: number;
19
+ bold?: boolean;
20
+ italic?: boolean;
21
+ underline?: 'single' | 'double' | 'singleAccounting' | 'doubleAccounting' | 'none';
22
+ strike?: boolean;
23
+ color?: Color;
24
+ scheme?: 'minor' | 'major' | 'none';
25
+ charset?: number;
26
+ family?: number;
27
+ vertAlign?: 'superscript' | 'subscript' | 'baseline';
28
+ }
29
+ export type FillPattern = 'solid' | 'none' | 'gray125' | 'gray0625' | 'darkGray' | 'mediumGray' | 'lightGray' | 'darkHorizontal' | 'darkVertical' | 'darkDown' | 'darkUp' | 'darkGrid' | 'darkTrellis' | 'lightHorizontal' | 'lightVertical' | 'lightDown' | 'lightUp' | 'lightGrid' | 'lightTrellis';
30
+ export interface PatternFill {
31
+ type: 'pattern';
32
+ pattern: FillPattern;
33
+ fgColor?: Color;
34
+ bgColor?: Color;
35
+ }
36
+ export type GradientType = 'linear' | 'path';
37
+ export interface GradientStop {
38
+ position: number;
39
+ color: Color;
40
+ }
41
+ export interface GradientFill {
42
+ type: 'gradient';
43
+ gradientType?: GradientType;
44
+ degree?: number;
45
+ left?: number;
46
+ right?: number;
47
+ top?: number;
48
+ bottom?: number;
49
+ stops: GradientStop[];
50
+ }
51
+ export type Fill = PatternFill | GradientFill;
52
+ export type HorizontalAlign = 'general' | 'left' | 'center' | 'right' | 'fill' | 'justify' | 'centerContinuous' | 'distributed';
53
+ export type VerticalAlign = 'top' | 'center' | 'bottom' | 'justify' | 'distributed';
54
+ export interface Alignment {
55
+ horizontal?: HorizontalAlign;
56
+ vertical?: VerticalAlign;
57
+ wrapText?: boolean;
58
+ shrinkToFit?: boolean;
59
+ textRotation?: number;
60
+ indent?: number;
61
+ readingOrder?: 0 | 1 | 2;
62
+ }
63
+ export interface NumberFormat {
64
+ formatCode: string;
65
+ }
66
+ export interface CellStyle {
67
+ font?: Font;
68
+ fill?: Fill;
69
+ border?: Border;
70
+ alignment?: Alignment;
71
+ numberFormat?: NumberFormat;
72
+ numFmtId?: number;
73
+ locked?: boolean;
74
+ hidden?: boolean;
75
+ }
76
+ export type CellValue = string | number | boolean | Date | null | undefined;
77
+ export interface RichTextRun {
78
+ text: string;
79
+ font?: Font;
80
+ }
81
+ export interface Cell {
82
+ value?: CellValue;
83
+ formula?: string;
84
+ arrayFormula?: string;
85
+ richText?: RichTextRun[];
86
+ style?: CellStyle;
87
+ comment?: Comment;
88
+ hyperlink?: Hyperlink;
89
+ validation?: DataValidation;
90
+ }
91
+ export interface Comment {
92
+ text: string;
93
+ author?: string;
94
+ }
95
+ export interface Hyperlink {
96
+ href: string;
97
+ tooltip?: string;
98
+ }
99
+ export type ValidationOperator = 'between' | 'notBetween' | 'equal' | 'notEqual' | 'lessThan' | 'lessThanOrEqual' | 'greaterThan' | 'greaterThanOrEqual';
100
+ export type ValidationType = 'whole' | 'decimal' | 'list' | 'date' | 'time' | 'textLength' | 'custom';
101
+ export interface DataValidation {
102
+ type: ValidationType;
103
+ operator?: ValidationOperator;
104
+ formula1?: string;
105
+ formula2?: string;
106
+ list?: string[];
107
+ showDropDown?: boolean;
108
+ showErrorAlert?: boolean;
109
+ errorTitle?: string;
110
+ error?: string;
111
+ showInputMessage?: boolean;
112
+ promptTitle?: string;
113
+ prompt?: string;
114
+ allowBlank?: boolean;
115
+ }
116
+ export interface MergeRange {
117
+ startRow: number;
118
+ startCol: number;
119
+ endRow: number;
120
+ endCol: number;
121
+ }
122
+ export type ImageFormat = 'png' | 'jpeg' | 'gif' | 'emf' | 'wmf' | 'tiff';
123
+ export interface ImagePosition {
124
+ col: number;
125
+ row: number;
126
+ colOff?: number;
127
+ rowOff?: number;
128
+ }
129
+ export interface Image {
130
+ data: Uint8Array | string;
131
+ format: ImageFormat;
132
+ from: ImagePosition;
133
+ to?: ImagePosition;
134
+ width?: number;
135
+ height?: number;
136
+ altText?: string;
137
+ }
138
+ export type ChartType = 'bar' | 'barStacked' | 'barStacked100' | 'column' | 'columnStacked' | 'columnStacked100' | 'line' | 'lineStacked' | 'lineMarker' | 'area' | 'areaStacked' | 'pie' | 'doughnut' | 'scatter' | 'scatterSmooth' | 'bubble' | 'radar' | 'radarFilled' | 'stock';
139
+ export interface ChartSeries {
140
+ name?: string;
141
+ values: string;
142
+ categories?: string;
143
+ color?: Color;
144
+ }
145
+ export interface ChartAxis {
146
+ title?: string;
147
+ min?: number;
148
+ max?: number;
149
+ gridLines?: boolean;
150
+ numFmt?: string;
151
+ }
152
+ export interface ChartPosition {
153
+ col: number;
154
+ row: number;
155
+ colOff?: number;
156
+ rowOff?: number;
157
+ }
158
+ export interface Chart {
159
+ type: ChartType;
160
+ title?: string;
161
+ series: ChartSeries[];
162
+ from: ChartPosition;
163
+ to: ChartPosition;
164
+ xAxis?: ChartAxis;
165
+ yAxis?: ChartAxis;
166
+ legend?: boolean | 'top' | 'bottom' | 'left' | 'right' | 'b' | 't' | 'l' | 'r';
167
+ style?: number;
168
+ varyColors?: boolean;
169
+ grouping?: string;
170
+ }
171
+ export type CFType = 'cellIs' | 'containsText' | 'notContainsText' | 'beginsWith' | 'endsWith' | 'expression' | 'colorScale' | 'dataBar' | 'iconSet' | 'top10' | 'aboveAverage' | 'duplicateValues' | 'uniqueValues' | 'containsBlanks' | 'notContainsBlanks' | 'containsErrors' | 'notContainsErrors' | 'timePeriod';
172
+ export interface CFColorScale {
173
+ type: 'colorScale';
174
+ cfvo: Array<{
175
+ type: 'min' | 'max' | 'percent' | 'num' | 'formula';
176
+ val?: string;
177
+ }>;
178
+ color: Color[];
179
+ }
180
+ export interface CFDataBar {
181
+ type: 'dataBar';
182
+ color?: Color;
183
+ minColor?: Color;
184
+ maxColor?: Color;
185
+ minType?: 'min' | 'max' | 'percent' | 'num' | 'formula';
186
+ minVal?: string | number;
187
+ maxType?: 'min' | 'max' | 'percent' | 'num' | 'formula';
188
+ maxVal?: string | number;
189
+ showValue?: boolean;
190
+ }
191
+ export type IconSet = '3Arrows' | '3ArrowsGray' | '3Flags' | '3TrafficLights1' | '3TrafficLights2' | '3Signs' | '3Symbols' | '3Symbols2' | '4Arrows' | '4ArrowsGray' | '4RedToBlack' | '4Rating' | '4TrafficLights' | '5Arrows' | '5ArrowsGray' | '5Rating' | '5Quarters';
192
+ export interface CFIconSet {
193
+ type: 'iconSet';
194
+ iconSet: IconSet;
195
+ cfvo: Array<{
196
+ type: string;
197
+ val?: string;
198
+ }>;
199
+ showValue?: boolean;
200
+ reverse?: boolean;
201
+ }
202
+ export interface ConditionalFormat {
203
+ sqref: string;
204
+ type: CFType;
205
+ operator?: ValidationOperator;
206
+ formula?: string;
207
+ formula2?: string;
208
+ text?: string;
209
+ priority?: number;
210
+ style?: CellStyle;
211
+ colorScale?: CFColorScale;
212
+ dataBar?: CFDataBar;
213
+ iconSet?: CFIconSet;
214
+ aboveAverage?: boolean;
215
+ percent?: boolean;
216
+ rank?: number;
217
+ timePeriod?: string;
218
+ }
219
+ export type TableStyle = 'TableStyleLight1' | 'TableStyleLight2' | 'TableStyleLight3' | 'TableStyleLight4' | 'TableStyleLight5' | 'TableStyleLight6' | 'TableStyleMedium1' | 'TableStyleMedium2' | 'TableStyleMedium3' | 'TableStyleMedium4' | 'TableStyleMedium5' | 'TableStyleMedium6' | 'TableStyleMedium7' | 'TableStyleMedium8' | 'TableStyleMedium9' | 'TableStyleDark1' | 'TableStyleDark2' | 'TableStyleDark3' | 'TableStyleDark4' | 'TableStyleDark5' | 'TableStyleDark6' | 'TableStyleDark7' | 'TableStyleDark8' | 'TableStyleDark9' | string;
220
+ export interface TableColumn {
221
+ name: string;
222
+ totalsRowFunction?: 'sum' | 'count' | 'average' | 'max' | 'min' | 'stdDev' | 'var' | 'vars' | 'countNums' | 'custom' | 'none';
223
+ totalsRowFormula?: string;
224
+ totalsRowLabel?: string;
225
+ filterButton?: boolean;
226
+ style?: CellStyle;
227
+ numFmt?: string;
228
+ }
229
+ export interface Table {
230
+ name: string;
231
+ displayName?: string;
232
+ ref: string;
233
+ style?: TableStyle;
234
+ showFirstColumn?: boolean;
235
+ showLastColumn?: boolean;
236
+ showRowStripes?: boolean;
237
+ showColumnStripes?: boolean;
238
+ totalsRow?: boolean;
239
+ columns: TableColumn[];
240
+ }
241
+ export interface NamedRange {
242
+ name: string;
243
+ ref: string;
244
+ scope?: string;
245
+ comment?: string;
246
+ }
247
+ export type PaperSize = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17;
248
+ export type Orientation = 'portrait' | 'landscape';
249
+ export interface PageSetup {
250
+ paperSize?: PaperSize;
251
+ orientation?: Orientation;
252
+ fitToPage?: boolean;
253
+ fitToWidth?: number;
254
+ fitToHeight?: number;
255
+ scale?: number;
256
+ horizontalDpi?: number;
257
+ verticalDpi?: number;
258
+ firstPageNumber?: number;
259
+ }
260
+ export interface PageMargins {
261
+ left?: number;
262
+ right?: number;
263
+ top?: number;
264
+ bottom?: number;
265
+ header?: number;
266
+ footer?: number;
267
+ }
268
+ export interface HeaderFooter {
269
+ oddHeader?: string;
270
+ oddFooter?: string;
271
+ evenHeader?: string;
272
+ evenFooter?: string;
273
+ firstHeader?: string;
274
+ firstFooter?: string;
275
+ differentOddEven?: boolean;
276
+ differentFirst?: boolean;
277
+ }
278
+ export interface PrintOptions {
279
+ gridLines?: boolean;
280
+ gridLinesSet?: boolean;
281
+ headings?: boolean;
282
+ centerHorizontal?: boolean;
283
+ centerVertical?: boolean;
284
+ }
285
+ export interface ColumnDef {
286
+ width?: number;
287
+ hidden?: boolean;
288
+ outlineLevel?: number;
289
+ collapsed?: boolean;
290
+ style?: CellStyle;
291
+ bestFit?: boolean;
292
+ customWidth?: boolean;
293
+ }
294
+ export interface RowDef {
295
+ height?: number;
296
+ hidden?: boolean;
297
+ outlineLevel?: number;
298
+ collapsed?: boolean;
299
+ style?: CellStyle;
300
+ thickTop?: boolean;
301
+ thickBot?: boolean;
302
+ }
303
+ export interface FreezePane {
304
+ col?: number;
305
+ row?: number;
306
+ }
307
+ export interface SplitPane {
308
+ xSplit?: number;
309
+ ySplit?: number;
310
+ topLeftCell?: string;
311
+ activePane?: 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight';
312
+ state?: 'split' | 'frozen' | 'frozenSplit';
313
+ }
314
+ export interface SheetProtection {
315
+ password?: string;
316
+ sheet?: boolean;
317
+ selectLockedCells?: boolean;
318
+ selectUnlockedCells?: boolean;
319
+ formatCells?: boolean;
320
+ formatColumns?: boolean;
321
+ formatRows?: boolean;
322
+ insertColumns?: boolean;
323
+ insertRows?: boolean;
324
+ insertHyperlinks?: boolean;
325
+ deleteColumns?: boolean;
326
+ deleteRows?: boolean;
327
+ sort?: boolean;
328
+ autoFilter?: boolean;
329
+ pivotTables?: boolean;
330
+ }
331
+ export interface AutoFilter {
332
+ ref: string;
333
+ }
334
+ export interface SheetView {
335
+ showGridLines?: boolean;
336
+ showRowColHeaders?: boolean;
337
+ zoomScale?: number;
338
+ rightToLeft?: boolean;
339
+ tabSelected?: boolean;
340
+ showRuler?: boolean;
341
+ view?: 'normal' | 'pageLayout' | 'pageBreakPreview';
342
+ }
343
+ export type SparklineType = 'line' | 'bar' | 'stacked';
344
+ export interface Sparkline {
345
+ type: SparklineType;
346
+ dataRange: string;
347
+ location: string;
348
+ color?: Color;
349
+ highColor?: Color;
350
+ lowColor?: Color;
351
+ firstColor?: Color;
352
+ lastColor?: Color;
353
+ negativeColor?: Color;
354
+ markersColor?: Color;
355
+ showMarkers?: boolean;
356
+ showFirst?: boolean;
357
+ showLast?: boolean;
358
+ showHigh?: boolean;
359
+ showLow?: boolean;
360
+ showNegative?: boolean;
361
+ minAxisType?: 'individual' | 'custom' | 'group';
362
+ maxAxisType?: 'individual' | 'custom' | 'group';
363
+ lineWidth?: number;
364
+ }
365
+ export interface WorkbookProperties {
366
+ title?: string;
367
+ author?: string;
368
+ company?: string;
369
+ subject?: string;
370
+ description?: string;
371
+ keywords?: string;
372
+ created?: Date;
373
+ modified?: Date;
374
+ lastModifiedBy?: string;
375
+ category?: string;
376
+ status?: string;
377
+ date1904?: boolean;
378
+ }
379
+ export interface WorksheetOptions {
380
+ name?: string;
381
+ tabColor?: Color;
382
+ state?: 'visible' | 'hidden' | 'veryHidden';
383
+ codeName?: string;
384
+ defaultRowHeight?: number;
385
+ defaultColWidth?: number;
386
+ outlineSummaryBelow?: boolean;
387
+ outlineSummaryRight?: boolean;
388
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/core/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import type { Chart } from '../core/types.js';
2
+ export declare function buildChartXml(chart: Chart): string;
@@ -0,0 +1,165 @@
1
+ import { escapeXml } from '../utils/helpers.js';
2
+ const COLORS = [
3
+ 'FF4472C4', 'FFED7D31', 'FFA5A5A5', 'FFFFC000', 'FF5B9BD5',
4
+ 'FF70AD47', 'FF264478', 'FF9E480E', 'FF636363', 'FF997300',
5
+ ];
6
+ function spPr(color) {
7
+ return `<c:spPr><a:solidFill xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"><a:srgbClr val="${color.replace('FF', '')}"/></a:solidFill></c:spPr>`;
8
+ }
9
+ function seriesXml(type, series, idx) {
10
+ return series.map((s, i) => {
11
+ const color = s.color
12
+ ? s.color.startsWith('#') ? 'FF' + s.color.slice(1) : s.color
13
+ : COLORS[i % COLORS.length];
14
+ const catXml = s.categories
15
+ ? `<c:cat><c:strRef><c:f>${escapeXml(s.categories)}</c:f></c:strRef></c:cat>`
16
+ : '';
17
+ const valXml = `<c:val><c:numRef><c:f>${escapeXml(s.values)}</c:f></c:numRef></c:val>`;
18
+ const nameXml = s.name
19
+ ? `<c:tx><c:strRef><c:f>"${escapeXml(s.name)}"</c:f></c:strRef></c:tx>`
20
+ : '';
21
+ const marker = type.startsWith('line') || type === 'scatter'
22
+ ? `<c:marker><c:symbol val="none"/></c:marker>` : '';
23
+ return `<c:ser><c:idx val="${i}"/><c:order val="${i}"/>${nameXml}${spPr(color)}${marker}${catXml}${valXml}</c:ser>`;
24
+ }).join('');
25
+ }
26
+ function axisXml(id, crossId, axis, delete_ = false) {
27
+ if (delete_)
28
+ return `<c:valAx><c:axId val="${id}"/><c:scaling><c:orientation val="minMax"/></c:scaling><c:delete val="1"/><c:axPos val="b"/><c:crossAx val="${crossId}"/></c:valAx>`;
29
+ const title = axis?.title
30
+ ? `<c:title><c:tx><c:rich><a:bodyPr xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"/><a:p xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"><a:r><a:t>${escapeXml(axis.title)}</a:t></a:r></a:p></c:rich></c:tx><c:overlay val="0"/></c:title>` : '';
31
+ const minMax = [
32
+ axis?.min !== undefined ? `<c:min val="${axis.min}"/>` : '',
33
+ axis?.max !== undefined ? `<c:max val="${axis.max}"/>` : '',
34
+ ].join('');
35
+ const numFmt = axis?.numFmt ? `<c:numFmt formatCode="${escapeXml(axis.numFmt)}" sourceLinked="0"/>` : '';
36
+ const gridLines = axis?.gridLines !== false ? `<c:majorGridlines/>` : '';
37
+ return `<c:valAx>
38
+ <c:axId val="${id}"/>
39
+ <c:scaling><c:orientation val="minMax"/>${minMax}</c:scaling>
40
+ <c:delete val="0"/>
41
+ <c:axPos val="l"/>
42
+ ${title}${gridLines}${numFmt}
43
+ <c:crossAx val="${crossId}"/>
44
+ </c:valAx>`;
45
+ }
46
+ function catAxisXml(id, crossId, axis) {
47
+ const title = axis?.title
48
+ ? `<c:title><c:tx><c:rich><a:bodyPr xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"/><a:p xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"><a:r><a:t>${escapeXml(axis.title)}</a:t></a:r></a:p></c:rich></c:tx><c:overlay val="0"/></c:title>` : '';
49
+ const gridLines = axis?.gridLines ? `<c:majorGridlines/>` : '';
50
+ return `<c:catAx>
51
+ <c:axId val="${id}"/>
52
+ <c:scaling><c:orientation val="minMax"/></c:scaling>
53
+ <c:delete val="0"/>
54
+ <c:axPos val="b"/>
55
+ ${title}${gridLines}
56
+ <c:crossAx val="${crossId}"/>
57
+ </c:catAx>`;
58
+ }
59
+ function legendXml(legend) {
60
+ if (legend === false)
61
+ return '';
62
+ const pos = typeof legend === 'string' ? legend : 'b';
63
+ return `<c:legend><c:legendPos val="${pos}"/></c:legend>`;
64
+ }
65
+ export function buildChartXml(chart) {
66
+ const type = chart.type;
67
+ const series = chart.series;
68
+ const title = chart.title
69
+ ? `<c:title><c:tx><c:rich>
70
+ <a:bodyPr xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"/>
71
+ <a:p xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main">
72
+ <a:r><a:t>${escapeXml(chart.title)}</a:t></a:r>
73
+ </a:p>
74
+ </c:rich></c:tx><c:overlay val="0"/></c:title>` : '';
75
+ const varyColors = chart.varyColors ? `<c:varyColors val="1"/>` : '';
76
+ let plotXml = '';
77
+ const isPie = type === 'pie' || type === 'doughnut';
78
+ const isBar = type.startsWith('bar') || type.startsWith('column');
79
+ const isLine = type.startsWith('line');
80
+ const isScatter = type.startsWith('scatter') || type === 'bubble';
81
+ const isArea = type.startsWith('area');
82
+ const isRadar = type.startsWith('radar');
83
+ const isStock = type === 'stock';
84
+ const grouping = chart.grouping ?? (type.endsWith('Stacked100') ? 'percentStacked' :
85
+ type.endsWith('Stacked') ? 'stacked' :
86
+ isBar ? 'clustered' : isLine || isArea ? 'standard' : undefined);
87
+ if (isPie) {
88
+ const tag = type === 'doughnut' ? 'doughnutChart' : 'pieChart';
89
+ const hole = type === 'doughnut' ? `<c:holeSize val="50"/>` : '';
90
+ plotXml = `<c:${tag}>${varyColors}${seriesXml(type, series, 0)}${hole}</c:${tag}>`;
91
+ }
92
+ else if (isBar) {
93
+ const barDir = type.startsWith('bar') ? 'bar' : 'col';
94
+ plotXml = `<c:barChart>
95
+ <c:barDir val="${barDir}"/>
96
+ ${grouping ? `<c:grouping val="${grouping}"/>` : ''}
97
+ ${varyColors}
98
+ ${seriesXml(type, series, 0)}
99
+ <c:axId val="1"/><c:axId val="2"/>
100
+ </c:barChart>`;
101
+ }
102
+ else if (isLine) {
103
+ plotXml = `<c:lineChart>
104
+ ${grouping ? `<c:grouping val="${grouping}"/>` : ''}
105
+ ${varyColors}
106
+ ${seriesXml(type, series, 0)}
107
+ <c:axId val="1"/><c:axId val="2"/>
108
+ </c:lineChart>`;
109
+ }
110
+ else if (isScatter) {
111
+ plotXml = `<c:scatterChart>
112
+ <c:scatterStyle val="${type === 'scatterSmooth' ? 'smoothMarker' : 'marker'}"/>
113
+ ${varyColors}
114
+ ${seriesXml(type, series, 0)}
115
+ <c:axId val="1"/><c:axId val="2"/>
116
+ </c:scatterChart>`;
117
+ }
118
+ else if (isArea) {
119
+ plotXml = `<c:areaChart>
120
+ ${grouping ? `<c:grouping val="${grouping}"/>` : ''}
121
+ ${varyColors}
122
+ ${seriesXml(type, series, 0)}
123
+ <c:axId val="1"/><c:axId val="2"/>
124
+ </c:areaChart>`;
125
+ }
126
+ else if (isRadar) {
127
+ plotXml = `<c:radarChart>
128
+ <c:radarStyle val="${type === 'radarFilled' ? 'filled' : 'marker'}"/>
129
+ ${varyColors}
130
+ ${seriesXml(type, series, 0)}
131
+ <c:axId val="1"/><c:axId val="2"/>
132
+ </c:radarChart>`;
133
+ }
134
+ else {
135
+ plotXml = `<c:barChart>
136
+ <c:barDir val="col"/>
137
+ <c:grouping val="clustered"/>
138
+ ${varyColors}
139
+ ${seriesXml(type, series, 0)}
140
+ <c:axId val="1"/><c:axId val="2"/>
141
+ </c:barChart>`;
142
+ }
143
+ const needsAxes = !isPie;
144
+ const axesXml = needsAxes
145
+ ? catAxisXml(1, 2, chart.xAxis) + axisXml(2, 1, chart.yAxis)
146
+ : '';
147
+ const legXml = legendXml(chart.legend ?? 'b');
148
+ return `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
149
+ <c:chartSpace xmlns:c="http://schemas.openxmlformats.org/drawingml/2006/chart"
150
+ xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"
151
+ xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">
152
+ <c:chart>
153
+ ${title}
154
+ <c:autoTitleDeleted val="${chart.title ? '0' : '1'}"/>
155
+ <c:plotArea>
156
+ ${plotXml}
157
+ ${axesXml}
158
+ </c:plotArea>
159
+ ${legXml}
160
+ <c:plotVisOnly val="1"/>
161
+ </c:chart>
162
+ ${chart.style ? `<c:style val="${chart.style}"/>` : ''}
163
+ </c:chartSpace>`;
164
+ }
165
+ //# sourceMappingURL=ChartBuilder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChartBuilder.js","sourceRoot":"","sources":["../../src/features/ChartBuilder.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,MAAM,MAAM,GAAG;IACb,UAAU,EAAC,U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AAM,MAAM,GAAG,SAAS,CAAC,KAAK,CAAC,MAAM,IAAI,GAAG,CAAC,CAAC;IAE9C,OAAO;;;;;IAKL,KAAK;6BACoB,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG;;MAE9C,OAAO;MACP,OAAO;;IAET,MAAM;;;EAGR,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,iBAAiB,KAAK,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE;gBACtC,CAAC;AACjB,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { Table } from '../core/types.js';
2
+ export declare function buildTableXml(table: Table, tableId: number): string;
@@ -0,0 +1,36 @@
1
+ import { escapeXml, parseRange, colIndexToLetter } from '../utils/helpers.js';
2
+ export function buildTableXml(table, tableId) {
3
+ const { startRow, startCol, endRow, endCol } = parseRange(table.ref);
4
+ const displayName = table.displayName ?? table.name;
5
+ const colsXml = table.columns.map((col, i) => {
6
+ const colIdx = startCol + i;
7
+ const id = i + 1;
8
+ const totFn = col.totalsRowFunction ?? 'none';
9
+ const totAttrs = table.totalsRow && totFn !== 'none'
10
+ ? ` totalsRowFunction="${totFn}"${col.totalsRowFormula ? ` totalsRowFormula="${escapeXml(col.totalsRowFormula)}"` : ''}`
11
+ : '';
12
+ const totLabel = table.totalsRow && col.totalsRowLabel
13
+ ? ` totalsRowLabel="${escapeXml(col.totalsRowLabel)}"` : '';
14
+ return `<tableColumn id="${id}" name="${escapeXml(col.name)}"${totAttrs}${totLabel}/>`;
15
+ }).join('');
16
+ const styleAttrs = [
17
+ `name="${escapeXml(table.style ?? 'TableStyleMedium2')}"`,
18
+ table.showFirstColumn ? 'showFirstColumn="1"' : '',
19
+ table.showLastColumn ? 'showLastColumn="1"' : '',
20
+ table.showRowStripes !== false ? 'showRowStripes="1"' : '',
21
+ table.showColumnStripes ? 'showColumnStripes="1"' : '',
22
+ ].filter(Boolean).join(' ');
23
+ const totalsRow = table.totalsRow ? 1 : 0;
24
+ const startColLetter = colIndexToLetter(startCol);
25
+ const endColLetter = colIndexToLetter(endCol);
26
+ const autoFilterRef = `${startColLetter}${startRow}:${endColLetter}${endRow - totalsRow}`;
27
+ return `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
28
+ <table xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"
29
+ id="${tableId}" name="${escapeXml(table.name)}" displayName="${escapeXml(displayName)}"
30
+ ref="${table.ref}" totalsRowCount="${totalsRow}">
31
+ <autoFilter ref="${autoFilterRef}"/>
32
+ <tableColumns count="${table.columns.length}">${colsXml}</tableColumns>
33
+ <tableStyleInfo ${styleAttrs}/>
34
+ </table>`;
35
+ }
36
+ //# sourceMappingURL=TableBuilder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableBuilder.js","sourceRoot":"","sources":["../../src/features/TableBuilder.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE9E,MAAM,UAAU,aAAa,CAAC,KAAY,EAAE,OAAe;IACzD,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACrE,MAAM,WAAW,GAAG,KAAK,CAAC,WAAW,IAAI,KAAK,CAAC,IAAI,CAAC;IAEpD,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE;QAC3C,MAAM,MAAM,GAAG,QAAQ,GAAG,CAAC,CAAC;QAC5B,MAAM,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC;QACjB,MAAM,KAAK,GAAG,GAAG,CAAC,iBAAiB,IAAI,MAAM,CAAC;QAC9C,MAAM,QAAQ,GAAG,KAAK,CAAC,SAAS,IAAI,KAAK,KAAK,MAAM;YAClD,CAAC,CAAC,uBAAuB,KAAK,I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