@odus/checkout 1.18.0 → 1.19.1
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/checkout.es.js +241 -231
- package/dist/components/checkout/form/AddressSection.d.ts.map +1 -1
- package/dist/components/checkout/form/CardSection.d.ts.map +1 -1
- package/dist/components/checkout/form/CardUnavailableNotice.d.ts.map +1 -1
- package/dist/components/checkout/form/CardholderSection.d.ts.map +1 -1
- package/dist/components/checkout/form/Form.d.ts.map +1 -1
- package/dist/components/checkout/form/FormComponentManager.d.ts.map +1 -1
- package/dist/components/checkout/form/PhoneCountrySelector.d.ts.map +1 -1
- package/dist/components/checkout/form/PhoneNumberField.d.ts.map +1 -1
- package/dist/components/common/CountryDialCodeDropdown.d.ts.map +1 -1
- package/dist/components/common/Input.d.ts.map +1 -1
- package/dist/components/common/Select.d.ts.map +1 -1
- package/dist/core/constants/fontSize.constants.d.ts +7 -0
- package/dist/core/constants/fontSize.constants.d.ts.map +1 -0
- package/dist/core/vgs/VGSCollectService.d.ts +0 -7
- package/dist/core/vgs/VGSCollectService.d.ts.map +1 -1
- package/dist/elements/ApplePayElement.d.ts.map +1 -1
- package/dist/elements/EmailElement.d.ts.map +1 -1
- package/dist/elements/PayPalElement.d.ts.map +1 -1
- package/dist/elements/PhoneElement.d.ts.map +1 -1
- package/dist/elements/card/VgsCardAdapter.d.ts.map +1 -1
- package/dist/elements/cardElement.constants.d.ts.map +1 -1
- package/dist/elements/theme/index.d.ts.map +1 -1
- package/dist/elements.es.js +267 -267
- package/dist/factories/createCheckoutProfile.d.ts.map +1 -1
- package/dist/loader.es.js +1 -1
- package/dist/phone.js +477 -474
- package/dist/shared.js +79 -110
- package/dist/types/common/FormData.type.d.ts +0 -2
- package/dist/types/common/FormData.type.d.ts.map +1 -1
- package/dist/types/telemetry/TelemetryEvents.type.d.ts +2 -2
- package/dist/types/telemetry/TelemetryEvents.type.d.ts.map +1 -1
- package/dist/utils/dom/fontFamily.util.d.ts +23 -0
- package/dist/utils/dom/fontFamily.util.d.ts.map +1 -0
- package/dist/utils/dom/googleFontUrl.d.ts +5 -5
- package/dist/utils/dom/googleFontUrl.d.ts.map +1 -1
- package/dist/utils/dom/index.d.ts +1 -0
- package/dist/utils/dom/index.d.ts.map +1 -1
- package/dist/utils/phone/countryDialCodes.d.ts +6 -0
- package/dist/utils/phone/countryDialCodes.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare const isLocallyResolvedFamily: (family: string) => boolean;
|
|
2
|
+
/**
|
|
3
|
+
* The family names of a `font-family` value, in order, without their quotes:
|
|
4
|
+
* `"Open Sans", sans-serif` gives `['Open Sans', 'sans-serif']`.
|
|
5
|
+
*/
|
|
6
|
+
export declare const fontFamilyNames: (fontFamily: string | undefined) => string[];
|
|
7
|
+
/**
|
|
8
|
+
* One family name as a CSS string. Unquoted, a name with a token CSS reads
|
|
9
|
+
* as a number, such as "Press Start 2P", is not a valid `font-family`.
|
|
10
|
+
*/
|
|
11
|
+
export declare const quoteFontFamily: (name: string) => string;
|
|
12
|
+
/**
|
|
13
|
+
* The CSS `font-family` value for the profile's font, with `sans-serif` as
|
|
14
|
+
* the last resort.
|
|
15
|
+
*
|
|
16
|
+
* A single family keeps the form it always had (`"Roboto", sans-serif`),
|
|
17
|
+
* with any quotes the merchant wrote around it taken off first. A
|
|
18
|
+
* list is written family by family: quoting the whole of it, as the single
|
|
19
|
+
* form does, names one family called `Roboto, sans-serif` that no device
|
|
20
|
+
* has, so the merchant's font never applied.
|
|
21
|
+
*/
|
|
22
|
+
export declare const toCssFontFamily: (fontFamily: string | undefined) => string;
|
|
23
|
+
//# sourceMappingURL=fontFamily.util.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fontFamily.util.d.ts","sourceRoot":"","sources":["../../../src/utils/dom/fontFamily.util.ts"],"names":[],"mappings":"AA0CA,eAAO,MAAM,uBAAuB,GAAI,QAAQ,MAAM,KAAG,OACJ,CAAC;AAItD;;;GAGG;AACH,eAAO,MAAM,eAAe,GAAI,YAAY,MAAM,GAAG,SAAS,KAAG,MAAM,EAMnD,CAAC;AAErB;;;GAGG;AACH,eAAO,MAAM,eAAe,GAAI,MAAM,MAAM,KAAG,MACZ,CAAC;AAEpC;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,GAAI,YAAY,MAAM,GAAG,SAAS,KAAG,MAahE,CAAC"}
|
|
@@ -9,11 +9,11 @@ export declare const GOOGLE_FONTS_ORIGIN = "https://fonts.googleapis.com/";
|
|
|
9
9
|
* on the path that mounts the card fields, so the check has to happen before
|
|
10
10
|
* the request rather than on its response.
|
|
11
11
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
12
|
+
* `family=` takes one name, so a list such as `Roboto, sans-serif` asks for
|
|
13
|
+
* its first family only. The rest of the list is the merchant's fallback,
|
|
14
|
+
* which the browser resolves itself. A list led by a local family
|
|
15
|
+
* (`system-ui, Roboto`) asks for nothing, because the browser never reaches
|
|
16
|
+
* the Google font while the first one resolves.
|
|
17
17
|
*/
|
|
18
18
|
export declare const toGoogleFontFamilyParam: (fontFamily: string | undefined) => string | null;
|
|
19
19
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"googleFontUrl.d.ts","sourceRoot":"","sources":["../../../src/utils/dom/googleFontUrl.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"googleFontUrl.d.ts","sourceRoot":"","sources":["../../../src/utils/dom/googleFontUrl.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,mBAAmB,kCAAkC,CAAC;AAEnE;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,uBAAuB,GAClC,YAAY,MAAM,GAAG,SAAS,KAC7B,MAAM,GAAG,IAOX,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,GAAI,aAAa,MAAM,KAAG,MACgB,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './appendGoogleFont';
|
|
2
2
|
export * from './createSyntheticEvent.util';
|
|
3
3
|
export * from './fetchGoogleFontFace';
|
|
4
|
+
export * from './fontFamily.util';
|
|
4
5
|
export * from './googleFontUrl';
|
|
5
6
|
export * from './preconnectOrigins';
|
|
6
7
|
export * from './restoreCursorAfterFormat.util';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/dom/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iCAAiC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/dom/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iCAAiC,CAAC"}
|
|
@@ -20,4 +20,10 @@ export declare const getCountriesForDialSelector: (allowedCountries?: string[],
|
|
|
20
20
|
* Get country dial code info by country code
|
|
21
21
|
*/
|
|
22
22
|
export declare const getCountryDialCodeInfo: (countryCode: string) => CountryDialCode | null;
|
|
23
|
+
/**
|
|
24
|
+
* The phone field's starting country: the merchant's `defaultCountry` when it
|
|
25
|
+
* has a dial code, else `US`. Drop-in's form state and the field both start
|
|
26
|
+
* from it, so validation and the selector agree on an unknown code like `ZZ`.
|
|
27
|
+
*/
|
|
28
|
+
export declare const resolvePhoneDefaultCountry: (defaultCountry?: string) => string;
|
|
23
29
|
//# sourceMappingURL=countryDialCodes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"countryDialCodes.d.ts","sourceRoot":"","sources":["../../../src/utils/phone/countryDialCodes.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,YAAY,GAAI,aAAa,MAAM,KAAG,MAMlD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,GACtC,mBAAmB,MAAM,EAAE,EAC3B,SAAS,MAAM,KACd,eAAe,EA2BjB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB,GACjC,aAAa,MAAM,KAClB,eAAe,GAAG,IAapB,CAAC"}
|
|
1
|
+
{"version":3,"file":"countryDialCodes.d.ts","sourceRoot":"","sources":["../../../src/utils/phone/countryDialCodes.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,YAAY,GAAI,aAAa,MAAM,KAAG,MAMlD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,GACtC,mBAAmB,MAAM,EAAE,EAC3B,SAAS,MAAM,KACd,eAAe,EA2BjB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB,GACjC,aAAa,MAAM,KAClB,eAAe,GAAG,IAapB,CAAC;AAIF;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,GAAI,iBAAiB,MAAM,KAAG,MAGpE,CAAC"}
|