@quintype/components 3.0.0 → 3.0.1-at-debounce.0
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/cjs/index.js +26 -5
- package/dist/es/components/access-type.js +26 -5
- package/package.json +2 -1
package/dist/cjs/index.js
CHANGED
|
@@ -4891,15 +4891,33 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
4891
4891
|
callback = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : function () {
|
|
4892
4892
|
return null;
|
|
4893
4893
|
};
|
|
4894
|
-
|
|
4895
|
-
|
|
4894
|
+
|
|
4895
|
+
if (!_this.state.accessLoading) {
|
|
4896
|
+
_context8.next = 3;
|
|
4897
|
+
break;
|
|
4898
|
+
}
|
|
4899
|
+
|
|
4900
|
+
return _context8.abrupt("return", false);
|
|
4896
4901
|
|
|
4897
4902
|
case 3:
|
|
4898
|
-
|
|
4903
|
+
_this.setState({
|
|
4904
|
+
accessLoading: true
|
|
4905
|
+
});
|
|
4906
|
+
|
|
4899
4907
|
_context8.next = 6;
|
|
4900
|
-
return
|
|
4908
|
+
return fetch("/api/v1/access-token/integrations/".concat(_this.props.accessTypeBkIntegrationId));
|
|
4901
4909
|
|
|
4902
4910
|
case 6:
|
|
4911
|
+
jwtResponse = _context8.sent;
|
|
4912
|
+
|
|
4913
|
+
_this.setState({
|
|
4914
|
+
accessLoading: false
|
|
4915
|
+
});
|
|
4916
|
+
|
|
4917
|
+
_context8.next = 10;
|
|
4918
|
+
return awaitHelper(_this.setUser(_this.props.email, _this.props.phone, jwtResponse.headers.get("x-integration-token"), !!jwtResponse.headers.get("x-integration-token")));
|
|
4919
|
+
|
|
4920
|
+
case 10:
|
|
4903
4921
|
_yield$awaitHelper7 = _context8.sent;
|
|
4904
4922
|
error = _yield$awaitHelper7.error;
|
|
4905
4923
|
|
|
@@ -4928,7 +4946,7 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
4928
4946
|
}
|
|
4929
4947
|
}
|
|
4930
4948
|
|
|
4931
|
-
case
|
|
4949
|
+
case 13:
|
|
4932
4950
|
case "end":
|
|
4933
4951
|
return _context8.stop();
|
|
4934
4952
|
}
|
|
@@ -5296,6 +5314,9 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
5296
5314
|
|
|
5297
5315
|
_this.prodHost = props.prodHost || "https://www.accesstype.com";
|
|
5298
5316
|
_this.stagingHost = props.stagingHost || "https://staging.accesstype.com";
|
|
5317
|
+
_this.state = {
|
|
5318
|
+
accessLoading: false
|
|
5319
|
+
};
|
|
5299
5320
|
return _this;
|
|
5300
5321
|
}
|
|
5301
5322
|
|
|
@@ -423,15 +423,33 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
423
423
|
callback = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : function () {
|
|
424
424
|
return null;
|
|
425
425
|
};
|
|
426
|
-
|
|
427
|
-
|
|
426
|
+
|
|
427
|
+
if (!_this.state.accessLoading) {
|
|
428
|
+
_context8.next = 3;
|
|
429
|
+
break;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
return _context8.abrupt("return", false);
|
|
428
433
|
|
|
429
434
|
case 3:
|
|
430
|
-
|
|
435
|
+
_this.setState({
|
|
436
|
+
accessLoading: true
|
|
437
|
+
});
|
|
438
|
+
|
|
431
439
|
_context8.next = 6;
|
|
432
|
-
return
|
|
440
|
+
return fetch("/api/v1/access-token/integrations/".concat(_this.props.accessTypeBkIntegrationId));
|
|
433
441
|
|
|
434
442
|
case 6:
|
|
443
|
+
jwtResponse = _context8.sent;
|
|
444
|
+
|
|
445
|
+
_this.setState({
|
|
446
|
+
accessLoading: false
|
|
447
|
+
});
|
|
448
|
+
|
|
449
|
+
_context8.next = 10;
|
|
450
|
+
return awaitHelper(_this.setUser(_this.props.email, _this.props.phone, jwtResponse.headers.get("x-integration-token"), !!jwtResponse.headers.get("x-integration-token")));
|
|
451
|
+
|
|
452
|
+
case 10:
|
|
435
453
|
_yield$awaitHelper7 = _context8.sent;
|
|
436
454
|
error = _yield$awaitHelper7.error;
|
|
437
455
|
|
|
@@ -460,7 +478,7 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
460
478
|
}
|
|
461
479
|
}
|
|
462
480
|
|
|
463
|
-
case
|
|
481
|
+
case 13:
|
|
464
482
|
case "end":
|
|
465
483
|
return _context8.stop();
|
|
466
484
|
}
|
|
@@ -828,6 +846,9 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
828
846
|
|
|
829
847
|
_this.prodHost = props.prodHost || "https://www.accesstype.com";
|
|
830
848
|
_this.stagingHost = props.stagingHost || "https://staging.accesstype.com";
|
|
849
|
+
_this.state = {
|
|
850
|
+
accessLoading: false
|
|
851
|
+
};
|
|
831
852
|
return _this;
|
|
832
853
|
}
|
|
833
854
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quintype/components",
|
|
3
|
-
"version": "3.0.0",
|
|
3
|
+
"version": "3.0.1-at-debounce.0",
|
|
4
4
|
"description": "Components to help build Quintype Node.js apps",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/es/index.js",
|
|
@@ -102,6 +102,7 @@
|
|
|
102
102
|
"clean:dist": "rimraf dist",
|
|
103
103
|
"docs": "rimraf docs && jsdoc -c jsdoc.json",
|
|
104
104
|
"prepack": "npm run build",
|
|
105
|
+
"prepublishOnly": "./bin-dev-scripts/standard-version-release.sh",
|
|
105
106
|
"sync-files-to": "npx onchange --verbose --wait --await-write-finish 'src/**/*' -- ./bin-dev-scripts/sync-to.sh",
|
|
106
107
|
"test": "jest --config jest.config.js",
|
|
107
108
|
"test:cover": "jest --coverage --watchAll; open coverage/index.html"
|