@agilemotion/oui-react-js 1.8.6 → 1.8.7

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.
@@ -23,7 +23,7 @@ table.responsive-table thead {
23
23
  left: 0;
24
24
  right: 0;
25
25
  width: 100%;
26
- height: 50px;
26
+ min-height: 50px;
27
27
  line-height: 3em;
28
28
  background: #eee;
29
29
  table-layout: fixed;
@@ -57,7 +57,7 @@ const DataGridHeading = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.def
57
57
  style: {
58
58
  display: 'flex',
59
59
  flexWrap: 'wrap',
60
- height: '56px'
60
+ minHeight: '56px'
61
61
  }
62
62
  }, props.config.selectionMode === 'MULTIPLE' ? /*#__PURE__*/_react.default.createElement(_reactSuperResponsiveTable.Th, {
63
63
  padding: "checkbox",
@@ -0,0 +1,147 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _Utils = _interopRequireDefault(require("../Utils"));
9
+ var _reactHtmlRenderer = _interopRequireDefault(require("react-html-renderer"));
10
+ var _Observable = _interopRequireDefault(require("../event/Observable"));
11
+ var _ApplicationManager = _interopRequireDefault(require("../ApplicationManager"));
12
+ var _reactPromiseTracker = require("react-promise-tracker");
13
+ var _Event = _interopRequireDefault(require("../event/Event"));
14
+ var _EventType = _interopRequireDefault(require("../event/EventType"));
15
+ var _RestService = require("../RestService");
16
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
17
+ const Handlebars = require('handlebars');
18
+ const status = response => {
19
+ if (response.ok) {
20
+ return Promise.resolve(response);
21
+ } else {
22
+ let error = new Error(response.statusText);
23
+ error.code = response.status;
24
+ return Promise.reject(error);
25
+ }
26
+ };
27
+ const json = response => {
28
+ return response.text();
29
+ };
30
+ const location = window.location.protocol + '//' + window.location.hostname + ':' + window.location.port;
31
+ const HtmlPanel = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.default.forwardRef((props, ref) => {
32
+ const [data, setData] = _react.default.useState(null);
33
+ const [visible, setVisible] = _react.default.useState(false);
34
+ _react.default.useEffect(() => {
35
+ props.handle.api = api();
36
+ });
37
+ _react.default.useEffect(() => {
38
+ let event = new _Event.default(props.handle, props.viewId, null);
39
+ _Observable.default.fireEvent(_EventType.default.COMPONENT_LOAD, event);
40
+ doLoadData();
41
+ }, []);
42
+ _react.default.useEffect(() => {
43
+ let parsedConfig = _Utils.default.parseConfig(props.config, props.viewId);
44
+ _Observable.default.addSubscriptions(parsedConfig.eventHandlingConfig, props.handle, props.viewId);
45
+ _Observable.default.addSystemSubscriptions(props.viewId, parsedConfig);
46
+ props.handle.api.refresh();
47
+ return () => {
48
+ _Observable.default.clearComponentEventListeners(props.handle);
49
+ };
50
+ }, []);
51
+ const doLoadData = actionConfig => {
52
+ let service;
53
+ if (actionConfig && actionConfig.service) {
54
+ service = actionConfig.service;
55
+ } else {
56
+ service = props.config.dataService;
57
+ }
58
+ if (!_Utils.default.isNull(service)) {
59
+ let method = service.type === 'rpc' ? _RestService.invokeRpc : _RestService.invokeRest;
60
+ method({
61
+ service: service,
62
+ component: props.handle,
63
+ viewId: props.viewId
64
+ }).then(result => {
65
+ setData(result);
66
+ }).catch(e => {
67
+ console.error(e);
68
+ _Utils.default.publishErrorMessage(e, props.viewId);
69
+ });
70
+ }
71
+ };
72
+ const api = () => {
73
+ return {
74
+ get id() {
75
+ return props.config.id;
76
+ },
77
+ loadData: actionConfig => {
78
+ doLoadData(actionConfig);
79
+ },
80
+ refresh() {
81
+ let parsedConfig = _Utils.default.parseConfig(props.config, props.viewId);
82
+ if (!_Utils.default.isNull(props.config) && !_Utils.default.isNull(parsedConfig.visible)) {
83
+ setVisible(_Utils.default.evaluateBooleanExpression(parsedConfig.visible, parsedConfig.id));
84
+ } else {
85
+ setVisible(true);
86
+ }
87
+ },
88
+ getChildren: () => {
89
+ return [];
90
+ },
91
+ set visible(visible) {
92
+ setVisible(visible);
93
+ }
94
+ };
95
+ };
96
+ return visible && /*#__PURE__*/_react.default.createElement("div", {
97
+ style: _Utils.default.mergeStyles({}, props.config)
98
+ }, data && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, data.steps.map((step, index) => {
99
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("span", {
100
+ style: {
101
+ display: "inline-block",
102
+ width: "auto",
103
+ padding: "16px",
104
+ borderRadius: "32px",
105
+ maxWidth: "100%",
106
+ backgroundColor: step.sequence < data.currentStep.sequence ? '#50cd89' : step.sequence === data.currentStep.sequence ? _ApplicationManager.default.getApplicationPrimaryColor() : 'white',
107
+ border: '1px solid ' + _ApplicationManager.default.getApplicationSecondaryColor(),
108
+ color: step.sequence < data.currentStep.sequence ? '#FFFFFF' : null,
109
+ overflow: "hidden",
110
+ textOverflow: "ellipsis",
111
+ whiteSpace: "nowrap"
112
+ }
113
+ }, /*#__PURE__*/_react.default.createElement("div", {
114
+ style: {
115
+ maxWidth: "100%",
116
+ overflow: "hidden",
117
+ textOverflow: "ellipsis",
118
+ whiteSpace: "nowrap"
119
+ }
120
+ }, step.description), step.startDate && step.endDate && /*#__PURE__*/_react.default.createElement("div", {
121
+ style: {
122
+ fontStyle: "italic",
123
+ fontSize: '12px',
124
+ width: "100%",
125
+ display: 'flex',
126
+ justifyContent: 'left',
127
+ maxWidth: "100%",
128
+ overflow: "hidden",
129
+ textOverflow: "ellipsis",
130
+ whiteSpace: "nowrap"
131
+ }
132
+ }, step.startDate + " - " + step.endDate))), /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, index < data.steps.length - 1 && /*#__PURE__*/_react.default.createElement("div", {
133
+ style: {
134
+ height: "24px",
135
+ marginLeft: "48px"
136
+ }
137
+ }, /*#__PURE__*/_react.default.createElement("div", {
138
+ style: {
139
+ marginTop: "-6px",
140
+ height: "calc(100% + 8px)",
141
+ width: "1px",
142
+ backgroundColor: _ApplicationManager.default.getApplicationSecondaryColor()
143
+ }
144
+ }))));
145
+ })));
146
+ }));
147
+ var _default = exports.default = HtmlPanel;
@@ -82,7 +82,6 @@ const LookupFieldComponent = exports.LookupFieldComponent = /*#__PURE__*/_react.
82
82
  className: 'col-*-*',
83
83
  style: {
84
84
  width: '72px',
85
- marginRight: '8px',
86
85
  height: '100%'
87
86
  }
88
87
  }, /*#__PURE__*/_react.default.createElement(_Button.default, {
@@ -96,7 +95,7 @@ const LookupFieldComponent = exports.LookupFieldComponent = /*#__PURE__*/_react.
96
95
  }, "...")), /*#__PURE__*/_react.default.createElement("div", {
97
96
  className: 'col-*-* no-margin no-padding',
98
97
  style: {
99
- width: 'calc(100% - 80px)',
98
+ width: 'calc(100% - 72px)',
100
99
  marginBottom: base.value ? '0' : '8px'
101
100
  }
102
101
  }, /*#__PURE__*/_react.default.createElement(_TextField.default, {
@@ -1,9 +1,9 @@
1
- .coll-panel-container {
2
- font-family: sans-serif;
3
- text-align: center;
4
- }
5
-
6
- .coll-panel-btn:focus {
7
- outline: 0;
8
- box-shadow: none;
9
- }
1
+ .coll-panel-container {
2
+ font-family: sans-serif;
3
+ text-align: center;
4
+ }
5
+
6
+ .coll-panel-btn:focus {
7
+ outline: 0;
8
+ box-shadow: none;
9
+ }
@@ -28,6 +28,7 @@ var _Portlet = _interopRequireDefault(require("../Portlet"));
28
28
  var _TabPanel = _interopRequireDefault(require("../TabPanel"));
29
29
  var _DocumentTemplateDesigner = _interopRequireDefault(require("../DocumentTemplateDesigner"));
30
30
  var _ChatRoomWrapper = _interopRequireDefault(require("../media/chat/ChatRoomWrapper"));
31
+ var _ProgressTracker = _interopRequireDefault(require("../ProgressTracker"));
31
32
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
32
33
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
33
34
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
@@ -242,6 +243,13 @@ const Layout = props => {
242
243
  key: index,
243
244
  viewId: props.viewId
244
245
  });
246
+ case 'progressTracker':
247
+ return /*#__PURE__*/_react.default.createElement(_ProgressTracker.default, {
248
+ config: component,
249
+ handle: createComponentHandle(component),
250
+ key: index,
251
+ viewId: props.viewId
252
+ });
245
253
  default:
246
254
  return /*#__PURE__*/_react.default.createElement("div", null, 'Unsupported component type ' + component.type);
247
255
  }
@@ -1,68 +1,68 @@
1
- .view {
2
- padding: 0 32px;
3
- background-color: #ffffff;
4
- border-radius: 4px;
5
- }
6
-
7
- .window-unpinned .view {
8
- width: 0 !important;;
9
- }
10
-
11
- .window-pinned .view {
12
- padding: 0 8px;
13
- }
14
-
15
- .no-margin {
16
- margin-left: 0 !important;
17
- margin-right: 0 !important;
18
- }
19
-
20
- .no-padding {
21
- padding-left: 0 !important;
22
- padding-right: 0 !important;
23
- }
24
-
25
- .centered-flex-box {
26
- display: flex;
27
- align-Items: center;
28
- justify-content: center
29
- }
30
-
31
- /* Smartphones (landscape); */
32
- @media only screen and (min-device-width : 361px) and (max-device-width : 480px) {
33
- .view {
34
- padding: 0 16px;
35
- }
36
- }
37
-
38
- /* Smartphones (portrait); */
39
- @media only screen and (min-device-width : 280px) and (max-device-width : 360px) {
40
- .view {
41
- padding: 0 16px;
42
- }
43
- }
44
-
45
- /* iPads (portrait and landscape); */
46
- @media only screen and (min-device-width : 768px) and (max-device-width : 1024px) {
47
- .view {
48
- padding: 0 24px;
49
- }
50
- }
51
-
52
- /* iPad 3 */
53
- @media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : landscape) and (-webkit-min-device-pixel-ratio : 2) {
54
- .view {
55
- padding: 0 24px;
56
- }
57
- }
58
-
59
- /* small desktop screens */
60
- @media only screen and (max-width : 600px) {
61
- }
62
-
63
- /* low resolution desktop */
64
- @media only screen and (max-width : 1200px) {
65
- .view {
66
-
67
- }
68
- }
1
+ .view {
2
+ padding: 0 32px;
3
+ background-color: #ffffff;
4
+ border-radius: 4px;
5
+ }
6
+
7
+ .window-unpinned .view {
8
+ width: 0 !important;;
9
+ }
10
+
11
+ .window-pinned .view {
12
+ padding: 0 8px;
13
+ }
14
+
15
+ .no-margin {
16
+ margin-left: 0 !important;
17
+ margin-right: 0 !important;
18
+ }
19
+
20
+ .no-padding {
21
+ padding-left: 0 !important;
22
+ padding-right: 0 !important;
23
+ }
24
+
25
+ .centered-flex-box {
26
+ display: flex;
27
+ align-Items: center;
28
+ justify-content: center
29
+ }
30
+
31
+ /* Smartphones (landscape); */
32
+ @media only screen and (min-device-width : 361px) and (max-device-width : 480px) {
33
+ .view {
34
+ padding: 0 16px;
35
+ }
36
+ }
37
+
38
+ /* Smartphones (portrait); */
39
+ @media only screen and (min-device-width : 280px) and (max-device-width : 360px) {
40
+ .view {
41
+ padding: 0 16px;
42
+ }
43
+ }
44
+
45
+ /* iPads (portrait and landscape); */
46
+ @media only screen and (min-device-width : 768px) and (max-device-width : 1024px) {
47
+ .view {
48
+ padding: 0 24px;
49
+ }
50
+ }
51
+
52
+ /* iPad 3 */
53
+ @media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : landscape) and (-webkit-min-device-pixel-ratio : 2) {
54
+ .view {
55
+ padding: 0 24px;
56
+ }
57
+ }
58
+
59
+ /* small desktop screens */
60
+ @media only screen and (max-width : 600px) {
61
+ }
62
+
63
+ /* low resolution desktop */
64
+ @media only screen and (max-width : 1200px) {
65
+ .view {
66
+
67
+ }
68
+ }
@@ -1,36 +1,36 @@
1
- .loaderModal {
2
- display: block; /* Hidden by default */
3
- position: fixed; /* Stay in place */
4
- z-index: 3000; /* Sit on top */
5
- left: 0;
6
- top: 0;
7
- width: 100vw; /* Full width */
8
- height: 100vh; /* Full height */
9
- overflow: auto; /* Enable scroll if needed */
10
- background-color: rgb(0,0,0); /* Fallback color */
11
- background-color: rgba(0,0,0,0.1); /* Black w/ opacity */
12
- }
13
-
14
- /* Modal Content/Box */
15
- .modal-content {
16
- background-color: transparent;
17
- margin: 30% auto; /* 15% from the top and centered */
18
- padding: 20px;
19
- border: 1px solid #888;
20
- width: 10%; /* Could be more or less, depending on screen size */
21
- }
22
-
23
- /* The Close Button */
24
- .close {
25
- color: #aaa;
26
- float: right;
27
- font-size: 28px;
28
- font-weight: bold;
29
- }
30
-
31
- .close:hover,
32
- .close:focus {
33
- color: black;
34
- text-decoration: none;
35
- cursor: pointer;
36
- }
1
+ .loaderModal {
2
+ display: block; /* Hidden by default */
3
+ position: fixed; /* Stay in place */
4
+ z-index: 3000; /* Sit on top */
5
+ left: 0;
6
+ top: 0;
7
+ width: 100vw; /* Full width */
8
+ height: 100vh; /* Full height */
9
+ overflow: auto; /* Enable scroll if needed */
10
+ background-color: rgb(0,0,0); /* Fallback color */
11
+ background-color: rgba(0,0,0,0.1); /* Black w/ opacity */
12
+ }
13
+
14
+ /* Modal Content/Box */
15
+ .modal-content {
16
+ background-color: transparent;
17
+ margin: 30% auto; /* 15% from the top and centered */
18
+ padding: 20px;
19
+ border: 1px solid #888;
20
+ width: 10%; /* Could be more or less, depending on screen size */
21
+ }
22
+
23
+ /* The Close Button */
24
+ .close {
25
+ color: #aaa;
26
+ float: right;
27
+ font-size: 28px;
28
+ font-weight: bold;
29
+ }
30
+
31
+ .close:hover,
32
+ .close:focus {
33
+ color: black;
34
+ text-decoration: none;
35
+ cursor: pointer;
36
+ }
@@ -1,4 +1,4 @@
1
- .user-video {
2
- min-width: 280px;
3
- height: 280px;
4
- }
1
+ .user-video {
2
+ min-width: 280px;
3
+ height: 280px;
4
+ }
@@ -1,91 +1,91 @@
1
- .table thead th {
2
- }
3
-
4
- table.responsive-table {
5
- display: table;
6
- /* required for table-layout to be used (not normally necessary; included for completeness) */
7
- table-layout: fixed;
8
- /* this keeps your columns with fixed with exactly the right width */
9
- width: 100% !important;
10
- /* table must have width set for fixed layout to work as expected */
11
- height: 100%;
12
- }
13
-
14
- table.responsive-table thead {
15
- position: fixed;
16
- top: 50px;
17
- left: 0;
18
- right: 0;
19
- width: 100%;
20
- height: 50px;
21
- line-height: 3em;
22
- background: #eee;
23
- table-layout: fixed;
24
- display: table;
25
- }
26
-
27
- table.responsive-table th {
28
- background: #eee;
29
- }
30
-
31
- table.responsive-table td {
32
- line-height: 2em;
33
- }
34
-
35
- table.responsive-table tr > td,
36
- table.responsive-table th {
37
- text-align: left;
38
- }
39
-
40
- .table td, .table th {
41
- white-space: nowrap;
42
- overflow: hidden !important;
43
- text-overflow: ellipsis;
44
- min-width: 0 !important;
45
- border-bottom: 1px solid rgba(224, 224, 224, 1) !important;
46
- border-top: none !important;
47
- }
48
-
49
- .selectCell {
50
- white-space: normal !important;
51
- text-overflow: unset !important;
52
- }
53
-
54
- .selectCell span{
55
- padding: 0 !important;
56
- }
57
-
58
- .table td {
59
- padding: 6px 24px 6px 16px;
60
- border-top: none !important;
61
- display: table-cell;
62
- font-size: 0.875rem;
63
- text-align: left;
64
- font-family: "Roboto", "Helvetica", "Arial", sans-serif;
65
- font-weight: 400;
66
- line-height: 1.43;
67
- border-bottom: 1px solid rgba(224, 224, 224, 1);
68
- letter-spacing: 0.01071em;
69
- vertical-align: inherit
70
- }
71
-
72
- .table th {
73
- color: rgba(0, 0, 0, 0.54);
74
- font-size: 0.75rem;
75
- font-weight: 500;
76
- line-height: 1.3125rem;
77
- }
78
-
79
- .table {
80
- table-layout: fixed;
81
- }
82
-
83
- .table-scrollbar {
84
- position: relative;
85
- overflow: auto;
86
- }
87
-
88
- @media screen and (max-width: 40em) {
89
-
90
-
91
- }
1
+ .table thead th {
2
+ }
3
+
4
+ table.responsive-table {
5
+ display: table;
6
+ /* required for table-layout to be used (not normally necessary; included for completeness) */
7
+ table-layout: fixed;
8
+ /* this keeps your columns with fixed with exactly the right width */
9
+ width: 100% !important;
10
+ /* table must have width set for fixed layout to work as expected */
11
+ height: 100%;
12
+ }
13
+
14
+ table.responsive-table thead {
15
+ position: fixed;
16
+ top: 50px;
17
+ left: 0;
18
+ right: 0;
19
+ width: 100%;
20
+ min-height: 50px;
21
+ line-height: 3em;
22
+ background: #eee;
23
+ table-layout: fixed;
24
+ display: table;
25
+ }
26
+
27
+ table.responsive-table th {
28
+ background: #eee;
29
+ }
30
+
31
+ table.responsive-table td {
32
+ line-height: 2em;
33
+ }
34
+
35
+ table.responsive-table tr > td,
36
+ table.responsive-table th {
37
+ text-align: left;
38
+ }
39
+
40
+ .table td, .table th {
41
+ white-space: nowrap;
42
+ overflow: hidden !important;
43
+ text-overflow: ellipsis;
44
+ min-width: 0 !important;
45
+ border-bottom: 1px solid rgba(224, 224, 224, 1) !important;
46
+ border-top: none !important;
47
+ }
48
+
49
+ .selectCell {
50
+ white-space: normal !important;
51
+ text-overflow: unset !important;
52
+ }
53
+
54
+ .selectCell span{
55
+ padding: 0 !important;
56
+ }
57
+
58
+ .table td {
59
+ padding: 6px 24px 6px 16px;
60
+ border-top: none !important;
61
+ display: table-cell;
62
+ font-size: 0.875rem;
63
+ text-align: left;
64
+ font-family: "Roboto", "Helvetica", "Arial", sans-serif;
65
+ font-weight: 400;
66
+ line-height: 1.43;
67
+ border-bottom: 1px solid rgba(224, 224, 224, 1);
68
+ letter-spacing: 0.01071em;
69
+ vertical-align: inherit
70
+ }
71
+
72
+ .table th {
73
+ color: rgba(0, 0, 0, 0.54);
74
+ font-size: 0.75rem;
75
+ font-weight: 500;
76
+ line-height: 1.3125rem;
77
+ }
78
+
79
+ .table {
80
+ table-layout: fixed;
81
+ }
82
+
83
+ .table-scrollbar {
84
+ position: relative;
85
+ overflow: auto;
86
+ }
87
+
88
+ @media screen and (max-width: 40em) {
89
+
90
+
91
+ }
@@ -1,126 +1,126 @@
1
- @media all and (min-width: 480px) {
2
- .btn-primary {
3
- border-color: transparent;
4
- }
5
-
6
- #menubar-scroll::-webkit-scrollbar-track {
7
- -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
8
- background-color: #F5F5F5;
9
- }
10
-
11
- #menubar-scroll::-webkit-scrollbar {
12
- width: 6px !important;
13
- background-color: #F5F5F5;
14
- }
15
-
16
- #menubar-scroll::-webkit-scrollbar-thumb {
17
- background-color: #939393 !important;
18
- }
19
-
20
- .menu-table button {
21
- height: 96px;
22
- width: 100%;
23
- border-radius: 0 !important;
24
- text-decoration:none;
25
- }
26
-
27
- .menu-table .toolStripButtonSelected {
28
- text-decoration: none;
29
- }
30
-
31
- .menu-table .btn-primary:focus {
32
- box-shadow: none;
33
- text-decoration: none;
34
- }
35
- .footer {
36
- font-size: 14px;
37
- text-align: center;
38
- color: white;
39
- height: 10vh;
40
- padding-top: 8px;
41
- }
42
-
43
- .react-pdf__Page__canvas{
44
- width: 100% !important;
45
- }
46
-
47
- .header {
48
- background-clip:border-box;
49
- border-bottom: 1px solid #e1e1e1;
50
- }
51
-
52
- .header shadow {
53
- /**box-shadow: 0 0.15rem 1.75rem 0 rgba(40, 41, 55, 0.15) !important;**/
54
- }
55
-
56
- .header span {
57
- /**color: #fff;**/
58
- }
59
-
60
- .header .form-inline .form-control {
61
- border-top-right-radius: 0;
62
- border-bottom-right-radius: 0;
63
- position: relative;
64
- flex: 1 1 auto;
65
- width: 1%;
66
- margin-bottom: 0;
67
- display: inline-block;
68
- width: auto;
69
- vertical-align: middle;
70
- background-color: #f8f9fc !important;
71
- border: 0 !important;
72
- }
73
-
74
- .btn-primary, .btn, .btn-primary:hover, .btn:hover, .btn-primary:focus, .btn:focus {
75
- outline: none !important;
76
- outline-offset: unset !important;
77
- border-color: transparent !important;
78
- box-shadow: none !important;
79
- text-decoration: none;
80
- }
81
-
82
- .header .btn-primary {
83
- display: block;
84
- color: #fff;
85
- border-radius: 0px;
86
- /*box-shadow: 0px 4px 6px 2px rgba(0,0,0,0.2);*/
87
- //background-color: #114084;
88
- border-top: 1px solid rgba(255,255,255,0.5) !important;
89
- margin-top: -5px;
90
- text-decoration: none;
91
- }
92
-
93
- .header .btn {
94
- font-weight: 400;
95
- text-align: center;
96
- vertical-align: middle;
97
- -ms-user-select: none;
98
- user-select: none;
99
- border: 1px solid transparent;
100
- padding: 0.375rem 0.75rem;
101
- font-size: 1rem;
102
- line-height: 2;
103
- width: 100%;
104
- text-align:left;
105
- text-decoration:none;
106
- transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
107
- }
108
- .border {
109
- border: 0px solid #dee2e6 !important;
110
- }
111
-
112
- .header .dropdown-toggle::after {
113
- display: inline-block;
114
- margin-left: .255em;
115
- vertical-align: .255em;
116
- content: none !important;
117
- border-top: .3em solid;
118
- border-right: .3em solid transparent;
119
- border-bottom: 0;
120
- border-left: .3em solid transparent;
121
- }
122
-
123
- .search .card-body{
124
- height: 60vh !important;
125
- }
126
- }
1
+ @media all and (min-width: 480px) {
2
+ .btn-primary {
3
+ border-color: transparent;
4
+ }
5
+
6
+ #menubar-scroll::-webkit-scrollbar-track {
7
+ -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
8
+ background-color: #F5F5F5;
9
+ }
10
+
11
+ #menubar-scroll::-webkit-scrollbar {
12
+ width: 6px !important;
13
+ background-color: #F5F5F5;
14
+ }
15
+
16
+ #menubar-scroll::-webkit-scrollbar-thumb {
17
+ background-color: #939393 !important;
18
+ }
19
+
20
+ .menu-table button {
21
+ height: 96px;
22
+ width: 100%;
23
+ border-radius: 0 !important;
24
+ text-decoration:none;
25
+ }
26
+
27
+ .menu-table .toolStripButtonSelected {
28
+ text-decoration: none;
29
+ }
30
+
31
+ .menu-table .btn-primary:focus {
32
+ box-shadow: none;
33
+ text-decoration: none;
34
+ }
35
+ .footer {
36
+ font-size: 14px;
37
+ text-align: center;
38
+ color: white;
39
+ height: 10vh;
40
+ padding-top: 8px;
41
+ }
42
+
43
+ .react-pdf__Page__canvas{
44
+ width: 100% !important;
45
+ }
46
+
47
+ .header {
48
+ background-clip:border-box;
49
+ border-bottom: 1px solid #e1e1e1;
50
+ }
51
+
52
+ .header shadow {
53
+ /**box-shadow: 0 0.15rem 1.75rem 0 rgba(40, 41, 55, 0.15) !important;**/
54
+ }
55
+
56
+ .header span {
57
+ /**color: #fff;**/
58
+ }
59
+
60
+ .header .form-inline .form-control {
61
+ border-top-right-radius: 0;
62
+ border-bottom-right-radius: 0;
63
+ position: relative;
64
+ flex: 1 1 auto;
65
+ width: 1%;
66
+ margin-bottom: 0;
67
+ display: inline-block;
68
+ width: auto;
69
+ vertical-align: middle;
70
+ background-color: #f8f9fc !important;
71
+ border: 0 !important;
72
+ }
73
+
74
+ .btn-primary, .btn, .btn-primary:hover, .btn:hover, .btn-primary:focus, .btn:focus {
75
+ outline: none !important;
76
+ outline-offset: unset !important;
77
+ border-color: transparent !important;
78
+ box-shadow: none !important;
79
+ text-decoration: none;
80
+ }
81
+
82
+ .header .btn-primary {
83
+ display: block;
84
+ color: #fff;
85
+ border-radius: 0px;
86
+ /*box-shadow: 0px 4px 6px 2px rgba(0,0,0,0.2);*/
87
+ //background-color: #114084;
88
+ border-top: 1px solid rgba(255,255,255,0.5) !important;
89
+ margin-top: -5px;
90
+ text-decoration: none;
91
+ }
92
+
93
+ .header .btn {
94
+ font-weight: 400;
95
+ text-align: center;
96
+ vertical-align: middle;
97
+ -ms-user-select: none;
98
+ user-select: none;
99
+ border: 1px solid transparent;
100
+ padding: 0.375rem 0.75rem;
101
+ font-size: 1rem;
102
+ line-height: 2;
103
+ width: 100%;
104
+ text-align:left;
105
+ text-decoration:none;
106
+ transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
107
+ }
108
+ .border {
109
+ border: 0px solid #dee2e6 !important;
110
+ }
111
+
112
+ .header .dropdown-toggle::after {
113
+ display: inline-block;
114
+ margin-left: .255em;
115
+ vertical-align: .255em;
116
+ content: none !important;
117
+ border-top: .3em solid;
118
+ border-right: .3em solid transparent;
119
+ border-bottom: 0;
120
+ border-left: .3em solid transparent;
121
+ }
122
+
123
+ .search .card-body{
124
+ height: 60vh !important;
125
+ }
126
+ }
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _react = _interopRequireDefault(require("react"));
7
+ var _react = _interopRequireWildcard(require("react"));
8
8
  var _Utils = _interopRequireDefault(require("../Utils"));
9
9
  var _reactstrap = require("reactstrap");
10
10
  var _Icon = _interopRequireDefault(require("../components/Icon"));
@@ -18,7 +18,11 @@ var _Event = _interopRequireDefault(require("../event/Event"));
18
18
  var _Observable = _interopRequireDefault(require("../event/Observable"));
19
19
  var _EventType = _interopRequireDefault(require("../event/EventType"));
20
20
  var _AlertBar = _interopRequireDefault(require("../components/AlertBar"));
21
+ var _reactPromiseTracker = require("react-promise-tracker");
22
+ var _View = require("../components/layout/View");
21
23
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
24
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
25
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
22
26
  const location = window.location.protocol + '//' + window.location.hostname;
23
27
  const text = response => {
24
28
  return response.text();
@@ -28,38 +32,55 @@ const DashboardCard = props => {
28
32
  const [path, setPath] = _react.default.useState(null);
29
33
  const [name, setName] = _react.default.useState(null);
30
34
  const [displayType, setDisplayType] = _react.default.useState(null);
35
+ const [view, setview] = _react.default.useState(null);
31
36
  const {
32
37
  settings
33
38
  } = props;
34
39
  const [id, setId] = _react.default.useState(props.settings.id);
35
40
  const [content, setContent] = _react.default.useState(null);
36
41
  const [ref] = _react.default.useState(/*#__PURE__*/_react.default.createRef());
42
+ const keyCounter = (0, _react.useRef)(0);
37
43
  _react.default.useEffect(() => {
38
44
  const accessToken = sessionStorage.getItem('accessToken');
39
45
  const idToken = sessionStorage.getItem('idToken');
40
- if (path) {
41
- let fetchConfig = {
42
- method: 'GET',
43
- headers: {
44
- 'Content-Type': 'text/html',
45
- 'Accept': 'text/html',
46
- 'Authorization': 'Bearer ' + accessToken,
47
- 'idToken': idToken
46
+ const handle = {
47
+ api: {
48
+ get id() {
49
+ return 'dashboard-menus';
50
+ },
51
+ loaded() {
52
+ return true;
48
53
  }
49
- };
50
-
51
- /*trackPromise(
52
- fetch(encodeURI(path), fetchConfig)
53
- .then(text)
54
- .then((data) => {
55
- setContent(data);
56
- })
57
- .catch((e) => {
58
- console.error(e);
59
- })
60
- );*/
61
- }
62
- }, [path]);
54
+ }
55
+ };
56
+ if (path && displayType) {
57
+ if (displayType === 'VIEW') {
58
+ (0, _RestUtils.sendRequest)(path, data => {
59
+ setview(/*#__PURE__*/_react.default.createElement(_View.View, {
60
+ key: data.id + "-" + keyCounter.current++,
61
+ config: data,
62
+ parameters: [],
63
+ handle: handle
64
+ }));
65
+ });
66
+ } else {
67
+ let fetchConfig = {
68
+ method: 'GET',
69
+ headers: {
70
+ 'Content-Type': 'text/html',
71
+ 'Accept': 'text/html',
72
+ 'Authorization': 'Bearer ' + accessToken,
73
+ 'idToken': idToken
74
+ }
75
+ };
76
+ (0, _reactPromiseTracker.trackPromise)(fetch(encodeURI(path), fetchConfig).then(text).then(data => {
77
+ setContent(data);
78
+ }).catch(e => {
79
+ console.error(e);
80
+ }));
81
+ }
82
+ }
83
+ }, [path, displayType]);
63
84
  _react.default.useEffect(() => {
64
85
  if (!path) {
65
86
  // TODO: Make the base URL dynamic
@@ -79,7 +100,13 @@ const DashboardCard = props => {
79
100
  setName(defaultName);
80
101
  const accessToken = sessionStorage.getItem('accessToken');
81
102
  const idToken = sessionStorage.getItem('idToken');
82
- setPath(location + _ApplicationManager.default.getContextRoot() + _ApplicationManager.default.getUIConfigPath() + '/html/get?version=1.0&id=' + data.contentPath + `-${defaultDisplayType.toLowerCase()}.html&access_token=${accessToken}&idToken=${idToken}`);
103
+ if (defaultDisplayType === 'VIEW') {
104
+ let url = location + _ApplicationManager.default.getContextRoot() + _ApplicationManager.default.getUIConfigPath() + '/view/get?version=1.0&id=' + data.contentPath;
105
+ setPath(url);
106
+ setDisplayType(defaultDisplayType);
107
+ } else {
108
+ setPath(location + _ApplicationManager.default.getContextRoot() + _ApplicationManager.default.getUIConfigPath() + '/html/get?version=1.0&id=' + data.contentPath + `-${defaultDisplayType.toLowerCase()}.html&access_token=${accessToken}&idToken=${idToken}`);
109
+ }
83
110
  }, e => {
84
111
  console.error(e);
85
112
  });
@@ -198,14 +225,19 @@ const DashboardCard = props => {
198
225
  height: '32vh',
199
226
  padding: '8px 32px 0 0'
200
227
  }
201
- }, !_Utils.default.isNull(path) ? /*#__PURE__*/_react.default.createElement("object", {
228
+ }, !_Utils.default.isNull(path) && !_Utils.default.isNull(displayType) && displayType !== 'VIEW' && /*#__PURE__*/_react.default.createElement("object", {
202
229
  data: path,
203
230
  type: "text/html",
204
231
  style: {
205
232
  width: '100%',
206
233
  height: '100%'
207
234
  }
208
- }) : /*#__PURE__*/_react.default.createElement("p", null, "Loading...")));
235
+ }), !_Utils.default.isNull(path) && displayType !== 'VIEW' && /*#__PURE__*/_react.default.createElement("p", null, "Loading..."), displayType === 'VIEW' && !_Utils.default.isNull(view) && /*#__PURE__*/_react.default.createElement("div", {
236
+ style: {
237
+ width: '100%',
238
+ height: "100%"
239
+ }
240
+ }, view)));
209
241
  };
210
242
  const WorkFlowCard = props => {
211
243
  const [sp, setSp] = _react.default.useState(null);
@@ -278,7 +310,6 @@ const Dashboard = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.default.f
278
310
  const [cardRows, setCardRows] = _react.default.useState(null);
279
311
  const [cardsPerRow, setCardsPerRow] = _react.default.useState(null);
280
312
  let dashboardCardCounter = 0;
281
- let keyCounter = 0;
282
313
  const api = {
283
314
  get id() {
284
315
  return '_sys_dashboard';
@@ -350,11 +381,33 @@ const Dashboard = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.default.f
350
381
  }, null);
351
382
  });
352
383
  };
384
+ async function loadMenus() {
385
+ if (_Utils.default.isNull(menuItems) && !_Utils.default.isNull(settings.systemProfileDto.modules)) {
386
+ let dashboardMenuitems = [];
387
+ for (let i = 0; i < settings.systemProfileDto.modules.length; i++) {
388
+ let module = settings.systemProfileDto.modules[i];
389
+ if (!_Utils.default.isNull(module.dashboardMenu)) {
390
+ let menus = await getDashboardMenu(module.dashboardMenu);
391
+ if (menus) {
392
+ for (let j = 0; j < menus.length; j++) {
393
+ let menu = menus[j];
394
+ if (menu.items) {
395
+ for (const item of menu.items) {
396
+ dashboardMenuitems.push(item);
397
+ }
398
+ }
399
+ }
400
+ }
401
+ }
402
+ }
403
+ setMenuItems(dashboardMenuitems);
404
+ }
405
+ }
353
406
  _react.default.useEffect(() => {
354
- /*let rpcConfig = {
355
- "type": "rpc",
356
- "procedureName": "getWorkFlowSummary",
357
- "serviceId": "BPM.WorkFlow"
407
+ /*let rpcConfig = {
408
+ "type": "rpc",
409
+ "procedureName": "getWorkFlowSummary",
410
+ "serviceId": "BPM.WorkFlow"
358
411
  };*/
359
412
 
360
413
  let cardsPerRow = 2;
@@ -383,25 +436,7 @@ const Dashboard = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.default.f
383
436
  console.error(e);
384
437
  // TODO : Show error message
385
438
  }, true, true);
386
- if (_Utils.default.isNull(menuItems) && !_Utils.default.isNull(settings.systemProfileDto.modules)) {
387
- let dashboardMenuitems = [];
388
- for (let i = 0; i < settings.systemProfileDto.modules.length; i++) {
389
- let module = settings.systemProfileDto.modules[i];
390
- if (!_Utils.default.isNull(module.dashboardMenu)) {
391
- getDashboardMenu(module.dashboardMenu).then(menus => {
392
- if (menus) {
393
- for (let j = 0; j < menus.length; j++) {
394
- let menu = menus[j];
395
- for (const item of menu.items) {
396
- dashboardMenuitems.push(item);
397
- }
398
- }
399
- }
400
- }).catch(e => {});
401
- }
402
- }
403
- setMenuItems(dashboardMenuitems);
404
- }
439
+ loadMenus();
405
440
  if (!_Utils.default.isNull(settings) && !_Utils.default.isNull(userDashboards) && _Utils.default.isNull(cardRows) && !_Utils.default.isNull(cardsPerRow)) {
406
441
  setupCardRows();
407
442
  }
@@ -428,14 +463,17 @@ const Dashboard = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.default.f
428
463
  className: 'col-*-*',
429
464
  style: {
430
465
  padding: '14px',
431
- width: '120px'
466
+ width: '136px'
432
467
  }
433
468
  }, /*#__PURE__*/_react.default.createElement("p", {
434
469
  style: {
435
470
  fontSize: '24px'
436
471
  }
437
472
  }, "Dashboard")), /*#__PURE__*/_react.default.createElement("div", {
438
- className: 'col-*-*'
473
+ className: 'col-*-*',
474
+ style: {
475
+ marginTop: "4px"
476
+ }
439
477
  }, /*#__PURE__*/_react.default.createElement(_reactstrap.UncontrolledDropdown, null, /*#__PURE__*/_react.default.createElement(_reactstrap.DropdownToggle, {
440
478
  color: "default",
441
479
  "data-toggle": "dropdown",
@@ -449,9 +487,9 @@ const Dashboard = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.default.f
449
487
  className: "dropdown-navbar",
450
488
  end: true,
451
489
  tag: "ul"
452
- }, menuItems.map(item => /*#__PURE__*/_react.default.createElement(_reactstrap.NavLink, {
490
+ }, menuItems.map((item, index) => /*#__PURE__*/_react.default.createElement(_reactstrap.NavLink, {
453
491
  tag: "li",
454
- key: keyCounter++
492
+ key: index
455
493
  }, /*#__PURE__*/_react.default.createElement(_reactstrap.DropdownItem, {
456
494
  className: "nav-item",
457
495
  onClick: () => {
@@ -491,19 +529,18 @@ const Dashboard = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.default.f
491
529
  title: 'Due Today',
492
530
  itemCount: taskSummary.dueTodayItemCount,
493
531
  path: '/workflow/views/due-today-work-items.json'
494
- })), /*#__PURE__*/_react.default.createElement("div", null, !_Utils.default.isNull(cardRows) ? cardRows.map(row => /*#__PURE__*/_react.default.createElement("div", {
532
+ })), /*#__PURE__*/_react.default.createElement("div", null, !_Utils.default.isNull(cardRows) ? cardRows.map((row, i) => /*#__PURE__*/_react.default.createElement("div", {
495
533
  className: 'row',
496
534
  style: {
497
535
  margin: '0 0 16px 0'
498
536
  },
499
- key: keyCounter++
500
- }, row.map(userDashboard => /*#__PURE__*/_react.default.createElement(DashboardCard, {
537
+ key: i
538
+ }, row.map((userDashboard, j) => /*#__PURE__*/_react.default.createElement(DashboardCard, {
501
539
  settings: userDashboard,
502
540
  index: dashboardCardCounter,
503
- key: dashboardCardCounter++,
541
+ key: i + j,
504
542
  onDelete: () => {
505
543
  userDashboards.splice(userDashboards.indexOf(userDashboard), 1);
506
- console.log("\n\n\n\nUD : ", userDashboards);
507
544
  setupCardRows(userDashboard);
508
545
  }
509
546
  })))) : null))));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agilemotion/oui-react-js",
3
- "version": "1.8.6",
3
+ "version": "1.8.7",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -138,5 +138,13 @@
138
138
  "description": "export NODE_OPTIONS=--openssl-legacy-provider",
139
139
  "main": "gulpfile.js",
140
140
  "author": "",
141
- "license": "ISC"
141
+ "license": "ISC",
142
+ "repository": {
143
+ "type": "git",
144
+ "url": "git+https://gitlab.com/agilemotion/oui-react-js.git"
145
+ },
146
+ "bugs": {
147
+ "url": "https://gitlab.com/agilemotion/oui-react-js/issues"
148
+ },
149
+ "homepage": "https://gitlab.com/agilemotion/oui-react-js#readme"
142
150
  }