@justifi/webcomponents 4.7.1 → 4.7.2-rc.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.
Files changed (110) hide show
  1. package/dist/cjs/{Payout-68a99ee3.js → Payout-f8240e9c.js} +49 -1
  2. package/dist/cjs/additional-questions-details_5.cjs.entry.js +2 -2
  3. package/dist/cjs/form-control-datepart_2.cjs.entry.js +1 -1
  4. package/dist/cjs/justifi-business-details.cjs.entry.js +16 -12
  5. package/dist/cjs/justifi-business-form-stepped.cjs.entry.js +1 -1
  6. package/dist/cjs/justifi-business-form.cjs.entry.js +1 -1
  7. package/dist/cjs/justifi-business-list.cjs.entry.js +1 -1
  8. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +22 -10
  9. package/dist/cjs/justifi-payment-balance-transactions.cjs.entry.js +1 -1
  10. package/dist/cjs/justifi-payment-details.cjs.entry.js +20 -11
  11. package/dist/cjs/justifi-payment-form.cjs.entry.js +16 -6
  12. package/dist/cjs/justifi-payment-method-form.cjs.entry.js +3 -1
  13. package/dist/cjs/justifi-payments-list.cjs.entry.js +22 -23
  14. package/dist/cjs/justifi-payout-details.cjs.entry.js +19 -11
  15. package/dist/cjs/justifi-payouts-list.cjs.entry.js +21 -11
  16. package/dist/cjs/justifi-proceeds-list.cjs.entry.js +1 -1
  17. package/dist/cjs/justifi-refund-form.cjs.entry.js +1 -1
  18. package/dist/cjs/justifi-subaccount-details.cjs.entry.js +3 -5
  19. package/dist/cjs/justifi-subaccounts-list.cjs.entry.js +1 -1
  20. package/dist/cjs/justifi-table_2.cjs.entry.js +4 -4
  21. package/dist/collection/api/Payment.js +49 -1
  22. package/dist/collection/api/mockData/MockPayments.js +21 -21
  23. package/dist/collection/components/business-details/business-details.js +16 -12
  24. package/dist/collection/components/business-details/representative-details/representative-details.js +2 -2
  25. package/dist/collection/components/business-form/business-form-example.js +12 -0
  26. package/dist/collection/components/business-form/business-form-stepped-example.js +12 -0
  27. package/dist/collection/components/business-form/business-form-stepped.stories.js +1 -1
  28. package/dist/collection/components/form/form-control-datepart.js +1 -1
  29. package/dist/collection/components/gross-payment-chart/example.js +12 -0
  30. package/dist/collection/components/gross-payment-chart/gross-payment-chart.js +20 -8
  31. package/dist/collection/components/payment-details/payment-details.js +21 -12
  32. package/dist/collection/components/payment-form/payment-form.js +16 -6
  33. package/dist/collection/components/payments-list/payments-list.js +21 -22
  34. package/dist/collection/components/payout-details/payout-details.js +19 -11
  35. package/dist/collection/components/payouts-list/payouts-list.js +20 -10
  36. package/dist/collection/components/subaccount-details/subaccount-details.js +2 -4
  37. package/dist/collection/components/table/table.css +5 -0
  38. package/dist/collection/components/table/table.js +2 -2
  39. package/dist/components/Payout.js +50 -2
  40. package/dist/components/form-control-datepart2.js +1 -1
  41. package/dist/components/justifi-business-details.js +15 -11
  42. package/dist/components/justifi-gross-payment-chart.js +21 -9
  43. package/dist/components/justifi-payment-details.js +21 -12
  44. package/dist/components/justifi-payment-form.js +16 -6
  45. package/dist/components/justifi-payments-list.js +22 -23
  46. package/dist/components/justifi-payout-details.js +19 -11
  47. package/dist/components/justifi-payouts-list.js +21 -11
  48. package/dist/components/justifi-subaccount-details.js +2 -4
  49. package/dist/components/pagination-menu2.js +1 -1
  50. package/dist/components/payment-method-form.js +3 -1
  51. package/dist/components/representative-details2.js +2 -2
  52. package/dist/components/table.js +3 -3
  53. package/dist/esm/{Payout-fcf16887.js → Payout-586f06a3.js} +50 -2
  54. package/dist/esm/additional-questions-details_5.entry.js +2 -2
  55. package/dist/esm/form-control-datepart_2.entry.js +1 -1
  56. package/dist/esm/justifi-business-details.entry.js +17 -13
  57. package/dist/esm/justifi-business-form-stepped.entry.js +1 -1
  58. package/dist/esm/justifi-business-form.entry.js +1 -1
  59. package/dist/esm/justifi-business-list.entry.js +1 -1
  60. package/dist/esm/justifi-gross-payment-chart.entry.js +22 -10
  61. package/dist/esm/justifi-payment-balance-transactions.entry.js +1 -1
  62. package/dist/esm/justifi-payment-details.entry.js +21 -12
  63. package/dist/esm/justifi-payment-form.entry.js +16 -6
  64. package/dist/esm/justifi-payment-method-form.entry.js +3 -1
  65. package/dist/esm/justifi-payments-list.entry.js +22 -23
  66. package/dist/esm/justifi-payout-details.entry.js +20 -12
  67. package/dist/esm/justifi-payouts-list.entry.js +21 -11
  68. package/dist/esm/justifi-proceeds-list.entry.js +1 -1
  69. package/dist/esm/justifi-refund-form.entry.js +1 -1
  70. package/dist/esm/justifi-subaccount-details.entry.js +4 -6
  71. package/dist/esm/justifi-subaccounts-list.entry.js +1 -1
  72. package/dist/esm/justifi-table_2.entry.js +4 -4
  73. package/dist/types/api/Payment.d.ts +32 -5
  74. package/dist/types/api/Payout.d.ts +2 -2
  75. package/dist/types/components/business-details/business-details.d.ts +0 -1
  76. package/dist/types/components/payment-method-form/payment-method-responses.d.ts +7 -1
  77. package/dist/types/components/payments-list/payments-list.d.ts +1 -3
  78. package/dist/webcomponents/p-0ce6fba2.entry.js +1 -0
  79. package/dist/webcomponents/p-2140e9ba.entry.js +1 -0
  80. package/dist/webcomponents/{p-914d2284.entry.js → p-311250e2.entry.js} +1 -1
  81. package/dist/webcomponents/{p-2306d7aa.entry.js → p-3501b0e8.entry.js} +1 -1
  82. package/dist/webcomponents/{p-29528eca.entry.js → p-3ee831ac.entry.js} +1 -1
  83. package/dist/webcomponents/{p-6075122d.entry.js → p-4214dbb8.entry.js} +1 -1
  84. package/dist/webcomponents/{p-5e78d370.entry.js → p-5df52341.entry.js} +1 -1
  85. package/dist/webcomponents/{p-3b80dc4a.entry.js → p-6a648652.entry.js} +1 -1
  86. package/dist/webcomponents/p-77a8bcea.entry.js +1 -0
  87. package/dist/webcomponents/p-9d46e7f1.entry.js +1 -0
  88. package/dist/webcomponents/p-a1ef6b4c.entry.js +1 -0
  89. package/dist/webcomponents/p-ac8ee442.entry.js +1 -0
  90. package/dist/webcomponents/{p-21998fea.entry.js → p-af771964.entry.js} +1 -1
  91. package/dist/webcomponents/p-bab3fd56.entry.js +1 -0
  92. package/dist/webcomponents/p-bc91044c.entry.js +1 -0
  93. package/dist/webcomponents/{p-98bb3c6a.entry.js → p-c29c587f.entry.js} +1 -1
  94. package/dist/webcomponents/{p-ce2e68df.entry.js → p-d6347f27.entry.js} +3 -3
  95. package/dist/webcomponents/p-d8d1f417.entry.js +1 -0
  96. package/dist/webcomponents/p-e12ab547.js +1 -0
  97. package/dist/webcomponents/{p-5cf9128c.entry.js → p-ed8c9b88.entry.js} +1 -1
  98. package/dist/webcomponents/webcomponents.esm.js +1 -1
  99. package/package.json +3 -2
  100. package/readme.md +38 -10
  101. package/dist/webcomponents/p-0e51a185.entry.js +0 -1
  102. package/dist/webcomponents/p-10210702.entry.js +0 -1
  103. package/dist/webcomponents/p-44271b0c.entry.js +0 -1
  104. package/dist/webcomponents/p-52643813.entry.js +0 -1
  105. package/dist/webcomponents/p-656a6bc8.entry.js +0 -1
  106. package/dist/webcomponents/p-76983a7e.js +0 -1
  107. package/dist/webcomponents/p-884b8cf4.entry.js +0 -1
  108. package/dist/webcomponents/p-a82e7fcd.entry.js +0 -1
  109. package/dist/webcomponents/p-b0fbddb2.entry.js +0 -1
  110. package/dist/webcomponents/p-d89b1a78.entry.js +0 -1
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-c5ace247.js');
6
6
  const Api = require('./Api-548eaa62.js');
7
7
  const Pagination = require('./Pagination-cae1dcbd.js');
8
- const Payout = require('./Payout-68a99ee3.js');
8
+ const Payout = require('./Payout-f8240e9c.js');
9
9
  const utils = require('./utils-13d069be.js');
10
10
  const config = require('./config-a156df17.js');
11
11
 
@@ -63,18 +63,28 @@ const PayoutsList = class {
63
63
  return;
64
64
  }
65
65
  this.loading = true;
66
- const api = Api.Api(this.authToken, config.config.proxyApiOrigin);
67
- const endpoint = `account/${this.accountId}/payouts`;
68
- const response = await api.get(endpoint, this.params);
69
- if (!response.error) {
70
- this.paging = Object.assign(Object.assign({}, this.paging), response.page_info);
71
- const data = (_a = response === null || response === void 0 ? void 0 : response.data) === null || _a === void 0 ? void 0 : _a.map(dataItem => new Payout.Payout(dataItem));
72
- this.payouts = data;
66
+ try {
67
+ const api = Api.Api(this.authToken, config.config.proxyApiOrigin);
68
+ const endpoint = `account/${this.accountId}/payouts`;
69
+ const response = await api.get(endpoint, this.params);
70
+ if (!response.error) {
71
+ this.paging = Object.assign(Object.assign({}, this.paging), response.page_info);
72
+ const data = (_a = response === null || response === void 0 ? void 0 : response.data) === null || _a === void 0 ? void 0 : _a.map(dataItem => new Payout.Payout(dataItem));
73
+ this.payouts = data;
74
+ }
75
+ else {
76
+ const responseError = typeof response.error === 'string' ? response.error : response.error.message;
77
+ console.error(`Error fetching payouts: ${responseError}`);
78
+ this.errorMessage = 'No results';
79
+ }
73
80
  }
74
- else {
75
- this.errorMessage = typeof response.error === 'string' ? response.error : response.error.message;
81
+ catch (error) {
82
+ console.error(`Error fetching payouts: ${error}`);
83
+ this.errorMessage = 'No results';
84
+ }
85
+ finally {
86
+ this.loading = false;
76
87
  }
77
- this.loading = false;
78
88
  }
79
89
  render() {
80
90
  return (index.h(index.Host, null, index.h("justifi-table", { rowClickHandler: (e) => {
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-c5ace247.js');
6
6
  const Api = require('./Api-548eaa62.js');
7
7
  const Pagination = require('./Pagination-cae1dcbd.js');
8
- require('./Payout-68a99ee3.js');
8
+ require('./Payout-f8240e9c.js');
9
9
  const utils = require('./utils-13d069be.js');
10
10
  const config = require('./config-a156df17.js');
11
11
 
@@ -6,7 +6,7 @@ const index = require('./index-c5ace247.js');
6
6
  const index_esm = require('./index.esm-91ec051e.js');
7
7
  const Api = require('./Api-548eaa62.js');
8
8
  require('./Pagination-cae1dcbd.js');
9
- require('./Payout-68a99ee3.js');
9
+ require('./Payout-f8240e9c.js');
10
10
  const form = require('./form-1e732a9d.js');
11
11
  const config = require('./config-a156df17.js');
12
12
 
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-c5ace247.js');
6
6
  const Api = require('./Api-548eaa62.js');
7
7
  require('./Pagination-cae1dcbd.js');
8
- require('./Payout-68a99ee3.js');
8
+ require('./Payout-f8240e9c.js');
9
9
  const SubAccount = require('./SubAccount-f47c8522.js');
10
10
  const utils = require('./utils-4622829d.js');
11
11
  const utils$1 = require('./utils-13d069be.js');
@@ -65,10 +65,8 @@ const SubaccountDetails = class {
65
65
  this.loading = false;
66
66
  }
67
67
  render() {
68
- var _a, _b, _c, _d, _e, _f;
69
- return (index.h(index.Host, null, this.loading ? utils.LoadingState :
70
- !this.subaccount || !this.onboardingData ? utils.ErrorState(this.errorMessage) :
71
- index.h("justifi-details", null, index.h(utils.EntityHeadInfo, { slot: 'head-info', badge: index.h("span", { slot: 'badge', innerHTML: utils$1.MapSubAccountStatusToBadge((_a = this.subaccount) === null || _a === void 0 ? void 0 : _a.status) }), title: (_b = this.subaccount) === null || _b === void 0 ? void 0 : _b.name }, index.h(utils.EntityHeadInfoItem, { classes: "border-1 border-end", title: "Created At", value: `${utils$1.formatDate(this.subaccount.created_at)} ${utils$1.formatTime(this.subaccount.created_at)}` }), index.h(utils.EntityHeadInfoItem, { classes: "border-1 border-end", title: "Last Updated", value: `${utils$1.formatDate(this.subaccount.updated_at)} ${utils$1.formatTime(this.subaccount.updated_at)}` }), index.h(utils.EntityHeadInfoItem, { title: "ID", value: this.subaccount.id })), index.h("div", { slot: 'detail-sections' }, index.h("subaccount-account-details", { subaccount: this.subaccount, onboardingData: this.onboardingData }), index.h("subaccount-merchant-details", { onboardingData: this.onboardingData }), index.h("subaccount-representative-details", { data: (_d = (_c = this.onboardingData) === null || _c === void 0 ? void 0 : _c.payload) === null || _d === void 0 ? void 0 : _d.representative }), index.h("subaccount-owners-details", { data: (_f = (_e = this.onboardingData) === null || _e === void 0 ? void 0 : _e.payload) === null || _f === void 0 ? void 0 : _f.owners })))));
68
+ var _a, _b;
69
+ return (index.h(index.Host, null, this.loading && utils.LoadingState, !this.loading && this.errorMessage && utils.ErrorState(this.errorMessage), !this.loading && this.subaccount && this.onboardingData && (index.h("justifi-details", null, index.h(utils.EntityHeadInfo, { slot: 'head-info', badge: index.h("span", { slot: 'badge', innerHTML: utils$1.MapSubAccountStatusToBadge(this.subaccount.status) }), title: this.subaccount.name }, index.h(utils.EntityHeadInfoItem, { classes: "border-1 border-end", title: "Created At", value: `${utils$1.formatDate(this.subaccount.created_at)} ${utils$1.formatTime(this.subaccount.created_at)}` }), index.h(utils.EntityHeadInfoItem, { classes: "border-1 border-end", title: "Last Updated", value: `${utils$1.formatDate(this.subaccount.updated_at)} ${utils$1.formatTime(this.subaccount.updated_at)}` }), index.h(utils.EntityHeadInfoItem, { title: "ID", value: this.subaccount.id })), index.h("div", { slot: 'detail-sections' }, index.h("subaccount-account-details", { subaccount: this.subaccount, onboardingData: this.onboardingData }), index.h("subaccount-merchant-details", { onboardingData: this.onboardingData }), index.h("subaccount-representative-details", { data: (_a = this.onboardingData.payload) === null || _a === void 0 ? void 0 : _a.representative }), index.h("subaccount-owners-details", { data: (_b = this.onboardingData.payload) === null || _b === void 0 ? void 0 : _b.owners }))))));
72
70
  }
73
71
  static get watchers() { return {
74
72
  "subaccountId": ["updateOnPropChange"],
@@ -7,7 +7,7 @@ const SubAccount = require('./SubAccount-f47c8522.js');
7
7
  const utils = require('./utils-13d069be.js');
8
8
  const Api = require('./Api-548eaa62.js');
9
9
  const Pagination = require('./Pagination-cae1dcbd.js');
10
- require('./Payout-68a99ee3.js');
10
+ require('./Payout-f8240e9c.js');
11
11
  const config = require('./config-a156df17.js');
12
12
 
13
13
  const subaccountsListCss = ":host{display:block}";