@gisce/react-ooui 1.2.0-rc.79 → 1.2.0-rc.81
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/README.md +0 -6
- package/dist/actionbar/ActionButton.d.ts +2 -2
- package/dist/actionbar/ActionButton.d.ts.map +1 -1
- package/dist/actionbar/AttachmentsButton.d.ts +2 -2
- package/dist/actionbar/AttachmentsButton.d.ts.map +1 -1
- package/dist/actionbar/AttachmentsButtonWrapper.d.ts +2 -2
- package/dist/actionbar/AttachmentsButtonWrapper.d.ts.map +1 -1
- package/dist/actionbar/ButtonWithBadge.d.ts +2 -2
- package/dist/actionbar/ButtonWithBadge.d.ts.map +1 -1
- package/dist/actionbar/ChangeViewButton.d.ts +2 -2
- package/dist/actionbar/ChangeViewButton.d.ts.map +1 -1
- package/dist/actionbar/DashboardActionBar.d.ts +2 -2
- package/dist/actionbar/DashboardActionBar.d.ts.map +1 -1
- package/dist/actionbar/DropdownButton.d.ts +2 -2
- package/dist/actionbar/DropdownButton.d.ts.map +1 -1
- package/dist/actionbar/FormActionBar.d.ts +2 -2
- package/dist/actionbar/FormActionBar.d.ts.map +1 -1
- package/dist/actionbar/GraphActionBar.d.ts +2 -2
- package/dist/actionbar/GraphActionBar.d.ts.map +1 -1
- package/dist/actionbar/NewButton.d.ts +2 -2
- package/dist/actionbar/NewButton.d.ts.map +1 -1
- package/dist/actionbar/SearchBar.d.ts +2 -2
- package/dist/actionbar/SearchBar.d.ts.map +1 -1
- package/dist/actionbar/TreeActionBar.d.ts +2 -2
- package/dist/actionbar/TreeActionBar.d.ts.map +1 -1
- package/dist/common/ButtonWithTooltip.d.ts +2 -2
- package/dist/common/ButtonWithTooltip.d.ts.map +1 -1
- package/dist/common/DatePicker.d.ts +2 -2
- package/dist/common/DatePicker.d.ts.map +1 -1
- package/dist/common/Field.d.ts +1 -1
- package/dist/common/Field.d.ts.map +1 -1
- package/dist/context/ConfigContext.d.ts +7 -0
- package/dist/context/ConfigContext.d.ts.map +1 -0
- package/dist/context/ContentRootContext.d.ts.map +1 -1
- package/dist/helpers/iconMapper.d.ts +10 -5
- package/dist/helpers/iconMapper.d.ts.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/react-ooui.es.js +19554 -19286
- package/dist/react-ooui.es.js.map +1 -1
- package/dist/react-ooui.umd.js +170 -69
- package/dist/react-ooui.umd.js.map +1 -1
- package/dist/ui/ErrorAlert.d.ts +2 -2
- package/dist/ui/ErrorAlert.d.ts.map +1 -1
- package/dist/ui/FavouriteButton.d.ts +2 -2
- package/dist/ui/FavouriteButton.d.ts.map +1 -1
- package/dist/ui/GoToResourceModal.d.ts +2 -2
- package/dist/ui/GoToResourceModal.d.ts.map +1 -1
- package/dist/ui/TitleHeader.d.ts +2 -2
- package/dist/ui/TitleHeader.d.ts.map +1 -1
- package/dist/views/CurrentTabContent.d.ts +2 -2
- package/dist/views/CurrentTabContent.d.ts.map +1 -1
- package/dist/views/TabContent.d.ts +1 -1
- package/dist/views/TabContent.d.ts.map +1 -1
- package/dist/views/TabSelector.d.ts +2 -2
- package/dist/views/TabSelector.d.ts.map +1 -1
- package/dist/views/actionViews/DashboardActionView.d.ts +2 -2
- package/dist/views/actionViews/DashboardActionView.d.ts.map +1 -1
- package/dist/views/actionViews/FormActionView.d.ts +2 -2
- package/dist/views/actionViews/FormActionView.d.ts.map +1 -1
- package/dist/views/actionViews/GraphActionView.d.ts +2 -2
- package/dist/views/actionViews/GraphActionView.d.ts.map +1 -1
- package/dist/views/actionViews/TreeActionView.d.ts +2 -2
- package/dist/views/actionViews/TreeActionView.d.ts.map +1 -1
- package/dist/views/tabs/Tab.d.ts +2 -2
- package/dist/views/tabs/Tab.d.ts.map +1 -1
- package/dist/widgets/base/Binary.d.ts +3 -3
- package/dist/widgets/base/Binary.d.ts.map +1 -1
- package/dist/widgets/base/Boolean.d.ts +2 -2
- package/dist/widgets/base/Boolean.d.ts.map +1 -1
- package/dist/widgets/base/Button.d.ts +2 -2
- package/dist/widgets/base/Button.d.ts.map +1 -1
- package/dist/widgets/base/Char.d.ts +2 -2
- package/dist/widgets/base/Char.d.ts.map +1 -1
- package/dist/widgets/base/Date.d.ts +2 -2
- package/dist/widgets/base/Date.d.ts.map +1 -1
- package/dist/widgets/base/DateTime.d.ts +2 -2
- package/dist/widgets/base/DateTime.d.ts.map +1 -1
- package/dist/widgets/base/Email.d.ts +2 -2
- package/dist/widgets/base/Email.d.ts.map +1 -1
- package/dist/widgets/base/Float.d.ts +2 -2
- package/dist/widgets/base/Float.d.ts.map +1 -1
- package/dist/widgets/base/FloatTime.d.ts +1 -1
- package/dist/widgets/base/FloatTime.d.ts.map +1 -1
- package/dist/widgets/base/Image.d.ts +3 -3
- package/dist/widgets/base/Image.d.ts.map +1 -1
- package/dist/widgets/base/Integer.d.ts +2 -2
- package/dist/widgets/base/Integer.d.ts.map +1 -1
- package/dist/widgets/base/Label.d.ts +2 -2
- package/dist/widgets/base/Label.d.ts.map +1 -1
- package/dist/widgets/base/LinkInput.d.ts +2 -2
- package/dist/widgets/base/LinkInput.d.ts.map +1 -1
- package/dist/widgets/base/MultiSelection.d.ts +3 -3
- package/dist/widgets/base/MultiSelection.d.ts.map +1 -1
- package/dist/widgets/base/ProgressBar.d.ts +3 -3
- package/dist/widgets/base/ProgressBar.d.ts.map +1 -1
- package/dist/widgets/base/Reference.d.ts +1 -1
- package/dist/widgets/base/Reference.d.ts.map +1 -1
- package/dist/widgets/base/Selection.d.ts +3 -3
- package/dist/widgets/base/Selection.d.ts.map +1 -1
- package/dist/widgets/base/Separator.d.ts +2 -2
- package/dist/widgets/base/Separator.d.ts.map +1 -1
- package/dist/widgets/base/Text.d.ts +2 -2
- package/dist/widgets/base/Text.d.ts.map +1 -1
- package/dist/widgets/base/Url.d.ts +2 -2
- package/dist/widgets/base/Url.d.ts.map +1 -1
- package/dist/widgets/base/many2one/Many2one.d.ts +1 -1
- package/dist/widgets/base/many2one/Many2one.d.ts.map +1 -1
- package/dist/widgets/base/many2one/Many2oneSuffix.d.ts +2 -2
- package/dist/widgets/base/many2one/Many2oneSuffix.d.ts.map +1 -1
- package/dist/widgets/base/many2one/Many2oneSuffixModal.d.ts +2 -2
- package/dist/widgets/base/many2one/Many2oneSuffixModal.d.ts.map +1 -1
- package/dist/widgets/base/one2many/One2many.d.ts +2 -2
- package/dist/widgets/base/one2many/One2many.d.ts.map +1 -1
- package/dist/widgets/base/one2many/One2manyTopBar.d.ts +2 -2
- package/dist/widgets/base/one2many/One2manyTopBar.d.ts.map +1 -1
- package/dist/widgets/custom/ButtonGroup.d.ts +2 -2
- package/dist/widgets/custom/ButtonGroup.d.ts.map +1 -1
- package/dist/widgets/custom/CodeEditor.d.ts +2 -2
- package/dist/widgets/custom/CodeEditor.d.ts.map +1 -1
- package/dist/widgets/custom/FiberGrid.d.ts +3 -3
- package/dist/widgets/custom/FiberGrid.d.ts.map +1 -1
- package/dist/widgets/custom/Indicator.d.ts +2 -2
- package/dist/widgets/custom/Indicator.d.ts.map +1 -1
- package/dist/widgets/custom/Markdown.d.ts +3 -3
- package/dist/widgets/custom/Markdown.d.ts.map +1 -1
- package/dist/widgets/custom/MultiCheckbox.d.ts +3 -3
- package/dist/widgets/custom/MultiCheckbox.d.ts.map +1 -1
- package/dist/widgets/custom/Radio.d.ts +3 -3
- package/dist/widgets/custom/Radio.d.ts.map +1 -1
- package/dist/widgets/custom/Steps.d.ts +3 -3
- package/dist/widgets/custom/Steps.d.ts.map +1 -1
- package/dist/widgets/custom/Switch.d.ts +2 -2
- package/dist/widgets/custom/Switch.d.ts.map +1 -1
- package/dist/widgets/custom/Tag.d.ts +3 -3
- package/dist/widgets/custom/Tag.d.ts.map +1 -1
- package/dist/widgets/custom/Tags.d.ts +3 -3
- package/dist/widgets/custom/Tags.d.ts.map +1 -1
- package/dist/widgets/custom/Timeline.d.ts +3 -3
- package/dist/widgets/custom/Timeline.d.ts.map +1 -1
- package/dist/widgets/modals/ExportModal.d.ts +2 -2
- package/dist/widgets/modals/ExportModal.d.ts.map +1 -1
- package/dist/widgets/modals/FormModal.d.ts +2 -2
- package/dist/widgets/modals/FormModal.d.ts.map +1 -1
- package/dist/widgets/modals/SearchModal.d.ts +2 -2
- package/dist/widgets/modals/SearchModal.d.ts.map +1 -1
- package/dist/widgets/modals/TranslationModal.d.ts +2 -2
- package/dist/widgets/modals/TranslationModal.d.ts.map +1 -1
- package/dist/widgets/views/Dashboard/DashboardForm.d.ts +2 -2
- package/dist/widgets/views/Dashboard/DashboardForm.d.ts.map +1 -1
- package/dist/widgets/views/Dashboard/DashboardTree.d.ts +2 -2
- package/dist/widgets/views/Dashboard/DashboardTree.d.ts.map +1 -1
- package/dist/widgets/views/DashboardGrid/DashboardGrid.d.ts +2 -2
- package/dist/widgets/views/DashboardGrid/DashboardGrid.d.ts.map +1 -1
- package/dist/widgets/views/DashboardGrid/DashboardGridItem.d.ts +2 -2
- package/dist/widgets/views/DashboardGrid/DashboardGridItem.d.ts.map +1 -1
- package/dist/widgets/views/Graph/GraphChart.d.ts +2 -2
- package/dist/widgets/views/Graph/GraphChart.d.ts.map +1 -1
- package/dist/widgets/views/Graph/GraphIndicator.d.ts +2 -2
- package/dist/widgets/views/Graph/GraphIndicator.d.ts.map +1 -1
- package/dist/widgets/views/searchFilter/DateRangePicker.d.ts +2 -2
- package/dist/widgets/views/searchFilter/DateRangePicker.d.ts.map +1 -1
- package/dist/widgets/views/searchFilter/DateTimeRangePicker.d.ts +2 -2
- package/dist/widgets/views/searchFilter/DateTimeRangePicker.d.ts.map +1 -1
- package/dist/widgets/views/searchFilter/SearchField.d.ts +2 -2
- package/dist/widgets/views/searchFilter/SearchField.d.ts.map +1 -1
- package/dist/widgets/views/searchFilter/SearchFilter.d.ts +2 -2
- package/dist/widgets/views/searchFilter/SearchFilter.d.ts.map +1 -1
- package/package.json +5 -9
- package/src/__tests__/searchFilterHelper.spec.ts +7 -7
- package/src/actionbar/AttachmentsButton.tsx +22 -24
- package/src/actionbar/ButtonWithBadge.tsx +5 -2
- package/src/actionbar/ChangeViewButton.tsx +10 -2
- package/src/actionbar/TreeActionBar.tsx +82 -75
- package/src/common/DatePicker.tsx +14 -10
- package/src/context/ConfigContext.tsx +9 -0
- package/src/context/ContentRootContext.tsx +46 -48
- package/src/helpers/iconMapper.ts +13 -7
- package/src/index.ts +2 -0
- package/src/stories/Binary.stories.tsx +4 -1
- package/src/stories/Boolean.stories.tsx +4 -1
- package/src/stories/Button.stories.tsx +4 -1
- package/src/stories/Char.stories.tsx +4 -1
- package/src/stories/FiberGrid.stories.tsx +4 -1
- package/src/stories/Float.stories.tsx +4 -1
- package/src/stories/FloatTime.stories.tsx +4 -1
- package/src/stories/Image.stories.tsx +4 -1
- package/src/stories/Integer.stories.tsx +4 -1
- package/src/stories/Label.stories.tsx +4 -1
- package/src/stories/Many2one.stories.tsx +4 -1
- package/src/stories/One2many.stories.tsx +4 -1
- package/src/stories/ProgressBar.stories.tsx +4 -1
- package/src/stories/Reference.stories.tsx +4 -1
- package/src/stories/Selection.stories.tsx +4 -1
- package/src/stories/Separator.stories.tsx +4 -1
- package/src/stories/Text.stories.tsx +4 -1
- package/src/stories/containers/Group.stories.tsx +4 -1
- package/src/stories/containers/NewLine.stories.tsx +4 -1
- package/src/stories/containers/Notebook.stories.tsx +4 -1
- package/src/stories/custom/ButtonGroup.stories.tsx +4 -1
- package/src/stories/custom/CodeEditor.stories.tsx +4 -1
- package/src/stories/custom/Indicator.stories.tsx +4 -1
- package/src/stories/custom/Markdown.stories.tsx +4 -1
- package/src/stories/custom/MultiCheckbox.stories.tsx +4 -1
- package/src/stories/custom/Radio.stories.tsx +4 -1
- package/src/stories/custom/Steps.stories.tsx +4 -1
- package/src/stories/custom/Switch.stories.tsx +4 -1
- package/src/stories/custom/Tag.stories.tsx +4 -1
- package/src/stories/custom/Tags.stories.tsx +4 -1
- package/src/stories/forms/PreferencesForm.stories.tsx +4 -1
- package/src/stories/ui/ActionBar.stories.tsx +2 -1
- package/src/stories/ui/FavouriteButton.stories.tsx +2 -1
- package/src/stories/ui/GoToResourceModal.stories.tsx +2 -1
- package/src/stories/views/SearchTree.stories.tsx +3 -1
- package/src/stories/views/Tab.stories.tsx +3 -1
- package/src/stories/views/TabsAndContent.stories.tsx +3 -1
- package/src/stories/views/Tree.stories.jsx +4 -1
- package/src/stories/views/searchFilter/DateRangePicker.stories.tsx +3 -1
- package/src/stories/views/searchFilter/DateTimeRangePicker.stories.tsx +4 -1
- package/src/stories/views/searchFilter/PairFields.stories.tsx +4 -1
- package/src/stories/views/searchFilter/SearchFilter.stories.tsx +4 -1
- package/src/stories/views/searchFilter/examples/PartnersSearchFilter.stories.tsx +4 -1
- package/src/ui/FavouriteButton.tsx +16 -5
- package/src/ui/GoToResourceModal.tsx +3 -3
- package/src/ui/TitleHeader.tsx +18 -4
- package/src/views/tabs/Tab.tsx +12 -6
- package/src/widgets/base/Binary.tsx +8 -5
- package/src/widgets/base/Boolean.tsx +8 -7
- package/src/widgets/base/Char.tsx +14 -12
- package/src/widgets/base/Float.tsx +11 -5
- package/src/widgets/base/FloatTime.tsx +9 -5
- package/src/widgets/base/Integer.tsx +9 -5
- package/src/widgets/base/Label.tsx +6 -2
- package/src/widgets/base/LinkInput.tsx +11 -6
- package/src/widgets/base/MultiSelection.tsx +6 -2
- package/src/widgets/base/Selection.tsx +6 -2
- package/src/widgets/base/Text.tsx +14 -12
- package/src/widgets/base/many2one/Many2one.tsx +15 -12
- package/src/widgets/base/many2one/Many2oneSuffixModal.tsx +3 -3
- package/src/widgets/base/one2many/One2manyTopBar.tsx +10 -1
- package/src/widgets/custom/FiberGrid.tsx +1 -4
- package/src/widgets/custom/Indicator.tsx +16 -15
- package/src/widgets/modals/FormModal.tsx +3 -3
- package/src/widgets/modals/SearchModal.tsx +29 -31
- package/src/widgets/modals/TranslationModal.tsx +3 -3
- package/src/widgets/views/DashboardGrid/DashboardGridItem.tsx +10 -6
- package/src/widgets/views/Graph/GraphDefaults.ts +3 -3
- package/src/widgets/views/Tree.tsx +4 -4
- package/src/widgets/views/searchFilter/SearchFilter.tsx +5 -2
- package/dist/Config.d.ts +0 -6
- package/dist/Config.d.ts.map +0 -1
- package/src/Config.ts +0 -4
- /package/dist/{main.css → style.css} +0 -0
|
@@ -11,6 +11,8 @@ import {
|
|
|
11
11
|
ApiOutlined,
|
|
12
12
|
} from "@ant-design/icons";
|
|
13
13
|
import { ViewType } from "@/types";
|
|
14
|
+
import { theme } from "antd";
|
|
15
|
+
const { useToken } = theme;
|
|
14
16
|
|
|
15
17
|
type One2manyTopBarProps = {
|
|
16
18
|
title: string;
|
|
@@ -49,6 +51,7 @@ export const One2manyTopBar = (props: One2manyTopBarProps) => {
|
|
|
49
51
|
showCreateButton,
|
|
50
52
|
showToggleButton,
|
|
51
53
|
} = props;
|
|
54
|
+
const { token } = useToken();
|
|
52
55
|
|
|
53
56
|
function separator() {
|
|
54
57
|
return <div className="inline-block w-3" />;
|
|
@@ -56,7 +59,13 @@ export const One2manyTopBar = (props: One2manyTopBarProps) => {
|
|
|
56
59
|
|
|
57
60
|
function title() {
|
|
58
61
|
return (
|
|
59
|
-
<div
|
|
62
|
+
<div
|
|
63
|
+
className="flex flex-grow h-8 text-white"
|
|
64
|
+
style={{
|
|
65
|
+
borderRadius: token.borderRadius,
|
|
66
|
+
backgroundColor: token.colorPrimaryActive,
|
|
67
|
+
}}
|
|
68
|
+
>
|
|
60
69
|
<div className="flex flex-col items-center justify-center h-full">
|
|
61
70
|
<span className="pl-2 font-bold">{titleString}</span>
|
|
62
71
|
</div>
|
|
@@ -2,14 +2,11 @@ import React from "react";
|
|
|
2
2
|
import Field from "@/common/Field";
|
|
3
3
|
import { Char as CharOoui } from "@gisce/ooui";
|
|
4
4
|
import { WidgetProps } from "@/types";
|
|
5
|
-
import Config from "@/Config";
|
|
6
5
|
import { GridUi } from "fiber-diagram";
|
|
7
6
|
|
|
8
7
|
export const FiberGrid = (props: WidgetProps) => {
|
|
9
8
|
const { ooui } = props;
|
|
10
|
-
const {
|
|
11
|
-
// const requiredClass =
|
|
12
|
-
// required && !readOnly ? Config.requiredClass : undefined;
|
|
9
|
+
const { required } = ooui as CharOoui;
|
|
13
10
|
|
|
14
11
|
return (
|
|
15
12
|
<Field required={required} {...props}>
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { Tooltip } from "antd";
|
|
2
|
+
import { Tooltip, theme } from "antd";
|
|
3
3
|
import { Statistic, Card } from "antd";
|
|
4
4
|
import { Indicator as IndicatorOoui } from "@gisce/ooui";
|
|
5
5
|
import { WidgetProps } from "@/types";
|
|
6
6
|
import Field from "@/common/Field";
|
|
7
|
-
import {QuestionCircleOutlined} from "@ant-design/icons";
|
|
7
|
+
import { QuestionCircleOutlined } from "@ant-design/icons";
|
|
8
8
|
import iconMapper from "@/helpers/iconMapper";
|
|
9
|
+
const { useToken } = theme;
|
|
9
10
|
|
|
10
11
|
type IndicatorProps = WidgetProps & {
|
|
11
|
-
ooui: IndicatorOoui
|
|
12
|
+
ooui: IndicatorOoui;
|
|
12
13
|
value?: number;
|
|
13
14
|
};
|
|
14
15
|
|
|
@@ -25,18 +26,22 @@ export const Indicator = (props: IndicatorProps) => {
|
|
|
25
26
|
type IndicatorInputProps = {
|
|
26
27
|
ooui: IndicatorOoui;
|
|
27
28
|
value?: any;
|
|
28
|
-
}
|
|
29
|
+
};
|
|
29
30
|
|
|
30
31
|
const IndicatorInput = (props: IndicatorInputProps) => {
|
|
32
|
+
const { token } = useToken();
|
|
31
33
|
const { ooui, value } = props;
|
|
32
34
|
const title = (
|
|
33
35
|
<>
|
|
34
36
|
<span>{ooui.label} </span>
|
|
35
|
-
{ooui.tooltip &&
|
|
37
|
+
{ooui.tooltip && (
|
|
36
38
|
<Tooltip title={ooui.tooltip}>
|
|
37
|
-
<QuestionCircleOutlined
|
|
39
|
+
<QuestionCircleOutlined
|
|
40
|
+
className="pr-1 text-xs"
|
|
41
|
+
style={{ color: token.colorPrimaryBg }}
|
|
42
|
+
/>
|
|
38
43
|
</Tooltip>
|
|
39
|
-
}
|
|
44
|
+
)}
|
|
40
45
|
</>
|
|
41
46
|
);
|
|
42
47
|
const Icon: React.ElementType = iconMapper(ooui.icon) as any;
|
|
@@ -49,18 +54,14 @@ const IndicatorInput = (props: IndicatorInputProps) => {
|
|
|
49
54
|
const field = (
|
|
50
55
|
<Statistic
|
|
51
56
|
title={title}
|
|
52
|
-
prefix={Icon && <Icon/>}
|
|
57
|
+
prefix={Icon && <Icon />}
|
|
53
58
|
suffix={ooui.suffix}
|
|
54
59
|
value={formattedValue}
|
|
55
60
|
/>
|
|
56
|
-
)
|
|
61
|
+
);
|
|
57
62
|
if (ooui.card) {
|
|
58
|
-
return
|
|
59
|
-
<Card>
|
|
60
|
-
{field}
|
|
61
|
-
</Card>
|
|
62
|
-
);
|
|
63
|
+
return <Card>{field}</Card>;
|
|
63
64
|
} else {
|
|
64
65
|
return field;
|
|
65
66
|
}
|
|
66
|
-
}
|
|
67
|
+
};
|
|
@@ -96,12 +96,12 @@ export const FormModal = (props: FormModalProps) => {
|
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
return (
|
|
99
|
-
<FormModalProvider setTitle={setFormTitle}>
|
|
99
|
+
(<FormModalProvider setTitle={setFormTitle}>
|
|
100
100
|
<Modal
|
|
101
101
|
title={isMenuAction ? header() : formTitle}
|
|
102
102
|
centered
|
|
103
103
|
width={modalWidth}
|
|
104
|
-
|
|
104
|
+
open={visible}
|
|
105
105
|
footer={null}
|
|
106
106
|
destroyOnClose
|
|
107
107
|
onCancel={onCancel}
|
|
@@ -115,6 +115,6 @@ export const FormModal = (props: FormModalProps) => {
|
|
|
115
115
|
{...rest}
|
|
116
116
|
/>
|
|
117
117
|
</Modal>
|
|
118
|
-
</FormModalProvider>
|
|
118
|
+
</FormModalProvider>)
|
|
119
119
|
);
|
|
120
120
|
};
|
|
@@ -98,35 +98,33 @@ export const SearchModal = (props: SearchSelectionProps) => {
|
|
|
98
98
|
);
|
|
99
99
|
};
|
|
100
100
|
|
|
101
|
-
return (
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
</>
|
|
131
|
-
);
|
|
101
|
+
return (<>
|
|
102
|
+
<Modal
|
|
103
|
+
title={t("search")}
|
|
104
|
+
centered
|
|
105
|
+
width={modalWidth}
|
|
106
|
+
open={visible && !showCreateModal}
|
|
107
|
+
closable={true}
|
|
108
|
+
onCancel={onCloseModal}
|
|
109
|
+
footer={null}
|
|
110
|
+
destroyOnClose
|
|
111
|
+
maskClosable={false}
|
|
112
|
+
>
|
|
113
|
+
{content()}
|
|
114
|
+
</Modal>
|
|
115
|
+
<FormModal
|
|
116
|
+
model={model}
|
|
117
|
+
visible={showCreateModal}
|
|
118
|
+
parentContext={context}
|
|
119
|
+
onSubmitSucceed={(id?: number) => {
|
|
120
|
+
setShowCreateModal(false);
|
|
121
|
+
onCloseModal();
|
|
122
|
+
onSelectValues([id!]);
|
|
123
|
+
}}
|
|
124
|
+
onCancel={() => {
|
|
125
|
+
setShowCreateModal(false);
|
|
126
|
+
onCloseModal();
|
|
127
|
+
}}
|
|
128
|
+
/>
|
|
129
|
+
</>);
|
|
132
130
|
};
|
|
@@ -185,11 +185,11 @@ export const TranslationModal = (props: TranslationModalProps) => {
|
|
|
185
185
|
}
|
|
186
186
|
|
|
187
187
|
return (
|
|
188
|
-
<Modal
|
|
188
|
+
(<Modal
|
|
189
189
|
title={t("translate")}
|
|
190
190
|
centered
|
|
191
191
|
width={modalWidth}
|
|
192
|
-
|
|
192
|
+
open={visible}
|
|
193
193
|
closable={true}
|
|
194
194
|
onCancel={onCloseModal}
|
|
195
195
|
footer={null}
|
|
@@ -197,6 +197,6 @@ export const TranslationModal = (props: TranslationModalProps) => {
|
|
|
197
197
|
maskClosable={false}
|
|
198
198
|
>
|
|
199
199
|
{content()}
|
|
200
|
-
</Modal>
|
|
200
|
+
</Modal>)
|
|
201
201
|
);
|
|
202
202
|
};
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { DashboardGridItemProps } from "./DashboardGridItem.types";
|
|
3
3
|
import { ExportOutlined } from "@ant-design/icons";
|
|
4
|
-
import { Row, Col } from "antd";
|
|
5
|
-
|
|
4
|
+
import { Row, Col, Typography, theme } from "antd";
|
|
5
|
+
const { useToken } = theme;
|
|
6
6
|
|
|
7
7
|
const { Text } = Typography;
|
|
8
8
|
|
|
9
9
|
export const DashboardGridItem = (props: DashboardGridItemProps) => {
|
|
10
|
-
const {
|
|
10
|
+
const { title, children, action, openAction } = props;
|
|
11
|
+
const { token } = useToken();
|
|
11
12
|
|
|
12
13
|
return (
|
|
13
14
|
<div
|
|
14
|
-
className={"shadow-md
|
|
15
|
+
className={"shadow-md"}
|
|
15
16
|
style={{
|
|
16
17
|
height: "100%",
|
|
17
18
|
display: "flex",
|
|
@@ -19,12 +20,15 @@ export const DashboardGridItem = (props: DashboardGridItemProps) => {
|
|
|
19
20
|
overflow: "hidden",
|
|
20
21
|
border: "1px solid #eee",
|
|
21
22
|
backgroundColor: "white",
|
|
23
|
+
borderRadius: token.borderRadius,
|
|
22
24
|
}}
|
|
23
25
|
>
|
|
24
26
|
<Row
|
|
25
|
-
className="bg-blueGray-100"
|
|
26
27
|
align="middle"
|
|
27
|
-
style={{
|
|
28
|
+
style={{
|
|
29
|
+
borderBottom: "1px solid #ddd",
|
|
30
|
+
backgroundColor: token.colorPrimaryBg,
|
|
31
|
+
}}
|
|
28
32
|
wrap={false}
|
|
29
33
|
>
|
|
30
34
|
<Col
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import dayjs from "dayjs";
|
|
2
2
|
|
|
3
3
|
const formatter = (graphType: "pie" | "default" | "barGrouped") => {
|
|
4
4
|
return (object: any) => {
|
|
@@ -24,7 +24,7 @@ const axisFormatter = (value: any) => {
|
|
|
24
24
|
if (dateType === null) {
|
|
25
25
|
return value;
|
|
26
26
|
}
|
|
27
|
-
return
|
|
27
|
+
return dayjs(value, (dateFormats.input as any)[dateType]).format(
|
|
28
28
|
(dateFormats.output as any)[dateType]
|
|
29
29
|
);
|
|
30
30
|
} else {
|
|
@@ -154,7 +154,7 @@ const dateFormats = {
|
|
|
154
154
|
|
|
155
155
|
function getDateType(dateString: string): string | null {
|
|
156
156
|
for (const format in dateFormats.input) {
|
|
157
|
-
const isValidFormat =
|
|
157
|
+
const isValidFormat = dayjs(
|
|
158
158
|
dateString,
|
|
159
159
|
(dateFormats.input as any)[format],
|
|
160
160
|
true
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
} from "@/context/ActionViewContext";
|
|
23
23
|
import { Many2oneTree } from "../base/many2one/Many2oneTree";
|
|
24
24
|
import { ReferenceTree } from "../base/ReferenceTree";
|
|
25
|
-
import
|
|
25
|
+
import dayjs from "dayjs";
|
|
26
26
|
import { DatePickerConfig } from "@/common/DatePicker";
|
|
27
27
|
|
|
28
28
|
type Props = {
|
|
@@ -71,7 +71,7 @@ const textComponentFn = (value: any): React.ReactElement => {
|
|
|
71
71
|
const dateComponentFn = (value: any): React.ReactElement => {
|
|
72
72
|
if (!value || (value && value.length === 0)) return <></>;
|
|
73
73
|
|
|
74
|
-
const formattedValue =
|
|
74
|
+
const formattedValue = dayjs(
|
|
75
75
|
value,
|
|
76
76
|
DatePickerConfig.date.dateInternalFormat
|
|
77
77
|
).format(DatePickerConfig.date.dateDisplayFormat);
|
|
@@ -80,7 +80,7 @@ const dateComponentFn = (value: any): React.ReactElement => {
|
|
|
80
80
|
|
|
81
81
|
const dateTimeComponentFn = (value: any): React.ReactElement => {
|
|
82
82
|
if (!value || (value && value.length === 0)) return <></>;
|
|
83
|
-
const formattedValue =
|
|
83
|
+
const formattedValue = dayjs(
|
|
84
84
|
value,
|
|
85
85
|
DatePickerConfig.time.dateInternalFormat
|
|
86
86
|
).format(DatePickerConfig.time.dateDisplayFormat);
|
|
@@ -302,7 +302,7 @@ function Tree(props: Props): React.ReactElement {
|
|
|
302
302
|
});
|
|
303
303
|
|
|
304
304
|
return (
|
|
305
|
-
<div className="p-1 pb-0 pl-2 mt-2
|
|
305
|
+
<div className="p-1 pb-0 pl-2 mt-2 ">{summary.join(", ")}</div>
|
|
306
306
|
);
|
|
307
307
|
}
|
|
308
308
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useRef, useState } from "react";
|
|
2
|
-
import { Form, Row, Col, Alert } from "antd";
|
|
2
|
+
import { Form, Row, Col, Alert, theme } from "antd";
|
|
3
3
|
import useDeepCompareEffect from "use-deep-compare-effect";
|
|
4
4
|
|
|
5
5
|
import {
|
|
@@ -15,6 +15,7 @@ import { SearchParams } from "./SearchParams";
|
|
|
15
15
|
|
|
16
16
|
import { getParamsForFields } from "@/helpers/searchHelper";
|
|
17
17
|
import Measure from "react-measure";
|
|
18
|
+
const { useToken } = theme;
|
|
18
19
|
|
|
19
20
|
type Props = {
|
|
20
21
|
fields: any;
|
|
@@ -55,6 +56,7 @@ function SearchFilter(props: Props) {
|
|
|
55
56
|
const [advancedSearchFields, setAdvancedSearchFields] = useState<Container>();
|
|
56
57
|
const [advancedFilter, setAdvancedFilter] = useState(false);
|
|
57
58
|
const sfo = useRef<SearchFilterOoui>();
|
|
59
|
+
const { token } = useToken();
|
|
58
60
|
|
|
59
61
|
const [form] = Form.useForm();
|
|
60
62
|
|
|
@@ -118,7 +120,8 @@ function SearchFilter(props: Props) {
|
|
|
118
120
|
<div ref={measureRef}>
|
|
119
121
|
<div style={{ display: searchVisible ? "block" : "none" }}>
|
|
120
122
|
<Form
|
|
121
|
-
className="p-3
|
|
123
|
+
className="p-3 shadow-md"
|
|
124
|
+
style={{ borderRadius: token.borderRadius }}
|
|
122
125
|
form={form}
|
|
123
126
|
onFinish={onFinish}
|
|
124
127
|
initialValues={{ offset, limit }}
|
package/dist/Config.d.ts
DELETED
package/dist/Config.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["Config.ts"],"names":[],"mappings":";;;;AAAA,wBAGE"}
|
package/src/Config.ts
DELETED
|
File without changes
|