@everymatrix/cashier-page 1.39.1 → 1.39.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/cashier-page",
3
- "version": "1.39.1",
3
+ "version": "1.39.3",
4
4
  "main": "index.js",
5
5
  "svelte": "src/index.ts",
6
6
  "scripts": {
@@ -35,5 +35,5 @@
35
35
  "publishConfig": {
36
36
  "access": "public"
37
37
  },
38
- "gitHead": "cc6e3a021c852cb2734662bef9ef45190de4bfa9"
38
+ "gitHead": "34113a6474c9833b52690631f489148f6b5c67e0"
39
39
  }
@@ -87,6 +87,14 @@
87
87
  const setActiveLanguage = ():void => {
88
88
  setLocale(lang);
89
89
  }
90
+
91
+ Object.keys(TRANSLATIONS).forEach((item:any):void => {
92
+ addNewMessages(item, TRANSLATIONS[item]);
93
+ });
94
+
95
+ if (!translationurl) {
96
+ isTranslationLoaded = true;
97
+ }
90
98
  const setTranslationUrl = () => {
91
99
  let url:string = translationurl;
92
100
  if (url) {
@@ -102,11 +110,6 @@
102
110
  });
103
111
  }
104
112
  }
105
-
106
- Object.keys(TRANSLATIONS).forEach((item:any):void => {
107
- addNewMessages(item, TRANSLATIONS[item]);
108
- });
109
-
110
113
  const getPlayerSession = () => {
111
114
  const url:URL = new URL(`${endpoint}/v2/player/${customerid}/payment/GetPaymentSession`);
112
115
  const headers = new Headers();
@@ -284,7 +287,7 @@
284
287
  {#if isProcessingTxn}
285
288
  <div class="DisablePage"></div>
286
289
  {/if}
287
- {#if lang}
290
+ {#if lang && isTranslationLoaded}
288
291
  {#if !!showheader && showheader !== 'false'}
289
292
  <cashier-header class="Header"
290
293
  {lang}
@@ -315,11 +318,12 @@
315
318
  {translationurl}
316
319
  {clientstylingurl}
317
320
  {clientstyling}
321
+ {lang}
318
322
  errorcode={modalErrorMessage}
319
323
  >
320
324
  <div slot="button" class="ModalButton" on:click={hideModal}>{$_('closeModal')}</div>
321
325
  </cashier-error>
322
- </cashier-modal>
326
+ </cashier-modal>
323
327
  {#if showsessionexpirationmodal === 'true'}
324
328
  <cashier-session-expiration-modal
325
329
  {assetsurl}
@@ -335,16 +339,16 @@
335
339
  >
336
340
  </cashier-session-expiration-modal>
337
341
  {/if}
338
- {#if showConfirmModal}
339
- <cashier-confirm-modal
340
- {clientstylingurl}
341
- {clientstyling}
342
- >
343
- <span slot="text">{ confirmAmount && !hideAmountField ? $_(`${type.toLowerCase()}.confirmTextWithAmount`,
344
- { values:{ amount: formatter.format(confirmAmount), currency }}): $_(`${type.toLowerCase()}.confirmText`)}</span>
345
- <div slot="confirm">{$_(`${type.toLowerCase()}.confirmButton`)}</div>
346
- </cashier-confirm-modal>
347
- {/if}
342
+ {#if showConfirmModal}
343
+ <cashier-confirm-modal
344
+ {clientstylingurl}
345
+ {clientstyling}
346
+ >
347
+ <span slot="text">{ confirmAmount && !hideAmountField ? $_(`${type.toLowerCase()}.confirmTextWithAmount`,
348
+ { values:{ amount: formatter.format(confirmAmount), currency }}): $_(`${type.toLowerCase()}.confirmText`)}</span>
349
+ <div slot="confirm">{$_(`${type.toLowerCase()}.confirmButton`)}</div>
350
+ </cashier-confirm-modal>
351
+ {/if}
348
352
  {/if}
349
353
  {#if !errorMessage && !errorResponseCode}
350
354
  <div class="CashierPage">