@evoke-platform/ui-components 1.4.0-testing.5 → 1.4.0-testing.7
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.
- package/dist/published/components/core/Chip/Chip.d.ts +2 -5
- package/dist/published/components/core/Chip/Chip.js +3 -6
- package/dist/published/components/custom/CriteriaBuilder/CriteriaBuilder.d.ts +0 -1
- package/dist/published/components/custom/CriteriaBuilder/CriteriaBuilder.js +2 -3
- package/dist/published/stories/Chip.stories.d.ts +3 -4
- package/dist/published/stories/Chip.stories.js +2 -4
- package/package.json +1 -1
@@ -1,7 +1,4 @@
|
|
1
|
-
import { ChipProps
|
1
|
+
import { ChipProps } from '@mui/material';
|
2
2
|
import React from 'react';
|
3
|
-
|
4
|
-
tooltip?: string;
|
5
|
-
}
|
6
|
-
declare const Chip: ({ tooltip, ...props }: ChipProps) => React.JSX.Element;
|
3
|
+
declare const Chip: (props: ChipProps) => React.JSX.Element;
|
7
4
|
export default Chip;
|
@@ -1,11 +1,8 @@
|
|
1
1
|
import { Chip as MUIChip } from '@mui/material';
|
2
2
|
import React from 'react';
|
3
|
-
import
|
4
|
-
const Chip = (
|
5
|
-
|
6
|
-
return React.createElement(MUIChip, { ...props });
|
7
|
-
}
|
8
|
-
return (React.createElement(Tooltip, { title: tooltip },
|
3
|
+
import UIThemeProvider from '../../../theme';
|
4
|
+
const Chip = (props) => {
|
5
|
+
return (React.createElement(UIThemeProvider, null,
|
9
6
|
React.createElement(MUIChip, { ...props })));
|
10
7
|
};
|
11
8
|
export default Chip;
|
@@ -26,7 +26,6 @@ export type CriteriaInputProps = {
|
|
26
26
|
fetchObject?: (objectId: string) => Promise<EvokeObject | undefined>;
|
27
27
|
object: TreeViewObject;
|
28
28
|
};
|
29
|
-
rootObject?: EvokeObject;
|
30
29
|
/**
|
31
30
|
* String matching operators ('contains', 'beginsWith', 'endsWith') use regex patterns.
|
32
31
|
* Special characters like .*+?^${}()|[] are escaped (\\) by default.
|
@@ -124,7 +124,7 @@ const customSelector = (props) => {
|
|
124
124
|
.map((option) => ({ name: option.name, label: option.label }));
|
125
125
|
val = val === '=' ? '' : options.find((option) => option.name === val).name;
|
126
126
|
}
|
127
|
-
else if (inputType === 'document') {
|
127
|
+
else if (inputType === 'document' || inputType === 'criteria') {
|
128
128
|
opts = options
|
129
129
|
.filter((option) => ['null', 'notNull'].includes(option.name))
|
130
130
|
.map((option) => ({ name: option.name, label: option.label }));
|
@@ -265,7 +265,7 @@ export const valueEditor = (props) => {
|
|
265
265
|
return ValueEditor(props);
|
266
266
|
};
|
267
267
|
const CriteriaBuilder = (props) => {
|
268
|
-
const { properties, criteria, setCriteria, originalCriteria, enablePresetValues, presetValues, operators, disabled, disabledCriteria, hideBorder, presetGroupLabel, customValueEditor, treeViewOpts, disableRegexEscapeChars,
|
268
|
+
const { properties, criteria, setCriteria, originalCriteria, enablePresetValues, presetValues, operators, disabled, disabledCriteria, hideBorder, presetGroupLabel, customValueEditor, treeViewOpts, disableRegexEscapeChars, } = props;
|
269
269
|
const [query, setQuery] = useState(undefined);
|
270
270
|
const [propertyTreeMap, setPropertyTreeMap] = useState();
|
271
271
|
useEffect(() => {
|
@@ -483,7 +483,6 @@ const CriteriaBuilder = (props) => {
|
|
483
483
|
valueEditor: customValueEditor ? customValueEditor.component : valueEditor,
|
484
484
|
}, context: {
|
485
485
|
...(customValueEditor?.props ?? {}),
|
486
|
-
rootObject,
|
487
486
|
presetValues,
|
488
487
|
enablePresetValues,
|
489
488
|
presetGroupLabel,
|
@@ -1,7 +1,6 @@
|
|
1
|
+
import { ChipProps } from '@mui/material';
|
1
2
|
import { ComponentMeta, ComponentStory } from '@storybook/react';
|
2
3
|
import React from 'react';
|
3
|
-
|
4
|
-
declare const _default: ComponentMeta<({ tooltip, ...props }: ChipProps) => React.JSX.Element>;
|
4
|
+
declare const _default: ComponentMeta<(props: ChipProps<"div", {}>) => React.JSX.Element>;
|
5
5
|
export default _default;
|
6
|
-
export declare const
|
7
|
-
export declare const Chip: ComponentStory<({ tooltip, ...props }: ChipProps) => React.JSX.Element>;
|
6
|
+
export declare const Chip: ComponentStory<(props: ChipProps<"div", {}>) => React.JSX.Element>;
|
@@ -1,10 +1,8 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { Chip as CustomChip } from '../index';
|
3
3
|
export default {
|
4
|
-
|
4
|
+
title: 'Data Display/Chip',
|
5
5
|
component: CustomChip,
|
6
6
|
};
|
7
|
-
const ChipTemplate = (args) =>
|
8
|
-
const ChipWithToolipTemplate = (args) => (React.createElement(CustomChip, { tooltip: "Here is a tooltip", label: "Chip with Tooltip", ...args }));
|
9
|
-
export const ChipWithTooltip = ChipWithToolipTemplate.bind({});
|
7
|
+
const ChipTemplate = (args) => React.createElement(CustomChip, { ...args });
|
10
8
|
export const Chip = ChipTemplate.bind({});
|