@rowsncolumns/toolkit 24.4.3 → 24.4.5

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 (86) hide show
  1. package/dist/cjs/excel-parser/interface.d.ts +5 -1
  2. package/dist/cjs/excel-parser/interface.d.ts.map +1 -1
  3. package/dist/cjs/excel-parser/plugins/base/index.d.ts +2 -0
  4. package/dist/cjs/excel-parser/plugins/base/index.d.ts.map +1 -1
  5. package/dist/cjs/excel-parser/plugins/base/index.js +3 -0
  6. package/dist/cjs/excel-parser/plugins/xls/index.d.ts +55 -9
  7. package/dist/cjs/excel-parser/plugins/xls/index.d.ts.map +1 -1
  8. package/dist/cjs/excel-parser/plugins/xls/index.js +487 -24
  9. package/dist/cjs/excel-parser/plugins/xlsb/index.d.ts.map +1 -1
  10. package/dist/cjs/excel-parser/plugins/xlsb/index.js +12 -5
  11. package/dist/cjs/excel-parser/plugins/xlsx/chartex.d.ts +37 -0
  12. package/dist/cjs/excel-parser/plugins/xlsx/chartex.d.ts.map +1 -0
  13. package/dist/cjs/excel-parser/plugins/xlsx/chartex.js +244 -0
  14. package/dist/cjs/excel-parser/plugins/xlsx/form-controls.d.ts +70 -0
  15. package/dist/cjs/excel-parser/plugins/xlsx/form-controls.d.ts.map +1 -0
  16. package/dist/cjs/excel-parser/plugins/xlsx/form-controls.js +295 -0
  17. package/dist/cjs/excel-parser/plugins/xlsx/index.d.ts +9 -1
  18. package/dist/cjs/excel-parser/plugins/xlsx/index.d.ts.map +1 -1
  19. package/dist/cjs/excel-parser/plugins/xlsx/index.js +251 -104
  20. package/dist/cjs/excel-parser/plugins/xlsx/styles.d.ts +15 -1
  21. package/dist/cjs/excel-parser/plugins/xlsx/styles.d.ts.map +1 -1
  22. package/dist/cjs/excel-parser/plugins/xlsx/styles.js +90 -4
  23. package/dist/cjs/excel-parser/registry.d.ts +7 -0
  24. package/dist/cjs/excel-parser/registry.d.ts.map +1 -1
  25. package/dist/cjs/excel-parser/registry.js +28 -1
  26. package/dist/cjs/excel-parser/types.d.ts +10 -1
  27. package/dist/cjs/excel-parser/types.d.ts.map +1 -1
  28. package/dist/cjs/excel-parser/workbook.d.ts +2 -0
  29. package/dist/cjs/excel-parser/workbook.d.ts.map +1 -1
  30. package/dist/cjs/excel-parser/workbook.js +20 -14
  31. package/dist/cjs/excel-parser/worker.js +128 -130
  32. package/dist/cjs/exporter/xlsx/chart-builder.d.ts.map +1 -1
  33. package/dist/cjs/exporter/xlsx/chart-builder.js +5 -33
  34. package/dist/cjs/exporter/xlsx/chartex-builder.d.ts +36 -0
  35. package/dist/cjs/exporter/xlsx/chartex-builder.d.ts.map +1 -0
  36. package/dist/cjs/exporter/xlsx/chartex-builder.js +109 -0
  37. package/dist/cjs/exporter/xlsx/form-controls-builder.d.ts +61 -0
  38. package/dist/cjs/exporter/xlsx/form-controls-builder.d.ts.map +1 -0
  39. package/dist/cjs/exporter/xlsx/form-controls-builder.js +197 -0
  40. package/dist/cjs/exporter/xlsx/xlsx-export.d.ts.map +1 -1
  41. package/dist/cjs/exporter/xlsx/xlsx-export.js +431 -193
  42. package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
  43. package/dist/esm/excel-parser/interface.d.ts +5 -1
  44. package/dist/esm/excel-parser/interface.d.ts.map +1 -1
  45. package/dist/esm/excel-parser/plugins/base/index.d.ts +2 -0
  46. package/dist/esm/excel-parser/plugins/base/index.d.ts.map +1 -1
  47. package/dist/esm/excel-parser/plugins/base/index.js +3 -0
  48. package/dist/esm/excel-parser/plugins/xls/index.d.ts +55 -9
  49. package/dist/esm/excel-parser/plugins/xls/index.d.ts.map +1 -1
  50. package/dist/esm/excel-parser/plugins/xls/index.js +429 -23
  51. package/dist/esm/excel-parser/plugins/xlsb/index.d.ts.map +1 -1
  52. package/dist/esm/excel-parser/plugins/xlsb/index.js +10 -3
  53. package/dist/esm/excel-parser/plugins/xlsx/chartex.d.ts +37 -0
  54. package/dist/esm/excel-parser/plugins/xlsx/chartex.d.ts.map +1 -0
  55. package/dist/esm/excel-parser/plugins/xlsx/chartex.js +199 -0
  56. package/dist/esm/excel-parser/plugins/xlsx/form-controls.d.ts +70 -0
  57. package/dist/esm/excel-parser/plugins/xlsx/form-controls.d.ts.map +1 -0
  58. package/dist/esm/excel-parser/plugins/xlsx/form-controls.js +246 -0
  59. package/dist/esm/excel-parser/plugins/xlsx/index.d.ts +9 -1
  60. package/dist/esm/excel-parser/plugins/xlsx/index.d.ts.map +1 -1
  61. package/dist/esm/excel-parser/plugins/xlsx/index.js +92 -6
  62. package/dist/esm/excel-parser/plugins/xlsx/styles.d.ts +15 -1
  63. package/dist/esm/excel-parser/plugins/xlsx/styles.d.ts.map +1 -1
  64. package/dist/esm/excel-parser/plugins/xlsx/styles.js +80 -0
  65. package/dist/esm/excel-parser/registry.d.ts +7 -0
  66. package/dist/esm/excel-parser/registry.d.ts.map +1 -1
  67. package/dist/esm/excel-parser/registry.js +18 -1
  68. package/dist/esm/excel-parser/types.d.ts +10 -1
  69. package/dist/esm/excel-parser/types.d.ts.map +1 -1
  70. package/dist/esm/excel-parser/workbook.d.ts +2 -0
  71. package/dist/esm/excel-parser/workbook.d.ts.map +1 -1
  72. package/dist/esm/excel-parser/workbook.js +16 -10
  73. package/dist/esm/excel-parser/worker.js +10 -18
  74. package/dist/esm/exporter/xlsx/chart-builder.d.ts.map +1 -1
  75. package/dist/esm/exporter/xlsx/chart-builder.js +0 -28
  76. package/dist/esm/exporter/xlsx/chartex-builder.d.ts +36 -0
  77. package/dist/esm/exporter/xlsx/chartex-builder.d.ts.map +1 -0
  78. package/dist/esm/exporter/xlsx/chartex-builder.js +97 -0
  79. package/dist/esm/exporter/xlsx/form-controls-builder.d.ts +61 -0
  80. package/dist/esm/exporter/xlsx/form-controls-builder.d.ts.map +1 -0
  81. package/dist/esm/exporter/xlsx/form-controls-builder.js +173 -0
  82. package/dist/esm/exporter/xlsx/xlsx-export.d.ts.map +1 -1
  83. package/dist/esm/exporter/xlsx/xlsx-export.js +228 -19
  84. package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
  85. package/package.json +5 -3
  86. package/xlsx.d.ts +14 -0
@@ -0,0 +1,36 @@
1
+ import type { EmbeddedChart, SheetRange, TreemapChart } from "@rowsncolumns/spreadsheet";
2
+ /**
3
+ * Excel 2016+ "chartex" writer (`xl/charts/chartEx{N}.xml`) — the inverse
4
+ * of `excel-parser/plugins/xlsx/chartex.ts`. Treemap and sunburst have no
5
+ * `c:chartSpace` representation; Excel stores them as a `cx:chartSpace`
6
+ * whose series `layoutId` names the chart and whose data is a hierarchy
7
+ * `strDim type="cat"` (parent columns first, leaf last) plus a
8
+ * `numDim type="size"`. Anchored through `mc:AlternateContent` requiring the
9
+ * `cx1` namespace.
10
+ */
11
+ export declare const CHART_EX_REL_TYPE = "http://schemas.microsoft.com/office/2014/relationships/chartEx";
12
+ export declare const CHART_EX_CONTENT_TYPE = "application/vnd.ms-office.chartex+xml";
13
+ export declare const CHART_EX_NS = "http://schemas.microsoft.com/office/drawing/2014/chartex";
14
+ /** Chart types that live in a chartex part rather than a `c:chartSpace`. */
15
+ export declare const isChartExType: (chartType: string | undefined | null) => chartType is "treemap" | "sunburst";
16
+ /**
17
+ * The hierarchy reference: parent columns + the leaf column merged into one
18
+ * contiguous range when they sit side by side on the same sheet over the same
19
+ * rows (how Excel lays a treemap out); otherwise the leaf labels alone.
20
+ */
21
+ export declare const hierarchyRange: (spec: TreemapChart) => SheetRange | undefined;
22
+ /** `xl/charts/chartEx{N}.xml` for a treemap / sunburst; undefined when the spec has no data. */
23
+ export declare const buildChartExXml: (chart: EmbeddedChart, sheetNameById: Map<number, string>) => string | undefined;
24
+ /**
25
+ * The drawing anchor body for a chartex part: Excel's `mc:AlternateContent`
26
+ * with a `cx1`-requiring choice holding the graphic frame. No `mc:Fallback`
27
+ * is written — Excel opens the file without one, and a fallback text box
28
+ * would import as a stray shape in consumers that do not know chartex.
29
+ */
30
+ export declare const buildChartExGraphicFrameXml: ({ relId, frameId, widthEmu, heightEmu, }: {
31
+ relId: string;
32
+ frameId: number;
33
+ widthEmu: number;
34
+ heightEmu: number;
35
+ }) => string;
36
+ //# sourceMappingURL=chartex-builder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chartex-builder.d.ts","sourceRoot":"","sources":["../../../../exporter/xlsx/chartex-builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,aAAa,EACb,UAAU,EACV,YAAY,EACb,MAAM,2BAA2B,CAAC;AAGnC;;;;;;;;GAQG;AAEH,eAAO,MAAM,iBAAiB,mEACoC,CAAC;AACnE,eAAO,MAAM,qBAAqB,0CAA0C,CAAC;AAC7E,eAAO,MAAM,WAAW,6DAA6D,CAAC;AAyBtF,4EAA4E;AAC5E,eAAO,MAAM,aAAa,GAAI,WAAW,MAAM,GAAG,SAAS,GAAG,IAAI,wCACb,CAAC;AAItD;;;;GAIG;AACH,eAAO,MAAM,cAAc,GAAI,MAAM,YAAY,KAAG,UAAU,GAAG,SAsBhE,CAAC;AAEF,gGAAgG;AAChG,eAAO,MAAM,eAAe,GAC1B,OAAO,aAAa,EACpB,eAAe,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,KACjC,MAAM,GAAG,SAkCX,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,GAAI,0CAKzC;IACD,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB,WACkhB,CAAC"}
@@ -0,0 +1,109 @@
1
+ import { __assign, __read, __spreadArray } from "tslib";
2
+ import { cellRangeToAddress } from "@rowsncolumns/utils";
3
+ /**
4
+ * Excel 2016+ "chartex" writer (`xl/charts/chartEx{N}.xml`) — the inverse
5
+ * of `excel-parser/plugins/xlsx/chartex.ts`. Treemap and sunburst have no
6
+ * `c:chartSpace` representation; Excel stores them as a `cx:chartSpace`
7
+ * whose series `layoutId` names the chart and whose data is a hierarchy
8
+ * `strDim type="cat"` (parent columns first, leaf last) plus a
9
+ * `numDim type="size"`. Anchored through `mc:AlternateContent` requiring the
10
+ * `cx1` namespace.
11
+ */
12
+ export var CHART_EX_REL_TYPE = "http://schemas.microsoft.com/office/2014/relationships/chartEx";
13
+ export var CHART_EX_CONTENT_TYPE = "application/vnd.ms-office.chartex+xml";
14
+ export var CHART_EX_NS = "http://schemas.microsoft.com/office/drawing/2014/chartex";
15
+ var CHART_EX_1_NS = "http://schemas.microsoft.com/office/drawing/2015/9/8/chartex";
16
+ var A_NS = "http://schemas.openxmlformats.org/drawingml/2006/main";
17
+ var R_NS = "http://schemas.openxmlformats.org/officeDocument/2006/relationships";
18
+ var MC_NS = "http://schemas.openxmlformats.org/markup-compatibility/2006";
19
+ var XML_DECLARATION = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n";
20
+ /** `{XXXXXXXX-XXXX-4XXX-XXXX-XXXXXXXXXXXX}` — the series `uniqueId` Excel expects. */
21
+ var guid = function () {
22
+ var hex = function () { return Math.floor(Math.random() * 16).toString(16).toUpperCase(); };
23
+ var block = function (n) { return Array.from({ length: n }, hex).join(""); };
24
+ return "{".concat(block(8), "-").concat(block(4), "-4").concat(block(3), "-").concat(block(4), "-").concat(block(12), "}");
25
+ };
26
+ /** `'Sheet'!A2:B9` → `'Sheet'!$A$2:$B$9` — Excel writes chart data references absolute. */
27
+ var absoluteRef = function (ref) {
28
+ var bang = ref.lastIndexOf("!");
29
+ var sheetPart = bang >= 0 ? ref.slice(0, bang + 1) : "";
30
+ var cells = bang >= 0 ? ref.slice(bang + 1) : ref;
31
+ return "".concat(sheetPart).concat(cells.replace(/\$?([A-Z]+)\$?(\d+)/g, "$$$1$$$2"));
32
+ };
33
+ var escapeText = function (value) {
34
+ return value.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
35
+ };
36
+ /** Chart types that live in a chartex part rather than a `c:chartSpace`. */
37
+ export var isChartExType = function (chartType) {
38
+ return chartType === "treemap" || chartType === "sunburst";
39
+ };
40
+ var primarySource = function (entry) { var _a; return (_a = entry === null || entry === void 0 ? void 0 : entry.sources) === null || _a === void 0 ? void 0 : _a[0]; };
41
+ /**
42
+ * The hierarchy reference: parent columns + the leaf column merged into one
43
+ * contiguous range when they sit side by side on the same sheet over the same
44
+ * rows (how Excel lays a treemap out); otherwise the leaf labels alone.
45
+ */
46
+ export var hierarchyRange = function (spec) {
47
+ var _a, _b;
48
+ var leaf = primarySource((_a = spec.labels) === null || _a === void 0 ? void 0 : _a[0]);
49
+ if (!leaf)
50
+ return undefined;
51
+ var parents = ((_b = spec.parentLabels) !== null && _b !== void 0 ? _b : [])
52
+ .map(function (entry) { return primarySource(entry); })
53
+ .filter(function (range) { return Boolean(range); });
54
+ if (!parents.length)
55
+ return leaf;
56
+ var sameRows = parents.every(function (p) {
57
+ return p.sheetId === leaf.sheetId &&
58
+ p.startRowIndex === leaf.startRowIndex &&
59
+ p.endRowIndex === leaf.endRowIndex;
60
+ });
61
+ if (!sameRows)
62
+ return leaf;
63
+ var columns = __spreadArray(__spreadArray([], __read(parents), false), [leaf], false).map(function (r) { return r.startColumnIndex; }).sort(function (a, b) { return a - b; });
64
+ var contiguous = columns.every(function (c, i) { return i === 0 || c === columns[i - 1] + 1; });
65
+ if (!contiguous || columns[columns.length - 1] !== leaf.startColumnIndex) {
66
+ return leaf;
67
+ }
68
+ return __assign(__assign({}, leaf), { startColumnIndex: columns[0], endColumnIndex: leaf.endColumnIndex });
69
+ };
70
+ /** `xl/charts/chartEx{N}.xml` for a treemap / sunburst; undefined when the spec has no data. */
71
+ export var buildChartExXml = function (chart, sheetNameById) {
72
+ var _a;
73
+ var spec = chart.spec;
74
+ if (!isChartExType(spec.chartType))
75
+ return undefined;
76
+ var cat = hierarchyRange(spec);
77
+ var size = primarySource((_a = spec.sizeData) === null || _a === void 0 ? void 0 : _a[0]);
78
+ if (!cat || !size)
79
+ return undefined;
80
+ var catAddress = cellRangeToAddress(sheetNameById.get(cat.sheetId), cat);
81
+ var sizeAddress = cellRangeToAddress(sheetNameById.get(size.sheetId), size);
82
+ if (!catAddress || !sizeAddress)
83
+ return undefined;
84
+ var catRef = absoluteRef(catAddress);
85
+ var sizeRef = absoluteRef(sizeAddress);
86
+ var title = chart.spec.title;
87
+ var titleXml = title
88
+ ? "<cx:title pos=\"t\" align=\"ctr\" overlay=\"0\"><cx:tx><cx:txData><cx:v>".concat(escapeText(title), "</cx:v></cx:txData></cx:tx></cx:title>")
89
+ : "";
90
+ var isTreemap = spec.chartType === "treemap";
91
+ var dataLabels = isTreemap
92
+ ? "<cx:dataLabels pos=\"inEnd\"><cx:visibility seriesName=\"0\" categoryName=\"1\" value=\"0\"/></cx:dataLabels>"
93
+ : "<cx:dataLabels><cx:visibility seriesName=\"0\" categoryName=\"1\" value=\"0\"/></cx:dataLabels>";
94
+ var layoutPr = isTreemap
95
+ ? "<cx:layoutPr><cx:parentLabelLayout val=\"banner\"/></cx:layoutPr>"
96
+ : "";
97
+ var legend = isTreemap ? "<cx:legend pos=\"t\" align=\"ctr\" overlay=\"0\"/>" : "";
98
+ return "".concat(XML_DECLARATION, "<cx:chartSpace xmlns:a=\"").concat(A_NS, "\" xmlns:r=\"").concat(R_NS, "\" xmlns:cx=\"").concat(CHART_EX_NS, "\"><cx:chartData><cx:data id=\"0\"><cx:strDim type=\"cat\"><cx:f>").concat(escapeText(catRef), "</cx:f></cx:strDim><cx:numDim type=\"size\"><cx:f>").concat(escapeText(sizeRef), "</cx:f></cx:numDim></cx:data></cx:chartData><cx:chart>").concat(titleXml, "<cx:plotArea><cx:plotAreaRegion><cx:series layoutId=\"").concat(spec.chartType, "\" uniqueId=\"").concat(guid(), "\">").concat(dataLabels, "<cx:dataId val=\"0\"/>").concat(layoutPr, "</cx:series></cx:plotAreaRegion></cx:plotArea>").concat(legend, "</cx:chart></cx:chartSpace>");
99
+ };
100
+ /**
101
+ * The drawing anchor body for a chartex part: Excel's `mc:AlternateContent`
102
+ * with a `cx1`-requiring choice holding the graphic frame. No `mc:Fallback`
103
+ * is written — Excel opens the file without one, and a fallback text box
104
+ * would import as a stray shape in consumers that do not know chartex.
105
+ */
106
+ export var buildChartExGraphicFrameXml = function (_a) {
107
+ var relId = _a.relId, frameId = _a.frameId, widthEmu = _a.widthEmu, heightEmu = _a.heightEmu;
108
+ return "<mc:AlternateContent xmlns:mc=\"".concat(MC_NS, "\"><mc:Choice xmlns:cx1=\"").concat(CHART_EX_1_NS, "\" Requires=\"cx1\"><xdr:graphicFrame macro=\"\"><xdr:nvGraphicFramePr><xdr:cNvPr id=\"").concat(frameId, "\" name=\"Chart ").concat(frameId, "\"/><xdr:cNvGraphicFramePr/></xdr:nvGraphicFramePr><xdr:xfrm><a:off x=\"0\" y=\"0\"/><a:ext cx=\"").concat(widthEmu, "\" cy=\"").concat(heightEmu, "\"/></xdr:xfrm><a:graphic><a:graphicData uri=\"").concat(CHART_EX_NS, "\"><cx:chart xmlns:cx=\"").concat(CHART_EX_NS, "\" xmlns:r=\"").concat(R_NS, "\" r:id=\"").concat(relId, "\"/></a:graphicData></a:graphic></xdr:graphicFrame></mc:Choice></mc:AlternateContent>");
109
+ };
@@ -0,0 +1,61 @@
1
+ import type { EmbedFormControlSpec } from "@rowsncolumns/spreadsheet";
2
+ /**
3
+ * Excel form-control writers — the inverse of
4
+ * `excel-parser/plugins/xlsx/form-controls.ts`. A control is three parts:
5
+ * the worksheet `<controls><control>` entry (anchor + `<controlPr>`), its
6
+ * `xl/ctrlProps/ctrlPropN.xml` (`<formControlPr>`), and the legacy VML shape
7
+ * Excel actually draws (`<v:shape type="#_x0000_t201"><x:ClientData
8
+ * ObjectType="Checkbox">`). All three are written; Excel drops a control
9
+ * whose VML shape is missing.
10
+ */
11
+ export declare const CTRL_PROP_CONTENT_TYPE = "application/vnd.ms-excel.controlproperties+xml";
12
+ export declare const CTRL_PROP_REL_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/ctrlProp";
13
+ export declare const FORM_CONTROL_NS = "http://schemas.microsoft.com/office/spreadsheetml/2009/9/main";
14
+ /** `xl/ctrlProps/ctrlPropN.xml` body. */
15
+ export declare const buildCtrlPropXml: (spec: EmbedFormControlSpec) => string;
16
+ /** A cell anchor in OOXML units: 0-based cell + EMU offsets. */
17
+ export type ControlCellAnchor = {
18
+ col: number;
19
+ colOff: number;
20
+ row: number;
21
+ rowOff: number;
22
+ };
23
+ /** One `<control>` element (inside the `<controls>` wrapper). */
24
+ export declare const buildControlElementXml: ({ spec, relId, shapeId, from, to, }: {
25
+ spec: EmbedFormControlSpec;
26
+ relId: string;
27
+ shapeId: number;
28
+ from: ControlCellAnchor;
29
+ to: ControlCellAnchor;
30
+ }) => string;
31
+ /**
32
+ * The worksheet `<controls>` element. Excel wraps controls in an
33
+ * `mc:AlternateContent` whose `Choice` requires the `x14` namespace; the
34
+ * namespaces the wrapper and the `xdr:` anchor cells need are declared on
35
+ * the element so the worksheet root stays untouched.
36
+ */
37
+ export declare const buildControlsXml: (controlElements: string[]) => string;
38
+ /** VML `<v:shapetype>` every form control references (`#_x0000_t201`). */
39
+ export declare const FORM_CONTROL_VML_SHAPETYPE = "<v:shapetype id=\"_x0000_t201\" coordsize=\"21600,21600\" o:spt=\"201\" path=\"m,l,21600r21600,l21600,xe\"><v:stroke joinstyle=\"miter\"/><v:path shadowok=\"f\" o:extrusionok=\"f\" strokeok=\"f\" fillok=\"f\" o:connecttype=\"rect\"/><o:lock v:ext=\"edit\" shapetype=\"t\"/></v:shapetype>";
40
+ /** Pixel geometry the VML shape needs (absolute position + cell-span anchor). */
41
+ export type FormControlVmlGeometry = {
42
+ leftPx: number;
43
+ topPx: number;
44
+ widthPx: number;
45
+ heightPx: number;
46
+ /** `x:Anchor` — from col, from col px offset, from row, from row px offset, to … */
47
+ anchor: [number, number, number, number, number, number, number, number];
48
+ };
49
+ /** One `<v:shape>` drawing a form control. */
50
+ export declare const buildFormControlVmlShape: ({ spec, shapeId, zIndex, geometry, }: {
51
+ spec: EmbedFormControlSpec;
52
+ shapeId: number;
53
+ zIndex: number;
54
+ geometry: FormControlVmlGeometry;
55
+ }) => string;
56
+ /** Wrap note + control shapes into one `vmlDrawing` part. */
57
+ export declare const buildVmlDrawingXml: ({ shapeTypes, shapes, }: {
58
+ shapeTypes: string[];
59
+ shapes: string[];
60
+ }) => string | undefined;
61
+ //# sourceMappingURL=form-controls-builder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form-controls-builder.d.ts","sourceRoot":"","sources":["../../../../exporter/xlsx/form-controls-builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEtE;;;;;;;;GAQG;AAEH,eAAO,MAAM,sBAAsB,mDACe,CAAC;AACnD,eAAO,MAAM,kBAAkB,iFACiD,CAAC;AACjF,eAAO,MAAM,eAAe,kEACqC,CAAC;AAuBlE,yCAAyC;AACzC,eAAO,MAAM,gBAAgB,GAAI,MAAM,oBAAoB,KAAG,MAU7D,CAAC;AAEF,gEAAgE;AAChE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AASF,iEAAiE;AACjE,eAAO,MAAM,sBAAsB,GAAI,qCAMpC;IACD,IAAI,EAAE,oBAAoB,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,iBAAiB,CAAC;IACxB,EAAE,EAAE,iBAAiB,CAAC;CACvB,KAAG,MAaH,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,GAAI,iBAAiB,MAAM,EAAE,KAAG,MAK5D,CAAC;AAmEF,0EAA0E;AAC1E,eAAO,MAAM,0BAA0B,oSAA4Q,CAAC;AAEpT,iFAAiF;AACjF,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,qFAAqF;IACrF,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;CAC1E,CAAC;AAIF,8CAA8C;AAC9C,eAAO,MAAM,wBAAwB,GAAI,sCAKtC;IACD,IAAI,EAAE,oBAAoB,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,sBAAsB,CAAC;CAClC,KAAG,MAmBH,CAAC;AAEF,6DAA6D;AAC7D,eAAO,MAAM,kBAAkB,GAAI,yBAGhC;IACD,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,KAAG,MAAM,GAAG,SAKZ,CAAC"}
@@ -0,0 +1,197 @@
1
+ import { __read, __rest } from "tslib";
2
+ /**
3
+ * Excel form-control writers — the inverse of
4
+ * `excel-parser/plugins/xlsx/form-controls.ts`. A control is three parts:
5
+ * the worksheet `<controls><control>` entry (anchor + `<controlPr>`), its
6
+ * `xl/ctrlProps/ctrlPropN.xml` (`<formControlPr>`), and the legacy VML shape
7
+ * Excel actually draws (`<v:shape type="#_x0000_t201"><x:ClientData
8
+ * ObjectType="Checkbox">`). All three are written; Excel drops a control
9
+ * whose VML shape is missing.
10
+ */
11
+ export var CTRL_PROP_CONTENT_TYPE = "application/vnd.ms-excel.controlproperties+xml";
12
+ export var CTRL_PROP_REL_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/ctrlProp";
13
+ export var FORM_CONTROL_NS = "http://schemas.microsoft.com/office/spreadsheetml/2009/9/main";
14
+ var MC_NS = "http://schemas.openxmlformats.org/markup-compatibility/2006";
15
+ var XDR_NS = "http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing";
16
+ var XML_DECLARATION = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n";
17
+ var escapeAttr = function (value) {
18
+ return value
19
+ .replace(/&/g, "&amp;")
20
+ .replace(/</g, "&lt;")
21
+ .replace(/>/g, "&gt;")
22
+ .replace(/"/g, "&quot;");
23
+ };
24
+ var escapeText = function (value) {
25
+ return value.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
26
+ };
27
+ var attrsXml = function (attrs) {
28
+ return Object.entries(attrs !== null && attrs !== void 0 ? attrs : {})
29
+ .filter(function (_a) {
30
+ var _b = __read(_a, 2), key = _b[0], value = _b[1];
31
+ return key && value != null;
32
+ })
33
+ .map(function (_a) {
34
+ var _b = __read(_a, 2), key = _b[0], value = _b[1];
35
+ return " ".concat(key, "=\"").concat(escapeAttr(String(value)), "\"");
36
+ })
37
+ .join("");
38
+ };
39
+ /** `xl/ctrlProps/ctrlPropN.xml` body. */
40
+ export var buildCtrlPropXml = function (spec) {
41
+ var _a, _b;
42
+ var _c = (_a = spec.properties) !== null && _a !== void 0 ? _a : {}, _ignored = _c.objectType, rest = __rest(_c, ["objectType"]);
43
+ var items = ((_b = spec.listItems) !== null && _b !== void 0 ? _b : [])
44
+ .map(function (item) { return "<item val=\"".concat(escapeAttr(item), "\"/>"); })
45
+ .join("");
46
+ var body = items ? "<itemLst>".concat(items, "</itemLst>") : "";
47
+ var open = "<formControlPr xmlns=\"".concat(FORM_CONTROL_NS, "\" objectType=\"").concat(escapeAttr(spec.objectType), "\"").concat(attrsXml(rest));
48
+ return "".concat(XML_DECLARATION).concat(body ? "".concat(open, ">").concat(body, "</formControlPr>") : "".concat(open, "/>"));
49
+ };
50
+ var cellAnchorXml = function (tag, anchor) {
51
+ return "<".concat(tag, "><xdr:col>").concat(anchor.col, "</xdr:col><xdr:colOff>").concat(Math.round(anchor.colOff), "</xdr:colOff><xdr:row>").concat(anchor.row, "</xdr:row><xdr:rowOff>").concat(Math.round(anchor.rowOff), "</xdr:rowOff></").concat(tag, ">");
52
+ };
53
+ /** One `<control>` element (inside the `<controls>` wrapper). */
54
+ export var buildControlElementXml = function (_a) {
55
+ var _b;
56
+ var spec = _a.spec, relId = _a.relId, shapeId = _a.shapeId, from = _a.from, to = _a.to;
57
+ var name = (_b = spec.name) !== null && _b !== void 0 ? _b : "".concat(spec.objectType, " ").concat(shapeId);
58
+ var anchorAttrs = (spec.moveWithCells ? ' moveWithCells="1"' : "") +
59
+ (spec.sizeWithCells ? ' sizeWithCells="1"' : "");
60
+ return "<control shapeId=\"".concat(shapeId, "\" r:id=\"").concat(relId, "\" name=\"").concat(escapeAttr(name), "\"><controlPr").concat(attrsXml(spec.controlProperties), "><anchor").concat(anchorAttrs, ">").concat(cellAnchorXml("from", from)).concat(cellAnchorXml("to", to), "</anchor></controlPr></control>");
61
+ };
62
+ /**
63
+ * The worksheet `<controls>` element. Excel wraps controls in an
64
+ * `mc:AlternateContent` whose `Choice` requires the `x14` namespace; the
65
+ * namespaces the wrapper and the `xdr:` anchor cells need are declared on
66
+ * the element so the worksheet root stays untouched.
67
+ */
68
+ export var buildControlsXml = function (controlElements) {
69
+ if (!controlElements.length)
70
+ return "";
71
+ return "<controls xmlns:mc=\"".concat(MC_NS, "\" xmlns:xdr=\"").concat(XDR_NS, "\" xmlns:x14=\"").concat(FORM_CONTROL_NS, "\"><mc:AlternateContent><mc:Choice Requires=\"x14\">").concat(controlElements.join(""), "</mc:Choice></mc:AlternateContent></controls>");
72
+ };
73
+ /** `formControlPr/@objectType` → VML `x:ClientData/@ObjectType`. */
74
+ var VML_OBJECT_TYPE = {
75
+ CheckBox: "Checkbox",
76
+ EditBox: "Edit",
77
+ };
78
+ var truthy = function (value) {
79
+ return value === "1" || value === "true";
80
+ };
81
+ /**
82
+ * `x:ClientData` children derived from the `formControlPr` / `controlPr`
83
+ * attributes — Excel reads the control's state (checked, linked cell, list
84
+ * range, selection, scroll values) from the VML, the ctrlProp part is the
85
+ * x14 mirror.
86
+ */
87
+ var clientDataChildrenXml = function (spec) {
88
+ var _a, _b;
89
+ var p = (_a = spec.properties) !== null && _a !== void 0 ? _a : {};
90
+ var c = (_b = spec.controlProperties) !== null && _b !== void 0 ? _b : {};
91
+ var out = [];
92
+ var push = function (tag, value) {
93
+ if (value === undefined)
94
+ out.push("<x:".concat(tag, "/>"));
95
+ else
96
+ out.push("<x:".concat(tag, ">").concat(escapeText(value), "</x:").concat(tag, ">"));
97
+ };
98
+ if (spec.moveWithCells)
99
+ push("MoveWithCells");
100
+ if (spec.sizeWithCells)
101
+ push("SizeWithCells");
102
+ // Anchor is inserted by the caller (needs sheet geometry).
103
+ out.push("__ANCHOR__");
104
+ if (c.locked === "0")
105
+ push("Locked", "False");
106
+ if (c.defaultSize === "0")
107
+ push("DefaultSize", "False");
108
+ if (c.print === "0")
109
+ push("PrintObject", "False");
110
+ if (c.autoFill === "0")
111
+ push("AutoFill", "False");
112
+ if (c.autoLine === "0")
113
+ push("AutoLine", "False");
114
+ if (c.autoPict === "0")
115
+ push("AutoPict", "False");
116
+ if (c.macro)
117
+ push("FmlaMacro", c.macro);
118
+ if (p.textHAlign)
119
+ push("TextHAlign", p.textHAlign);
120
+ if (p.textVAlign)
121
+ push("TextVAlign", p.textVAlign);
122
+ if (truthy(p.lockText))
123
+ push("LockText");
124
+ if (truthy(p.justLastX))
125
+ push("JustLastX");
126
+ if (truthy(p.passwordEdit))
127
+ push("SecretEdit");
128
+ if (truthy(p.multiLine))
129
+ push("MultiLine");
130
+ if (truthy(p.verticalBar))
131
+ push("VScroll");
132
+ if (p.fmlaRange)
133
+ push("FmlaRange", p.fmlaRange);
134
+ if (p.widthMin)
135
+ push("WidthMin", p.widthMin);
136
+ if (p.sel)
137
+ push("Sel", p.sel);
138
+ if (p.seltype)
139
+ push("SelType", p.seltype);
140
+ if (p.multiSel)
141
+ push("MultiSel", p.multiSel);
142
+ if (p.dropStyle)
143
+ push("DropStyle", p.dropStyle);
144
+ if (truthy(p.colored))
145
+ push("Colored");
146
+ if (p.dropLines)
147
+ push("DropLines", p.dropLines);
148
+ if (p.checked === "Checked")
149
+ push("Checked", "1");
150
+ else if (p.checked === "Mixed")
151
+ push("Checked", "2");
152
+ if (p.fmlaLink)
153
+ push("FmlaLink", p.fmlaLink);
154
+ if (truthy(p.noThreeD))
155
+ push("NoThreeD");
156
+ if (truthy(p.firstButton))
157
+ push("FirstButton");
158
+ if (p.fmlaGroup)
159
+ push("FmlaGroup", p.fmlaGroup);
160
+ if (p.val)
161
+ push("Val", p.val);
162
+ if (p.min)
163
+ push("Min", p.min);
164
+ if (p.max)
165
+ push("Max", p.max);
166
+ if (p.inc)
167
+ push("Inc", p.inc);
168
+ if (p.page)
169
+ push("Page", p.page);
170
+ if (truthy(p.horiz))
171
+ push("Horiz");
172
+ if (p.dx)
173
+ push("Dx", p.dx);
174
+ return out.join("");
175
+ };
176
+ /** VML `<v:shapetype>` every form control references (`#_x0000_t201`). */
177
+ export var FORM_CONTROL_VML_SHAPETYPE = "<v:shapetype id=\"_x0000_t201\" coordsize=\"21600,21600\" o:spt=\"201\" path=\"m,l,21600r21600,l21600,xe\"><v:stroke joinstyle=\"miter\"/><v:path shadowok=\"f\" o:extrusionok=\"f\" strokeok=\"f\" fillok=\"f\" o:connecttype=\"rect\"/><o:lock v:ext=\"edit\" shapetype=\"t\"/></v:shapetype>";
178
+ var toPt = function (px) { return "".concat((px * 0.75).toFixed(2).replace(/\.?0+$/, ""), "pt"); };
179
+ /** One `<v:shape>` drawing a form control. */
180
+ export var buildFormControlVmlShape = function (_a) {
181
+ var _b;
182
+ var spec = _a.spec, shapeId = _a.shapeId, zIndex = _a.zIndex, geometry = _a.geometry;
183
+ var objectType = (_b = VML_OBJECT_TYPE[spec.objectType]) !== null && _b !== void 0 ? _b : spec.objectType;
184
+ var caption = spec.text
185
+ ? "<div style=\"text-align:left\"><font face=\"Tahoma\" size=\"160\" color=\"auto\">".concat(escapeText(spec.text), "</font></div>")
186
+ : "";
187
+ var clientData = clientDataChildrenXml(spec).replace("__ANCHOR__", "<x:Anchor>".concat(geometry.anchor.join(", "), "</x:Anchor>"));
188
+ var style = "position:absolute;margin-left:".concat(toPt(geometry.leftPx), ";margin-top:").concat(toPt(geometry.topPx), ";width:").concat(toPt(geometry.widthPx), ";height:").concat(toPt(geometry.heightPx), ";z-index:").concat(zIndex, ";mso-wrap-style:tight");
189
+ return "<v:shape id=\"_x0000_s".concat(shapeId, "\" type=\"#_x0000_t201\" style=\"").concat(style, "\" filled=\"f\" fillcolor=\"window [65]\" stroked=\"f\" strokecolor=\"windowText [64]\" o:insetmode=\"auto\"><v:path shadowok=\"f\" o:extrusionok=\"f\" strokeok=\"f\" fillok=\"f\" o:connecttype=\"rect\"/><v:textbox style=\"mso-direction-alt:auto\" o:singleclick=\"f\">").concat(caption, "</v:textbox><x:ClientData ObjectType=\"").concat(escapeAttr(objectType), "\">").concat(clientData, "</x:ClientData></v:shape>");
190
+ };
191
+ /** Wrap note + control shapes into one `vmlDrawing` part. */
192
+ export var buildVmlDrawingXml = function (_a) {
193
+ var shapeTypes = _a.shapeTypes, shapes = _a.shapes;
194
+ if (!shapes.length)
195
+ return undefined;
196
+ return "<xml xmlns:v=\"urn:schemas-microsoft-com:vml\" xmlns:o=\"urn:schemas-microsoft-com:office:office\" xmlns:x=\"urn:schemas-microsoft-com:office:excel\"><o:shapelayout v:ext=\"edit\"><o:idmap v:ext=\"edit\" data=\"1\"/></o:shapelayout>".concat(shapeTypes.join("")).concat(shapes.join(""), "</xml>");
197
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"xlsx-export.d.ts","sourceRoot":"","sources":["../../../../exporter/xlsx/xlsx-export.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,EACR,QAAQ,EACR,aAAa,EAEb,wBAAwB,EAGxB,2B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