@datawheel/bespoke 0.1.36 → 0.1.38
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 +8 -5
- package/dist/server.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1350,7 +1350,7 @@ var init_runConsumers = __esm({
|
|
|
1350
1350
|
variablesById[bid2] = outputVariables;
|
|
1351
1351
|
if (mode === "report") {
|
|
1352
1352
|
statusById[bid2] = { allowed: status.allowed };
|
|
1353
|
-
if (block.type === BLOCK_TYPES.GENERATOR) {
|
|
1353
|
+
if (block.type === BLOCK_TYPES.GENERATOR && status.api) {
|
|
1354
1354
|
statusById[bid2]["api"] = status.api;
|
|
1355
1355
|
}
|
|
1356
1356
|
} else {
|
|
@@ -4152,7 +4152,11 @@ function useInitialState(pathSegmentsKey) {
|
|
|
4152
4152
|
});
|
|
4153
4153
|
}
|
|
4154
4154
|
setPrivateBlocks({ resolved: true, blocks: [] });
|
|
4155
|
-
|
|
4155
|
+
setLoading(false);
|
|
4156
|
+
}).catch(() => {
|
|
4157
|
+
setPrivateBlocks({ resolved: true, blocks: [] });
|
|
4158
|
+
setLoading(false);
|
|
4159
|
+
});
|
|
4156
4160
|
}
|
|
4157
4161
|
if (!isLoading && !user) {
|
|
4158
4162
|
setPrivateBlocks({ resolved: true, blocks: [] });
|
|
@@ -4188,8 +4192,8 @@ function useInitialState(pathSegmentsKey) {
|
|
|
4188
4192
|
);
|
|
4189
4193
|
})
|
|
4190
4194
|
).then((d) => {
|
|
4191
|
-
d.map((data) => dispatch(variablesActions.setVariableChange({ ...data, attributes })));
|
|
4192
4195
|
setLoading(false);
|
|
4196
|
+
d.map((data) => dispatch(variablesActions.setVariableChange({ ...data, attributes })));
|
|
4193
4197
|
});
|
|
4194
4198
|
}
|
|
4195
4199
|
}, [privateBlocks.resolved]);
|
|
@@ -9878,14 +9882,13 @@ function BlockEditor({
|
|
|
9878
9882
|
const resp = useMemo(() => {
|
|
9879
9883
|
let apisResponse = null;
|
|
9880
9884
|
if (status && status.resp) {
|
|
9881
|
-
console.log("RESP CHANGED");
|
|
9882
9885
|
apisResponse = status.resp;
|
|
9883
9886
|
}
|
|
9884
9887
|
return apisResponse;
|
|
9885
9888
|
}, [status]);
|
|
9886
9889
|
const variables = useInputVariablesFlat(id);
|
|
9887
9890
|
const { ref, toggle, fullscreen } = useFullscreen();
|
|
9888
|
-
const apiList = blockContent && blockContent.api ? blockContent.api.split(apiSeparator) : [];
|
|
9891
|
+
const apiList = blockContent && (blockContent.api || blockContent.api === "") ? blockContent.api.split(apiSeparator) : [];
|
|
9889
9892
|
const onChangeCode = (logic, locale2) => setBlockContent({ logic }, locale2);
|
|
9890
9893
|
const onChangeAPI = (changedApi, ix) => {
|
|
9891
9894
|
const newApiList = [...apiList];
|
package/dist/server.js
CHANGED
|
@@ -4957,7 +4957,7 @@ var runConsumersV2 = async (blocks, sections, bid, formatterFunctions, blockCont
|
|
|
4957
4957
|
variablesById[bid2] = outputVariables;
|
|
4958
4958
|
if (mode === "report") {
|
|
4959
4959
|
statusById[bid2] = { allowed: status.allowed };
|
|
4960
|
-
if (block.type === BLOCK_TYPES.GENERATOR) {
|
|
4960
|
+
if (block.type === BLOCK_TYPES.GENERATOR && status.api) {
|
|
4961
4961
|
statusById[bid2]["api"] = status.api;
|
|
4962
4962
|
}
|
|
4963
4963
|
} else {
|