@odus/checkout 1.14.9 → 1.16.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/elements/BaseElement.d.ts +3 -0
- package/dist/elements/BaseElement.d.ts.map +1 -1
- package/dist/elements/CardElement.d.ts.map +1 -1
- package/dist/elements.es.js +86 -70
- package/dist/loader/loadOdus.d.ts +63 -0
- package/dist/loader/loadOdus.d.ts.map +1 -0
- package/dist/loader.d.ts +3 -0
- package/dist/loader.d.ts.map +1 -0
- package/dist/phone.js +1 -1
- package/dist/services/telemetry/Telemetry.service.d.ts +8 -0
- package/dist/services/telemetry/Telemetry.service.d.ts.map +1 -1
- package/dist/shared.js +227 -222
- package/dist/utils/dom/adoptStyles.util.d.ts +24 -0
- package/dist/utils/dom/adoptStyles.util.d.ts.map +1 -0
- package/package.json +22 -3
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface AdoptedStyles {
|
|
2
|
+
/** Replaces the CSS in place, keeping the sheet's position. */
|
|
3
|
+
update(css: string): void;
|
|
4
|
+
/** Removes the sheet from the root it was adopted into. */
|
|
5
|
+
remove(): void;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Styles the tree `host` belongs to without an inline `<style>` element.
|
|
9
|
+
*
|
|
10
|
+
* A merchant whose Content Security Policy has no `'unsafe-inline'` in
|
|
11
|
+
* `style-src` blocks every `<style>` element the SDK writes, and the elements
|
|
12
|
+
* render with browser defaults. A constructed stylesheet in
|
|
13
|
+
* `adoptedStyleSheets` is a CSSOM write, which the same policy allows (#6680).
|
|
14
|
+
*
|
|
15
|
+
* The sheet goes into the root `host` sits in — its own shadow root, or the
|
|
16
|
+
* document or merchant shadow root that contains it. Where that root cannot
|
|
17
|
+
* adopt a sheet, a `<style>` element appended to `fallbackParent` is used
|
|
18
|
+
* instead, which is what every browser got before.
|
|
19
|
+
*
|
|
20
|
+
* A shadow root drops its adopted sheets when its host moves to another
|
|
21
|
+
* document, so the host must already belong to the document it is mounted in.
|
|
22
|
+
*/
|
|
23
|
+
export declare const adoptStyles: (host: Node, css: string, fallbackParent: Node) => AdoptedStyles;
|
|
24
|
+
//# sourceMappingURL=adoptStyles.util.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adoptStyles.util.d.ts","sourceRoot":"","sources":["../../../src/utils/dom/adoptStyles.util.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,+DAA+D;IAC/D,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,2DAA2D;IAC3D,MAAM,IAAI,IAAI,CAAC;CAChB;AA4BD;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,WAAW,GACtB,MAAM,IAAI,EACV,KAAK,MAAM,EACX,gBAAgB,IAAI,KACnB,aAiCF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@odus/checkout",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.16.1",
|
|
4
4
|
"displayName": "ODUS Checkout SDK",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"odus",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
},
|
|
44
44
|
"test": {
|
|
45
45
|
"cache": true,
|
|
46
|
-
"// inputs": "`GITHUB_ACTIONS` is an input because vitest.config.ts enables coverage only when it is set. Without it a local run and a CI run hash identically, so Nx could replay a cached result carrying no coverage report and the ratchet in
|
|
46
|
+
"// inputs": "`GITHUB_ACTIONS` is an input because vitest.config.ts enables coverage only when it is set. Without it a local run and a CI run hash identically, so Nx could replay a cached result carrying no coverage report and the ratchet in quality.yaml would find no coverage-summary.json — see #4390.",
|
|
47
47
|
"inputs": [
|
|
48
48
|
"default",
|
|
49
49
|
"^production",
|
|
@@ -117,6 +117,25 @@
|
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
},
|
|
120
|
+
"build:runtime": {
|
|
121
|
+
"// what": "The runtime js.odus.com serves (#6669): a classic script per integration under dist/checkout-runtime/r/<version>/, uploaded by .github/workflows/checkout-npm.yaml before npm publish. Never part of the npm package.",
|
|
122
|
+
"cache": true,
|
|
123
|
+
"dependsOn": [
|
|
124
|
+
"^build"
|
|
125
|
+
],
|
|
126
|
+
"// inputs": "The same as `build`: the runtime bundles the same source and dependencies. No `externalDependencies` entry, so the target hashes every external dependency, as run-commands does by default: it bundles libphonenumber-js and the rest, not only the tools that build it.",
|
|
127
|
+
"inputs": [
|
|
128
|
+
"production",
|
|
129
|
+
"^production"
|
|
130
|
+
],
|
|
131
|
+
"outputs": [
|
|
132
|
+
"{workspaceRoot}/dist/checkout-runtime"
|
|
133
|
+
],
|
|
134
|
+
"executor": "nx:run-commands",
|
|
135
|
+
"options": {
|
|
136
|
+
"command": "node libs/checkout/scripts/runtime/build.ts"
|
|
137
|
+
}
|
|
138
|
+
},
|
|
120
139
|
"typecheck": {
|
|
121
140
|
"executor": "nx:run-commands",
|
|
122
141
|
"dependsOn": [
|
|
@@ -132,6 +151,6 @@
|
|
|
132
151
|
"dependencies": {
|
|
133
152
|
"@types/applepayjs": "^14.0.9",
|
|
134
153
|
"@vgs/collect-js": "^0.8.0",
|
|
135
|
-
"libphonenumber-js": "^1.13.
|
|
154
|
+
"libphonenumber-js": "^1.13.15"
|
|
136
155
|
}
|
|
137
156
|
}
|