Skip to content

Commit

Permalink
feat(control-utils): better typing for control configs (apache#595)
Browse files Browse the repository at this point in the history
* feat(control-utils): better typing for control configs

* Optimize ControlPanelActions

* Add control panel config

* More robust typing for SelectControl

* Support formData, add typing for BigNumber
  • Loading branch information
ktmud authored and zhaoyongjie committed Nov 24, 2021
1 parent 2b3c44d commit c84c700
Show file tree
Hide file tree
Showing 8 changed files with 625 additions and 386 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
},
"peerDependencies": {
"@superset-ui/color": "^0.13.3",
"@superset-ui/query": "^0.13.27",
"@superset-ui/translation": "^0.13",
"@superset-ui/validator": "^0.13",
"react": "^16.13.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,14 @@
* specific language governing permissions and limitations
* under the License.
*/
/* eslint-disable camelcase */
import React from 'react';

import { ColumnTypeLabel } from './ColumnTypeLabel';
import InfoTooltipWithTrigger from './InfoTooltipWithTrigger';

export type ColumnOptionColumn = {
column_name: string;
groupby?: string;
verbose_name?: string;
description?: string;
expression?: string;
is_dttm?: boolean;
type?: string;
filterable?: boolean;
};
import { ColumnMeta } from './types';

export type ColumnOptionProps = {
column: ColumnOptionColumn;
column: ColumnMeta;
showType?: boolean;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ export const internalSharedControls = sharedControlsModule;
export const sections = sectionModules;
export { D3_FORMAT_DOCS, D3_FORMAT_OPTIONS, D3_TIME_FORMAT_OPTIONS } from './D3Formatting';
export { formatSelectOptions, formatSelectOptionsForRange } from './selectOptions';

export * from './InfoTooltipWithTrigger';
export * from './ColumnOption';
export * from './ColumnTypeLabel';
export * from './mainMetric';
export * from './MetricOption';
export * from './types';

0 comments on commit c84c700

Please sign in to comment.