@delopay/sdk 0.134.0 → 0.137.0
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/{chunk-R4MDAZWF.js → chunk-OMJ6MVD4.js} +358 -2
- package/dist/chunk-OMJ6MVD4.js.map +1 -0
- package/dist/index.cjs +375 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +529 -10
- package/dist/index.d.ts +529 -10
- package/dist/index.js +37 -1
- package/dist/internal.cjs +375 -1
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +37 -1
- package/dist/internal.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-R4MDAZWF.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -20,6 +20,16 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
|
+
AIRWALLEX_AUTOFILL_TREATMENTS: () => AIRWALLEX_AUTOFILL_TREATMENTS,
|
|
24
|
+
AIRWALLEX_CARD_LAYOUTS: () => AIRWALLEX_CARD_LAYOUTS,
|
|
25
|
+
AIRWALLEX_CARD_PRESETS: () => AIRWALLEX_CARD_PRESETS,
|
|
26
|
+
AIRWALLEX_CARD_PRESET_FALLBACK: () => AIRWALLEX_CARD_PRESET_FALLBACK,
|
|
27
|
+
AIRWALLEX_FIELD_CHROMES: () => AIRWALLEX_FIELD_CHROMES,
|
|
28
|
+
AIRWALLEX_FIELD_FONT_SIZES: () => AIRWALLEX_FIELD_FONT_SIZES,
|
|
29
|
+
AIRWALLEX_FIELD_WEIGHTS: () => AIRWALLEX_FIELD_WEIGHTS,
|
|
30
|
+
AIRWALLEX_FOCUS_RINGS: () => AIRWALLEX_FOCUS_RINGS,
|
|
31
|
+
AIRWALLEX_LABEL_STYLES: () => AIRWALLEX_LABEL_STYLES,
|
|
32
|
+
AIRWALLEX_NETWORK_MARKS: () => AIRWALLEX_NETWORK_MARKS,
|
|
23
33
|
ALL_CUSTOM_FIELD_CONDITION_SOURCES: () => ALL_CUSTOM_FIELD_CONDITION_SOURCES,
|
|
24
34
|
ALL_CUSTOM_FIELD_OPERATORS: () => ALL_CUSTOM_FIELD_OPERATORS,
|
|
25
35
|
ALL_CUSTOM_FIELD_TYPES: () => ALL_CUSTOM_FIELD_TYPES,
|
|
@@ -90,9 +100,15 @@ __export(index_exports, {
|
|
|
90
100
|
WCAG_AA_TEXT: () => WCAG_AA_TEXT,
|
|
91
101
|
WCAG_AA_UI: () => WCAG_AA_UI,
|
|
92
102
|
Webhooks: () => Webhooks,
|
|
103
|
+
airwallexCardLayout: () => airwallexCardLayout,
|
|
104
|
+
airwallexCardLayoutIsCoherent: () => airwallexCardLayoutIsCoherent,
|
|
105
|
+
airwallexCellWeight: () => airwallexCellWeight,
|
|
106
|
+
airwallexFieldFontPx: () => airwallexFieldFontPx,
|
|
107
|
+
airwallexFieldWeightValue: () => airwallexFieldWeightValue,
|
|
93
108
|
allOf: () => allOf,
|
|
94
109
|
anyOf: () => anyOf,
|
|
95
110
|
applyBrandingVariables: () => applyBrandingVariables,
|
|
111
|
+
asAirwallexCardPreset: () => asAirwallexCardPreset,
|
|
96
112
|
buildBrandingExport: () => buildBrandingExport,
|
|
97
113
|
buttonPadValue: () => buttonPadValue,
|
|
98
114
|
canonicalSectionId: () => canonicalSectionId,
|
|
@@ -156,6 +172,8 @@ __export(index_exports, {
|
|
|
156
172
|
programToTree: () => programToTree,
|
|
157
173
|
radiusValue: () => radiusValue,
|
|
158
174
|
readableInkOn: () => readableInkOn,
|
|
175
|
+
resolveAirwallexCardPreset: () => resolveAirwallexCardPreset,
|
|
176
|
+
resolveAirwallexLabelStyle: () => resolveAirwallexLabelStyle,
|
|
159
177
|
ruleMatchToTree: () => ruleMatchToTree,
|
|
160
178
|
sanitizeCustomCss: () => sanitizeCustomCss,
|
|
161
179
|
sectionLabel: () => sectionLabel,
|
|
@@ -1045,10 +1063,68 @@ var Customers = class {
|
|
|
1045
1063
|
query: toQuery(params)
|
|
1046
1064
|
});
|
|
1047
1065
|
}
|
|
1066
|
+
/**
|
|
1067
|
+
* Retrieve one customer, scoped to the authenticated dashboard user's shop
|
|
1068
|
+
* (business profile). The shop-scoped counterpart of {@link retrieve}, and
|
|
1069
|
+
* what makes a shop's own customer list clickable: the list is
|
|
1070
|
+
* `ProfileCustomerRead` while {@link retrieve} is merchant-level, so a shop
|
|
1071
|
+
* member could see a customer they could not open.
|
|
1072
|
+
*
|
|
1073
|
+
* A customer belonging to a sibling shop answers `CustomerNotFound` — the
|
|
1074
|
+
* same answer as a customer that does not exist, deliberately, so one shop
|
|
1075
|
+
* cannot enumerate another's customer ids.
|
|
1076
|
+
*
|
|
1077
|
+
* `GET /customers/profile/{customerId}`
|
|
1078
|
+
*
|
|
1079
|
+
* @param customerId - The unique customer ID.
|
|
1080
|
+
* @returns The customer, with `profile_ids` narrowed to the caller's own shop.
|
|
1081
|
+
*/
|
|
1082
|
+
async retrieveByProfile(customerId) {
|
|
1083
|
+
return this.request("GET", `/customers/profile/${encodeURIComponent(customerId)}`);
|
|
1084
|
+
}
|
|
1085
|
+
/**
|
|
1086
|
+
* Create a customer from a shop, recording that it belongs to that shop so
|
|
1087
|
+
* the shop can see the customer it just created. The shop is taken from the
|
|
1088
|
+
* credential; a caller-chosen `customer_id` is rejected.
|
|
1089
|
+
*
|
|
1090
|
+
* `POST /customers/profile`
|
|
1091
|
+
*
|
|
1092
|
+
* @param params - The customer to create.
|
|
1093
|
+
* @returns The created customer.
|
|
1094
|
+
*/
|
|
1095
|
+
async createByProfile(params) {
|
|
1096
|
+
return this.request("POST", "/customers/profile", { body: params });
|
|
1097
|
+
}
|
|
1098
|
+
/**
|
|
1099
|
+
* Update a customer from a shop, if the customer belongs to that shop.
|
|
1100
|
+
* A sibling shop's customer answers `CustomerNotFound`, as with
|
|
1101
|
+
* {@link retrieveByProfile}.
|
|
1102
|
+
*
|
|
1103
|
+
* `POST /customers/profile/{customerId}`
|
|
1104
|
+
*
|
|
1105
|
+
* @param customerId - The customer ID to update.
|
|
1106
|
+
* @param params - Fields to update.
|
|
1107
|
+
* @returns The updated customer.
|
|
1108
|
+
*/
|
|
1109
|
+
async updateByProfile(customerId, params) {
|
|
1110
|
+
return this.request("POST", `/customers/profile/${encodeURIComponent(customerId)}`, {
|
|
1111
|
+
body: params
|
|
1112
|
+
});
|
|
1113
|
+
}
|
|
1048
1114
|
/** List mandates for a customer. `GET /customers/{customerId}/mandates` */
|
|
1049
1115
|
async listMandates(customerId) {
|
|
1050
1116
|
return this.request("GET", `/customers/${encodeURIComponent(customerId)}/mandates`);
|
|
1051
1117
|
}
|
|
1118
|
+
/**
|
|
1119
|
+
* List one customer's mandates, scoped to the caller's shop. Same membership
|
|
1120
|
+
* rule as {@link retrieveByProfile}: a sibling shop's customer answers
|
|
1121
|
+
* `CustomerNotFound` before any mandate is read.
|
|
1122
|
+
*
|
|
1123
|
+
* `GET /customers/profile/{customerId}/mandates`
|
|
1124
|
+
*/
|
|
1125
|
+
async listMandatesByProfile(customerId) {
|
|
1126
|
+
return this.request("GET", `/customers/profile/${encodeURIComponent(customerId)}/mandates`);
|
|
1127
|
+
}
|
|
1052
1128
|
};
|
|
1053
1129
|
|
|
1054
1130
|
// src/resources/disputes.ts
|
|
@@ -1780,6 +1856,43 @@ var Payments = class {
|
|
|
1780
1856
|
options
|
|
1781
1857
|
);
|
|
1782
1858
|
}
|
|
1859
|
+
/**
|
|
1860
|
+
* What the payment's rail says about settling each attempt: whether the
|
|
1861
|
+
* money is still `pending` in the rail's hands, `available` in its balance
|
|
1862
|
+
* (**not** paid out), `paid_out` to a bank — with the payout's date and
|
|
1863
|
+
* reference — or came back as `payout_failed`; and, for the rest, which
|
|
1864
|
+
* kind of not-knowing applies (`unavailable`, `unknown`, `not_recorded`).
|
|
1865
|
+
* See {@link ConnectorSettlementStatus} for the seven values. The same
|
|
1866
|
+
* status for the active attempt rides on every list row and retrieve as
|
|
1867
|
+
* `connector_settlement_status`, and the list filters on it.
|
|
1868
|
+
*
|
|
1869
|
+
* Not the hosted-shop settlement API under `settlement.*`, which is host →
|
|
1870
|
+
* shop owner and manual; this is acquirer → merchant bank, per payment.
|
|
1871
|
+
*
|
|
1872
|
+
* `GET /payments/{paymentId}/settlement`
|
|
1873
|
+
*
|
|
1874
|
+
* @param paymentId - The payment intent ID.
|
|
1875
|
+
* @param options - Optional per-call extras: extra `headers`, a `timeout`
|
|
1876
|
+
* override, and an `AbortSignal`.
|
|
1877
|
+
* @returns The attempts this caller may see, oldest first, each with its
|
|
1878
|
+
* settlement status.
|
|
1879
|
+
* @throws If the payment does not exist (404), or the caller is a
|
|
1880
|
+
* profile-scoped (shop) role, who is refused rather than shown a redacted
|
|
1881
|
+
* body (403).
|
|
1882
|
+
*
|
|
1883
|
+
* @example
|
|
1884
|
+
* ```typescript
|
|
1885
|
+
* const { attempts } = await delopay.payments.settlement('pay_abc123');
|
|
1886
|
+
* for (const attempt of attempts) {
|
|
1887
|
+
* if (attempt.status === 'paid_out') {
|
|
1888
|
+
* console.log(attempt.paid_out_at, attempt.payout_reference);
|
|
1889
|
+
* }
|
|
1890
|
+
* }
|
|
1891
|
+
* ```
|
|
1892
|
+
*/
|
|
1893
|
+
async settlement(paymentId, options) {
|
|
1894
|
+
return this.request("GET", `/payments/${encodeURIComponent(paymentId)}/settlement`, options);
|
|
1895
|
+
}
|
|
1783
1896
|
/**
|
|
1784
1897
|
* Update an existing payment intent before it is confirmed.
|
|
1785
1898
|
*
|
|
@@ -1951,7 +2064,10 @@ var Payments = class {
|
|
|
1951
2064
|
/**
|
|
1952
2065
|
* List payments by filter, scoped to the caller's profile (the shop-user
|
|
1953
2066
|
* twin of `listByFilter`). The backend narrows to the profile from the
|
|
1954
|
-
* auth context, so `profile_id` / `project_id` must not be sent
|
|
2067
|
+
* auth context, so `profile_id` / `project_id` must not be sent — and
|
|
2068
|
+
* neither may `connector_settlement_status`, which this route refuses
|
|
2069
|
+
* (403): a shop-scoped viewer is not shown the settlement state, and the
|
|
2070
|
+
* type leaves the key out so it cannot be probed through `total_count`.
|
|
1955
2071
|
*
|
|
1956
2072
|
* Not to be confused with {@link Payments.listByProfile}, which is the GET
|
|
1957
2073
|
* cursor variant and rejects this body.
|
|
@@ -5389,6 +5505,120 @@ function feeProgram() {
|
|
|
5389
5505
|
return new FeeProgramBuilder();
|
|
5390
5506
|
}
|
|
5391
5507
|
|
|
5508
|
+
// src/airwallexCard.ts
|
|
5509
|
+
var AIRWALLEX_CARD_PRESETS = [
|
|
5510
|
+
"single_row",
|
|
5511
|
+
"split_fields",
|
|
5512
|
+
"split_fields_labelled",
|
|
5513
|
+
"stacked",
|
|
5514
|
+
"number_expiry_row",
|
|
5515
|
+
"compact"
|
|
5516
|
+
];
|
|
5517
|
+
var SPLIT = ["cardNumber", "expiry", "cvc"];
|
|
5518
|
+
var AIRWALLEX_CARD_LAYOUTS = {
|
|
5519
|
+
// Airwallex's combined element. One iframe, one row, and the only preset
|
|
5520
|
+
// whose insides are not ours to lay out — which is why it carries no
|
|
5521
|
+
// captions: there is nothing to caption but the row as a whole.
|
|
5522
|
+
single_row: {
|
|
5523
|
+
elements: ["card"],
|
|
5524
|
+
rows: [["card"]],
|
|
5525
|
+
labels: false,
|
|
5526
|
+
density: "default"
|
|
5527
|
+
},
|
|
5528
|
+
// The trio with placeholders carrying the meaning. Shorter than the
|
|
5529
|
+
// labelled variant and fine on a wide surface.
|
|
5530
|
+
split_fields: {
|
|
5531
|
+
elements: SPLIT,
|
|
5532
|
+
rows: [["cardNumber"], ["expiry", "cvc"]],
|
|
5533
|
+
labels: false,
|
|
5534
|
+
density: "default"
|
|
5535
|
+
},
|
|
5536
|
+
// The default. The same geometry, captioned — which is what makes it
|
|
5537
|
+
// survive a narrow embed, where a bare field row stops being self-evident.
|
|
5538
|
+
split_fields_labelled: {
|
|
5539
|
+
elements: SPLIT,
|
|
5540
|
+
rows: [["cardNumber"], ["expiry", "cvc"]],
|
|
5541
|
+
labels: true,
|
|
5542
|
+
density: "default"
|
|
5543
|
+
},
|
|
5544
|
+
// Every field full width. Expiry and CVC side by side start to crowd below
|
|
5545
|
+
// roughly 320px, and this is the layout that does not.
|
|
5546
|
+
stacked: {
|
|
5547
|
+
elements: SPLIT,
|
|
5548
|
+
rows: [["cardNumber"], ["expiry"], ["cvc"]],
|
|
5549
|
+
labels: true,
|
|
5550
|
+
density: "default"
|
|
5551
|
+
},
|
|
5552
|
+
// Two rows instead of two-plus-one: shorter than the split forms without
|
|
5553
|
+
// the ambiguity of a single combined field.
|
|
5554
|
+
//
|
|
5555
|
+
// 3:2, not an even split. A card number is nineteen characters and an expiry
|
|
5556
|
+
// is five, so halving the row clipped the number's own placeholder at 460px
|
|
5557
|
+
// — seen in the preview before this was weighted. The proposal drew it even;
|
|
5558
|
+
// the merchant-facing decision was taken on the two drawn side by side and
|
|
5559
|
+
// the weighted one was chosen, so do not "restore" the even split to match
|
|
5560
|
+
// the original mock.
|
|
5561
|
+
number_expiry_row: {
|
|
5562
|
+
elements: SPLIT,
|
|
5563
|
+
rows: [["cardNumber", "expiry"], ["cvc"]],
|
|
5564
|
+
weights: { cardNumber: 3, expiry: 2 },
|
|
5565
|
+
labels: true,
|
|
5566
|
+
density: "default"
|
|
5567
|
+
},
|
|
5568
|
+
// Split geometry at reduced density and type size, for a checkout embedded
|
|
5569
|
+
// in a page that already has its own chrome.
|
|
5570
|
+
compact: {
|
|
5571
|
+
elements: SPLIT,
|
|
5572
|
+
rows: [["cardNumber"], ["expiry", "cvc"]],
|
|
5573
|
+
labels: false,
|
|
5574
|
+
density: "compact"
|
|
5575
|
+
}
|
|
5576
|
+
};
|
|
5577
|
+
var AIRWALLEX_CARD_PRESET_FALLBACK = "split_fields_labelled";
|
|
5578
|
+
function resolveAirwallexCardPreset(fromBranding, fromConnector) {
|
|
5579
|
+
return asPreset(fromBranding) ?? asPreset(fromConnector) ?? AIRWALLEX_CARD_PRESET_FALLBACK;
|
|
5580
|
+
}
|
|
5581
|
+
function asAirwallexCardPreset(value) {
|
|
5582
|
+
return asPreset(value);
|
|
5583
|
+
}
|
|
5584
|
+
function asPreset(value) {
|
|
5585
|
+
if (typeof value !== "string") return null;
|
|
5586
|
+
const trimmed = value.trim().toLowerCase();
|
|
5587
|
+
return AIRWALLEX_CARD_PRESETS.includes(trimmed) ? trimmed : null;
|
|
5588
|
+
}
|
|
5589
|
+
function airwallexCardLayout(preset) {
|
|
5590
|
+
return AIRWALLEX_CARD_LAYOUTS[preset];
|
|
5591
|
+
}
|
|
5592
|
+
function airwallexCellWeight(layout, field) {
|
|
5593
|
+
const weight = layout.weights?.[field];
|
|
5594
|
+
return typeof weight === "number" && Number.isFinite(weight) && weight > 0 ? weight : 1;
|
|
5595
|
+
}
|
|
5596
|
+
function airwallexCardLayoutIsCoherent(layout) {
|
|
5597
|
+
const drawn = layout.rows.flat();
|
|
5598
|
+
if (drawn.length !== layout.elements.length) return false;
|
|
5599
|
+
return layout.elements.every((field) => drawn.filter((f) => f === field).length === 1);
|
|
5600
|
+
}
|
|
5601
|
+
var AIRWALLEX_LABEL_STYLES = ["above", "inline", "floating", "none"];
|
|
5602
|
+
function resolveAirwallexLabelStyle(override, layout) {
|
|
5603
|
+
if (typeof override === "string" && AIRWALLEX_LABEL_STYLES.includes(override)) {
|
|
5604
|
+
return override;
|
|
5605
|
+
}
|
|
5606
|
+
return layout.labels ? "above" : "none";
|
|
5607
|
+
}
|
|
5608
|
+
var AIRWALLEX_FIELD_CHROMES = ["outlined", "filled", "underline"];
|
|
5609
|
+
var AIRWALLEX_FOCUS_RINGS = ["none", "subtle", "strong"];
|
|
5610
|
+
var AIRWALLEX_AUTOFILL_TREATMENTS = ["system", "brand", "neutral"];
|
|
5611
|
+
var AIRWALLEX_FIELD_FONT_SIZES = ["sm", "md", "lg"];
|
|
5612
|
+
var AIRWALLEX_FIELD_WEIGHTS = ["regular", "medium", "semibold"];
|
|
5613
|
+
function airwallexFieldFontPx(size, density) {
|
|
5614
|
+
const base = size === "sm" ? 14 : size === "lg" ? 18 : 16;
|
|
5615
|
+
return density === "compact" ? Math.max(13, base - 1) : base;
|
|
5616
|
+
}
|
|
5617
|
+
function airwallexFieldWeightValue(weight) {
|
|
5618
|
+
return weight === "regular" ? 400 : weight === "semibold" ? 600 : 500;
|
|
5619
|
+
}
|
|
5620
|
+
var AIRWALLEX_NETWORK_MARKS = ["visa", "mastercard", "amex", "discover"];
|
|
5621
|
+
|
|
5392
5622
|
// src/branding.ts
|
|
5393
5623
|
function surchargeShowsLabel(labelMode, style, position) {
|
|
5394
5624
|
if (labelMode !== "labelled") return false;
|
|
@@ -5924,6 +6154,25 @@ var DEFAULT_BRANDING_BASE = {
|
|
|
5924
6154
|
paymentLayout: "tabs",
|
|
5925
6155
|
labelStyle: "above",
|
|
5926
6156
|
showPoweredBy: true,
|
|
6157
|
+
// Every one of these defaults to what the Airwallex pane already did before
|
|
6158
|
+
// the section existed, so a merchant who never opens it sees no change:
|
|
6159
|
+
// empty preset (defer to the connector account), an outlined box, 16px /
|
|
6160
|
+
// 500 type, no focus ring, the browser's own autofill highlight, no valid
|
|
6161
|
+
// tint, no marks. The single deliberate change of behaviour is not here —
|
|
6162
|
+
// it is the fallback at the END of `resolveAirwallexCardPreset`, which
|
|
6163
|
+
// moves a shop that configured NOTHING from the combined row to the
|
|
6164
|
+
// labelled split form.
|
|
6165
|
+
airwallexCardPreset: "",
|
|
6166
|
+
// Off. With this on, no buyer can pay by card on the shop.
|
|
6167
|
+
airwallexHideCard: false,
|
|
6168
|
+
airwallexFieldChrome: "outlined",
|
|
6169
|
+
airwallexLabelStyle: "",
|
|
6170
|
+
airwallexFieldFontSize: "md",
|
|
6171
|
+
airwallexFieldWeight: "medium",
|
|
6172
|
+
airwallexFocusRing: "none",
|
|
6173
|
+
airwallexAutofill: "system",
|
|
6174
|
+
airwallexValidTint: false,
|
|
6175
|
+
airwallexNetworkMarks: false,
|
|
5927
6176
|
customCss: ""
|
|
5928
6177
|
};
|
|
5929
6178
|
var DEFAULT_BRANDING = {
|
|
@@ -6033,6 +6282,10 @@ function pickEnum(value, allowed, fallback) {
|
|
|
6033
6282
|
if (typeof value !== "string") return fallback;
|
|
6034
6283
|
return allowed.includes(value) ? value : fallback;
|
|
6035
6284
|
}
|
|
6285
|
+
function pickEnumOrEmpty(value, allowed) {
|
|
6286
|
+
if (typeof value !== "string") return "";
|
|
6287
|
+
return allowed.includes(value) ? value : "";
|
|
6288
|
+
}
|
|
6036
6289
|
function parseBool(value, fallback) {
|
|
6037
6290
|
if (typeof value === "boolean") return value;
|
|
6038
6291
|
if (value === "true") return true;
|
|
@@ -6603,6 +6856,53 @@ function decodeBranding(source) {
|
|
|
6603
6856
|
),
|
|
6604
6857
|
labelStyle,
|
|
6605
6858
|
showPoweredBy: source.branding_visibility !== false,
|
|
6859
|
+
// The two that can be empty use `pickEnumOrEmpty`, not `pickEnum`: a
|
|
6860
|
+
// value this build does not know has to decode to "unset" and defer, the
|
|
6861
|
+
// same as a key that was never written. Sending it to a concrete default
|
|
6862
|
+
// instead would make an older checkout override the connector account of
|
|
6863
|
+
// a merchant who picked a preset a newer dashboard offers.
|
|
6864
|
+
airwallexCardPreset: pickEnumOrEmpty(
|
|
6865
|
+
extras["airwallexCardPreset"],
|
|
6866
|
+
AIRWALLEX_CARD_PRESETS
|
|
6867
|
+
),
|
|
6868
|
+
airwallexHideCard: parseBool(extras["airwallexHideCard"], DEFAULT_BRANDING.airwallexHideCard),
|
|
6869
|
+
airwallexFieldChrome: pickEnum(
|
|
6870
|
+
extras["airwallexFieldChrome"],
|
|
6871
|
+
AIRWALLEX_FIELD_CHROMES,
|
|
6872
|
+
DEFAULT_BRANDING.airwallexFieldChrome
|
|
6873
|
+
),
|
|
6874
|
+
airwallexLabelStyle: pickEnumOrEmpty(
|
|
6875
|
+
extras["airwallexLabelStyle"],
|
|
6876
|
+
AIRWALLEX_LABEL_STYLES
|
|
6877
|
+
),
|
|
6878
|
+
airwallexFieldFontSize: pickEnum(
|
|
6879
|
+
extras["airwallexFieldFontSize"],
|
|
6880
|
+
AIRWALLEX_FIELD_FONT_SIZES,
|
|
6881
|
+
DEFAULT_BRANDING.airwallexFieldFontSize
|
|
6882
|
+
),
|
|
6883
|
+
airwallexFieldWeight: pickEnum(
|
|
6884
|
+
extras["airwallexFieldWeight"],
|
|
6885
|
+
AIRWALLEX_FIELD_WEIGHTS,
|
|
6886
|
+
DEFAULT_BRANDING.airwallexFieldWeight
|
|
6887
|
+
),
|
|
6888
|
+
airwallexFocusRing: pickEnum(
|
|
6889
|
+
extras["airwallexFocusRing"],
|
|
6890
|
+
AIRWALLEX_FOCUS_RINGS,
|
|
6891
|
+
DEFAULT_BRANDING.airwallexFocusRing
|
|
6892
|
+
),
|
|
6893
|
+
airwallexAutofill: pickEnum(
|
|
6894
|
+
extras["airwallexAutofill"],
|
|
6895
|
+
AIRWALLEX_AUTOFILL_TREATMENTS,
|
|
6896
|
+
DEFAULT_BRANDING.airwallexAutofill
|
|
6897
|
+
),
|
|
6898
|
+
airwallexValidTint: parseBool(
|
|
6899
|
+
extras["airwallexValidTint"],
|
|
6900
|
+
DEFAULT_BRANDING.airwallexValidTint
|
|
6901
|
+
),
|
|
6902
|
+
airwallexNetworkMarks: parseBool(
|
|
6903
|
+
extras["airwallexNetworkMarks"],
|
|
6904
|
+
DEFAULT_BRANDING.airwallexNetworkMarks
|
|
6905
|
+
),
|
|
6606
6906
|
customCss: s(extras["customCss"])
|
|
6607
6907
|
};
|
|
6608
6908
|
}
|
|
@@ -6658,6 +6958,21 @@ function encodeBranding(branding, base) {
|
|
|
6658
6958
|
logoShape: branding.logoShape,
|
|
6659
6959
|
logoSize: branding.logoSize,
|
|
6660
6960
|
labelStyle: branding.labelStyle,
|
|
6961
|
+
// Written unconditionally, empty string included. The encoder REPLACES
|
|
6962
|
+
// `sdk_ui_rules.branding` wholesale, so a key it skips is a key it
|
|
6963
|
+
// deletes — and here the empty string is a real value ("no choice made"),
|
|
6964
|
+
// not an absence. Omitting it would be indistinguishable from omitting it
|
|
6965
|
+
// by accident, which is how `summaryOrder` was lost.
|
|
6966
|
+
airwallexCardPreset: branding.airwallexCardPreset,
|
|
6967
|
+
airwallexHideCard: String(branding.airwallexHideCard),
|
|
6968
|
+
airwallexFieldChrome: branding.airwallexFieldChrome,
|
|
6969
|
+
airwallexLabelStyle: branding.airwallexLabelStyle,
|
|
6970
|
+
airwallexFieldFontSize: branding.airwallexFieldFontSize,
|
|
6971
|
+
airwallexFieldWeight: branding.airwallexFieldWeight,
|
|
6972
|
+
airwallexFocusRing: branding.airwallexFocusRing,
|
|
6973
|
+
airwallexAutofill: branding.airwallexAutofill,
|
|
6974
|
+
airwallexValidTint: String(branding.airwallexValidTint),
|
|
6975
|
+
airwallexNetworkMarks: String(branding.airwallexNetworkMarks),
|
|
6661
6976
|
trustBadges: encodeBadges(branding.trustBadges),
|
|
6662
6977
|
[METHOD_SECTION_ORDER_KEY]: encodeMethodSectionOrder(branding.methodSectionOrder)
|
|
6663
6978
|
};
|
|
@@ -6885,6 +7200,47 @@ function parseImportedBranding(raw) {
|
|
|
6885
7200
|
),
|
|
6886
7201
|
labelStyle,
|
|
6887
7202
|
showPoweredBy: parseBool(root["showPoweredBy"], dflt.showPoweredBy),
|
|
7203
|
+
// An imported profile that predates this section carries none of these
|
|
7204
|
+
// and lands on the defaults — which is to say on "defer", so importing an
|
|
7205
|
+
// old export into a shop does not take that shop's connector setting
|
|
7206
|
+
// away. The one field that would be dangerous to import loosely is the
|
|
7207
|
+
// hide switch, and `parseBool` only says true for a literal `true`.
|
|
7208
|
+
airwallexCardPreset: pickEnumOrEmpty(
|
|
7209
|
+
root["airwallexCardPreset"],
|
|
7210
|
+
AIRWALLEX_CARD_PRESETS
|
|
7211
|
+
),
|
|
7212
|
+
airwallexHideCard: parseBool(root["airwallexHideCard"], dflt.airwallexHideCard),
|
|
7213
|
+
airwallexFieldChrome: pickEnum(
|
|
7214
|
+
root["airwallexFieldChrome"],
|
|
7215
|
+
AIRWALLEX_FIELD_CHROMES,
|
|
7216
|
+
dflt.airwallexFieldChrome
|
|
7217
|
+
),
|
|
7218
|
+
airwallexLabelStyle: pickEnumOrEmpty(
|
|
7219
|
+
root["airwallexLabelStyle"],
|
|
7220
|
+
AIRWALLEX_LABEL_STYLES
|
|
7221
|
+
),
|
|
7222
|
+
airwallexFieldFontSize: pickEnum(
|
|
7223
|
+
root["airwallexFieldFontSize"],
|
|
7224
|
+
AIRWALLEX_FIELD_FONT_SIZES,
|
|
7225
|
+
dflt.airwallexFieldFontSize
|
|
7226
|
+
),
|
|
7227
|
+
airwallexFieldWeight: pickEnum(
|
|
7228
|
+
root["airwallexFieldWeight"],
|
|
7229
|
+
AIRWALLEX_FIELD_WEIGHTS,
|
|
7230
|
+
dflt.airwallexFieldWeight
|
|
7231
|
+
),
|
|
7232
|
+
airwallexFocusRing: pickEnum(
|
|
7233
|
+
root["airwallexFocusRing"],
|
|
7234
|
+
AIRWALLEX_FOCUS_RINGS,
|
|
7235
|
+
dflt.airwallexFocusRing
|
|
7236
|
+
),
|
|
7237
|
+
airwallexAutofill: pickEnum(
|
|
7238
|
+
root["airwallexAutofill"],
|
|
7239
|
+
AIRWALLEX_AUTOFILL_TREATMENTS,
|
|
7240
|
+
dflt.airwallexAutofill
|
|
7241
|
+
),
|
|
7242
|
+
airwallexValidTint: parseBool(root["airwallexValidTint"], dflt.airwallexValidTint),
|
|
7243
|
+
airwallexNetworkMarks: parseBool(root["airwallexNetworkMarks"], dflt.airwallexNetworkMarks),
|
|
6888
7244
|
customCss: sStr(root["customCss"], dflt.customCss).slice(0, CUSTOM_CSS_MAX_LENGTH)
|
|
6889
7245
|
};
|
|
6890
7246
|
}
|
|
@@ -7723,6 +8079,16 @@ var decodeNativePanes = decodePanes;
|
|
|
7723
8079
|
var encodeNativePanes = encodePanes;
|
|
7724
8080
|
// Annotate the CommonJS export names for ESM import in node:
|
|
7725
8081
|
0 && (module.exports = {
|
|
8082
|
+
AIRWALLEX_AUTOFILL_TREATMENTS,
|
|
8083
|
+
AIRWALLEX_CARD_LAYOUTS,
|
|
8084
|
+
AIRWALLEX_CARD_PRESETS,
|
|
8085
|
+
AIRWALLEX_CARD_PRESET_FALLBACK,
|
|
8086
|
+
AIRWALLEX_FIELD_CHROMES,
|
|
8087
|
+
AIRWALLEX_FIELD_FONT_SIZES,
|
|
8088
|
+
AIRWALLEX_FIELD_WEIGHTS,
|
|
8089
|
+
AIRWALLEX_FOCUS_RINGS,
|
|
8090
|
+
AIRWALLEX_LABEL_STYLES,
|
|
8091
|
+
AIRWALLEX_NETWORK_MARKS,
|
|
7726
8092
|
ALL_CUSTOM_FIELD_CONDITION_SOURCES,
|
|
7727
8093
|
ALL_CUSTOM_FIELD_OPERATORS,
|
|
7728
8094
|
ALL_CUSTOM_FIELD_TYPES,
|
|
@@ -7793,9 +8159,15 @@ var encodeNativePanes = encodePanes;
|
|
|
7793
8159
|
WCAG_AA_TEXT,
|
|
7794
8160
|
WCAG_AA_UI,
|
|
7795
8161
|
Webhooks,
|
|
8162
|
+
airwallexCardLayout,
|
|
8163
|
+
airwallexCardLayoutIsCoherent,
|
|
8164
|
+
airwallexCellWeight,
|
|
8165
|
+
airwallexFieldFontPx,
|
|
8166
|
+
airwallexFieldWeightValue,
|
|
7796
8167
|
allOf,
|
|
7797
8168
|
anyOf,
|
|
7798
8169
|
applyBrandingVariables,
|
|
8170
|
+
asAirwallexCardPreset,
|
|
7799
8171
|
buildBrandingExport,
|
|
7800
8172
|
buttonPadValue,
|
|
7801
8173
|
canonicalSectionId,
|
|
@@ -7859,6 +8231,8 @@ var encodeNativePanes = encodePanes;
|
|
|
7859
8231
|
programToTree,
|
|
7860
8232
|
radiusValue,
|
|
7861
8233
|
readableInkOn,
|
|
8234
|
+
resolveAirwallexCardPreset,
|
|
8235
|
+
resolveAirwallexLabelStyle,
|
|
7862
8236
|
ruleMatchToTree,
|
|
7863
8237
|
sanitizeCustomCss,
|
|
7864
8238
|
sectionLabel,
|