versacall-core-library-react 2.0.65 → 2.0.67
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/components/CoreAlert/CoreAlert.js +43 -107
- package/dist/components/CoreAlert/index.js +2 -4
- package/dist/components/CoreAppBar/CoreAppBar.js +275 -418
- package/dist/components/CoreAppBar/CoreAppBarDrawer.js +88 -171
- package/dist/components/CoreAppBar/index.js +2 -4
- package/dist/components/CoreAppSelector/AppLink.js +36 -60
- package/dist/components/CoreAppSelector/CoreAppSelector.js +109 -200
- package/dist/components/CoreAppSelector/index.js +2 -4
- package/dist/components/CoreDialogueToolBar/CoreDialogueToolBar.js +43 -69
- package/dist/components/CoreDialogueToolBar/index.js +2 -4
- package/dist/components/CoreDrawer/CoreDrawer.js +168 -286
- package/dist/components/CoreDrawer/index.js +2 -4
- package/dist/components/CoreDropDownTextfield/CoreDropDownTextfield.js +57 -121
- package/dist/components/CoreDropDownTextfield/index.js +2 -4
- package/dist/components/CoreElapsedTime/CoreElapsedTime.js +38 -97
- package/dist/components/CoreElapsedTime/index.js +2 -4
- package/dist/components/CoreFrame/CoreFrame.js +17 -28
- package/dist/components/CoreFrame/index.js +2 -4
- package/dist/components/CoreImportDialog/CoreImportDialog.js +87 -189
- package/dist/components/CoreImportDialog/index.js +2 -4
- package/dist/components/CoreImportResultsDialog/CoreImportResultsDialog.js +19 -45
- package/dist/components/CoreImportResultsDialog/index.js +2 -4
- package/dist/components/CoreImporting/CoreImporting.js +23 -39
- package/dist/components/CoreImporting/index.js +2 -4
- package/dist/components/CorePlugin/CorePlugin.js +83 -160
- package/dist/components/CorePlugin/OldCorePlugin.js +73 -149
- package/dist/components/CorePlugin/index.js +2 -4
- package/dist/components/CoreSaveChangesDialog/CoreSaveChangesDialog.js +10 -32
- package/dist/components/CoreSaveChangesDialog/index.js +2 -4
- package/dist/components/CoreShiftTagFilter/CoreShiftTagFilter.js +288 -408
- package/dist/components/CoreShiftTagFilter/OldCoreShiftTagFilter.js +161 -257
- package/dist/components/CoreShiftTagFilter/index.js +2 -4
- package/dist/components/CoreSideBar/CoreSideBar.js +578 -737
- package/dist/components/CoreSideBar/CoreSideBarDrawer.js +122 -212
- package/dist/components/CoreSideBar/index.js +2 -4
- package/dist/components/CoreSnackBar/CoreSnackBar.js +76 -143
- package/dist/components/CoreSnackBar/index.js +2 -4
- package/dist/components/CoreTable/CoreTable.js +219 -337
- package/dist/components/CoreTable/CoreTableChips.js +11 -19
- package/dist/components/CoreTable/CoreTableHead.js +125 -205
- package/dist/components/CoreTable/CoreTableToolbar.js +34 -56
- package/dist/components/CoreTable/index.js +2 -4
- package/dist/components/CoreTagFilter/CoreTagFilter.js +212 -319
- package/dist/components/CoreTagFilter/OldCoreTagFilter.js +270 -402
- package/dist/components/CoreTagFilter/OldTagChip.js +10 -20
- package/dist/components/CoreTagFilter/OldTagFilterSelector.js +77 -148
- package/dist/components/CoreTagFilter/OldTagOption.js +21 -47
- package/dist/components/CoreTagFilter/TagFilterBuilder.js +114 -274
- package/dist/components/CoreTagFilter/index.js +2 -4
- package/dist/components/CoreTextField/CoreTextField.js +69 -132
- package/dist/components/CoreTextField/index.js +2 -4
- package/dist/components/CoreTheme/CoreTheme.js +13 -27
- package/dist/components/CoreTheme/index.js +2 -4
- package/dist/components/CoreTile/CoreTile.js +21 -34
- package/dist/components/CoreTile/CoreTileToolbar.js +21 -36
- package/dist/components/CoreTile/index.js +2 -4
- package/dist/components/CoreTimerInput/CoreTimerInput.js +36 -60
- package/dist/components/CoreTimerInput/CoreTimerInputOld.js +29 -47
- package/dist/components/CoreTimerInput/index.js +2 -4
- package/dist/components/CoreToolbar/CoreToolbar.js +65 -95
- package/dist/components/CoreToolbar/index.js +2 -4
- package/dist/components/CoreTracker/CoreTracker.js +32 -91
- package/dist/components/CoreTracker/index.js +2 -4
- package/dist/components/CoreTranslate/CoreTranslate.js +17 -48
- package/dist/components/CoreTranslate/index.js +2 -4
- package/dist/components/CoreTranslateWrapper/CoreTranslateWrapper.js +7 -15
- package/dist/components/CoreTranslateWrapper/index.js +2 -4
- package/dist/components/CoreWidget/CoreWidget.js +81 -149
- package/dist/components/CoreWidget/index.js +2 -4
- package/dist/components/CoreWrapper/CoreWrapper.js +8 -16
- package/dist/components/CoreWrapper/index.js +2 -4
- package/dist/components/index.js +29 -58
- package/dist/constants/index.js +3 -6
- package/dist/constants/testOrganization.js +2 -3
- package/dist/constants/testToken.js +2 -3
- package/dist/context/Authentication/AuthenticationContext.js +3 -8
- package/dist/context/Authentication/AuthenticationProvider.js +156 -257
- package/dist/context/Authentication/index.js +4 -8
- package/dist/context/Authentication/withAuthentication.js +5 -14
- package/dist/context/Channels/ChannelsConsumer.js +14 -70
- package/dist/context/Channels/ChannelsContext.js +3 -8
- package/dist/context/Channels/ChannelsProvider.js +132 -278
- package/dist/context/Channels/DataChannel.js +39 -103
- package/dist/context/Channels/EntityChannel.js +40 -104
- package/dist/context/Channels/EveryoneChannel.js +32 -92
- package/dist/context/Channels/OrganizationChannel.js +40 -104
- package/dist/context/Channels/UserChannel.js +37 -99
- package/dist/context/Channels/index.js +10 -20
- package/dist/context/Channels/withChannels.js +5 -14
- package/dist/context/Core/CoreContext.js +3 -8
- package/dist/context/Core/CoreProvider.js +68 -132
- package/dist/context/Core/index.js +4 -8
- package/dist/context/Core/withCore.js +5 -14
- package/dist/context/Organization/OrganizationContext.js +3 -8
- package/dist/context/Organization/OrganizationProvider.js +48 -120
- package/dist/context/Organization/index.js +4 -8
- package/dist/context/Organization/withOrganization.js +5 -14
- package/dist/context/Plugin/PluginContext.js +3 -8
- package/dist/context/Plugin/PluginProvider.js +55 -112
- package/dist/context/Plugin/index.js +4 -8
- package/dist/context/Plugin/withPlugin.js +5 -14
- package/dist/context/index.js +5 -15
- package/dist/css/index.js +3 -6
- package/dist/functions/TagEvaluator.js +107 -156
- package/dist/functions/compareObjects.js +0 -7
- package/dist/functions/formatElapsedTime.js +5 -6
- package/dist/functions/formatNameFileSafe.js +3 -4
- package/dist/functions/getIconUrl.js +0 -3
- package/dist/functions/getParameterByName.js +9 -12
- package/dist/functions/getProperty.js +4 -8
- package/dist/functions/getUrl.js +0 -3
- package/dist/functions/index.js +9 -18
- package/dist/icons/CopyIcon.js +11 -22
- package/dist/icons/DeleteIcon.js +11 -22
- package/dist/icons/DuplicateIcon.js +11 -22
- package/dist/icons/EditIcon.js +11 -22
- package/dist/icons/FabAddIcon.js +19 -35
- package/dist/icons/PasteIcon.js +11 -22
- package/dist/icons/index.js +7 -14
- package/dist/index.js +6 -18
- package/package.json +89 -79
|
@@ -1,230 +1,142 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports.default = void 0;
|
|
9
|
-
|
|
10
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
-
|
|
14
9
|
var _reactRouterDom = require("react-router-dom");
|
|
15
|
-
|
|
16
10
|
var _Core = require("../../context/Core");
|
|
17
|
-
|
|
18
11
|
var _Authentication = require("../../context/Authentication");
|
|
19
|
-
|
|
20
12
|
var _Organization = require("../../context/Organization");
|
|
21
|
-
|
|
22
13
|
var _Channels = require("../../context/Channels");
|
|
23
|
-
|
|
24
14
|
var _CoreSideBar = _interopRequireDefault(require("../CoreSideBar"));
|
|
25
|
-
|
|
26
15
|
var _CoreFrame = _interopRequireDefault(require("../CoreFrame"));
|
|
27
|
-
|
|
28
16
|
var _AppLink = _interopRequireDefault(require("./AppLink"));
|
|
29
|
-
|
|
30
17
|
var _functions = require("../../functions");
|
|
31
|
-
|
|
32
|
-
function
|
|
33
|
-
|
|
34
|
-
function
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
41
|
-
|
|
42
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
43
|
-
|
|
44
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
45
|
-
|
|
46
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
47
|
-
|
|
48
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
49
|
-
|
|
50
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
51
|
-
|
|
52
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
53
|
-
|
|
54
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
55
|
-
|
|
56
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
57
|
-
|
|
58
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
59
|
-
|
|
60
|
-
var namespace = 'CoreAppSelector';
|
|
61
|
-
|
|
62
|
-
var CoreAppSelector = /*#__PURE__*/function (_Component) {
|
|
63
|
-
_inherits(CoreAppSelector, _Component);
|
|
64
|
-
|
|
65
|
-
var _super = _createSuper(CoreAppSelector);
|
|
66
|
-
|
|
67
|
-
function CoreAppSelector(props) {
|
|
68
|
-
var _this;
|
|
69
|
-
|
|
70
|
-
_classCallCheck(this, CoreAppSelector);
|
|
71
|
-
|
|
72
|
-
_this = _super.call(this, props);
|
|
73
|
-
_this.state = {
|
|
18
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
19
|
+
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); }
|
|
20
|
+
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; }
|
|
21
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } // import { CoreSideBar, CoreFrame } from '..';
|
|
22
|
+
const namespace = 'CoreAppSelector';
|
|
23
|
+
class CoreAppSelector extends _react.Component {
|
|
24
|
+
constructor(props) {
|
|
25
|
+
super(props);
|
|
26
|
+
this.state = {
|
|
74
27
|
apps: []
|
|
75
28
|
};
|
|
76
|
-
return _this;
|
|
77
29
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
30
|
+
componentDidMount() {
|
|
31
|
+
this.props.core.log('verbose', namespace, 'componentDidMount()', 'Start');
|
|
32
|
+
this.updateApps();
|
|
33
|
+
}
|
|
34
|
+
componentDidUpdate(prevProps) {
|
|
35
|
+
if (this.props.authentication.didChange(prevProps.authentication) || this.props.organization.didChange(prevProps.organization)) {
|
|
83
36
|
this.updateApps();
|
|
84
37
|
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}, {
|
|
93
|
-
key: "getAppVersion",
|
|
94
|
-
value: function getAppVersion(routeProps) {
|
|
95
|
-
var path = routeProps.match.params.app;
|
|
96
|
-
|
|
97
|
-
if (path !== undefined) {
|
|
98
|
-
var component = this.state.apps.find(function (_component) {
|
|
99
|
-
return (0, _functions.getUrl)(_component.metadata) === "/".concat(path);
|
|
100
|
-
});
|
|
101
|
-
|
|
102
|
-
if (component) {
|
|
103
|
-
return component.version;
|
|
104
|
-
}
|
|
38
|
+
}
|
|
39
|
+
getAppVersion(routeProps) {
|
|
40
|
+
const path = routeProps.match.params.app;
|
|
41
|
+
if (path !== undefined) {
|
|
42
|
+
const component = this.state.apps.find(_component => (0, _functions.getUrl)(_component.metadata) === "/".concat(path));
|
|
43
|
+
if (component) {
|
|
44
|
+
return component.version;
|
|
105
45
|
}
|
|
106
|
-
|
|
107
|
-
return null;
|
|
108
46
|
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
}
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
selectApp(app) {
|
|
50
|
+
if (typeof this.props.updateComponentID === 'function') {
|
|
51
|
+
this.props.updateComponentID(app.componentID);
|
|
115
52
|
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
if (typeof _this2.props.updateComponentID === 'function') {
|
|
138
|
-
var component = res.data.find(function (_component) {
|
|
139
|
-
return (0, _functions.getUrl)(_component.metadata) === window.location.hash.substr(1);
|
|
140
|
-
});
|
|
141
|
-
|
|
142
|
-
if (component) {
|
|
143
|
-
_this2.props.updateComponentID(component.componentID);
|
|
144
|
-
}
|
|
53
|
+
}
|
|
54
|
+
updateApps() {
|
|
55
|
+
if (this.props.authentication.authenticated && this.props.organization.organization !== null && this.props.organization.entity !== null) {
|
|
56
|
+
this.props.authentication.http({
|
|
57
|
+
method: 'get',
|
|
58
|
+
url: "".concat(this.props.core.baseUrl, "/api/components"),
|
|
59
|
+
params: {
|
|
60
|
+
type: this.props.componentType,
|
|
61
|
+
organizationId: this.props.organization.organization.id,
|
|
62
|
+
entityId: this.props.organization.entity.id
|
|
63
|
+
}
|
|
64
|
+
}).then(res => {
|
|
65
|
+
this.props.core.log('debug', namespace, 'updateApps()', res.data);
|
|
66
|
+
if (res.data.length > 0 && window.location.hash === '#/') {
|
|
67
|
+
window.location.hash = "#".concat((0, _functions.getUrl)(res.data[0].metadata));
|
|
68
|
+
}
|
|
69
|
+
if (typeof this.props.updateComponentID === 'function') {
|
|
70
|
+
const component = res.data.find(_component => (0, _functions.getUrl)(_component.metadata) === window.location.hash.substr(1));
|
|
71
|
+
if (component) {
|
|
72
|
+
this.props.updateComponentID(component.componentID);
|
|
145
73
|
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
});
|
|
74
|
+
}
|
|
75
|
+
this.setState({
|
|
76
|
+
apps: res.data
|
|
150
77
|
});
|
|
151
|
-
}
|
|
78
|
+
});
|
|
152
79
|
}
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
if (obj.what
|
|
157
|
-
|
|
158
|
-
this.updateApps();
|
|
159
|
-
}
|
|
80
|
+
}
|
|
81
|
+
processMessage(channel, obj) {
|
|
82
|
+
if (obj.what !== undefined) {
|
|
83
|
+
if (obj.what === 'package_enabled' || obj.what === 'package_disabled' || obj.what === 'package_added' || obj.what === 'package_updated' || obj.what === 'package_deleted') {
|
|
84
|
+
this.updateApps();
|
|
160
85
|
}
|
|
161
86
|
}
|
|
162
|
-
|
|
163
|
-
to={getUrl(app.metadata)}
|
|
164
|
-
key={app.componentID}
|
|
165
|
-
style={style.navLink}
|
|
166
|
-
activeStyle={style.activeStyle}
|
|
167
|
-
>
|
|
168
|
-
<ListItem
|
|
169
|
-
button
|
|
170
|
-
onClick={() => this.selectApp(app)}
|
|
171
|
-
>
|
|
172
|
-
<Tooltip title={this.getTranslatedName(app)}>
|
|
173
|
-
<ListItemIcon>
|
|
174
|
-
<img src={this.props.core.formatUrl(getIconUrl(app.metadata))} className={classes.svgIcon} alt="icon" />
|
|
175
|
-
</ListItemIcon>
|
|
176
|
-
</Tooltip>
|
|
177
|
-
<ListItemText classes={{ primary: classes.listItemRoot }} primary={this.getTranslatedName(app)} />
|
|
178
|
-
</ListItem>
|
|
179
|
-
</NavLink> */
|
|
180
|
-
|
|
181
|
-
}, {
|
|
182
|
-
key: "render",
|
|
183
|
-
value: function render() {
|
|
184
|
-
var _this3 = this;
|
|
185
|
-
|
|
186
|
-
var _this$props = this.props,
|
|
187
|
-
title = _this$props.title,
|
|
188
|
-
componentID = _this$props.componentID,
|
|
189
|
-
sandbox = _this$props.sandbox;
|
|
190
|
-
var apps = this.state.apps;
|
|
191
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Channels.ChannelsConsumer, {
|
|
192
|
-
id: "coreappselector",
|
|
193
|
-
handler: function handler(channel, obj) {
|
|
194
|
-
return _this3.processMessage(channel, obj);
|
|
195
|
-
}
|
|
196
|
-
}), /*#__PURE__*/_react.default.createElement(_reactRouterDom.HashRouter, null, /*#__PURE__*/_react.default.createElement(_CoreSideBar.default, {
|
|
197
|
-
title: title,
|
|
198
|
-
componentID: componentID,
|
|
199
|
-
showEntity: true,
|
|
200
|
-
apps: apps,
|
|
201
|
-
updateComponentID: function updateComponentID(id) {
|
|
202
|
-
return _this3.props.updateComponentID(id);
|
|
203
|
-
},
|
|
204
|
-
content: apps.map(function (app) {
|
|
205
|
-
return /*#__PURE__*/_react.default.createElement(_AppLink.default, {
|
|
206
|
-
key: app.componentID,
|
|
207
|
-
app: app,
|
|
208
|
-
appSelected: function appSelected() {
|
|
209
|
-
return _this3.selectApp(app);
|
|
210
|
-
}
|
|
211
|
-
});
|
|
212
|
-
})
|
|
213
|
-
}, this.props.children, /*#__PURE__*/_react.default.createElement(_reactRouterDom.Route, {
|
|
214
|
-
path: "/:app*",
|
|
215
|
-
render: function render(routeProps) {
|
|
216
|
-
return /*#__PURE__*/_react.default.createElement(_CoreFrame.default, _extends({}, routeProps, {
|
|
217
|
-
sandbox: sandbox,
|
|
218
|
-
version: _this3.getAppVersion(routeProps)
|
|
219
|
-
}));
|
|
220
|
-
}
|
|
221
|
-
}))));
|
|
222
|
-
}
|
|
223
|
-
}]);
|
|
224
|
-
|
|
225
|
-
return CoreAppSelector;
|
|
226
|
-
}(_react.Component);
|
|
87
|
+
}
|
|
227
88
|
|
|
89
|
+
/* <NavLink
|
|
90
|
+
to={getUrl(app.metadata)}
|
|
91
|
+
key={app.componentID}
|
|
92
|
+
style={style.navLink}
|
|
93
|
+
activeStyle={style.activeStyle}
|
|
94
|
+
>
|
|
95
|
+
<ListItem
|
|
96
|
+
button
|
|
97
|
+
onClick={() => this.selectApp(app)}
|
|
98
|
+
>
|
|
99
|
+
<Tooltip title={this.getTranslatedName(app)}>
|
|
100
|
+
<ListItemIcon>
|
|
101
|
+
<img src={this.props.core.formatUrl(getIconUrl(app.metadata))} className={classes.svgIcon} alt="icon" />
|
|
102
|
+
</ListItemIcon>
|
|
103
|
+
</Tooltip>
|
|
104
|
+
<ListItemText classes={{ primary: classes.listItemRoot }} primary={this.getTranslatedName(app)} />
|
|
105
|
+
</ListItem>
|
|
106
|
+
</NavLink> */
|
|
107
|
+
|
|
108
|
+
render() {
|
|
109
|
+
const {
|
|
110
|
+
title,
|
|
111
|
+
componentID,
|
|
112
|
+
sandbox
|
|
113
|
+
} = this.props;
|
|
114
|
+
const {
|
|
115
|
+
apps
|
|
116
|
+
} = this.state;
|
|
117
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Channels.ChannelsConsumer, {
|
|
118
|
+
id: "coreappselector",
|
|
119
|
+
handler: (channel, obj) => this.processMessage(channel, obj)
|
|
120
|
+
}), /*#__PURE__*/_react.default.createElement(_reactRouterDom.HashRouter, null, /*#__PURE__*/_react.default.createElement(_CoreSideBar.default, {
|
|
121
|
+
title: title,
|
|
122
|
+
componentID: componentID,
|
|
123
|
+
showEntity: true,
|
|
124
|
+
apps: apps,
|
|
125
|
+
updateComponentID: id => this.props.updateComponentID(id),
|
|
126
|
+
content: apps.map(app => /*#__PURE__*/_react.default.createElement(_AppLink.default, {
|
|
127
|
+
key: app.componentID,
|
|
128
|
+
app: app,
|
|
129
|
+
appSelected: () => this.selectApp(app)
|
|
130
|
+
}))
|
|
131
|
+
}, this.props.children, /*#__PURE__*/_react.default.createElement(_reactRouterDom.Route, {
|
|
132
|
+
path: "/:app*",
|
|
133
|
+
render: routeProps => /*#__PURE__*/_react.default.createElement(_CoreFrame.default, _extends({}, routeProps, {
|
|
134
|
+
sandbox: sandbox,
|
|
135
|
+
version: this.getAppVersion(routeProps)
|
|
136
|
+
}))
|
|
137
|
+
}))));
|
|
138
|
+
}
|
|
139
|
+
}
|
|
228
140
|
CoreAppSelector.propTypes = {
|
|
229
141
|
title: _propTypes.default.string.isRequired,
|
|
230
142
|
componentID: _propTypes.default.string.isRequired,
|
|
@@ -241,7 +153,4 @@ CoreAppSelector.defaultProps = {
|
|
|
241
153
|
updateComponentID: false,
|
|
242
154
|
children: null
|
|
243
155
|
};
|
|
244
|
-
|
|
245
|
-
var _default = (0, _Core.withCore)((0, _Authentication.withAuthentication)((0, _Organization.withOrganization)(CoreAppSelector)));
|
|
246
|
-
|
|
247
|
-
exports.default = _default;
|
|
156
|
+
var _default = exports.default = (0, _Core.withCore)((0, _Authentication.withAuthentication)((0, _Organization.withOrganization)(CoreAppSelector)));
|
|
@@ -5,11 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
Object.defineProperty(exports, "default", {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: function
|
|
8
|
+
get: function () {
|
|
9
9
|
return _CoreAppSelector.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
|
|
13
12
|
var _CoreAppSelector = _interopRequireDefault(require("./CoreAppSelector"));
|
|
14
|
-
|
|
15
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -4,75 +4,59 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _styles = require("@material-ui/core/styles");
|
|
11
|
-
|
|
12
9
|
var _Typography = _interopRequireDefault(require("@material-ui/core/Typography"));
|
|
13
|
-
|
|
14
10
|
var _IconButton = _interopRequireDefault(require("@material-ui/core/IconButton"));
|
|
15
|
-
|
|
16
11
|
var _Print = _interopRequireDefault(require("@material-ui/icons/Print"));
|
|
17
|
-
|
|
18
12
|
var _Close = _interopRequireDefault(require("@material-ui/icons/Close"));
|
|
19
|
-
|
|
20
13
|
var _Toolbar = _interopRequireDefault(require("@material-ui/core/Toolbar"));
|
|
21
|
-
|
|
22
14
|
var _Tooltip = _interopRequireDefault(require("@material-ui/core/Tooltip"));
|
|
23
|
-
|
|
24
15
|
var _Save = _interopRequireDefault(require("@material-ui/icons/Save"));
|
|
25
|
-
|
|
26
16
|
var _AppBar = _interopRequireDefault(require("@material-ui/core/AppBar"));
|
|
27
|
-
|
|
28
17
|
var _Badge = _interopRequireDefault(require("@material-ui/core/Badge"));
|
|
29
|
-
|
|
30
18
|
var _reactIntl = require("react-intl");
|
|
31
|
-
|
|
32
19
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
color: theme.palette.text.secondary
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
|
|
20
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
21
|
+
const styles = theme => ({
|
|
22
|
+
fab: {
|
|
23
|
+
margin: 0,
|
|
24
|
+
top: 'auto',
|
|
25
|
+
right: 20,
|
|
26
|
+
bottom: 20,
|
|
27
|
+
left: 'auto',
|
|
28
|
+
position: 'fixed'
|
|
29
|
+
},
|
|
30
|
+
appBar: {
|
|
31
|
+
position: 'relative'
|
|
32
|
+
},
|
|
33
|
+
flex: {
|
|
34
|
+
flex: 1
|
|
35
|
+
},
|
|
36
|
+
root: {
|
|
37
|
+
flexGrow: 1
|
|
38
|
+
},
|
|
39
|
+
separator: {
|
|
40
|
+
display: 'inline',
|
|
41
|
+
width: 2,
|
|
42
|
+
height: 36,
|
|
43
|
+
background: '#0086b3',
|
|
44
|
+
margin: 7
|
|
45
|
+
},
|
|
46
|
+
paper: {
|
|
47
|
+
margin: '10px 10px 10px 10px',
|
|
48
|
+
padding: theme.spacing.unit * 2,
|
|
49
|
+
textAlign: 'center',
|
|
50
|
+
color: theme.palette.text.secondary
|
|
51
|
+
}
|
|
52
|
+
});
|
|
71
53
|
function CoreDialogueToolBar(props) {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
54
|
+
const {
|
|
55
|
+
title,
|
|
56
|
+
warning,
|
|
57
|
+
intl,
|
|
58
|
+
classes
|
|
59
|
+
} = props;
|
|
76
60
|
return /*#__PURE__*/_react.default.createElement(_AppBar.default, {
|
|
77
61
|
className: classes.appBar,
|
|
78
62
|
color: "secondary"
|
|
@@ -89,9 +73,7 @@ function CoreDialogueToolBar(props) {
|
|
|
89
73
|
"aria-label": intl.formatMessage({
|
|
90
74
|
id: '__print'
|
|
91
75
|
}),
|
|
92
|
-
onClick:
|
|
93
|
-
return props.handlePrint();
|
|
94
|
-
}
|
|
76
|
+
onClick: () => props.handlePrint()
|
|
95
77
|
}, /*#__PURE__*/_react.default.createElement(_Print.default, null))), (props.handlePrint || props.children) && /*#__PURE__*/_react.default.createElement("div", {
|
|
96
78
|
className: classes.separator
|
|
97
79
|
}), props.handleSave && /*#__PURE__*/_react.default.createElement(_Tooltip.default, {
|
|
@@ -103,9 +85,7 @@ function CoreDialogueToolBar(props) {
|
|
|
103
85
|
"aria-label": intl.formatMessage({
|
|
104
86
|
id: '__save'
|
|
105
87
|
}),
|
|
106
|
-
onClick:
|
|
107
|
-
return props.handleSave();
|
|
108
|
-
}
|
|
88
|
+
onClick: () => props.handleSave()
|
|
109
89
|
}, /*#__PURE__*/_react.default.createElement(_Badge.default, {
|
|
110
90
|
badgeContent: "!",
|
|
111
91
|
color: "error",
|
|
@@ -119,12 +99,9 @@ function CoreDialogueToolBar(props) {
|
|
|
119
99
|
"aria-label": intl.formatMessage({
|
|
120
100
|
id: '__close'
|
|
121
101
|
}),
|
|
122
|
-
onClick:
|
|
123
|
-
return props.handleClose();
|
|
124
|
-
}
|
|
102
|
+
onClick: () => props.handleClose()
|
|
125
103
|
}, /*#__PURE__*/_react.default.createElement(_Close.default, null)))));
|
|
126
104
|
}
|
|
127
|
-
|
|
128
105
|
CoreDialogueToolBar.propTypes = {
|
|
129
106
|
title: _propTypes.default.string,
|
|
130
107
|
warning: _propTypes.default.bool,
|
|
@@ -143,7 +120,4 @@ CoreDialogueToolBar.defaultProps = {
|
|
|
143
120
|
handleClose: null,
|
|
144
121
|
children: null
|
|
145
122
|
};
|
|
146
|
-
|
|
147
|
-
var _default = (0, _reactIntl.injectIntl)((0, _styles.withStyles)(styles)(CoreDialogueToolBar));
|
|
148
|
-
|
|
149
|
-
exports.default = _default;
|
|
123
|
+
var _default = exports.default = (0, _reactIntl.injectIntl)((0, _styles.withStyles)(styles)(CoreDialogueToolBar));
|
|
@@ -5,11 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
Object.defineProperty(exports, "default", {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: function
|
|
8
|
+
get: function () {
|
|
9
9
|
return _CoreDialogueToolBar.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
|
|
13
12
|
var _CoreDialogueToolBar = _interopRequireDefault(require("./CoreDialogueToolBar"));
|
|
14
|
-
|
|
15
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|