@justifi/webcomponents 4.7.0-rc.1 → 4.7.0-rc.2
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/justifi-gross-payment-chart.cjs.entry.js +2 -1
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-payment-method-form.cjs.entry.js +1 -1
- package/dist/collection/components/gross-payment-chart/gross-payment-chart.js +2 -1
- package/dist/collection/components/gross-payment-chart/gross-payment-chart.js.map +1 -1
- package/dist/components/justifi-gross-payment-chart.js +2 -1
- package/dist/components/justifi-gross-payment-chart.js.map +1 -1
- package/dist/components/payment-method-form.js +1 -1
- package/dist/esm/justifi-gross-payment-chart.entry.js +2 -1
- package/dist/esm/justifi-gross-payment-chart.entry.js.map +1 -1
- package/dist/esm/justifi-payment-method-form.entry.js +1 -1
- package/dist/webcomponents/p-8c4c3d60.entry.js +20 -0
- package/dist/webcomponents/p-8c4c3d60.entry.js.map +1 -0
- package/dist/webcomponents/{p-7cde64a2.entry.js → p-d7630f46.entry.js} +2 -2
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +2 -2
- package/dist/webcomponents/p-222d357c.entry.js +0 -20
- package/dist/webcomponents/p-222d357c.entry.js.map +0 -1
- /package/dist/webcomponents/{p-7cde64a2.entry.js.map → p-d7630f46.entry.js.map} +0 -0
|
@@ -1494,7 +1494,7 @@ const MessageEventType = {
|
|
|
1494
1494
|
};
|
|
1495
1495
|
|
|
1496
1496
|
const name = "@justifi/webcomponents";
|
|
1497
|
-
const version = "4.7.0-rc.
|
|
1497
|
+
const version = "4.7.0-rc.2";
|
|
1498
1498
|
const description = "JustiFi Web Components";
|
|
1499
1499
|
const main = "dist/index.cjs.js";
|
|
1500
1500
|
const module$1 = "dist/components/index.js";
|
|
@@ -3,6 +3,7 @@ import { Api } from "../../api";
|
|
|
3
3
|
import { Chart, BarController, Colors, BarElement, CategoryScale, LinearScale, Legend, Tooltip, Title } from "chart.js";
|
|
4
4
|
import { generateChartOptions } from "./chart-utils";
|
|
5
5
|
import { ErrorState } from "../details/utils";
|
|
6
|
+
import { config } from "../../../config";
|
|
6
7
|
export class GrossPaymentChart {
|
|
7
8
|
constructor() {
|
|
8
9
|
this.accountId = undefined;
|
|
@@ -30,7 +31,7 @@ export class GrossPaymentChart {
|
|
|
30
31
|
return;
|
|
31
32
|
}
|
|
32
33
|
this.loading = true;
|
|
33
|
-
const api = Api(this.authToken,
|
|
34
|
+
const api = Api(this.authToken, config.proxyApiOrigin);
|
|
34
35
|
const endpoint = `account/${this.accountId}/reports/gross_volume`;
|
|
35
36
|
const response = await api.get(endpoint);
|
|
36
37
|
if (!response.error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gross-payment-chart.js","sourceRoot":"","sources":["../../../../src/components/gross-payment-chart/gross-payment-chart.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,GAAG,EAA0B,MAAM,WAAW,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"gross-payment-chart.js","sourceRoot":"","sources":["../../../../src/components/gross-payment-chart/gross-payment-chart.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,GAAG,EAA0B,MAAM,WAAW,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,EA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CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;KACvD;IAED,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;EACvB,CAAC;EAED,WAAW;IACT,IAAI,IAAI,CAAC,KAAK,EAAE;MACd,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAA;KACpB;SAAM,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,OAAO,EAAE;MACxC,KAAK,CAAC,QAAQ,CACZ,MAAM,EACN,aAAa,EACb,UAAU,EACV,aAAa,EACb,WAAW,EACX,MAAM,EACN,OAAO,EACP,KAAK,CACN,CAAA;MACD,IAAI,CAAC,KAAK,GAAG,IAAI,KAAK,CACpB,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,EAC9B,oBAAoB,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,OAAO,CAAuB,CACjF,CAAC;MACF,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAA;KACpB;EACH,CAAC;EAED,MAAM;IACJ,OAAO,CACL,EAAC,IAAI,QAED,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC;MAC/C,CAAC,CAAC,cAAQ,EAAE,EAAC,OAAO,EAAC,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,GAAG,IAAI,GAAI,CAE3D,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, State, Watch, h } from '@stencil/core';\nimport { Api, IApiResponseCollection } from '../../api';\nimport { Chart, BarController, Colors, BarElement, CategoryScale, LinearScale, Legend, Tooltip, Title, ChartConfiguration } from 'chart.js'\nimport { GrossVolumeReport, GrossVolumeReportDate } from '../../api/GrossVolume';\nimport { generateChartOptions } from './chart-utils';\nimport { ErrorState } from '../details/utils';\nimport { config } from '../../../config';\n\n@Component({\n tag: 'justifi-gross-payment-chart',\n styleUrl: 'gross-payment-chart.scss',\n shadow: true,\n})\nexport class GrossPaymentChart {\n chart: Chart\n chartRef: HTMLCanvasElement\n\n @Prop() accountId: string;\n @Prop() authToken: string;\n @State() data: GrossVolumeReport;\n @State() total: number;\n @State() dates: GrossVolumeReportDate[];\n @State() endDate: string;\n @State() loading: boolean = true;\n @State() errorMessage: string = '';\n\n @Watch('accountId')\n @Watch('authToken')\n updateOnPropChange() {\n this.fetchData();\n }\n\n connectedCallback() {\n this.fetchData();\n }\n\n componentDidRender() {\n this.renderChart();\n }\n\n async fetchData(): Promise<void> {\n if (!this.accountId || !this.authToken) {\n this.errorMessage = \"Can not fetch any data without an AccountID and an AuthToken\";\n this.loading = false;\n return;\n }\n this.loading = true;\n\n const api = Api(this.authToken, config.proxyApiOrigin);\n const endpoint = `account/${this.accountId}/reports/gross_volume`;\n const response: IApiResponseCollection<GrossVolumeReport> = await api.get(endpoint);\n\n if (!response.error) {\n this.total = response?.data.total;\n this.dates = response?.data.dates.reverse();\n this.endDate = this.dates[this.dates.length - 1].date;\n }\n\n this.loading = false;\n }\n\n renderChart() {\n if (this.chart) {\n this.chart.update()\n } else if (this.chartRef && this.endDate) {\n Chart.register(\n Colors,\n BarController,\n BarElement,\n CategoryScale,\n LinearScale,\n Legend,\n Tooltip,\n Title\n )\n this.chart = new Chart(\n this.chartRef.getContext(\"2d\"),\n generateChartOptions(this.total, this.dates, this.endDate) as ChartConfiguration\n );\n this.chart.render()\n }\n }\n\n render() {\n return (\n <Host>\n {\n this.errorMessage ? ErrorState(this.errorMessage)\n : <canvas id=\"chart\" ref={(elem) => this.chartRef = elem} />\n }\n </Host>\n );\n }\n}\n"]}
|
|
@@ -4,6 +4,7 @@ import './Pagination.js';
|
|
|
4
4
|
import './Payout.js';
|
|
5
5
|
import { b as formatCurrency, c as formatDisplayDate } from './utils2.js';
|
|
6
6
|
import { E as ErrorState } from './utils.js';
|
|
7
|
+
import { c as config } from './config.js';
|
|
7
8
|
|
|
8
9
|
/*!
|
|
9
10
|
* @kurkle/color v0.3.2
|
|
@@ -10991,7 +10992,7 @@ const GrossPaymentChart = /*@__PURE__*/ proxyCustomElement(class GrossPaymentCha
|
|
|
10991
10992
|
return;
|
|
10992
10993
|
}
|
|
10993
10994
|
this.loading = true;
|
|
10994
|
-
const api = Api(this.authToken,
|
|
10995
|
+
const api = Api(this.authToken, config.proxyApiOrigin);
|
|
10995
10996
|
const endpoint = `account/${this.accountId}/reports/gross_volume`;
|
|
10996
10997
|
const response = await api.get(endpoint);
|
|
10997
10998
|
if (!response.error) {
|