@databrainhq/plugin 0.14.45 → 0.14.47

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.
Files changed (30) hide show
  1. package/dist/components/DateRangePicker/index.d.ts +7 -6
  2. package/dist/components/FilterDropDown/index.d.ts +6 -5
  3. package/dist/components/FilterField/index.d.ts +2 -0
  4. package/dist/components/FloatingDropDown/index.d.ts +2 -1
  5. package/dist/components/GlobalFilters/SearchField.d.ts +8 -0
  6. package/dist/components/Icons/icons.d.ts +1 -1
  7. package/dist/components/MetricFilterDropDown/components/OldMetricFilterComponents.d.ts +16 -0
  8. package/dist/components/MetricFilterDropDown/components/SearchField.d.ts +7 -0
  9. package/dist/components/MetricFilterDropDown/components/StringAutoCustomFilterField.d.ts +17 -0
  10. package/dist/components/MetricFilterDropDown/components/StringManualFilterField.d.ts +11 -0
  11. package/dist/components/MetricFilterDropDown/components/TimeFilterField.d.ts +11 -0
  12. package/dist/components/MetricFilterDropDown/components/VariableTimeFilterField.d.ts +11 -0
  13. package/dist/components/MetricFilterDropDown/index.d.ts +8 -7
  14. package/dist/components/PopoverMenu/index.d.ts +5 -0
  15. package/dist/components/SkeletonLoader/index.d.ts +2 -1
  16. package/dist/consts/api.d.ts +1 -1
  17. package/dist/consts/app.d.ts +28 -1
  18. package/dist/consts/metricOptions.d.ts +1 -0
  19. package/dist/helpers/adaptiveFormatter.d.ts +6 -0
  20. package/dist/helpers/getModifiedQuery.d.ts +14 -4
  21. package/dist/helpers/numberFormatter.d.ts +1 -0
  22. package/dist/helpers/tooltipFormatter.d.ts +1 -0
  23. package/dist/types/app.d.ts +3 -0
  24. package/dist/types/metricCreate.d.ts +6 -0
  25. package/dist/utils/getChartOptions.d.ts +24 -1
  26. package/dist/utils/getNoAxisChartOptions.d.ts +14 -0
  27. package/dist/webcomponents.es.js +54019 -53791
  28. package/dist/webcomponents.umd.js +218 -209
  29. package/package.json +1 -1
  30. package/dist/helpers/getTimeFilteredData.d.ts +0 -11
@@ -1,13 +1,14 @@
1
1
  import React from 'react';
2
+ export type DateOption = {
3
+ startDate: Date | undefined;
4
+ endDate: Date | undefined;
5
+ timeGrainValue: string;
6
+ value: string;
7
+ } | undefined;
2
8
  type Props = {
3
9
  label: string;
4
10
  placeholder?: string;
5
- onChange?: (option: {
6
- startDate: Date | undefined;
7
- endDate: Date | undefined;
8
- timeGrainValue: string;
9
- value: string;
10
- } | undefined) => void;
11
+ onChange?: (option: DateOption) => void;
11
12
  defaultValues?: {
12
13
  startDate: Date;
13
14
  endDate: Date;
@@ -2,15 +2,16 @@ import React from 'react';
2
2
  import { MultiSelectDropdownProps } from '@/components/MultiSelectDropdown';
3
3
  import { RlsFilterObjectType } from '@/types/app';
4
4
  import { FloatingDropDownProps } from '@/components/FloatingDropDown';
5
+ export type FilterClause = {
6
+ columnName?: string;
7
+ value?: string | string[];
8
+ as?: string;
9
+ };
5
10
  export type FilterDropDownProps = Omit<FloatingDropDownProps, 'options'> & {
6
11
  filter: Pick<RlsFilterObjectType, 'columnName' | 'tableName' | 'defaultValue' | 'value'>;
7
12
  autoSelected?: boolean;
8
13
  workspaceId: string;
9
- filterClause?: {
10
- columnName?: string;
11
- value?: string | string[];
12
- as?: string;
13
- }[];
14
+ filterClause?: FilterClause[];
14
15
  isDisableLabel?: boolean;
15
16
  customTable?: {
16
17
  query: string;
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { FloatingDropDownOption } from '@/types';
2
3
  export type FilterFieldType = {
3
4
  column: string;
4
5
  operator: string;
@@ -15,6 +16,7 @@ export type FilterFieldType = {
15
16
  isVariableFilter?: boolean;
16
17
  variableStrings?: string[];
17
18
  label: string;
19
+ filterVariant?: FloatingDropDownOption;
18
20
  };
19
21
  export type FilterFieldProps = {
20
22
  tableName: string;
@@ -19,5 +19,6 @@ export type FloatingDropDownProps = {
19
19
  disableAutoClose?: boolean;
20
20
  radius?: string;
21
21
  isFilter?: boolean;
22
+ isClearEnabled?: boolean;
22
23
  };
23
- export declare const FloatingDropDown: ({ label, labelVariant, selectedOption, onChange, button, options, isDisabled, customButton, icon, buttonWidth, menuWidth, isSearchEnabled, searchPlaceholder, placeholder, children, radius, isFilter, disableAutoClose, }: FloatingDropDownProps) => React.JSX.Element;
24
+ export declare const FloatingDropDown: ({ label, labelVariant, selectedOption, onChange, button, options, isDisabled, customButton, icon, buttonWidth, menuWidth, isSearchEnabled, searchPlaceholder, placeholder, children, radius, isFilter, disableAutoClose, isClearEnabled, }: FloatingDropDownProps) => React.JSX.Element;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { GlobalFilterColumn } from '@/types';
3
+ type SearchFieldProps = {
4
+ column: GlobalFilterColumn;
5
+ onClickSearch: (value: string | undefined) => void;
6
+ };
7
+ declare const SearchField: ({ column, onClickSearch }: SearchFieldProps) => React.JSX.Element;
8
+ export default SearchField;