@gisce/react-ooui 2.0.0-alpha.19 → 2.0.0-alpha.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actionbar/AttachmentsButton.d.ts.map +1 -1
- package/dist/actionbar/ButtonWithBadge.d.ts.map +1 -1
- package/dist/actionbar/DashboardActionBar.d.ts.map +1 -1
- package/dist/context/ActionViewContext.d.ts.map +1 -1
- package/dist/context/DashboardActionContext.d.ts.map +1 -1
- package/dist/context/FormModalContext.d.ts.map +1 -1
- package/dist/context/One2manyContext.d.ts.map +1 -1
- package/dist/helpers/logInfoHelper.d.ts.map +1 -1
- package/dist/react-ooui.es.js +46 -37
- package/dist/react-ooui.es.js.map +1 -1
- package/dist/ui/ConfirmDialog.d.ts +1 -1
- package/dist/ui/GoToResourceModal.d.ts.map +1 -1
- package/dist/widgets/base/Separator.d.ts.map +1 -1
- package/dist/widgets/custom/Avatar.d.ts.map +1 -1
- package/dist/widgets/custom/Markdown.d.ts.map +1 -1
- package/dist/widgets/custom/Radio.d.ts.map +1 -1
- package/dist/widgets/custom/Steps.d.ts.map +1 -1
- package/dist/widgets/custom/Switch.d.ts.map +1 -1
- package/dist/widgets/modals/SearchModal.d.ts.map +1 -1
- package/dist/widgets/views/searchFilter/SearchBottomBar.d.ts.map +1 -1
- package/dist/widgets/views/searchFilter/SearchField.d.ts.map +1 -1
- package/dist/widgets/views/searchFilter/SearchParams.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/ConnectionProvider.ts +1 -1
- package/src/__tests__/iconMapper.test.ts +4 -4
- package/src/actionbar/AttachmentsButton.tsx +25 -23
- package/src/actionbar/AttachmentsButtonWrapper.tsx +2 -2
- package/src/actionbar/ButtonWithBadge.tsx +4 -2
- package/src/actionbar/ChangeViewButton.tsx +1 -1
- package/src/actionbar/DashboardActionBar.tsx +2 -6
- package/src/actionbar/FormActionBar.tsx +2 -2
- package/src/actionbar/NewButton.tsx +1 -1
- package/src/actionbar/TreeActionBar.tsx +2 -2
- package/src/context/ActionViewContext.tsx +7 -3
- package/src/context/DashboardActionContext.tsx +2 -3
- package/src/context/FormModalContext.tsx +2 -3
- package/src/context/LocaleContext.tsx +1 -1
- package/src/context/One2manyContext.tsx +3 -4
- package/src/helpers/containerHelper.ts +1 -1
- package/src/helpers/dynamicColumnsHelper.ts +2 -2
- package/src/helpers/iconMapper.ts +5 -5
- package/src/helpers/logInfoHelper.tsx +8 -6
- package/src/helpers/timeHelper.ts +2 -2
- package/src/hooks/useEffectDebugger.ts +2 -2
- package/src/hooks/useExport.ts +8 -8
- package/src/hooks/useWindowDimensions.ts +1 -1
- package/src/stories/Time.stories.tsx +2 -3
- package/src/stories/Utils.stories.tsx +1 -3
- package/src/stories/containers/Group.stories.tsx +2 -3
- package/src/stories/containers/Notebook.stories.tsx +0 -6
- package/src/stories/custom/Comments.stories.tsx +32 -25
- package/src/stories/forms/FormWithLinks.stories.tsx +1 -2
- package/src/stories/forms/PreferencesForm.stories.tsx +1 -2
- package/src/stories/mocks/mockProvider.ts +5 -2
- package/src/stories/mocks/models/attachment.ts +1 -2
- package/src/stories/mocks/models/butlleti.ts +249 -297
- package/src/stories/mocks/models/company.ts +2 -4
- package/src/stories/mocks/models/document.ts +2 -4
- package/src/stories/mocks/models/factura.ts +14 -28
- package/src/stories/mocks/models/form_with_gridfiber.ts +2 -4
- package/src/stories/mocks/models/hist_autoconsum.ts +2 -4
- package/src/stories/mocks/models/lead.ts +8 -16
- package/src/stories/mocks/models/modcontractual.ts +3 -6
- package/src/stories/mocks/models/partner.ts +20 -40
- package/src/stories/mocks/models/polissa.ts +6 -12
- package/src/stories/mocks/models/res_partner_category.ts +3 -3
- package/src/stories/mocks/models/signatura.ts +135 -195
- package/src/stories/mocks/models/switching.ts +2 -4
- package/src/stories/views/Tree.stories.jsx +3 -5
- package/src/stories/views/searchFilter/examples/PartnersSearchFilter.stories.tsx +15 -30
- package/src/ui/ConfirmDialog.tsx +1 -1
- package/src/ui/GoToResourceModal.tsx +7 -3
- package/src/views/CurrentTabContent.tsx +1 -1
- package/src/views/TabContent.tsx +1 -1
- package/src/views/TabSelector.tsx +1 -1
- package/src/views/actionViews/DashboardActionView.tsx +1 -1
- package/src/views/actionViews/GraphActionView.tsx +1 -1
- package/src/views/actionViews/TreeActionView.tsx +2 -2
- package/src/widgets/WidgetFactory.tsx +1 -1
- package/src/widgets/base/FloatTime.tsx +1 -1
- package/src/widgets/base/Reference.tsx +1 -1
- package/src/widgets/base/ReferenceTree.tsx +1 -1
- package/src/widgets/base/Separator.tsx +3 -4
- package/src/widgets/base/many2one/Many2oneSuffixModal.tsx +2 -2
- package/src/widgets/base/one2many/One2many.tsx +2 -2
- package/src/widgets/custom/Avatar.tsx +15 -7
- package/src/widgets/custom/Markdown.tsx +12 -8
- package/src/widgets/custom/Radio.tsx +2 -4
- package/src/widgets/custom/Steps.tsx +10 -9
- package/src/widgets/custom/Switch.tsx +1 -5
- package/src/widgets/modals/SearchModal.tsx +31 -29
- package/src/widgets/modals/TranslationModal.tsx +2 -2
- package/src/widgets/views/Dashboard/Dashboard.tsx +3 -3
- package/src/widgets/views/DashboardGrid/DashboardGrid.tsx +3 -3
- package/src/widgets/views/Graph/Graph.tsx +1 -1
- package/src/widgets/views/Graph/GraphChart.tsx +1 -1
- package/src/widgets/views/Graph/GraphDefaults.ts +2 -2
- package/src/widgets/views/SearchTree.tsx +2 -2
- package/src/widgets/views/searchFilter/SearchBottomBar.tsx +2 -6
- package/src/widgets/views/searchFilter/SearchField.tsx +5 -1
- package/src/widgets/views/searchFilter/SearchFilter.tsx +1 -1
- package/src/widgets/views/searchFilter/SearchParams.tsx +7 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GoToResourceModal.d.ts","sourceRoot":"","sources":["../../src/ui/GoToResourceModal.tsx"],"names":[],"mappings":"AAKA,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,WAAW,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,iBAAiB,UAAW,KAAK,
|
|
1
|
+
{"version":3,"file":"GoToResourceModal.d.ts","sourceRoot":"","sources":["../../src/ui/GoToResourceModal.tsx"],"names":[],"mappings":"AAKA,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,WAAW,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,iBAAiB,UAAW,KAAK,4CAkE7C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Separator.d.ts","sourceRoot":"","sources":["../../../src/widgets/base/Separator.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,aAAa,CAAC;AAGzD,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,aAAa,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,SAAS,UAAW,KAAK,
|
|
1
|
+
{"version":3,"file":"Separator.d.ts","sourceRoot":"","sources":["../../../src/widgets/base/Separator.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,aAAa,CAAC;AAGzD,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,aAAa,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,SAAS,UAAW,KAAK,4CAerC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../src/widgets/custom/Avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,
|
|
1
|
+
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../src/widgets/custom/Avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,aAAa,CAAC;AAGnD,KAAK,WAAW,GAAG,WAAW,GAAG;IAC/B,IAAI,EAAE,UAAU,CAAC;IACjB,KAAK,CAAC,EAAE,GAAG,CAAC;CACb,CAAC;AAEF,QAAA,MAAM,MAAM,UAAW,WAAW,KAAG,MAAM,YAAY,GAAG,IA0BzD,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Markdown.d.ts","sourceRoot":"","sources":["../../../src/widgets/custom/Markdown.tsx"],"names":[],"mappings":"AAGA,OAAO,
|
|
1
|
+
{"version":3,"file":"Markdown.d.ts","sourceRoot":"","sources":["../../../src/widgets/custom/Markdown.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,eAAO,MAAM,QAAQ,UAAW,WAAW,4CAM1C,CAAC;AAEF,eAAO,MAAM,aAAa,UAAW,GAAG,4CAYvC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Radio.d.ts","sourceRoot":"","sources":["../../../src/widgets/custom/Radio.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,eAAO,MAAM,KAAK,UAAW,WAAW,4CASvC,CAAC;AAEF,KAAK,eAAe,GAAG,WAAW,GAAG;IACnC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,cAAc,UAAW,eAAe,
|
|
1
|
+
{"version":3,"file":"Radio.d.ts","sourceRoot":"","sources":["../../../src/widgets/custom/Radio.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,eAAO,MAAM,KAAK,UAAW,WAAW,4CASvC,CAAC;AAEF,KAAK,eAAe,GAAG,WAAW,GAAG;IACnC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,cAAc,UAAW,eAAe,4CAuBpD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Steps.d.ts","sourceRoot":"","sources":["../../../src/widgets/custom/Steps.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AAEjD,KAAK,UAAU,GAAG;IAChB,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,GAAG,CAAC;CACZ,
|
|
1
|
+
{"version":3,"file":"Steps.d.ts","sourceRoot":"","sources":["../../../src/widgets/custom/Steps.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AAEjD,KAAK,UAAU,GAAG;IAChB,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,GAAG,CAAC;CACZ,CAAC;AAIF,eAAO,MAAM,KAAK,UAAW,UAAU,4CAStC,CAAC;AAEF,KAAK,eAAe,GAAG,UAAU,GAAG;IAClC,KAAK,CAAC,EAAE,GAAG,CAAC;CACb,CAAC;AAEF,eAAO,MAAM,UAAU,UAAW,eAAe,4CA2BhD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../../src/widgets/custom/Switch.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,eAAO,MAAM,MAAM,UAAW,WAAW,
|
|
1
|
+
{"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../../src/widgets/custom/Switch.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,eAAO,MAAM,MAAM,UAAW,WAAW,4CASxC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchModal.d.ts","sourceRoot":"","sources":["../../../src/widgets/modals/SearchModal.tsx"],"names":[],"mappings":"AAYA,KAAK,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,
|
|
1
|
+
{"version":3,"file":"SearchModal.d.ts","sourceRoot":"","sources":["../../../src/widgets/modals/SearchModal.tsx"],"names":[],"mappings":"AAYA,KAAK,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,4CA6GtD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchBottomBar.d.ts","sourceRoot":"","sources":["../../../../src/widgets/views/searchFilter/SearchBottomBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAY1C,KAAK,KAAK,GAAG;IACX,cAAc,EAAE,OAAO,CAAC;IACxB,WAAW,EAAE,OAAO,CAAC;IACrB,sBAAsB,EAAE,MAAM,IAAI,CAAC;IACnC,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,wBAAgB,eAAe,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,CAAC,YAAY,
|
|
1
|
+
{"version":3,"file":"SearchBottomBar.d.ts","sourceRoot":"","sources":["../../../../src/widgets/views/searchFilter/SearchBottomBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAY1C,KAAK,KAAK,GAAG;IACX,cAAc,EAAE,OAAO,CAAC;IACxB,WAAW,EAAE,OAAO,CAAC;IACrB,sBAAsB,EAAE,MAAM,IAAI,CAAC;IACnC,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,wBAAgB,eAAe,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,CAAC,YAAY,CAkChE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchField.d.ts","sourceRoot":"","sources":["../../../../src/widgets/views/searchFilter/SearchField.tsx"],"names":[],"mappings":"AAUA,OAAO,
|
|
1
|
+
{"version":3,"file":"SearchField.d.ts","sourceRoot":"","sources":["../../../../src/widgets/views/searchFilter/SearchField.tsx"],"names":[],"mappings":"AAUA,OAAO,EACL,KAAK,EAGN,MAAM,aAAa,CAAC;AAGrB,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AAEF,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,2CAyCvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchParams.d.ts","sourceRoot":"","sources":["../../../../src/widgets/views/searchFilter/SearchParams.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAQ1C,KAAK,iBAAiB,GAAG;IACvB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC,
|
|
1
|
+
{"version":3,"file":"SearchParams.d.ts","sourceRoot":"","sources":["../../../../src/widgets/views/searchFilter/SearchParams.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAQ1C,KAAK,iBAAiB,GAAG;IACvB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC,CAAC;AAEF,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,KAAK,CAAC,YAAY,CAsBzE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gisce/react-ooui",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.20",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": "20.5.0"
|
|
6
6
|
},
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@ant-design/plots": "^1.0.9",
|
|
37
37
|
"@gisce/fiber-diagram": "^1.1.0-rc.3",
|
|
38
|
-
"@gisce/ooui": "1.0.0-alpha.
|
|
38
|
+
"@gisce/ooui": "1.0.0-alpha.2",
|
|
39
39
|
"@gisce/react-formiga-components": "^1.0.9-rc.21",
|
|
40
40
|
"@gisce/react-formiga-table": "^0.8.6",
|
|
41
41
|
"@monaco-editor/react": "^4.4.5",
|
|
@@ -9,7 +9,7 @@ export default class ConnectionProvider {
|
|
|
9
9
|
|
|
10
10
|
public static getHandler(): ConnectionProviderType {
|
|
11
11
|
if (!ConnectionProvider.handler) {
|
|
12
|
-
throw
|
|
12
|
+
throw "Must call init() first with a valid ConnectionProvider instance";
|
|
13
13
|
}
|
|
14
14
|
return ConnectionProvider.handler;
|
|
15
15
|
}
|
|
@@ -15,16 +15,16 @@ describe("A IconMapper instance", () => {
|
|
|
15
15
|
const findAndReplaceIcon = Icons.FileSearchOutlined;
|
|
16
16
|
const icon = iconMapper("gtk-find-and-replace");
|
|
17
17
|
expect(icon).toBe(findAndReplaceIcon);
|
|
18
|
-
})
|
|
18
|
+
});
|
|
19
19
|
test("should return gtk-go", () => {
|
|
20
20
|
const findAndReplaceIcon = Icons.FileSearchOutlined;
|
|
21
21
|
const icon = iconMapper("gtk-find-and-replace");
|
|
22
22
|
expect(icon).toBe(findAndReplaceIcon);
|
|
23
|
-
})
|
|
23
|
+
});
|
|
24
24
|
describe("If key doesn't exist in iconMapper", () => {
|
|
25
25
|
test("should return undefined", () => {
|
|
26
26
|
const icon = iconMapper("gtk-foo-bar");
|
|
27
27
|
expect(icon).toBe(undefined);
|
|
28
|
-
})
|
|
29
|
-
})
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
30
|
});
|
|
@@ -52,7 +52,7 @@ function AttachmentsButton(props: AttachmentsButtonProps) {
|
|
|
52
52
|
name: r.name,
|
|
53
53
|
datas_fname: r.datas_fname,
|
|
54
54
|
link: r.link,
|
|
55
|
-
}))
|
|
55
|
+
})),
|
|
56
56
|
);
|
|
57
57
|
} catch (error) {
|
|
58
58
|
showErrorDialog(error as any);
|
|
@@ -103,28 +103,30 @@ 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
|
-
|
|
106
|
+
return (
|
|
107
|
+
<>
|
|
108
|
+
<AttachmentsButtonWrapper
|
|
109
|
+
numberOfAttachments={attachments.length}
|
|
110
|
+
attachments={preloadedAttachments}
|
|
111
|
+
disabled={disabled}
|
|
112
|
+
loading={preloading}
|
|
113
|
+
onAddNewAttachment={onAddNewAttachment}
|
|
114
|
+
onListAllAttachments={onListAllAttachments}
|
|
115
|
+
onopenAttachmentLink={openAttachmentLink}
|
|
116
|
+
onOpenAttachmentDetail={openAttachmentDetail}
|
|
117
|
+
/>
|
|
118
|
+
<Modal
|
|
119
|
+
title={t("downloadingAttachment")}
|
|
120
|
+
open={downloading}
|
|
121
|
+
footer={null}
|
|
122
|
+
closable={false}
|
|
123
|
+
centered
|
|
124
|
+
maskClosable={false}
|
|
125
|
+
>
|
|
126
|
+
<Spin />
|
|
127
|
+
</Modal>
|
|
128
|
+
</>
|
|
129
|
+
);
|
|
128
130
|
}
|
|
129
131
|
|
|
130
132
|
export default AttachmentsButton;
|
|
@@ -33,7 +33,7 @@ export type AttachmentsButtonWrapperProps = {
|
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
export const AttachmentsButtonWrapper = (
|
|
36
|
-
props: AttachmentsButtonWrapperProps
|
|
36
|
+
props: AttachmentsButtonWrapperProps,
|
|
37
37
|
) => {
|
|
38
38
|
const { numberOfAttachments, disabled } = props;
|
|
39
39
|
const { t, lang } = useContext(LocaleContext) as LocaleContextType;
|
|
@@ -68,7 +68,7 @@ export const AttachmentsButtonWrapper = (
|
|
|
68
68
|
const Content = (
|
|
69
69
|
props: AttachmentsButtonWrapperProps,
|
|
70
70
|
setPopoverVisible: (visible: boolean) => void,
|
|
71
|
-
locale: string
|
|
71
|
+
locale: string,
|
|
72
72
|
) => {
|
|
73
73
|
const {
|
|
74
74
|
attachments = [],
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import ButtonWithTooltip, {
|
|
3
|
-
|
|
2
|
+
import ButtonWithTooltip, {
|
|
3
|
+
Props as ButtonWithTooltipProps,
|
|
4
|
+
} from "@/common/ButtonWithTooltip";
|
|
5
|
+
import { theme } from "antd";
|
|
4
6
|
const { useToken } = theme;
|
|
5
7
|
|
|
6
8
|
type Props = ButtonWithTooltipProps & {
|
|
@@ -95,7 +95,7 @@ function ChangeViewButton(props: Props) {
|
|
|
95
95
|
function handleMenuClick(event: any) {
|
|
96
96
|
tryNavigate(() => {
|
|
97
97
|
const selectedView = availableViews.find(
|
|
98
|
-
(view) => view.view_id === parseInt(event.key)
|
|
98
|
+
(view) => view.view_id === parseInt(event.key),
|
|
99
99
|
);
|
|
100
100
|
onChangeView(selectedView!);
|
|
101
101
|
});
|
|
@@ -13,12 +13,8 @@ import {
|
|
|
13
13
|
import { LocaleContext, LocaleContextType } from "@/context/LocaleContext";
|
|
14
14
|
|
|
15
15
|
function DashboardActionBar() {
|
|
16
|
-
const {
|
|
17
|
-
|
|
18
|
-
dashboardRef,
|
|
19
|
-
moveItemsEnabled,
|
|
20
|
-
setMoveItemsEnabled,
|
|
21
|
-
} = useContext(DashboardActionContext) as DashboardActionContextType;
|
|
16
|
+
const { isLoading, dashboardRef, moveItemsEnabled, setMoveItemsEnabled } =
|
|
17
|
+
useContext(DashboardActionContext) as DashboardActionContextType;
|
|
22
18
|
const { t } = useContext(LocaleContext) as LocaleContextType;
|
|
23
19
|
|
|
24
20
|
return (
|
|
@@ -70,12 +70,12 @@ function FormActionBar({ toolbar }: { toolbar: any }) {
|
|
|
70
70
|
const { t, lang } = useContext(LocaleContext) as LocaleContextType;
|
|
71
71
|
|
|
72
72
|
const contentRootContext = useContext(
|
|
73
|
-
ContentRootContext
|
|
73
|
+
ContentRootContext,
|
|
74
74
|
) as ContentRootContextType;
|
|
75
75
|
const { processAction } = contentRootContext || {};
|
|
76
76
|
|
|
77
77
|
const tabManagerContext = useContext(
|
|
78
|
-
TabManagerContext
|
|
78
|
+
TabManagerContext,
|
|
79
79
|
) as TabManagerContextType;
|
|
80
80
|
const { openRelate, openDefaultActionForModel } = tabManagerContext || {};
|
|
81
81
|
|
|
@@ -16,7 +16,7 @@ function NewButton(props: Props) {
|
|
|
16
16
|
const { disabled = false } = props;
|
|
17
17
|
|
|
18
18
|
const { formHasChanges, onNewClicked: onNewClickedProps } = useContext(
|
|
19
|
-
ActionViewContext
|
|
19
|
+
ActionViewContext,
|
|
20
20
|
) as ActionViewContextType;
|
|
21
21
|
const { t, lang } = useContext(LocaleContext) as LocaleContextType;
|
|
22
22
|
|
|
@@ -69,7 +69,7 @@ function TreeActionBar(props: Props) {
|
|
|
69
69
|
const { previewFeatures } = useContext(ConfigContext);
|
|
70
70
|
const { t, lang } = useContext(LocaleContext) as LocaleContextType;
|
|
71
71
|
const contentRootContext = useContext(
|
|
72
|
-
ContentRootContext
|
|
72
|
+
ContentRootContext,
|
|
73
73
|
) as ContentRootContextType;
|
|
74
74
|
const { processAction } = contentRootContext || {};
|
|
75
75
|
const [exportModalVisible, setExportModalVisible] = useState(false);
|
|
@@ -357,7 +357,7 @@ function TreeActionBar(props: Props) {
|
|
|
357
357
|
model={currentModel!}
|
|
358
358
|
domain={mergeParams(
|
|
359
359
|
searchTreeRef?.current?.getDomain() || [],
|
|
360
|
-
searchParams || []
|
|
360
|
+
searchParams || [],
|
|
361
361
|
)}
|
|
362
362
|
limit={limit}
|
|
363
363
|
totalRegisters={totalItems || 0}
|
|
@@ -105,7 +105,7 @@ const ActionViewProvider = (props: ActionViewProviderProps): any => {
|
|
|
105
105
|
const [previousView, setPreviousView] = useState<View>();
|
|
106
106
|
const [searchValues, setSearchValues] = useState<any>({});
|
|
107
107
|
const [limit, setLimit] = useState<number>(
|
|
108
|
-
limitProps !== undefined ? limitProps : DEFAULT_SEARCH_LIMIT
|
|
108
|
+
limitProps !== undefined ? limitProps : DEFAULT_SEARCH_LIMIT,
|
|
109
109
|
);
|
|
110
110
|
const [title, setTitle] = useState<string>(titleProps);
|
|
111
111
|
|
|
@@ -125,7 +125,9 @@ const ActionViewProvider = (props: ActionViewProviderProps): any => {
|
|
|
125
125
|
setPreviousView(availableViews[0]);
|
|
126
126
|
} else if (availableViews.length > 1) {
|
|
127
127
|
setPreviousView(
|
|
128
|
-
availableViews.filter(
|
|
128
|
+
availableViews.filter(
|
|
129
|
+
(view) => view.view_id !== currentView.view_id,
|
|
130
|
+
)[0],
|
|
129
131
|
);
|
|
130
132
|
}
|
|
131
133
|
}, [availableViews]);
|
|
@@ -136,7 +138,9 @@ const ActionViewProvider = (props: ActionViewProviderProps): any => {
|
|
|
136
138
|
availableViews.length > 1
|
|
137
139
|
) {
|
|
138
140
|
setPreviousView(
|
|
139
|
-
availableViews.filter(
|
|
141
|
+
availableViews.filter(
|
|
142
|
+
(view) => view.view_id !== currentView.view_id,
|
|
143
|
+
)[0],
|
|
140
144
|
);
|
|
141
145
|
}
|
|
142
146
|
}, [currentView]);
|
|
@@ -10,9 +10,8 @@ export type DashboardActionContextType = {
|
|
|
10
10
|
setMoveItemsEnabled: (value: boolean) => void;
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
-
export const DashboardActionContext =
|
|
14
|
-
null
|
|
15
|
-
);
|
|
13
|
+
export const DashboardActionContext =
|
|
14
|
+
React.createContext<DashboardActionContextType | null>(null);
|
|
16
15
|
|
|
17
16
|
type DashboardActionProviderProps = {
|
|
18
17
|
children: React.ReactNode;
|
|
@@ -4,9 +4,8 @@ export type FormModalContextType = {
|
|
|
4
4
|
setTitle?: (title: string) => void;
|
|
5
5
|
};
|
|
6
6
|
|
|
7
|
-
export const FormModalContext =
|
|
8
|
-
null
|
|
9
|
-
);
|
|
7
|
+
export const FormModalContext =
|
|
8
|
+
React.createContext<FormModalContextType | null>(null);
|
|
10
9
|
|
|
11
10
|
type FormModalProviderProps = FormModalContextType & {
|
|
12
11
|
children: React.ReactNode;
|
|
@@ -11,7 +11,7 @@ export type One2manyContextType = {
|
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
export const One2manyContext = React.createContext<One2manyContextType | null>(
|
|
14
|
-
null
|
|
14
|
+
null,
|
|
15
15
|
);
|
|
16
16
|
|
|
17
17
|
const One2manyProvider = ({
|
|
@@ -23,9 +23,8 @@ const One2manyProvider = ({
|
|
|
23
23
|
}): any => {
|
|
24
24
|
const [currentView, setCurrentView] = useState<ViewType>(initialView);
|
|
25
25
|
const [itemIndex, setItemIndex] = useState<number>(0);
|
|
26
|
-
const [manualTriggerChange, setManualTriggerChange] =
|
|
27
|
-
false
|
|
28
|
-
);
|
|
26
|
+
const [manualTriggerChange, setManualTriggerChange] =
|
|
27
|
+
useState<boolean>(false);
|
|
29
28
|
|
|
30
29
|
return (
|
|
31
30
|
<One2manyContext.Provider
|
|
@@ -72,7 +72,7 @@ const expandWidgetsIfNeeded = ({
|
|
|
72
72
|
|
|
73
73
|
const getSingleRowTemplateColumns = (
|
|
74
74
|
row: Widget[],
|
|
75
|
-
numberOfColumns: number
|
|
75
|
+
numberOfColumns: number,
|
|
76
76
|
) => {
|
|
77
77
|
const gridOptions = row.map((item: Widget) => {
|
|
78
78
|
if (item instanceof Label && (item as Label).fieldForLabel) {
|
|
@@ -20,7 +20,7 @@ const getTextWidth = (text: string, font = "14px -apple-system") => {
|
|
|
20
20
|
export const calculateColumnsWidth = (
|
|
21
21
|
columns: any,
|
|
22
22
|
source: any,
|
|
23
|
-
maxWidthPerCell = 500
|
|
23
|
+
maxWidthPerCell = 500,
|
|
24
24
|
) => {
|
|
25
25
|
if (columns.length === 0) {
|
|
26
26
|
return { columns };
|
|
@@ -32,7 +32,7 @@ export const calculateColumnsWidth = (
|
|
|
32
32
|
const columnsWithWidth = columns.map((column: any) =>
|
|
33
33
|
Object.assign(column, {
|
|
34
34
|
width: getTextWidth(column.title),
|
|
35
|
-
})
|
|
35
|
+
}),
|
|
36
36
|
);
|
|
37
37
|
|
|
38
38
|
// Since we have a minimum width (column's width already calculated),
|
|
@@ -102,7 +102,7 @@ const iconMapping: { [key: string]: string } = {
|
|
|
102
102
|
|
|
103
103
|
export default (
|
|
104
104
|
key: string,
|
|
105
|
-
props?: { className?: any; style: CSSProperties }
|
|
105
|
+
props?: { className?: any; style: CSSProperties },
|
|
106
106
|
) => {
|
|
107
107
|
if (key.indexOf("gtk-") !== -1) {
|
|
108
108
|
const rootIcon = key.replace("gtk-", "").replace(/\-/g, "_");
|
|
@@ -122,15 +122,15 @@ function toCamelCase(key: string): string {
|
|
|
122
122
|
.map((word) =>
|
|
123
123
|
word.replace(
|
|
124
124
|
/\w\S*/g,
|
|
125
|
-
(w) => w.charAt(0).toUpperCase() + w.slice(1).toLowerCase()
|
|
126
|
-
)
|
|
125
|
+
(w) => w.charAt(0).toUpperCase() + w.slice(1).toLowerCase(),
|
|
126
|
+
),
|
|
127
127
|
)
|
|
128
128
|
.join("")}`;
|
|
129
129
|
}
|
|
130
130
|
|
|
131
131
|
function getIconForKey(
|
|
132
132
|
key: string,
|
|
133
|
-
props?: { className?: any; style: CSSProperties }
|
|
133
|
+
props?: { className?: any; style: CSSProperties },
|
|
134
134
|
) {
|
|
135
135
|
let IconCamelCase = key.charAt(0).toUpperCase() + key.slice(1); // Capitalize first letter
|
|
136
136
|
if (IconCamelCase.indexOf("-") !== -1) {
|
|
@@ -150,7 +150,7 @@ function getIconForKey(
|
|
|
150
150
|
const TablerIcon = () =>
|
|
151
151
|
React.createElement(TablerIcons[tablerKey] as any, {
|
|
152
152
|
fill: "transparent",
|
|
153
|
-
size: props?.style?.fontSize || 17
|
|
153
|
+
size: props?.style?.fontSize || 17,
|
|
154
154
|
});
|
|
155
155
|
const CustomIcon = () =>
|
|
156
156
|
React.createElement(Icon, {
|
|
@@ -5,12 +5,14 @@ import showInfo from "@/ui/InfoDialog";
|
|
|
5
5
|
async function showLogInfo(
|
|
6
6
|
model: string,
|
|
7
7
|
currentId: number,
|
|
8
|
-
translateFn: Function
|
|
8
|
+
translateFn: Function,
|
|
9
9
|
) {
|
|
10
|
-
const logInfo = (
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
const logInfo = (
|
|
11
|
+
(await ConnectionProvider.getHandler().getLogInfo({
|
|
12
|
+
model,
|
|
13
|
+
ids: [currentId],
|
|
14
|
+
})) as any
|
|
15
|
+
)[0];
|
|
14
16
|
|
|
15
17
|
const { create_date, create_uid, id, write_date, write_uid } = logInfo;
|
|
16
18
|
|
|
@@ -21,7 +23,7 @@ async function showLogInfo(
|
|
|
21
23
|
{translateFn("creationDate") + ": " + create_date} <br />
|
|
22
24
|
{translateFn("lastUpdatedBy") + ": " + write_uid[1]} <br />
|
|
23
25
|
{translateFn("lastUpdatedDate") + ": " + write_date}
|
|
24
|
-
</div
|
|
26
|
+
</div>,
|
|
25
27
|
);
|
|
26
28
|
}
|
|
27
29
|
|
|
@@ -8,7 +8,7 @@ function parseStringToFloat(text?: string) {
|
|
|
8
8
|
const splitted = text.trim().split(":");
|
|
9
9
|
return (
|
|
10
10
|
Math.round(
|
|
11
|
-
(parseInt(splitted[0]) + parseInt(splitted[1]) / 60.0) * 10000
|
|
11
|
+
(parseInt(splitted[0]) + parseInt(splitted[1]) / 60.0) * 10000,
|
|
12
12
|
) / 10000
|
|
13
13
|
);
|
|
14
14
|
} else {
|
|
@@ -55,4 +55,4 @@ function parseFloatToString(num?: number) {
|
|
|
55
55
|
return finalString;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
export { parseStringToFloat, parseFloatToString };
|
|
58
|
+
export { parseStringToFloat, parseFloatToString };
|
|
@@ -11,7 +11,7 @@ const usePrevious = (value: any, initialValue: any) => {
|
|
|
11
11
|
const useEffectDebugger = (
|
|
12
12
|
effectHook: any,
|
|
13
13
|
dependencies: any,
|
|
14
|
-
dependencyNames = []
|
|
14
|
+
dependencyNames = [],
|
|
15
15
|
) => {
|
|
16
16
|
const previousDeps = usePrevious(dependencies, []);
|
|
17
17
|
|
|
@@ -30,7 +30,7 @@ const useEffectDebugger = (
|
|
|
30
30
|
|
|
31
31
|
return accum;
|
|
32
32
|
},
|
|
33
|
-
{}
|
|
33
|
+
{},
|
|
34
34
|
);
|
|
35
35
|
|
|
36
36
|
if (Object.keys(changedDeps).length) {
|
package/src/hooks/useExport.ts
CHANGED
|
@@ -70,7 +70,7 @@ export const useExport = ({
|
|
|
70
70
|
const fileType: any = await getMimeType(datas);
|
|
71
71
|
openBase64InNewTab(datas, fileType.mime);
|
|
72
72
|
},
|
|
73
|
-
[locale, model, domain, limit, context, onClose]
|
|
73
|
+
[locale, model, domain, limit, context, onClose],
|
|
74
74
|
);
|
|
75
75
|
|
|
76
76
|
const onGetFields = useCallback(async () => {
|
|
@@ -109,7 +109,7 @@ export const useExport = ({
|
|
|
109
109
|
parentKey: key,
|
|
110
110
|
});
|
|
111
111
|
},
|
|
112
|
-
[fields.current, model, context]
|
|
112
|
+
[fields.current, model, context],
|
|
113
113
|
);
|
|
114
114
|
|
|
115
115
|
const onGetPredefinedExports = useCallback(async () => {
|
|
@@ -171,12 +171,12 @@ export const useExport = ({
|
|
|
171
171
|
fields: fieldsForExportLine,
|
|
172
172
|
context,
|
|
173
173
|
});
|
|
174
|
-
})
|
|
174
|
+
}),
|
|
175
175
|
);
|
|
176
176
|
|
|
177
177
|
return { ...pExport, id: exportId };
|
|
178
178
|
},
|
|
179
|
-
[]
|
|
179
|
+
[],
|
|
180
180
|
);
|
|
181
181
|
|
|
182
182
|
const onRemovePredefinedExport = useCallback(
|
|
@@ -186,7 +186,7 @@ export const useExport = ({
|
|
|
186
186
|
ids: [pExport.id!],
|
|
187
187
|
});
|
|
188
188
|
},
|
|
189
|
-
[]
|
|
189
|
+
[],
|
|
190
190
|
);
|
|
191
191
|
|
|
192
192
|
const getModelFields = useCallback(
|
|
@@ -203,7 +203,7 @@ export const useExport = ({
|
|
|
203
203
|
|
|
204
204
|
exportModelFields.current.set(model, fieldsForModel);
|
|
205
205
|
},
|
|
206
|
-
[exportModelFields, context]
|
|
206
|
+
[exportModelFields, context],
|
|
207
207
|
);
|
|
208
208
|
|
|
209
209
|
return {
|
|
@@ -352,7 +352,7 @@ const getKeysWithoutChildsInFields = ({
|
|
|
352
352
|
return !fields?.[getParentKey(key)]?.[key];
|
|
353
353
|
}
|
|
354
354
|
})
|
|
355
|
-
.map((key) => getParentKey(key))
|
|
355
|
+
.map((key) => getParentKey(key)),
|
|
356
356
|
),
|
|
357
357
|
]);
|
|
358
358
|
};
|
|
@@ -367,7 +367,7 @@ const retrieveKeyFieldsForPredefinedExports = async ({
|
|
|
367
367
|
onGetFieldChilds: (key: string) => Promise<ExportField[]>;
|
|
368
368
|
}) => {
|
|
369
369
|
const allPredefinedExportKeys = predefinedExports.flatMap(
|
|
370
|
-
(exp: PredefinedExport) => exp.fields.map((field: any) => field.key)
|
|
370
|
+
(exp: PredefinedExport) => exp.fields.map((field: any) => field.key),
|
|
371
371
|
);
|
|
372
372
|
|
|
373
373
|
const keysWithoutChildsInFields = getKeysWithoutChildsInFields({
|
|
@@ -4,7 +4,6 @@ import React, { useState } from "react";
|
|
|
4
4
|
import { TimeInput } from "../widgets/base/Time";
|
|
5
5
|
import { Time as TimeOoui } from "@gisce/ooui";
|
|
6
6
|
|
|
7
|
-
|
|
8
7
|
import LocaleProvider from "../context/LocaleContext";
|
|
9
8
|
|
|
10
9
|
export default {
|
|
@@ -17,12 +16,12 @@ export const Default = (): React.ReactElement => {
|
|
|
17
16
|
string: "Lorem ipsum",
|
|
18
17
|
});
|
|
19
18
|
|
|
20
|
-
const [value, setValue] = useState<string>(
|
|
19
|
+
const [value, setValue] = useState<string>("23:12:34");
|
|
21
20
|
|
|
22
21
|
const onChange = (value: string) => {
|
|
23
22
|
console.log(value);
|
|
24
23
|
setValue(value);
|
|
25
|
-
}
|
|
24
|
+
};
|
|
26
25
|
|
|
27
26
|
return (
|
|
28
27
|
<LocaleProvider lang="en_US">
|
|
@@ -7,10 +7,8 @@ export default {
|
|
|
7
7
|
title: "Components/Pure",
|
|
8
8
|
};
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
10
|
export const CustomTagWithColor = (): React.ReactElement => {
|
|
13
11
|
const text = "Hacker";
|
|
14
12
|
const color = colorFromString(text);
|
|
15
|
-
return <CustomTag color={color}>{text}</CustomTag
|
|
13
|
+
return <CustomTag color={color}>{text}</CustomTag>;
|
|
16
14
|
};
|
|
@@ -63,7 +63,7 @@ export const Default = (): React.ReactElement => {
|
|
|
63
63
|
export const WithIcon = (): React.ReactElement => {
|
|
64
64
|
const ooui = new GroupOoui({
|
|
65
65
|
string: "General",
|
|
66
|
-
icon: "home"
|
|
66
|
+
icon: "home",
|
|
67
67
|
});
|
|
68
68
|
return (
|
|
69
69
|
<LocaleProvider lang="en_US">
|
|
@@ -72,10 +72,9 @@ export const WithIcon = (): React.ReactElement => {
|
|
|
72
72
|
);
|
|
73
73
|
};
|
|
74
74
|
|
|
75
|
-
|
|
76
75
|
export const OnlyIcon = (): React.ReactElement => {
|
|
77
76
|
const ooui = new GroupOoui({
|
|
78
|
-
icon: "home"
|
|
77
|
+
icon: "home",
|
|
79
78
|
});
|
|
80
79
|
return (
|
|
81
80
|
<LocaleProvider lang="en_US">
|