@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
package/src/index.ts
CHANGED
|
@@ -37,7 +37,9 @@ import { Image } from "@/widgets/base/Image";
|
|
|
37
37
|
import showConfirmDialog from "@/ui/ConfirmDialog";
|
|
38
38
|
import Dashboard from "@/widgets/views/Dashboard/Dashboard";
|
|
39
39
|
import { Tags } from "@/widgets/custom/Tags";
|
|
40
|
+
import { Tag } from "@/widgets/custom/Tag";
|
|
40
41
|
import { MultiCheckbox } from "./widgets/custom/MultiCheckbox";
|
|
42
|
+
import { Markdown } from "@/widgets/custom/Markdown";
|
|
41
43
|
import { Radio } from "@/widgets/custom/Radio";
|
|
42
44
|
import { Switch } from "@/widgets/custom/Switch";
|
|
43
45
|
import { Steps } from "@/widgets/custom/Steps";
|
|
@@ -77,6 +79,7 @@ import TabSelector from "./views/TabSelector";
|
|
|
77
79
|
import CurrentTabContent from "./views/CurrentTabContent";
|
|
78
80
|
import ContentRootProvider from "./context/ContentRootContext";
|
|
79
81
|
import FavouriteButton from "./ui/FavouriteButton";
|
|
82
|
+
import { ConfigContext } from "./context/ConfigContext";
|
|
80
83
|
|
|
81
84
|
export {
|
|
82
85
|
Button,
|
|
@@ -145,10 +148,13 @@ export {
|
|
|
145
148
|
DashboardGridItem,
|
|
146
149
|
DashboardGrid,
|
|
147
150
|
Tags,
|
|
151
|
+
Tag,
|
|
148
152
|
MultiCheckbox,
|
|
153
|
+
Markdown,
|
|
149
154
|
Radio,
|
|
150
155
|
Switch,
|
|
151
156
|
Steps,
|
|
152
157
|
CodeEditor,
|
|
153
158
|
ExportModal,
|
|
159
|
+
ConfigContext,
|
|
154
160
|
};
|
package/src/locales/ca_ES.tsx
CHANGED
|
@@ -88,4 +88,6 @@ export default {
|
|
|
88
88
|
selectAtLeastOneField: "Selecciona almenys un camp per a l'exportació",
|
|
89
89
|
printScreen: "Imprimir pantalla",
|
|
90
90
|
advancedExport: "Exportació avançada",
|
|
91
|
+
savedRegisters: "Registre guardat correctament",
|
|
92
|
+
errorWhileSavingForm: "Error en guardar el formulari",
|
|
91
93
|
};
|
package/src/locales/en_US.tsx
CHANGED
package/src/locales/es_ES.tsx
CHANGED
|
@@ -89,4 +89,6 @@ export default {
|
|
|
89
89
|
selectAtLeastOneField: "Selecciona al menos un campo para la exportación",
|
|
90
90
|
printScreen: "Imprimir pantalla",
|
|
91
91
|
advancedExport: "Exportación avanzada",
|
|
92
|
+
savedRegisters: "Registro guardado correctamente",
|
|
93
|
+
errorWhileSavingForm: "Error al guardar el formulario",
|
|
92
94
|
};
|
|
@@ -2,7 +2,10 @@ import React, { useState } from "react";
|
|
|
2
2
|
|
|
3
3
|
import { BinaryInput } from "../widgets/base/Binary";
|
|
4
4
|
import { Binary as BinaryOoui } from "@gisce/ooui";
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
// import "antd/dist/antd.css";
|
|
7
|
+
|
|
8
|
+
|
|
6
9
|
import LocaleProvider from "../context/LocaleContext";
|
|
7
10
|
|
|
8
11
|
export default {
|
|
@@ -2,7 +2,10 @@ import React from "react";
|
|
|
2
2
|
|
|
3
3
|
import { Boolean } from "..";
|
|
4
4
|
import { Boolean as BooleanOoui } from "@gisce/ooui";
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
// import "antd/dist/antd.css";
|
|
7
|
+
|
|
8
|
+
|
|
6
9
|
import LocaleProvider from "../context/LocaleContext";
|
|
7
10
|
|
|
8
11
|
export default {
|
|
@@ -2,7 +2,10 @@ import React from "react";
|
|
|
2
2
|
|
|
3
3
|
import { Button } from "..";
|
|
4
4
|
import { Button as ButtonOoui } from "@gisce/ooui";
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
// import "antd/dist/antd.css";
|
|
7
|
+
|
|
8
|
+
|
|
6
9
|
import LocaleProvider from "../context/LocaleContext";
|
|
7
10
|
|
|
8
11
|
export default {
|
|
@@ -2,7 +2,10 @@ import React from "react";
|
|
|
2
2
|
|
|
3
3
|
import { FiberGrid } from "../widgets/custom/FiberGrid";
|
|
4
4
|
import { Char as CharOoui } from "@gisce/ooui";
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
// import "antd/dist/antd.css";
|
|
7
|
+
|
|
8
|
+
|
|
6
9
|
import LocaleProvider from "../context/LocaleContext";
|
|
7
10
|
import { Form } from "antd";
|
|
8
11
|
|
|
@@ -2,7 +2,10 @@ import React from "react";
|
|
|
2
2
|
|
|
3
3
|
import { Float } from "..";
|
|
4
4
|
import { Float as FloatOoui } from "@gisce/ooui";
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
// import "antd/dist/antd.css";
|
|
7
|
+
|
|
8
|
+
|
|
6
9
|
import LocaleProvider from "../context/LocaleContext";
|
|
7
10
|
|
|
8
11
|
export default {
|
|
@@ -2,7 +2,10 @@ import React, { useState } from "react";
|
|
|
2
2
|
|
|
3
3
|
import { FloatTimeInput } from "../widgets/base/FloatTime";
|
|
4
4
|
import { Float as FloatOoui } from "@gisce/ooui";
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
// import "antd/dist/antd.css";
|
|
7
|
+
|
|
8
|
+
|
|
6
9
|
import LocaleProvider from "../context/LocaleContext";
|
|
7
10
|
|
|
8
11
|
export default {
|
|
@@ -2,7 +2,10 @@ import React from "react";
|
|
|
2
2
|
|
|
3
3
|
import { Image } from "..";
|
|
4
4
|
import { Image as ImageOoui } from "@gisce/ooui";
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
// import "antd/dist/antd.css";
|
|
7
|
+
|
|
8
|
+
|
|
6
9
|
import LocaleProvider from "../context/LocaleContext";
|
|
7
10
|
|
|
8
11
|
export default {
|
|
@@ -2,7 +2,10 @@ import React from "react";
|
|
|
2
2
|
|
|
3
3
|
import { Integer } from "..";
|
|
4
4
|
import { Integer as IntegerOoui } from "@gisce/ooui";
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
// import "antd/dist/antd.css";
|
|
7
|
+
|
|
8
|
+
|
|
6
9
|
import LocaleProvider from "../context/LocaleContext";
|
|
7
10
|
|
|
8
11
|
export default {
|
|
@@ -2,7 +2,10 @@ import React from "react";
|
|
|
2
2
|
|
|
3
3
|
import { Label } from "..";
|
|
4
4
|
import { Label as LabelOoui } from "@gisce/ooui";
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
// import "antd/dist/antd.css";
|
|
7
|
+
|
|
8
|
+
|
|
6
9
|
import LocaleProvider from "../context/LocaleContext";
|
|
7
10
|
|
|
8
11
|
export default {
|
|
@@ -12,7 +15,7 @@ export default {
|
|
|
12
15
|
export const Default = (): React.ReactElement => {
|
|
13
16
|
const ooui = new LabelOoui({
|
|
14
17
|
name: "field",
|
|
15
|
-
string: "Lorem ipsum",
|
|
18
|
+
string: "<b>Lorem ipsum</b>",
|
|
16
19
|
});
|
|
17
20
|
return (
|
|
18
21
|
<LocaleProvider lang="en_US">
|
|
@@ -25,7 +28,7 @@ export const LabelSecondary = (): React.ReactElement => {
|
|
|
25
28
|
const ooui = new LabelOoui({
|
|
26
29
|
name: "field",
|
|
27
30
|
string: "Lorem ipsum",
|
|
28
|
-
widget_props: "{'label_type': 'secondary'}"
|
|
31
|
+
widget_props: "{'label_type': 'secondary'}",
|
|
29
32
|
});
|
|
30
33
|
return (
|
|
31
34
|
<LocaleProvider lang="en_US">
|
|
@@ -38,7 +41,7 @@ export const LabelWaning = (): React.ReactElement => {
|
|
|
38
41
|
const ooui = new LabelOoui({
|
|
39
42
|
name: "field",
|
|
40
43
|
string: "Lorem ipsum",
|
|
41
|
-
widget_props: "{'label_type': 'warning'}"
|
|
44
|
+
widget_props: "{'label_type': 'warning'}",
|
|
42
45
|
});
|
|
43
46
|
return (
|
|
44
47
|
<LocaleProvider lang="en_US">
|
|
@@ -51,7 +54,7 @@ export const LabelDanger = (): React.ReactElement => {
|
|
|
51
54
|
const ooui = new LabelOoui({
|
|
52
55
|
name: "field",
|
|
53
56
|
string: "Lorem ipsum",
|
|
54
|
-
widget_props: "{'label_type': 'danger'}"
|
|
57
|
+
widget_props: "{'label_type': 'danger'}",
|
|
55
58
|
});
|
|
56
59
|
return (
|
|
57
60
|
<LocaleProvider lang="en_US">
|
|
@@ -64,7 +67,7 @@ export const LabelSuccess = (): React.ReactElement => {
|
|
|
64
67
|
const ooui = new LabelOoui({
|
|
65
68
|
name: "field",
|
|
66
69
|
string: "Lorem ipsum",
|
|
67
|
-
widget_props: "{'label_type': 'success'}"
|
|
70
|
+
widget_props: "{'label_type': 'success'}",
|
|
68
71
|
});
|
|
69
72
|
return (
|
|
70
73
|
<LocaleProvider lang="en_US">
|
|
@@ -73,12 +76,11 @@ export const LabelSuccess = (): React.ReactElement => {
|
|
|
73
76
|
);
|
|
74
77
|
};
|
|
75
78
|
|
|
76
|
-
|
|
77
79
|
export const LabelH1 = (): React.ReactElement => {
|
|
78
80
|
const ooui = new LabelOoui({
|
|
79
81
|
name: "field",
|
|
80
82
|
string: "Lorem ipsum",
|
|
81
|
-
widget_props: "{'label_size':
|
|
83
|
+
widget_props: "{'label_size': 1}",
|
|
82
84
|
});
|
|
83
85
|
return (
|
|
84
86
|
<LocaleProvider lang="en_US">
|
|
@@ -91,7 +93,7 @@ export const LabelH2Warning = (): React.ReactElement => {
|
|
|
91
93
|
const ooui = new LabelOoui({
|
|
92
94
|
name: "field",
|
|
93
95
|
string: "Lorem ipsum",
|
|
94
|
-
widget_props: "{'label_size':
|
|
96
|
+
widget_props: "{'label_size': 2, 'label_type': 'warning'}",
|
|
95
97
|
});
|
|
96
98
|
return (
|
|
97
99
|
<LocaleProvider lang="en_US">
|
|
@@ -2,7 +2,10 @@ import React from "react";
|
|
|
2
2
|
|
|
3
3
|
import { Many2one } from "..";
|
|
4
4
|
import { Many2one as Many2oneOoui } from "@gisce/ooui";
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
// import "antd/dist/antd.css";
|
|
7
|
+
|
|
8
|
+
|
|
6
9
|
import LocaleProvider from "../context/LocaleContext";
|
|
7
10
|
|
|
8
11
|
export default {
|
|
@@ -2,7 +2,10 @@ import React from "react";
|
|
|
2
2
|
|
|
3
3
|
import { One2many } from "..";
|
|
4
4
|
import { One2many as One2manyOoui } from "@gisce/ooui";
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
// import "antd/dist/antd.css";
|
|
7
|
+
|
|
8
|
+
|
|
6
9
|
import LocaleProvider from "../context/LocaleContext";
|
|
7
10
|
|
|
8
11
|
export default {
|
|
@@ -2,7 +2,10 @@ import React from "react";
|
|
|
2
2
|
|
|
3
3
|
import { ProgressBarInput } from "../widgets/base/ProgressBar";
|
|
4
4
|
import { Float as FloatOoui } from "@gisce/ooui";
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
// import "antd/dist/antd.css";
|
|
7
|
+
|
|
8
|
+
|
|
6
9
|
import LocaleProvider from "../context/LocaleContext";
|
|
7
10
|
|
|
8
11
|
export default {
|
|
@@ -2,7 +2,10 @@ import React from "react";
|
|
|
2
2
|
|
|
3
3
|
import { ReferenceInput } from "../widgets/base/Reference";
|
|
4
4
|
import { Reference as ReferenceOoui } from "@gisce/ooui";
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
// import "antd/dist/antd.css";
|
|
7
|
+
|
|
8
|
+
|
|
6
9
|
import LocaleProvider from "../context/LocaleContext";
|
|
7
10
|
|
|
8
11
|
export default {
|
|
@@ -2,7 +2,10 @@ import React from "react";
|
|
|
2
2
|
|
|
3
3
|
import { SelectionInput } from "../widgets/base/Selection";
|
|
4
4
|
import { Selection as SelectionOoui } from "@gisce/ooui";
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
// import "antd/dist/antd.css";
|
|
7
|
+
|
|
8
|
+
|
|
6
9
|
import LocaleProvider from "../context/LocaleContext";
|
|
7
10
|
|
|
8
11
|
import { withKnobs, text } from "@storybook/addon-knobs";
|
|
@@ -2,7 +2,10 @@ import React from "react";
|
|
|
2
2
|
|
|
3
3
|
import { Separator } from "..";
|
|
4
4
|
import { Separator as SeparatorOoui } from "@gisce/ooui";
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
// import "antd/dist/antd.css";
|
|
7
|
+
|
|
8
|
+
|
|
6
9
|
import LocaleProvider from "../context/LocaleContext";
|
|
7
10
|
|
|
8
11
|
export default {
|
|
@@ -19,3 +22,36 @@ export const Default = (): React.ReactElement => {
|
|
|
19
22
|
</LocaleProvider>
|
|
20
23
|
);
|
|
21
24
|
};
|
|
25
|
+
|
|
26
|
+
export const WithoutText = (): React.ReactElement => {
|
|
27
|
+
const ooui = new SeparatorOoui({
|
|
28
|
+
});
|
|
29
|
+
return (
|
|
30
|
+
<LocaleProvider lang="en_US">
|
|
31
|
+
<Separator ooui={ooui} showLabel />
|
|
32
|
+
</LocaleProvider>
|
|
33
|
+
);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export const OnlyIcon = (): React.ReactElement => {
|
|
37
|
+
const ooui = new SeparatorOoui({
|
|
38
|
+
icon: "home"
|
|
39
|
+
});
|
|
40
|
+
return (
|
|
41
|
+
<LocaleProvider lang="en_US">
|
|
42
|
+
<Separator ooui={ooui} showLabel />
|
|
43
|
+
</LocaleProvider>
|
|
44
|
+
);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export const WithIcon = (): React.ReactElement => {
|
|
48
|
+
const ooui = new SeparatorOoui({
|
|
49
|
+
string: "General",
|
|
50
|
+
icon: "home"
|
|
51
|
+
});
|
|
52
|
+
return (
|
|
53
|
+
<LocaleProvider lang="en_US">
|
|
54
|
+
<Separator ooui={ooui} showLabel />
|
|
55
|
+
</LocaleProvider>
|
|
56
|
+
);
|
|
57
|
+
};
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
// import "antd/dist/antd.css";
|
|
4
|
+
|
|
5
|
+
|
|
3
6
|
import "@/tailwind.generated.css";
|
|
4
7
|
|
|
5
8
|
import { withKnobs, number, text } from "@storybook/addon-knobs";
|
|
@@ -61,3 +64,27 @@ export const Default = (): React.ReactElement => {
|
|
|
61
64
|
</LocaleProvider>
|
|
62
65
|
);
|
|
63
66
|
};
|
|
67
|
+
|
|
68
|
+
export const WithIcon = (): React.ReactElement => {
|
|
69
|
+
const ooui = new GroupOoui({
|
|
70
|
+
string: "General",
|
|
71
|
+
icon: "home"
|
|
72
|
+
});
|
|
73
|
+
return (
|
|
74
|
+
<LocaleProvider lang="en_US">
|
|
75
|
+
<Group ooui={ooui} />
|
|
76
|
+
</LocaleProvider>
|
|
77
|
+
);
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
export const OnlyIcon = (): React.ReactElement => {
|
|
82
|
+
const ooui = new GroupOoui({
|
|
83
|
+
icon: "home"
|
|
84
|
+
});
|
|
85
|
+
return (
|
|
86
|
+
<LocaleProvider lang="en_US">
|
|
87
|
+
<Group ooui={ooui} />
|
|
88
|
+
</LocaleProvider>
|
|
89
|
+
);
|
|
90
|
+
};
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
// import "antd/dist/antd.css";
|
|
4
|
+
|
|
5
|
+
|
|
3
6
|
import "@/tailwind.generated.css";
|
|
4
7
|
|
|
5
8
|
import { withKnobs } from "@storybook/addon-knobs";
|
|
@@ -167,3 +170,30 @@ export const IconTabs = (): React.ReactElement => {
|
|
|
167
170
|
</LocaleProvider>
|
|
168
171
|
);
|
|
169
172
|
};
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
export const IconTablerTabs = (): React.ReactElement => {
|
|
176
|
+
|
|
177
|
+
const arch = `<form>
|
|
178
|
+
<notebook name="notebook">
|
|
179
|
+
<page string="Home" icon="bolt">
|
|
180
|
+
<field name="name" />
|
|
181
|
+
</page>
|
|
182
|
+
<page string="Attributes" icon="address-book">
|
|
183
|
+
<field name="surname" />
|
|
184
|
+
</page>
|
|
185
|
+
</notebook>
|
|
186
|
+
</form>`;
|
|
187
|
+
|
|
188
|
+
const formOoui = new FormOoui(fields);
|
|
189
|
+
formOoui.parse(arch);
|
|
190
|
+
const notebookOoui = formOoui.findById("notebook") as NotebookOoui;
|
|
191
|
+
|
|
192
|
+
return (
|
|
193
|
+
<LocaleProvider lang="en_US">
|
|
194
|
+
<Form>
|
|
195
|
+
<Notebook ooui={notebookOoui} />
|
|
196
|
+
</Form>
|
|
197
|
+
</LocaleProvider>
|
|
198
|
+
);
|
|
199
|
+
};
|
|
@@ -4,7 +4,10 @@ import { Dropdown, Menu } from 'antd';
|
|
|
4
4
|
import { DownOutlined, UserOutlined } from '@ant-design/icons';
|
|
5
5
|
import { ButtonGroup as ButtonGroupOoui, Button as ButtonOoui } from "@gisce/ooui";
|
|
6
6
|
import { ButtonGroup } from "../../widgets/custom/ButtonGroup";
|
|
7
|
-
|
|
7
|
+
|
|
8
|
+
// import "antd/dist/antd.css";
|
|
9
|
+
|
|
10
|
+
|
|
8
11
|
import LocaleProvider from "../../context/LocaleContext";
|
|
9
12
|
|
|
10
13
|
export default {
|
|
@@ -2,7 +2,10 @@ import React from "react";
|
|
|
2
2
|
|
|
3
3
|
import { CodeEditor } from "../../widgets/custom/CodeEditor";
|
|
4
4
|
import { CodeEditor as CodeEditorOoui } from "@gisce/ooui";
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
// import "antd/dist/antd.css";
|
|
7
|
+
|
|
8
|
+
|
|
6
9
|
import LocaleProvider from "../../context/LocaleContext";
|
|
7
10
|
|
|
8
11
|
export default {
|
|
@@ -2,7 +2,10 @@ import React, {useState} from "react";
|
|
|
2
2
|
|
|
3
3
|
import {Indicator} from "../../widgets/custom/Indicator";
|
|
4
4
|
import { Indicator as IndicatorOoui } from "@gisce/ooui";
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
// import "antd/dist/antd.css";
|
|
7
|
+
|
|
8
|
+
|
|
6
9
|
import LocaleProvider from "../../context/LocaleContext";
|
|
7
10
|
|
|
8
11
|
export default {
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Markdown as MarkdownOOui } from "@gisce/ooui";
|
|
3
|
+
|
|
4
|
+
// import "antd/dist/antd.css";
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
import LocaleProvider from "../../context/LocaleContext";
|
|
8
|
+
import { MarkdownInput } from "../../widgets/custom/Markdown";
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
title: "Components/Widgets/Custom/Markdown",
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
export const Default = (): React.ReactElement => {
|
|
16
|
+
const ooui = new MarkdownOOui({
|
|
17
|
+
name: "enabled",
|
|
18
|
+
string: "Lorem ipsum",
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
const markdown = `A paragraph with *emphasis* and **strong importance**.
|
|
22
|
+
|
|
23
|
+
> A block quote with ~strikethrough~ and a URL: https://reactjs.org.
|
|
24
|
+
|
|
25
|
+
## Header 2
|
|
26
|
+
|
|
27
|
+
* Lists
|
|
28
|
+
* [ ] todo
|
|
29
|
+
* [x] done
|
|
30
|
+
|
|
31
|
+
A table:
|
|
32
|
+
|
|
33
|
+
| a | b |
|
|
34
|
+
| - | - |
|
|
35
|
+
`
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<LocaleProvider lang="en_US">
|
|
39
|
+
<MarkdownInput ooui={ooui} value={markdown} />
|
|
40
|
+
</LocaleProvider>
|
|
41
|
+
);
|
|
42
|
+
};
|
|
@@ -3,7 +3,10 @@ import React from "react";
|
|
|
3
3
|
import { MultiCheckboxInput } from "../../widgets/custom/MultiCheckbox";
|
|
4
4
|
import { Checkbox, Space, Row, Col } from "antd";
|
|
5
5
|
import { MultiCheckbox as MultiCheckboxOoui } from "@gisce/ooui";
|
|
6
|
-
|
|
6
|
+
|
|
7
|
+
// import "antd/dist/antd.css";
|
|
8
|
+
|
|
9
|
+
|
|
7
10
|
import LocaleProvider from "../../context/LocaleContext";
|
|
8
11
|
|
|
9
12
|
export default {
|
|
@@ -2,7 +2,10 @@ import React from "react";
|
|
|
2
2
|
|
|
3
3
|
import { Radio } from "../../widgets/custom/Radio";
|
|
4
4
|
import { Radio as RadioOoui } from "@gisce/ooui";
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
// import "antd/dist/antd.css";
|
|
7
|
+
|
|
8
|
+
|
|
6
9
|
import LocaleProvider from "../../context/LocaleContext";
|
|
7
10
|
|
|
8
11
|
export default {
|
|
@@ -2,7 +2,10 @@ import React from "react";
|
|
|
2
2
|
|
|
3
3
|
import { Steps, StepsInput } from "../../widgets/custom/Steps";
|
|
4
4
|
import { Steps as StepsOoui } from "@gisce/ooui";
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
// import "antd/dist/antd.css";
|
|
7
|
+
|
|
8
|
+
|
|
6
9
|
import LocaleProvider from "../../context/LocaleContext";
|
|
7
10
|
|
|
8
11
|
export default {
|
|
@@ -2,7 +2,10 @@ import React from "react";
|
|
|
2
2
|
|
|
3
3
|
import { Switch } from "../../widgets/custom/Switch";
|
|
4
4
|
import { Switch as SwitchOoui } from "@gisce/ooui";
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
// import "antd/dist/antd.css";
|
|
7
|
+
|
|
8
|
+
|
|
6
9
|
import LocaleProvider from "../../context/LocaleContext";
|
|
7
10
|
|
|
8
11
|
export default {
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
import { Tag as TagOoui } from "@gisce/ooui";
|
|
4
|
+
|
|
5
|
+
// import "antd/dist/antd.css";
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
import LocaleProvider from "../../context/LocaleContext";
|
|
9
|
+
import { TagInput } from "../../widgets/custom/Tag";
|
|
10
|
+
|
|
11
|
+
export default {
|
|
12
|
+
title: "Components/Widgets/Custom/Tag",
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const Default = (): React.ReactElement => {
|
|
16
|
+
const ooui = new TagOoui({
|
|
17
|
+
name: "status",
|
|
18
|
+
string: "Status",
|
|
19
|
+
field: "status",
|
|
20
|
+
selection: [['draft', 'Draft'], ['open', 'Open']],
|
|
21
|
+
widget_props: '{"colors": {"draft": "blue", "open": "green"}}'
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<LocaleProvider lang="en_US">
|
|
26
|
+
<TagInput value="draft" ooui={ooui}/>
|
|
27
|
+
</LocaleProvider>
|
|
28
|
+
);
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export const WithoutColor = (): React.ReactElement => {
|
|
32
|
+
const ooui = new TagOoui({
|
|
33
|
+
name: "status",
|
|
34
|
+
string: "Status",
|
|
35
|
+
field: "status",
|
|
36
|
+
selection: [['draft', 'Draft'], ['open', 'Open']],
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
<LocaleProvider lang="en_US">
|
|
41
|
+
<TagInput value="draft" ooui={ooui}/>
|
|
42
|
+
</LocaleProvider>
|
|
43
|
+
);
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export const WithColorAuto = (): React.ReactElement => {
|
|
47
|
+
const ooui = new TagOoui({
|
|
48
|
+
name: "status",
|
|
49
|
+
string: "Status",
|
|
50
|
+
field: "status",
|
|
51
|
+
selection: [['draft', 'Draft'], ['open', 'Open']],
|
|
52
|
+
widget_props: '{"colors": "auto"}'
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
return (
|
|
56
|
+
<LocaleProvider lang="en_US">
|
|
57
|
+
<TagInput value="draft" ooui={ooui}/>
|
|
58
|
+
</LocaleProvider>
|
|
59
|
+
);
|
|
60
|
+
};
|