How to use the @superset-ui/core.convertKeysToCamelCase function in @superset-ui/core

To help you get started, we’ve selected a few @superset-ui/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github apache-superset / superset-ui / packages / superset-ui-chart / src / models / ChartProps.ts View on Github external
const {
      annotationData = {},
      datasource = {},
      formData = {} as FormDataType,
      hooks = {},
      initialValues = [],
      queryData = [],
      width = DEFAULT_WIDTH,
      height = DEFAULT_HEIGHT,
    } = config;
    this.width = width;
    this.height = height;
    this.annotationData = annotationData;
    this.datasource = convertKeysToCamelCase(datasource);
    this.rawDatasource = datasource;
    this.formData = convertKeysToCamelCase(formData);
    this.rawFormData = formData;
    this.hooks = hooks;
    this.initialValues = initialValues;
    this.queryData = queryData;
  }
}
github apache-superset / superset-ui / packages / superset-ui-chart / src / models / ChartProps.ts View on Github external
constructor(config: ChartPropsConfig = {}) {
    const {
      annotationData = {},
      datasource = {},
      formData = {} as FormDataType,
      hooks = {},
      initialValues = [],
      queryData = [],
      width = DEFAULT_WIDTH,
      height = DEFAULT_HEIGHT,
    } = config;
    this.width = width;
    this.height = height;
    this.annotationData = annotationData;
    this.datasource = convertKeysToCamelCase(datasource);
    this.rawDatasource = datasource;
    this.formData = convertKeysToCamelCase(formData);
    this.rawFormData = formData;
    this.hooks = hooks;
    this.initialValues = initialValues;
    this.queryData = queryData;
  }
}