@datawheel/bespoke 0.4.0 → 0.4.1
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 +3 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4292,7 +4292,7 @@ function useOnChangeSelector(blockId, section, selectorIdentifier, asComparison
|
|
|
4292
4292
|
const querySelectors = asComparison && comparison.active ? Object.fromEntries(
|
|
4293
4293
|
Object.entries(query).filter(([key]) => key.match(compareRegex2)).map(([key, value]) => [key.replace("Compare", ""), value])
|
|
4294
4294
|
) : Object.fromEntries(
|
|
4295
|
-
Object.entries(query).filter(([key]) => key.match(
|
|
4295
|
+
Object.entries(query).filter(([key]) => key.match(selectorRegex)).map(([key, value]) => [key.replace("Compare", ""), value])
|
|
4296
4296
|
);
|
|
4297
4297
|
const callback = useCallback(
|
|
4298
4298
|
(value) => {
|
|
@@ -4349,7 +4349,7 @@ function useOnChangeSelector(blockId, section, selectorIdentifier, asComparison
|
|
|
4349
4349
|
);
|
|
4350
4350
|
return callback;
|
|
4351
4351
|
}
|
|
4352
|
-
var compareRegex2;
|
|
4352
|
+
var compareRegex2, selectorRegex;
|
|
4353
4353
|
var init_useOnChangeSelector = __esm({
|
|
4354
4354
|
"frontend/hooks/useOnChangeSelector.ts"() {
|
|
4355
4355
|
init_esm_shims();
|
|
@@ -4362,6 +4362,7 @@ var init_useOnChangeSelector = __esm({
|
|
|
4362
4362
|
init_useReadMemberFn();
|
|
4363
4363
|
init_ComparisonProvider();
|
|
4364
4364
|
compareRegex2 = /\w*Compare\b/;
|
|
4365
|
+
selectorRegex = /selector\d+id/;
|
|
4365
4366
|
}
|
|
4366
4367
|
});
|
|
4367
4368
|
function Selector(config) {
|