@myparcel-dev/pdk-checkout-js 1.7.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/CHANGELOG.md +143 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +9373 -0
- package/package.json +41 -0
- package/src/__tests__/__snapshots__/exports.spec.ts.snap +48 -0
- package/src/__tests__/exports.spec.ts +8 -0
- package/src/index.ts +1 -0
- package/tsconfig.base.json +4 -0
- package/vite.config.ts +14 -0
package/package.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@myparcel-dev/pdk-checkout-js",
|
|
3
|
+
"version": "1.7.0",
|
|
4
|
+
"repository": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"url": "https://github.com/myparcelnl/js-pdk.git",
|
|
7
|
+
"directory": "apps/checkout-js"
|
|
8
|
+
},
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"sideEffects": false,
|
|
11
|
+
"type": "module",
|
|
12
|
+
"exports": "./dist/index.js",
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "vite build",
|
|
16
|
+
"clean": "run ws:clean \"$(pwd)\"",
|
|
17
|
+
"test": "run ws:test \"$(pwd)\"",
|
|
18
|
+
"test:coverage": "run ws:test:coverage \"$(pwd)\"",
|
|
19
|
+
"test:run": "run ws:test:run \"$(pwd)\"",
|
|
20
|
+
"test:update": "run ws:test:update \"$(pwd)\""
|
|
21
|
+
},
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@myparcel-dev/pdk-checkout": "^1.7.0"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@myparcel-dev/pdk-build-vite": "1.0.0-alpha.0",
|
|
27
|
+
"typescript": "^5.2.2",
|
|
28
|
+
"vite": "^5.4.10",
|
|
29
|
+
"vitest": "^2.1.3"
|
|
30
|
+
},
|
|
31
|
+
"engines": {
|
|
32
|
+
"node": ">=20"
|
|
33
|
+
},
|
|
34
|
+
"volta": {
|
|
35
|
+
"extends": "../../package.json"
|
|
36
|
+
},
|
|
37
|
+
"publishConfig": {
|
|
38
|
+
"access": "public"
|
|
39
|
+
},
|
|
40
|
+
"deployGroup": "checkout"
|
|
41
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
|
+
|
|
3
|
+
exports[`exports > exports from index.ts 1`] = `
|
|
4
|
+
[
|
|
5
|
+
"AddressField",
|
|
6
|
+
"AddressType",
|
|
7
|
+
"DeliveryOptionsMode",
|
|
8
|
+
"EVENT_HIDE_DELIVERY_OPTIONS",
|
|
9
|
+
"EVENT_SHOW_DELIVERY_OPTIONS",
|
|
10
|
+
"EVENT_UPDATED_ADDRESS",
|
|
11
|
+
"EVENT_UPDATED_DELIVERY_OPTIONS",
|
|
12
|
+
"EVENT_UPDATE_CONFIG",
|
|
13
|
+
"EVENT_UPDATE_DELIVERY_OPTIONS",
|
|
14
|
+
"PdkDeliveryOptionsEvent",
|
|
15
|
+
"PdkEvent",
|
|
16
|
+
"PdkField",
|
|
17
|
+
"PdkUtil",
|
|
18
|
+
"SPLIT_STREET_REGEX",
|
|
19
|
+
"SeparateAddressField",
|
|
20
|
+
"StoreListener",
|
|
21
|
+
"TaxField",
|
|
22
|
+
"Util",
|
|
23
|
+
"_",
|
|
24
|
+
"createPdkCheckout",
|
|
25
|
+
"debounce",
|
|
26
|
+
"defaultGetPackageType",
|
|
27
|
+
"defaultUpdateDeliveryOptions",
|
|
28
|
+
"deliveryOptionsIsRendered",
|
|
29
|
+
"fetchCheckoutContext",
|
|
30
|
+
"getDeliveryOptionsAddress",
|
|
31
|
+
"getEnabledShippingMethods",
|
|
32
|
+
"getPackageTypeFromShippingMethod",
|
|
33
|
+
"getResolvedSettings",
|
|
34
|
+
"initializeCheckoutDeliveryOptions",
|
|
35
|
+
"initializeCheckoutSeparateAddressFields",
|
|
36
|
+
"initializeCheckoutTaxFields",
|
|
37
|
+
"shippingMethodHasDeliveryOptions",
|
|
38
|
+
"splitFullStreet",
|
|
39
|
+
"toggleDeliveryOptions",
|
|
40
|
+
"updateContext",
|
|
41
|
+
"useCheckoutStore",
|
|
42
|
+
"useDeliveryOptionsStore",
|
|
43
|
+
"useEvent",
|
|
44
|
+
"usePdkCheckout",
|
|
45
|
+
"useSettings",
|
|
46
|
+
"useUtil",
|
|
47
|
+
]
|
|
48
|
+
`;
|
package/src/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@myparcel-dev/pdk-checkout';
|
package/vite.config.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import isCi from 'is-ci';
|
|
2
|
+
import {createViteConfig} from '@myparcel-dev/pdk-build-vite';
|
|
3
|
+
import {codecovVitePlugin} from '@codecov/vite-plugin';
|
|
4
|
+
import {name} from './package.json';
|
|
5
|
+
|
|
6
|
+
export default createViteConfig({
|
|
7
|
+
plugins: [
|
|
8
|
+
codecovVitePlugin({
|
|
9
|
+
enableBundleAnalysis: isCi && process.env.CODECOV_TOKEN !== undefined,
|
|
10
|
+
bundleName: name,
|
|
11
|
+
uploadToken: process.env.CODECOV_TOKEN,
|
|
12
|
+
}),
|
|
13
|
+
],
|
|
14
|
+
});
|