@forgeroute/ui 0.5.22 → 0.5.24
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/fesm2022/forgeroute-ui-column-filter.mjs +2 -2
- package/fesm2022/forgeroute-ui-column-filter.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-combobox.mjs +26 -8
- package/fesm2022/forgeroute-ui-combobox.mjs.map +1 -1
- package/fesm2022/{forgeroute-ui-core-ui-labels.es-Bado7tzi.mjs → forgeroute-ui-core-ui-labels.es-Dzvm992V.mjs} +9 -6
- package/fesm2022/{forgeroute-ui-core-ui-labels.es-Bado7tzi.mjs.map → forgeroute-ui-core-ui-labels.es-Dzvm992V.mjs.map} +1 -1
- package/fesm2022/forgeroute-ui-core.mjs +9 -6
- package/fesm2022/forgeroute-ui-core.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-messaging.mjs +2 -0
- package/fesm2022/forgeroute-ui-messaging.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-payments.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-square.mjs +37 -24
- package/fesm2022/forgeroute-ui-square.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-stripe.mjs +28 -14
- package/fesm2022/forgeroute-ui-stripe.mjs.map +1 -1
- package/package.json +1 -1
- package/types/forgeroute-ui-combobox.d.ts +10 -0
- package/types/forgeroute-ui-core.d.ts +12 -9
- package/types/forgeroute-ui-payments.d.ts +1 -1
- package/types/forgeroute-ui-square.d.ts +33 -20
- package/types/forgeroute-ui-stripe.d.ts +25 -16
|
@@ -5739,14 +5739,16 @@ var StripeReaderStatusComponent = class StripeReaderStatusComponent {
|
|
|
5739
5739
|
<p class="srs-text" data-testid="reader-status-text">{{ text() }}</p>
|
|
5740
5740
|
<div class="srs-actions">
|
|
5741
5741
|
@if (state() === 'no_reader' || state() === 'unsupported_only') {
|
|
5742
|
-
|
|
5743
|
-
|
|
5744
|
-
}
|
|
5745
|
-
<ui-button [variant]="hideConnect() ? 'primary' : 'secondary'" size="sm" data-testid="reader-status-get" (click)="getReader.emit()">{{ labels.t(hardwareShopAvailable() ? 'stripeReader.status.get' : 'stripeReader.status.getInfo') }}</ui-button>
|
|
5742
|
+
<!-- no reader yet: the ONLY action is how to get one -->
|
|
5743
|
+
<ui-button variant="primary" size="sm" data-testid="reader-status-get" (click)="getReader.emit()">{{ labels.t(hardwareShopAvailable() ? 'stripeReader.status.get' : 'stripeReader.status.getInfo') }}</ui-button>
|
|
5746
5744
|
}
|
|
5747
5745
|
@if (state() === 'merchant_not_ready' || attention()) {
|
|
5748
5746
|
<ui-button variant="primary" size="sm" data-testid="reader-status-setup" (click)="openSetup.emit()">{{ labels.t(reconnect() || attention() ? 'stripeReader.status.reconnect' : 'stripeReader.status.setup') }}</ui-button>
|
|
5749
5747
|
}
|
|
5748
|
+
@if (state() === 'reader_offline' && !hideConnect()) {
|
|
5749
|
+
<!-- a reader exists but is not connected: connecting it again is one click -->
|
|
5750
|
+
<ui-button variant="primary" size="sm" data-testid="reader-status-connect" (click)="connectReader.emit()">{{ labels.t('stripeReader.status.connectYours') }}</ui-button>
|
|
5751
|
+
}
|
|
5750
5752
|
@if (state() === 'reader_offline' || state() === 'checking' || state() === 'attention') {
|
|
5751
5753
|
<ui-button variant="secondary" size="sm" data-testid="reader-status-recheck" (click)="recheck.emit()">{{ labels.t('stripeReader.status.recheck') }}</ui-button>
|
|
5752
5754
|
}
|
|
@@ -5874,14 +5876,16 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
5874
5876
|
<p class="srs-text" data-testid="reader-status-text">{{ text() }}</p>
|
|
5875
5877
|
<div class="srs-actions">
|
|
5876
5878
|
@if (state() === 'no_reader' || state() === 'unsupported_only') {
|
|
5877
|
-
|
|
5878
|
-
|
|
5879
|
-
}
|
|
5880
|
-
<ui-button [variant]="hideConnect() ? 'primary' : 'secondary'" size="sm" data-testid="reader-status-get" (click)="getReader.emit()">{{ labels.t(hardwareShopAvailable() ? 'stripeReader.status.get' : 'stripeReader.status.getInfo') }}</ui-button>
|
|
5879
|
+
<!-- no reader yet: the ONLY action is how to get one -->
|
|
5880
|
+
<ui-button variant="primary" size="sm" data-testid="reader-status-get" (click)="getReader.emit()">{{ labels.t(hardwareShopAvailable() ? 'stripeReader.status.get' : 'stripeReader.status.getInfo') }}</ui-button>
|
|
5881
5881
|
}
|
|
5882
5882
|
@if (state() === 'merchant_not_ready' || attention()) {
|
|
5883
5883
|
<ui-button variant="primary" size="sm" data-testid="reader-status-setup" (click)="openSetup.emit()">{{ labels.t(reconnect() || attention() ? 'stripeReader.status.reconnect' : 'stripeReader.status.setup') }}</ui-button>
|
|
5884
5884
|
}
|
|
5885
|
+
@if (state() === 'reader_offline' && !hideConnect()) {
|
|
5886
|
+
<!-- a reader exists but is not connected: connecting it again is one click -->
|
|
5887
|
+
<ui-button variant="primary" size="sm" data-testid="reader-status-connect" (click)="connectReader.emit()">{{ labels.t('stripeReader.status.connectYours') }}</ui-button>
|
|
5888
|
+
}
|
|
5885
5889
|
@if (state() === 'reader_offline' || state() === 'checking' || state() === 'attention') {
|
|
5886
5890
|
<ui-button variant="secondary" size="sm" data-testid="reader-status-recheck" (click)="recheck.emit()">{{ labels.t('stripeReader.status.recheck') }}</ui-button>
|
|
5887
5891
|
}
|
|
@@ -5988,7 +5992,8 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
5988
5992
|
const STRIPE_READER_NO_READER_STATES = [
|
|
5989
5993
|
"no_reader",
|
|
5990
5994
|
"unsupported_only",
|
|
5991
|
-
"merchant_not_ready"
|
|
5995
|
+
"merchant_not_ready",
|
|
5996
|
+
"reader_offline"
|
|
5992
5997
|
];
|
|
5993
5998
|
var StripeReaderPaymentComponent = class StripeReaderPaymentComponent {
|
|
5994
5999
|
constructor() {
|
|
@@ -8930,8 +8935,10 @@ function stripeReaderBannerConfig(config) {
|
|
|
8930
8935
|
const STRIPE_READER_BANNER_STATES = [
|
|
8931
8936
|
"no_reader",
|
|
8932
8937
|
"unsupported_only",
|
|
8933
|
-
"merchant_not_ready"
|
|
8938
|
+
"merchant_not_ready",
|
|
8939
|
+
"reader_offline"
|
|
8934
8940
|
];
|
|
8941
|
+
const STRIPE_READER_NOT_CONNECTED_STATES = ["reader_offline"];
|
|
8935
8942
|
var StripeReaderBannerComponent = class StripeReaderBannerComponent {
|
|
8936
8943
|
constructor() {
|
|
8937
8944
|
this.labels = inject(UiLabelsService);
|
|
@@ -8958,8 +8965,9 @@ var StripeReaderBannerComponent = class StripeReaderBannerComponent {
|
|
|
8958
8965
|
return c && !this.failed() && !this.offline() && STRIPE_READER_BANNER_STATES.includes(c.readiness.state) ? c.readiness : null;
|
|
8959
8966
|
}, ...ngDevMode ? [{ debugName: "shown" }] : /* istanbul ignore next */ []);
|
|
8960
8967
|
this.shownState = computed(() => this.shown()?.state ?? "none", ...ngDevMode ? [{ debugName: "shownState" }] : /* istanbul ignore next */ []);
|
|
8961
|
-
this.
|
|
8962
|
-
this.
|
|
8968
|
+
this.notConnected = computed(() => STRIPE_READER_NOT_CONNECTED_STATES.includes(this.shown()?.state), ...ngDevMode ? [{ debugName: "notConnected" }] : /* istanbul ignore next */ []);
|
|
8969
|
+
this.reasonKey = computed(() => this.notConnected() ? null : readerBannerReasonKey(this.shown()?.reason), ...ngDevMode ? [{ debugName: "reasonKey" }] : /* istanbul ignore next */ []);
|
|
8970
|
+
this.message = computed(() => this.labels.t(this.reasonKey() ?? (this.notConnected() ? "stripeReader.banner.notConnected" : this.shown()?.state === "merchant_not_ready" ? "stripeReaderBanner.setupFirst" : "stripeReaderBanner.getReader")), ...ngDevMode ? [{ debugName: "message" }] : /* istanbul ignore next */ []);
|
|
8963
8971
|
this.destroyRef.onDestroy(() => {
|
|
8964
8972
|
this.destroyed = true;
|
|
8965
8973
|
});
|
|
@@ -9134,8 +9142,11 @@ var StripeReaderBannerComponent = class StripeReaderBannerComponent {
|
|
|
9134
9142
|
<span class="srb-actions">
|
|
9135
9143
|
@if (r.state === 'merchant_not_ready') {
|
|
9136
9144
|
<ui-button variant="link" size="sm" data-testid="reader-banner-setup" (click)="setup.emit()">{{ labels.t(r.reason === 'reconnect_required' ? 'stripeReader.status.reconnect' : 'stripeReader.status.setup') }}</ui-button>
|
|
9145
|
+
} @else if (notConnected()) {
|
|
9146
|
+
<!-- a reader exists but is not connected: the ONLY action is to connect it -->
|
|
9147
|
+
<ui-button variant="link" size="sm" data-testid="reader-banner-connect" (click)="connect.emit()">{{ labels.t('stripeReader.status.connectYours') }}</ui-button>
|
|
9137
9148
|
} @else {
|
|
9138
|
-
|
|
9149
|
+
<!-- no reader yet: the ONLY action is how to get one -->
|
|
9139
9150
|
<ui-button variant="link" size="sm" data-testid="reader-banner-get" (click)="order.emit()">{{ labels.t(hardwareShopAvailable() ? 'stripeReader.status.get' : 'stripeReader.status.getInfo') }}</ui-button>
|
|
9140
9151
|
}
|
|
9141
9152
|
</span>
|
|
@@ -9220,8 +9231,11 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
9220
9231
|
<span class="srb-actions">
|
|
9221
9232
|
@if (r.state === 'merchant_not_ready') {
|
|
9222
9233
|
<ui-button variant="link" size="sm" data-testid="reader-banner-setup" (click)="setup.emit()">{{ labels.t(r.reason === 'reconnect_required' ? 'stripeReader.status.reconnect' : 'stripeReader.status.setup') }}</ui-button>
|
|
9234
|
+
} @else if (notConnected()) {
|
|
9235
|
+
<!-- a reader exists but is not connected: the ONLY action is to connect it -->
|
|
9236
|
+
<ui-button variant="link" size="sm" data-testid="reader-banner-connect" (click)="connect.emit()">{{ labels.t('stripeReader.status.connectYours') }}</ui-button>
|
|
9223
9237
|
} @else {
|
|
9224
|
-
|
|
9238
|
+
<!-- no reader yet: the ONLY action is how to get one -->
|
|
9225
9239
|
<ui-button variant="link" size="sm" data-testid="reader-banner-get" (click)="order.emit()">{{ labels.t(hardwareShopAvailable() ? 'stripeReader.status.get' : 'stripeReader.status.getInfo') }}</ui-button>
|
|
9226
9240
|
}
|
|
9227
9241
|
</span>
|