Socket
Socket
Sign inDemoInstall

@superset-ui/control-utils

Package Overview
Dependencies
Maintainers
12
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@superset-ui/control-utils - npm Package Compare versions

Comparing version 0.13.1 to 0.13.3

14

esm/D3Formatting.js

@@ -0,1 +1,6 @@

"use strict";
exports.__esModule = true;
exports.D3_TIME_FORMAT_OPTIONS = exports.D3_FORMAT_OPTIONS = exports.D3_FORMAT_DOCS = void 0;
/**

@@ -20,5 +25,8 @@ * Licensed to the Apache Software Foundation (ASF) under one

// D3 specific formatting config
export const D3_FORMAT_DOCS = 'D3 format syntax: https://github.com/d3/d3-format'; // input choices & options
const D3_FORMAT_DOCS = 'D3 format syntax: https://github.com/d3/d3-format'; // input choices & options
export const D3_FORMAT_OPTIONS = [['SMART_NUMBER', 'Adaptative formating'], ['~g', 'Original value'], [',d', ',d (12345.432 => 12,345)'], ['.1s', '.1s (12345.432 => 10k)'], ['.3s', '.3s (12345.432 => 12.3k)'], [',.1%', ',.1% (12345.432 => 1,234,543.2%)'], ['.3%', '.3% (12345.432 => 1234543.200%)'], ['.4r', '.4r (12345.432 => 12350)'], [',.3f', ',.3f (12345.432 => 12,345.432)'], ['+,', '+, (12345.432 => +12,345.432)'], ['$,.2f', '$,.2f (12345.432 => $12,345.43)'], ['DURATION', 'Duration in ms (66000 => 1m 6s)'], ['DURATION_SUB', 'Duration in ms (100.40008 => 100ms 400µs 80ns)']];
export const D3_TIME_FORMAT_OPTIONS = [['smart_date', 'Adaptative formating'], ['%d/%m/%Y', '%d/%m/%Y | 14/01/2019'], ['%m/%d/%Y', '%m/%d/%Y | 01/14/2019'], ['%Y-%m-%d', '%Y-%m-%d | 2019-01-14'], ['%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M:%S | 2019-01-14 01:32:10'], ['%d-%m-%Y %H:%M:%S', '%Y-%m-%d %H:%M:%S | 14-01-2019 01:32:10'], ['%H:%M:%S', '%H:%M:%S | 01:32:10']];
exports.D3_FORMAT_DOCS = D3_FORMAT_DOCS;
const D3_FORMAT_OPTIONS = [['SMART_NUMBER', 'Adaptative formating'], ['~g', 'Original value'], [',d', ',d (12345.432 => 12,345)'], ['.1s', '.1s (12345.432 => 10k)'], ['.3s', '.3s (12345.432 => 12.3k)'], [',.1%', ',.1% (12345.432 => 1,234,543.2%)'], ['.3%', '.3% (12345.432 => 1234543.200%)'], ['.4r', '.4r (12345.432 => 12350)'], [',.3f', ',.3f (12345.432 => 12,345.432)'], ['+,', '+, (12345.432 => +12,345.432)'], ['$,.2f', '$,.2f (12345.432 => $12,345.43)'], ['DURATION', 'Duration in ms (66000 => 1m 6s)'], ['DURATION_SUB', 'Duration in ms (100.40008 => 100ms 400µs 80ns)']];
exports.D3_FORMAT_OPTIONS = D3_FORMAT_OPTIONS;
const D3_TIME_FORMAT_OPTIONS = [['smart_date', 'Adaptative formating'], ['%d/%m/%Y', '%d/%m/%Y | 14/01/2019'], ['%m/%d/%Y', '%m/%d/%Y | 01/14/2019'], ['%Y-%m-%d', '%Y-%m-%d | 2019-01-14'], ['%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M:%S | 2019-01-14 01:32:10'], ['%d-%m-%Y %H:%M:%S', '%Y-%m-%d %H:%M:%S | 14-01-2019 01:32:10'], ['%H:%M:%S', '%H:%M:%S | 01:32:10']];
exports.D3_TIME_FORMAT_OPTIONS = D3_TIME_FORMAT_OPTIONS;

@@ -1,4 +0,24 @@

import * as sectionModules from './sections';
export const sections = sectionModules;
export { D3_FORMAT_DOCS, D3_FORMAT_OPTIONS, D3_TIME_FORMAT_OPTIONS } from './D3Formatting';
export { formatSelectOptions, formatSelectOptionsForRange } from './selectOptions';
"use strict";
exports.__esModule = true;
exports.formatSelectOptionsForRange = exports.formatSelectOptions = exports.D3_TIME_FORMAT_OPTIONS = exports.D3_FORMAT_OPTIONS = exports.D3_FORMAT_DOCS = exports.sections = void 0;
var sectionModules = _interopRequireWildcard(require("./sections"));
var _D3Formatting = require("./D3Formatting");
exports.D3_FORMAT_DOCS = _D3Formatting.D3_FORMAT_DOCS;
exports.D3_FORMAT_OPTIONS = _D3Formatting.D3_FORMAT_OPTIONS;
exports.D3_TIME_FORMAT_OPTIONS = _D3Formatting.D3_TIME_FORMAT_OPTIONS;
var _selectOptions = require("./selectOptions");
exports.formatSelectOptions = _selectOptions.formatSelectOptions;
exports.formatSelectOptionsForRange = _selectOptions.formatSelectOptionsForRange;
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
const sections = sectionModules;
exports.sections = sections;

@@ -0,1 +1,8 @@

"use strict";
exports.__esModule = true;
exports.annotations = exports.sqlaTimeSeries = exports.colorScheme = exports.datasourceAndVizType = exports.druidTimeSeries = void 0;
var _translation = require("@superset-ui/translation");
/**

@@ -19,13 +26,13 @@ * Licensed to the Apache Software Foundation (ASF) under one

*/
import { t } from '@superset-ui/translation'; // A few standard controls sections that are used internally.
// A few standard controls sections that are used internally.
// Not recommended for use in third-party plugins.
export const druidTimeSeries = {
label: t('Time'),
const druidTimeSeries = {
label: (0, _translation.t)('Time'),
expanded: true,
description: t('Time related form attributes'),
description: (0, _translation.t)('Time related form attributes'),
controlSetRows: [['time_range']]
};
export const datasourceAndVizType = {
label: t('Datasource & Chart Type'),
exports.druidTimeSeries = druidTimeSeries;
const datasourceAndVizType = {
label: (0, _translation.t)('Datasource & Chart Type'),
expanded: true,

@@ -36,5 +43,5 @@ controlSetRows: [['datasource'], ['viz_type'], [{

type: 'HiddenControl',
label: t('Chart ID'),
label: (0, _translation.t)('Chart ID'),
hidden: true,
description: t('The id of the active chart')
description: (0, _translation.t)('The id of the active chart')
}

@@ -45,5 +52,5 @@ }, {

type: 'HiddenControl',
label: t('Cache Timeout (seconds)'),
label: (0, _translation.t)('Cache Timeout (seconds)'),
hidden: true,
description: t('The number of seconds before expiring the cache')
description: (0, _translation.t)('The number of seconds before expiring the cache')
}

@@ -54,5 +61,5 @@ }, {

type: 'HiddenControl',
label: t('URL Parameters'),
label: (0, _translation.t)('URL Parameters'),
hidden: true,
description: t('Extra parameters for use in jinja templated queries')
description: (0, _translation.t)('Extra parameters for use in jinja templated queries')
}

@@ -63,20 +70,23 @@ }, {

type: 'HiddenControl',
label: t('Time range endpoints'),
label: (0, _translation.t)('Time range endpoints'),
hidden: true,
description: t('Time range endpoints (SIP-15)')
description: (0, _translation.t)('Time range endpoints (SIP-15)')
}
}]]
};
export const colorScheme = {
label: t('Color Scheme'),
exports.datasourceAndVizType = datasourceAndVizType;
const colorScheme = {
label: (0, _translation.t)('Color Scheme'),
controlSetRows: [['color_scheme', 'label_colors']]
};
export const sqlaTimeSeries = {
label: t('Time'),
description: t('Time related form attributes'),
exports.colorScheme = colorScheme;
const sqlaTimeSeries = {
label: (0, _translation.t)('Time'),
description: (0, _translation.t)('Time related form attributes'),
expanded: true,
controlSetRows: [['granularity_sqla'], ['time_range']]
};
export const annotations = {
label: t('Annotations and Layers'),
exports.sqlaTimeSeries = sqlaTimeSeries;
const annotations = {
label: (0, _translation.t)('Annotations and Layers'),
tabOverride: 'data',

@@ -95,2 +105,3 @@ expanded: true,

}]]
};
};
exports.annotations = annotations;

@@ -0,1 +1,7 @@

"use strict";
exports.__esModule = true;
exports.formatSelectOptions = formatSelectOptions;
exports.formatSelectOptionsForRange = formatSelectOptionsForRange;
/**

@@ -22,3 +28,3 @@ * Licensed to the Apache Software Foundation (ASF) under one

/** Turns an array of string/number options into options for a select input */
export function formatSelectOptions(options) {
function formatSelectOptions(options) {
return options.map(opt => [opt, opt.toString()]);

@@ -32,3 +38,4 @@ }

export function formatSelectOptionsForRange(start, end) {
function formatSelectOptionsForRange(start, end) {
const options = [];

@@ -35,0 +42,0 @@

@@ -0,1 +1,6 @@

"use strict";
exports.__esModule = true;
exports.D3_TIME_FORMAT_OPTIONS = exports.D3_FORMAT_OPTIONS = exports.D3_FORMAT_DOCS = void 0;
/**

@@ -20,5 +25,8 @@ * Licensed to the Apache Software Foundation (ASF) under one

// D3 specific formatting config
export const D3_FORMAT_DOCS = 'D3 format syntax: https://github.com/d3/d3-format'; // input choices & options
const D3_FORMAT_DOCS = 'D3 format syntax: https://github.com/d3/d3-format'; // input choices & options
export const D3_FORMAT_OPTIONS = [['SMART_NUMBER', 'Adaptative formating'], ['~g', 'Original value'], [',d', ',d (12345.432 => 12,345)'], ['.1s', '.1s (12345.432 => 10k)'], ['.3s', '.3s (12345.432 => 12.3k)'], [',.1%', ',.1% (12345.432 => 1,234,543.2%)'], ['.3%', '.3% (12345.432 => 1234543.200%)'], ['.4r', '.4r (12345.432 => 12350)'], [',.3f', ',.3f (12345.432 => 12,345.432)'], ['+,', '+, (12345.432 => +12,345.432)'], ['$,.2f', '$,.2f (12345.432 => $12,345.43)'], ['DURATION', 'Duration in ms (66000 => 1m 6s)'], ['DURATION_SUB', 'Duration in ms (100.40008 => 100ms 400µs 80ns)']];
export const D3_TIME_FORMAT_OPTIONS = [['smart_date', 'Adaptative formating'], ['%d/%m/%Y', '%d/%m/%Y | 14/01/2019'], ['%m/%d/%Y', '%m/%d/%Y | 01/14/2019'], ['%Y-%m-%d', '%Y-%m-%d | 2019-01-14'], ['%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M:%S | 2019-01-14 01:32:10'], ['%d-%m-%Y %H:%M:%S', '%Y-%m-%d %H:%M:%S | 14-01-2019 01:32:10'], ['%H:%M:%S', '%H:%M:%S | 01:32:10']];
exports.D3_FORMAT_DOCS = D3_FORMAT_DOCS;
const D3_FORMAT_OPTIONS = [['SMART_NUMBER', 'Adaptative formating'], ['~g', 'Original value'], [',d', ',d (12345.432 => 12,345)'], ['.1s', '.1s (12345.432 => 10k)'], ['.3s', '.3s (12345.432 => 12.3k)'], [',.1%', ',.1% (12345.432 => 1,234,543.2%)'], ['.3%', '.3% (12345.432 => 1234543.200%)'], ['.4r', '.4r (12345.432 => 12350)'], [',.3f', ',.3f (12345.432 => 12,345.432)'], ['+,', '+, (12345.432 => +12,345.432)'], ['$,.2f', '$,.2f (12345.432 => $12,345.43)'], ['DURATION', 'Duration in ms (66000 => 1m 6s)'], ['DURATION_SUB', 'Duration in ms (100.40008 => 100ms 400µs 80ns)']];
exports.D3_FORMAT_OPTIONS = D3_FORMAT_OPTIONS;
const D3_TIME_FORMAT_OPTIONS = [['smart_date', 'Adaptative formating'], ['%d/%m/%Y', '%d/%m/%Y | 14/01/2019'], ['%m/%d/%Y', '%m/%d/%Y | 01/14/2019'], ['%Y-%m-%d', '%Y-%m-%d | 2019-01-14'], ['%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M:%S | 2019-01-14 01:32:10'], ['%d-%m-%Y %H:%M:%S', '%Y-%m-%d %H:%M:%S | 14-01-2019 01:32:10'], ['%H:%M:%S', '%H:%M:%S | 01:32:10']];
exports.D3_TIME_FORMAT_OPTIONS = D3_TIME_FORMAT_OPTIONS;

@@ -1,4 +0,24 @@

import * as sectionModules from './sections';
export const sections = sectionModules;
export { D3_FORMAT_DOCS, D3_FORMAT_OPTIONS, D3_TIME_FORMAT_OPTIONS } from './D3Formatting';
export { formatSelectOptions, formatSelectOptionsForRange } from './selectOptions';
"use strict";
exports.__esModule = true;
exports.formatSelectOptionsForRange = exports.formatSelectOptions = exports.D3_TIME_FORMAT_OPTIONS = exports.D3_FORMAT_OPTIONS = exports.D3_FORMAT_DOCS = exports.sections = void 0;
var sectionModules = _interopRequireWildcard(require("./sections"));
var _D3Formatting = require("./D3Formatting");
exports.D3_FORMAT_DOCS = _D3Formatting.D3_FORMAT_DOCS;
exports.D3_FORMAT_OPTIONS = _D3Formatting.D3_FORMAT_OPTIONS;
exports.D3_TIME_FORMAT_OPTIONS = _D3Formatting.D3_TIME_FORMAT_OPTIONS;
var _selectOptions = require("./selectOptions");
exports.formatSelectOptions = _selectOptions.formatSelectOptions;
exports.formatSelectOptionsForRange = _selectOptions.formatSelectOptionsForRange;
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
const sections = sectionModules;
exports.sections = sections;

@@ -0,1 +1,8 @@

"use strict";
exports.__esModule = true;
exports.annotations = exports.sqlaTimeSeries = exports.colorScheme = exports.datasourceAndVizType = exports.druidTimeSeries = void 0;
var _translation = require("@superset-ui/translation");
/**

@@ -19,13 +26,13 @@ * Licensed to the Apache Software Foundation (ASF) under one

*/
import { t } from '@superset-ui/translation'; // A few standard controls sections that are used internally.
// A few standard controls sections that are used internally.
// Not recommended for use in third-party plugins.
export const druidTimeSeries = {
label: t('Time'),
const druidTimeSeries = {
label: (0, _translation.t)('Time'),
expanded: true,
description: t('Time related form attributes'),
description: (0, _translation.t)('Time related form attributes'),
controlSetRows: [['time_range']]
};
export const datasourceAndVizType = {
label: t('Datasource & Chart Type'),
exports.druidTimeSeries = druidTimeSeries;
const datasourceAndVizType = {
label: (0, _translation.t)('Datasource & Chart Type'),
expanded: true,

@@ -36,5 +43,5 @@ controlSetRows: [['datasource'], ['viz_type'], [{

type: 'HiddenControl',
label: t('Chart ID'),
label: (0, _translation.t)('Chart ID'),
hidden: true,
description: t('The id of the active chart')
description: (0, _translation.t)('The id of the active chart')
}

@@ -45,5 +52,5 @@ }, {

type: 'HiddenControl',
label: t('Cache Timeout (seconds)'),
label: (0, _translation.t)('Cache Timeout (seconds)'),
hidden: true,
description: t('The number of seconds before expiring the cache')
description: (0, _translation.t)('The number of seconds before expiring the cache')
}

@@ -54,5 +61,5 @@ }, {

type: 'HiddenControl',
label: t('URL Parameters'),
label: (0, _translation.t)('URL Parameters'),
hidden: true,
description: t('Extra parameters for use in jinja templated queries')
description: (0, _translation.t)('Extra parameters for use in jinja templated queries')
}

@@ -63,20 +70,23 @@ }, {

type: 'HiddenControl',
label: t('Time range endpoints'),
label: (0, _translation.t)('Time range endpoints'),
hidden: true,
description: t('Time range endpoints (SIP-15)')
description: (0, _translation.t)('Time range endpoints (SIP-15)')
}
}]]
};
export const colorScheme = {
label: t('Color Scheme'),
exports.datasourceAndVizType = datasourceAndVizType;
const colorScheme = {
label: (0, _translation.t)('Color Scheme'),
controlSetRows: [['color_scheme', 'label_colors']]
};
export const sqlaTimeSeries = {
label: t('Time'),
description: t('Time related form attributes'),
exports.colorScheme = colorScheme;
const sqlaTimeSeries = {
label: (0, _translation.t)('Time'),
description: (0, _translation.t)('Time related form attributes'),
expanded: true,
controlSetRows: [['granularity_sqla'], ['time_range']]
};
export const annotations = {
label: t('Annotations and Layers'),
exports.sqlaTimeSeries = sqlaTimeSeries;
const annotations = {
label: (0, _translation.t)('Annotations and Layers'),
tabOverride: 'data',

@@ -95,2 +105,3 @@ expanded: true,

}]]
};
};
exports.annotations = annotations;

@@ -0,1 +1,7 @@

"use strict";
exports.__esModule = true;
exports.formatSelectOptions = formatSelectOptions;
exports.formatSelectOptionsForRange = formatSelectOptionsForRange;
/**

@@ -22,3 +28,3 @@ * Licensed to the Apache Software Foundation (ASF) under one

/** Turns an array of string/number options into options for a select input */
export function formatSelectOptions(options) {
function formatSelectOptions(options) {
return options.map(opt => [opt, opt.toString()]);

@@ -32,3 +38,4 @@ }

export function formatSelectOptionsForRange(start, end) {
function formatSelectOptionsForRange(start, end) {
const options = [];

@@ -35,0 +42,0 @@

{
"name": "@superset-ui/control-utils",
"version": "0.13.1",
"version": "0.13.3",
"description": "Superset UI control-utils",

@@ -32,3 +32,3 @@ "sideEffects": false,

},
"gitHead": "695fd8b0b99c673ad7d9edb5b467085b0fe9a06e"
"gitHead": "f72e2d6e13333b55b5d6f1e2d7d5ccaec3868da6"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc