UNPKG

baseui

Version:

A React Component library implementing the Base design language

55 lines (50 loc) 1.69 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SORT_DIRECTIONS = exports.NUMERICAL_FORMATS = exports.MAX_BIN_COUNT = exports.HISTOGRAM_SIZE = exports.FILTER_SHELL_WIDTH = exports.DATETIME_OPERATIONS = exports.COLUMNS = void 0; /* Copyright (c) Uber Technologies, Inc. This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree. */ const COLUMNS = exports.COLUMNS = Object.freeze({ ANCHOR: 'ANCHOR', BOOLEAN: 'BOOLEAN', CATEGORICAL: 'CATEGORICAL', CUSTOM: 'CUSTOM', DATETIME: 'DATETIME', NUMERICAL: 'NUMERICAL', ROW_INDEX: 'ROW_INDEX', STRING: 'STRING' }); const NUMERICAL_FORMATS = exports.NUMERICAL_FORMATS = Object.freeze({ DEFAULT: 'DEFAULT', ACCOUNTING: 'ACCOUNTING', PERCENTAGE: 'PERCENTAGE' }); const DATETIME_OPERATIONS = exports.DATETIME_OPERATIONS = Object.freeze({ RANGE_DATETIME: 'RANGE_DATETIME', RANGE_DATE: 'RANGE_DATE', RANGE_TIME: 'RANGE_TIME', WEEKDAY: 'WEEKDAY', MONTH: 'MONTH', QUARTER: 'QUARTER', HALF: 'HALF', YEAR: 'YEAR' }); const SORT_DIRECTIONS = exports.SORT_DIRECTIONS = Object.freeze({ ASC: 'ASC', DESC: 'DESC' }); // If modifying this, take a look at the histogram and adjust. see HISTOGRAM_SIZE const FILTER_SHELL_WIDTH = exports.FILTER_SHELL_WIDTH = '320px'; // Depends on FILTER_SHELL_WIDTH const HISTOGRAM_SIZE = exports.HISTOGRAM_SIZE = { width: 308, height: 120 }; // Arguably visually appealing within the given width. // Smaller and we don't have enough detail per bar. // Larger and the bars are too granular and don't align well with the slider steps const MAX_BIN_COUNT = exports.MAX_BIN_COUNT = 50;