@gisce/react-ooui 2.0.0-alpha.19 → 2.0.0-alpha.20
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/actionbar/AttachmentsButton.d.ts.map +1 -1
- package/dist/actionbar/ButtonWithBadge.d.ts.map +1 -1
- package/dist/actionbar/DashboardActionBar.d.ts.map +1 -1
- package/dist/context/ActionViewContext.d.ts.map +1 -1
- package/dist/context/DashboardActionContext.d.ts.map +1 -1
- package/dist/context/FormModalContext.d.ts.map +1 -1
- package/dist/context/One2manyContext.d.ts.map +1 -1
- package/dist/helpers/logInfoHelper.d.ts.map +1 -1
- package/dist/react-ooui.es.js +46 -37
- package/dist/react-ooui.es.js.map +1 -1
- package/dist/ui/ConfirmDialog.d.ts +1 -1
- package/dist/ui/GoToResourceModal.d.ts.map +1 -1
- package/dist/widgets/base/Separator.d.ts.map +1 -1
- package/dist/widgets/custom/Avatar.d.ts.map +1 -1
- package/dist/widgets/custom/Markdown.d.ts.map +1 -1
- package/dist/widgets/custom/Radio.d.ts.map +1 -1
- package/dist/widgets/custom/Steps.d.ts.map +1 -1
- package/dist/widgets/custom/Switch.d.ts.map +1 -1
- package/dist/widgets/modals/SearchModal.d.ts.map +1 -1
- package/dist/widgets/views/searchFilter/SearchBottomBar.d.ts.map +1 -1
- package/dist/widgets/views/searchFilter/SearchField.d.ts.map +1 -1
- package/dist/widgets/views/searchFilter/SearchParams.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/ConnectionProvider.ts +1 -1
- package/src/__tests__/iconMapper.test.ts +4 -4
- package/src/actionbar/AttachmentsButton.tsx +25 -23
- package/src/actionbar/AttachmentsButtonWrapper.tsx +2 -2
- package/src/actionbar/ButtonWithBadge.tsx +4 -2
- package/src/actionbar/ChangeViewButton.tsx +1 -1
- package/src/actionbar/DashboardActionBar.tsx +2 -6
- package/src/actionbar/FormActionBar.tsx +2 -2
- package/src/actionbar/NewButton.tsx +1 -1
- package/src/actionbar/TreeActionBar.tsx +2 -2
- package/src/context/ActionViewContext.tsx +7 -3
- package/src/context/DashboardActionContext.tsx +2 -3
- package/src/context/FormModalContext.tsx +2 -3
- package/src/context/LocaleContext.tsx +1 -1
- package/src/context/One2manyContext.tsx +3 -4
- package/src/helpers/containerHelper.ts +1 -1
- package/src/helpers/dynamicColumnsHelper.ts +2 -2
- package/src/helpers/iconMapper.ts +5 -5
- package/src/helpers/logInfoHelper.tsx +8 -6
- package/src/helpers/timeHelper.ts +2 -2
- package/src/hooks/useEffectDebugger.ts +2 -2
- package/src/hooks/useExport.ts +8 -8
- package/src/hooks/useWindowDimensions.ts +1 -1
- package/src/stories/Time.stories.tsx +2 -3
- package/src/stories/Utils.stories.tsx +1 -3
- package/src/stories/containers/Group.stories.tsx +2 -3
- package/src/stories/containers/Notebook.stories.tsx +0 -6
- package/src/stories/custom/Comments.stories.tsx +32 -25
- package/src/stories/forms/FormWithLinks.stories.tsx +1 -2
- package/src/stories/forms/PreferencesForm.stories.tsx +1 -2
- package/src/stories/mocks/mockProvider.ts +5 -2
- package/src/stories/mocks/models/attachment.ts +1 -2
- package/src/stories/mocks/models/butlleti.ts +249 -297
- package/src/stories/mocks/models/company.ts +2 -4
- package/src/stories/mocks/models/document.ts +2 -4
- package/src/stories/mocks/models/factura.ts +14 -28
- package/src/stories/mocks/models/form_with_gridfiber.ts +2 -4
- package/src/stories/mocks/models/hist_autoconsum.ts +2 -4
- package/src/stories/mocks/models/lead.ts +8 -16
- package/src/stories/mocks/models/modcontractual.ts +3 -6
- package/src/stories/mocks/models/partner.ts +20 -40
- package/src/stories/mocks/models/polissa.ts +6 -12
- package/src/stories/mocks/models/res_partner_category.ts +3 -3
- package/src/stories/mocks/models/signatura.ts +135 -195
- package/src/stories/mocks/models/switching.ts +2 -4
- package/src/stories/views/Tree.stories.jsx +3 -5
- package/src/stories/views/searchFilter/examples/PartnersSearchFilter.stories.tsx +15 -30
- package/src/ui/ConfirmDialog.tsx +1 -1
- package/src/ui/GoToResourceModal.tsx +7 -3
- package/src/views/CurrentTabContent.tsx +1 -1
- package/src/views/TabContent.tsx +1 -1
- package/src/views/TabSelector.tsx +1 -1
- package/src/views/actionViews/DashboardActionView.tsx +1 -1
- package/src/views/actionViews/GraphActionView.tsx +1 -1
- package/src/views/actionViews/TreeActionView.tsx +2 -2
- package/src/widgets/WidgetFactory.tsx +1 -1
- package/src/widgets/base/FloatTime.tsx +1 -1
- package/src/widgets/base/Reference.tsx +1 -1
- package/src/widgets/base/ReferenceTree.tsx +1 -1
- package/src/widgets/base/Separator.tsx +3 -4
- package/src/widgets/base/many2one/Many2oneSuffixModal.tsx +2 -2
- package/src/widgets/base/one2many/One2many.tsx +2 -2
- package/src/widgets/custom/Avatar.tsx +15 -7
- package/src/widgets/custom/Markdown.tsx +12 -8
- package/src/widgets/custom/Radio.tsx +2 -4
- package/src/widgets/custom/Steps.tsx +10 -9
- package/src/widgets/custom/Switch.tsx +1 -5
- package/src/widgets/modals/SearchModal.tsx +31 -29
- package/src/widgets/modals/TranslationModal.tsx +2 -2
- package/src/widgets/views/Dashboard/Dashboard.tsx +3 -3
- package/src/widgets/views/DashboardGrid/DashboardGrid.tsx +3 -3
- package/src/widgets/views/Graph/Graph.tsx +1 -1
- package/src/widgets/views/Graph/GraphChart.tsx +1 -1
- package/src/widgets/views/Graph/GraphDefaults.ts +2 -2
- package/src/widgets/views/SearchTree.tsx +2 -2
- package/src/widgets/views/searchFilter/SearchBottomBar.tsx +2 -6
- package/src/widgets/views/searchFilter/SearchField.tsx +5 -1
- package/src/widgets/views/searchFilter/SearchFilter.tsx +1 -1
- package/src/widgets/views/searchFilter/SearchParams.tsx +7 -4
package/src/views/TabContent.tsx
CHANGED
|
@@ -17,7 +17,7 @@ export const DashboardActionView = (props: DashboardActionViewProps) => {
|
|
|
17
17
|
const { dashboardData } = props;
|
|
18
18
|
const dashboardRef = useRef();
|
|
19
19
|
const tabManagerContext = useContext(
|
|
20
|
-
TabManagerContext
|
|
20
|
+
TabManagerContext,
|
|
21
21
|
) as TabManagerContextType;
|
|
22
22
|
const { openShortcut } = tabManagerContext || {};
|
|
23
23
|
|
|
@@ -29,7 +29,7 @@ export const GraphActionView = (props: GraphActionViewProps) => {
|
|
|
29
29
|
const graphRef = useRef();
|
|
30
30
|
|
|
31
31
|
const actionViewContext = useContext(
|
|
32
|
-
ActionViewContext
|
|
32
|
+
ActionViewContext,
|
|
33
33
|
) as ActionViewContextType;
|
|
34
34
|
const {
|
|
35
35
|
setResults: setResultsActionView = undefined,
|
|
@@ -43,7 +43,7 @@ export const TreeActionView = (props: TreeActionViewProps) => {
|
|
|
43
43
|
} = props;
|
|
44
44
|
|
|
45
45
|
const { currentView, setPreviousView } = useContext(
|
|
46
|
-
ActionViewContext
|
|
46
|
+
ActionViewContext,
|
|
47
47
|
) as ActionViewContextType;
|
|
48
48
|
|
|
49
49
|
if (!visible) {
|
|
@@ -77,7 +77,7 @@ export const TreeActionView = (props: TreeActionViewProps) => {
|
|
|
77
77
|
setPreviousView?.(currentView);
|
|
78
78
|
setCurrentItemIndex(itemIndex);
|
|
79
79
|
const formView = availableViews.find(
|
|
80
|
-
(v) => v.type === "form"
|
|
80
|
+
(v) => v.type === "form",
|
|
81
81
|
) as FormView;
|
|
82
82
|
setCurrentView(formView);
|
|
83
83
|
}}
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
import { Image } from "./base/Image";
|
|
39
39
|
import { FiberGrid } from "./custom/FiberGrid";
|
|
40
40
|
import { Timeline } from "./custom/Timeline";
|
|
41
|
-
import { Indicator} from "./custom/Indicator";
|
|
41
|
+
import { Indicator } from "./custom/Indicator";
|
|
42
42
|
import { Tags } from "./custom/Tags";
|
|
43
43
|
|
|
44
44
|
const getWidgetType = (type: string) => {
|
|
@@ -25,7 +25,7 @@ interface FloatTimeInputProps {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
export const FloatTimeInput: React.FC<FloatTimeInputProps> = (
|
|
28
|
-
props: FloatTimeInputProps
|
|
28
|
+
props: FloatTimeInputProps,
|
|
29
29
|
) => {
|
|
30
30
|
const { ooui, value, onChange } = props;
|
|
31
31
|
const { id, readOnly, required } = ooui as FloatOoui;
|
|
@@ -37,7 +37,7 @@ interface ReferenceInputProps {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
export const ReferenceInput: React.FC<ReferenceInputProps> = (
|
|
40
|
-
props: ReferenceInputProps
|
|
40
|
+
props: ReferenceInputProps,
|
|
41
41
|
) => {
|
|
42
42
|
const { value, onChange, ooui } = props;
|
|
43
43
|
const { required, selectionValues, readOnly } = ooui;
|
|
@@ -10,17 +10,16 @@ type Props = {
|
|
|
10
10
|
export const Separator = (props: Props) => {
|
|
11
11
|
const { ooui } = props;
|
|
12
12
|
const { label, icon } = ooui;
|
|
13
|
-
const Icon
|
|
14
|
-
|
|
13
|
+
const Icon: React.ElementType | undefined = iconMapper(icon || "");
|
|
15
14
|
|
|
16
15
|
return (
|
|
17
16
|
<Divider orientation="left" className="text-sm">
|
|
18
|
-
{
|
|
17
|
+
{(Icon || label) && (
|
|
19
18
|
<Space>
|
|
20
19
|
{Icon ? <Icon /> : null}
|
|
21
20
|
{label}
|
|
22
21
|
</Space>
|
|
23
|
-
}
|
|
22
|
+
)}
|
|
24
23
|
</Divider>
|
|
25
24
|
);
|
|
26
25
|
};
|
|
@@ -14,7 +14,7 @@ export const Many2oneSuffixModal = (props: Props) => {
|
|
|
14
14
|
const { t } = useContext(LocaleContext) as LocaleContextType;
|
|
15
15
|
|
|
16
16
|
return (
|
|
17
|
-
|
|
17
|
+
<Modal
|
|
18
18
|
title={t("selectAction")}
|
|
19
19
|
centered
|
|
20
20
|
open={visible}
|
|
@@ -37,6 +37,6 @@ export const Many2oneSuffixModal = (props: Props) => {
|
|
|
37
37
|
);
|
|
38
38
|
})}
|
|
39
39
|
</Space>
|
|
40
|
-
</Modal>
|
|
40
|
+
</Modal>
|
|
41
41
|
);
|
|
42
42
|
};
|
|
@@ -47,9 +47,9 @@ export const One2many = (props: Props) => {
|
|
|
47
47
|
if (mode && mode.length > 0) {
|
|
48
48
|
for (const m of mode as ViewType[]) {
|
|
49
49
|
const v = await getViewData(m);
|
|
50
|
-
views.set(m, v)
|
|
50
|
+
views.set(m, v);
|
|
51
51
|
}
|
|
52
|
-
setViews(views)
|
|
52
|
+
setViews(views);
|
|
53
53
|
} else {
|
|
54
54
|
const formView = await getViewData("form");
|
|
55
55
|
const treeView = await getViewData("tree");
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {WidgetProps} from "@/types";
|
|
2
|
+
import { WidgetProps } from "@/types";
|
|
3
3
|
import { Avatar as AntdAvatar, Tooltip } from "antd";
|
|
4
|
-
import { Avatar as AvatarOoui} from "@gisce/ooui";
|
|
4
|
+
import { Avatar as AvatarOoui } from "@gisce/ooui";
|
|
5
5
|
import { colorFromString } from "@/helpers/formHelper";
|
|
6
6
|
|
|
7
7
|
type AvatarProps = WidgetProps & {
|
|
8
|
-
ooui: AvatarOoui
|
|
8
|
+
ooui: AvatarOoui;
|
|
9
9
|
value?: any;
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
const Avatar = (props: AvatarProps): React.ReactElement | null => {
|
|
13
|
-
const {ooui, value} = props;
|
|
13
|
+
const { ooui, value } = props;
|
|
14
14
|
if (!value) {
|
|
15
15
|
return null;
|
|
16
16
|
}
|
|
@@ -20,13 +20,21 @@ const Avatar = (props: AvatarProps): React.ReactElement | null => {
|
|
|
20
20
|
} else if (Array.isArray(value)) {
|
|
21
21
|
formattedValue = value[1];
|
|
22
22
|
}
|
|
23
|
-
const text = formattedValue
|
|
23
|
+
const text = formattedValue
|
|
24
|
+
.toString()
|
|
25
|
+
.split(" ")
|
|
26
|
+
.filter((word: string) => word.length > 1)
|
|
27
|
+
.slice(0, 3)
|
|
28
|
+
.map((word: string) => word[0].toUpperCase())
|
|
29
|
+
.join("");
|
|
24
30
|
const backgroundColor = colorFromString(formattedValue);
|
|
25
31
|
return (
|
|
26
32
|
<Tooltip title={formattedValue}>
|
|
27
|
-
<AntdAvatar alt={formattedValue} style={{backgroundColor}}>
|
|
33
|
+
<AntdAvatar alt={formattedValue} style={{ backgroundColor }}>
|
|
34
|
+
{text}
|
|
35
|
+
</AntdAvatar>
|
|
28
36
|
</Tooltip>
|
|
29
37
|
);
|
|
30
|
-
}
|
|
38
|
+
};
|
|
31
39
|
|
|
32
40
|
export default Avatar;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import Field from "@/common/Field";
|
|
2
2
|
import ReactMarkdown from "react-markdown";
|
|
3
3
|
import React from "react";
|
|
4
|
-
import {WidgetProps} from "@/types";
|
|
4
|
+
import { WidgetProps } from "@/types";
|
|
5
5
|
|
|
6
|
-
export
|
|
6
|
+
export const Markdown = (props: WidgetProps) => {
|
|
7
7
|
return (
|
|
8
8
|
<Field {...props}>
|
|
9
9
|
<MarkdownInput {...props} />
|
|
@@ -12,11 +12,15 @@ export const Markdown = (props: WidgetProps) => {
|
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
export const MarkdownInput = (props: any) => {
|
|
15
|
-
const {value, ooui} = props;
|
|
15
|
+
const { value, ooui } = props;
|
|
16
16
|
return (
|
|
17
|
-
<div
|
|
18
|
-
|
|
17
|
+
<div
|
|
18
|
+
style={{
|
|
19
|
+
height: ooui.height ? ooui.height + "px" : "100%",
|
|
20
|
+
overflow: "auto",
|
|
21
|
+
}}
|
|
22
|
+
>
|
|
23
|
+
<ReactMarkdown children={value} className="ant-typography" />
|
|
19
24
|
</div>
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
25
|
+
);
|
|
26
|
+
};
|
|
@@ -41,9 +41,7 @@ export const SelectionInput = (props: RadioInputProps) => {
|
|
|
41
41
|
|
|
42
42
|
return (
|
|
43
43
|
<RadioAnt.Group disabled={readOnly} onChange={onChange} value={value}>
|
|
44
|
-
<Space direction={direction}>
|
|
45
|
-
{options}
|
|
46
|
-
</Space>
|
|
44
|
+
<Space direction={direction}>{options}</Space>
|
|
47
45
|
</RadioAnt.Group>
|
|
48
46
|
);
|
|
49
|
-
};
|
|
47
|
+
};
|
|
@@ -6,11 +6,10 @@ import { Steps as StepsOoui } from "@gisce/ooui";
|
|
|
6
6
|
|
|
7
7
|
type StepsProps = {
|
|
8
8
|
ooui: StepsOoui;
|
|
9
|
-
value: any
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
type StatusType = 'wait' | 'process' | 'finish' | 'error';
|
|
9
|
+
value: any;
|
|
10
|
+
};
|
|
13
11
|
|
|
12
|
+
type StatusType = "wait" | "process" | "finish" | "error";
|
|
14
13
|
|
|
15
14
|
export const Steps = (props: StepsProps) => {
|
|
16
15
|
const { ooui } = props;
|
|
@@ -33,10 +32,10 @@ export const StepsInput = (props: StepsInputProps) => {
|
|
|
33
32
|
const formContext = useContext(FormContext) as FormContextType;
|
|
34
33
|
|
|
35
34
|
const values = Array.from(selectionValues.entries());
|
|
36
|
-
const current = values.map(val => val[0]).indexOf(value);
|
|
35
|
+
const current = values.map((val) => val[0]).indexOf(value);
|
|
37
36
|
let status: StatusType = "process";
|
|
38
37
|
let error = "";
|
|
39
|
-
|
|
38
|
+
|
|
40
39
|
if (errorField) {
|
|
41
40
|
error = formContext.getFieldValue(errorField);
|
|
42
41
|
if (error) {
|
|
@@ -44,12 +43,14 @@ export const StepsInput = (props: StepsInputProps) => {
|
|
|
44
43
|
}
|
|
45
44
|
}
|
|
46
45
|
|
|
47
|
-
|
|
48
46
|
return (
|
|
49
47
|
<AntdSteps current={current} status={status}>
|
|
50
48
|
{values.map((val, idx) => (
|
|
51
|
-
<AntdSteps.Step
|
|
49
|
+
<AntdSteps.Step
|
|
50
|
+
title={val[1]}
|
|
51
|
+
description={idx === current && status === "error" ? error : null}
|
|
52
|
+
/>
|
|
52
53
|
))}
|
|
53
54
|
</AntdSteps>
|
|
54
55
|
);
|
|
55
|
-
};
|
|
56
|
+
};
|
|
@@ -9,10 +9,7 @@ export const Switch = (props: WidgetProps) => {
|
|
|
9
9
|
const { id, readOnly, required } = ooui;
|
|
10
10
|
|
|
11
11
|
return (
|
|
12
|
-
<Field
|
|
13
|
-
{...props}
|
|
14
|
-
valuePropName="checked"
|
|
15
|
-
>
|
|
12
|
+
<Field {...props} valuePropName="checked">
|
|
16
13
|
<SwitchInput id={id} readOnly={readOnly} required={required} />
|
|
17
14
|
</Field>
|
|
18
15
|
);
|
|
@@ -21,7 +18,6 @@ export const Switch = (props: WidgetProps) => {
|
|
|
21
18
|
const SwitchInput = (props: any) => {
|
|
22
19
|
const { required, readOnly, ...restProps } = props;
|
|
23
20
|
|
|
24
|
-
|
|
25
21
|
return (
|
|
26
22
|
<div className="flex flex-row">
|
|
27
23
|
<AntdSwitch disabled={readOnly} {...restProps} />
|
|
@@ -98,33 +98,35 @@ 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
|
-
|
|
101
|
+
return (
|
|
102
|
+
<>
|
|
103
|
+
<Modal
|
|
104
|
+
title={t("search")}
|
|
105
|
+
centered
|
|
106
|
+
width={modalWidth}
|
|
107
|
+
open={visible && !showCreateModal}
|
|
108
|
+
closable={true}
|
|
109
|
+
onCancel={onCloseModal}
|
|
110
|
+
footer={null}
|
|
111
|
+
destroyOnClose
|
|
112
|
+
maskClosable={false}
|
|
113
|
+
>
|
|
114
|
+
{content()}
|
|
115
|
+
</Modal>
|
|
116
|
+
<FormModal
|
|
117
|
+
model={model}
|
|
118
|
+
visible={showCreateModal}
|
|
119
|
+
parentContext={context}
|
|
120
|
+
onSubmitSucceed={(id?: number) => {
|
|
121
|
+
setShowCreateModal(false);
|
|
122
|
+
onCloseModal();
|
|
123
|
+
onSelectValues([id!]);
|
|
124
|
+
}}
|
|
125
|
+
onCancel={() => {
|
|
126
|
+
setShowCreateModal(false);
|
|
127
|
+
onCloseModal();
|
|
128
|
+
}}
|
|
129
|
+
/>
|
|
130
|
+
</>
|
|
131
|
+
);
|
|
130
132
|
};
|
|
@@ -185,7 +185,7 @@ export const TranslationModal = (props: TranslationModalProps) => {
|
|
|
185
185
|
}
|
|
186
186
|
|
|
187
187
|
return (
|
|
188
|
-
|
|
188
|
+
<Modal
|
|
189
189
|
title={t("translate")}
|
|
190
190
|
centered
|
|
191
191
|
width={modalWidth}
|
|
@@ -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
|
};
|
|
@@ -156,7 +156,7 @@ function Dashboard(props: DashboardProps, ref: any) {
|
|
|
156
156
|
|
|
157
157
|
const differences = itemPositions.filter((itemPosition) => {
|
|
158
158
|
const dashboardItem = dashboardItems.find(
|
|
159
|
-
(dashboardItem) => dashboardItem.id === itemPosition.id
|
|
159
|
+
(dashboardItem) => dashboardItem.id === itemPosition.id,
|
|
160
160
|
);
|
|
161
161
|
if (!dashboardItem) {
|
|
162
162
|
return false;
|
|
@@ -265,7 +265,7 @@ function Dashboard(props: DashboardProps, ref: any) {
|
|
|
265
265
|
<Graph
|
|
266
266
|
view_id={
|
|
267
267
|
views.filter(
|
|
268
|
-
(view: [number, string]) => view[1] === "graph"
|
|
268
|
+
(view: [number, string]) => view[1] === "graph",
|
|
269
269
|
)[0][0]
|
|
270
270
|
}
|
|
271
271
|
model={model}
|
|
@@ -283,7 +283,7 @@ function Dashboard(props: DashboardProps, ref: any) {
|
|
|
283
283
|
domain={domain}
|
|
284
284
|
view_id={
|
|
285
285
|
views.filter(
|
|
286
|
-
(view: [number, string]) => view[1] === "tree"
|
|
286
|
+
(view: [number, string]) => view[1] === "tree",
|
|
287
287
|
)[0][0]
|
|
288
288
|
}
|
|
289
289
|
onRowClicked={(record) => {
|
|
@@ -16,7 +16,7 @@ export const DashboardGrid = (props: DashboardGridProps) => {
|
|
|
16
16
|
| boolean
|
|
17
17
|
| React.ReactChild
|
|
18
18
|
| React.ReactFragment
|
|
19
|
-
| React.ReactPortal
|
|
19
|
+
| React.ReactPortal,
|
|
20
20
|
) => {
|
|
21
21
|
const { parms, id } = (child as any).props;
|
|
22
22
|
return (
|
|
@@ -24,7 +24,7 @@ export const DashboardGrid = (props: DashboardGridProps) => {
|
|
|
24
24
|
{child}
|
|
25
25
|
</div>
|
|
26
26
|
);
|
|
27
|
-
}
|
|
27
|
+
},
|
|
28
28
|
);
|
|
29
29
|
|
|
30
30
|
return (
|
|
@@ -43,7 +43,7 @@ export const DashboardGrid = (props: DashboardGridProps) => {
|
|
|
43
43
|
w: item.w,
|
|
44
44
|
h: item.h,
|
|
45
45
|
};
|
|
46
|
-
})
|
|
46
|
+
}),
|
|
47
47
|
);
|
|
48
48
|
}}
|
|
49
49
|
>
|
|
@@ -36,7 +36,7 @@ const GraphComp = (props: GraphProps, ref: any) => {
|
|
|
36
36
|
const [graphOoui, setGraphOoui] = useState<GraphOoui>();
|
|
37
37
|
const [graphXml, setGraphXml] = useState<string>();
|
|
38
38
|
const actionViewContext = useContext(
|
|
39
|
-
ActionViewContext
|
|
39
|
+
ActionViewContext,
|
|
40
40
|
) as ActionViewContextType;
|
|
41
41
|
const { setGraphIsLoading = undefined } = actionViewContext || {};
|
|
42
42
|
|
|
@@ -25,7 +25,7 @@ const axisFormatter = (value: any) => {
|
|
|
25
25
|
return value;
|
|
26
26
|
}
|
|
27
27
|
return dayjs(value, (dateFormats.input as any)[dateType]).format(
|
|
28
|
-
(dateFormats.output as any)[dateType]
|
|
28
|
+
(dateFormats.output as any)[dateType],
|
|
29
29
|
);
|
|
30
30
|
} else {
|
|
31
31
|
return value;
|
|
@@ -157,7 +157,7 @@ function getDateType(dateString: string): string | null {
|
|
|
157
157
|
const isValidFormat = dayjs(
|
|
158
158
|
dateString,
|
|
159
159
|
(dateFormats.input as any)[format],
|
|
160
|
-
true
|
|
160
|
+
true,
|
|
161
161
|
).isValid();
|
|
162
162
|
if (isValidFormat) {
|
|
163
163
|
return format;
|
|
@@ -80,12 +80,12 @@ function SearchTree(props: Props, ref: any) {
|
|
|
80
80
|
const { height } = useWindowDimensions();
|
|
81
81
|
|
|
82
82
|
const contentRootContext = useContext(
|
|
83
|
-
ContentRootContext
|
|
83
|
+
ContentRootContext,
|
|
84
84
|
) as ContentRootContextType;
|
|
85
85
|
const { processAction } = contentRootContext || {};
|
|
86
86
|
|
|
87
87
|
const actionViewContext = useContext(
|
|
88
|
-
ActionViewContext
|
|
88
|
+
ActionViewContext,
|
|
89
89
|
) as ActionViewContextType;
|
|
90
90
|
const {
|
|
91
91
|
setResults: setResultsActionView = undefined,
|
|
@@ -18,12 +18,8 @@ type Props = {
|
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
export function SearchBottomBar(props: Props): React.ReactElement {
|
|
21
|
-
const {
|
|
22
|
-
|
|
23
|
-
advancedFilter,
|
|
24
|
-
onClear,
|
|
25
|
-
isSearching,
|
|
26
|
-
} = props;
|
|
21
|
+
const { onAdvancedFilterToggle, advancedFilter, onClear, isSearching } =
|
|
22
|
+
props;
|
|
27
23
|
|
|
28
24
|
const { t } = useContext(LocaleContext) as LocaleContextType;
|
|
29
25
|
|
|
@@ -8,7 +8,11 @@ import { PairFields } from "./PairFields";
|
|
|
8
8
|
|
|
9
9
|
import { LocaleContext, LocaleContextType } from "@/context/LocaleContext";
|
|
10
10
|
|
|
11
|
-
import {
|
|
11
|
+
import {
|
|
12
|
+
Field,
|
|
13
|
+
SearchFieldTypes,
|
|
14
|
+
Selection as SelectionOoui,
|
|
15
|
+
} from "@gisce/ooui";
|
|
12
16
|
import { MultiSelection } from "@/widgets/base/MultiSelection";
|
|
13
17
|
|
|
14
18
|
type Props = {
|
|
@@ -101,7 +101,7 @@ function SearchFilter(props: Props) {
|
|
|
101
101
|
delete values.limit;
|
|
102
102
|
const newParams = getParamsForFields(
|
|
103
103
|
values,
|
|
104
|
-
sfo.current?._advancedSearchContainer
|
|
104
|
+
sfo.current?._advancedSearchContainer,
|
|
105
105
|
);
|
|
106
106
|
|
|
107
107
|
onSubmit({ params: newParams, offset, limit, searchValues: values });
|
|
@@ -8,7 +8,7 @@ import { LocaleContext, LocaleContextType } from "@/context/LocaleContext";
|
|
|
8
8
|
|
|
9
9
|
type SearchParamsProps = {
|
|
10
10
|
onLimitChange?: (limit: number) => void;
|
|
11
|
-
}
|
|
11
|
+
};
|
|
12
12
|
|
|
13
13
|
export function SearchParams(props: SearchParamsProps): React.ReactElement {
|
|
14
14
|
const { onLimitChange } = props;
|
|
@@ -21,9 +21,12 @@ export function SearchParams(props: SearchParamsProps): React.ReactElement {
|
|
|
21
21
|
<Row key={"count_params"}>{t("parameters")}</Row>
|
|
22
22
|
<Space align="center">
|
|
23
23
|
{t("limit") + " :"}
|
|
24
|
-
<Integer
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
<Integer
|
|
25
|
+
ooui={limitOoui}
|
|
26
|
+
onChange={(newValue: number) => {
|
|
27
|
+
onLimitChange?.(newValue);
|
|
28
|
+
}}
|
|
29
|
+
/>
|
|
27
30
|
{t("first") + " :"}
|
|
28
31
|
<Integer ooui={offsetOoui} />
|
|
29
32
|
</Space>
|