@openlettermarketing/olc-vue-sdk 1.2.0 → 1.3.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/build/index.js +142 -91
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -128696,7 +128696,7 @@ if (inBrowser) {
|
|
|
128696
128696
|
|
|
128697
128697
|
|
|
128698
128698
|
|
|
128699
|
-
;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/App.vue?vue&type=template&id=
|
|
128699
|
+
;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/App.vue?vue&type=template&id=e00aac82
|
|
128700
128700
|
var render = function render() {
|
|
128701
128701
|
var _vm = this,
|
|
128702
128702
|
_c = _vm._self._c
|
|
@@ -128706,7 +128706,7 @@ var staticRenderFns = []
|
|
|
128706
128706
|
render._withStripped = true
|
|
128707
128707
|
|
|
128708
128708
|
|
|
128709
|
-
;// CONCATENATED MODULE: ./src/App.vue?vue&type=template&id=
|
|
128709
|
+
;// CONCATENATED MODULE: ./src/App.vue?vue&type=template&id=e00aac82
|
|
128710
128710
|
|
|
128711
128711
|
// EXTERNAL MODULE: ./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js
|
|
128712
128712
|
var injectStylesIntoStyleTag = __webpack_require__(85072);
|
|
@@ -152633,6 +152633,38 @@ const $65bf2ecf319e656d$var$initialState = {
|
|
|
152633
152633
|
defaultValue: "johndoe@gmail.com"
|
|
152634
152634
|
}
|
|
152635
152635
|
],
|
|
152636
|
+
defaultSenderFields: [
|
|
152637
|
+
{
|
|
152638
|
+
value: "Sender First Name",
|
|
152639
|
+
key: "{{SPF.FIRST_NAME}}",
|
|
152640
|
+
defaultValue: "John"
|
|
152641
|
+
},
|
|
152642
|
+
{
|
|
152643
|
+
value: "Sender Last Name",
|
|
152644
|
+
key: "{{SPF.LAST_NAME}}",
|
|
152645
|
+
defaultValue: "Doe"
|
|
152646
|
+
},
|
|
152647
|
+
{
|
|
152648
|
+
value: "Sender Company Name",
|
|
152649
|
+
key: "{{SPF.COMPANY_NAME}}",
|
|
152650
|
+
defaultValue: "ABC Company, Inc."
|
|
152651
|
+
},
|
|
152652
|
+
{
|
|
152653
|
+
value: "Sender Phone Number",
|
|
152654
|
+
key: "{{SPF.PHONE_NUMBER}}",
|
|
152655
|
+
defaultValue: "(555) 278-9389"
|
|
152656
|
+
},
|
|
152657
|
+
{
|
|
152658
|
+
value: "Sender Email",
|
|
152659
|
+
key: "{{SPF.EMAIL}}",
|
|
152660
|
+
defaultValue: "johndoe@gmail.com"
|
|
152661
|
+
},
|
|
152662
|
+
{
|
|
152663
|
+
value: "Sender Website",
|
|
152664
|
+
key: "{{SPF.WEBSITE}}",
|
|
152665
|
+
defaultValue: "www.example.com"
|
|
152666
|
+
}
|
|
152667
|
+
],
|
|
152636
152668
|
products: (0, $d60d8816d76b2b02$export$92e44ea1079b9ec6),
|
|
152637
152669
|
productDetailByTemplate: [],
|
|
152638
152670
|
templates: {
|
|
@@ -152901,10 +152933,12 @@ var $ad568a7ac4136873$export$2e2bcd8739ae039 = $ad568a7ac4136873$var$store;
|
|
|
152901
152933
|
|
|
152902
152934
|
const $7ad22e5ca6c288ca$export$fa671cbd439de11d = "https://api.openletterconnect.com/api/v1/sdk";
|
|
152903
152935
|
const $7ad22e5ca6c288ca$export$9878c63741f482ec = "https://demoapi.openletterconnect.com/api/v1/sdk";
|
|
152936
|
+
const $7ad22e5ca6c288ca$export$31ebffddc71c8253 = `https://demoapi.openletterconnect.com/api/v1/download/s3/openletterconnect`;
|
|
152937
|
+
const $7ad22e5ca6c288ca$export$79361813a10e9e28 = `https://api.openletterconnect.com/api/v1/download/s3/openletterconnect`;
|
|
152904
152938
|
const $7ad22e5ca6c288ca$export$6032165a31897610 = 96;
|
|
152905
|
-
const $7ad22e5ca6c288ca$export$
|
|
152939
|
+
const $7ad22e5ca6c288ca$export$7a42bc549c2355e6 = `/assets/preview/one-barcode.png`;
|
|
152940
|
+
const $7ad22e5ca6c288ca$export$75535718f1551e4f = `/default_images/dummyGSV.png`;
|
|
152906
152941
|
const $7ad22e5ca6c288ca$export$b14103b5b94712c4 = "https://help.openletterconnect.com/getting-support/designing-your-mailers/wip-designing-mail-creatives/wip-mail-piece-design-specs";
|
|
152907
|
-
const $7ad22e5ca6c288ca$export$75535718f1551e4f = "https://api.openletterconnect.com/api/v1/download/s3/openletterconnect/default_images/dummyGSV.png";
|
|
152908
152942
|
const $7ad22e5ca6c288ca$export$3e994a540f8ee57 = [
|
|
152909
152943
|
"Postcards",
|
|
152910
152944
|
"Tri-Fold Self-Mailers",
|
|
@@ -152930,29 +152964,22 @@ const $7ad22e5ca6c288ca$export$e75e577b199ead61 = [
|
|
|
152930
152964
|
];
|
|
152931
152965
|
|
|
152932
152966
|
|
|
152933
|
-
let $717432aee8737b76$export$
|
|
152934
|
-
let $717432aee8737b76$export$e484206ee977114e = "";
|
|
152967
|
+
let $717432aee8737b76$export$cf3b58100ed4cf89 = "";
|
|
152935
152968
|
let $717432aee8737b76$export$897b44b3e27fa56d = false;
|
|
152936
152969
|
const $717432aee8737b76$export$2cdf1b96a9f86d16 = (text)=>{
|
|
152937
152970
|
navigator.clipboard.writeText(text).then(()=>{}).catch((err)=>{
|
|
152938
152971
|
console.error("Failed to copy text: ", err);
|
|
152939
152972
|
});
|
|
152940
152973
|
};
|
|
152941
|
-
const $717432aee8737b76$export$
|
|
152942
|
-
return $717432aee8737b76$export$
|
|
152974
|
+
const $717432aee8737b76$export$46af023db2483081 = ()=>{
|
|
152975
|
+
return $717432aee8737b76$export$cf3b58100ed4cf89;
|
|
152943
152976
|
};
|
|
152944
|
-
const $717432aee8737b76$export$
|
|
152945
|
-
|
|
152977
|
+
const $717432aee8737b76$export$527e3e4d00b88329 = (key)=>{
|
|
152978
|
+
$717432aee8737b76$export$cf3b58100ed4cf89 = key;
|
|
152946
152979
|
};
|
|
152947
152980
|
const $717432aee8737b76$export$d97320b3491da14 = ()=>{
|
|
152948
152981
|
return $717432aee8737b76$export$897b44b3e27fa56d;
|
|
152949
152982
|
};
|
|
152950
|
-
const $717432aee8737b76$export$9d2510767fe266f9 = (name)=>{
|
|
152951
|
-
$717432aee8737b76$export$4c3a79da664857a5 = name;
|
|
152952
|
-
};
|
|
152953
|
-
const $717432aee8737b76$export$4251d26568059eef = (password)=>{
|
|
152954
|
-
$717432aee8737b76$export$e484206ee977114e = password;
|
|
152955
|
-
};
|
|
152956
152983
|
const $717432aee8737b76$export$ba225133fb4a45c3 = (sandbox)=>{
|
|
152957
152984
|
$717432aee8737b76$export$897b44b3e27fa56d = sandbox;
|
|
152958
152985
|
};
|
|
@@ -152964,11 +152991,10 @@ const $717432aee8737b76$export$c5a6b7b1e4535d31 = (input)=>{
|
|
|
152964
152991
|
};
|
|
152965
152992
|
|
|
152966
152993
|
|
|
152967
|
-
const $f081c02ac731d950$var$base64Credentials = ()=>btoa(`${(0, $717432aee8737b76$export$8b5260d2c1269447)()}:${(0, $717432aee8737b76$export$750bdf4bac68fe69)()}`);
|
|
152968
152994
|
const $f081c02ac731d950$var$getHeaders = (additionalHeaders = {})=>({
|
|
152969
152995
|
"Content-Type": "application/json",
|
|
152970
152996
|
"Accept": "application/json",
|
|
152971
|
-
"Authorization": `
|
|
152997
|
+
"Authorization": `Bearer ${(0, $717432aee8737b76$export$46af023db2483081)()}`,
|
|
152972
152998
|
...additionalHeaders
|
|
152973
152999
|
});
|
|
152974
153000
|
const $f081c02ac731d950$var$fetchWrapper = async (endpoint, options)=>{
|
|
@@ -153283,6 +153309,7 @@ const $0b51cdcdcd2b1339$export$af7faffe10421f14 = {
|
|
|
153283
153309
|
/* eslint-disable no-useless-catch */ // Utils
|
|
153284
153310
|
|
|
153285
153311
|
|
|
153312
|
+
|
|
153286
153313
|
const $9d201cd516e32817$export$5f13a51c7a156d51 = (store, size, barcodeSrc)=>{
|
|
153287
153314
|
const page = store.pages[0];
|
|
153288
153315
|
const elements = [
|
|
@@ -154755,20 +154782,21 @@ const $ad01ab85e9f42d02$export$3c4ee5ffa62bdd4b = (title, url)=>{
|
|
|
154755
154782
|
document.body.removeChild(link);
|
|
154756
154783
|
};
|
|
154757
154784
|
const $ad01ab85e9f42d02$export$8029e38c28541a = (store, product, envelopeType)=>{
|
|
154785
|
+
const barcodeSrc = ((0, $717432aee8737b76$export$d97320b3491da14)() ? (0, $7ad22e5ca6c288ca$export$31ebffddc71c8253) : (0, $7ad22e5ca6c288ca$export$79361813a10e9e28)) + (0, $7ad22e5ca6c288ca$export$7a42bc549c2355e6);
|
|
154758
154786
|
if ($ad01ab85e9f42d02$export$c957b57e52c8dfb1[`${product.productType}-${envelopeType}`]) {
|
|
154759
|
-
if (product.productType === "Professional Letters") (0, $11132e13d1f7bacf$export$fe83566325f1e1e8)(store,
|
|
154787
|
+
if (product.productType === "Professional Letters") (0, $11132e13d1f7bacf$export$fe83566325f1e1e8)(store, barcodeSrc);
|
|
154760
154788
|
else if (product.productType === (0, $7ad22e5ca6c288ca$export$3e994a540f8ee57)[0]) (0, $58150108dfd76800$export$485ca3438dfa1819)(store, [
|
|
154761
154789
|
3.2835,
|
|
154762
154790
|
2.375
|
|
154763
|
-
],
|
|
154791
|
+
], barcodeSrc);
|
|
154764
154792
|
else if (product.productType === (0, $7ad22e5ca6c288ca$export$3e994a540f8ee57)[1]) (0, $61207d508899f18f$export$c3fe419eb223f4c8)(store, [
|
|
154765
154793
|
3.2835,
|
|
154766
154794
|
2.375
|
|
154767
|
-
],
|
|
154795
|
+
], barcodeSrc);
|
|
154768
154796
|
else if (product.productType === (0, $7ad22e5ca6c288ca$export$3e994a540f8ee57)[2]) (0, $9d201cd516e32817$export$5f13a51c7a156d51)(store, [
|
|
154769
154797
|
3.2835,
|
|
154770
154798
|
2.375
|
|
154771
|
-
],
|
|
154799
|
+
], barcodeSrc);
|
|
154772
154800
|
}
|
|
154773
154801
|
};
|
|
154774
154802
|
const $ad01ab85e9f42d02$export$464e4dcbf779d16c = (jsonData)=>{
|
|
@@ -156539,6 +156567,7 @@ const $d31b9bd88e5dcf67$var$TopNavigation = ({ store: store, createTemplateRoute
|
|
|
156539
156567
|
const product = (0, useSelector)((state)=>state.templates.product);
|
|
156540
156568
|
const dynamicFields = (0, useSelector)((state)=>state.templates.dynamicFields);
|
|
156541
156569
|
const defaultFields = (0, useSelector)((state)=>state.templates.defaultDynamicFields);
|
|
156570
|
+
const defaultSenderFields = (0, useSelector)((state)=>state.templates.defaultSenderFields);
|
|
156542
156571
|
const templateType = (0, useSelector)((state)=>state.templates.templateType);
|
|
156543
156572
|
const envelopeType = (0, useSelector)((state)=>state.templates.envelopeType);
|
|
156544
156573
|
(0, react.useEffect)(()=>{
|
|
@@ -156574,7 +156603,8 @@ const $d31b9bd88e5dcf67$var$TopNavigation = ({ store: store, createTemplateRoute
|
|
|
156574
156603
|
setDownloaingProof(true);
|
|
156575
156604
|
const fields = [
|
|
156576
156605
|
...defaultFields,
|
|
156577
|
-
...Object.values(dynamicFields)
|
|
156606
|
+
...Object.values(dynamicFields),
|
|
156607
|
+
...defaultSenderFields
|
|
156578
156608
|
];
|
|
156579
156609
|
let json = store.toJSON();
|
|
156580
156610
|
if (product?.productType === "Real Penned Letter") {
|
|
@@ -156617,7 +156647,8 @@ const $d31b9bd88e5dcf67$var$TopNavigation = ({ store: store, createTemplateRoute
|
|
|
156617
156647
|
const formData = new FormData();
|
|
156618
156648
|
const allFields = [
|
|
156619
156649
|
...defaultFields,
|
|
156620
|
-
...Object.values(dynamicFields)
|
|
156650
|
+
...Object.values(dynamicFields),
|
|
156651
|
+
...defaultSenderFields
|
|
156621
156652
|
];
|
|
156622
156653
|
let selectedFields = [];
|
|
156623
156654
|
if (templateType === "json") {
|
|
@@ -157133,7 +157164,7 @@ const $e8f6665471b594e0$var$CustomTemplateSection = {
|
|
|
157133
157164
|
fill: "var(--text-color)"
|
|
157134
157165
|
})
|
|
157135
157166
|
})),
|
|
157136
|
-
Panel: (0, es.observer)(({ store: store, platformName: platformName,
|
|
157167
|
+
Panel: (0, es.observer)(({ store: store, platformName: platformName, selectedSection: selectedSection, onGetOneTemplate: onGetOneTemplate, onGetTemplates: onGetTemplates })=>{
|
|
157137
157168
|
const dispatch = (0, useDispatch)();
|
|
157138
157169
|
const [openGalleryModal, setOpenGalleryModal] = (0, react.useState)(false);
|
|
157139
157170
|
const [templateTypes, setTemplateTypes] = (0, react.useState)();
|
|
@@ -157220,33 +157251,14 @@ const $e8f6665471b594e0$var$CustomTemplateSection = {
|
|
|
157220
157251
|
const getAllCategories = async ()=>{
|
|
157221
157252
|
const categories = await dispatch((0, $dbaee5ca78364d67$export$202033b5492f87a7));
|
|
157222
157253
|
if (categories?.status === 200) {
|
|
157223
|
-
if (
|
|
157224
|
-
const
|
|
157254
|
+
if (categories?.data?.data) {
|
|
157255
|
+
const allCategories = categories?.data?.data?.map((item)=>({
|
|
157225
157256
|
...item,
|
|
157226
|
-
label: item.title
|
|
157257
|
+
label: item.title
|
|
157227
157258
|
}));
|
|
157228
|
-
if (
|
|
157229
|
-
|
|
157230
|
-
if (normalizedDefaultCategories.length === 1) {
|
|
157231
|
-
const findCategory = fetchedCategories.find((item)=>item.label === normalizedDefaultCategories[0]);
|
|
157232
|
-
if (findCategory) {
|
|
157233
|
-
setSelectedCategory(findCategory);
|
|
157234
|
-
return;
|
|
157235
|
-
}
|
|
157236
|
-
} else if (normalizedDefaultCategories.length > 1) {
|
|
157237
|
-
const filterCategory = fetchedCategories.filter((item)=>normalizedDefaultCategories.includes(item.label));
|
|
157238
|
-
if (filterCategory.length > 0) {
|
|
157239
|
-
setSelectedCategory(filterCategory[0]);
|
|
157240
|
-
setTemplateCategories(filterCategory);
|
|
157241
|
-
return;
|
|
157242
|
-
}
|
|
157243
|
-
}
|
|
157244
|
-
}
|
|
157259
|
+
if (allCategories.length === 1) setSelectedCategory(allCategories[0]);
|
|
157260
|
+
setTemplateCategories(allCategories.filter((item)=>item.totalTemplates > 0));
|
|
157245
157261
|
}
|
|
157246
|
-
setTemplateCategories(categories?.data?.data.filter((item)=>item.totalTemplates > 0).map((item)=>({
|
|
157247
|
-
...item,
|
|
157248
|
-
label: item.title
|
|
157249
|
-
})));
|
|
157250
157262
|
}
|
|
157251
157263
|
};
|
|
157252
157264
|
const closeGalleryModal = ()=>{
|
|
@@ -157780,11 +157792,12 @@ const $d0a2370b36372b2d$var$customFieldSection = {
|
|
|
157780
157792
|
fill: "var(--text-color)"
|
|
157781
157793
|
})
|
|
157782
157794
|
})),
|
|
157783
|
-
Panel: (0, es.observer)(({ store: store, onGetCustomFields: onGetCustomFields })=>{
|
|
157795
|
+
Panel: (0, es.observer)(({ store: store, onGetCustomFields: onGetCustomFields, allowSenderFields: allowSenderFields })=>{
|
|
157784
157796
|
const [isShowDialog, setIsShowDialog] = (0, react.useState)(false);
|
|
157785
157797
|
const dispatch = (0, useDispatch)();
|
|
157786
157798
|
const customFields = (0, useSelector)((state)=>state.customFields.customFields);
|
|
157787
157799
|
const defaultDynamicFields = (0, useSelector)((state)=>state.customFields.defaultDynamicFields);
|
|
157800
|
+
const defaultSenderFields = (0, useSelector)((state)=>state.templates.defaultSenderFields);
|
|
157788
157801
|
const product = (0, useSelector)((state)=>state.templates.product);
|
|
157789
157802
|
const currentTemplateType = product?.productType;
|
|
157790
157803
|
const handleShowDialog = ()=>{
|
|
@@ -157884,7 +157897,52 @@ const $d0a2370b36372b2d$var$customFieldSection = {
|
|
|
157884
157897
|
})
|
|
157885
157898
|
})
|
|
157886
157899
|
]
|
|
157887
|
-
}, i)),
|
|
157900
|
+
}, i + "_contact")),
|
|
157901
|
+
allowSenderFields && /*#__PURE__*/ (0, jsx_runtime.jsxs)((0, jsx_runtime.Fragment), {
|
|
157902
|
+
children: [
|
|
157903
|
+
/*#__PURE__*/ (0, jsx_runtime.jsx)("div", {
|
|
157904
|
+
className: "dynamic-content__top",
|
|
157905
|
+
children: /*#__PURE__*/ (0, jsx_runtime.jsxs)("div", {
|
|
157906
|
+
children: [
|
|
157907
|
+
/*#__PURE__*/ (0, jsx_runtime.jsx)("span", {
|
|
157908
|
+
className: "title",
|
|
157909
|
+
children: "Sender Fields"
|
|
157910
|
+
}),
|
|
157911
|
+
/*#__PURE__*/ (0, jsx_runtime.jsx)((0, $10fe05b81a81fb3f$export$2e2bcd8739ae039), {
|
|
157912
|
+
fill: "var(--primary-color)",
|
|
157913
|
+
className: "sender"
|
|
157914
|
+
}),
|
|
157915
|
+
/*#__PURE__*/ (0, jsx_runtime.jsx)((0, $7d1ce187c1ab3d01$export$2e2bcd8739ae039), {
|
|
157916
|
+
anchorSelect: ".sender",
|
|
157917
|
+
place: "bottom",
|
|
157918
|
+
title: "You can add sender fields to your template."
|
|
157919
|
+
})
|
|
157920
|
+
]
|
|
157921
|
+
})
|
|
157922
|
+
}),
|
|
157923
|
+
defaultSenderFields?.map(({ key: key, value: value }, i)=>/*#__PURE__*/ (0, jsx_runtime.jsxs)("div", {
|
|
157924
|
+
style: {
|
|
157925
|
+
display: "flex",
|
|
157926
|
+
alignItems: "center"
|
|
157927
|
+
},
|
|
157928
|
+
children: [
|
|
157929
|
+
/*#__PURE__*/ (0, jsx_runtime.jsx)("span", {
|
|
157930
|
+
className: "contact-element",
|
|
157931
|
+
onClick: (event)=>handleAddElementOnScreen(event, key, "click"),
|
|
157932
|
+
children: value
|
|
157933
|
+
}),
|
|
157934
|
+
/*#__PURE__*/ (0, jsx_runtime.jsx)((0, $468b2e43c10c77f3$export$2e2bcd8739ae039), {
|
|
157935
|
+
style: $d0a2370b36372b2d$var$iconButtonStyles,
|
|
157936
|
+
onClick: ()=>copyCustomFieldText(key),
|
|
157937
|
+
backdrop: false,
|
|
157938
|
+
children: /*#__PURE__*/ (0, jsx_runtime.jsx)((0, $e06bdfe75163a118$export$2e2bcd8739ae039), {
|
|
157939
|
+
className: "copy"
|
|
157940
|
+
})
|
|
157941
|
+
})
|
|
157942
|
+
]
|
|
157943
|
+
}, i + "_sender"))
|
|
157944
|
+
]
|
|
157945
|
+
}),
|
|
157888
157946
|
/*#__PURE__*/ (0, jsx_runtime.jsx)((0, $7d1ce187c1ab3d01$export$2e2bcd8739ae039), {
|
|
157889
157947
|
anchorSelect: ".copy",
|
|
157890
157948
|
place: "bottom",
|
|
@@ -157939,7 +157997,7 @@ const $d0a2370b36372b2d$var$customFieldSection = {
|
|
|
157939
157997
|
})
|
|
157940
157998
|
})
|
|
157941
157999
|
]
|
|
157942
|
-
}, i))
|
|
158000
|
+
}, i + "_custom"))
|
|
157943
158001
|
]
|
|
157944
158002
|
})
|
|
157945
158003
|
]
|
|
@@ -157961,6 +158019,7 @@ var $d0a2370b36372b2d$export$2e2bcd8739ae039 = $d0a2370b36372b2d$var$customField
|
|
|
157961
158019
|
|
|
157962
158020
|
|
|
157963
158021
|
|
|
158022
|
+
|
|
157964
158023
|
const $6b0ed1002bdc4a9f$var$CustomAddOnIcon = ()=>{
|
|
157965
158024
|
return /*#__PURE__*/ (0, jsx_runtime.jsxs)("svg", {
|
|
157966
158025
|
width: "20px",
|
|
@@ -158129,6 +158188,7 @@ const $52be5db9307c4332$var$CustomAddOns = {
|
|
|
158129
158188
|
// we need observer to update component automatically on any store changes
|
|
158130
158189
|
Panel: (0, es.observer)(({ store: store })=>{
|
|
158131
158190
|
const dispatch = (0, useDispatch)();
|
|
158191
|
+
const googleStreetViewSrc = ((0, $717432aee8737b76$export$d97320b3491da14)() ? (0, $7ad22e5ca6c288ca$export$31ebffddc71c8253) : (0, $7ad22e5ca6c288ca$export$79361813a10e9e28)) + (0, $7ad22e5ca6c288ca$export$75535718f1551e4f);
|
|
158132
158192
|
const handleAddElementOnScreen = (event, value, type)=>{
|
|
158133
158193
|
event.preventDefault();
|
|
158134
158194
|
const currentPage = store.activePage.toJSON();
|
|
@@ -158139,7 +158199,7 @@ const $52be5db9307c4332$var$CustomAddOns = {
|
|
|
158139
158199
|
if (type === "gsv") store.activePage?.addElement({
|
|
158140
158200
|
id: `gsv-image_${store.activePage.id}`,
|
|
158141
158201
|
type: "image",
|
|
158142
|
-
src:
|
|
158202
|
+
src: googleStreetViewSrc,
|
|
158143
158203
|
width: 287,
|
|
158144
158204
|
height: 188,
|
|
158145
158205
|
contentEditable: false,
|
|
@@ -158231,7 +158291,6 @@ const $d303f0b433a1814c$var$SidePanel = (props)=>{
|
|
|
158231
158291
|
Panel: (panelProps)=>/*#__PURE__*/ (0, jsx_runtime.jsx)((0, $e8f6665471b594e0$export$2e2bcd8739ae039).Panel, {
|
|
158232
158292
|
...panelProps,
|
|
158233
158293
|
platformName: props.platformName,
|
|
158234
|
-
defaultCategory: props.defaultCategory,
|
|
158235
158294
|
onGetTemplates: props.onGetTemplates,
|
|
158236
158295
|
onGetOneTemplate: props.onGetOneTemplate,
|
|
158237
158296
|
selectedSection: props.selectedSection
|
|
@@ -158243,7 +158302,8 @@ const $d303f0b433a1814c$var$SidePanel = (props)=>{
|
|
|
158243
158302
|
...(0, $d0a2370b36372b2d$export$2e2bcd8739ae039),
|
|
158244
158303
|
Panel: (panelProps)=>/*#__PURE__*/ (0, jsx_runtime.jsx)((0, $d0a2370b36372b2d$export$2e2bcd8739ae039).Panel, {
|
|
158245
158304
|
...panelProps,
|
|
158246
|
-
onGetCustomFields: props.onGetCustomFields
|
|
158305
|
+
onGetCustomFields: props.onGetCustomFields,
|
|
158306
|
+
allowSenderFields: props.allowSenderFields
|
|
158247
158307
|
})
|
|
158248
158308
|
},
|
|
158249
158309
|
...props.currentTemplateType !== "Real Penned Letter" ? [
|
|
@@ -158267,7 +158327,7 @@ var $d303f0b433a1814c$export$2e2bcd8739ae039 = $d303f0b433a1814c$var$SidePanel;
|
|
|
158267
158327
|
|
|
158268
158328
|
|
|
158269
158329
|
(0, polotno_config/* setUploadFunc */.Ut)((0, $dbaee5ca78364d67$export$a5575dbeeffdad98));
|
|
158270
|
-
const $6248df0c26b0b2d9$var$TemplateBuilder = ({ store: store, onReturnAndNavigate: onReturnAndNavigate, platformName: platformName,
|
|
158330
|
+
const $6248df0c26b0b2d9$var$TemplateBuilder = ({ store: store, onReturnAndNavigate: onReturnAndNavigate, platformName: platformName, createTemplateRoute: createTemplateRoute, olcTemplate: olcTemplate, allowSenderFields: allowSenderFields, onGetOneTemplate: onGetOneTemplate, onGetCustomFields: onGetCustomFields, onGetTemplates: onGetTemplates, onSubmit: onSubmit })=>{
|
|
158271
158331
|
const [isStoreUpdated, setIsStoreUpdated] = (0, react.useState)(false);
|
|
158272
158332
|
const [switchTabCount, setSwitchTabCount] = (0, react.useState)(1);
|
|
158273
158333
|
const [selectedSection, setSelectedSection] = (0, react.useState)("text");
|
|
@@ -158483,7 +158543,7 @@ const $6248df0c26b0b2d9$var$TemplateBuilder = ({ store: store, onReturnAndNaviga
|
|
|
158483
158543
|
store: store,
|
|
158484
158544
|
currentTemplateType: currentTemplateType,
|
|
158485
158545
|
platformName: platformName,
|
|
158486
|
-
|
|
158546
|
+
allowSenderFields: allowSenderFields,
|
|
158487
158547
|
onGetTemplates: onGetTemplates,
|
|
158488
158548
|
onGetOneTemplate: onGetOneTemplate,
|
|
158489
158549
|
onGetCustomFields: onGetCustomFields,
|
|
@@ -158532,7 +158592,7 @@ const $edeafd00018ca857$var$initializeStore = (secretKey)=>{
|
|
|
158532
158592
|
showCredit: false
|
|
158533
158593
|
});
|
|
158534
158594
|
};
|
|
158535
|
-
const $edeafd00018ca857$var$App = ({ secretKey: secretKey,
|
|
158595
|
+
const $edeafd00018ca857$var$App = ({ secretKey: secretKey, platformName: platformName, createTemplateRoute: createTemplateRoute, templateBuilderRoute: templateBuilderRoute, olcTemplate: olcTemplate, allowSenderFields: allowSenderFields, styles: styles, onReturnAndNavigate: onReturnAndNavigate, onGetOneTemplate: onGetOneTemplate, onGetCustomFields: onGetCustomFields, onGetTemplates: onGetTemplates, onSubmit: onSubmit })=>{
|
|
158536
158596
|
const [store, setStore] = (0, react.useState)($edeafd00018ca857$var$initializeStore(secretKey));
|
|
158537
158597
|
const currentPath = window?.location?.pathname;
|
|
158538
158598
|
(0, react.useEffect)(()=>{
|
|
@@ -158557,9 +158617,9 @@ const $edeafd00018ca857$var$App = ({ secretKey: secretKey, onReturnAndNavigate:
|
|
|
158557
158617
|
/*#__PURE__*/ (0, jsx_runtime.jsx)((0, Route), {
|
|
158558
158618
|
path: createTemplateRoute || "/create-template",
|
|
158559
158619
|
element: /*#__PURE__*/ (0, jsx_runtime.jsx)((0, $dd071d7635be500b$export$2e2bcd8739ae039), {
|
|
158560
|
-
onReturnAndNavigate: onReturnAndNavigate,
|
|
158561
158620
|
createTemplateRoute: createTemplateRoute,
|
|
158562
|
-
templateBuilderRoute: templateBuilderRoute
|
|
158621
|
+
templateBuilderRoute: templateBuilderRoute,
|
|
158622
|
+
onReturnAndNavigate: onReturnAndNavigate
|
|
158563
158623
|
})
|
|
158564
158624
|
}),
|
|
158565
158625
|
/*#__PURE__*/ (0, jsx_runtime.jsx)((0, Route), {
|
|
@@ -158568,9 +158628,9 @@ const $edeafd00018ca857$var$App = ({ secretKey: secretKey, onReturnAndNavigate:
|
|
|
158568
158628
|
store: store,
|
|
158569
158629
|
olcTemplate: olcTemplate,
|
|
158570
158630
|
platformName: platformName,
|
|
158571
|
-
|
|
158572
|
-
onReturnAndNavigate: onReturnAndNavigate,
|
|
158631
|
+
allowSenderFields: allowSenderFields,
|
|
158573
158632
|
createTemplateRoute: createTemplateRoute,
|
|
158633
|
+
onReturnAndNavigate: onReturnAndNavigate,
|
|
158574
158634
|
onGetOneTemplate: onGetOneTemplate,
|
|
158575
158635
|
onGetTemplates: onGetTemplates,
|
|
158576
158636
|
onGetCustomFields: onGetCustomFields,
|
|
@@ -158591,14 +158651,12 @@ var $edeafd00018ca857$export$2e2bcd8739ae039 = $edeafd00018ca857$var$App;
|
|
|
158591
158651
|
|
|
158592
158652
|
|
|
158593
158653
|
|
|
158594
|
-
const $24075a5d702d64b3$var$TemplateBuilder = ({ container: container, secretKey: secretKey,
|
|
158654
|
+
const $24075a5d702d64b3$var$TemplateBuilder = ({ container: container, secretKey: secretKey, publicApiKey: publicApiKey, platformName: platformName, createTemplateRoute: createTemplateRoute, templateBuilderRoute: templateBuilderRoute, olcTemplate: olcTemplate, sandbox: sandbox, allowSenderFields: allowSenderFields, onReturnAndNavigate: onReturnAndNavigate, onGetOneTemplate: onGetOneTemplate, onGetTemplates: onGetTemplates, onGetCustomFields: onGetCustomFields, onSubmit: onSubmit, styles: styles })=>{
|
|
158595
158655
|
if (!container) throw new Error("Root element not found");
|
|
158596
158656
|
if (!secretKey) throw new Error("secretKey not found");
|
|
158597
|
-
if (!
|
|
158598
|
-
if (!basicAuthPassword) throw new Error("basicAuthPassword not found");
|
|
158657
|
+
if (!publicApiKey) throw new Error("publicApiKey not found");
|
|
158599
158658
|
if (sandbox) (0, $717432aee8737b76$export$ba225133fb4a45c3)(sandbox);
|
|
158600
|
-
(0, $717432aee8737b76$export$
|
|
158601
|
-
(0, $717432aee8737b76$export$4251d26568059eef)(basicAuthPassword);
|
|
158659
|
+
(0, $717432aee8737b76$export$527e3e4d00b88329)(publicApiKey);
|
|
158602
158660
|
const root = (0, client).createRoot(container);
|
|
158603
158661
|
root.render(/*#__PURE__*/ (0, jsx_runtime.jsx)((0, jsx_runtime.Fragment), {
|
|
158604
158662
|
children: /*#__PURE__*/ (0, jsx_runtime.jsx)((0, Provider_default), {
|
|
@@ -158609,9 +158667,9 @@ const $24075a5d702d64b3$var$TemplateBuilder = ({ container: container, secretKey
|
|
|
158609
158667
|
styles: styles,
|
|
158610
158668
|
olcTemplate: olcTemplate,
|
|
158611
158669
|
platformName: platformName,
|
|
158612
|
-
defaultCategory: defaultCategory,
|
|
158613
158670
|
createTemplateRoute: createTemplateRoute,
|
|
158614
158671
|
templateBuilderRoute: templateBuilderRoute,
|
|
158672
|
+
allowSenderFields: allowSenderFields,
|
|
158615
158673
|
onReturnAndNavigate: onReturnAndNavigate,
|
|
158616
158674
|
onGetOneTemplate: onGetOneTemplate,
|
|
158617
158675
|
onGetTemplates: onGetTemplates,
|
|
@@ -158624,7 +158682,7 @@ const $24075a5d702d64b3$var$TemplateBuilder = ({ container: container, secretKey
|
|
|
158624
158682
|
//@ts-ignore
|
|
158625
158683
|
return {
|
|
158626
158684
|
destroy () {
|
|
158627
|
-
console.log("
|
|
158685
|
+
console.log("React destroyed");
|
|
158628
158686
|
root.unmount();
|
|
158629
158687
|
}
|
|
158630
158688
|
};
|
|
@@ -158649,11 +158707,7 @@ var $24075a5d702d64b3$export$2e2bcd8739ae039 = $24075a5d702d64b3$var$TemplateBui
|
|
|
158649
158707
|
type: String,
|
|
158650
158708
|
required: true
|
|
158651
158709
|
},
|
|
158652
|
-
|
|
158653
|
-
type: String,
|
|
158654
|
-
required: true
|
|
158655
|
-
},
|
|
158656
|
-
basicAuthPassword: {
|
|
158710
|
+
publicApiKey: {
|
|
158657
158711
|
type: String,
|
|
158658
158712
|
required: true
|
|
158659
158713
|
},
|
|
@@ -158661,10 +158715,6 @@ var $24075a5d702d64b3$export$2e2bcd8739ae039 = $24075a5d702d64b3$var$TemplateBui
|
|
|
158661
158715
|
type: String,
|
|
158662
158716
|
required: false
|
|
158663
158717
|
},
|
|
158664
|
-
onReturnAndNavigate: {
|
|
158665
|
-
type: Function,
|
|
158666
|
-
required: false
|
|
158667
|
-
},
|
|
158668
158718
|
createTemplateRoute: {
|
|
158669
158719
|
type: String,
|
|
158670
158720
|
required: false
|
|
@@ -158681,8 +158731,12 @@ var $24075a5d702d64b3$export$2e2bcd8739ae039 = $24075a5d702d64b3$var$TemplateBui
|
|
|
158681
158731
|
type: Boolean,
|
|
158682
158732
|
required: false
|
|
158683
158733
|
},
|
|
158684
|
-
|
|
158685
|
-
type:
|
|
158734
|
+
allowSenderFields: {
|
|
158735
|
+
type: Boolean,
|
|
158736
|
+
required: false
|
|
158737
|
+
},
|
|
158738
|
+
onReturnAndNavigate: {
|
|
158739
|
+
type: Function,
|
|
158686
158740
|
required: false
|
|
158687
158741
|
},
|
|
158688
158742
|
onGetOneTemplate: {
|
|
@@ -158726,15 +158780,14 @@ var $24075a5d702d64b3$export$2e2bcd8739ae039 = $24075a5d702d64b3$var$TemplateBui
|
|
|
158726
158780
|
this.templateBuilderVueInstance = $24075a5d702d64b3$export$2e2bcd8739ae039({
|
|
158727
158781
|
container: document.getElementById(props.container) || document.getElementById('builder'),
|
|
158728
158782
|
secretKey: props.secretKey,
|
|
158729
|
-
|
|
158730
|
-
basicAuthPassword: props.basicAuthPassword,
|
|
158783
|
+
publicApiKey: props.publicApiKey,
|
|
158731
158784
|
platformName: props.platformName,
|
|
158732
158785
|
onReturnAndNavigate: props.onReturnAndNavigate,
|
|
158733
158786
|
createTemplateRoute: props.createTemplateRoute,
|
|
158734
158787
|
templateBuilderRoute: props.templateBuilderRoute,
|
|
158735
158788
|
olcTemplate: props.olcTemplate,
|
|
158736
158789
|
sandbox: props.sandbox,
|
|
158737
|
-
|
|
158790
|
+
allowSenderFields: props.allowSenderFields,
|
|
158738
158791
|
onGetOneTemplate: props.onGetOneTemplate,
|
|
158739
158792
|
onGetTemplates: props.onGetTemplates,
|
|
158740
158793
|
onGetCustomFields: props.onGetCustomFields,
|
|
@@ -158872,15 +158925,14 @@ var component = normalizeComponent(
|
|
|
158872
158925
|
const src_TemplateBuilder = ({
|
|
158873
158926
|
container,
|
|
158874
158927
|
secretKey,
|
|
158875
|
-
|
|
158876
|
-
basicAuthPassword,
|
|
158928
|
+
publicApiKey,
|
|
158877
158929
|
platformName,
|
|
158878
|
-
onReturnAndNavigate,
|
|
158879
158930
|
createTemplateRoute,
|
|
158880
158931
|
templateBuilderRoute,
|
|
158881
158932
|
olcTemplate,
|
|
158882
158933
|
sandbox,
|
|
158883
|
-
|
|
158934
|
+
allowSenderFields,
|
|
158935
|
+
onReturnAndNavigate,
|
|
158884
158936
|
onGetOneTemplate,
|
|
158885
158937
|
onGetTemplates,
|
|
158886
158938
|
onGetCustomFields,
|
|
@@ -158890,15 +158942,14 @@ const src_TemplateBuilder = ({
|
|
|
158890
158942
|
const props = {
|
|
158891
158943
|
container,
|
|
158892
158944
|
secretKey,
|
|
158893
|
-
|
|
158894
|
-
basicAuthPassword,
|
|
158945
|
+
publicApiKey,
|
|
158895
158946
|
platformName,
|
|
158896
|
-
onReturnAndNavigate,
|
|
158897
158947
|
createTemplateRoute,
|
|
158898
158948
|
templateBuilderRoute,
|
|
158899
158949
|
olcTemplate,
|
|
158900
158950
|
sandbox,
|
|
158901
|
-
|
|
158951
|
+
allowSenderFields,
|
|
158952
|
+
onReturnAndNavigate,
|
|
158902
158953
|
onGetOneTemplate,
|
|
158903
158954
|
onGetTemplates,
|
|
158904
158955
|
onGetCustomFields,
|