@vizzly/dashboard 0.15.0-dev-9ba9cfcf5d6fdab60b458c0b97e98590696c65ea → 0.15.0-dev-5e35638e18dac116117dada30146d05c3618c737
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/dashboard/src/contexts/SessionContext/useSessionContext.d.ts +3 -0
- package/dist/dashboard.cjs.development.js +28 -24
- package/dist/dashboard.cjs.production.min.js +1 -1
- package/dist/dashboard.esm.js +28 -24
- package/dist/shared-logic/src/Translations/translation.types.d.ts +145 -16
- package/dist/shared-ui/src/hooks/useVizzly.d.ts +2 -3
- package/package.json +1 -1
|
@@ -9,6 +9,7 @@ import { LoadedVizzlyHook } from '../../../../shared-ui/src/hooks/useVizzly';
|
|
|
9
9
|
import { VizzlyServicesProperties } from '../../../../services/src';
|
|
10
10
|
import { GlobalLibrary } from '../../../../shared-logic/src/GlobalLibrary';
|
|
11
11
|
import { PersistedReport } from '@vizzly/api-client';
|
|
12
|
+
import { VizzlyTranslations } from '../../../../shared-logic/src/Translations/translation.types';
|
|
12
13
|
declare type Params = {
|
|
13
14
|
parentDashboardId: string | undefined;
|
|
14
15
|
identityCallback: VizzlyServicesProperties['identity'];
|
|
@@ -20,6 +21,8 @@ declare type Params = {
|
|
|
20
21
|
programmaticDashboard?: VizzlyServicesProperties['programmaticDashboard'];
|
|
21
22
|
textOverride: TextOverride;
|
|
22
23
|
isEditor?: boolean;
|
|
24
|
+
developerMode?: boolean;
|
|
25
|
+
textOverrides?: Partial<VizzlyTranslations>;
|
|
23
26
|
};
|
|
24
27
|
export declare type StillLoading = null;
|
|
25
28
|
export declare type ErrorProvided = {
|
|
@@ -13159,8 +13159,8 @@ var defaultNumberFormatOptions = function defaultNumberFormatOptions(textOverrid
|
|
|
13159
13159
|
},
|
|
13160
13160
|
description: textOverride('number_format_option.minutes_to_hours_minutes', 'Minutes to hours & minutes')
|
|
13161
13161
|
},
|
|
13162
|
-
|
|
13163
|
-
description: 'Hour of the day',
|
|
13162
|
+
_vizzly_hour_of_day: {
|
|
13163
|
+
description: textOverride('number_format_option.hour_of_day', 'Hour of the day'),
|
|
13164
13164
|
formatter: function formatter(value, noValueReplacement) {
|
|
13165
13165
|
if (noValueReplacement === void 0) {
|
|
13166
13166
|
noValueReplacement = noValue;
|
|
@@ -13169,8 +13169,8 @@ var defaultNumberFormatOptions = function defaultNumberFormatOptions(textOverrid
|
|
|
13169
13169
|
return format$1(value, 'hour_of_day');
|
|
13170
13170
|
}
|
|
13171
13171
|
},
|
|
13172
|
-
|
|
13173
|
-
description: 'Month of the year',
|
|
13172
|
+
_vizzly_month_of_year: {
|
|
13173
|
+
description: textOverride('number_format_option.month_of_year', 'Month of the year'),
|
|
13174
13174
|
formatter: function formatter(value, noValueReplacement) {
|
|
13175
13175
|
if (noValueReplacement === void 0) {
|
|
13176
13176
|
noValueReplacement = noValue;
|
|
@@ -13179,8 +13179,8 @@ var defaultNumberFormatOptions = function defaultNumberFormatOptions(textOverrid
|
|
|
13179
13179
|
return format$1(value, 'month_of_year');
|
|
13180
13180
|
}
|
|
13181
13181
|
},
|
|
13182
|
-
|
|
13183
|
-
description: 'Day of month',
|
|
13182
|
+
_vizzly_day_of_month: {
|
|
13183
|
+
description: textOverride('number_format_option.day_of_month', 'Day of month'),
|
|
13184
13184
|
formatter: function formatter(value, noValueReplacement) {
|
|
13185
13185
|
if (noValueReplacement === void 0) {
|
|
13186
13186
|
noValueReplacement = noValue;
|
|
@@ -13189,8 +13189,8 @@ var defaultNumberFormatOptions = function defaultNumberFormatOptions(textOverrid
|
|
|
13189
13189
|
return format$1(value, 'day_of_month');
|
|
13190
13190
|
}
|
|
13191
13191
|
},
|
|
13192
|
-
|
|
13193
|
-
description: 'Day of week',
|
|
13192
|
+
_vizzly_day_of_week_iso: {
|
|
13193
|
+
description: textOverride('number_format_option.day_of_week', 'Day of week'),
|
|
13194
13194
|
formatter: function formatter(value, noValueReplacement) {
|
|
13195
13195
|
if (noValueReplacement === void 0) {
|
|
13196
13196
|
noValueReplacement = noValue;
|
|
@@ -13199,8 +13199,8 @@ var defaultNumberFormatOptions = function defaultNumberFormatOptions(textOverrid
|
|
|
13199
13199
|
return format$1(value, 'day_of_week_iso');
|
|
13200
13200
|
}
|
|
13201
13201
|
},
|
|
13202
|
-
|
|
13203
|
-
description: 'Week of year',
|
|
13202
|
+
_vizzly_week_of_year: {
|
|
13203
|
+
description: textOverride('number_format_option.week_of_year', 'Week of year'),
|
|
13204
13204
|
formatter: function formatter(value, noValueReplacement) {
|
|
13205
13205
|
if (noValueReplacement === void 0) {
|
|
13206
13206
|
noValueReplacement = noValue;
|
|
@@ -29182,7 +29182,7 @@ var FilterInputForm = function FilterInputForm(props) {
|
|
|
29182
29182
|
}), props.onAddOrFilter && jsxRuntime.jsx(OrWrapper, {
|
|
29183
29183
|
children: jsxRuntime.jsx(Tooltip, {
|
|
29184
29184
|
tooltipContent: function tooltipContent() {
|
|
29185
|
-
return 'Add OR filter';
|
|
29185
|
+
return textOverride('filters.add_or_filter', 'Add OR filter');
|
|
29186
29186
|
},
|
|
29187
29187
|
children: jsxRuntime.jsx(Button$2, {
|
|
29188
29188
|
secondary: true,
|
|
@@ -60205,15 +60205,15 @@ function customMetricText(key, textOverride) {
|
|
|
60205
60205
|
subtext: textOverride('custom_metric_description.conditional', 'Create a conditional field')
|
|
60206
60206
|
},
|
|
60207
60207
|
customBuildMetric: {
|
|
60208
|
-
title: textOverride('custom_metric_title.
|
|
60209
|
-
subtext: textOverride('custom_metric_description.
|
|
60208
|
+
title: textOverride('custom_metric_title.calculated_field', 'Custom Metric Builder'),
|
|
60209
|
+
subtext: textOverride('custom_metric_description.calculated_field', 'Create a custom build field')
|
|
60210
60210
|
}
|
|
60211
60211
|
};
|
|
60212
60212
|
return values[key];
|
|
60213
60213
|
}
|
|
60214
60214
|
function buildCustomMetricTitle(key, textOverride) {
|
|
60215
|
-
return textOverride('custom_metric_modal_title', '[[
|
|
60216
|
-
|
|
60215
|
+
return textOverride('custom_metric_modal_title', '[[customMetricTitle]] Custom Metric', {
|
|
60216
|
+
customMetricTitle: customMetricText(key, textOverride).title
|
|
60217
60217
|
});
|
|
60218
60218
|
}
|
|
60219
60219
|
|
|
@@ -62785,7 +62785,7 @@ var RowOptions = function RowOptions(props) {
|
|
|
62785
62785
|
});
|
|
62786
62786
|
}
|
|
62787
62787
|
};
|
|
62788
|
-
var label =
|
|
62788
|
+
var label = (props == null ? void 0 : props.direction) === Direction$2.Up ? textOverride('move_row_up', 'Move Row Up') : textOverride('move_row_down', 'Move Row Down');
|
|
62789
62789
|
return jsxRuntime.jsx(Tooltip, {
|
|
62790
62790
|
placement: "right-start",
|
|
62791
62791
|
tooltipContent: function tooltipContent() {
|
|
@@ -69372,7 +69372,7 @@ var CustomMetricModal = function CustomMetricModal(props) {
|
|
|
69372
69372
|
onClose: props.onClose,
|
|
69373
69373
|
disableDnD: true,
|
|
69374
69374
|
children: [jsxRuntime.jsx(Modal.Header, {
|
|
69375
|
-
title:
|
|
69375
|
+
title: textOverride('custom_metric_title.calculated_field', 'Custom Metric Builder')
|
|
69376
69376
|
}), jsxRuntime.jsxs(Modal.Content, {
|
|
69377
69377
|
children: [jsxRuntime.jsx(PanelProperty, {
|
|
69378
69378
|
children: jsxRuntime.jsx(Input, {
|
|
@@ -78273,9 +78273,9 @@ var useVizzly = function useVizzly(properties, options) {
|
|
|
78273
78273
|
case 0:
|
|
78274
78274
|
_context.prev = 0;
|
|
78275
78275
|
_context.next = 3;
|
|
78276
|
-
return Vizzly$1.load(properties, {
|
|
78276
|
+
return Vizzly$1.load(properties, _extends({}, options, {
|
|
78277
78277
|
apiHost: (options == null ? void 0 : options.apiHost) || 'https://api.vizzly.co'
|
|
78278
|
-
});
|
|
78278
|
+
}));
|
|
78279
78279
|
case 3:
|
|
78280
78280
|
vizzlyRef.current = _context.sent;
|
|
78281
78281
|
_context.next = 6;
|
|
@@ -78701,7 +78701,9 @@ var useSessionContext = function useSessionContext(params) {
|
|
|
78701
78701
|
dataSets: params.loadDataSetsCallback,
|
|
78702
78702
|
programmaticDashboard: params.programmaticDashboard
|
|
78703
78703
|
}, {
|
|
78704
|
-
apiHost: params.apiConfig.host
|
|
78704
|
+
apiHost: params.apiConfig.host,
|
|
78705
|
+
developerMode: params.developerMode,
|
|
78706
|
+
textOverrides: params.textOverrides
|
|
78705
78707
|
});
|
|
78706
78708
|
var loadedStrategy = useDashboardStrategy(getStrategy(vizzly, params.parentDashboardId, params.dashboardId, params.isEditor), vizzly, params.programmaticDashboard);
|
|
78707
78709
|
var _useScheduledReports = useScheduledReports(vizzly, loadedStrategy == null || (_loadedStrategy$dashb = loadedStrategy.dashboard) == null || (_loadedStrategy$dashb = _loadedStrategy$dashb.permission) == null ? void 0 : _loadedStrategy$dashb.token),
|
|
@@ -78801,7 +78803,7 @@ var GlobalProvider = function GlobalProvider(props) {
|
|
|
78801
78803
|
}));
|
|
78802
78804
|
};
|
|
78803
78805
|
var GlobalProviderContents = function GlobalProviderContents(props) {
|
|
78804
|
-
var _props$id, _session$identityConf, _props$dateFilterOpti, _session$vizzly$savin;
|
|
78806
|
+
var _props$developerTools, _props$id, _session$identityConf, _props$dateFilterOpti, _session$vizzly$savin;
|
|
78805
78807
|
var _useState2 = React.useState(undefined),
|
|
78806
78808
|
dashboardHash = _useState2[0],
|
|
78807
78809
|
setDashboardHash = _useState2[1];
|
|
@@ -78812,9 +78814,9 @@ var GlobalProviderContents = function GlobalProviderContents(props) {
|
|
|
78812
78814
|
host: 'https://api.vizzly.co'
|
|
78813
78815
|
};
|
|
78814
78816
|
var vizzlyAPI = api(apiConfig);
|
|
78817
|
+
var developerMode = typeof props.developerTools === 'object' && ((_props$developerTools = props.developerTools) == null ? void 0 : _props$developerTools.translationKeys) === true;
|
|
78815
78818
|
var textOverride = function textOverride(key, value, options) {
|
|
78816
|
-
|
|
78817
|
-
return generateTranslation(key, value, options, props.textOverrides, typeof props.developerTools === 'object' && ((_props$developerTools = props.developerTools) == null ? void 0 : _props$developerTools.translationKeys) === true);
|
|
78819
|
+
return generateTranslation(key, value, options, props.textOverrides, developerMode);
|
|
78818
78820
|
};
|
|
78819
78821
|
var session = useSessionContext({
|
|
78820
78822
|
dashboardId: props.dashboardId,
|
|
@@ -78826,7 +78828,9 @@ var GlobalProviderContents = function GlobalProviderContents(props) {
|
|
|
78826
78828
|
implementationMeta: implementationMeta,
|
|
78827
78829
|
programmaticDashboard: props.parentDashboard,
|
|
78828
78830
|
textOverride: textOverride,
|
|
78829
|
-
isEditor: props.isEditor
|
|
78831
|
+
isEditor: props.isEditor,
|
|
78832
|
+
developerMode: developerMode,
|
|
78833
|
+
textOverrides: props.textOverrides
|
|
78830
78834
|
});
|
|
78831
78835
|
var updateDashboardHash = function updateDashboardHash(dashboard) {
|
|
78832
78836
|
var definition = toSaveableDefinition(dashboard);
|