@datawheel/bespoke 0.3.5 → 0.3.6
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 +9 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3782,6 +3782,7 @@ function BespokeExploreModal({
|
|
|
3782
3782
|
actionIconProps = {},
|
|
3783
3783
|
modalProps = {},
|
|
3784
3784
|
tooltipProps = {},
|
|
3785
|
+
tooltipText = "Click to Explore",
|
|
3785
3786
|
showIcon = true,
|
|
3786
3787
|
showTooltip = false,
|
|
3787
3788
|
children
|
|
@@ -3812,7 +3813,7 @@ function BespokeExploreModal({
|
|
|
3812
3813
|
}
|
|
3813
3814
|
) : children;
|
|
3814
3815
|
if (showTooltip) {
|
|
3815
|
-
target = /* @__PURE__ */ jsx(Tooltip, { label:
|
|
3816
|
+
target = /* @__PURE__ */ jsx(Tooltip, { label: tooltipText, ...tooltipProps, children: target });
|
|
3816
3817
|
}
|
|
3817
3818
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3818
3819
|
/* @__PURE__ */ jsx(Modal, { ...mdlConfig, ...modalProps, children: /* @__PURE__ */ jsx(Explore_default, { ...exploreProps, onSelect: () => setOpened(false) }) }),
|
|
@@ -3860,6 +3861,7 @@ function BespokeSearch({
|
|
|
3860
3861
|
profilePrefix,
|
|
3861
3862
|
autocompleteProps = {},
|
|
3862
3863
|
tooltipProps = {},
|
|
3864
|
+
tooltipText = "Click to search",
|
|
3863
3865
|
searchReportParams = {},
|
|
3864
3866
|
callback,
|
|
3865
3867
|
children
|
|
@@ -3934,7 +3936,7 @@ function BespokeSearch({
|
|
|
3934
3936
|
});
|
|
3935
3937
|
};
|
|
3936
3938
|
useEffect(() => {
|
|
3937
|
-
if (initialized) {
|
|
3939
|
+
if (initialized && debouncedQuery.length > 0) {
|
|
3938
3940
|
doSearch();
|
|
3939
3941
|
}
|
|
3940
3942
|
}, [debouncedQuery]);
|
|
@@ -3988,7 +3990,7 @@ function BespokeSearch({
|
|
|
3988
3990
|
...acConfig
|
|
3989
3991
|
}
|
|
3990
3992
|
);
|
|
3991
|
-
const finalElement = children ? /* @__PURE__ */ jsx(Tooltip, { label:
|
|
3993
|
+
const finalElement = children ? /* @__PURE__ */ jsx(Tooltip, { label: tooltipText, disabled: visible, ...tooltipProps, children: /* @__PURE__ */ jsxs(
|
|
3992
3994
|
Group,
|
|
3993
3995
|
{
|
|
3994
3996
|
ref: containerRef,
|
|
@@ -4220,6 +4222,7 @@ function useReportSearch(target, searchType, callback, searchProps, exploreProps
|
|
|
4220
4222
|
initialReportId: initialIds.reportId,
|
|
4221
4223
|
initialVariantId: initialIds.variantId
|
|
4222
4224
|
},
|
|
4225
|
+
tooltipText: translations["explore"]?.tooltip,
|
|
4223
4226
|
modalProps: customProps.modal,
|
|
4224
4227
|
...exploreProps,
|
|
4225
4228
|
children: target
|
|
@@ -4232,6 +4235,7 @@ function useReportSearch(target, searchType, callback, searchProps, exploreProps
|
|
|
4232
4235
|
locale: router.locale || localeDefault7,
|
|
4233
4236
|
profilePrefix,
|
|
4234
4237
|
callback,
|
|
4238
|
+
tooltipText: translations["explore"]?.tooltip,
|
|
4235
4239
|
...searchProps,
|
|
4236
4240
|
autocompleteProps: customProps.inline,
|
|
4237
4241
|
children: target
|
|
@@ -4472,7 +4476,6 @@ init_esm_shims();
|
|
|
4472
4476
|
init_runConsumers();
|
|
4473
4477
|
init_store2();
|
|
4474
4478
|
init_lib2();
|
|
4475
|
-
init_envvars();
|
|
4476
4479
|
init_variablesSlice();
|
|
4477
4480
|
init_hooks();
|
|
4478
4481
|
var compareRegex2 = /\w*Compare\b/;
|
|
@@ -4485,7 +4488,7 @@ function useOnChangeSelector(blockId, section, selectorIdentifier, asComparison
|
|
|
4485
4488
|
const attributes = useAppSelector((state2) => asComparison && comparison.variables ? comparison?.variables?.attributes : state2.variables.attributes);
|
|
4486
4489
|
const blockRecords = selectBlockRecords(state);
|
|
4487
4490
|
const formatterList = selectFormatterList(state);
|
|
4488
|
-
const formatters2 = funcifyFormattersByLocale(formatterList,
|
|
4491
|
+
const formatters2 = funcifyFormattersByLocale(formatterList, locale);
|
|
4489
4492
|
const variables = useInputVariablesFlat(
|
|
4490
4493
|
blockId,
|
|
4491
4494
|
// if in a comparison column, use variables and attributes from the comparison context
|
|
@@ -4669,7 +4672,7 @@ function useInitialState(pathSegmentsKey) {
|
|
|
4669
4672
|
const attributes = useAppSelector((state2) => state2.variables.attributes);
|
|
4670
4673
|
const blockRecords = selectBlockRecords(state);
|
|
4671
4674
|
const formatterList = selectFormatterList(state);
|
|
4672
|
-
const formatters2 = funcifyFormattersByLocale(formatterList,
|
|
4675
|
+
const formatters2 = funcifyFormattersByLocale(formatterList, locale);
|
|
4673
4676
|
const variables = useAppSelector((state2) => state2.variables.variables);
|
|
4674
4677
|
const status = useAppSelector((state2) => state2.variables.status);
|
|
4675
4678
|
const readMemberFn = useReadMemberFn();
|