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,146 +1,75 @@
|
|
|
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 _functions = require("../../functions");
|
|
15
|
-
|
|
16
10
|
var _OrganizationContext = _interopRequireDefault(require("./OrganizationContext"));
|
|
17
|
-
|
|
18
11
|
var _constants = require("../../constants");
|
|
19
|
-
|
|
20
|
-
function
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
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); } }
|
|
29
|
-
|
|
30
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
31
|
-
|
|
32
|
-
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); }
|
|
33
|
-
|
|
34
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
35
|
-
|
|
36
|
-
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); }; }
|
|
37
|
-
|
|
38
|
-
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); }
|
|
39
|
-
|
|
40
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
41
|
-
|
|
42
|
-
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; } }
|
|
43
|
-
|
|
44
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
45
|
-
|
|
46
|
-
var OrganizationProvider = /*#__PURE__*/function (_Component) {
|
|
47
|
-
_inherits(OrganizationProvider, _Component);
|
|
48
|
-
|
|
49
|
-
var _super = _createSuper(OrganizationProvider);
|
|
50
|
-
|
|
51
|
-
function OrganizationProvider(props) {
|
|
52
|
-
var _this;
|
|
53
|
-
|
|
54
|
-
_classCallCheck(this, OrganizationProvider);
|
|
55
|
-
|
|
56
|
-
_this = _super.call(this, props);
|
|
57
|
-
var organization = null;
|
|
58
|
-
var entity = null;
|
|
59
|
-
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
+
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); }
|
|
14
|
+
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; }
|
|
15
|
+
class OrganizationProvider extends _react.Component {
|
|
16
|
+
constructor(props) {
|
|
17
|
+
super(props);
|
|
18
|
+
let organization = null;
|
|
19
|
+
let entity = null;
|
|
60
20
|
if (props.test) {
|
|
61
21
|
organization = _constants.testOrganization.organization;
|
|
62
22
|
entity = _constants.testOrganization.entity;
|
|
63
23
|
} else {
|
|
64
|
-
|
|
65
|
-
|
|
24
|
+
let param = (0, _functions.getParameterByName)('organization');
|
|
66
25
|
if (param !== null && param !== undefined && param.length > 0) {
|
|
67
26
|
param = JSON.parse(param.replace(/%22/g, '"').replace(/%20/g, ' '));
|
|
68
27
|
organization = param.organization;
|
|
69
28
|
entity = param.entity;
|
|
70
29
|
}
|
|
71
30
|
}
|
|
72
|
-
|
|
73
|
-
_this.state = {
|
|
31
|
+
this.state = {
|
|
74
32
|
organization: organization,
|
|
75
33
|
entity: entity
|
|
76
34
|
};
|
|
77
|
-
return _this;
|
|
78
35
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
entity = _this$state.entity;
|
|
117
|
-
return /*#__PURE__*/_react.default.createElement(_OrganizationContext.default.Provider, {
|
|
118
|
-
value: {
|
|
119
|
-
organization: organization,
|
|
120
|
-
entity: entity,
|
|
121
|
-
setOrganization: function setOrganization(_organization) {
|
|
122
|
-
return _this2.setOrganization(_organization);
|
|
123
|
-
},
|
|
124
|
-
setEntity: function setEntity(_entity) {
|
|
125
|
-
return _this2.setEntity(_entity);
|
|
126
|
-
},
|
|
127
|
-
didChange: function didChange(prevContext) {
|
|
128
|
-
return _this2.didChange(prevContext);
|
|
129
|
-
},
|
|
130
|
-
didOrganizationChange: function didOrganizationChange(prevOrganization) {
|
|
131
|
-
return _this2.didOrganizationChange(prevOrganization);
|
|
132
|
-
},
|
|
133
|
-
didEntityChange: function didEntityChange(prevEntity) {
|
|
134
|
-
return _this2.didEntityChange(prevEntity);
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}, this.props.children);
|
|
138
|
-
}
|
|
139
|
-
}]);
|
|
140
|
-
|
|
141
|
-
return OrganizationProvider;
|
|
142
|
-
}(_react.Component);
|
|
143
|
-
|
|
36
|
+
setOrganization(organization) {
|
|
37
|
+
this.setState({
|
|
38
|
+
organization: organization
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
setEntity(entity) {
|
|
42
|
+
this.setState({
|
|
43
|
+
entity: entity
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
didChange(prevContext) {
|
|
47
|
+
return this.didOrganizationChange(prevContext.organization) || this.didEntityChange(prevContext.entity);
|
|
48
|
+
}
|
|
49
|
+
didOrganizationChange(prevOrganization) {
|
|
50
|
+
return !(0, _functions.compareObjects)(this.state.organization, prevOrganization);
|
|
51
|
+
}
|
|
52
|
+
didEntityChange(prevEntity) {
|
|
53
|
+
return !(0, _functions.compareObjects)(this.state.entity, prevEntity);
|
|
54
|
+
}
|
|
55
|
+
render() {
|
|
56
|
+
const {
|
|
57
|
+
organization,
|
|
58
|
+
entity
|
|
59
|
+
} = this.state;
|
|
60
|
+
return /*#__PURE__*/_react.default.createElement(_OrganizationContext.default.Provider, {
|
|
61
|
+
value: {
|
|
62
|
+
organization: organization,
|
|
63
|
+
entity: entity,
|
|
64
|
+
setOrganization: _organization => this.setOrganization(_organization),
|
|
65
|
+
setEntity: _entity => this.setEntity(_entity),
|
|
66
|
+
didChange: prevContext => this.didChange(prevContext),
|
|
67
|
+
didOrganizationChange: prevOrganization => this.didOrganizationChange(prevOrganization),
|
|
68
|
+
didEntityChange: prevEntity => this.didEntityChange(prevEntity)
|
|
69
|
+
}
|
|
70
|
+
}, this.props.children);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
144
73
|
OrganizationProvider.propTypes = {
|
|
145
74
|
test: _propTypes.default.bool,
|
|
146
75
|
children: _propTypes.default.node.isRequired
|
|
@@ -148,5 +77,4 @@ OrganizationProvider.propTypes = {
|
|
|
148
77
|
OrganizationProvider.defaultProps = {
|
|
149
78
|
test: false
|
|
150
79
|
};
|
|
151
|
-
var _default = OrganizationProvider;
|
|
152
|
-
exports.default = _default;
|
|
80
|
+
var _default = exports.default = OrganizationProvider;
|
|
@@ -5,27 +5,23 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
Object.defineProperty(exports, "OrganizationContext", {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: function
|
|
8
|
+
get: function () {
|
|
9
9
|
return _OrganizationContext.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "OrganizationProvider", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function
|
|
14
|
+
get: function () {
|
|
15
15
|
return _OrganizationProvider.default;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "withOrganization", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function
|
|
20
|
+
get: function () {
|
|
21
21
|
return _withOrganization.default;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
|
-
|
|
25
24
|
var _OrganizationProvider = _interopRequireDefault(require("./OrganizationProvider"));
|
|
26
|
-
|
|
27
25
|
var _OrganizationContext = _interopRequireDefault(require("./OrganizationContext"));
|
|
28
|
-
|
|
29
26
|
var _withOrganization = _interopRequireDefault(require("./withOrganization"));
|
|
30
|
-
|
|
31
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -4,21 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = withOrganization;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _OrganizationContext = _interopRequireDefault(require("./OrganizationContext"));
|
|
11
|
-
|
|
12
|
-
function
|
|
13
|
-
|
|
14
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
15
|
-
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
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); }
|
|
16
11
|
function withOrganization(Component) {
|
|
17
|
-
return
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
organization: organization
|
|
21
|
-
}));
|
|
22
|
-
});
|
|
23
|
-
};
|
|
12
|
+
return props => /*#__PURE__*/_react.default.createElement(_OrganizationContext.default.Consumer, null, organization => /*#__PURE__*/_react.default.createElement(Component, _extends({}, props, {
|
|
13
|
+
organization: organization
|
|
14
|
+
})));
|
|
24
15
|
}
|
|
@@ -4,12 +4,7 @@ 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
|
-
|
|
11
|
-
|
|
12
|
-
var PluginContext = /*#__PURE__*/_react.default.createContext();
|
|
13
|
-
|
|
14
|
-
var _default = PluginContext;
|
|
15
|
-
exports.default = _default;
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
const PluginContext = /*#__PURE__*/_react.default.createContext();
|
|
10
|
+
var _default = exports.default = PluginContext;
|
|
@@ -4,127 +4,71 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
|
|
10
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
9
|
var _PluginContext = _interopRequireDefault(require("./PluginContext"));
|
|
13
|
-
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
function
|
|
17
|
-
|
|
18
|
-
function
|
|
19
|
-
|
|
20
|
-
function
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
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); }
|
|
27
|
-
|
|
28
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
29
|
-
|
|
30
|
-
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); } }
|
|
31
|
-
|
|
32
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
33
|
-
|
|
34
|
-
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); }
|
|
35
|
-
|
|
36
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
37
|
-
|
|
38
|
-
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); }; }
|
|
39
|
-
|
|
40
|
-
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); }
|
|
41
|
-
|
|
42
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
43
|
-
|
|
44
|
-
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; } }
|
|
45
|
-
|
|
46
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
47
|
-
|
|
48
|
-
var PluginProvider = /*#__PURE__*/function (_Component) {
|
|
49
|
-
_inherits(PluginProvider, _Component);
|
|
50
|
-
|
|
51
|
-
var _super = _createSuper(PluginProvider);
|
|
52
|
-
|
|
53
|
-
function PluginProvider(props) {
|
|
54
|
-
var _this;
|
|
55
|
-
|
|
56
|
-
_classCallCheck(this, PluginProvider);
|
|
57
|
-
|
|
58
|
-
_this = _super.call(this, props);
|
|
59
|
-
_this.state = {
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
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); }
|
|
12
|
+
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; }
|
|
13
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
14
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
15
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
16
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
17
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
18
|
+
class PluginProvider extends _react.Component {
|
|
19
|
+
constructor(props) {
|
|
20
|
+
super(props);
|
|
21
|
+
this.state = {
|
|
60
22
|
versaCallPluginId: null,
|
|
61
23
|
authentication: null,
|
|
62
24
|
organization: null,
|
|
63
25
|
controller: props.controller,
|
|
64
|
-
updateState:
|
|
65
|
-
return _this.updateState(data);
|
|
66
|
-
}
|
|
26
|
+
updateState: data => this.updateState(data)
|
|
67
27
|
};
|
|
68
|
-
return _this;
|
|
69
28
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
window.removeEventListener('message', this.onReceiveMessageBinded);
|
|
29
|
+
componentDidMount() {
|
|
30
|
+
this.onReceiveMessageBinded = this.onReceiveMessage.bind(this);
|
|
31
|
+
window.addEventListener('message', this.onReceiveMessageBinded);
|
|
32
|
+
}
|
|
33
|
+
componentWillUnmount() {
|
|
34
|
+
window.removeEventListener('message', this.onReceiveMessageBinded);
|
|
35
|
+
}
|
|
36
|
+
onReceiveMessage(event) {
|
|
37
|
+
if (typeof event.data === 'object' && event.data.versaCallPluginId && (this.state.versaCallPluginId === null || this.state.versaCallPluginId === event.data.versaCallPluginId)) {
|
|
38
|
+
this.setState(event.data);
|
|
81
39
|
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
40
|
+
}
|
|
41
|
+
updateState(data) {
|
|
42
|
+
this.setState(prevState => {
|
|
43
|
+
const controller = _objectSpread(_objectSpread({}, prevState.controller), data);
|
|
44
|
+
window.parent.postMessage({
|
|
45
|
+
versaCallPluginId: prevState.versaCallPluginId,
|
|
46
|
+
controller: controller
|
|
47
|
+
}, '*');
|
|
48
|
+
return {
|
|
49
|
+
controller: controller
|
|
50
|
+
};
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
render() {
|
|
54
|
+
const {
|
|
55
|
+
versaCallPluginId,
|
|
56
|
+
authentication,
|
|
57
|
+
organization,
|
|
58
|
+
controller,
|
|
59
|
+
updateState
|
|
60
|
+
} = this.state;
|
|
61
|
+
return /*#__PURE__*/_react.default.createElement(_PluginContext.default.Provider, {
|
|
62
|
+
value: {
|
|
63
|
+
versaCallPluginId: versaCallPluginId,
|
|
64
|
+
authentication: authentication,
|
|
65
|
+
organization: organization,
|
|
66
|
+
controller: controller,
|
|
67
|
+
updateState: updateState
|
|
87
68
|
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
value: function updateState(data) {
|
|
92
|
-
this.setState(function (prevState) {
|
|
93
|
-
var controller = _objectSpread(_objectSpread({}, prevState.controller), data);
|
|
94
|
-
|
|
95
|
-
window.parent.postMessage({
|
|
96
|
-
versaCallPluginId: prevState.versaCallPluginId,
|
|
97
|
-
controller: controller
|
|
98
|
-
}, '*');
|
|
99
|
-
return {
|
|
100
|
-
controller: controller
|
|
101
|
-
};
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
}, {
|
|
105
|
-
key: "render",
|
|
106
|
-
value: function render() {
|
|
107
|
-
var _this$state = this.state,
|
|
108
|
-
versaCallPluginId = _this$state.versaCallPluginId,
|
|
109
|
-
authentication = _this$state.authentication,
|
|
110
|
-
organization = _this$state.organization,
|
|
111
|
-
controller = _this$state.controller,
|
|
112
|
-
updateState = _this$state.updateState;
|
|
113
|
-
return /*#__PURE__*/_react.default.createElement(_PluginContext.default.Provider, {
|
|
114
|
-
value: {
|
|
115
|
-
versaCallPluginId: versaCallPluginId,
|
|
116
|
-
authentication: authentication,
|
|
117
|
-
organization: organization,
|
|
118
|
-
controller: controller,
|
|
119
|
-
updateState: updateState
|
|
120
|
-
}
|
|
121
|
-
}, this.props.children);
|
|
122
|
-
}
|
|
123
|
-
}]);
|
|
124
|
-
|
|
125
|
-
return PluginProvider;
|
|
126
|
-
}(_react.Component);
|
|
127
|
-
|
|
69
|
+
}, this.props.children);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
128
72
|
PluginProvider.propTypes = {
|
|
129
73
|
controller: _propTypes.default.shape(),
|
|
130
74
|
children: _propTypes.default.node.isRequired
|
|
@@ -132,5 +76,4 @@ PluginProvider.propTypes = {
|
|
|
132
76
|
PluginProvider.defaultProps = {
|
|
133
77
|
controller: {}
|
|
134
78
|
};
|
|
135
|
-
var _default = PluginProvider;
|
|
136
|
-
exports.default = _default;
|
|
79
|
+
var _default = exports.default = PluginProvider;
|
|
@@ -5,27 +5,23 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
Object.defineProperty(exports, "PluginContext", {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: function
|
|
8
|
+
get: function () {
|
|
9
9
|
return _PluginContext.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "PluginProvider", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function
|
|
14
|
+
get: function () {
|
|
15
15
|
return _PluginProvider.default;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "withPlugin", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function
|
|
20
|
+
get: function () {
|
|
21
21
|
return _withPlugin.default;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
|
-
|
|
25
24
|
var _PluginProvider = _interopRequireDefault(require("./PluginProvider"));
|
|
26
|
-
|
|
27
25
|
var _PluginContext = _interopRequireDefault(require("./PluginContext"));
|
|
28
|
-
|
|
29
26
|
var _withPlugin = _interopRequireDefault(require("./withPlugin"));
|
|
30
|
-
|
|
31
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -4,21 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = withPlugin;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _PluginContext = _interopRequireDefault(require("./PluginContext"));
|
|
11
|
-
|
|
12
|
-
function
|
|
13
|
-
|
|
14
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
15
|
-
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
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); }
|
|
16
11
|
function withPlugin(Component) {
|
|
17
|
-
return
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
plugin: plugin
|
|
21
|
-
}));
|
|
22
|
-
});
|
|
23
|
-
};
|
|
12
|
+
return props => /*#__PURE__*/_react.default.createElement(_PluginContext.default.Consumer, null, plugin => /*#__PURE__*/_react.default.createElement(Component, _extends({}, props, {
|
|
13
|
+
plugin: plugin
|
|
14
|
+
})));
|
|
24
15
|
}
|
package/dist/context/index.js
CHANGED
|
@@ -3,67 +3,57 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
|
|
7
6
|
var _Authentication = require("./Authentication");
|
|
8
|
-
|
|
9
7
|
Object.keys(_Authentication).forEach(function (key) {
|
|
10
8
|
if (key === "default" || key === "__esModule") return;
|
|
11
9
|
if (key in exports && exports[key] === _Authentication[key]) return;
|
|
12
10
|
Object.defineProperty(exports, key, {
|
|
13
11
|
enumerable: true,
|
|
14
|
-
get: function
|
|
12
|
+
get: function () {
|
|
15
13
|
return _Authentication[key];
|
|
16
14
|
}
|
|
17
15
|
});
|
|
18
16
|
});
|
|
19
|
-
|
|
20
17
|
var _Channels = require("./Channels");
|
|
21
|
-
|
|
22
18
|
Object.keys(_Channels).forEach(function (key) {
|
|
23
19
|
if (key === "default" || key === "__esModule") return;
|
|
24
20
|
if (key in exports && exports[key] === _Channels[key]) return;
|
|
25
21
|
Object.defineProperty(exports, key, {
|
|
26
22
|
enumerable: true,
|
|
27
|
-
get: function
|
|
23
|
+
get: function () {
|
|
28
24
|
return _Channels[key];
|
|
29
25
|
}
|
|
30
26
|
});
|
|
31
27
|
});
|
|
32
|
-
|
|
33
28
|
var _Core = require("./Core");
|
|
34
|
-
|
|
35
29
|
Object.keys(_Core).forEach(function (key) {
|
|
36
30
|
if (key === "default" || key === "__esModule") return;
|
|
37
31
|
if (key in exports && exports[key] === _Core[key]) return;
|
|
38
32
|
Object.defineProperty(exports, key, {
|
|
39
33
|
enumerable: true,
|
|
40
|
-
get: function
|
|
34
|
+
get: function () {
|
|
41
35
|
return _Core[key];
|
|
42
36
|
}
|
|
43
37
|
});
|
|
44
38
|
});
|
|
45
|
-
|
|
46
39
|
var _Organization = require("./Organization");
|
|
47
|
-
|
|
48
40
|
Object.keys(_Organization).forEach(function (key) {
|
|
49
41
|
if (key === "default" || key === "__esModule") return;
|
|
50
42
|
if (key in exports && exports[key] === _Organization[key]) return;
|
|
51
43
|
Object.defineProperty(exports, key, {
|
|
52
44
|
enumerable: true,
|
|
53
|
-
get: function
|
|
45
|
+
get: function () {
|
|
54
46
|
return _Organization[key];
|
|
55
47
|
}
|
|
56
48
|
});
|
|
57
49
|
});
|
|
58
|
-
|
|
59
50
|
var _Plugin = require("./Plugin");
|
|
60
|
-
|
|
61
51
|
Object.keys(_Plugin).forEach(function (key) {
|
|
62
52
|
if (key === "default" || key === "__esModule") return;
|
|
63
53
|
if (key in exports && exports[key] === _Plugin[key]) return;
|
|
64
54
|
Object.defineProperty(exports, key, {
|
|
65
55
|
enumerable: true,
|
|
66
|
-
get: function
|
|
56
|
+
get: function () {
|
|
67
57
|
return _Plugin[key];
|
|
68
58
|
}
|
|
69
59
|
});
|
package/dist/css/index.js
CHANGED
|
@@ -5,19 +5,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
Object.defineProperty(exports, "JunkStyles", {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: function
|
|
8
|
+
get: function () {
|
|
9
9
|
return _junkModule.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "ScrollbarStyles", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function
|
|
14
|
+
get: function () {
|
|
15
15
|
return _scrollbarModule.default;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
-
|
|
19
18
|
var _junkModule = _interopRequireDefault(require("./junk.module.css"));
|
|
20
|
-
|
|
21
19
|
var _scrollbarModule = _interopRequireDefault(require("./scrollbar.module.css"));
|
|
22
|
-
|
|
23
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|