@gisce/react-ooui 1.2.0-rc.1 → 1.2.0-rc.11
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/ActionButton.d.ts +1 -0
- package/dist/actionbar/ActionButton.d.ts.map +1 -1
- package/dist/actionbar/AttachmentsButton.d.ts +1 -0
- package/dist/actionbar/AttachmentsButton.d.ts.map +1 -1
- package/dist/actionbar/AttachmentsButtonWrapper.d.ts +1 -0
- package/dist/actionbar/AttachmentsButtonWrapper.d.ts.map +1 -1
- package/dist/actionbar/ButtonWithBadge.d.ts +1 -0
- package/dist/actionbar/ButtonWithBadge.d.ts.map +1 -1
- package/dist/actionbar/ChangeViewButton.d.ts +1 -0
- package/dist/actionbar/ChangeViewButton.d.ts.map +1 -1
- package/dist/actionbar/DashboardActionBar.d.ts +1 -0
- package/dist/actionbar/DashboardActionBar.d.ts.map +1 -1
- package/dist/actionbar/DropdownButton.d.ts +1 -0
- package/dist/actionbar/DropdownButton.d.ts.map +1 -1
- package/dist/actionbar/FormActionBar.d.ts +1 -0
- package/dist/actionbar/FormActionBar.d.ts.map +1 -1
- package/dist/actionbar/GraphActionBar.d.ts +1 -0
- package/dist/actionbar/GraphActionBar.d.ts.map +1 -1
- package/dist/actionbar/NewButton.d.ts +1 -0
- package/dist/actionbar/NewButton.d.ts.map +1 -1
- package/dist/actionbar/SearchBar.d.ts +1 -0
- package/dist/actionbar/SearchBar.d.ts.map +1 -1
- package/dist/actionbar/TreeActionBar.d.ts +1 -0
- package/dist/actionbar/TreeActionBar.d.ts.map +1 -1
- package/dist/common/ButtonWithTooltip.d.ts +1 -0
- package/dist/common/ButtonWithTooltip.d.ts.map +1 -1
- package/dist/common/DatePicker.d.ts +1 -0
- package/dist/common/DatePicker.d.ts.map +1 -1
- package/dist/context/ContentRootContext.d.ts.map +1 -1
- package/dist/hooks/useSearch.d.ts +1 -1
- package/dist/hooks/useSearch.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 +14402 -18530
- package/dist/react-ooui.es.js.map +1 -1
- package/dist/react-ooui.umd.js +51 -76
- package/dist/react-ooui.umd.js.map +1 -1
- package/dist/types/index.d.ts +10 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/ui/FavouriteButton.d.ts +1 -0
- package/dist/ui/FavouriteButton.d.ts.map +1 -1
- package/dist/ui/GoToResourceModal.d.ts +1 -0
- package/dist/ui/GoToResourceModal.d.ts.map +1 -1
- package/dist/ui/TitleHeader.d.ts +1 -0
- package/dist/ui/TitleHeader.d.ts.map +1 -1
- package/dist/views/ActionView.d.ts.map +1 -1
- package/dist/views/CurrentTabContent.d.ts +1 -0
- package/dist/views/CurrentTabContent.d.ts.map +1 -1
- package/dist/views/RootView.d.ts.map +1 -1
- package/dist/views/TabSelector.d.ts +1 -0
- package/dist/views/TabSelector.d.ts.map +1 -1
- package/dist/views/actionViews/DashboardActionView.d.ts +1 -0
- package/dist/views/actionViews/DashboardActionView.d.ts.map +1 -1
- package/dist/views/actionViews/FormActionView.d.ts +1 -0
- package/dist/views/actionViews/FormActionView.d.ts.map +1 -1
- package/dist/views/actionViews/GraphActionView.d.ts +1 -0
- package/dist/views/actionViews/GraphActionView.d.ts.map +1 -1
- package/dist/views/actionViews/TreeActionView.d.ts +1 -0
- package/dist/views/actionViews/TreeActionView.d.ts.map +1 -1
- package/dist/views/tabs/Tab.d.ts +1 -0
- package/dist/views/tabs/Tab.d.ts.map +1 -1
- package/dist/widgets/base/Binary.d.ts +1 -0
- package/dist/widgets/base/Binary.d.ts.map +1 -1
- package/dist/widgets/base/Boolean.d.ts +1 -0
- package/dist/widgets/base/Boolean.d.ts.map +1 -1
- package/dist/widgets/base/Button.d.ts +1 -0
- package/dist/widgets/base/Button.d.ts.map +1 -1
- package/dist/widgets/base/Char.d.ts +1 -0
- package/dist/widgets/base/Char.d.ts.map +1 -1
- package/dist/widgets/base/Date.d.ts +1 -0
- package/dist/widgets/base/Date.d.ts.map +1 -1
- package/dist/widgets/base/DateTime.d.ts +1 -0
- package/dist/widgets/base/DateTime.d.ts.map +1 -1
- package/dist/widgets/base/Email.d.ts +1 -0
- package/dist/widgets/base/Email.d.ts.map +1 -1
- package/dist/widgets/base/Float.d.ts +1 -0
- package/dist/widgets/base/Float.d.ts.map +1 -1
- package/dist/widgets/base/Image.d.ts +1 -0
- package/dist/widgets/base/Image.d.ts.map +1 -1
- package/dist/widgets/base/Integer.d.ts +1 -0
- package/dist/widgets/base/Integer.d.ts.map +1 -1
- package/dist/widgets/base/Label.d.ts +1 -0
- package/dist/widgets/base/Label.d.ts.map +1 -1
- package/dist/widgets/base/LinkInput.d.ts +1 -0
- package/dist/widgets/base/LinkInput.d.ts.map +1 -1
- package/dist/widgets/base/MultiSelection.d.ts +1 -0
- package/dist/widgets/base/MultiSelection.d.ts.map +1 -1
- package/dist/widgets/base/ProgressBar.d.ts +1 -0
- package/dist/widgets/base/ProgressBar.d.ts.map +1 -1
- package/dist/widgets/base/Selection.d.ts +1 -0
- package/dist/widgets/base/Selection.d.ts.map +1 -1
- package/dist/widgets/base/Separator.d.ts +1 -0
- package/dist/widgets/base/Separator.d.ts.map +1 -1
- package/dist/widgets/base/Text.d.ts +1 -0
- package/dist/widgets/base/Text.d.ts.map +1 -1
- package/dist/widgets/base/Url.d.ts +1 -0
- package/dist/widgets/base/Url.d.ts.map +1 -1
- package/dist/widgets/base/many2one/Many2oneSuffix.d.ts +1 -0
- package/dist/widgets/base/many2one/Many2oneSuffix.d.ts.map +1 -1
- package/dist/widgets/base/many2one/Many2oneSuffixModal.d.ts +1 -0
- package/dist/widgets/base/many2one/Many2oneSuffixModal.d.ts.map +1 -1
- package/dist/widgets/base/one2many/One2many.d.ts +1 -0
- package/dist/widgets/base/one2many/One2many.d.ts.map +1 -1
- package/dist/widgets/base/one2many/One2manyTopBar.d.ts +1 -0
- package/dist/widgets/base/one2many/One2manyTopBar.d.ts.map +1 -1
- package/dist/widgets/custom/ButtonGroup.d.ts +1 -0
- package/dist/widgets/custom/ButtonGroup.d.ts.map +1 -1
- package/dist/widgets/custom/CodeEditor.d.ts +1 -0
- package/dist/widgets/custom/CodeEditor.d.ts.map +1 -1
- package/dist/widgets/custom/FiberGrid.d.ts +1 -0
- package/dist/widgets/custom/FiberGrid.d.ts.map +1 -1
- package/dist/widgets/custom/Indicator.d.ts +1 -0
- package/dist/widgets/custom/Indicator.d.ts.map +1 -1
- package/dist/widgets/custom/MultiCheckbox.d.ts +1 -0
- package/dist/widgets/custom/MultiCheckbox.d.ts.map +1 -1
- package/dist/widgets/custom/Radio.d.ts +1 -0
- package/dist/widgets/custom/Radio.d.ts.map +1 -1
- package/dist/widgets/custom/Steps.d.ts +1 -0
- package/dist/widgets/custom/Steps.d.ts.map +1 -1
- package/dist/widgets/custom/Switch.d.ts +1 -0
- package/dist/widgets/custom/Switch.d.ts.map +1 -1
- package/dist/widgets/custom/Tags.d.ts +1 -0
- package/dist/widgets/custom/Tags.d.ts.map +1 -1
- package/dist/widgets/custom/Timeline.d.ts +1 -0
- package/dist/widgets/custom/Timeline.d.ts.map +1 -1
- package/dist/widgets/modals/ExportModal.d.ts +1 -1
- package/dist/widgets/modals/ExportModal.d.ts.map +1 -1
- package/dist/widgets/modals/FormModal.d.ts +1 -0
- package/dist/widgets/modals/FormModal.d.ts.map +1 -1
- package/dist/widgets/modals/SearchModal.d.ts +1 -0
- package/dist/widgets/modals/SearchModal.d.ts.map +1 -1
- package/dist/widgets/modals/TranslationModal.d.ts +1 -0
- 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 +1 -0
- package/dist/widgets/views/Dashboard/DashboardForm.d.ts.map +1 -1
- package/dist/widgets/views/Dashboard/DashboardTree.d.ts +1 -0
- package/dist/widgets/views/Dashboard/DashboardTree.d.ts.map +1 -1
- package/dist/widgets/views/DashboardGrid/DashboardGrid.d.ts +1 -0
- package/dist/widgets/views/DashboardGrid/DashboardGrid.d.ts.map +1 -1
- package/dist/widgets/views/DashboardGrid/DashboardGridItem.d.ts +1 -0
- package/dist/widgets/views/DashboardGrid/DashboardGridItem.d.ts.map +1 -1
- package/dist/widgets/views/Graph/GraphChart.d.ts +1 -0
- package/dist/widgets/views/Graph/GraphChart.d.ts.map +1 -1
- package/dist/widgets/views/Graph/GraphIndicator.d.ts +1 -0
- package/dist/widgets/views/Graph/GraphIndicator.d.ts.map +1 -1
- package/dist/widgets/views/searchFilter/DateRangePicker.d.ts +1 -0
- package/dist/widgets/views/searchFilter/DateRangePicker.d.ts.map +1 -1
- package/dist/widgets/views/searchFilter/DateTimeRangePicker.d.ts +1 -0
- package/dist/widgets/views/searchFilter/DateTimeRangePicker.d.ts.map +1 -1
- package/dist/widgets/views/searchFilter/SearchField.d.ts +1 -0
- package/dist/widgets/views/searchFilter/SearchField.d.ts.map +1 -1
- package/dist/widgets/views/searchFilter/SearchFilter.d.ts +1 -0
- package/dist/widgets/views/searchFilter/SearchFilter.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/actionbar/TreeActionBar.tsx +73 -17
- package/src/context/ContentRootContext.tsx +14 -7
- package/src/hooks/useSearch.ts +7 -4
- 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/mocks/models/crm_case.ts +7 -10
- package/src/types/index.ts +11 -0
- package/src/views/ActionView.tsx +15 -4
- package/src/views/RootView.tsx +5 -1
- package/src/views/actionViews/TreeActionView.tsx +1 -1
- package/src/widgets/base/Integer.tsx +1 -0
- package/src/widgets/modals/ExportModal.tsx +88 -46
- package/src/widgets/views/Dashboard/Dashboard.tsx +5 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Timeline.d.ts","sourceRoot":"","sources":["Timeline.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,aAAa,CAAC;AAEvD,OAAO,EAAgB,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAE7E,OAAO,EAAE,KAAK,EAAY,MAAM,SAAS,CAAC;AAO1C,aAAK,aAAa,GAAG;IACnB,IAAI,EAAE,YAAY,CAAC;CACpB,CAAC;AAEF,aAAK,kBAAkB,GAAG,aAAa,GAAG;IACxC,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAC1C,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AAEF,eAAO,MAAM,QAAQ,UAAW,aAAa,gBAsD5C,CAAC;AAEF,eAAO,MAAM,aAAa,UAAW,kBAAkB,gBA+GtD,CAAC"}
|
|
1
|
+
{"version":3,"file":"Timeline.d.ts","sourceRoot":"","sources":["Timeline.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,aAAa,CAAC;AAEvD,OAAO,EAAgB,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAE7E,OAAO,EAAE,KAAK,EAAY,MAAM,SAAS,CAAC;AAO1C,aAAK,aAAa,GAAG;IACnB,IAAI,EAAE,YAAY,CAAC;CACpB,CAAC;AAEF,aAAK,kBAAkB,GAAG,aAAa,GAAG;IACxC,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAC1C,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AAEF,eAAO,MAAM,QAAQ,UAAW,aAAa,gBAsD5C,CAAC;AAEF,eAAO,MAAM,aAAa,UAAW,kBAAkB,gBA+GtD,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export declare type ExportModalProps = {
|
|
2
3
|
visible: boolean;
|
|
3
4
|
locale: string;
|
|
@@ -7,7 +8,6 @@ export declare type ExportModalProps = {
|
|
|
7
8
|
model: string;
|
|
8
9
|
domain: any[];
|
|
9
10
|
limit?: number;
|
|
10
|
-
treeFields?: any;
|
|
11
11
|
context?: any;
|
|
12
12
|
};
|
|
13
13
|
export declare const ExportModal: (props: ExportModalProps) => JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExportModal.d.ts","sourceRoot":"","sources":["ExportModal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExportModal.d.ts","sourceRoot":"","sources":["ExportModal.tsx"],"names":[],"mappings":";AAWA,oBAAY,gBAAgB,GAAG;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,GAAG,EAAE,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,GAAG,CAAC;CACf,CAAC;AAEF,eAAO,MAAM,WAAW,UAAW,gBAAgB,gBAgGlD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormModal.d.ts","sourceRoot":"","sources":["FormModal.tsx"],"names":[],"mappings":"AAEA,OAAa,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAMvD,aAAK,cAAc,GAAG,SAAS,GAAG;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,UAAU,CAAC,EAAE,GAAG,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,SAAS,UAAW,cAAc,gBAuG9C,CAAC"}
|
|
1
|
+
{"version":3,"file":"FormModal.d.ts","sourceRoot":"","sources":["FormModal.tsx"],"names":[],"mappings":";AAEA,OAAa,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAMvD,aAAK,cAAc,GAAG,SAAS,GAAG;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,UAAU,CAAC,EAAE,GAAG,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,SAAS,UAAW,cAAc,gBAuG9C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchModal.d.ts","sourceRoot":"","sources":["SearchModal.tsx"],"names":[],"mappings":"AAYA,aAAK,oBAAoB,GAAG;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC3C,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,OAAO,CAAC,EAAE,GAAG,CAAC;CACf,CAAC;AAEF,eAAO,MAAM,WAAW,UAAW,oBAAoB,gBA6GtD,CAAC"}
|
|
1
|
+
{"version":3,"file":"SearchModal.d.ts","sourceRoot":"","sources":["SearchModal.tsx"],"names":[],"mappings":";AAYA,aAAK,oBAAoB,GAAG;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC3C,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,OAAO,CAAC,EAAE,GAAG,CAAC;CACf,CAAC;AAEF,eAAO,MAAM,WAAW,UAAW,oBAAoB,gBA6GtD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TranslationModal.d.ts","sourceRoot":"","sources":["TranslationModal.tsx"],"names":[],"mappings":"AAaA,aAAK,qBAAqB,GAAG;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,eAAe,EAAE,MAAM,IAAI,CAAC;CAC7B,CAAC;AAWF,eAAO,MAAM,gBAAgB,UAAW,qBAAqB,gBA0K5D,CAAC"}
|
|
1
|
+
{"version":3,"file":"TranslationModal.d.ts","sourceRoot":"","sources":["TranslationModal.tsx"],"names":[],"mappings":";AAaA,aAAK,qBAAqB,GAAG;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,eAAe,EAAE,MAAM,IAAI,CAAC;CAC7B,CAAC;AAWF,eAAO,MAAM,gBAAgB,UAAW,qBAAqB,gBA0K5D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dashboard.d.ts","sourceRoot":"","sources":["Dashboard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAON,MAAM,OAAO,CAAC;AAGf,OAAO,gCAAgC,CAAC;AACxC,OAAO,kCAAkC,CAAC;AAI1C,OAAO,EAAE,cAAc,EAAY,MAAM,SAAS,CAAC;;
|
|
1
|
+
{"version":3,"file":"Dashboard.d.ts","sourceRoot":"","sources":["Dashboard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAON,MAAM,OAAO,CAAC;AAGf,OAAO,gCAAgC,CAAC;AACxC,OAAO,kCAAkC,CAAC;AAI1C,OAAO,EAAE,cAAc,EAAY,MAAM,SAAS,CAAC;;AAsWnD,wBAAqC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardForm.d.ts","sourceRoot":"","sources":["DashboardForm.tsx"],"names":[],"mappings":"AAEA,OAAa,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE1C,eAAO,MAAM,aAAa,UAAW,SAAS,gBAyB7C,CAAC"}
|
|
1
|
+
{"version":3,"file":"DashboardForm.d.ts","sourceRoot":"","sources":["DashboardForm.tsx"],"names":[],"mappings":";AAEA,OAAa,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE1C,eAAO,MAAM,aAAa,UAAW,SAAS,gBAyB7C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardTree.d.ts","sourceRoot":"","sources":["DashboardTree.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAY,QAAQ,EAAE,MAAM,eAAe,CAAC;AAQnD,aAAK,gBAAgB,GAAG;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,QAAQ,CAAC;CACpB,CAAC;AAEF,aAAK,KAAK,GAAG;IACX,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC/C,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,aAAa,CAAC,EAAE,GAAG,CAAC;CACrB,CAAC;AAEF,iBAAS,aAAa,CAAC,KAAK,EAAE,KAAK,sBA6MlC;AAED,eAAe,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"DashboardTree.d.ts","sourceRoot":"","sources":["DashboardTree.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAY,QAAQ,EAAE,MAAM,eAAe,CAAC;AAQnD,aAAK,gBAAgB,GAAG;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,QAAQ,CAAC;CACpB,CAAC;AAEF,aAAK,KAAK,GAAG;IACX,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC/C,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,aAAa,CAAC,EAAE,GAAG,CAAC;CACrB,CAAC;AAEF,iBAAS,aAAa,CAAC,KAAK,EAAE,KAAK,sBA6MlC;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardGrid.d.ts","sourceRoot":"","sources":["DashboardGrid.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,gCAAgC,CAAC;AACxC,OAAO,kCAAkC,CAAC;AAI1C,eAAO,MAAM,aAAa,UAAW,kBAAkB,gBA4CtD,CAAC"}
|
|
1
|
+
{"version":3,"file":"DashboardGrid.d.ts","sourceRoot":"","sources":["DashboardGrid.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,gCAAgC,CAAC;AACxC,OAAO,kCAAkC,CAAC;AAI1C,eAAO,MAAM,aAAa,UAAW,kBAAkB,gBA4CtD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardGridItem.d.ts","sourceRoot":"","sources":["DashboardGridItem.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAOnE,eAAO,MAAM,iBAAiB,UAAW,sBAAsB,gBAiD9D,CAAC"}
|
|
1
|
+
{"version":3,"file":"DashboardGridItem.d.ts","sourceRoot":"","sources":["DashboardGridItem.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAOnE,eAAO,MAAM,iBAAiB,UAAW,sBAAsB,gBAiD9D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GraphChart.d.ts","sourceRoot":"","sources":["GraphChart.tsx"],"names":[],"mappings":"AAaA,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,gBAiDhD,CAAC"}
|
|
1
|
+
{"version":3,"file":"GraphChart.d.ts","sourceRoot":"","sources":["GraphChart.tsx"],"names":[],"mappings":";AAaA,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,gBAiDhD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GraphIndicator.d.ts","sourceRoot":"","sources":["GraphIndicator.tsx"],"names":[],"mappings":"AAOA,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,gBAoNzD,CAAC"}
|
|
1
|
+
{"version":3,"file":"GraphIndicator.d.ts","sourceRoot":"","sources":["GraphIndicator.tsx"],"names":[],"mappings":";AAOA,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,gBAoNzD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateRangePicker.d.ts","sourceRoot":"","sources":["DateRangePicker.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,eAAO,MAAM,eAAe,UAAW,WAAW,gBASjD,CAAC"}
|
|
1
|
+
{"version":3,"file":"DateRangePicker.d.ts","sourceRoot":"","sources":["DateRangePicker.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,eAAO,MAAM,eAAe,UAAW,WAAW,gBASjD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateTimeRangePicker.d.ts","sourceRoot":"","sources":["DateTimeRangePicker.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAKtC,eAAO,MAAM,mBAAmB,UAAW,WAAW,gBAoDrD,CAAC"}
|
|
1
|
+
{"version":3,"file":"DateTimeRangePicker.d.ts","sourceRoot":"","sources":["DateTimeRangePicker.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAKtC,eAAO,MAAM,mBAAmB,UAAW,WAAW,gBAoDrD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchField.d.ts","sourceRoot":"","sources":["SearchField.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,EAA8B,MAAM,aAAa,CAAC;AAGhE,aAAK,KAAK,GAAG;IACX,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AAgBF,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,eAyCvC"}
|
|
1
|
+
{"version":3,"file":"SearchField.d.ts","sourceRoot":"","sources":["SearchField.tsx"],"names":[],"mappings":";AAUA,OAAO,EAAE,KAAK,EAA8B,MAAM,aAAa,CAAC;AAGhE,aAAK,KAAK,GAAG;IACX,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AAgBF,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,eAyCvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchFilter.d.ts","sourceRoot":"","sources":["SearchFilter.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAMvC,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;CAC5B,CAAC;AAEF,iBAAS,YAAY,CAAC,KAAK,EAAE,KAAK,eAmHjC;AAED,eAAe,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"SearchFilter.d.ts","sourceRoot":"","sources":["SearchFilter.tsx"],"names":[],"mappings":";AAYA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAMvC,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;CAC5B,CAAC;AAEF,iBAAS,YAAY,CAAC,KAAK,EAAE,KAAK,eAmHjC;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.11",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist",
|
|
6
6
|
"src",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@ant-design/plots": "^1.0.9",
|
|
39
|
-
"@gisce/ooui": "^0.17.
|
|
40
|
-
"@gisce/react-formiga-components": "^1.0.9-rc.
|
|
39
|
+
"@gisce/ooui": "^0.17.9-rc.0",
|
|
40
|
+
"@gisce/react-formiga-components": "^1.0.9-rc.9",
|
|
41
41
|
"@gisce/react-formiga-table": "^0.5.0",
|
|
42
42
|
"@monaco-editor/react": "^4.4.5",
|
|
43
43
|
"@tabler/icons": "^1.96.0",
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from "@/context/ActionViewContext";
|
|
8
8
|
import NewButton from "./NewButton";
|
|
9
9
|
import ActionButton from "./ActionButton";
|
|
10
|
-
import {
|
|
10
|
+
import Icon, {
|
|
11
11
|
DeleteOutlined,
|
|
12
12
|
PrinterOutlined,
|
|
13
13
|
ThunderboltOutlined,
|
|
@@ -15,7 +15,6 @@ import {
|
|
|
15
15
|
ReloadOutlined,
|
|
16
16
|
InfoCircleOutlined,
|
|
17
17
|
FilterOutlined,
|
|
18
|
-
ExportOutlined,
|
|
19
18
|
} from "@ant-design/icons";
|
|
20
19
|
import { LocaleContext, LocaleContextType } from "@/context/LocaleContext";
|
|
21
20
|
import showConfirmDialog from "@/ui/ConfirmDialog";
|
|
@@ -62,7 +61,6 @@ function TreeActionBar(props: Props) {
|
|
|
62
61
|
previousView,
|
|
63
62
|
results,
|
|
64
63
|
limit,
|
|
65
|
-
totalItems,
|
|
66
64
|
} = useContext(ActionViewContext) as ActionViewContextType;
|
|
67
65
|
|
|
68
66
|
const { parentContext = {}, treeExpandable, toolbar } = props;
|
|
@@ -74,6 +72,10 @@ function TreeActionBar(props: Props) {
|
|
|
74
72
|
const { processAction } = contentRootContext || {};
|
|
75
73
|
const [exportModalVisible, setExportModalVisible] = useState(false);
|
|
76
74
|
|
|
75
|
+
const hasNameSearch: boolean =
|
|
76
|
+
searchTreeNameSearch !== undefined &&
|
|
77
|
+
searchTreeNameSearch.trim().length > 0;
|
|
78
|
+
|
|
77
79
|
function tryDelete() {
|
|
78
80
|
showConfirmDialog({
|
|
79
81
|
confirmMessage: t("confirmRemove"),
|
|
@@ -240,16 +242,6 @@ function TreeActionBar(props: Props) {
|
|
|
240
242
|
</>
|
|
241
243
|
)}
|
|
242
244
|
{separator()}
|
|
243
|
-
<ActionButton
|
|
244
|
-
icon={<ExportOutlined />}
|
|
245
|
-
tooltip={t("export")}
|
|
246
|
-
disabled={duplicatingItem || removingItem || treeIsLoading}
|
|
247
|
-
loading={false}
|
|
248
|
-
onClick={() => {
|
|
249
|
-
setExportModalVisible(true);
|
|
250
|
-
}}
|
|
251
|
-
/>
|
|
252
|
-
{separator()}
|
|
253
245
|
<DropdownButton
|
|
254
246
|
icon={<ThunderboltOutlined />}
|
|
255
247
|
disabled={
|
|
@@ -286,21 +278,85 @@ function TreeActionBar(props: Props) {
|
|
|
286
278
|
});
|
|
287
279
|
}}
|
|
288
280
|
/>
|
|
281
|
+
{separator()}
|
|
282
|
+
<DropdownButton
|
|
283
|
+
icon={
|
|
284
|
+
<Icon
|
|
285
|
+
component={() => (
|
|
286
|
+
<svg
|
|
287
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
288
|
+
className="icon icon-tabler icon-tabler-database-export"
|
|
289
|
+
width="1em"
|
|
290
|
+
height="1em"
|
|
291
|
+
viewBox="0 0 24 24"
|
|
292
|
+
stroke-width="1.5"
|
|
293
|
+
fill="none"
|
|
294
|
+
stroke="currentColor"
|
|
295
|
+
stroke-linecap="round"
|
|
296
|
+
stroke-linejoin="round"
|
|
297
|
+
>
|
|
298
|
+
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
|
299
|
+
<ellipse cx="12" cy="6" rx="8" ry="3" />
|
|
300
|
+
<path d="M4 6v6c0 1.657 3.582 3 8 3a19.84 19.84 0 0 0 3.302 -.267m4.698 -2.733v-6" />
|
|
301
|
+
<path d="M4 12v6c0 1.599 3.335 2.905 7.538 2.995m8.462 -6.995v-2m-6 7h7m-3 -3l3 3l-3 3" />
|
|
302
|
+
</svg>
|
|
303
|
+
)}
|
|
304
|
+
/>
|
|
305
|
+
}
|
|
306
|
+
tooltip={t("export")}
|
|
307
|
+
items={[
|
|
308
|
+
{
|
|
309
|
+
id: "print_screen",
|
|
310
|
+
name: t("printScreen"),
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
id: "export",
|
|
314
|
+
name: t("advancedExport"),
|
|
315
|
+
},
|
|
316
|
+
]}
|
|
317
|
+
onItemClick={(itemClicked: any) => {
|
|
318
|
+
if (itemClicked.id === "print_screen") {
|
|
319
|
+
let idsToExport = selectedRowItems?.map((item) => item.id) || [];
|
|
320
|
+
|
|
321
|
+
if (idsToExport.length === 0) {
|
|
322
|
+
idsToExport = results?.map((item) => item.id) || [];
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
runAction({
|
|
326
|
+
id: -1,
|
|
327
|
+
model: currentModel,
|
|
328
|
+
report_name: "printscreen.list",
|
|
329
|
+
type: "ir.actions.report.xml",
|
|
330
|
+
datas: {
|
|
331
|
+
model: currentModel,
|
|
332
|
+
ids: idsToExport,
|
|
333
|
+
},
|
|
334
|
+
});
|
|
335
|
+
return;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
setExportModalVisible(true);
|
|
339
|
+
}}
|
|
340
|
+
disabled={
|
|
341
|
+
duplicatingItem || removingItem || treeIsLoading || hasNameSearch
|
|
342
|
+
}
|
|
343
|
+
/>
|
|
289
344
|
<ExportModal
|
|
290
345
|
visible={exportModalVisible}
|
|
291
346
|
locale={lang}
|
|
292
347
|
onClose={() => setExportModalVisible(false)}
|
|
293
348
|
model={currentModel!}
|
|
294
|
-
treeFields={searchTreeRef?.current?.getFields()}
|
|
295
349
|
domain={mergeParams(
|
|
296
350
|
searchTreeRef?.current?.getDomain() || [],
|
|
297
351
|
searchParams || []
|
|
298
352
|
)}
|
|
299
353
|
limit={limit}
|
|
300
|
-
totalRegisters={
|
|
354
|
+
totalRegisters={results?.length || 0}
|
|
301
355
|
selectedRegistersToExport={
|
|
302
|
-
|
|
303
|
-
|
|
356
|
+
selectedRowItems &&
|
|
357
|
+
selectedRowItems.length &&
|
|
358
|
+
selectedRowItems.length > 0
|
|
359
|
+
? selectedRowItems.length
|
|
304
360
|
: undefined
|
|
305
361
|
}
|
|
306
362
|
context={parentContext}
|
|
@@ -43,15 +43,20 @@ type ActionModalOpts = {
|
|
|
43
43
|
actionData?: any;
|
|
44
44
|
};
|
|
45
45
|
|
|
46
|
-
export const ContentRootContext =
|
|
47
|
-
null
|
|
48
|
-
);
|
|
46
|
+
export const ContentRootContext =
|
|
47
|
+
React.createContext<ContentRootContextType | null>(null);
|
|
49
48
|
|
|
50
49
|
type ContentRootProviderProps = {
|
|
51
50
|
children: React.ReactNode;
|
|
52
51
|
globalValues?: any;
|
|
53
52
|
};
|
|
54
53
|
|
|
54
|
+
const callRefreshValues = async (fns: any[]) => {
|
|
55
|
+
for (let i = 0; i < fns.length; i++) {
|
|
56
|
+
await fns?.[i]?.();
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
|
|
55
60
|
const ContentRootProvider = (
|
|
56
61
|
props: ContentRootProviderProps,
|
|
57
62
|
ref: any
|
|
@@ -64,7 +69,7 @@ const ContentRootProvider = (
|
|
|
64
69
|
TabManagerContext
|
|
65
70
|
) as TabManagerContextType;
|
|
66
71
|
const { openAction } = tabManagerContext || {};
|
|
67
|
-
const onRefreshParentValues = useRef<any>();
|
|
72
|
+
const onRefreshParentValues = useRef<any>([]);
|
|
68
73
|
const { t } = useContext(LocaleContext) as LocaleContextType;
|
|
69
74
|
|
|
70
75
|
useImperativeHandle(ref, () => ({
|
|
@@ -167,7 +172,7 @@ const ContentRootProvider = (
|
|
|
167
172
|
onRefreshParentValues?: any;
|
|
168
173
|
}) {
|
|
169
174
|
const { type } = actionData;
|
|
170
|
-
onRefreshParentValues.current
|
|
175
|
+
onRefreshParentValues.current.push(onRefreshParentValuesFn);
|
|
171
176
|
|
|
172
177
|
if (type === "ir.actions.report.xml") {
|
|
173
178
|
return await generateReport({
|
|
@@ -347,7 +352,8 @@ const ContentRootProvider = (
|
|
|
347
352
|
}
|
|
348
353
|
|
|
349
354
|
async function onFormModalSucceed() {
|
|
350
|
-
onRefreshParentValues.current
|
|
355
|
+
callRefreshValues(onRefreshParentValues.current);
|
|
356
|
+
onRefreshParentValues.current = [];
|
|
351
357
|
setActionModalVisible(false);
|
|
352
358
|
setActionModalOptions({
|
|
353
359
|
domain: undefined,
|
|
@@ -386,7 +392,8 @@ const ContentRootProvider = (
|
|
|
386
392
|
visible={actionModalVisible}
|
|
387
393
|
onSubmitSucceed={onFormModalSucceed}
|
|
388
394
|
onCancel={() => {
|
|
389
|
-
onRefreshParentValues.current
|
|
395
|
+
callRefreshValues(onRefreshParentValues.current);
|
|
396
|
+
onRefreshParentValues.current = [];
|
|
390
397
|
setActionModalVisible(false);
|
|
391
398
|
setActionModalOptions({
|
|
392
399
|
domain: undefined,
|
package/src/hooks/useSearch.ts
CHANGED
|
@@ -165,7 +165,7 @@ export const useSearch = (opts: UseSearchOpts) => {
|
|
|
165
165
|
]);
|
|
166
166
|
|
|
167
167
|
const searchResults = useCallback(
|
|
168
|
-
async (opts?: { params: any; newOffset
|
|
168
|
+
async (opts?: { params: any; newOffset?: number }) => {
|
|
169
169
|
const { params, newOffset } = opts || {};
|
|
170
170
|
|
|
171
171
|
const mergedParams = mergeParams(params || searchParams, domain);
|
|
@@ -236,7 +236,7 @@ export const useSearch = (opts: UseSearchOpts) => {
|
|
|
236
236
|
);
|
|
237
237
|
|
|
238
238
|
const fetchResults = useCallback(
|
|
239
|
-
async (opts?: { params: any; newOffset
|
|
239
|
+
async (opts?: { params: any; newOffset?: number }) => {
|
|
240
240
|
try {
|
|
241
241
|
setTableRefreshing(true);
|
|
242
242
|
setTreeIsLoading?.(true);
|
|
@@ -310,8 +310,11 @@ export const useSearch = (opts: UseSearchOpts) => {
|
|
|
310
310
|
setSearchFilterLoading(true);
|
|
311
311
|
setSearchError(undefined);
|
|
312
312
|
setPage(1);
|
|
313
|
-
|
|
314
|
-
if (newLimit)
|
|
313
|
+
|
|
314
|
+
if (newLimit) {
|
|
315
|
+
internalLimit.current = newLimit;
|
|
316
|
+
setLimit?.(newLimit);
|
|
317
|
+
}
|
|
315
318
|
if (newOffset) setOffset(newOffset);
|
|
316
319
|
fetchResults({
|
|
317
320
|
params,
|
package/src/locales/ca_ES.tsx
CHANGED
package/src/locales/en_US.tsx
CHANGED
package/src/locales/es_ES.tsx
CHANGED
|
@@ -39,13 +39,14 @@ export default {
|
|
|
39
39
|
task_id: false,
|
|
40
40
|
user_id: [1, "Administrator"],
|
|
41
41
|
workdones_ids: [],
|
|
42
|
+
integer: 40003.23,
|
|
42
43
|
},
|
|
43
44
|
form: {
|
|
44
|
-
arch:
|
|
45
|
-
'<form string="Casos">\n <group col="8" colspan="4">\n <field colspan="4" name="partner_id" on_change="onchange_partner_id(partner_id, email_from)" select="1"/>\n <field colspan="3" name="partner_address_id" on_change="onchange_partner_address_id(partner_address_id, email_from)" select="2"/>\n \n <field colspan="3" name="email_from" select="2"/>\n <button name="remind_partner" states="open,pending" string="Envia notificaci\u00f3" type="object"/>\n <field name="user_id" select="1" domain="[(\'id\',\'!=\', 0)]"/>\n <button name="autoassign" string="Assigna-me\'l" type="object"/>\n <button name="remind_user" states="open,pending" string="Envia notificaci\u00f3" type="object"/>\n </group><field name="state" select="1"/></form>',
|
|
45
|
+
arch: '<form string="Casos">\n <field name="integer" /> <group col="8" colspan="4">\n <field colspan="4" name="partner_id" on_change="onchange_partner_id(partner_id, email_from)" select="1"/>\n <field colspan="3" name="partner_address_id" on_change="onchange_partner_address_id(partner_address_id, email_from)" select="2"/>\n \n <field colspan="3" name="email_from" select="2"/>\n <button name="remind_partner" states="open,pending" string="Envia notificaci\u00f3" type="object"/>\n <field name="user_id" select="1" domain="[(\'id\',\'!=\', 0)]"/>\n <button name="autoassign" string="Assigna-me\'l" type="object"/>\n <button name="remind_user" states="open,pending" string="Envia notificaci\u00f3" type="object"/>\n </group><field name="state" select="1"/></form>',
|
|
46
46
|
|
|
47
47
|
field_parent: false,
|
|
48
48
|
fields: {
|
|
49
|
+
integer: { string: "Integer", type: "integer" },
|
|
49
50
|
active: { string: "Actiu", type: "boolean", views: {} },
|
|
50
51
|
canal_id: {
|
|
51
52
|
context: "",
|
|
@@ -138,8 +139,7 @@ export default {
|
|
|
138
139
|
type: "one2many",
|
|
139
140
|
views: {
|
|
140
141
|
form: {
|
|
141
|
-
arch:
|
|
142
|
-
'<form string="Historial de comunicació">\n <group col="6" colspan="4">\n <field name="date" select="1"/>\n <field name="email" select="1"/>\n <field name="canal_id" select="2"/>\n </group>\n <newline/>\n <field colspan="4" name="description" nolabel="1" select="2"/>\n </form>\n ',
|
|
142
|
+
arch: '<form string="Historial de comunicació">\n <group col="6" colspan="4">\n <field name="date" select="1"/>\n <field name="email" select="1"/>\n <field name="canal_id" select="2"/>\n </group>\n <newline/>\n <field colspan="4" name="description" nolabel="1" select="2"/>\n </form>\n ',
|
|
143
143
|
fields: {
|
|
144
144
|
canal_id: {
|
|
145
145
|
context: "",
|
|
@@ -160,8 +160,7 @@ export default {
|
|
|
160
160
|
},
|
|
161
161
|
},
|
|
162
162
|
tree: {
|
|
163
|
-
arch:
|
|
164
|
-
'<tree string="Historial de comunicació">\n <field name="note"/>\n </tree>\n ',
|
|
163
|
+
arch: '<tree string="Historial de comunicació">\n <field name="note"/>\n </tree>\n ',
|
|
165
164
|
fields: {
|
|
166
165
|
note: {
|
|
167
166
|
digits: [16, 2],
|
|
@@ -185,8 +184,7 @@ export default {
|
|
|
185
184
|
type: "one2many",
|
|
186
185
|
views: {
|
|
187
186
|
form: {
|
|
188
|
-
arch:
|
|
189
|
-
'<form string="Accions">\n <separator colspan="4" string="Informaci\u00f3 de l\'acci\u00f3"/>\n <field colspan="4" name="name"/>\n <field name="date" select="2"/>\n <field name="fefe_id" select="2"/>\n <field name="som" select="2"/>\n <field name="canal_id"/>\n </form>\n ',
|
|
187
|
+
arch: '<form string="Accions">\n <separator colspan="4" string="Informaci\u00f3 de l\'acci\u00f3"/>\n <field colspan="4" name="name"/>\n <field name="date" select="2"/>\n <field name="fefe_id" select="2"/>\n <field name="som" select="2"/>\n <field name="canal_id"/>\n </form>\n ',
|
|
190
188
|
fields: {
|
|
191
189
|
canal_id: {
|
|
192
190
|
context: "",
|
|
@@ -389,8 +387,7 @@ export default {
|
|
|
389
387
|
type: "one2many",
|
|
390
388
|
views: {
|
|
391
389
|
tree: {
|
|
392
|
-
arch:
|
|
393
|
-
'<tree editable="top">\n <field name="date"/>\n <field name="type_id"/>\n <field name="hours" sum="Time spent" widget="float_time"/>\n \n <field name="name"/> \n </tree>\n ',
|
|
390
|
+
arch: '<tree editable="top">\n <field name="date"/>\n <field name="type_id"/>\n <field name="hours" sum="Time spent" widget="float_time"/>\n \n <field name="name"/> \n </tree>\n ',
|
|
394
391
|
fields: {
|
|
395
392
|
date: { string: "Data", type: "datetime", views: {} },
|
|
396
393
|
hours: { string: "Temps dedicat", type: "float", views: {} },
|
package/src/types/index.ts
CHANGED
|
@@ -41,6 +41,7 @@ type TreeView = BaseView & {
|
|
|
41
41
|
search_fields?: SearchFields;
|
|
42
42
|
isExpandable?: boolean;
|
|
43
43
|
field_parent?: string;
|
|
44
|
+
toolbar?: any;
|
|
44
45
|
};
|
|
45
46
|
|
|
46
47
|
type FormView = TreeView & {
|
|
@@ -239,6 +240,15 @@ type TreeButOpenOptions = {
|
|
|
239
240
|
context?: any;
|
|
240
241
|
};
|
|
241
242
|
|
|
243
|
+
type ExportDataOptions = {
|
|
244
|
+
model: string;
|
|
245
|
+
domain: any[];
|
|
246
|
+
fields?: string[];
|
|
247
|
+
format: string;
|
|
248
|
+
limit?: number;
|
|
249
|
+
context?: any;
|
|
250
|
+
};
|
|
251
|
+
|
|
242
252
|
type ConnectionProviderType = {
|
|
243
253
|
getActionStringForModel: (model: string) => Promise<string>;
|
|
244
254
|
getViewsForAction: ({
|
|
@@ -285,6 +295,7 @@ type ConnectionProviderType = {
|
|
|
285
295
|
removeFavourite: ({ shortcut_id }: { shortcut_id: number }) => Promise<void>;
|
|
286
296
|
addFavourite: (options: IsShortcutFavoriteOptions) => Promise<void>;
|
|
287
297
|
treeButOpen: (options: TreeButOpenOptions) => Promise<any>;
|
|
298
|
+
exportData: (options: ExportDataOptions) => Promise<any>;
|
|
288
299
|
};
|
|
289
300
|
|
|
290
301
|
type ViewType = "tree" | "form" | "dashboard" | "graph" | "calendar";
|
package/src/views/ActionView.tsx
CHANGED
|
@@ -28,6 +28,7 @@ import {
|
|
|
28
28
|
import { useHotkeys } from "react-hotkeys-hook";
|
|
29
29
|
import { GoToResourceModal } from "@/ui/GoToResourceModal";
|
|
30
30
|
import showInfo from "@/ui/InfoDialog";
|
|
31
|
+
import showErrorDialog from "@/ui/ActionErrorDialog";
|
|
31
32
|
import { LocaleContext, LocaleContextType } from "@/context/LocaleContext";
|
|
32
33
|
import { GraphActionView } from "@/views/actionViews/GraphActionView";
|
|
33
34
|
import { FormActionView } from "./actionViews/FormActionView";
|
|
@@ -191,6 +192,7 @@ function ActionView(props: Props, ref: any) {
|
|
|
191
192
|
case "form": {
|
|
192
193
|
viewDataRetrieved.push({
|
|
193
194
|
...(viewInfo as FormView),
|
|
195
|
+
type: viewType,
|
|
194
196
|
});
|
|
195
197
|
break;
|
|
196
198
|
}
|
|
@@ -198,12 +200,14 @@ function ActionView(props: Props, ref: any) {
|
|
|
198
200
|
viewDataRetrieved.push({
|
|
199
201
|
...(viewInfo as TreeView),
|
|
200
202
|
isExpandable: treeExpandable,
|
|
203
|
+
type: viewType,
|
|
201
204
|
});
|
|
202
205
|
break;
|
|
203
206
|
}
|
|
204
207
|
case "graph": {
|
|
205
208
|
viewDataRetrieved.push({
|
|
206
209
|
...(viewInfo as GraphView),
|
|
210
|
+
type: viewType,
|
|
207
211
|
});
|
|
208
212
|
break;
|
|
209
213
|
}
|
|
@@ -211,18 +215,18 @@ function ActionView(props: Props, ref: any) {
|
|
|
211
215
|
break;
|
|
212
216
|
}
|
|
213
217
|
}
|
|
218
|
+
let currentViewToAssign = undefined;
|
|
214
219
|
|
|
215
220
|
if (!initialView && viewDataRetrieved.find((v) => v.type === "tree")) {
|
|
216
221
|
const treeView: TreeView = viewDataRetrieved.find(
|
|
217
222
|
(v) => v.type === "tree"
|
|
218
223
|
) as TreeView;
|
|
219
|
-
|
|
224
|
+
currentViewToAssign = treeView;
|
|
220
225
|
} else if (!initialView) {
|
|
221
226
|
const formView: TreeView = viewDataRetrieved.find(
|
|
222
227
|
(v) => v.type === "form"
|
|
223
228
|
) as TreeView;
|
|
224
|
-
|
|
225
|
-
setCurrentView(formView);
|
|
229
|
+
currentViewToAssign = formView;
|
|
226
230
|
} else {
|
|
227
231
|
const view = viewDataRetrieved.find((v) => {
|
|
228
232
|
if (!initialView.id) {
|
|
@@ -231,9 +235,16 @@ function ActionView(props: Props, ref: any) {
|
|
|
231
235
|
return v.type === initialView.type && v.view_id === initialView.id;
|
|
232
236
|
}
|
|
233
237
|
});
|
|
234
|
-
|
|
238
|
+
currentViewToAssign = view;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
if (!currentViewToAssign) {
|
|
242
|
+
showErrorDialog(
|
|
243
|
+
"Error determining the first view to show.\nPlease, make sure the view ids on the fields_view_get responses are the same as the ones defined in the action"
|
|
244
|
+
);
|
|
235
245
|
}
|
|
236
246
|
|
|
247
|
+
setCurrentView(currentViewToAssign);
|
|
237
248
|
setAvailableViews(viewDataRetrieved);
|
|
238
249
|
setIsLoading(false);
|
|
239
250
|
};
|