authscape 1.0.642 → 1.0.646

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/index.js CHANGED
@@ -645,7 +645,7 @@ function ColorPicker(_ref) {
645
645
  style: styles.cover,
646
646
  onClick: handleClose
647
647
  }), /*#__PURE__*/_react["default"].createElement(_reactColor.SketchPicker, {
648
- color: rgbColor,
648
+ color: rgbColor != null ? rgbColor : "#fff",
649
649
  onChange: handleChange,
650
650
  onChangeComplete: function onChangeComplete() {
651
651
  setCompletedColor("rgba(".concat(rgbColor.r, ", ").concat(rgbColor.g, ", ").concat(rgbColor.b, ", ").concat(rgbColor.a, ")"));
@@ -8827,16 +8827,20 @@ var authService = function authService() {
8827
8827
  }(),
8828
8828
  inviteUsers: function () {
8829
8829
  var _inviteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(inviteRequests) {
8830
- var response;
8830
+ var host, response;
8831
8831
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
8832
8832
  while (1) switch (_context2.prev = _context2.next) {
8833
8833
  case 0:
8834
- _context2.next = 2;
8835
- return apiService().post(process.env.authorityUri + "/Invite/InviteUsers", inviteRequests);
8836
- case 2:
8834
+ host = window.location.protocol + "//" + window.location.host;
8835
+ _context2.next = 3;
8836
+ return apiService().post(process.env.authorityUri + "/Invite/InviteUsers", {
8837
+ requests: inviteRequests,
8838
+ host: host
8839
+ });
8840
+ case 3:
8837
8841
  response = _context2.sent;
8838
8842
  return _context2.abrupt("return", response);
8839
- case 4:
8843
+ case 5:
8840
8844
  case "end":
8841
8845
  return _context2.stop();
8842
8846
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "authscape",
3
- "version": "1.0.642",
3
+ "version": "1.0.646",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -79,7 +79,7 @@ export function ColorPicker({name, defaultColor, onColorChanged}) {
79
79
  </div>
80
80
  { displayColorPicker ? <div style={ styles.popover }>
81
81
  <div style={ styles.cover } onClick={ handleClose }/>
82
- <SketchPicker color={ rgbColor } onChange={ handleChange } onChangeComplete={() => {
82
+ <SketchPicker color={ rgbColor != null ? rgbColor : "#fff" } onChange={ handleChange } onChangeComplete={() => {
83
83
  setCompletedColor(`rgba(${ rgbColor.r }, ${ rgbColor.g }, ${ rgbColor.b }, ${ rgbColor.a })`);
84
84
  }} />
85
85
  </div> : null }
@@ -37,9 +37,13 @@ export const authService = () => {
37
37
  },
38
38
  inviteUsers: async (inviteRequests) => {
39
39
 
40
- let response = await apiService().post(
41
- process.env.authorityUri + "/Invite/InviteUsers",
42
- inviteRequests
40
+ var host = window.location.protocol + "//" + window.location.host;
41
+
42
+ let response = await apiService().post(process.env.authorityUri + "/Invite/InviteUsers",
43
+ {
44
+ requests: inviteRequests,
45
+ host: host
46
+ }
43
47
  );
44
48
 
45
49
  return response;