@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.
@@ -13153,8 +13153,8 @@ var defaultNumberFormatOptions = function defaultNumberFormatOptions(textOverrid
13153
13153
  },
13154
13154
  description: textOverride('number_format_option.minutes_to_hours_minutes', 'Minutes to hours & minutes')
13155
13155
  },
13156
- hour_of_day: {
13157
- description: 'Hour of the day',
13156
+ _vizzly_hour_of_day: {
13157
+ description: textOverride('number_format_option.hour_of_day', 'Hour of the day'),
13158
13158
  formatter: function formatter(value, noValueReplacement) {
13159
13159
  if (noValueReplacement === void 0) {
13160
13160
  noValueReplacement = noValue;
@@ -13163,8 +13163,8 @@ var defaultNumberFormatOptions = function defaultNumberFormatOptions(textOverrid
13163
13163
  return format$1(value, 'hour_of_day');
13164
13164
  }
13165
13165
  },
13166
- month_of_year: {
13167
- description: 'Month of the year',
13166
+ _vizzly_month_of_year: {
13167
+ description: textOverride('number_format_option.month_of_year', 'Month of the year'),
13168
13168
  formatter: function formatter(value, noValueReplacement) {
13169
13169
  if (noValueReplacement === void 0) {
13170
13170
  noValueReplacement = noValue;
@@ -13173,8 +13173,8 @@ var defaultNumberFormatOptions = function defaultNumberFormatOptions(textOverrid
13173
13173
  return format$1(value, 'month_of_year');
13174
13174
  }
13175
13175
  },
13176
- day_of_month: {
13177
- description: 'Day of month',
13176
+ _vizzly_day_of_month: {
13177
+ description: textOverride('number_format_option.day_of_month', 'Day of month'),
13178
13178
  formatter: function formatter(value, noValueReplacement) {
13179
13179
  if (noValueReplacement === void 0) {
13180
13180
  noValueReplacement = noValue;
@@ -13183,8 +13183,8 @@ var defaultNumberFormatOptions = function defaultNumberFormatOptions(textOverrid
13183
13183
  return format$1(value, 'day_of_month');
13184
13184
  }
13185
13185
  },
13186
- day_of_week_iso: {
13187
- description: 'Day of week',
13186
+ _vizzly_day_of_week_iso: {
13187
+ description: textOverride('number_format_option.day_of_week', 'Day of week'),
13188
13188
  formatter: function formatter(value, noValueReplacement) {
13189
13189
  if (noValueReplacement === void 0) {
13190
13190
  noValueReplacement = noValue;
@@ -13193,8 +13193,8 @@ var defaultNumberFormatOptions = function defaultNumberFormatOptions(textOverrid
13193
13193
  return format$1(value, 'day_of_week_iso');
13194
13194
  }
13195
13195
  },
13196
- week_of_year: {
13197
- description: 'Week of year',
13196
+ _vizzly_week_of_year: {
13197
+ description: textOverride('number_format_option.week_of_year', 'Week of year'),
13198
13198
  formatter: function formatter(value, noValueReplacement) {
13199
13199
  if (noValueReplacement === void 0) {
13200
13200
  noValueReplacement = noValue;
@@ -29213,7 +29213,7 @@ var FilterInputForm = function FilterInputForm(props) {
29213
29213
  }), props.onAddOrFilter && jsx(OrWrapper, {
29214
29214
  children: jsx(Tooltip, {
29215
29215
  tooltipContent: function tooltipContent() {
29216
- return 'Add OR filter';
29216
+ return textOverride('filters.add_or_filter', 'Add OR filter');
29217
29217
  },
29218
29218
  children: jsx(Button$2, {
29219
29219
  secondary: true,
@@ -60266,15 +60266,15 @@ function customMetricText(key, textOverride) {
60266
60266
  subtext: textOverride('custom_metric_description.conditional', 'Create a conditional field')
60267
60267
  },
60268
60268
  customBuildMetric: {
60269
- title: textOverride('custom_metric_title.caclulated_field', 'Custom Metric Builder'),
60270
- subtext: textOverride('custom_metric_description.caclulated_field', 'Create a custom build field')
60269
+ title: textOverride('custom_metric_title.calculated_field', 'Custom Metric Builder'),
60270
+ subtext: textOverride('custom_metric_description.calculated_field', 'Create a custom build field')
60271
60271
  }
60272
60272
  };
60273
60273
  return values[key];
60274
60274
  }
60275
60275
  function buildCustomMetricTitle(key, textOverride) {
60276
- return textOverride('custom_metric_modal_title', '[[custom_metric_title]] Custom Metric', {
60277
- custom_metric_title: customMetricText(key, textOverride).title
60276
+ return textOverride('custom_metric_modal_title', '[[customMetricTitle]] Custom Metric', {
60277
+ customMetricTitle: customMetricText(key, textOverride).title
60278
60278
  });
60279
60279
  }
60280
60280
 
@@ -62846,7 +62846,7 @@ var RowOptions = function RowOptions(props) {
62846
62846
  });
62847
62847
  }
62848
62848
  };
62849
- var label = textOverride('cell_options', 'Move Row') + " " + (props == null ? void 0 : props.direction);
62849
+ 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');
62850
62850
  return jsx(Tooltip, {
62851
62851
  placement: "right-start",
62852
62852
  tooltipContent: function tooltipContent() {
@@ -69433,7 +69433,7 @@ var CustomMetricModal = function CustomMetricModal(props) {
69433
69433
  onClose: props.onClose,
69434
69434
  disableDnD: true,
69435
69435
  children: [jsx(Modal.Header, {
69436
- title: "Custom Metric Builder"
69436
+ title: textOverride('custom_metric_title.calculated_field', 'Custom Metric Builder')
69437
69437
  }), jsxs(Modal.Content, {
69438
69438
  children: [jsx(PanelProperty, {
69439
69439
  children: jsx(Input, {
@@ -78334,9 +78334,9 @@ var useVizzly = function useVizzly(properties, options) {
78334
78334
  case 0:
78335
78335
  _context.prev = 0;
78336
78336
  _context.next = 3;
78337
- return Vizzly$1.load(properties, {
78337
+ return Vizzly$1.load(properties, _extends({}, options, {
78338
78338
  apiHost: (options == null ? void 0 : options.apiHost) || 'https://api.vizzly.co'
78339
- });
78339
+ }));
78340
78340
  case 3:
78341
78341
  vizzlyRef.current = _context.sent;
78342
78342
  _context.next = 6;
@@ -78762,7 +78762,9 @@ var useSessionContext = function useSessionContext(params) {
78762
78762
  dataSets: params.loadDataSetsCallback,
78763
78763
  programmaticDashboard: params.programmaticDashboard
78764
78764
  }, {
78765
- apiHost: params.apiConfig.host
78765
+ apiHost: params.apiConfig.host,
78766
+ developerMode: params.developerMode,
78767
+ textOverrides: params.textOverrides
78766
78768
  });
78767
78769
  var loadedStrategy = useDashboardStrategy(getStrategy(vizzly, params.parentDashboardId, params.dashboardId, params.isEditor), vizzly, params.programmaticDashboard);
78768
78770
  var _useScheduledReports = useScheduledReports(vizzly, loadedStrategy == null || (_loadedStrategy$dashb = loadedStrategy.dashboard) == null || (_loadedStrategy$dashb = _loadedStrategy$dashb.permission) == null ? void 0 : _loadedStrategy$dashb.token),
@@ -78862,7 +78864,7 @@ var GlobalProvider = function GlobalProvider(props) {
78862
78864
  }));
78863
78865
  };
78864
78866
  var GlobalProviderContents = function GlobalProviderContents(props) {
78865
- var _props$id, _session$identityConf, _props$dateFilterOpti, _session$vizzly$savin;
78867
+ var _props$developerTools, _props$id, _session$identityConf, _props$dateFilterOpti, _session$vizzly$savin;
78866
78868
  var _useState2 = useState(undefined),
78867
78869
  dashboardHash = _useState2[0],
78868
78870
  setDashboardHash = _useState2[1];
@@ -78873,9 +78875,9 @@ var GlobalProviderContents = function GlobalProviderContents(props) {
78873
78875
  host: 'https://api.vizzly.co'
78874
78876
  };
78875
78877
  var vizzlyAPI = api(apiConfig);
78878
+ var developerMode = typeof props.developerTools === 'object' && ((_props$developerTools = props.developerTools) == null ? void 0 : _props$developerTools.translationKeys) === true;
78876
78879
  var textOverride = function textOverride(key, value, options) {
78877
- var _props$developerTools;
78878
- return generateTranslation(key, value, options, props.textOverrides, typeof props.developerTools === 'object' && ((_props$developerTools = props.developerTools) == null ? void 0 : _props$developerTools.translationKeys) === true);
78880
+ return generateTranslation(key, value, options, props.textOverrides, developerMode);
78879
78881
  };
78880
78882
  var session = useSessionContext({
78881
78883
  dashboardId: props.dashboardId,
@@ -78887,7 +78889,9 @@ var GlobalProviderContents = function GlobalProviderContents(props) {
78887
78889
  implementationMeta: implementationMeta,
78888
78890
  programmaticDashboard: props.parentDashboard,
78889
78891
  textOverride: textOverride,
78890
- isEditor: props.isEditor
78892
+ isEditor: props.isEditor,
78893
+ developerMode: developerMode,
78894
+ textOverrides: props.textOverrides
78891
78895
  });
78892
78896
  var updateDashboardHash = function updateDashboardHash(dashboard) {
78893
78897
  var definition = toSaveableDefinition(dashboard);
@@ -226,6 +226,20 @@ export declare type VizzlyTranslations = {
226
226
  * String containing the translation.
227
227
  */
228
228
  single_select_filter_description: string;
229
+ /**
230
+ * @default 'Multi select'
231
+ *
232
+ * @returns
233
+ * String containing the translation.
234
+ */
235
+ multi_select: string;
236
+ /**
237
+ * @default 'Allow multiple selections.'
238
+ *
239
+ * @returns
240
+ * String containing the translation.
241
+ */
242
+ multi_select_description: string;
229
243
  /**
230
244
  * @default 'Advanced filter'
231
245
  *
@@ -427,6 +441,13 @@ export declare type VizzlyTranslations = {
427
441
  * String containing the translation.
428
442
  */
429
443
  click_settings: string;
444
+ /**
445
+ * @default 'Metrics and operator need to be defined'
446
+ *
447
+ * @returns
448
+ * String containing the translation.
449
+ */
450
+ metrics_operators_need_defined: string;
430
451
  /**
431
452
  * @default 'No value'
432
453
  *
@@ -873,6 +894,13 @@ export declare type VizzlyTranslations = {
873
894
  * String containing the translation.
874
895
  */
875
896
  reset: string;
897
+ /**
898
+ * @default 'Setup scheduled reports'
899
+ *
900
+ * @returns
901
+ * String containing the translation.
902
+ */
903
+ scheduled_reports: string;
876
904
  /**
877
905
  * @default 'Build a dashboard with your data and delight your customer.'
878
906
  *
@@ -957,13 +985,6 @@ export declare type VizzlyTranslations = {
957
985
  * String containing the translation.
958
986
  */
959
987
  remove_cell_from_dashboard: string;
960
- /**
961
- * @default 'Reports'
962
- *
963
- * @returns
964
- * String containing the translation.
965
- */
966
- manage_reports: string;
967
988
  /**
968
989
  * @default 'Add to Library'
969
990
  *
@@ -1020,6 +1041,20 @@ export declare type VizzlyTranslations = {
1020
1041
  * String containing the translation.
1021
1042
  */
1022
1043
  drag_to_move: string;
1044
+ /**
1045
+ * @default 'Move Row Up'
1046
+ *
1047
+ * @returns
1048
+ * String containing the translation.
1049
+ */
1050
+ move_row_up: string;
1051
+ /**
1052
+ * @default 'Move Row Down'
1053
+ *
1054
+ * @returns
1055
+ * String containing the translation.
1056
+ */
1057
+ move_row_down: string;
1023
1058
  /**
1024
1059
  * @default 'Add Row'
1025
1060
  *
@@ -1226,6 +1261,13 @@ export declare type VizzlyTranslations = {
1226
1261
  * String containing the translation.
1227
1262
  */
1228
1263
  create: string;
1264
+ /**
1265
+ * @default 'Custom Metric Builder'
1266
+ *
1267
+ * @returns
1268
+ * String containing the translation.
1269
+ */
1270
+ 'custom_metric_title.calculated_field': string;
1229
1271
  /**
1230
1272
  * @default '[[add|remove]] nested calculation'
1231
1273
  *
@@ -1243,13 +1285,6 @@ export declare type VizzlyTranslations = {
1243
1285
  * String containing the translation.
1244
1286
  */
1245
1287
  add: string;
1246
- /**
1247
- * @default 'Metrics and operator need to be defined'
1248
- *
1249
- * @returns
1250
- * String containing the translation.
1251
- */
1252
- metrics_operators_need_defined: string;
1253
1288
  /**
1254
1289
  * @default 'Select Math Type'
1255
1290
  *
@@ -1448,6 +1483,13 @@ export declare type VizzlyTranslations = {
1448
1483
  * String containing the translation.
1449
1484
  */
1450
1485
  add_custom_metric: string;
1486
+ /**
1487
+ * @default 'New Comparison'
1488
+ *
1489
+ * @returns
1490
+ * String containing the translation.
1491
+ */
1492
+ new_comparison: string;
1451
1493
  /**
1452
1494
  * @default 'Add comparison'
1453
1495
  *
@@ -1497,6 +1539,13 @@ export declare type VizzlyTranslations = {
1497
1539
  * String containing the translation.
1498
1540
  */
1499
1541
  value: string;
1542
+ /**
1543
+ * @default 'Add OR filter'
1544
+ *
1545
+ * @returns
1546
+ * String containing the translation.
1547
+ */
1548
+ 'filters.add_or_filter': string;
1500
1549
  /**
1501
1550
  * @default '+ OR Filter'
1502
1551
  *
@@ -1758,6 +1807,13 @@ export declare type VizzlyTranslations = {
1758
1807
  * String containing the translation.
1759
1808
  */
1760
1809
  'combo_chart.data_panel.dimension.time': string;
1810
+ /**
1811
+ * @default 'Comparison'
1812
+ *
1813
+ * @returns
1814
+ * String containing the translation.
1815
+ */
1816
+ comparison_list_title: string;
1761
1817
  /**
1762
1818
  * @default 'Limit'
1763
1819
  *
@@ -2212,6 +2268,30 @@ export declare type VizzlyTranslations = {
2212
2268
  * String containing the translation.
2213
2269
  */
2214
2270
  stats_label_warning: string;
2271
+ /**
2272
+ * @default 'Positive value'
2273
+ *
2274
+ * @returns
2275
+ * String containing the translation.
2276
+ */
2277
+ increase_color: string;
2278
+ /**
2279
+ * @default 'Negative value'
2280
+ *
2281
+ * @returns
2282
+ * String containing the translation.
2283
+ */
2284
+ decrease_color: string;
2285
+ /**
2286
+ * @default '[[field]] [[op]] [[value]] [[duration]] in [[timeframe]]'
2287
+ *
2288
+ * @params
2289
+ * Fixed Variables: [[field]] [[value]]
2290
+ *
2291
+ * @returns
2292
+ * String containing the translation.
2293
+ */
2294
+ 'metric_overview.relative_date': string;
2215
2295
  /**
2216
2296
  * @default 'No value'
2217
2297
  *
@@ -2289,6 +2369,41 @@ export declare type VizzlyTranslations = {
2289
2369
  * String containing the translation.
2290
2370
  */
2291
2371
  'number_format_option.minutes_to_hours_minutes': string;
2372
+ /**
2373
+ * @default 'Hour of the day'
2374
+ *
2375
+ * @returns
2376
+ * String containing the translation.
2377
+ */
2378
+ 'number_format_option.hour_of_day': string;
2379
+ /**
2380
+ * @default 'Month of the year'
2381
+ *
2382
+ * @returns
2383
+ * String containing the translation.
2384
+ */
2385
+ 'number_format_option.month_of_year': string;
2386
+ /**
2387
+ * @default 'Day of month'
2388
+ *
2389
+ * @returns
2390
+ * String containing the translation.
2391
+ */
2392
+ 'number_format_option.day_of_month': string;
2393
+ /**
2394
+ * @default 'Day of week'
2395
+ *
2396
+ * @returns
2397
+ * String containing the translation.
2398
+ */
2399
+ 'number_format_option.day_of_week': string;
2400
+ /**
2401
+ * @default 'Week of year'
2402
+ *
2403
+ * @returns
2404
+ * String containing the translation.
2405
+ */
2406
+ 'number_format_option.week_of_year': string;
2292
2407
  /**
2293
2408
  * @default 'Math'
2294
2409
  *
@@ -2374,10 +2489,17 @@ export declare type VizzlyTranslations = {
2374
2489
  */
2375
2490
  'custom_metric_description.conditional': string;
2376
2491
  /**
2377
- * @default '[[custom_metric_title]] Custom Metric'
2492
+ * @default 'Create a custom build field'
2493
+ *
2494
+ * @returns
2495
+ * String containing the translation.
2496
+ */
2497
+ 'custom_metric_description.calculated_field': string;
2498
+ /**
2499
+ * @default '[[customMetricTitle]] Custom Metric'
2378
2500
  *
2379
2501
  * @params
2380
- * Fixed Variables: [[custom_metric_title]]
2502
+ * Fixed Variables: [[customMetricTitle]]
2381
2503
  *
2382
2504
  * @returns
2383
2505
  * String containing the translation.
@@ -5596,6 +5718,13 @@ export declare type VizzlyTranslations = {
5596
5718
  * String containing the translation.
5597
5719
  */
5598
5720
  'config.supported_time.dayOfWeekOnly': string;
5721
+ /**
5722
+ * @default "Month of year"
5723
+ *
5724
+ * @returns
5725
+ * String containing the translation.
5726
+ */
5727
+ 'config.supported_time.monthOfYearOnly': string;
5599
5728
  /**
5600
5729
  * @default "Day of month"
5601
5730
  *
@@ -4,6 +4,7 @@ import { Dashboard } from '../../../shared-logic/src/Dashboard/types';
4
4
  import { DashboardAccessConfig, IdentityConfig } from '../../../shared-logic/src/IdentityConfig/types';
5
5
  import { GlobalLibrary } from '../../../shared-logic/src/GlobalLibrary/types';
6
6
  import { SavingState } from '../../../shared-logic/src/VizzlyState';
7
+ import { LoaderOptions } from '../../../services/src/VizzlyLoader';
7
8
  export declare type LoadedVizzlyHook = Omit<State, 'loading'> & {
8
9
  createDashboard: (params: CreateDashboardParams) => Promise<Dashboard | null>;
9
10
  updateDashboard: (params: UpdateDashboardParams) => Promise<Dashboard | null>;
@@ -35,7 +36,5 @@ declare type State = {
35
36
  error: Error | undefined;
36
37
  saving?: SavingState;
37
38
  };
38
- export declare const useVizzly: (properties: VizzlyServicesProperties, options?: {
39
- apiHost?: string | undefined;
40
- } | undefined) => Returns;
39
+ export declare const useVizzly: (properties: VizzlyServicesProperties, options?: LoaderOptions | undefined) => Returns;
41
40
  export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vizzly/dashboard",
3
3
  "author": "james@vizzly.co",
4
- "version": "0.15.0-dev-9ba9cfcf5d6fdab60b458c0b97e98590696c65ea",
4
+ "version": "0.15.0-dev-5e35638e18dac116117dada30146d05c3618c737",
5
5
  "source": "src/index.tsx",
6
6
  "types": "./dist/dashboard/src/index.d.ts",
7
7
  "module": "./dist/dashboard.esm.js",