@wirexapp/card-reveal-web 1.1.0-beta.2 → 1.1.0-beta.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/CHANGELOG.md +50 -0
- package/dist/revealElement.d.ts +18 -1
- package/dist/revealElement.d.ts.map +1 -1
- package/dist/revealElement.js +4 -0
- package/dist/revealElement.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,55 @@
|
|
|
1
1
|
# @wirexapp/card-reveal-web
|
|
2
2
|
|
|
3
|
+
## 1.1.0-beta.3
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- d4654e9: Reveal `copy` option — `'button'` (default: the icon button, as today),
|
|
8
|
+
`'row'` (the whole row is one copy control: a real `<button>`, no icon, no
|
|
9
|
+
reserved width; the copied state shows on the value and is announced to
|
|
10
|
+
assistive tech) or `'none'` (no copy affordance; the value stays selectable
|
|
11
|
+
text). Copy still runs inside the frame and `onCopied` still carries the
|
|
12
|
+
field name only. Enumerated and re-validated in the frame; an older frame
|
|
13
|
+
ignores the option and renders the icon button.
|
|
14
|
+
|
|
15
|
+
Reveal `showLabels` option (default `true`). `false` renders no label
|
|
16
|
+
element at all — not an empty one — so a row is exactly as tall as its
|
|
17
|
+
value; the label string becomes the value's `aria-label`, and the icon copy
|
|
18
|
+
button's name carries the field ("Card Number: Copy"). With `copy:
|
|
19
|
+
'button'` such a row is floored at the icon's hit target (`copyIconSize` +
|
|
20
|
+
12px) so adjacent buttons never overlap. Replaces the `fontSizeLabel: '0px'`
|
|
21
|
+
/ `lineHeightLabel: '0px'` workaround.
|
|
22
|
+
|
|
23
|
+
Reveal `rowStyle` option — `'plain'` (default, as today) or `'boxed'`: each
|
|
24
|
+
row becomes a pill drawn from the box tokens the collect inputs already use
|
|
25
|
+
(`colorBackground`, `colorBorder`, `borderRadius`, `borderWidth`,
|
|
26
|
+
`controlMinHeight`; 16px horizontal padding, `spacingUnit` vertical,
|
|
27
|
+
`fieldGap` between pills), so a border hugs the value instead of the
|
|
28
|
+
iframe. Deliberately opt-in: those tokens already reach reveal frames from
|
|
29
|
+
hosts that share one appearance object with collect, so honouring them on
|
|
30
|
+
presence would have restyled existing reveal rows.
|
|
31
|
+
|
|
32
|
+
Reveal `layout` option — `'column'` (default) or `'row'`: the frame's
|
|
33
|
+
fields sit side by side with equal widths, separated by the new `fieldGap`
|
|
34
|
+
appearance token (length; default `12px`; also the gap between `'boxed'`
|
|
35
|
+
pills). `fields: ['expiry', 'cvv']` with `layout: 'row'` is one frame and
|
|
36
|
+
one `/details` call where two single-field frames called it twice with the
|
|
37
|
+
same action token. Frame-wide on purpose: a mixed arrangement is two
|
|
38
|
+
frames, because a nested `fields` shape would not be ignorable by older
|
|
39
|
+
frames.
|
|
40
|
+
|
|
41
|
+
New `wordSpacing` appearance token (length grammar): extra space between
|
|
42
|
+
the card number's four-digit groups in the reveal frame — the value is
|
|
43
|
+
still chunked with single spaces, and no other row is affected. Reveal
|
|
44
|
+
`fields` entries are now validated against the known row names (unknown
|
|
45
|
+
entries are dropped instead of rendering an `undefined` label).
|
|
46
|
+
|
|
47
|
+
### Patch Changes
|
|
48
|
+
|
|
49
|
+
- Updated dependencies [390c416]
|
|
50
|
+
- Updated dependencies [d4654e9]
|
|
51
|
+
- @wirexapp/card-sdk-core@1.1.0-beta.3
|
|
52
|
+
|
|
3
53
|
## 1.1.0-beta.2
|
|
4
54
|
|
|
5
55
|
### Patch Changes
|
package/dist/revealElement.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PciAppearance, PciFrameStrings, PciRevealField, PciRevealState } from '@wirexapp/card-sdk-core';
|
|
1
|
+
import type { PciAppearance, PciFrameStrings, PciRevealCopyMode, PciRevealField, PciRevealLayout, PciRevealRowStyle, PciRevealState } from '@wirexapp/card-sdk-core';
|
|
2
2
|
export interface PciRevealAuth {
|
|
3
3
|
getBearerToken: () => Promise<string>;
|
|
4
4
|
/** Cardholder identity headers (X-User-Email / X-User-Wallet). Per-user
|
|
@@ -24,6 +24,23 @@ export interface PciRevealElementConfig {
|
|
|
24
24
|
auth: PciRevealAuth;
|
|
25
25
|
appearance?: PciAppearance;
|
|
26
26
|
strings?: PciFrameStrings;
|
|
27
|
+
/** Copy affordance: `'button'` (default, the icon button), `'row'` (the
|
|
28
|
+
* whole row is one copy control, no icon) or `'none'`. Copy still runs
|
|
29
|
+
* inside the frame and `onCopied` still fires in `'row'` mode. Read at
|
|
30
|
+
* mount, like `appearance`. */
|
|
31
|
+
copy?: PciRevealCopyMode;
|
|
32
|
+
/** Render the label above each value (default `true`). `false` renders no
|
|
33
|
+
* label element — the row is as tall as its value and the label becomes
|
|
34
|
+
* the value's accessible name. Read at mount. */
|
|
35
|
+
showLabels?: boolean;
|
|
36
|
+
/** `'boxed'` draws each row as a pill from the box tokens (`colorBackground`,
|
|
37
|
+
* `colorBorder`, `borderRadius`, `borderWidth`, `controlMinHeight`);
|
|
38
|
+
* `'plain'` (default) renders text on the host surface. Read at mount. */
|
|
39
|
+
rowStyle?: PciRevealRowStyle;
|
|
40
|
+
/** `'row'` lays the fields out side by side (equal widths, `fieldGap`
|
|
41
|
+
* apart) so e.g. `['expiry', 'cvv']` is one frame and one `/details`
|
|
42
|
+
* call; `'column'` (default) stacks them. Read at mount. */
|
|
43
|
+
layout?: PciRevealLayout;
|
|
27
44
|
onStateChange?: (state: PciRevealState) => void;
|
|
28
45
|
/** The user copied a row's value inside the frame. Carries the field name
|
|
29
46
|
* ONLY — never the value or anything derived from it. Intended for host
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"revealElement.d.ts","sourceRoot":"","sources":["../src/revealElement.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"revealElement.d.ts","sourceRoot":"","sources":["../src/revealElement.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,aAAa,EACb,eAAe,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EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IA2BlD,OAAO,IAAI,IAAI;CAGhB"}
|
package/dist/revealElement.js
CHANGED
|
@@ -34,6 +34,10 @@ export class PciRevealElement {
|
|
|
34
34
|
cardholderName: this.config.cardholderName,
|
|
35
35
|
appearance: this.config.appearance,
|
|
36
36
|
strings: this.config.strings,
|
|
37
|
+
copy: this.config.copy,
|
|
38
|
+
showLabels: this.config.showLabels,
|
|
39
|
+
rowStyle: this.config.rowStyle,
|
|
40
|
+
layout: this.config.layout,
|
|
37
41
|
},
|
|
38
42
|
});
|
|
39
43
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"revealElement.js","sourceRoot":"","sources":["../src/revealElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"revealElement.js","sourceRoot":"","sources":["../src/revealElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AA6D1D;;;;GAIG;AACH,MAAM,OAAO,gBAAgB;IAI3B,YAAY,QAAgB,EAAE,MAA8B;QAC1D,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,IAAI,eAAe,CAAC,QAAQ,EAAE,EAAE,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC,CAAC;QAC3E,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE;YAC/B,IAAI,OAAO,CAAC,IAAI,KAAK,cAAc;gBAAE,MAAM,CAAC,aAAa,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YAC3E,IAAI,OAAO,CAAC,IAAI,KAAK,eAAe;gBAAE,MAAM,CAAC,QAAQ,EAAE,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC;QACpF,CAAC,CAAC,CAAC;IACL,CA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irexapp/card-reveal-web",
|
|
3
|
-
"version": "1.1.0-beta.
|
|
3
|
+
"version": "1.1.0-beta.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Reveal an issued card's PAN/expiry/CVV inside Wirex-served PCI iframes; values never reach the host page. CHD-free loader.",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -37,6 +37,6 @@
|
|
|
37
37
|
"prepublishOnly": "yarn clean && yarn build"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@wirexapp/card-sdk-core": "1.1.0-beta.
|
|
40
|
+
"@wirexapp/card-sdk-core": "1.1.0-beta.3"
|
|
41
41
|
}
|
|
42
42
|
}
|