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,121 +1,60 @@
|
|
|
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 = require("react");
|
|
11
|
-
|
|
12
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
-
|
|
14
9
|
var _withAuthentication = _interopRequireDefault(require("../Authentication/withAuthentication"));
|
|
15
|
-
|
|
16
10
|
var _withOrganization = _interopRequireDefault(require("../Organization/withOrganization"));
|
|
17
|
-
|
|
18
11
|
var _withChannels = _interopRequireDefault(require("./withChannels"));
|
|
19
|
-
|
|
20
12
|
var _withCore = _interopRequireDefault(require("../Core/withCore"));
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
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); }
|
|
31
|
-
|
|
32
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
33
|
-
|
|
34
|
-
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); }; }
|
|
35
|
-
|
|
36
|
-
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); }
|
|
37
|
-
|
|
38
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
39
|
-
|
|
40
|
-
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; } }
|
|
41
|
-
|
|
42
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
43
|
-
|
|
44
|
-
var namespace = 'DataChannel';
|
|
45
|
-
var channelId = 'data';
|
|
46
|
-
|
|
47
|
-
var DataChannel = /*#__PURE__*/function (_Component) {
|
|
48
|
-
_inherits(DataChannel, _Component);
|
|
49
|
-
|
|
50
|
-
var _super = _createSuper(DataChannel);
|
|
51
|
-
|
|
52
|
-
function DataChannel() {
|
|
53
|
-
_classCallCheck(this, DataChannel);
|
|
54
|
-
|
|
55
|
-
return _super.apply(this, arguments);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
_createClass(DataChannel, [{
|
|
59
|
-
key: "componentDidMount",
|
|
60
|
-
value: function componentDidMount() {
|
|
61
|
-
var _this = this;
|
|
62
|
-
|
|
63
|
-
if (!this.props.channels.isChannelRegistered(channelId)) {
|
|
64
|
-
this.props.channels.registerChannel(channelId, function (data) {
|
|
65
|
-
return _this.channelFunction(data);
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
if (this.props.organization.entity !== null) {
|
|
69
|
-
this.props.channels.updateChannel(channelId, {
|
|
70
|
-
entityId: this.props.organization.entity.id
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}, {
|
|
76
|
-
key: "componentDidUpdate",
|
|
77
|
-
value: function componentDidUpdate(prevProps) {
|
|
78
|
-
if (this.props.organization.entity !== prevProps.organization.entity) {
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
+
const namespace = 'DataChannel';
|
|
15
|
+
const channelId = 'data';
|
|
16
|
+
class DataChannel extends _react.Component {
|
|
17
|
+
componentDidMount() {
|
|
18
|
+
if (!this.props.channels.isChannelRegistered(channelId)) {
|
|
19
|
+
this.props.channels.registerChannel(channelId, data => this.channelFunction(data));
|
|
20
|
+
if (this.props.organization.entity !== null) {
|
|
79
21
|
this.props.channels.updateChannel(channelId, {
|
|
80
22
|
entityId: this.props.organization.entity.id
|
|
81
23
|
});
|
|
82
24
|
}
|
|
83
25
|
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
var methodName = 'channelFunction()';
|
|
90
|
-
return new Promise(function (resolve, reject) {
|
|
91
|
-
if (_this2.props.authentication.authenticated) {
|
|
92
|
-
_this2.props.authentication.http({
|
|
93
|
-
method: 'get',
|
|
94
|
-
url: "".concat(_this2.props.core.baseUrl, "/api/data/subscribe/").concat(data.entityId)
|
|
95
|
-
}).then(function (results) {
|
|
96
|
-
resolve(results.data);
|
|
97
|
-
}).catch(function (error) {
|
|
98
|
-
_this2.props.core.log('error', namespace, methodName, error);
|
|
99
|
-
|
|
100
|
-
reject(error);
|
|
101
|
-
});
|
|
102
|
-
} else {
|
|
103
|
-
reject(new Error({
|
|
104
|
-
message: 'Not Authenticated'
|
|
105
|
-
}));
|
|
106
|
-
}
|
|
26
|
+
}
|
|
27
|
+
componentDidUpdate(prevProps) {
|
|
28
|
+
if (this.props.organization.entity !== prevProps.organization.entity) {
|
|
29
|
+
this.props.channels.updateChannel(channelId, {
|
|
30
|
+
entityId: this.props.organization.entity.id
|
|
107
31
|
});
|
|
108
32
|
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
}(
|
|
118
|
-
|
|
33
|
+
}
|
|
34
|
+
channelFunction(data) {
|
|
35
|
+
const methodName = 'channelFunction()';
|
|
36
|
+
return new Promise((resolve, reject) => {
|
|
37
|
+
if (this.props.authentication.authenticated) {
|
|
38
|
+
this.props.authentication.http({
|
|
39
|
+
method: 'get',
|
|
40
|
+
url: "".concat(this.props.core.baseUrl, "/api/data/subscribe/").concat(data.entityId)
|
|
41
|
+
}).then(results => {
|
|
42
|
+
resolve(results.data);
|
|
43
|
+
}).catch(error => {
|
|
44
|
+
this.props.core.log('error', namespace, methodName, error);
|
|
45
|
+
reject(error);
|
|
46
|
+
});
|
|
47
|
+
} else {
|
|
48
|
+
reject(new Error({
|
|
49
|
+
message: 'Not Authenticated'
|
|
50
|
+
}));
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
render() {
|
|
55
|
+
return '';
|
|
56
|
+
}
|
|
57
|
+
}
|
|
119
58
|
DataChannel.propTypes = {
|
|
120
59
|
core: _propTypes.default.shape().isRequired,
|
|
121
60
|
organization: _propTypes.default.shape().isRequired,
|
|
@@ -126,7 +65,4 @@ DataChannel.propTypes = {
|
|
|
126
65
|
isChannelRegistered: _propTypes.default.func
|
|
127
66
|
}).isRequired
|
|
128
67
|
};
|
|
129
|
-
|
|
130
|
-
var _default = (0, _withChannels.default)((0, _withCore.default)((0, _withAuthentication.default)((0, _withOrganization.default)(DataChannel))));
|
|
131
|
-
|
|
132
|
-
exports.default = _default;
|
|
68
|
+
var _default = exports.default = (0, _withChannels.default)((0, _withCore.default)((0, _withAuthentication.default)((0, _withOrganization.default)(DataChannel))));
|
|
@@ -1,122 +1,61 @@
|
|
|
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 = require("react");
|
|
11
|
-
|
|
12
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
-
|
|
14
9
|
var _withAuthentication = _interopRequireDefault(require("../Authentication/withAuthentication"));
|
|
15
|
-
|
|
16
10
|
var _withOrganization = _interopRequireDefault(require("../Organization/withOrganization"));
|
|
17
|
-
|
|
18
11
|
var _withChannels = _interopRequireDefault(require("./withChannels"));
|
|
19
|
-
|
|
20
12
|
var _withCore = _interopRequireDefault(require("../Core/withCore"));
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
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); }
|
|
31
|
-
|
|
32
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
33
|
-
|
|
34
|
-
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); }; }
|
|
35
|
-
|
|
36
|
-
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); }
|
|
37
|
-
|
|
38
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
39
|
-
|
|
40
|
-
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; } }
|
|
41
|
-
|
|
42
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
43
|
-
|
|
44
|
-
var namespace = 'EntityChannel';
|
|
45
|
-
var channelId = 'entity';
|
|
46
|
-
|
|
47
|
-
var EntityChannel = /*#__PURE__*/function (_Component) {
|
|
48
|
-
_inherits(EntityChannel, _Component);
|
|
49
|
-
|
|
50
|
-
var _super = _createSuper(EntityChannel);
|
|
51
|
-
|
|
52
|
-
function EntityChannel() {
|
|
53
|
-
_classCallCheck(this, EntityChannel);
|
|
54
|
-
|
|
55
|
-
return _super.apply(this, arguments);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
_createClass(EntityChannel, [{
|
|
59
|
-
key: "componentDidMount",
|
|
60
|
-
value: function componentDidMount() {
|
|
61
|
-
var _this = this;
|
|
62
|
-
|
|
63
|
-
if (!this.props.channels.isChannelRegistered(channelId)) {
|
|
64
|
-
this.props.channels.registerChannel(channelId, function (data) {
|
|
65
|
-
return _this.channelFunction(data);
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
if (this.props.organization.entity !== null) {
|
|
69
|
-
this.props.channels.updateChannel(channelId, {
|
|
70
|
-
entityId: this.props.organization.entity.id
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}, {
|
|
76
|
-
key: "componentDidUpdate",
|
|
77
|
-
value: function componentDidUpdate(prevProps) {
|
|
78
|
-
if (this.props.organization.entity !== prevProps.organization.entity) {
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
+
const namespace = 'EntityChannel';
|
|
15
|
+
const channelId = 'entity';
|
|
16
|
+
class EntityChannel extends _react.Component {
|
|
17
|
+
componentDidMount() {
|
|
18
|
+
if (!this.props.channels.isChannelRegistered(channelId)) {
|
|
19
|
+
this.props.channels.registerChannel(channelId, data => this.channelFunction(data));
|
|
20
|
+
if (this.props.organization.entity !== null) {
|
|
79
21
|
this.props.channels.updateChannel(channelId, {
|
|
80
22
|
entityId: this.props.organization.entity.id
|
|
81
23
|
});
|
|
82
24
|
}
|
|
83
25
|
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
var methodName = 'channelFunction()';
|
|
90
|
-
return new Promise(function (resolve, reject) {
|
|
91
|
-
if (_this2.props.authentication.authenticated) {
|
|
92
|
-
_this2.props.authentication.http({
|
|
93
|
-
method: 'get',
|
|
94
|
-
url: "".concat(_this2.props.core.baseUrl, "/api/administration/entities/subscribe"),
|
|
95
|
-
params: data
|
|
96
|
-
}).then(function (results) {
|
|
97
|
-
resolve(results.data);
|
|
98
|
-
}).catch(function (error) {
|
|
99
|
-
_this2.props.core.log('error', namespace, methodName, error);
|
|
100
|
-
|
|
101
|
-
reject(error);
|
|
102
|
-
});
|
|
103
|
-
} else {
|
|
104
|
-
reject(new Error({
|
|
105
|
-
message: 'Not Authenticated'
|
|
106
|
-
}));
|
|
107
|
-
}
|
|
26
|
+
}
|
|
27
|
+
componentDidUpdate(prevProps) {
|
|
28
|
+
if (this.props.organization.entity !== prevProps.organization.entity) {
|
|
29
|
+
this.props.channels.updateChannel(channelId, {
|
|
30
|
+
entityId: this.props.organization.entity.id
|
|
108
31
|
});
|
|
109
32
|
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
33
|
+
}
|
|
34
|
+
channelFunction(data) {
|
|
35
|
+
const methodName = 'channelFunction()';
|
|
36
|
+
return new Promise((resolve, reject) => {
|
|
37
|
+
if (this.props.authentication.authenticated) {
|
|
38
|
+
this.props.authentication.http({
|
|
39
|
+
method: 'get',
|
|
40
|
+
url: "".concat(this.props.core.baseUrl, "/api/administration/entities/subscribe"),
|
|
41
|
+
params: data
|
|
42
|
+
}).then(results => {
|
|
43
|
+
resolve(results.data);
|
|
44
|
+
}).catch(error => {
|
|
45
|
+
this.props.core.log('error', namespace, methodName, error);
|
|
46
|
+
reject(error);
|
|
47
|
+
});
|
|
48
|
+
} else {
|
|
49
|
+
reject(new Error({
|
|
50
|
+
message: 'Not Authenticated'
|
|
51
|
+
}));
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
render() {
|
|
56
|
+
return '';
|
|
57
|
+
}
|
|
58
|
+
}
|
|
120
59
|
EntityChannel.propTypes = {
|
|
121
60
|
core: _propTypes.default.shape().isRequired,
|
|
122
61
|
organization: _propTypes.default.shape().isRequired,
|
|
@@ -127,7 +66,4 @@ EntityChannel.propTypes = {
|
|
|
127
66
|
isChannelRegistered: _propTypes.default.func
|
|
128
67
|
}).isRequired
|
|
129
68
|
};
|
|
130
|
-
|
|
131
|
-
var _default = (0, _withChannels.default)((0, _withCore.default)((0, _withAuthentication.default)((0, _withOrganization.default)(EntityChannel))));
|
|
132
|
-
|
|
133
|
-
exports.default = _default;
|
|
69
|
+
var _default = exports.default = (0, _withChannels.default)((0, _withCore.default)((0, _withAuthentication.default)((0, _withOrganization.default)(EntityChannel))));
|
|
@@ -1,105 +1,48 @@
|
|
|
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 = require("react");
|
|
11
|
-
|
|
12
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
-
|
|
14
9
|
var _withAuthentication = _interopRequireDefault(require("../Authentication/withAuthentication"));
|
|
15
|
-
|
|
16
10
|
var _withChannels = _interopRequireDefault(require("./withChannels"));
|
|
17
|
-
|
|
18
11
|
var _withCore = _interopRequireDefault(require("../Core/withCore"));
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
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); }
|
|
29
|
-
|
|
30
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
31
|
-
|
|
32
|
-
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); }; }
|
|
33
|
-
|
|
34
|
-
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); }
|
|
35
|
-
|
|
36
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
37
|
-
|
|
38
|
-
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; } }
|
|
39
|
-
|
|
40
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
41
|
-
|
|
42
|
-
var namespace = 'EveryoneChannel';
|
|
43
|
-
var channelId = 'everyone';
|
|
44
|
-
|
|
45
|
-
var EveryoneChannel = /*#__PURE__*/function (_Component) {
|
|
46
|
-
_inherits(EveryoneChannel, _Component);
|
|
47
|
-
|
|
48
|
-
var _super = _createSuper(EveryoneChannel);
|
|
49
|
-
|
|
50
|
-
function EveryoneChannel() {
|
|
51
|
-
_classCallCheck(this, EveryoneChannel);
|
|
52
|
-
|
|
53
|
-
return _super.apply(this, arguments);
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
+
const namespace = 'EveryoneChannel';
|
|
14
|
+
const channelId = 'everyone';
|
|
15
|
+
class EveryoneChannel extends _react.Component {
|
|
16
|
+
componentDidMount() {
|
|
17
|
+
if (!this.props.channels.isChannelRegistered(channelId)) {
|
|
18
|
+
this.props.channels.registerChannel(channelId, data => this.channelFunction(data));
|
|
19
|
+
this.props.channels.updateChannel(channelId, null);
|
|
20
|
+
}
|
|
54
21
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
22
|
+
channelFunction() {
|
|
23
|
+
const methodName = 'channelFunction()';
|
|
24
|
+
return new Promise((resolve, reject) => {
|
|
25
|
+
if (this.props.authentication.authenticated) {
|
|
26
|
+
this.props.authentication.http({
|
|
27
|
+
method: 'get',
|
|
28
|
+
url: "".concat(this.props.core.baseUrl, "/api/administration/everyone/subscribe")
|
|
29
|
+
}).then(results => {
|
|
30
|
+
resolve(results.data);
|
|
31
|
+
}).catch(error => {
|
|
32
|
+
this.props.core.log('error', namespace, methodName, error);
|
|
33
|
+
reject(error);
|
|
64
34
|
});
|
|
65
|
-
|
|
35
|
+
} else {
|
|
36
|
+
reject(new Error({
|
|
37
|
+
message: 'Not Authenticated'
|
|
38
|
+
}));
|
|
66
39
|
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
var methodName = 'channelFunction()';
|
|
74
|
-
return new Promise(function (resolve, reject) {
|
|
75
|
-
if (_this2.props.authentication.authenticated) {
|
|
76
|
-
_this2.props.authentication.http({
|
|
77
|
-
method: 'get',
|
|
78
|
-
url: "".concat(_this2.props.core.baseUrl, "/api/administration/everyone/subscribe")
|
|
79
|
-
}).then(function (results) {
|
|
80
|
-
resolve(results.data);
|
|
81
|
-
}).catch(function (error) {
|
|
82
|
-
_this2.props.core.log('error', namespace, methodName, error);
|
|
83
|
-
|
|
84
|
-
reject(error);
|
|
85
|
-
});
|
|
86
|
-
} else {
|
|
87
|
-
reject(new Error({
|
|
88
|
-
message: 'Not Authenticated'
|
|
89
|
-
}));
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
}, {
|
|
94
|
-
key: "render",
|
|
95
|
-
value: function render() {
|
|
96
|
-
return '';
|
|
97
|
-
}
|
|
98
|
-
}]);
|
|
99
|
-
|
|
100
|
-
return EveryoneChannel;
|
|
101
|
-
}(_react.Component);
|
|
102
|
-
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
render() {
|
|
43
|
+
return '';
|
|
44
|
+
}
|
|
45
|
+
}
|
|
103
46
|
EveryoneChannel.propTypes = {
|
|
104
47
|
core: _propTypes.default.shape().isRequired,
|
|
105
48
|
authentication: _propTypes.default.shape().isRequired,
|
|
@@ -109,7 +52,4 @@ EveryoneChannel.propTypes = {
|
|
|
109
52
|
isChannelRegistered: _propTypes.default.func
|
|
110
53
|
}).isRequired
|
|
111
54
|
};
|
|
112
|
-
|
|
113
|
-
var _default = (0, _withChannels.default)((0, _withAuthentication.default)((0, _withCore.default)(EveryoneChannel)));
|
|
114
|
-
|
|
115
|
-
exports.default = _default;
|
|
55
|
+
var _default = exports.default = (0, _withChannels.default)((0, _withAuthentication.default)((0, _withCore.default)(EveryoneChannel)));
|
|
@@ -1,122 +1,61 @@
|
|
|
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 = require("react");
|
|
11
|
-
|
|
12
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
-
|
|
14
9
|
var _withAuthentication = _interopRequireDefault(require("../Authentication/withAuthentication"));
|
|
15
|
-
|
|
16
10
|
var _withOrganization = _interopRequireDefault(require("../Organization/withOrganization"));
|
|
17
|
-
|
|
18
11
|
var _withChannels = _interopRequireDefault(require("./withChannels"));
|
|
19
|
-
|
|
20
12
|
var _withCore = _interopRequireDefault(require("../Core/withCore"));
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
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); }
|
|
31
|
-
|
|
32
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
33
|
-
|
|
34
|
-
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); }; }
|
|
35
|
-
|
|
36
|
-
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); }
|
|
37
|
-
|
|
38
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
39
|
-
|
|
40
|
-
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; } }
|
|
41
|
-
|
|
42
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
43
|
-
|
|
44
|
-
var namespace = 'OrganizationChannel';
|
|
45
|
-
var channelId = 'organization';
|
|
46
|
-
|
|
47
|
-
var OrganizationChannel = /*#__PURE__*/function (_Component) {
|
|
48
|
-
_inherits(OrganizationChannel, _Component);
|
|
49
|
-
|
|
50
|
-
var _super = _createSuper(OrganizationChannel);
|
|
51
|
-
|
|
52
|
-
function OrganizationChannel() {
|
|
53
|
-
_classCallCheck(this, OrganizationChannel);
|
|
54
|
-
|
|
55
|
-
return _super.apply(this, arguments);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
_createClass(OrganizationChannel, [{
|
|
59
|
-
key: "componentDidMount",
|
|
60
|
-
value: function componentDidMount() {
|
|
61
|
-
var _this = this;
|
|
62
|
-
|
|
63
|
-
if (!this.props.channels.isChannelRegistered(channelId)) {
|
|
64
|
-
this.props.channels.registerChannel(channelId, function (data) {
|
|
65
|
-
return _this.channelFunction(data);
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
if (this.props.organization.organization !== null) {
|
|
69
|
-
this.props.channels.updateChannel(channelId, {
|
|
70
|
-
organizationId: this.props.organization.organization.id
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}, {
|
|
76
|
-
key: "componentDidUpdate",
|
|
77
|
-
value: function componentDidUpdate(prevProps) {
|
|
78
|
-
if (this.props.organization.organization !== prevProps.organization.organization) {
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
+
const namespace = 'OrganizationChannel';
|
|
15
|
+
const channelId = 'organization';
|
|
16
|
+
class OrganizationChannel extends _react.Component {
|
|
17
|
+
componentDidMount() {
|
|
18
|
+
if (!this.props.channels.isChannelRegistered(channelId)) {
|
|
19
|
+
this.props.channels.registerChannel(channelId, data => this.channelFunction(data));
|
|
20
|
+
if (this.props.organization.organization !== null) {
|
|
79
21
|
this.props.channels.updateChannel(channelId, {
|
|
80
22
|
organizationId: this.props.organization.organization.id
|
|
81
23
|
});
|
|
82
24
|
}
|
|
83
25
|
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
var methodName = 'channelFunction()';
|
|
90
|
-
return new Promise(function (resolve, reject) {
|
|
91
|
-
if (_this2.props.authentication.authenticated) {
|
|
92
|
-
_this2.props.authentication.http({
|
|
93
|
-
method: 'get',
|
|
94
|
-
url: "".concat(_this2.props.core.baseUrl, "/api/administration/organizations/subscribe"),
|
|
95
|
-
params: data
|
|
96
|
-
}).then(function (results) {
|
|
97
|
-
resolve(results.data);
|
|
98
|
-
}).catch(function (error) {
|
|
99
|
-
_this2.props.core.log('error', namespace, methodName, error);
|
|
100
|
-
|
|
101
|
-
reject(error);
|
|
102
|
-
});
|
|
103
|
-
} else {
|
|
104
|
-
reject(new Error({
|
|
105
|
-
message: 'Not Authenticated'
|
|
106
|
-
}));
|
|
107
|
-
}
|
|
26
|
+
}
|
|
27
|
+
componentDidUpdate(prevProps) {
|
|
28
|
+
if (this.props.organization.organization !== prevProps.organization.organization) {
|
|
29
|
+
this.props.channels.updateChannel(channelId, {
|
|
30
|
+
organizationId: this.props.organization.organization.id
|
|
108
31
|
});
|
|
109
32
|
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
33
|
+
}
|
|
34
|
+
channelFunction(data) {
|
|
35
|
+
const methodName = 'channelFunction()';
|
|
36
|
+
return new Promise((resolve, reject) => {
|
|
37
|
+
if (this.props.authentication.authenticated) {
|
|
38
|
+
this.props.authentication.http({
|
|
39
|
+
method: 'get',
|
|
40
|
+
url: "".concat(this.props.core.baseUrl, "/api/administration/organizations/subscribe"),
|
|
41
|
+
params: data
|
|
42
|
+
}).then(results => {
|
|
43
|
+
resolve(results.data);
|
|
44
|
+
}).catch(error => {
|
|
45
|
+
this.props.core.log('error', namespace, methodName, error);
|
|
46
|
+
reject(error);
|
|
47
|
+
});
|
|
48
|
+
} else {
|
|
49
|
+
reject(new Error({
|
|
50
|
+
message: 'Not Authenticated'
|
|
51
|
+
}));
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
render() {
|
|
56
|
+
return '';
|
|
57
|
+
}
|
|
58
|
+
}
|
|
120
59
|
OrganizationChannel.propTypes = {
|
|
121
60
|
core: _propTypes.default.shape().isRequired,
|
|
122
61
|
organization: _propTypes.default.shape().isRequired,
|
|
@@ -127,7 +66,4 @@ OrganizationChannel.propTypes = {
|
|
|
127
66
|
isChannelRegistered: _propTypes.default.func
|
|
128
67
|
}).isRequired
|
|
129
68
|
};
|
|
130
|
-
|
|
131
|
-
var _default = (0, _withChannels.default)((0, _withCore.default)((0, _withAuthentication.default)((0, _withOrganization.default)(OrganizationChannel))));
|
|
132
|
-
|
|
133
|
-
exports.default = _default;
|
|
69
|
+
var _default = exports.default = (0, _withChannels.default)((0, _withCore.default)((0, _withAuthentication.default)((0, _withOrganization.default)(OrganizationChannel))));
|