@columnus/shared 0.1.48 → 0.1.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/clipboardTransfer.js.map +1 -1
- package/dist/csv.js +26 -1
- package/dist/csv.js.map +1 -1
- package/dist/dateValues.d.ts +3 -0
- package/dist/dateValues.js +23 -1
- package/dist/dateValues.js.map +1 -1
- package/dist/displayLabel.js +26 -1
- package/dist/displayLabel.js.map +1 -1
- package/dist/importMatch.js +26 -1
- package/dist/importMatch.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +221 -43
- package/dist/index.js.map +1 -1
- package/dist/recordTableColumns.d.ts +3 -1
- package/dist/recordTableColumns.js +202 -2
- package/dist/recordTableColumns.js.map +1 -1
- package/dist/recordTablePreload.d.ts +19 -0
- package/dist/recordTablePreload.js +4330 -0
- package/dist/recordTablePreload.js.map +1 -0
- package/dist/refDisplayRequests.js.map +1 -1
- package/dist/richDoc.d.ts +10 -0
- package/dist/richDoc.js +65 -2
- package/dist/richDoc.js.map +1 -1
- package/dist/schemaTypes.js.map +1 -1
- package/dist/shareProposal.js.map +1 -1
- package/dist/spaceBundle.js.map +1 -1
- package/dist/storageFieldValues.js.map +1 -1
- package/package.json +1 -1
package/dist/csv.js
CHANGED
|
@@ -4764,10 +4764,33 @@ function visitInlineContent(content, visit) {
|
|
|
4764
4764
|
function walkInlineContent(content, parts) {
|
|
4765
4765
|
visitInlineContent(content, {
|
|
4766
4766
|
text: (t) => parts.push(t),
|
|
4767
|
-
recordLink: (props) => parts.push(props.table ? `[${props.table}]` : "[
|
|
4767
|
+
recordLink: (props) => parts.push(props.table ? `[${props.table}]` : "[Record]"),
|
|
4768
4768
|
link: (nested) => walkInlineContent(nested, parts)
|
|
4769
4769
|
});
|
|
4770
4770
|
}
|
|
4771
|
+
function walkTableCell(cell, parts) {
|
|
4772
|
+
if (Array.isArray(cell)) {
|
|
4773
|
+
walkInlineContent(cell, parts);
|
|
4774
|
+
return;
|
|
4775
|
+
}
|
|
4776
|
+
if (cell && typeof cell === "object") {
|
|
4777
|
+
const node = cell;
|
|
4778
|
+
if (node.type === "tableCell" && Array.isArray(node.content)) {
|
|
4779
|
+
walkInlineContent(node.content, parts);
|
|
4780
|
+
}
|
|
4781
|
+
}
|
|
4782
|
+
}
|
|
4783
|
+
function walkTableContent(content, parts) {
|
|
4784
|
+
if (!content || typeof content !== "object" || Array.isArray(content)) return;
|
|
4785
|
+
const rows = content.rows ?? [];
|
|
4786
|
+
for (const row of rows) {
|
|
4787
|
+
for (const cell of row.cells ?? []) {
|
|
4788
|
+
const before = parts.length;
|
|
4789
|
+
walkTableCell(cell, parts);
|
|
4790
|
+
if (parts.length > before) parts.push(" ");
|
|
4791
|
+
}
|
|
4792
|
+
}
|
|
4793
|
+
}
|
|
4771
4794
|
function walkBlocks(blocks, parts) {
|
|
4772
4795
|
for (const block of blocks) {
|
|
4773
4796
|
if (block.type === "recordTable") {
|
|
@@ -4781,6 +4804,8 @@ function walkBlocks(blocks, parts) {
|
|
|
4781
4804
|
parts.push("[data table]");
|
|
4782
4805
|
}
|
|
4783
4806
|
parts.push(" ");
|
|
4807
|
+
} else if (block.type === "table") {
|
|
4808
|
+
walkTableContent(block.content, parts);
|
|
4784
4809
|
} else if (Array.isArray(block.content)) {
|
|
4785
4810
|
walkInlineContent(block.content, parts);
|
|
4786
4811
|
parts.push(" ");
|