@vizzly/dashboard 0.15.0 → 0.15.1-dev-bf37af9c56e45d64667fdf7b5c96aa2a9c2b02e4

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.
@@ -11621,7 +11621,11 @@ var buildDownloadQuery = function buildDownloadQuery(dataSet, maxCSVDownloadLimi
11621
11621
  removeAggregateMaths: true,
11622
11622
  removePercentage: true,
11623
11623
  removeConditional: true,
11624
- removeAggregateCustomBuildMetric: true
11624
+ removeAggregateCustomBuildMetric: true,
11625
+ removeRoundedNumbers: true,
11626
+ removeCustomBuildMetric: true,
11627
+ removeRuleGrouping: true,
11628
+ removeDateCalculations: true
11625
11629
  });
11626
11630
  var measure = [].concat(fields).map(function (field) {
11627
11631
  return {
@@ -12473,8 +12477,8 @@ var defaultNumberFormatOptions = function defaultNumberFormatOptions(textOverrid
12473
12477
  },
12474
12478
  description: textOverride('number_format_option.minutes_to_hours_minutes', 'Minutes to hours & minutes')
12475
12479
  },
12476
- hour_of_day: {
12477
- description: 'Hour of the day',
12480
+ _vizzly_hour_of_day: {
12481
+ description: textOverride('number_format_option.hour_of_day', 'Hour of the day'),
12478
12482
  formatter: function formatter(value, noValueReplacement) {
12479
12483
  if (noValueReplacement === void 0) {
12480
12484
  noValueReplacement = noValue;
@@ -12483,8 +12487,8 @@ var defaultNumberFormatOptions = function defaultNumberFormatOptions(textOverrid
12483
12487
  return format$1(value, 'hour_of_day');
12484
12488
  }
12485
12489
  },
12486
- month_of_year: {
12487
- description: 'Month of the year',
12490
+ _vizzly_month_of_year: {
12491
+ description: textOverride('number_format_option.month_of_year', 'Month of the year'),
12488
12492
  formatter: function formatter(value, noValueReplacement) {
12489
12493
  if (noValueReplacement === void 0) {
12490
12494
  noValueReplacement = noValue;
@@ -12493,8 +12497,8 @@ var defaultNumberFormatOptions = function defaultNumberFormatOptions(textOverrid
12493
12497
  return format$1(value, 'month_of_year');
12494
12498
  }
12495
12499
  },
12496
- day_of_month: {
12497
- description: 'Day of month',
12500
+ _vizzly_day_of_month: {
12501
+ description: textOverride('number_format_option.day_of_month', 'Day of month'),
12498
12502
  formatter: function formatter(value, noValueReplacement) {
12499
12503
  if (noValueReplacement === void 0) {
12500
12504
  noValueReplacement = noValue;
@@ -12503,8 +12507,8 @@ var defaultNumberFormatOptions = function defaultNumberFormatOptions(textOverrid
12503
12507
  return format$1(value, 'day_of_month');
12504
12508
  }
12505
12509
  },
12506
- day_of_week_iso: {
12507
- description: 'Day of week',
12510
+ _vizzly_day_of_week_iso: {
12511
+ description: textOverride('number_format_option.day_of_week', 'Day of week'),
12508
12512
  formatter: function formatter(value, noValueReplacement) {
12509
12513
  if (noValueReplacement === void 0) {
12510
12514
  noValueReplacement = noValue;
@@ -12513,8 +12517,8 @@ var defaultNumberFormatOptions = function defaultNumberFormatOptions(textOverrid
12513
12517
  return format$1(value, 'day_of_week_iso');
12514
12518
  }
12515
12519
  },
12516
- week_of_year: {
12517
- description: 'Week of year',
12520
+ _vizzly_week_of_year: {
12521
+ description: textOverride('number_format_option.week_of_year', 'Week of year'),
12518
12522
  formatter: function formatter(value, noValueReplacement) {
12519
12523
  if (noValueReplacement === void 0) {
12520
12524
  noValueReplacement = noValue;
@@ -28692,7 +28696,7 @@ var FilterInputForm = function FilterInputForm(props) {
28692
28696
  }), props.onAddOrFilter && jsx(OrWrapper, {
28693
28697
  children: jsx(Tooltip, {
28694
28698
  tooltipContent: function tooltipContent() {
28695
- return 'Add OR filter';
28699
+ return textOverride('filters.add_or_filter', 'Add OR filter');
28696
28700
  },
28697
28701
  children: jsx(Button$2, {
28698
28702
  secondary: true,
@@ -57672,15 +57676,15 @@ function customMetricText(key, textOverride) {
57672
57676
  subtext: textOverride('custom_metric_description.conditional', 'Create a conditional field')
57673
57677
  },
57674
57678
  customBuildMetric: {
57675
- title: textOverride('custom_metric_title.caclulated_field', 'Custom Metric Builder'),
57676
- subtext: textOverride('custom_metric_description.caclulated_field', 'Create a custom build field')
57679
+ title: textOverride('custom_metric_title.calculated_field', 'Custom Metric Builder'),
57680
+ subtext: textOverride('custom_metric_description.calculated_field', 'Create a custom build field')
57677
57681
  }
57678
57682
  };
57679
57683
  return values[key];
57680
57684
  }
57681
57685
  function buildCustomMetricTitle(key, textOverride) {
57682
- return textOverride('custom_metric_modal_title', '[[custom_metric_title]] Custom Metric', {
57683
- custom_metric_title: customMetricText(key, textOverride).title
57686
+ return textOverride('custom_metric_modal_title', '[[customMetricTitle]] Custom Metric', {
57687
+ customMetricTitle: customMetricText(key, textOverride).title
57684
57688
  });
57685
57689
  }
57686
57690
 
@@ -60468,7 +60472,7 @@ var RowOptions = function RowOptions(props) {
60468
60472
  });
60469
60473
  }
60470
60474
  };
60471
- var label = textOverride('cell_options', 'Move Row') + " " + (props == null ? void 0 : props.direction);
60475
+ 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');
60472
60476
  return jsx(Tooltip, {
60473
60477
  placement: "right-start",
60474
60478
  tooltipContent: function tooltipContent() {
@@ -69455,7 +69459,7 @@ var CustomMetricModal = function CustomMetricModal(props) {
69455
69459
  onClose: props.onClose,
69456
69460
  disableDnD: true,
69457
69461
  children: [jsx(Modal.Header, {
69458
- title: "Custom Metric Builder"
69462
+ title: textOverride('custom_metric_title.calculated_field', 'Custom Metric Builder')
69459
69463
  }), jsxs(Modal.Content, {
69460
69464
  children: [jsx(PanelProperty, {
69461
69465
  children: jsx(Input, {
@@ -74343,9 +74347,9 @@ var useVizzly = function useVizzly(properties, options) {
74343
74347
  case 0:
74344
74348
  _context.prev = 0;
74345
74349
  _context.next = 3;
74346
- return Vizzly$1.load(properties, {
74350
+ return Vizzly$1.load(properties, _extends({}, options, {
74347
74351
  apiHost: (options == null ? void 0 : options.apiHost) || 'https://api.vizzly.co'
74348
- });
74352
+ }));
74349
74353
  case 3:
74350
74354
  vizzlyRef.current = _context.sent;
74351
74355
  _context.next = 6;
@@ -74771,7 +74775,9 @@ var useSessionContext = function useSessionContext(params) {
74771
74775
  dataSets: params.loadDataSetsCallback,
74772
74776
  programmaticDashboard: params.programmaticDashboard
74773
74777
  }, {
74774
- apiHost: params.apiConfig.host
74778
+ apiHost: params.apiConfig.host,
74779
+ developerMode: params.developerMode,
74780
+ textOverrides: params.textOverrides
74775
74781
  });
74776
74782
  var loadedStrategy = useDashboardStrategy(getStrategy(vizzly, params.parentDashboardId, params.dashboardId, params.isEditor), vizzly, params.programmaticDashboard);
74777
74783
  var _useScheduledReports = useScheduledReports(vizzly, loadedStrategy == null || (_loadedStrategy$dashb = loadedStrategy.dashboard) == null || (_loadedStrategy$dashb = _loadedStrategy$dashb.permission) == null ? void 0 : _loadedStrategy$dashb.token),
@@ -76228,7 +76234,7 @@ var GlobalProvider = function GlobalProvider(props) {
76228
76234
  }));
76229
76235
  };
76230
76236
  var GlobalProviderContents = function GlobalProviderContents(props) {
76231
- var _props$id, _session$identityConf, _props$dateFilterOpti, _session$vizzly$savin;
76237
+ var _props$developerTools, _props$id, _session$identityConf, _props$dateFilterOpti, _session$vizzly$savin;
76232
76238
  var implementationMeta = buildImplementationMeta(props);
76233
76239
  var apiConfig = props.vizzlyApiHost ? {
76234
76240
  host: props.vizzlyApiHost
@@ -76236,9 +76242,9 @@ var GlobalProviderContents = function GlobalProviderContents(props) {
76236
76242
  host: 'https://api.vizzly.co'
76237
76243
  };
76238
76244
  var vizzlyAPI = api(apiConfig);
76245
+ var developerMode = typeof props.developerTools === 'object' && ((_props$developerTools = props.developerTools) == null ? void 0 : _props$developerTools.translationKeys) === true;
76239
76246
  var textOverride = function textOverride(key, value, options) {
76240
- var _props$developerTools;
76241
- return generateTranslation(key, value, options, props.textOverrides, typeof props.developerTools === 'object' && ((_props$developerTools = props.developerTools) == null ? void 0 : _props$developerTools.translationKeys) === true);
76247
+ return generateTranslation(key, value, options, props.textOverrides, developerMode);
76242
76248
  };
76243
76249
  var session = useSessionContext({
76244
76250
  dashboardId: props.dashboardId,
@@ -76250,7 +76256,9 @@ var GlobalProviderContents = function GlobalProviderContents(props) {
76250
76256
  implementationMeta: implementationMeta,
76251
76257
  programmaticDashboard: props.parentDashboard,
76252
76258
  textOverride: textOverride,
76253
- isEditor: props.isEditor
76259
+ isEditor: props.isEditor,
76260
+ developerMode: developerMode,
76261
+ textOverrides: props.textOverrides
76254
76262
  });
76255
76263
  useOnDashboardLoadCallback(session, props.onDashboardLoad);
76256
76264
  var variables = useVariables(props.variables, (_props$id = props.id) != null ? _props$id : '');
@@ -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",
4
+ "version": "0.15.1-dev-bf37af9c56e45d64667fdf7b5c96aa2a9c2b02e4",
5
5
  "source": "src/index.tsx",
6
6
  "types": "./dist/dashboard/src/index.d.ts",
7
7
  "module": "./dist/dashboard.esm.js",