@agilemotion/oui-react-js 1.5.9 → 1.6.1
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/InteractionPortalAppHome.js +13 -1
- package/dist/components/DocumentTemplateDesignerComponent.css +0 -167
- package/dist/components/DocumentTemplateDesignerComponent.js +0 -2
- package/dist/components/Portlet.js +3 -2
- package/dist/components/dashboard/BusinessPortalAppDashboard.js +23 -62
- package/dist/view/PortalDashboard.js +1 -1
- package/package.json +1 -1
|
@@ -19,6 +19,8 @@ var _Utils = _interopRequireDefault(require("./Utils"));
|
|
|
19
19
|
|
|
20
20
|
var _reactPromiseTracker = require("react-promise-tracker");
|
|
21
21
|
|
|
22
|
+
var _reactRouterDom = require("react-router-dom");
|
|
23
|
+
|
|
22
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
25
|
|
|
24
26
|
const location = window.location.protocol + "//" + window.location.hostname;
|
|
@@ -44,10 +46,14 @@ const InteractionPortalAppHome = /*#__PURE__*/_react.default.memo( /*#__PURE__*/
|
|
|
44
46
|
|
|
45
47
|
const [loadingColor, setLoadingColor] = _react.default.useState(null);
|
|
46
48
|
|
|
49
|
+
const [loading, setLoading] = _react.default.useState(true);
|
|
50
|
+
|
|
47
51
|
const [hasClientError, setHasClientError] = _react.default.useState(false);
|
|
48
52
|
|
|
49
53
|
const [avatarUrl, setAvatarUrl] = _react.default.useState(location + props.contextRoot + props.implConfig.authUrl + "/user/avatar?" + "access_token=" + sessionStorage.getItem("accessToken") + "&idToken=" + sessionStorage.getItem("idToken"));
|
|
50
54
|
|
|
55
|
+
const navigate = (0, _reactRouterDom.useNavigate)();
|
|
56
|
+
|
|
51
57
|
_react.default.useEffect(() => {
|
|
52
58
|
_ApplicationManager.default.setServiceApiPath(props.implConfig.serviceApiPath);
|
|
53
59
|
|
|
@@ -56,6 +62,12 @@ const InteractionPortalAppHome = /*#__PURE__*/_react.default.memo( /*#__PURE__*/
|
|
|
56
62
|
_ApplicationManager.default.setContextRoot(props.contextRoot);
|
|
57
63
|
|
|
58
64
|
_ApplicationManager.default.setFilesApiPath(props.implConfig.filesApiPath);
|
|
65
|
+
|
|
66
|
+
_ApplicationManager.default.setNavigator(path => {
|
|
67
|
+
navigate(path);
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
setLoading(false);
|
|
59
71
|
}, []);
|
|
60
72
|
|
|
61
73
|
_react.default.useEffect(() => {
|
|
@@ -91,7 +103,7 @@ const InteractionPortalAppHome = /*#__PURE__*/_react.default.memo( /*#__PURE__*/
|
|
|
91
103
|
className: "main w-100 h-100 d-inline-block"
|
|
92
104
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
93
105
|
className: "w-100 h-100"
|
|
94
|
-
},
|
|
106
|
+
}, !loading && !_Utils.default.isNull(dashboardSettings) && !hasClientError ? /*#__PURE__*/_react.default.createElement(_BusinessPortalAppDashboard.default, {
|
|
95
107
|
logoutCallBack: () => {
|
|
96
108
|
logout();
|
|
97
109
|
},
|
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
@import '../../../node_modules/@syncfusion/ej2-base/styles/material.css';
|
|
2
|
-
@import '../../../node_modules/@syncfusion/ej2-icons/styles/material.css';
|
|
3
|
-
@import '../../../node_modules/@syncfusion/ej2-buttons/styles/material.css';
|
|
4
|
-
@import '../../../node_modules/@syncfusion/ej2-splitbuttons/styles/material.css';
|
|
5
|
-
@import '../../../node_modules/@syncfusion/ej2-inputs/styles/material.css';
|
|
6
|
-
@import '../../../node_modules/@syncfusion/ej2-lists/styles/material.css';
|
|
7
|
-
@import '../../../node_modules/@syncfusion/ej2-navigations/styles/material.css';
|
|
8
|
-
@import '../../../node_modules/@syncfusion/ej2-popups/styles/material.css';
|
|
9
|
-
@import '../../../node_modules/@syncfusion/ej2-richtexteditor/styles/material.css';
|
|
10
|
-
|
|
11
|
-
/* csslint ignore:start */
|
|
12
|
-
.e-rte-custom-tbar-section #special_char,
|
|
13
|
-
.e-rte-custom-tbar-section .char_block {
|
|
14
|
-
display: inline-block;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
#custom_tbar,
|
|
18
|
-
#custom_tbar div {
|
|
19
|
-
cursor: pointer;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
#rteSpecial_char {
|
|
23
|
-
padding: 15px 0 15px 0;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.material .e-rte-custom-tbar-section .char_block.e-active {
|
|
27
|
-
outline: 1px solid #e3165b;
|
|
28
|
-
border-color: #e3165b;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.fabric .e-rte-custom-tbar-section .char_block.e-active {
|
|
32
|
-
outline: 1px solid #0078d6;
|
|
33
|
-
border-color: #0078d6;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.bootstrap .e-rte-custom-tbar-section .char_block.e-active {
|
|
37
|
-
outline: 1px solid #317ab9;
|
|
38
|
-
border-color: #317ab9;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.highcontrast .e-rte-custom-tbar-section .char_block.e-active {
|
|
42
|
-
outline: 1px solid #ffd939;
|
|
43
|
-
border-color: #ffd939;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.fabric.e-bigger .e-toolbar .e-toolbar-items .e-toolbar-item .e-tbar-btn.e-btn .e-tbar-btn-text,
|
|
47
|
-
.highcontrast.e-bigger .e-toolbar .e-toolbar-items .e-toolbar-item .e-tbar-btn.e-btn .e-tbar-btn-text {
|
|
48
|
-
padding-right: 10px;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.bootstrap.e-bigger .e-toolbar .e-toolbar-items .e-toolbar-item .e-tbar-btn.e-btn .e-tbar-btn-text,
|
|
52
|
-
.bootstrap .e-toolbar .e-toolbar-items .e-toolbar-item .e-tbar-btn.e-btn .e-tbar-btn-text {
|
|
53
|
-
padding-right: 6px;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.fabric .e-toolbar .e-toolbar-items .e-toolbar-item .e-tbar-btn.e-btn .e-tbar-btn-text,
|
|
57
|
-
.highcontrast .e-toolbar .e-toolbar-items .e-toolbar-item .e-tbar-btn.e-btn .e-tbar-btn-text {
|
|
58
|
-
padding-right: 8px;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/*.e-rte-custom-tbar-section .char_block {*/
|
|
62
|
-
/* height: 30px;*/
|
|
63
|
-
/* margin: 0 5px 5px 0;*/
|
|
64
|
-
/* padding: 4px;*/
|
|
65
|
-
/* text-align: center;*/
|
|
66
|
-
/* vertical-align: middle;*/
|
|
67
|
-
/* border: 1px solid #DDDDDD;*/
|
|
68
|
-
/* font-size: 16px;*/
|
|
69
|
-
/* cursor: pointer;*/
|
|
70
|
-
/* user-select: none;*/
|
|
71
|
-
/*}*/
|
|
72
|
-
|
|
73
|
-
.e-rte-custom-tbar-section .char_block {
|
|
74
|
-
display: flex;
|
|
75
|
-
align-items: center;
|
|
76
|
-
background-color: white;
|
|
77
|
-
padding: 20px;
|
|
78
|
-
border-radius: 8px;
|
|
79
|
-
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
|
80
|
-
cursor: pointer;
|
|
81
|
-
margin: 0 5px 5px 0;
|
|
82
|
-
|
|
83
|
-
&.e-active {
|
|
84
|
-
outline: 1px solid #e3165b;
|
|
85
|
-
border-color: #e3165b;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.char_block .e-active {
|
|
90
|
-
outline: 1px solid #e3165b;
|
|
91
|
-
border-color: #e3165b;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.icon {
|
|
95
|
-
font-size: 2rem;
|
|
96
|
-
color: #007BFF;
|
|
97
|
-
margin-right: 20px;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.text-container {
|
|
101
|
-
display: flex;
|
|
102
|
-
flex-direction: column;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.title {
|
|
106
|
-
margin: 0;
|
|
107
|
-
font-size: 1rem;
|
|
108
|
-
color: #333;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.subtitle {
|
|
112
|
-
margin: 0;
|
|
113
|
-
font-size: 0.5rem;
|
|
114
|
-
color: #777;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
#rteSection {
|
|
118
|
-
height: 500px;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
#rteCustomTool .e-richtexteditor .e-rte-content .e-content {
|
|
122
|
-
float: left;
|
|
123
|
-
width: 100%;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
#rteCustomTool {
|
|
127
|
-
overflow: hidden;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
#rteCustomTool .content-wrapper {
|
|
131
|
-
width: auto;
|
|
132
|
-
margin: 0;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
#custom_tbar div {
|
|
136
|
-
font-size: 16px;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
.e-bigger #custom_tbar div {
|
|
140
|
-
font-size: 18px;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
@media (min-width: 320px) and (max-width: 480px) {
|
|
144
|
-
.fabric.e-bigger #customTbarDlg {
|
|
145
|
-
min-width: 281px;
|
|
146
|
-
}
|
|
147
|
-
.fabric #customTbarDlg {
|
|
148
|
-
min-width: 241px;
|
|
149
|
-
}
|
|
150
|
-
.bootstrap.e-bigger #customTbarDlg,
|
|
151
|
-
.bootstrap #customTbarDlg {
|
|
152
|
-
min-width: 223px;
|
|
153
|
-
}
|
|
154
|
-
.highcontrast.e-bigger #customTbarDlg {
|
|
155
|
-
min-width: 283px;
|
|
156
|
-
}
|
|
157
|
-
.highcontrast #customTbarDlg {
|
|
158
|
-
min-width: 243px;
|
|
159
|
-
}
|
|
160
|
-
.material #customTbarDlg {
|
|
161
|
-
min-width: 224px;
|
|
162
|
-
}
|
|
163
|
-
.material.e-bigger #customTbarDlg {
|
|
164
|
-
min-width: 236px;
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
/* csslint ignore:end */
|
|
@@ -9,8 +9,6 @@ var _ej2ReactRichtexteditor = require("@syncfusion/ej2-react-richtexteditor");
|
|
|
9
9
|
|
|
10
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
-
require("./DocumentTemplateDesignerComponent.css");
|
|
13
|
-
|
|
14
12
|
var _DocumentTemplatePlaceholderDialog = _interopRequireDefault(require("./DocumentTemplatePlaceholderDialog"));
|
|
15
13
|
|
|
16
14
|
var _mammoth = _interopRequireDefault(require("mammoth"));
|
|
@@ -16,7 +16,7 @@ require("./Portlet.css");
|
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
17
|
|
|
18
18
|
const Portlet = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
19
|
-
var _props$config$attribu;
|
|
19
|
+
var _props$config$attribu, _props$config$attribu2;
|
|
20
20
|
|
|
21
21
|
const [url, setUrl] = _react.default.useState(null);
|
|
22
22
|
|
|
@@ -96,7 +96,8 @@ const Portlet = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.fo
|
|
|
96
96
|
src: url,
|
|
97
97
|
title: "eProcurement",
|
|
98
98
|
className: 'portlet-iframe',
|
|
99
|
-
|
|
99
|
+
sandbox: (_props$config$attribu = props.config.attributes) === null || _props$config$attribu === void 0 ? void 0 : _props$config$attribu.sandbox,
|
|
100
|
+
allow: (_props$config$attribu2 = props.config.attributes) === null || _props$config$attribu2 === void 0 ? void 0 : _props$config$attribu2.allow,
|
|
100
101
|
id: props.config.id
|
|
101
102
|
}));
|
|
102
103
|
}));
|
|
@@ -17,10 +17,6 @@ require("./BusinessPortalAppDashboard.css");
|
|
|
17
17
|
|
|
18
18
|
var _Workspace = _interopRequireDefault(require("./components/portal/Workspace"));
|
|
19
19
|
|
|
20
|
-
var _Observable = _interopRequireDefault(require("../../event/Observable"));
|
|
21
|
-
|
|
22
|
-
var _RestUtils = require("../../RestUtils");
|
|
23
|
-
|
|
24
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
21
|
|
|
26
22
|
let ps;
|
|
@@ -32,62 +28,6 @@ const BusinessPortalAppDashboard = /*#__PURE__*/_react.default.memo(props => {
|
|
|
32
28
|
|
|
33
29
|
const [logo, setLogo] = _react.default.useState("data:image/png;base64," + props.logo);
|
|
34
30
|
|
|
35
|
-
const getItems = (items, level) => {
|
|
36
|
-
let newItems = [];
|
|
37
|
-
|
|
38
|
-
for (let i = 0; i < items.length; i++) {
|
|
39
|
-
_Observable.default.clearComponentEventListeners(items[i].id);
|
|
40
|
-
|
|
41
|
-
let createItem = {};
|
|
42
|
-
createItem.name = items[i].attributes.label;
|
|
43
|
-
createItem.mini = "SS";
|
|
44
|
-
createItem.layout = "/admin";
|
|
45
|
-
createItem.item = items[i];
|
|
46
|
-
createItem.level = level;
|
|
47
|
-
|
|
48
|
-
if (!_Utils.default.isNull(items[i].subMenu)) {
|
|
49
|
-
createItem.collapse = true;
|
|
50
|
-
createItem.state = items[i].id + "SubMenuCollapse";
|
|
51
|
-
createItem.views = getItems(items[i].subMenu.items, level + 1);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
newItems.push(createItem);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
return newItems;
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
const getMenu = path => {
|
|
61
|
-
return new Promise(resolve => {
|
|
62
|
-
let service = {
|
|
63
|
-
url: '/ui/api/v1/menu/get',
|
|
64
|
-
parameters: [{
|
|
65
|
-
name: 'id',
|
|
66
|
-
value: path,
|
|
67
|
-
httpParameterType: 'QUERY_PARAMETER'
|
|
68
|
-
}, {
|
|
69
|
-
name: 'version',
|
|
70
|
-
value: 1.0,
|
|
71
|
-
httpParameterType: 'QUERY_PARAMETER'
|
|
72
|
-
}],
|
|
73
|
-
contentType: 'application/json'
|
|
74
|
-
};
|
|
75
|
-
(0, _RestUtils.invokeRest)(service, {
|
|
76
|
-
api: {
|
|
77
|
-
get id() {
|
|
78
|
-
return 'portal-dashboard';
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
}, 'portal-dashboard', result => {
|
|
83
|
-
resolve(result.menus);
|
|
84
|
-
}, e => {
|
|
85
|
-
console.error(e);
|
|
86
|
-
resolve(null);
|
|
87
|
-
}, null);
|
|
88
|
-
});
|
|
89
|
-
};
|
|
90
|
-
|
|
91
31
|
_react.default.useEffect(() => {
|
|
92
32
|
document.body.classList.add("white-content");
|
|
93
33
|
|
|
@@ -98,13 +38,34 @@ const BusinessPortalAppDashboard = /*#__PURE__*/_react.default.memo(props => {
|
|
|
98
38
|
|
|
99
39
|
window.removeEventListener("scroll", showNavbarButton); //dispatch(actionCreators.setSecondaryThemeColor(props.settings.systemProfileDto.secondCorporateBrandColor));
|
|
100
40
|
|
|
41
|
+
let newRoutes = [];
|
|
42
|
+
|
|
43
|
+
if (!_Utils.default.isNull(props.settings.modules)) {
|
|
44
|
+
for (let i = 0; i < props.settings.modules.length; i++) {
|
|
45
|
+
let module = props.settings.modules[i];
|
|
46
|
+
let route = {};
|
|
47
|
+
route.name = module.label;
|
|
48
|
+
route.icon = module.icon;
|
|
49
|
+
route.menu = module.menu;
|
|
50
|
+
route.layout = '/admin';
|
|
51
|
+
route.level = 0;
|
|
52
|
+
|
|
53
|
+
if (module.menu) {
|
|
54
|
+
route.collapse = true;
|
|
55
|
+
route.state = module.name + 'Collapse';
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
newRoutes.push(route);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
setRoutes(newRoutes);
|
|
63
|
+
|
|
101
64
|
if (!_Utils.default.isNull(props.settings)) {
|
|
102
65
|
setCurrentModule("home");
|
|
103
66
|
}
|
|
104
67
|
}, [props.settings]);
|
|
105
68
|
|
|
106
|
-
const handleMiniClick = () => {};
|
|
107
|
-
|
|
108
69
|
const showNavbarButton = () => {
|
|
109
70
|
if (document.documentElement.scrollTop > 50 || document.scrollingElement.scrollTop > 50) {//setOpacity(1);
|
|
110
71
|
} else if (document.documentElement.scrollTop <= 50 || document.scrollingElement.scrollTop <= 50) {//setOpacity(0);
|