@vizzly/dashboard 0.15.0-dev-93b3742a0242e8ad4ce4a7e1c46a6f72a42141e7 → 0.15.0-dev-1aa6eade101748d98c680cc4504d68c26eddeb63

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.
@@ -3198,35 +3198,59 @@ var validateView = (function (attrs, dataSets, queryEngineConfig) {
3198
3198
  return [];
3199
3199
  });
3200
3200
 
3201
- var getGroupingFeedbackMessage = function getGroupingFeedbackMessage(attributes) {
3202
- var genericGroupingFeedbackMessage = function genericGroupingFeedbackMessage(chartName) {
3203
- return chartName + " need at least 1 grouping to display correctly.";
3204
- };
3205
- if (attributes.type === 'barChart') {
3206
- return genericGroupingFeedbackMessage('Column Charts');
3207
- }
3208
- if (attributes.type === 'lineChart') {
3209
- return genericGroupingFeedbackMessage('Line Charts');
3210
- }
3211
- if (attributes.type === 'areaChart') {
3212
- return genericGroupingFeedbackMessage('Area Charts');
3213
- }
3214
- if (attributes.type === 'horizontalBarChart') {
3215
- return genericGroupingFeedbackMessage('Horizontal Bar Charts');
3216
- }
3217
- if (attributes.type === 'comboChart') {
3218
- return 'Combo Charts needs at least 1 grouping (Bar and Line), or, have time set to display correctly.';
3219
- }
3220
- if (attributes.type === 'scatterChart') {
3221
- return genericGroupingFeedbackMessage('Scatter Charts');
3222
- }
3223
- if (attributes.type === 'pieChart') {
3224
- return genericGroupingFeedbackMessage('Pie Charts');
3201
+ var CHART_TYPE_CONFIGS = {
3202
+ barChart: {
3203
+ displayName: 'Column Charts'
3204
+ },
3205
+ lineChart: {
3206
+ displayName: 'Line Charts'
3207
+ },
3208
+ lineChartV2: {
3209
+ displayName: 'Line Charts'
3210
+ },
3211
+ areaChart: {
3212
+ displayName: 'Area Charts'
3213
+ },
3214
+ horizontalBarChart: {
3215
+ displayName: 'Horizontal Bar Charts'
3216
+ },
3217
+ scatterChart: {
3218
+ displayName: 'Scatter Charts'
3219
+ },
3220
+ pieChart: {
3221
+ displayName: 'Pie Charts'
3222
+ },
3223
+ funnelChart: {
3224
+ displayName: 'Funnel Charts'
3225
+ },
3226
+ sunburstChart: {
3227
+ displayName: 'Sunburst Charts'
3228
+ },
3229
+ bubbleChart: {
3230
+ displayName: 'Bubble Charts'
3231
+ },
3232
+ bubbleChartV2: {
3233
+ displayName: 'Bubble Charts'
3234
+ },
3235
+ basicTable: {
3236
+ displayName: 'Tables'
3237
+ },
3238
+ comboChart: {
3239
+ displayName: 'Combo Charts',
3240
+ customMessage: 'Combo Charts needs at least 1 grouping (Bar and Line), or, have time set to display correctly.'
3241
+ },
3242
+ comboChartV2: {
3243
+ displayName: 'Combo Charts',
3244
+ customMessage: 'Combo Charts needs at least 1 grouping (Bar and Line), or, have time set to display correctly.'
3225
3245
  }
3226
- if (attributes.type === 'funnelChart') {
3227
- return genericGroupingFeedbackMessage('Funnel Charts');
3246
+ };
3247
+ var getGroupingFeedbackMessage = function getGroupingFeedbackMessage(attributes) {
3248
+ var config = CHART_TYPE_CONFIGS[attributes.type];
3249
+ if (config != null && config.customMessage) {
3250
+ return config.customMessage;
3228
3251
  }
3229
- return null;
3252
+ var displayName = (config == null ? void 0 : config.displayName) || 'Charts';
3253
+ return displayName + " need at least 1 grouping to display correctly.";
3230
3254
  };
3231
3255
  var chartHasDimensions = function chartHasDimensions(attributes) {
3232
3256
  if (attributes.type === 'comboChart') {
@@ -3235,7 +3259,7 @@ var chartHasDimensions = function chartHasDimensions(attributes) {
3235
3259
  if (hasBarAndLineDimensions) return true;
3236
3260
  return false;
3237
3261
  }
3238
- if (attributes.type === 'barChart' || attributes.type === 'lineChart' || attributes.type === 'areaChart' || attributes.type === 'horizontalBarChart' || attributes.type === 'scatterChart' || attributes.type === 'pieChart' || attributes.type === 'funnelChart') {
3262
+ if (attributes.type === 'barChart' || attributes.type === 'lineChart' || attributes.type === 'areaChart' || attributes.type === 'horizontalBarChart' || attributes.type === 'scatterChart' || attributes.type === 'pieChart' || attributes.type === 'funnelChart' || attributes.type === 'sunburstChart') {
3239
3263
  var _attributes$dimension;
3240
3264
  if (attributes.timeDimension) return true;
3241
3265
  if (!(attributes != null && attributes.dimension)) return true;
@@ -1,4 +1,4 @@
1
1
  import { Component } from '../../src/Component/types';
2
- export declare const getGroupingFeedbackMessage: (attributes: Component.Attributes) => string | null;
2
+ export declare const getGroupingFeedbackMessage: (attributes: Component.Attributes) => string;
3
3
  export declare const chartHasDimensions: (attributes: Component.Attributes) => boolean;
4
- export declare const createFeedback: (attribute: Component.Attributes) => string | true | null;
4
+ export declare const createFeedback: (attribute: Component.Attributes) => string | true;
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-93b3742a0242e8ad4ce4a7e1c46a6f72a42141e7",
4
+ "version": "0.15.0-dev-1aa6eade101748d98c680cc4504d68c26eddeb63",
5
5
  "source": "src/index.tsx",
6
6
  "types": "./dist/dashboard/src/index.d.ts",
7
7
  "module": "./dist/dashboard.esm.js",