@robotical/webapp-types 3.7.24 → 3.7.26

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.
@@ -521,13 +521,13 @@ var ApplicationManager = /** @class */ (function () {
521
521
  ApplicationManager.prototype.connectToRIC = function (method, uuids, withoutVerification) {
522
522
  var _a, _b;
523
523
  return __awaiter(this, void 0, void 0, function () {
524
- var wasConnectedObj, raftId, raftType, raft;
524
+ var wasConnectedObj, raftId, raftType, raft, oldColours;
525
525
  return __generator(this, function (_c) {
526
526
  switch (_c.label) {
527
527
  case 0: return [4 /*yield*/, RAFT.connect(method, uuids)];
528
528
  case 1:
529
529
  wasConnectedObj = _c.sent();
530
- if (!wasConnectedObj.success) return [3 /*break*/, 3];
530
+ if (!wasConnectedObj.success) return [3 /*break*/, 6];
531
531
  raftId = (_a = wasConnectedObj.data) === null || _a === void 0 ? void 0 : _a.raftId;
532
532
  raftType = (_b = wasConnectedObj.data) === null || _b === void 0 ? void 0 : _b.raftType;
533
533
  if (!raftId || !raftType) {
@@ -550,15 +550,20 @@ var ApplicationManager = /** @class */ (function () {
550
550
  return [4 /*yield*/, new Promise(function (resolve) { return setTimeout(resolve, 200); })];
551
551
  case 2:
552
552
  _c.sent();
553
- // start verification process
554
- if (!withoutVerification) {
555
- modalState.setModal(createElement(VerificationModal, { connectedRAFT_: raft }), "Looking for ".concat(raft.type));
556
- }
557
- else {
558
- raft.stopVerifyingRaft(true);
559
- }
560
- return [2 /*return*/, raft];
561
- case 3: return [2 /*return*/, null];
553
+ if (!!withoutVerification) return [3 /*break*/, 3];
554
+ modalState.setModal(createElement(VerificationModal, { connectedRAFT_: raft }), "Looking for ".concat(raft.type));
555
+ return [3 /*break*/, 5];
556
+ case 3:
557
+ oldColours = raft._ledLcdColours;
558
+ raft._ledLcdColours = [];
559
+ return [4 /*yield*/, raft.verifyRaft()];
560
+ case 4:
561
+ _c.sent();
562
+ raft._ledLcdColours = oldColours;
563
+ raft.stopVerifyingRaft(true);
564
+ _c.label = 5;
565
+ case 5: return [2 /*return*/, raft];
566
+ case 6: return [2 /*return*/, null];
562
567
  }
563
568
  });
564
569
  });
@@ -113,7 +113,7 @@ function QRContent(_a) {
113
113
  var _this = this;
114
114
  var setSerialNo = _a.setSerialNo;
115
115
  var onQrCodeFound = function (result) { return __awaiter(_this, void 0, void 0, function () {
116
- var rawValue, today, serialNo;
116
+ var rawValue, serialNo;
117
117
  var _a;
118
118
  return __generator(this, function (_b) {
119
119
  rawValue = (_a = result[0]) === null || _a === void 0 ? void 0 : _a.rawValue;
@@ -121,8 +121,7 @@ function QRContent(_a) {
121
121
  window.applicationManager.toaster.error("No Valid QR Code Found");
122
122
  return [2 /*return*/];
123
123
  }
124
- today = new Date();
125
- serialNo = "00000000" + today.toISOString().split("T")[0].replaceAll("-", "") + rawValue.split("-").slice(-1)[0].padStart(16, "0");
124
+ serialNo = "00000000" + rawValue.split("-").slice(-1)[0].padStart(24, "0");
126
125
  setSerialNo(serialNo);
127
126
  return [2 /*return*/];
128
127
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robotical/webapp-types",
3
- "version": "3.7.24",
3
+ "version": "3.7.26",
4
4
  "description": "Type definitions for the Application Manager",
5
5
  "main": "dist/application-manager.d.ts",
6
6
  "types": "dist/application-manager.d.ts",