@everymatrix/cashier-receipt-page 1.28.2 → 1.28.4

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-receipt-page",
3
- "version": "1.28.2",
3
+ "version": "1.28.4",
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": "d958fcf980942e498f37b94d506a1b27a5169aa4"
38
+ "gitHead": "1bfc13085b6829695a52b1569af671db1c024e41"
39
39
  }
@@ -33,6 +33,33 @@
33
33
  Html = 'Html',
34
34
  QRCode = 'QR'
35
35
  }
36
+ const mapReducer = (arr, [keys, val]) => [
37
+ ...arr,
38
+ ...(Array.isArray(keys) ? [...keys.map(key => [key, val])] : [[keys, val]]
39
+ )
40
+ ];
41
+
42
+ const fieldTypeMap = new Map([
43
+ [['Unknown', 0], FieldTypes.Unknown],
44
+ [['Text', 1], FieldTypes.Text],
45
+ [['Boolean', 2], FieldTypes.Boolean],
46
+ [['Number', 3], FieldTypes.Number],
47
+ [['Money', 4], FieldTypes.Money],
48
+ [['DateTime', 5], FieldTypes.DateTime],
49
+ [['Lookup', 6], FieldTypes.Lookup],
50
+ [['IpAddress', 7], FieldTypes.IpAddress],
51
+ [['Date', 8], FieldTypes.Date],
52
+ [['Time', 9], FieldTypes.Time],
53
+ [['LookupCollection', 10], FieldTypes.LookupCollection],
54
+ [['Hidden', 11], FieldTypes.Hidden],
55
+ [['Label', 12], FieldTypes.Label],
56
+ [['Password', 13], FieldTypes.Password],
57
+ [['Link', 14], FieldTypes.Link],
58
+ [['Image', 15], FieldTypes.Image],
59
+ [['Html', 19], FieldTypes.Html],
60
+ [['QR', 20], FieldTypes.QRCode]
61
+ ].reduce(mapReducer, []));
62
+
36
63
  let displayNone:boolean = false;
37
64
  let txnInfo: {
38
65
  type: string,
@@ -147,7 +174,7 @@
147
174
  currency: data.Transaction.Amounts[0]?.Currency,
148
175
  }
149
176
  receiptFields = data.ReceiptInfo && data.ReceiptInfo.ReceiptFields ? data.ReceiptInfo.ReceiptFields.map(field => ({
150
- type: field.Type,
177
+ type: fieldTypeMap.get(field.Type),
151
178
  name: field.Name,
152
179
  description: field.Description,
153
180
  defaultValue: field.DefaultValue,
@@ -249,9 +276,9 @@
249
276
  height: 100%;
250
277
  }
251
278
  .CashierReceiptPage {
252
- border-radius: var(--emw--border-radius-large, 6px);
279
+ border-radius: var(--mmw--border-radius-medium-plus, 6px);
253
280
  background: var(--emw--color-background, #fff);
254
- padding: 0 0 10px 0;
281
+ padding: 0 0 var(--emw--spacing-small-minus, 10px) 0;
255
282
  margin: 0 auto;
256
283
  position: relative;
257
284
  word-wrap: break-word;
@@ -260,7 +287,7 @@
260
287
  .ReceiptWrapper {
261
288
  width: 100%;
262
289
  height: 200px;
263
- border-bottom: 1px solid rgba(0,0,0,.1);
290
+ border-bottom: 1px solid var(--mmw--color-black-transparency-10, rgba(0,0,0,.1));
264
291
  display: flex;
265
292
  align-items: flex-end;
266
293
  flex-direction: row-reverse;
@@ -276,25 +303,25 @@
276
303
  flex-shrink: 0;
277
304
  }
278
305
  .Title {
279
- color: var(--emw--color-gray-300, #111);
280
- font-size: var(--emw--font-size-x-large, 26px);
306
+ color: var(--mmw--color-grey-10, #111);
307
+ font-size: var(--emw--font-size-x-large-plus, 26px);
281
308
  font-weight: var(--emw--font-weight-semibold, 500);
282
309
  margin-bottom: 0;
283
- line-height: var(--emw--font-size-x-large, 26px);
310
+ line-height: var(--emw--font-size-x-large-plus, 26px);
284
311
  }
285
312
  .SubTitle {
286
313
  font-weight: var(--emw--font-weight-normal, 400);
287
314
  font-size: var(--emw--font-size-small, 14px);
288
- color: var(--emw--color-gray-150, #666);
315
+ color: var(--mmw--color-grey-290, #666);
289
316
  margin-top: var(--emw--spacing-small, 12px);
290
317
  }
291
318
  .Text {
292
319
  padding: var(--emw--spacing-small, 12px);
293
320
  font-size: var(--emw--font-size-small, 14px);
294
- color: var(--header-text-color, #111);
321
+ color: var(--mmw--color-grey-10, #111);
295
322
  }
296
323
  .Reference {
297
- color: var(--header-sub-text-color, #666);
324
+ color: var(--mmw--color-grey-290, #666);
298
325
  font-size: var(--emw--font-size-x-small, 12px);
299
326
  font-weight: var(--emw--font-weight-normal, 400);
300
327
  margin: 0 var(--emw--spacing-small, 12px) 0;