@ututrust/web-components 2.0.10 → 2.0.12

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/index.js CHANGED
@@ -43982,6 +43982,10 @@
43982
43982
  _useState4 = _slicedToArray(_useState3, 2),
43983
43983
  txError = _useState4[0],
43984
43984
  setTxError = _useState4[1];
43985
+ var _useState5 = p(SubmitStatus.idle),
43986
+ _useState6 = _slicedToArray(_useState5, 2),
43987
+ submitStatus = _useState6[0],
43988
+ setSubmitStatus = _useState6[1];
43985
43989
  if (props[ATTR_THEME_COLOR] === "dark") {
43986
43990
  setIsDark(true);
43987
43991
  }
@@ -44286,26 +44290,31 @@
44286
44290
  case 3:
44287
44291
  setTxError("");
44288
44292
  _context7.prev = 4;
44289
- _context7.next = 7;
44293
+ setSubmitStatus(SubmitStatus.submitting);
44294
+ _context7.next = 8;
44290
44295
  return isWalletConnected();
44291
- case 7:
44292
- _context7.next = 9;
44296
+ case 8:
44297
+ _context7.next = 10;
44293
44298
  return endorse(props[ATTR_TARGET_UUID], amount, props[ATTR_TRANSACTION_ID]);
44294
- case 9:
44295
- _context7.next = 16;
44299
+ case 10:
44300
+ setSubmitStatus(SubmitStatus.success);
44301
+ resetSubmitStatusDelayed(setSubmitStatus);
44302
+ _context7.next = 21;
44296
44303
  break;
44297
- case 11:
44298
- _context7.prev = 11;
44304
+ case 14:
44305
+ _context7.prev = 14;
44299
44306
  _context7.t0 = _context7["catch"](4);
44300
44307
  console.log(_context7.t0);
44301
44308
  errorMessage = _context7.t0.data ? _context7.t0.data.message : _context7.t0.message;
44302
44309
  setTxError(errorMessage.length > 100 ? "".concat(errorMessage.substring(0, 100), "...") : errorMessage);
44303
- case 16:
44310
+ setSubmitStatus(SubmitStatus.error);
44311
+ resetSubmitStatusDelayed(setSubmitStatus);
44312
+ case 21:
44304
44313
  case "end":
44305
44314
  return _context7.stop();
44306
44315
  }
44307
44316
  }
44308
- }, _callee7, null, [[4, 11]]);
44317
+ }, _callee7, null, [[4, 14]]);
44309
44318
  }));
44310
44319
  return _onSubmit.apply(this, arguments);
44311
44320
  }
@@ -44371,13 +44380,15 @@
44371
44380
  className: "mt-1 x-utu-error"
44372
44381
  }, errors.amount && "* ".concat(showError(errors))), txError && v$2("div", {
44373
44382
  className: "mt-1 x-utu-error"
44374
- }, txError)), v$2("div", null, v$2("button", {
44383
+ }, txError)), v$2("div", null, v$2(SubmitStatusView, {
44384
+ submitStatus: submitStatus
44385
+ }, v$2("button", {
44375
44386
  style: {
44376
44387
  backgroundColor: props[ATTR_BTN_COLOR] === undefined ? null : "".concat(props[ATTR_BTN_COLOR])
44377
44388
  },
44378
44389
  className: "endor-btn x-utu-btn x-utu-btn-".concat(envCondition),
44379
44390
  type: "submit"
44380
- }, "Endorse")))));
44391
+ }, "Endorse"))))));
44381
44392
  }
44382
44393
 
44383
44394
  var reactStars = {};
@@ -46731,7 +46742,7 @@
46731
46742
  className: "placeholder-text-title"
46732
46743
  }, "No endorsements available"), v$2("div", {
46733
46744
  className: "placeholder-text-body"
46734
- }, "when your people from your network endorse for this entity they will appear here."))) : displayEndorsements.map(function (i) {
46745
+ }, "When your people in your network endorse this entity they will appear here."))) : displayEndorsements.map(function (i) {
46735
46746
  var _i$endorsement;
46736
46747
  return v$2("div", {
46737
46748
  className: "endor-text endor-text-".concat(envCondition)
@@ -46782,7 +46793,7 @@
46782
46793
  className: "placeholder-text-title"
46783
46794
  }, "No star ratings available"), v$2("div", {
46784
46795
  className: "placeholder-text-body"
46785
- }, "when your people from your network leave star ratings for this entity they will appear here."))) : v$2("section", {
46796
+ }, "When people in your network leave star ratings for this entity they will appear here."))) : v$2("section", {
46786
46797
  className: "stars-section x-utu-section-".concat(envCondition)
46787
46798
  }, v$2("div", {
46788
46799
  className: "stars-section-align"
@@ -56373,7 +56384,7 @@
56373
56384
  className: "placeholder-text-title"
56374
56385
  }, "No badges available"), v$2("div", {
56375
56386
  className: "placeholder-text-body"
56376
- }, "when your people from your network leave badges for this entity they will appear here.")));
56387
+ }, "When people in your network leave badges for this entity they will appear here.")));
56377
56388
  return v$2(FeedbackDetailsShimmerAnimation, {
56378
56389
  submitStatus: props.submitStatus
56379
56390
  }, v$2(BaseComponent, {
@@ -56531,7 +56542,7 @@
56531
56542
  className: "placeholder-text-title"
56532
56543
  }, "No video reviews available"), v$2("div", {
56533
56544
  className: "placeholder-text-body"
56534
- }, "when your people from your network leave video reviews for this entity they will appear here."))) : v$2("div", null, v$2("div", {
56545
+ }, "When people in your network leave video reviews for this entity they will appear here."))) : v$2("div", null, v$2("div", {
56535
56546
  className: "avatar-img-top-video-profile"
56536
56547
  }, profileImage ? videos.map(function (i) {
56537
56548
  return v$2(UserImageVideo, _extends$1({
@@ -56584,7 +56595,7 @@
56584
56595
  className: "placeholder-text-title"
56585
56596
  }, "No text reviews available"), v$2("div", {
56586
56597
  className: "placeholder-text-body"
56587
- }, "when your people from your network leave text reviews for this entity they will appear here."))) : v$2("section", {
56598
+ }, "When people in your network leave text reviews for this entity they will appear here."))) : v$2("section", {
56588
56599
  style: {
56589
56600
  padding: "2rem 0"
56590
56601
  },