@datawheel/bespoke 0.3.8 → 0.3.10
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/index.js +6 -6
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -3193,7 +3193,7 @@ function Viz(config) {
|
|
|
3193
3193
|
style: {
|
|
3194
3194
|
display: "flex",
|
|
3195
3195
|
flex: "1 1 100%",
|
|
3196
|
-
minHeight: 400
|
|
3196
|
+
minHeight: type === "HTML" ? void 0 : 400
|
|
3197
3197
|
},
|
|
3198
3198
|
children: /* @__PURE__ */ jsx(ErrorBoundary, { fallback: /* @__PURE__ */ jsx("p", { children: "Error in d3plus viz config." }), children: /* @__PURE__ */ jsx(
|
|
3199
3199
|
Visualization,
|
|
@@ -7277,7 +7277,8 @@ function DataTab(props) {
|
|
|
7277
7277
|
return blockIds.reduce((acc, blockId) => {
|
|
7278
7278
|
const entity = state.records.entities.block[blockId];
|
|
7279
7279
|
const variables = state.variables.variables[blockId];
|
|
7280
|
-
|
|
7280
|
+
const status = state.variables.status[blockId];
|
|
7281
|
+
if (BLOCK_TYPES.GENERATOR === entity.type && variables._downloadEnabled === true && status.allowed || BLOCK_TYPES.VIZ === entity.type && status.allowed) {
|
|
7281
7282
|
acc[blockId] = {
|
|
7282
7283
|
entity,
|
|
7283
7284
|
variables: state.variables.variables[blockId],
|
|
@@ -8840,11 +8841,10 @@ function Section({ section }) {
|
|
|
8840
8841
|
};
|
|
8841
8842
|
let sectionColumns = [];
|
|
8842
8843
|
if (comparison.active && !settings.comparisonMerge) {
|
|
8843
|
-
const blocks = sectionBlocks.reduce((blocks2, block) => ({ ...blocks2, [block.id]: block }), {});
|
|
8844
|
-
console.log("blocks", blocks);
|
|
8844
|
+
const blocks = sectionBlocks.filter((d) => d.type !== BLOCK_TYPES.GENERATOR).reduce((blocks2, block) => ({ ...blocks2, [block.id]: block }), {});
|
|
8845
8845
|
sectionColumns = [
|
|
8846
|
-
/* @__PURE__ */ jsx(SectionColumn, { column: blocks, basis: "50%", children: getBlockRenderers(Object.values(sectionBlocks)) }, "original"),
|
|
8847
|
-
/* @__PURE__ */ jsx(SectionColumn, { column: blocks, basis: "50%", children: getBlockRenderers(Object.values(sectionBlocks), true) }, "comparison")
|
|
8846
|
+
/* @__PURE__ */ jsx(SectionColumn, { column: blocks, basis: "50%", children: getBlockRenderers(Object.values(sectionBlocks.filter((d) => d.type !== BLOCK_TYPES.GENERATOR))) }, "original"),
|
|
8847
|
+
/* @__PURE__ */ jsx(SectionColumn, { column: blocks, basis: "50%", children: getBlockRenderers(Object.values(sectionBlocks.filter((d) => d.type !== BLOCK_TYPES.GENERATOR)), true) }, "comparison")
|
|
8848
8848
|
// TODO: maybe add more comparisons?
|
|
8849
8849
|
];
|
|
8850
8850
|
} else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datawheel/bespoke",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.10",
|
|
4
4
|
"description": "Content management system for creating automated data reports",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -129,4 +129,4 @@
|
|
|
129
129
|
"peerDependencies": {
|
|
130
130
|
"next": "^13.4.0"
|
|
131
131
|
}
|
|
132
|
-
}
|
|
132
|
+
}
|