@openlettermarketing/olc-vue-sdk 0.0.12 → 0.0.13
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 +94 -89
- package/package.json +1 -1
- package/build/index.js.map +0 -1
package/build/index.js
CHANGED
|
@@ -128703,7 +128703,7 @@ if (inBrowser) {
|
|
|
128703
128703
|
|
|
128704
128704
|
|
|
128705
128705
|
|
|
128706
|
-
;// 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=
|
|
128706
|
+
;// 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=df563f68
|
|
128707
128707
|
var render = function render() {
|
|
128708
128708
|
var _vm = this,
|
|
128709
128709
|
_c = _vm._self._c
|
|
@@ -128713,7 +128713,7 @@ var staticRenderFns = []
|
|
|
128713
128713
|
render._withStripped = true
|
|
128714
128714
|
|
|
128715
128715
|
|
|
128716
|
-
;// CONCATENATED MODULE: ./src/App.vue?vue&type=template&id=
|
|
128716
|
+
;// CONCATENATED MODULE: ./src/App.vue?vue&type=template&id=df563f68
|
|
128717
128717
|
|
|
128718
128718
|
// EXTERNAL MODULE: ./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js
|
|
128719
128719
|
var injectStylesIntoStyleTag = __webpack_require__(85072);
|
|
@@ -152908,7 +152908,7 @@ const $7ad22e5ca6c288ca$export$3e994a540f8ee57 = [
|
|
|
152908
152908
|
"Tri-Fold Self-Mailers",
|
|
152909
152909
|
"Bi-Fold Self-Mailers"
|
|
152910
152910
|
];
|
|
152911
|
-
const $7ad22e5ca6c288ca$export$
|
|
152911
|
+
const $7ad22e5ca6c288ca$export$683d22caccc9d465 = [
|
|
152912
152912
|
{
|
|
152913
152913
|
id: "1",
|
|
152914
152914
|
label: "My Templates"
|
|
@@ -152916,10 +152916,6 @@ const $7ad22e5ca6c288ca$export$d30c048b3f9a13c1 = [
|
|
|
152916
152916
|
{
|
|
152917
152917
|
id: "2",
|
|
152918
152918
|
label: "Team Templates"
|
|
152919
|
-
},
|
|
152920
|
-
{
|
|
152921
|
-
id: "3",
|
|
152922
|
-
label: "OLC Templates"
|
|
152923
152919
|
}
|
|
152924
152920
|
];
|
|
152925
152921
|
const $7ad22e5ca6c288ca$export$e75e577b199ead61 = [
|
|
@@ -153044,28 +153040,9 @@ const $77d971be1e6bcd7c$export$1d2f21e549771e67 = async (endpoint, params)=>{
|
|
|
153044
153040
|
return error.response;
|
|
153045
153041
|
}
|
|
153046
153042
|
};
|
|
153047
|
-
|
|
153048
|
-
* Creates a template using the provided data.
|
|
153049
|
-
*
|
|
153050
|
-
* @param {object} data - The data needed to create the template.
|
|
153051
|
-
* @returns {Promise<object>} - A promise that resolves to the response from the successful request or the error response if an error occurs.
|
|
153052
|
-
*/ const $dbaee5ca78364d67$export$7b7ae612b60e1630 = async (data)=>{
|
|
153053
|
-
try {
|
|
153054
|
-
const response = await (0, $77d971be1e6bcd7c$export$299ba2dee77727e9)("/templates", data);
|
|
153055
|
-
return response;
|
|
153056
|
-
} catch (error) {
|
|
153057
|
-
return error.response;
|
|
153058
|
-
}
|
|
153059
|
-
};
|
|
153060
|
-
/**
|
|
153061
|
-
* Update a template using the provided data.
|
|
153062
|
-
*
|
|
153063
|
-
* @param {number} id - The ID of the template to update.
|
|
153064
|
-
* @param {object} data - The data needed to create the template.
|
|
153065
|
-
* @returns {Promise<object>} - A promise that resolves to the response from the successful request or the error response if an error occurs.
|
|
153066
|
-
*/ const $dbaee5ca78364d67$export$efe36ac11163df30 = async (id, data)=>{
|
|
153043
|
+
const $dbaee5ca78364d67$export$99fb2aa3c6b824c3 = async (payload)=>{
|
|
153067
153044
|
try {
|
|
153068
|
-
const response = await (0, $77d971be1e6bcd7c$export$
|
|
153045
|
+
const response = await (0, $77d971be1e6bcd7c$export$299ba2dee77727e9)("/templates/by-tab", payload);
|
|
153069
153046
|
return response;
|
|
153070
153047
|
} catch (error) {
|
|
153071
153048
|
return error.response;
|
|
@@ -155635,7 +155612,7 @@ const $dd071d7635be500b$var$Images = {
|
|
|
155635
155612
|
fill: "var(--svg-color)"
|
|
155636
155613
|
})
|
|
155637
155614
|
};
|
|
155638
|
-
const $dd071d7635be500b$var$CreateTemplate = ({
|
|
155615
|
+
const $dd071d7635be500b$var$CreateTemplate = ({ onReturnAndNavigate: onReturnAndNavigate, createTemplateRoute: createTemplateRoute })=>{
|
|
155639
155616
|
const [isError, setIsError] = (0, react.useState)(false);
|
|
155640
155617
|
const [envelopeType, setEnvelopeType] = (0, react.useState)([]);
|
|
155641
155618
|
const title = (0, useSelector)((state)=>state.templates.title);
|
|
@@ -155875,7 +155852,7 @@ const $dd071d7635be500b$var$CreateTemplate = ({ returnRoute: returnRoute, create
|
|
|
155875
155852
|
...$dd071d7635be500b$var$footerButtonStyles,
|
|
155876
155853
|
border: "0.5px solid var(--border-color)"
|
|
155877
155854
|
},
|
|
155878
|
-
onClick: ()=>
|
|
155855
|
+
onClick: ()=>onReturnAndNavigate ? onReturnAndNavigate() : navigate(createTemplateRoute || "/create-template"),
|
|
155879
155856
|
children: (0, $0b51cdcdcd2b1339$export$af7faffe10421f14).TEMPLATE.CREATE.CANCEL_BUTTON
|
|
155880
155857
|
}),
|
|
155881
155858
|
/*#__PURE__*/ (0, jsx_runtime.jsx)((0, $468b2e43c10c77f3$export$2e2bcd8739ae039), {
|
|
@@ -156029,7 +156006,7 @@ const $14dc1102dd22ee0f$export$fac40f04596fc189 = (store)=>{
|
|
|
156029
156006
|
alwaysOnTop: true,
|
|
156030
156007
|
showInExport: true,
|
|
156031
156008
|
x: 165.49999999499846,
|
|
156032
|
-
y:
|
|
156009
|
+
y: 575.7346179851188,
|
|
156033
156010
|
width: 335,
|
|
156034
156011
|
height: 75,
|
|
156035
156012
|
rotation: 0,
|
|
@@ -156456,7 +156433,7 @@ const $d31b9bd88e5dcf67$var$progressStyles = {
|
|
|
156456
156433
|
height: "20px",
|
|
156457
156434
|
border: "2px solid var(--primary-color)"
|
|
156458
156435
|
};
|
|
156459
|
-
const $d31b9bd88e5dcf67$var$TopNavigation = ({ store: store,
|
|
156436
|
+
const $d31b9bd88e5dcf67$var$TopNavigation = ({ store: store, onReturnAndNavigate: onReturnAndNavigate, createTemplateRoute: createTemplateRoute, isStoreUpdated: isStoreUpdated, onSubmit: onSubmit })=>{
|
|
156460
156437
|
const [showNavigateDialog, setShowNavigateDialog] = (0, react.useState)(false);
|
|
156461
156438
|
const [isShowModel, setIsShowModel] = (0, react.useState)({
|
|
156462
156439
|
open: false,
|
|
@@ -156493,12 +156470,12 @@ const $d31b9bd88e5dcf67$var$TopNavigation = ({ store: store, returnRoute: return
|
|
|
156493
156470
|
};
|
|
156494
156471
|
const handleBackPress = ()=>{
|
|
156495
156472
|
if (isStoreUpdated) setShowNavigateDialog(!showNavigateDialog);
|
|
156496
|
-
else handleNavigation(
|
|
156473
|
+
else handleNavigation(createTemplateRoute || "/create-template");
|
|
156497
156474
|
};
|
|
156498
156475
|
const handleNavigation = async (route = "/")=>{
|
|
156499
156476
|
handleClearFilters();
|
|
156500
156477
|
if (templateType === "json" && product?.productType !== "Real Penned Letter") await store.history.clear();
|
|
156501
|
-
navigate(route);
|
|
156478
|
+
onReturnAndNavigate ? onReturnAndNavigate() : navigate(route);
|
|
156502
156479
|
};
|
|
156503
156480
|
const handleClearFilters = ()=>dispatch((0, $dbaee5ca78364d67$export$df7b8ffccf8fe273)());
|
|
156504
156481
|
const handleViewProofWithLamda = async ()=>{
|
|
@@ -156598,8 +156575,8 @@ const $d31b9bd88e5dcf67$var$TopNavigation = ({ store: store, returnRoute: return
|
|
|
156598
156575
|
}));
|
|
156599
156576
|
formData.append("title", title);
|
|
156600
156577
|
formData.append("productId", product?.id);
|
|
156601
|
-
formData.append("fields", JSON.stringify(selectedFields));
|
|
156602
|
-
formData.append("envelopeType", envelopeType);
|
|
156578
|
+
selectedFields.length ? formData.append("fields", JSON.stringify(selectedFields)) : undefined;
|
|
156579
|
+
envelopeType.length ? formData.append("envelopeType", envelopeType) : undefined;
|
|
156603
156580
|
if (onSubmit) {
|
|
156604
156581
|
const saveTemplate = await onSubmit(formData);
|
|
156605
156582
|
if (saveTemplate) {
|
|
@@ -156632,7 +156609,7 @@ const $d31b9bd88e5dcf67$var$TopNavigation = ({ store: store, returnRoute: return
|
|
|
156632
156609
|
showNavigateDialog && /*#__PURE__*/ (0, jsx_runtime.jsx)((0, $b3fd558411fcaf23$export$2e2bcd8739ae039), {
|
|
156633
156610
|
open: showNavigateDialog,
|
|
156634
156611
|
handleClose: ()=>setShowNavigateDialog(false),
|
|
156635
|
-
handleNavigateAction: ()=>handleNavigation(
|
|
156612
|
+
handleNavigateAction: ()=>handleNavigation(createTemplateRoute || "/create-template")
|
|
156636
156613
|
}),
|
|
156637
156614
|
isShowModel?.open && isShowModel?.model === "edit" && /*#__PURE__*/ (0, jsx_runtime.jsx)((0, $706ecd46c5fca617$export$2e2bcd8739ae039), {
|
|
156638
156615
|
open: isShowModel?.open,
|
|
@@ -156815,9 +156792,10 @@ const $c6f5440378b96420$var$customTemplateSection = {
|
|
|
156815
156792
|
fill: "var(--text-color)"
|
|
156816
156793
|
})
|
|
156817
156794
|
})),
|
|
156818
|
-
Panel: (0, es.observer)(({ store: store, onGetOneTemplate: onGetOneTemplate, onGetTemplates: onGetTemplates })=>{
|
|
156795
|
+
Panel: (0, es.observer)(({ store: store, platformName: platformName, onGetOneTemplate: onGetOneTemplate, onGetTemplates: onGetTemplates })=>{
|
|
156819
156796
|
const dispatch = (0, useDispatch)();
|
|
156820
|
-
const [
|
|
156797
|
+
const [templateTypes, setTemplateTypes] = (0, react.useState)();
|
|
156798
|
+
const [currentTemplateType, setCurrentTemplateType] = (0, react.useState)();
|
|
156821
156799
|
const [selectedCategory, setSelectedCategory] = (0, react.useState)(null);
|
|
156822
156800
|
const [selectedRecord, setSelectedRecord] = (0, react.useState)(null);
|
|
156823
156801
|
const [templateCategories, setTemplateCategories] = (0, react.useState)([]);
|
|
@@ -156850,42 +156828,41 @@ const $c6f5440378b96420$var$customTemplateSection = {
|
|
|
156850
156828
|
};
|
|
156851
156829
|
const getTemplatesByTab = async (page = 1)=>{
|
|
156852
156830
|
const payload = {
|
|
156853
|
-
tab: currentTemplateTypeRef.current?.id === "1" ? "my-templates" : currentTemplateTypeRef.current?.id === "2" ? "team-templates" : "
|
|
156831
|
+
tab: currentTemplateTypeRef.current?.id === "1" ? "my-templates" : currentTemplateTypeRef.current?.id === "2" ? "team-templates" : platformName ? `${platformName} Templates` : "OLC Templates",
|
|
156854
156832
|
page: page,
|
|
156855
156833
|
pageSize: 10,
|
|
156856
156834
|
productId: product?.id
|
|
156857
156835
|
};
|
|
156858
156836
|
searchRef.current.length ? payload.search = searchRef.current : undefined;
|
|
156859
156837
|
currentTemplateTypeRef.current?.id === "3" ? payload.categoryIds = selectedCategory?.id.split(",") : undefined;
|
|
156860
|
-
|
|
156861
|
-
|
|
156862
|
-
|
|
156863
|
-
|
|
156864
|
-
|
|
156865
|
-
|
|
156866
|
-
|
|
156867
|
-
|
|
156868
|
-
|
|
156869
|
-
|
|
156870
|
-
|
|
156871
|
-
|
|
156872
|
-
|
|
156873
|
-
|
|
156874
|
-
|
|
156875
|
-
|
|
156876
|
-
|
|
156877
|
-
|
|
156878
|
-
|
|
156879
|
-
|
|
156880
|
-
|
|
156881
|
-
|
|
156882
|
-
}
|
|
156883
|
-
setPagination({
|
|
156884
|
-
count: templates.count,
|
|
156885
|
-
currentPage: templates.currentPage,
|
|
156886
|
-
perPage: templates.perPage
|
|
156887
|
-
});
|
|
156838
|
+
const isCustomTemplateType = currentTemplateTypeRef.current?.id === "1" || currentTemplateTypeRef.current?.id === "2";
|
|
156839
|
+
const templates = isCustomTemplateType && onGetTemplates ? await onGetTemplates(payload) : await (0, $dbaee5ca78364d67$export$99fb2aa3c6b824c3)(payload);
|
|
156840
|
+
if (templates?.rows) {
|
|
156841
|
+
const newTemplates = templates.rows;
|
|
156842
|
+
if (currentTemplateTypeRef.current?.id === "1") {
|
|
156843
|
+
if (templates.currentPage === 1) setMyTemplates(newTemplates);
|
|
156844
|
+
else setMyTemplates((prevTemplates)=>[
|
|
156845
|
+
...prevTemplates,
|
|
156846
|
+
...newTemplates
|
|
156847
|
+
]);
|
|
156848
|
+
} else if (currentTemplateTypeRef.current?.id === "2") {
|
|
156849
|
+
if (templates.currentPage === 1) setTeamTemplates(newTemplates);
|
|
156850
|
+
else setTeamTemplates((prevTemplates)=>[
|
|
156851
|
+
...prevTemplates,
|
|
156852
|
+
...newTemplates
|
|
156853
|
+
]);
|
|
156854
|
+
} else if (currentTemplateTypeRef.current?.id === "3") {
|
|
156855
|
+
if (templates.currentPage === 1) setOlcTemplates(newTemplates);
|
|
156856
|
+
else setOlcTemplates((prevTemplates)=>[
|
|
156857
|
+
...prevTemplates,
|
|
156858
|
+
...newTemplates
|
|
156859
|
+
]);
|
|
156888
156860
|
}
|
|
156861
|
+
setPagination({
|
|
156862
|
+
count: templates.count,
|
|
156863
|
+
currentPage: templates.currentPage,
|
|
156864
|
+
perPage: templates.perPage
|
|
156865
|
+
});
|
|
156889
156866
|
}
|
|
156890
156867
|
};
|
|
156891
156868
|
const getAllCategories = async ()=>{
|
|
@@ -157001,6 +156978,14 @@ const $c6f5440378b96420$var$customTemplateSection = {
|
|
|
157001
156978
|
(0, $ad01ab85e9f42d02$export$8029e38c28541a)(store, product, envelopeType);
|
|
157002
156979
|
handleDialogChange("");
|
|
157003
156980
|
};
|
|
156981
|
+
const handleScroll = ()=>{
|
|
156982
|
+
const div = document.querySelector(".polotno-panel-container");
|
|
156983
|
+
if (div) {
|
|
156984
|
+
const isAtBottom = div.scrollTop + div.clientHeight >= div.scrollHeight;
|
|
156985
|
+
const isNeedToLoadMore = paginationRef.current.currentPage * paginationRef.current.perPage < paginationRef.current.count;
|
|
156986
|
+
if (isAtBottom && !templatesPagination.loading && isNeedToLoadMore) handleLoadAllTemplate(true);
|
|
156987
|
+
}
|
|
156988
|
+
};
|
|
157004
156989
|
(0, react.useEffect)(()=>{
|
|
157005
156990
|
if (templateLoading !== null && templateLoading === false) {
|
|
157006
156991
|
handleDialogChange("");
|
|
@@ -157039,25 +157024,34 @@ const $c6f5440378b96420$var$customTemplateSection = {
|
|
|
157039
157024
|
pagination
|
|
157040
157025
|
]);
|
|
157041
157026
|
(0, react.useEffect)(()=>{
|
|
157027
|
+
const newTemplateType = {
|
|
157028
|
+
id: "3",
|
|
157029
|
+
label: platformName ? `${platformName} Templates` : "OLC Templates"
|
|
157030
|
+
};
|
|
157031
|
+
if (onGetTemplates) //@ts-ignore
|
|
157032
|
+
setTemplateTypes([
|
|
157033
|
+
...(0, $7ad22e5ca6c288ca$export$683d22caccc9d465),
|
|
157034
|
+
newTemplateType
|
|
157035
|
+
]);
|
|
157036
|
+
else setTemplateTypes([
|
|
157037
|
+
newTemplateType
|
|
157038
|
+
]);
|
|
157042
157039
|
getAllCategories();
|
|
157043
157040
|
return ()=>{
|
|
157044
157041
|
dispatch((0, $dbaee5ca78364d67$export$1e6ea60acfeb7da4)());
|
|
157045
157042
|
};
|
|
157046
157043
|
}, []);
|
|
157044
|
+
(0, react.useEffect)(()=>{
|
|
157045
|
+
if (templateTypes) setCurrentTemplateType(templateTypes[0]);
|
|
157046
|
+
}, [
|
|
157047
|
+
templateTypes
|
|
157048
|
+
]);
|
|
157047
157049
|
(0, react.useEffect)(()=>{
|
|
157048
157050
|
getTemplatesByTab();
|
|
157049
157051
|
}, [
|
|
157050
157052
|
currentTemplateType,
|
|
157051
157053
|
selectedCategory
|
|
157052
157054
|
]);
|
|
157053
|
-
const handleScroll = ()=>{
|
|
157054
|
-
const div = document.querySelector(".polotno-panel-container");
|
|
157055
|
-
if (div) {
|
|
157056
|
-
const isAtBottom = div.scrollTop + div.clientHeight >= div.scrollHeight;
|
|
157057
|
-
const isNeedToLoadMore = paginationRef.current.currentPage * paginationRef.current.perPage < paginationRef.current.count;
|
|
157058
|
-
if (isAtBottom && !templatesPagination.loading && isNeedToLoadMore) handleLoadAllTemplate(true);
|
|
157059
|
-
}
|
|
157060
|
-
};
|
|
157061
157055
|
(0, react.useEffect)(()=>{
|
|
157062
157056
|
const div = document.querySelector(".polotno-panel-container");
|
|
157063
157057
|
if (div) {
|
|
@@ -157108,7 +157102,7 @@ const $c6f5440378b96420$var$customTemplateSection = {
|
|
|
157108
157102
|
},
|
|
157109
157103
|
children: /*#__PURE__*/ (0, jsx_runtime.jsx)((0, $3f4ef87f7a4a530a$export$2e2bcd8739ae039), {
|
|
157110
157104
|
placeholder: "Template Types",
|
|
157111
|
-
options:
|
|
157105
|
+
options: templateTypes,
|
|
157112
157106
|
setSelectedValue: setCurrentTemplateType,
|
|
157113
157107
|
selectedValue: currentTemplateType,
|
|
157114
157108
|
builderSelect: true,
|
|
@@ -157550,11 +157544,12 @@ const $d303f0b433a1814c$var$SidePanel = (props)=>{
|
|
|
157550
157544
|
children: /*#__PURE__*/ (0, jsx_runtime.jsx)((0, side_panel.SidePanel), {
|
|
157551
157545
|
store: props.store,
|
|
157552
157546
|
sections: [
|
|
157553
|
-
...props.currentTemplateType !== "Real Penned Letter"
|
|
157547
|
+
...props.currentTemplateType !== "Real Penned Letter" ? [
|
|
157554
157548
|
{
|
|
157555
157549
|
...(0, $c6f5440378b96420$export$2e2bcd8739ae039),
|
|
157556
157550
|
Panel: (panelProps)=>/*#__PURE__*/ (0, jsx_runtime.jsx)((0, $c6f5440378b96420$export$2e2bcd8739ae039).Panel, {
|
|
157557
157551
|
...panelProps,
|
|
157552
|
+
platformName: props.platformName,
|
|
157558
157553
|
onGetTemplates: props.onGetTemplates,
|
|
157559
157554
|
onGetOneTemplate: props.onGetOneTemplate
|
|
157560
157555
|
})
|
|
@@ -157581,7 +157576,7 @@ var $d303f0b433a1814c$export$2e2bcd8739ae039 = $d303f0b433a1814c$var$SidePanel;
|
|
|
157581
157576
|
|
|
157582
157577
|
|
|
157583
157578
|
(0, polotno_config/* setUploadFunc */.Ut)((0, $dbaee5ca78364d67$export$a5575dbeeffdad98));
|
|
157584
|
-
const $6248df0c26b0b2d9$var$TemplateBuilder = ({ store: store,
|
|
157579
|
+
const $6248df0c26b0b2d9$var$TemplateBuilder = ({ store: store, onReturnAndNavigate: onReturnAndNavigate, platformName: platformName, createTemplateRoute: createTemplateRoute, olcTemplate: olcTemplate, onGetOneTemplate: onGetOneTemplate, onGetCustomFields: onGetCustomFields, onGetTemplates: onGetTemplates, onSubmit: onSubmit })=>{
|
|
157585
157580
|
const [isStoreUpdated, setIsStoreUpdated] = (0, react.useState)(false);
|
|
157586
157581
|
const [switchTabCount, setSwitchTabCount] = (0, react.useState)(1);
|
|
157587
157582
|
const { id: id } = (0, useParams)();
|
|
@@ -157771,7 +157766,7 @@ const $6248df0c26b0b2d9$var$TemplateBuilder = ({ store: store, returnRoute: retu
|
|
|
157771
157766
|
/*#__PURE__*/ (0, jsx_runtime.jsx)((0, $d31b9bd88e5dcf67$export$2e2bcd8739ae039), {
|
|
157772
157767
|
store: store,
|
|
157773
157768
|
isStoreUpdated: isStoreUpdated,
|
|
157774
|
-
|
|
157769
|
+
onReturnAndNavigate: onReturnAndNavigate,
|
|
157775
157770
|
onSubmit: onSubmit
|
|
157776
157771
|
}),
|
|
157777
157772
|
/*#__PURE__*/ (0, jsx_runtime.jsxs)((0, polotno_app.PolotnoContainer), {
|
|
@@ -157780,6 +157775,7 @@ const $6248df0c26b0b2d9$var$TemplateBuilder = ({ store: store, returnRoute: retu
|
|
|
157780
157775
|
/*#__PURE__*/ (0, jsx_runtime.jsx)((0, $d303f0b433a1814c$export$2e2bcd8739ae039), {
|
|
157781
157776
|
store: store,
|
|
157782
157777
|
currentTemplateType: currentTemplateType,
|
|
157778
|
+
platformName: platformName,
|
|
157783
157779
|
onGetTemplates: onGetTemplates,
|
|
157784
157780
|
onGetCustomFields: onGetCustomFields
|
|
157785
157781
|
}),
|
|
@@ -157826,7 +157822,7 @@ const $edeafd00018ca857$var$initializeStore = (secretKey)=>{
|
|
|
157826
157822
|
showCredit: false
|
|
157827
157823
|
});
|
|
157828
157824
|
};
|
|
157829
|
-
const $edeafd00018ca857$var$App = ({ secretKey: secretKey,
|
|
157825
|
+
const $edeafd00018ca857$var$App = ({ secretKey: secretKey, onReturnAndNavigate: onReturnAndNavigate, platformName: platformName, createTemplateRoute: createTemplateRoute, templateBuilderRoute: templateBuilderRoute, styles: styles, olcTemplate: olcTemplate, onGetOneTemplate: onGetOneTemplate, onGetCustomFields: onGetCustomFields, onGetTemplates: onGetTemplates, onSubmit: onSubmit })=>{
|
|
157830
157826
|
const [store, setStore] = (0, react.useState)($edeafd00018ca857$var$initializeStore(secretKey));
|
|
157831
157827
|
const currentPath = window?.location?.pathname;
|
|
157832
157828
|
(0, react.useEffect)(()=>{
|
|
@@ -157850,7 +157846,7 @@ const $edeafd00018ca857$var$App = ({ secretKey: secretKey, returnRoute: returnRo
|
|
|
157850
157846
|
/*#__PURE__*/ (0, jsx_runtime.jsx)((0, Route), {
|
|
157851
157847
|
path: createTemplateRoute || "/create-template",
|
|
157852
157848
|
element: /*#__PURE__*/ (0, jsx_runtime.jsx)((0, $dd071d7635be500b$export$2e2bcd8739ae039), {
|
|
157853
|
-
|
|
157849
|
+
onReturnAndNavigate: onReturnAndNavigate,
|
|
157854
157850
|
createTemplateRoute: createTemplateRoute
|
|
157855
157851
|
})
|
|
157856
157852
|
}),
|
|
@@ -157859,7 +157855,8 @@ const $edeafd00018ca857$var$App = ({ secretKey: secretKey, returnRoute: returnRo
|
|
|
157859
157855
|
element: /*#__PURE__*/ (0, jsx_runtime.jsx)((0, $6248df0c26b0b2d9$export$2e2bcd8739ae039), {
|
|
157860
157856
|
store: store,
|
|
157861
157857
|
olcTemplate: olcTemplate,
|
|
157862
|
-
|
|
157858
|
+
platformName: platformName,
|
|
157859
|
+
onReturnAndNavigate: onReturnAndNavigate,
|
|
157863
157860
|
createTemplateRoute: createTemplateRoute,
|
|
157864
157861
|
onGetOneTemplate: onGetOneTemplate,
|
|
157865
157862
|
onGetTemplates: onGetTemplates,
|
|
@@ -157881,7 +157878,7 @@ var $edeafd00018ca857$export$2e2bcd8739ae039 = $edeafd00018ca857$var$App;
|
|
|
157881
157878
|
|
|
157882
157879
|
|
|
157883
157880
|
|
|
157884
|
-
const $24075a5d702d64b3$var$TemplateBuilder = ({ container: container, secretKey: secretKey, basicAuthUsername: basicAuthUsername, basicAuthPassword: basicAuthPassword,
|
|
157881
|
+
const $24075a5d702d64b3$var$TemplateBuilder = ({ container: container, secretKey: secretKey, basicAuthUsername: basicAuthUsername, basicAuthPassword: basicAuthPassword, platformName: platformName, onReturnAndNavigate: onReturnAndNavigate, createTemplateRoute: createTemplateRoute, templateBuilderRoute: templateBuilderRoute, olcTemplate: olcTemplate, onGetOneTemplate: onGetOneTemplate, onGetTemplates: onGetTemplates, onGetCustomFields: onGetCustomFields, onSubmit: onSubmit, styles: styles })=>{
|
|
157885
157882
|
if (!container) throw new Error("Root element not found");
|
|
157886
157883
|
if (!secretKey) throw new Error("secretKey not found");
|
|
157887
157884
|
if (!basicAuthUsername) throw new Error("basicAuthUsername not found");
|
|
@@ -157897,7 +157894,8 @@ const $24075a5d702d64b3$var$TemplateBuilder = ({ container: container, secretKey
|
|
|
157897
157894
|
secretKey: secretKey,
|
|
157898
157895
|
styles: styles,
|
|
157899
157896
|
olcTemplate: olcTemplate,
|
|
157900
|
-
|
|
157897
|
+
onReturnAndNavigate: onReturnAndNavigate,
|
|
157898
|
+
platformName: platformName,
|
|
157901
157899
|
createTemplateRoute: createTemplateRoute,
|
|
157902
157900
|
templateBuilderRoute: templateBuilderRoute,
|
|
157903
157901
|
onGetOneTemplate: onGetOneTemplate,
|
|
@@ -157957,10 +157955,14 @@ $24075a5d702d64b3$export$2e2bcd8739ae039 = $24075a5d702d64b3$var$TemplateBuilder
|
|
|
157957
157955
|
type: String,
|
|
157958
157956
|
required: true
|
|
157959
157957
|
},
|
|
157960
|
-
|
|
157958
|
+
platformName: {
|
|
157961
157959
|
type: String,
|
|
157962
157960
|
required: false
|
|
157963
157961
|
},
|
|
157962
|
+
onReturnAndNavigate: {
|
|
157963
|
+
type: Function,
|
|
157964
|
+
required: false
|
|
157965
|
+
},
|
|
157964
157966
|
createTemplateRoute: {
|
|
157965
157967
|
type: String,
|
|
157966
157968
|
required: false
|
|
@@ -158006,7 +158008,8 @@ $24075a5d702d64b3$export$2e2bcd8739ae039 = $24075a5d702d64b3$var$TemplateBuilder
|
|
|
158006
158008
|
secretKey: props.secretKey,
|
|
158007
158009
|
basicAuthUsername: props.basicAuthUsername,
|
|
158008
158010
|
basicAuthPassword: props.basicAuthPassword,
|
|
158009
|
-
|
|
158011
|
+
platformName: props.platformName,
|
|
158012
|
+
onReturnAndNavigate: props.onReturnAndNavigate,
|
|
158010
158013
|
createTemplateRoute: props.createTemplateRoute,
|
|
158011
158014
|
templateBuilderRoute: props.templateBuilderRoute,
|
|
158012
158015
|
olcTemplate: props.olcTemplate,
|
|
@@ -158149,7 +158152,8 @@ const src_TemplateBuilder = ({
|
|
|
158149
158152
|
secretKey,
|
|
158150
158153
|
basicAuthUsername,
|
|
158151
158154
|
basicAuthPassword,
|
|
158152
|
-
|
|
158155
|
+
platformName,
|
|
158156
|
+
onReturnAndNavigate,
|
|
158153
158157
|
createTemplateRoute,
|
|
158154
158158
|
templateBuilderRoute,
|
|
158155
158159
|
olcTemplate,
|
|
@@ -158164,7 +158168,8 @@ const src_TemplateBuilder = ({
|
|
|
158164
158168
|
secretKey,
|
|
158165
158169
|
basicAuthUsername,
|
|
158166
158170
|
basicAuthPassword,
|
|
158167
|
-
|
|
158171
|
+
platformName,
|
|
158172
|
+
onReturnAndNavigate,
|
|
158168
158173
|
createTemplateRoute,
|
|
158169
158174
|
templateBuilderRoute,
|
|
158170
158175
|
olcTemplate,
|
package/package.json
CHANGED