@gisce/react-ooui 1.2.0-rc.8 → 1.2.0-rc.82
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 +14 -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/ActionViewContext.d.ts +5 -1
- package/dist/context/ActionViewContext.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/context/FormContext.d.ts +4 -2
- package/dist/context/FormContext.d.ts.map +1 -1
- package/dist/helpers/errorHelper.d.ts +6 -0
- package/dist/helpers/errorHelper.d.ts.map +1 -0
- package/dist/helpers/formHelper.d.ts +5 -3
- package/dist/helpers/formHelper.d.ts.map +1 -1
- package/dist/helpers/iconMapper.d.ts +11 -2
- package/dist/helpers/iconMapper.d.ts.map +1 -1
- package/dist/helpers/one2manyHelper.d.ts +12 -4
- package/dist/helpers/one2manyHelper.d.ts.map +1 -1
- package/dist/helpers/searchHelper.d.ts +1 -1
- package/dist/helpers/searchHelper.d.ts.map +1 -1
- package/dist/helpers/treeHelper.d.ts +1 -1
- package/dist/helpers/treeHelper.d.ts.map +1 -1
- package/dist/hooks/useExport.d.ts +44 -0
- package/dist/hooks/useExport.d.ts.map +1 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/locales/ca_ES.d.ts +2 -0
- package/dist/locales/ca_ES.d.ts.map +1 -1
- package/dist/locales/en_US.d.ts +2 -0
- package/dist/locales/en_US.d.ts.map +1 -1
- package/dist/locales/es_ES.d.ts +2 -0
- package/dist/locales/es_ES.d.ts.map +1 -1
- package/dist/react-ooui.es.js +25826 -27484
- package/dist/react-ooui.es.js.map +1 -1
- package/dist/react-ooui.umd.js +180 -215
- package/dist/react-ooui.umd.js.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/ui/ActionErrorDialog.d.ts.map +1 -1
- package/dist/ui/ErrorAlert.d.ts +6 -0
- package/dist/ui/ErrorAlert.d.ts.map +1 -0
- 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/ActionView.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/RootView.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/WidgetFactory.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/ReferenceTree.d.ts +8 -0
- package/dist/widgets/base/ReferenceTree.d.ts.map +1 -0
- 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/many2one/Many2oneTree.d.ts +6 -0
- package/dist/widgets/base/many2one/Many2oneTree.d.ts.map +1 -0
- 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/One2manyInput.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/containers/Group.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 +5 -0
- package/dist/widgets/custom/Markdown.d.ts.map +1 -0
- 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 +5 -0
- package/dist/widgets/custom/Tag.d.ts.map +1 -0
- 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 +4 -3
- 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/Dashboard.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/Form.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/GraphDefaults.d.ts +36 -0
- package/dist/widgets/views/Graph/GraphDefaults.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/SearchTree.d.ts.map +1 -1
- package/dist/widgets/views/Tree.d.ts +2 -0
- package/dist/widgets/views/Tree.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 +3 -2
- package/dist/widgets/views/searchFilter/SearchFilter.d.ts.map +1 -1
- package/package.json +11 -13
- package/src/__tests__/iconMapper.test.ts +20 -5
- package/src/__tests__/searchFilterHelper.spec.ts +7 -7
- package/src/actionbar/AttachmentsButton.tsx +22 -24
- package/src/actionbar/AttachmentsButtonWrapper.tsx +15 -12
- package/src/actionbar/ButtonWithBadge.tsx +5 -2
- package/src/actionbar/ChangeViewButton.tsx +13 -7
- package/src/actionbar/FormActionBar.tsx +73 -11
- package/src/actionbar/TreeActionBar.tsx +99 -97
- package/src/common/DatePicker.tsx +18 -13
- package/src/context/ActionViewContext.tsx +7 -4
- package/src/context/ConfigContext.tsx +9 -0
- package/src/context/ContentRootContext.tsx +123 -81
- package/src/context/FormContext.tsx +1 -4
- package/src/helpers/errorHelper.ts +27 -0
- package/src/helpers/formHelper.ts +26 -5
- package/src/helpers/iconMapper.ts +141 -108
- package/src/helpers/one2manyHelper.ts +94 -39
- package/src/helpers/searchHelper.ts +8 -7
- package/src/helpers/treeHelper.ts +17 -5
- package/src/hooks/useExport.ts +439 -0
- package/src/index.ts +6 -0
- package/src/locales/ca_ES.tsx +2 -0
- package/src/locales/en_US.tsx +2 -0
- package/src/locales/es_ES.tsx +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 +11 -9
- 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 +37 -1
- package/src/stories/Text.stories.tsx +4 -1
- package/src/stories/containers/Group.stories.tsx +28 -1
- package/src/stories/containers/NewLine.stories.tsx +4 -1
- package/src/stories/containers/Notebook.stories.tsx +31 -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 +42 -0
- 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 +60 -0
- package/src/stories/custom/Tags.stories.tsx +4 -1
- package/src/stories/forms/PreferencesForm.stories.tsx +4 -1
- package/src/stories/mocks/models/company.ts +2 -2
- package/src/stories/mocks/models/crm_case.ts +7 -10
- 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 +9 -6
- 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/types/index.ts +1 -0
- package/src/ui/ActionErrorDialog.tsx +4 -21
- package/src/ui/ErrorAlert.tsx +37 -0
- package/src/ui/FavouriteButton.tsx +20 -9
- package/src/ui/GoToResourceModal.tsx +3 -3
- package/src/ui/TitleHeader.tsx +18 -4
- package/src/views/ActionView.tsx +6 -2
- package/src/views/RootView.tsx +7 -1
- package/src/views/actionViews/GraphActionView.tsx +1 -0
- package/src/views/actionViews/TreeActionView.tsx +10 -1
- package/src/views/tabs/Tab.tsx +12 -6
- package/src/widgets/WidgetFactory.tsx +6 -0
- 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 +10 -5
- package/src/widgets/base/Label.tsx +12 -12
- package/src/widgets/base/LinkInput.tsx +11 -6
- package/src/widgets/base/MultiSelection.tsx +6 -2
- package/src/widgets/base/Reference.tsx +13 -3
- package/src/widgets/base/ReferenceTree.tsx +62 -0
- package/src/widgets/base/Selection.tsx +6 -2
- package/src/widgets/base/Separator.tsx +11 -3
- package/src/widgets/base/Text.tsx +14 -12
- package/src/widgets/base/many2one/Many2one.tsx +25 -31
- package/src/widgets/base/many2one/Many2oneSuffixModal.tsx +3 -3
- package/src/widgets/base/many2one/Many2oneTree.tsx +18 -0
- package/src/widgets/base/one2many/One2manyInput.tsx +79 -23
- package/src/widgets/base/one2many/One2manyTopBar.tsx +10 -1
- package/src/widgets/containers/Group.tsx +7 -4
- package/src/widgets/custom/ButtonGroup.tsx +1 -1
- package/src/widgets/custom/FiberGrid.tsx +1 -4
- package/src/widgets/custom/Indicator.tsx +16 -15
- package/src/widgets/custom/Markdown.tsx +22 -0
- package/src/widgets/custom/MultiCheckbox.tsx +1 -0
- package/src/widgets/custom/Tag.tsx +24 -0
- package/src/widgets/custom/Tags.tsx +27 -28
- package/src/widgets/custom/Timeline.tsx +9 -3
- package/src/widgets/modals/ExportModal.tsx +33 -134
- 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/Dashboard/Dashboard.tsx +15 -4
- package/src/widgets/views/Dashboard/DashboardTree.tsx +1 -0
- package/src/widgets/views/DashboardGrid/DashboardGridItem.tsx +10 -6
- package/src/widgets/views/Form.tsx +41 -39
- package/src/widgets/views/Graph/GraphChart.tsx +6 -1
- package/src/widgets/views/Graph/GraphDefaults.ts +113 -0
- package/src/widgets/views/Graph/GraphIndicator.tsx +19 -7
- package/src/widgets/views/SearchTree.tsx +3 -0
- package/src/widgets/views/Tree.tsx +112 -26
- package/src/widgets/views/searchFilter/SearchField.tsx +9 -23
- package/src/widgets/views/searchFilter/SearchFilter.tsx +17 -8
- package/dist/Config.d.ts +0 -6
- package/dist/Config.d.ts.map +0 -1
- package/dist/helpers/icons/antd_icons.d.ts +0 -4
- package/dist/helpers/icons/antd_icons.d.ts.map +0 -1
- package/dist/helpers/icons/tabler_icons.d.ts +0 -4
- package/dist/helpers/icons/tabler_icons.d.ts.map +0 -1
- package/dist/ui/Fieldset.d.ts +0 -8
- package/dist/ui/Fieldset.d.ts.map +0 -1
- package/src/Config.ts +0 -4
- package/src/helpers/icons/antd_icons.ts +0 -1583
- package/src/helpers/icons/tabler_icons.ts +0 -5367
- package/src/ui/Fieldset.tsx +0 -31
- /package/dist/{main.css → style.css} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
export declare type GraphChartProps = {
|
|
3
3
|
model: string;
|
|
4
4
|
domain: any;
|
|
@@ -7,5 +7,5 @@ export declare type GraphChartProps = {
|
|
|
7
7
|
limit?: number;
|
|
8
8
|
manualIds?: number[];
|
|
9
9
|
};
|
|
10
|
-
export declare const GraphChart: (props: GraphChartProps) => JSX.Element;
|
|
10
|
+
export declare const GraphChart: (props: GraphChartProps) => React.JSX.Element;
|
|
11
11
|
//# sourceMappingURL=GraphChart.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GraphChart.d.ts","sourceRoot":"","sources":["GraphChart.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"GraphChart.d.ts","sourceRoot":"","sources":["GraphChart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAa1C,oBAAY,eAAe,GAAG;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,GAAG,CAAC;IACZ,OAAO,EAAE,GAAG,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,UAAU,UAAW,eAAe,sBAsDhD,CAAC"}
|
|
@@ -3,11 +3,25 @@ declare const DefaultGraphOptions: {
|
|
|
3
3
|
padding: string;
|
|
4
4
|
xAxis: {
|
|
5
5
|
tickCount: number;
|
|
6
|
+
label: {
|
|
7
|
+
formatter: (value: any) => any;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
yAxis: {
|
|
11
|
+
label: {
|
|
12
|
+
formatter: (value: any) => any;
|
|
13
|
+
};
|
|
6
14
|
};
|
|
7
15
|
legend: {
|
|
8
16
|
maxWidthRatio: number;
|
|
9
17
|
maxItemWidth: number;
|
|
10
18
|
};
|
|
19
|
+
tooltip: {
|
|
20
|
+
formatter: (object: any) => {
|
|
21
|
+
name: any;
|
|
22
|
+
value: any;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
11
25
|
};
|
|
12
26
|
pie: {
|
|
13
27
|
appendPadding: number;
|
|
@@ -25,6 +39,12 @@ declare const DefaultGraphOptions: {
|
|
|
25
39
|
maxWidthRatio: number;
|
|
26
40
|
maxItemWidth: number;
|
|
27
41
|
};
|
|
42
|
+
tooltip: {
|
|
43
|
+
formatter: (object: any) => {
|
|
44
|
+
name: any;
|
|
45
|
+
value: any;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
28
48
|
interactions: {
|
|
29
49
|
type: string;
|
|
30
50
|
}[];
|
|
@@ -35,6 +55,22 @@ declare const DefaultGraphOptions: {
|
|
|
35
55
|
maxWidthRatio: number;
|
|
36
56
|
maxItemWidth: number;
|
|
37
57
|
};
|
|
58
|
+
tooltip: {
|
|
59
|
+
formatter: (object: any) => {
|
|
60
|
+
name: any;
|
|
61
|
+
value: any;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
xAxis: {
|
|
65
|
+
label: {
|
|
66
|
+
formatter: (value: any) => any;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
yAxis: {
|
|
70
|
+
label: {
|
|
71
|
+
formatter: (value: any) => any;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
38
74
|
label: {
|
|
39
75
|
position: string;
|
|
40
76
|
layout: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GraphDefaults.d.ts","sourceRoot":"","sources":["GraphDefaults.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GraphDefaults.d.ts","sourceRoot":"","sources":["GraphDefaults.ts"],"names":[],"mappings":"AA2CA,QAAA,MAAM,mBAAmB;;;;;;mCA/BK,GAAG;;;;;mCAAH,GAAG;;;;;;;;gCATf,GAAG;;;;;;;;;;;;mCAoEQ,GAAG;;;;;;;;;;;gCApEd,GAAG;;;;;;;;;;;;;;;;gCAAH,GAAG;;;;;;;mCASS,GAAG;;;;;mCAAH,GAAG;;;;;;;;;;CAgHhC,CAAC;AA6CF,eAAe,mBAAmB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { Operator } from "@gisce/ooui";
|
|
3
3
|
export declare type GraphInidicatorProps = {
|
|
4
4
|
model: string;
|
|
@@ -13,5 +13,5 @@ export declare type GraphInidicatorProps = {
|
|
|
13
13
|
operator?: Operator;
|
|
14
14
|
manualIds?: number[];
|
|
15
15
|
};
|
|
16
|
-
export declare const GraphIndicator: (props: GraphInidicatorProps) => JSX.Element;
|
|
16
|
+
export declare const GraphIndicator: (props: GraphInidicatorProps) => React.JSX.Element;
|
|
17
17
|
//# sourceMappingURL=GraphIndicator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GraphIndicator.d.ts","sourceRoot":"","sources":["GraphIndicator.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"GraphIndicator.d.ts","sourceRoot":"","sources":["GraphIndicator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAOnD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAQvC,oBAAY,oBAAoB,GAAG;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,GAAG,CAAC;IACZ,OAAO,EAAE,GAAG,CAAC;IACb,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,cAAc,UAAW,oBAAoB,sBAoNzD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchTree.d.ts","sourceRoot":"","sources":["SearchTree.tsx"],"names":[],"mappings":"AAAA,OAAO,KAON,MAAM,OAAO,CAAC;AAKf,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAgBnD,aAAK,gBAAgB,GAAG;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,QAAQ,CAAC;IACnB,QAAQ,EAAE,QAAQ,CAAC;CACpB,CAAC;AAEF,aAAK,KAAK,GAAG;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,YAAY,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC/C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,GAAG,CAAC;IACpB,uBAAuB,CAAC,EAAE,CAAC,eAAe,EAAE,GAAG,KAAK,IAAI,CAAC;CAC1D,CAAC;;
|
|
1
|
+
{"version":3,"file":"SearchTree.d.ts","sourceRoot":"","sources":["SearchTree.tsx"],"names":[],"mappings":"AAAA,OAAO,KAON,MAAM,OAAO,CAAC;AAKf,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAgBnD,aAAK,gBAAgB,GAAG;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,QAAQ,CAAC;IACnB,QAAQ,EAAE,QAAQ,CAAC;CACpB,CAAC;AAEF,aAAK,KAAK,GAAG;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,YAAY,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC/C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,GAAG,CAAC;IACpB,uBAAuB,CAAC,EAAE,CAAC,eAAe,EAAE,GAAG,KAAK,IAAI,CAAC;CAC1D,CAAC;;AA+SF,wBAAsC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tree.d.ts","sourceRoot":"","sources":["Tree.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAKvE,OAAO,EAAE,QAAQ,EAAU,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"Tree.d.ts","sourceRoot":"","sources":["Tree.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAKvE,OAAO,EAAE,QAAQ,EAAU,MAAM,SAAS,CAAC;AAsB3C,aAAK,KAAK,GAAG;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,mBAAmB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAChE,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IACrC,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAC7C,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAAI,CAAC;IACtC,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,wBAAwB,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IACzD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,GAAG,CAAC;CACf,CAAC;AA8GF,iBAAS,IAAI,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,CAAC,YAAY,CA2M9C;AAED,eAAe,IAAI,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { WidgetProps } from '../../../types';
|
|
3
|
-
export declare const DateRangePicker: (props: WidgetProps) => JSX.Element;
|
|
3
|
+
export declare const DateRangePicker: (props: WidgetProps) => React.JSX.Element;
|
|
4
4
|
//# sourceMappingURL=DateRangePicker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateRangePicker.d.ts","sourceRoot":"","sources":["DateRangePicker.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"DateRangePicker.d.ts","sourceRoot":"","sources":["DateRangePicker.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,eAAO,MAAM,eAAe,UAAW,WAAW,sBASjD,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { WidgetProps } from '../../../types';
|
|
3
|
-
export declare const DateTimeRangePicker: (props: WidgetProps) => JSX.Element;
|
|
3
|
+
export declare const DateTimeRangePicker: (props: WidgetProps) => React.JSX.Element;
|
|
4
4
|
//# sourceMappingURL=DateTimeRangePicker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateTimeRangePicker.d.ts","sourceRoot":"","sources":["DateTimeRangePicker.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"DateTimeRangePicker.d.ts","sourceRoot":"","sources":["DateTimeRangePicker.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAKtC,eAAO,MAAM,mBAAmB,UAAW,WAAW,sBAoDrD,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { Field } from "@gisce/ooui";
|
|
3
3
|
declare type Props = {
|
|
4
4
|
field: Field;
|
|
5
5
|
};
|
|
6
|
-
export declare function SearchField(props: Props): JSX.Element;
|
|
6
|
+
export declare function SearchField(props: Props): React.JSX.Element;
|
|
7
7
|
export {};
|
|
8
8
|
//# sourceMappingURL=SearchField.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchField.d.ts","sourceRoot":"","sources":["SearchField.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"SearchField.d.ts","sourceRoot":"","sources":["SearchField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAU1C,OAAO,EAAE,KAAK,EAAgD,MAAM,aAAa,CAAC;AAGlF,aAAK,KAAK,GAAG;IACX,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AAEF,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,qBAyCvC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { SearchFields } from '../../../types';
|
|
3
3
|
declare type Props = {
|
|
4
4
|
fields: any;
|
|
@@ -14,7 +14,8 @@ declare type Props = {
|
|
|
14
14
|
searchError?: string;
|
|
15
15
|
searchValues?: any;
|
|
16
16
|
showLimitOptions?: boolean;
|
|
17
|
+
formXml: string;
|
|
17
18
|
};
|
|
18
|
-
declare function SearchFilter(props: Props): JSX.Element;
|
|
19
|
+
declare function SearchFilter(props: Props): React.JSX.Element;
|
|
19
20
|
export default SearchFilter;
|
|
20
21
|
//# sourceMappingURL=SearchFilter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchFilter.d.ts","sourceRoot":"","sources":["SearchFilter.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"SearchFilter.d.ts","sourceRoot":"","sources":["SearchFilter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAY3D,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAOvC,aAAK,KAAK,GAAG;IACX,MAAM,EAAE,GAAG,CAAC;IACZ,YAAY,EAAE,YAAY,CAAC;IAC3B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IAChC,WAAW,EAAE,OAAO,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,qBAAqB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,iBAAS,YAAY,CAAC,KAAK,EAAE,KAAK,qBA0HjC;AAED,eAAe,YAAY,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gisce/react-ooui",
|
|
3
|
-
"version": "1.2.0-rc.
|
|
3
|
+
"version": "1.2.0-rc.82",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist",
|
|
6
6
|
"src",
|
|
@@ -13,10 +13,6 @@
|
|
|
13
13
|
".": {
|
|
14
14
|
"import": "./dist/react-ooui.es.js",
|
|
15
15
|
"require": "./dist/react-ooui.umd.js"
|
|
16
|
-
},
|
|
17
|
-
"./dist/main.css": {
|
|
18
|
-
"import": "./dist/main.css",
|
|
19
|
-
"require": "./dist/main.css"
|
|
20
16
|
}
|
|
21
17
|
},
|
|
22
18
|
"publishConfig": {
|
|
@@ -27,28 +23,30 @@
|
|
|
27
23
|
"prerelease": "npm version prerelease --preid rc",
|
|
28
24
|
"prepatch": "npm version prepatch --preid rc",
|
|
29
25
|
"premajor": "npm version premajor --preid rc",
|
|
30
|
-
"start": "while :; do vite build --watch --force; done",
|
|
26
|
+
"start": "while :; do tsc && vite build --watch --force; done",
|
|
31
27
|
"build:tailwind": "postcss src/tailwind.css -o src/tailwind.generated.css",
|
|
32
|
-
"build": "vite build",
|
|
28
|
+
"build": "tsc && vite build",
|
|
33
29
|
"test": "jest",
|
|
34
30
|
"storybook": "start-storybook -p 6006",
|
|
35
31
|
"build-storybook": "build-storybook"
|
|
36
32
|
},
|
|
37
33
|
"dependencies": {
|
|
38
34
|
"@ant-design/plots": "^1.0.9",
|
|
39
|
-
"@gisce/ooui": "^0.
|
|
40
|
-
"@gisce/react-formiga-components": "^1.0.9-rc.
|
|
35
|
+
"@gisce/ooui": "^0.19.5-rc.1",
|
|
36
|
+
"@gisce/react-formiga-components": "^1.0.9-rc.21",
|
|
41
37
|
"@gisce/react-formiga-table": "^0.5.0",
|
|
42
38
|
"@monaco-editor/react": "^4.4.5",
|
|
43
|
-
"@tabler/icons": "^
|
|
44
|
-
"antd": "^
|
|
39
|
+
"@tabler/icons-react": "^2.11.0",
|
|
40
|
+
"antd": "^5.5.2",
|
|
45
41
|
"buffer": "^6.0.3",
|
|
46
42
|
"fiber-diagram": "github:gisce/fiber-diagram",
|
|
47
43
|
"file-type": "^16.5.0",
|
|
44
|
+
"interweave": "^13.0.0",
|
|
48
45
|
"react": "^17.0.1",
|
|
49
46
|
"react-dom": "^17.0.1",
|
|
50
47
|
"react-grid-layout": "^1.3.4",
|
|
51
48
|
"react-hotkeys-hook": "^3.4.4",
|
|
49
|
+
"react-markdown": "^8.0.7",
|
|
52
50
|
"react-measure": "^2.5.2",
|
|
53
51
|
"use-deep-compare-effect": "^1.8.1",
|
|
54
52
|
"validator": "^13.6.0"
|
|
@@ -67,8 +65,8 @@
|
|
|
67
65
|
"@types/jest": "^26.0.15",
|
|
68
66
|
"@types/lodash": "^4.14.170",
|
|
69
67
|
"@types/node": "^12.0.0",
|
|
70
|
-
"@types/react": "^
|
|
71
|
-
"@types/react-dom": "^
|
|
68
|
+
"@types/react": "^17.0.1",
|
|
69
|
+
"@types/react-dom": "^17.0.1",
|
|
72
70
|
"@types/react-grid-layout": "^1.3.2",
|
|
73
71
|
"@types/react-measure": "^2.0.7",
|
|
74
72
|
"@types/react-responsive": "^8.0.2",
|
|
@@ -2,14 +2,29 @@ import iconMapper from "../helpers/iconMapper";
|
|
|
2
2
|
import * as Icons from "@ant-design/icons";
|
|
3
3
|
|
|
4
4
|
describe("A IconMapper instance", () => {
|
|
5
|
-
test("should return
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
expect(icon).toBe(defaultIcon);
|
|
5
|
+
test("should return undefined when key not found", () => {
|
|
6
|
+
const icon = iconMapper("foo-bar");
|
|
7
|
+
expect(icon).toBe(undefined);
|
|
9
8
|
});
|
|
10
9
|
test("should return proper help icon when requested", () => {
|
|
11
10
|
const helpIcon = Icons.QuestionOutlined;
|
|
12
|
-
const icon = iconMapper("
|
|
11
|
+
const icon = iconMapper("gtk-help");
|
|
13
12
|
expect(icon).toBe(helpIcon);
|
|
14
13
|
});
|
|
14
|
+
test("should replace all - for _", () => {
|
|
15
|
+
const findAndReplaceIcon = Icons.FileSearchOutlined;
|
|
16
|
+
const icon = iconMapper("gtk-find-and-replace");
|
|
17
|
+
expect(icon).toBe(findAndReplaceIcon);
|
|
18
|
+
})
|
|
19
|
+
test("should return gtk-go", () => {
|
|
20
|
+
const findAndReplaceIcon = Icons.FileSearchOutlined;
|
|
21
|
+
const icon = iconMapper("gtk-find-and-replace");
|
|
22
|
+
expect(icon).toBe(findAndReplaceIcon);
|
|
23
|
+
})
|
|
24
|
+
describe("If key doesn't exist in iconMapper", () => {
|
|
25
|
+
test("should return undefined", () => {
|
|
26
|
+
const icon = iconMapper("gtk-foo-bar");
|
|
27
|
+
expect(icon).toBe(undefined);
|
|
28
|
+
})
|
|
29
|
+
})
|
|
15
30
|
});
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
groupDateTimeValuesIfNeeded,
|
|
4
4
|
getParamsForFields,
|
|
5
5
|
} from "../helpers/searchFilterHelper";
|
|
6
|
-
import
|
|
6
|
+
import dayjs from "dayjs";
|
|
7
7
|
|
|
8
8
|
describe("A SearchFilterHelper instance", () => {
|
|
9
9
|
describe("removeUndefinedFields method", () => {
|
|
@@ -73,10 +73,10 @@ describe("A SearchFilterHelper instance", () => {
|
|
|
73
73
|
const object = {
|
|
74
74
|
charValue: "test",
|
|
75
75
|
floatValue: 0.5,
|
|
76
|
-
"dateField#date": [
|
|
76
|
+
"dateField#date": [dayjs("2021-01-01"), dayjs("2021-01-02")],
|
|
77
77
|
"dateField#time": [
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
dayjs("1970-01-01 00:00"),
|
|
79
|
+
dayjs("1970-01-01 04:00"),
|
|
80
80
|
],
|
|
81
81
|
};
|
|
82
82
|
|
|
@@ -338,7 +338,7 @@ describe("A SearchFilterHelper instance", () => {
|
|
|
338
338
|
},
|
|
339
339
|
};
|
|
340
340
|
const values = {
|
|
341
|
-
field: [
|
|
341
|
+
field: [dayjs("2021-01-01"), dayjs("2021-01-02")],
|
|
342
342
|
};
|
|
343
343
|
const params = getParamsForFields(values, fields);
|
|
344
344
|
expect(Array.isArray(params)).toBeTruthy();
|
|
@@ -363,8 +363,8 @@ describe("A SearchFilterHelper instance", () => {
|
|
|
363
363
|
},
|
|
364
364
|
};
|
|
365
365
|
const values = {
|
|
366
|
-
"field#date": [
|
|
367
|
-
"field#time": [
|
|
366
|
+
"field#date": [dayjs("2021-01-01"), dayjs("2021-01-02")],
|
|
367
|
+
"field#time": [dayjs("1970-01-01 03:31"), dayjs("1970-01-01 03:32")],
|
|
368
368
|
};
|
|
369
369
|
const params = getParamsForFields(values, fields);
|
|
370
370
|
expect(Array.isArray(params)).toBeTruthy();
|
|
@@ -103,30 +103,28 @@ function AttachmentsButton(props: AttachmentsButtonProps) {
|
|
|
103
103
|
preloadAttachments();
|
|
104
104
|
}, [preloadAttachments]);
|
|
105
105
|
|
|
106
|
-
return (
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
</>
|
|
129
|
-
);
|
|
106
|
+
return (<>
|
|
107
|
+
<AttachmentsButtonWrapper
|
|
108
|
+
numberOfAttachments={attachments.length}
|
|
109
|
+
attachments={preloadedAttachments}
|
|
110
|
+
disabled={disabled}
|
|
111
|
+
loading={preloading}
|
|
112
|
+
onAddNewAttachment={onAddNewAttachment}
|
|
113
|
+
onListAllAttachments={onListAllAttachments}
|
|
114
|
+
onopenAttachmentLink={openAttachmentLink}
|
|
115
|
+
onOpenAttachmentDetail={openAttachmentDetail}
|
|
116
|
+
/>
|
|
117
|
+
<Modal
|
|
118
|
+
title={t("downloadingAttachment")}
|
|
119
|
+
open={downloading}
|
|
120
|
+
footer={null}
|
|
121
|
+
closable={false}
|
|
122
|
+
centered
|
|
123
|
+
maskClosable={false}
|
|
124
|
+
>
|
|
125
|
+
<Spin />
|
|
126
|
+
</Modal>
|
|
127
|
+
</>);
|
|
130
128
|
}
|
|
131
129
|
|
|
132
130
|
export default AttachmentsButton;
|
|
@@ -8,7 +8,11 @@ import {
|
|
|
8
8
|
TableOutlined,
|
|
9
9
|
} from "@ant-design/icons";
|
|
10
10
|
import { Popover, Button, Row, Col, Tooltip, Spin } from "antd";
|
|
11
|
-
import {
|
|
11
|
+
import {
|
|
12
|
+
LocaleContext,
|
|
13
|
+
LocaleContextType,
|
|
14
|
+
tForLang,
|
|
15
|
+
} from "@/context/LocaleContext";
|
|
12
16
|
|
|
13
17
|
export type Attachment = {
|
|
14
18
|
id: number;
|
|
@@ -32,7 +36,7 @@ export const AttachmentsButtonWrapper = (
|
|
|
32
36
|
props: AttachmentsButtonWrapperProps
|
|
33
37
|
) => {
|
|
34
38
|
const { numberOfAttachments, disabled } = props;
|
|
35
|
-
const { t } = useContext(LocaleContext) as LocaleContextType;
|
|
39
|
+
const { t, lang } = useContext(LocaleContext) as LocaleContextType;
|
|
36
40
|
const [popoverVisible, setPopoverVisible] = useState<boolean>(false);
|
|
37
41
|
|
|
38
42
|
const button = (
|
|
@@ -52,7 +56,7 @@ export const AttachmentsButtonWrapper = (
|
|
|
52
56
|
onVisibleChange={(visible: boolean) => setPopoverVisible(visible)}
|
|
53
57
|
visible={popoverVisible}
|
|
54
58
|
placement="bottom"
|
|
55
|
-
content={Content(props, setPopoverVisible)}
|
|
59
|
+
content={Content(props, setPopoverVisible, lang)}
|
|
56
60
|
title={t("attachments")}
|
|
57
61
|
arrowContent={null}
|
|
58
62
|
>
|
|
@@ -63,7 +67,8 @@ export const AttachmentsButtonWrapper = (
|
|
|
63
67
|
|
|
64
68
|
const Content = (
|
|
65
69
|
props: AttachmentsButtonWrapperProps,
|
|
66
|
-
setPopoverVisible: (visible: boolean) => void
|
|
70
|
+
setPopoverVisible: (visible: boolean) => void,
|
|
71
|
+
locale: string
|
|
67
72
|
) => {
|
|
68
73
|
const {
|
|
69
74
|
attachments = [],
|
|
@@ -73,8 +78,6 @@ const Content = (
|
|
|
73
78
|
onOpenAttachmentDetail,
|
|
74
79
|
onListAllAttachments,
|
|
75
80
|
} = props;
|
|
76
|
-
const { t } = useContext(LocaleContext) as LocaleContextType;
|
|
77
|
-
|
|
78
81
|
if (loading) {
|
|
79
82
|
return <Spin style={{ padding: 20 }} />;
|
|
80
83
|
}
|
|
@@ -89,7 +92,7 @@ const Content = (
|
|
|
89
92
|
onListAllAttachments();
|
|
90
93
|
}}
|
|
91
94
|
>
|
|
92
|
-
<TableOutlined /> {
|
|
95
|
+
<TableOutlined /> {tForLang("listAllAttachments", locale)}
|
|
93
96
|
</a>
|
|
94
97
|
<a
|
|
95
98
|
style={{ display: "block" }}
|
|
@@ -99,11 +102,11 @@ const Content = (
|
|
|
99
102
|
onAddNewAttachment();
|
|
100
103
|
}}
|
|
101
104
|
>
|
|
102
|
-
<FileAddOutlined /> {
|
|
105
|
+
<FileAddOutlined /> {tForLang("addNewAttachment", locale)}
|
|
103
106
|
</a>
|
|
104
107
|
{attachments.length > 0 && (
|
|
105
108
|
<>
|
|
106
|
-
<li className="
|
|
109
|
+
<li className="ant-dropdown-menu-item-divider"></li>
|
|
107
110
|
{attachments.map((attachment: any) => {
|
|
108
111
|
const Icon = attachment.link ? LinkOutlined : DownloadOutlined;
|
|
109
112
|
return (
|
|
@@ -119,8 +122,8 @@ const Content = (
|
|
|
119
122
|
<Tooltip
|
|
120
123
|
title={
|
|
121
124
|
attachment.link
|
|
122
|
-
?
|
|
123
|
-
:
|
|
125
|
+
? tForLang("openAttachmentLink", locale)
|
|
126
|
+
: tForLang("download", locale)
|
|
124
127
|
}
|
|
125
128
|
>
|
|
126
129
|
<Icon
|
|
@@ -134,7 +137,7 @@ const Content = (
|
|
|
134
137
|
)}
|
|
135
138
|
</Col>
|
|
136
139
|
<Col flex="25px" style={{ textAlign: "center" }}>
|
|
137
|
-
<Tooltip title={
|
|
140
|
+
<Tooltip title={tForLang("openAttachment", locale)}>
|
|
138
141
|
<FormOutlined
|
|
139
142
|
style={{ cursor: "pointer" }}
|
|
140
143
|
onClick={() => {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import ButtonWithTooltip, {Props as ButtonWithTooltipProps } from "@/common/ButtonWithTooltip";
|
|
3
|
+
import { theme } from 'antd';
|
|
4
|
+
const { useToken } = theme;
|
|
3
5
|
|
|
4
6
|
type Props = ButtonWithTooltipProps & {
|
|
5
7
|
badgeNumber?: number;
|
|
@@ -7,6 +9,7 @@ type Props = ButtonWithTooltipProps & {
|
|
|
7
9
|
|
|
8
10
|
function ButtonWithBadge(props: Props) {
|
|
9
11
|
const { badgeNumber = 0, ...restProps } = props;
|
|
12
|
+
const { token } = useToken();
|
|
10
13
|
|
|
11
14
|
return (
|
|
12
15
|
<div style={{ position: "relative" }}>
|
|
@@ -20,8 +23,8 @@ function ButtonWithBadge(props: Props) {
|
|
|
20
23
|
borderRadius: "50%",
|
|
21
24
|
fontSize: "12px",
|
|
22
25
|
textAlign: "center",
|
|
23
|
-
background:
|
|
24
|
-
color:
|
|
26
|
+
background: token.colorPrimaryBg,
|
|
27
|
+
color: token.colorPrimaryHover,
|
|
25
28
|
}}
|
|
26
29
|
>
|
|
27
30
|
{badgeNumber}
|
|
@@ -57,9 +57,7 @@ function ChangeViewButton(props: Props) {
|
|
|
57
57
|
{getIconForView(view)}
|
|
58
58
|
</Col>
|
|
59
59
|
<Col flex="auto" style={{ paddingRight: 20 }}>
|
|
60
|
-
{view.type
|
|
61
|
-
? (view as GraphView).name
|
|
62
|
-
: view.type.charAt(0).toUpperCase() + view.type.slice(1)}
|
|
60
|
+
{view.type.charAt(0).toUpperCase() + view.type.slice(1)}
|
|
63
61
|
</Col>
|
|
64
62
|
<Col flex="none">
|
|
65
63
|
<CheckOutlined
|
|
@@ -104,11 +102,15 @@ function ChangeViewButton(props: Props) {
|
|
|
104
102
|
}
|
|
105
103
|
|
|
106
104
|
return (
|
|
107
|
-
|
|
105
|
+
<div style={{ display: "flex" }}>
|
|
108
106
|
<ButtonWithTooltip
|
|
109
107
|
tooltip={previousView ? t("viewAs") + " " + t(previousView.type) : ""}
|
|
110
108
|
icon={getIconForView(previousView)}
|
|
111
|
-
style={{
|
|
109
|
+
style={{
|
|
110
|
+
width: 50,
|
|
111
|
+
borderTopRightRadius: 0,
|
|
112
|
+
borderBottomRightRadius: 0,
|
|
113
|
+
}}
|
|
112
114
|
onClick={() => {
|
|
113
115
|
handleMenuClick({ key: previousView?.view_id });
|
|
114
116
|
}}
|
|
@@ -119,12 +121,16 @@ function ChangeViewButton(props: Props) {
|
|
|
119
121
|
disabled={disabled || availableViews.length === 1}
|
|
120
122
|
>
|
|
121
123
|
<Button
|
|
122
|
-
style={{
|
|
124
|
+
style={{
|
|
125
|
+
width: 25,
|
|
126
|
+
borderTopLeftRadius: 0,
|
|
127
|
+
borderBottomLeftRadius: 0,
|
|
128
|
+
}}
|
|
123
129
|
icon={<DownOutlined style={{ fontSize: "0.5em" }} />}
|
|
124
130
|
onClick={(e) => e.preventDefault()}
|
|
125
131
|
></Button>
|
|
126
132
|
</Dropdown>
|
|
127
|
-
|
|
133
|
+
</div>
|
|
128
134
|
);
|
|
129
135
|
}
|
|
130
136
|
|