@wix/motion-edm-autogen-p13n
Advanced tools
Comparing version 1.0.51 to 1.0.52
@@ -5,10 +5,24 @@ import { pick, omitBy, isUndefined } from 'lodash'; | ||
const p13nToCorvid = (p13nAddress) => p13nAddress | ||
? omitBy(Object.assign(Object.assign({ formatted: p13nAddress.formattedAddress, location: p13nAddress.geocode }, pick(p13nAddress, sharedFieldNames)), { streetAddress: p13nAddress.streetAddress && | ||
pick(p13nAddress.streetAddress, sharedStreetAddressFieldNames), addressLine1: p13nAddress.addressLine, addressLine2: p13nAddress.addressLine2 }), isUndefined) | ||
? omitBy({ | ||
formatted: p13nAddress.formattedAddress, | ||
location: p13nAddress.geocode, | ||
...pick(p13nAddress, sharedFieldNames), | ||
streetAddress: p13nAddress.streetAddress && | ||
pick(p13nAddress.streetAddress, sharedStreetAddressFieldNames), | ||
addressLine1: p13nAddress.addressLine, | ||
addressLine2: p13nAddress.addressLine2, | ||
}, isUndefined) | ||
: undefined; | ||
const corvidToP13n = (corvidAddress) => corvidAddress | ||
? omitBy(Object.assign(Object.assign({ formattedAddress: corvidAddress.formatted, geocode: corvidAddress.location }, pick(corvidAddress, sharedFieldNames)), { streetAddress: corvidAddress.streetAddress && | ||
pick(corvidAddress.streetAddress, sharedStreetAddressFieldNames), addressLine: corvidAddress.addressLine1, addressLine2: corvidAddress.addressLine2 }), isUndefined) | ||
? omitBy({ | ||
formattedAddress: corvidAddress.formatted, | ||
geocode: corvidAddress.location, | ||
...pick(corvidAddress, sharedFieldNames), | ||
streetAddress: corvidAddress.streetAddress && | ||
pick(corvidAddress.streetAddress, sharedStreetAddressFieldNames), | ||
addressLine: corvidAddress.addressLine1, | ||
addressLine2: corvidAddress.addressLine2, | ||
}, isUndefined) | ||
: undefined; | ||
export { p13nToCorvid, corvidToP13n }; | ||
//# sourceMappingURL=index.js.map |
@@ -33,4 +33,3 @@ import querystring from 'querystring'; | ||
const computeImageFileName = (image) => { | ||
var _a; | ||
const filename = (_a = image.altText) !== null && _a !== void 0 ? _a : DEFAULT_IMAGE_FILE_NAME; | ||
const filename = image.altText ?? DEFAULT_IMAGE_FILE_NAME; | ||
return encodeURIComponent(filename); | ||
@@ -44,5 +43,5 @@ }; | ||
? `wix:image://v1/${image.id}/${computeImageFileName(image)}#originWidth=${image.width}&originHeight=${image.height}` | ||
: image === null || image === void 0 ? void 0 : image.url; | ||
: image?.url; | ||
}; | ||
export { corvidToP13n, p13nToCorvid }; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@wix/motion-edm-autogen-p13n", | ||
"version": "1.0.51", | ||
"version": "1.0.52", | ||
"main": "dist/cjs/index.js", | ||
@@ -29,4 +29,4 @@ "module": "dist/esm/index.js", | ||
"@wix/com.wixpress.p13n.protos-common-proto": "^1.8.0", | ||
"@wix/eslint-config-yoshi": "^6.88.1", | ||
"@wix/jest-yoshi-preset": "^6.88.1", | ||
"@wix/eslint-config-yoshi": "^6.89.0", | ||
"@wix/jest-yoshi-preset": "^6.89.0", | ||
"@wix/motion-edm-autogen-test-context": "~1.0.0", | ||
@@ -37,3 +37,3 @@ "@wix/motion-runtime-test-context": "~1.0.0", | ||
"@wix/wix-test-env": "^1.0.923", | ||
"@wix/yoshi-flow-library": "^6.88.1", | ||
"@wix/yoshi-flow-library": "^6.89.0", | ||
"eslint-plugin-simple-import-sort": "^10.0.0", | ||
@@ -49,3 +49,3 @@ "husky": "~4.2.1", | ||
"@babel/runtime": "^7.0.0", | ||
"@wix/motion-edm-autogen-types": "1.0.26", | ||
"@wix/motion-edm-autogen-types": "1.0.27", | ||
"lodash": "~4.17.0" | ||
@@ -75,3 +75,3 @@ }, | ||
}, | ||
"falconPackageHash": "5f7818f0e25bdc455d01e6221c5124a81143e59a93cf17b905ec5473" | ||
"falconPackageHash": "67846316af0cd6a6bc72bd9873a5c908f4b85ea824f111e3c86d67fa" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
102597
4261740
+ Added@wix/motion-edm-autogen-types@1.0.27(transitive)
- Removed@wix/motion-edm-autogen-types@1.0.26(transitive)