tabexseriescomponents 0.2.875 → 0.2.876
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/index.cjs.js +832 -797
- package/dist/index.esm.js +58 -32
- package/dist/index.umd.js +58 -32
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -8872,6 +8872,39 @@ const Productinfo = props => {
|
|
|
8872
8872
|
});
|
|
8873
8873
|
setfinalProductId(productid);
|
|
8874
8874
|
};
|
|
8875
|
+
const cloudFlare_Image_Trans = (pathParams, urlEndpointParams) => {
|
|
8876
|
+
var imagePath = pathParams; // e.g. "tr:h-100,w-200/path/to/image.jpg"
|
|
8877
|
+
var urlEndpoint = urlEndpointParams.replace(/\/+$/, ''); // e.g. "https://image.tabexseries.com"
|
|
8878
|
+
|
|
8879
|
+
// Extract the tr: transformation part from the path (e.g. tr:h-100,w-200)
|
|
8880
|
+
var trMatch = imagePath.match(/tr:([^\/]+)/);
|
|
8881
|
+
var width = null;
|
|
8882
|
+
var height = null;
|
|
8883
|
+
if (trMatch) {
|
|
8884
|
+
var transformations = trMatch[1].split(',');
|
|
8885
|
+
transformations.forEach(transform => {
|
|
8886
|
+
if (transform.startsWith('w-')) {
|
|
8887
|
+
width = transform.substring(2);
|
|
8888
|
+
} else if (transform.startsWith('h-')) {
|
|
8889
|
+
height = transform.substring(2);
|
|
8890
|
+
}
|
|
8891
|
+
});
|
|
8892
|
+
}
|
|
8893
|
+
|
|
8894
|
+
// Remove the tr: part from the image path to get the clean image path
|
|
8895
|
+
var cleanPath = imagePath.replace(/(?:^|\/)tr:[^\/]+\/+/g, '');
|
|
8896
|
+
cleanPath = cleanPath.replace(/^\/+/, '');
|
|
8897
|
+
|
|
8898
|
+
// Only add transforms if both width AND height are present
|
|
8899
|
+
var cfTransformStr = '';
|
|
8900
|
+
if (width != undefined && width != null && width != 'null' && width != 0 && width != '0' && width.length != 0 && height != undefined && height != null && height != 0 && height != '0' && height != 'null' && height.length != 0) {
|
|
8901
|
+
cfTransformStr = `cdn-cgi/image/width=${width},height=${height}/`;
|
|
8902
|
+
}
|
|
8903
|
+
|
|
8904
|
+
// Construct the full Cloudflare URL
|
|
8905
|
+
var fullPath = urlEndpoint + '/' + cfTransformStr + cleanPath;
|
|
8906
|
+
return fullPath;
|
|
8907
|
+
};
|
|
8875
8908
|
useEffect(() => {
|
|
8876
8909
|
// if (!fetchProductInfoQueryContext.isFetching && fetchProductInfoQueryContext.isSuccess && ikimagecredcontext != undefined) {
|
|
8877
8910
|
if (isProductPageLoading == false && Object.keys(fetchProductInfoQueryContext) != 0 && fetchProductInfoQueryContext?.data?.data?.productinfo != undefined && fetchProductInfoQueryContext?.data?.data?.productinfo != null && ikimagecredcontext != undefined) {
|
|
@@ -8887,27 +8920,31 @@ const Productinfo = props => {
|
|
|
8887
8920
|
// original: arrayItem.path,
|
|
8888
8921
|
// galleryid: arrayItem.galleryid,
|
|
8889
8922
|
// };
|
|
8890
|
-
|
|
8891
|
-
|
|
8892
|
-
|
|
8893
|
-
|
|
8923
|
+
if (ikimagecredcontext?.ikimageendpoint?.includes('image.tabexseries.com')) {
|
|
8924
|
+
var img_endpoint = ikimagecredcontext?.ikimageendpoint;
|
|
8925
|
+
var path = '/tr:w-' + sectionproperties.imagetr_w + ',h-' + sectionproperties.imagetr_h + '/' + arrayItem.path;
|
|
8926
|
+
var imagePath = cloudFlare_Image_Trans(path, img_endpoint);
|
|
8894
8927
|
var productimagesarrayobj = {
|
|
8895
|
-
thumbnail:
|
|
8896
|
-
original:
|
|
8928
|
+
thumbnail: imagePath,
|
|
8929
|
+
original: imagePath,
|
|
8897
8930
|
galleryid: arrayItem.galleryid
|
|
8898
8931
|
};
|
|
8899
8932
|
} else {
|
|
8900
|
-
|
|
8901
|
-
|
|
8902
|
-
|
|
8903
|
-
|
|
8904
|
-
|
|
8905
|
-
|
|
8906
|
-
|
|
8907
|
-
|
|
8908
|
-
|
|
8909
|
-
|
|
8910
|
-
|
|
8933
|
+
if (imagepath.includes('https')) {
|
|
8934
|
+
let position = imagepath.search('https');
|
|
8935
|
+
imagepath.slice(position);
|
|
8936
|
+
var productimagesarrayobj = {
|
|
8937
|
+
thumbnail: arrayItem.path,
|
|
8938
|
+
original: arrayItem.path,
|
|
8939
|
+
galleryid: arrayItem.galleryid
|
|
8940
|
+
};
|
|
8941
|
+
} else {
|
|
8942
|
+
var productimagesarrayobj = {
|
|
8943
|
+
thumbnail: ikimagecredcontext?.ikimageendpoint + '/tr:w-' + sectionproperties.imagetr_w + ',h-' + sectionproperties.imagetr_h + '/' + arrayItem.path,
|
|
8944
|
+
original: ikimagecredcontext?.ikimageendpoint + '/tr:w-' + sectionproperties.imagetr_w + ',h-' + sectionproperties.imagetr_h + '/' + arrayItem.path,
|
|
8945
|
+
galleryid: arrayItem.galleryid
|
|
8946
|
+
};
|
|
8947
|
+
}
|
|
8911
8948
|
}
|
|
8912
8949
|
// tempproductimagesarray.push(productimagesarrayobj);
|
|
8913
8950
|
if (arrayItem?.is_size_guide != undefined && arrayItem?.is_size_guide != null && arrayItem?.is_size_guide == 1) {
|
|
@@ -8951,11 +8988,6 @@ const Productinfo = props => {
|
|
|
8951
8988
|
}
|
|
8952
8989
|
// quantitystepincrearse = parseFloat(fetchProductInfoQueryContext?.data?.data?.productinfo?.quantitystepincrearse);
|
|
8953
8990
|
}
|
|
8954
|
-
// if (fetchProductInfoQueryContext?.data?.data?.productinfo?.quantitystepincrearse != 1 && fetchProductInfoQueryContext?.data?.data?.productinfo?.quantitystepincrearse != '') {
|
|
8955
|
-
// quantitystepincrearse = parseFloat(fetchProductInfoQueryContext?.data?.data?.productinfo?.quantitystepincrearse);
|
|
8956
|
-
// } else {
|
|
8957
|
-
// quantitystepincrearse = parseInt(fetchProductInfoQueryContext?.data?.data?.productinfo?.quantitystepincrearse);
|
|
8958
|
-
// }
|
|
8959
8991
|
tempaddtocardpayloadobj.quantity = quantitystepincrearse;
|
|
8960
8992
|
setaddtocardpayloadobj({
|
|
8961
8993
|
...tempaddtocardpayloadobj
|
|
@@ -9177,7 +9209,7 @@ const Productinfo = props => {
|
|
|
9177
9209
|
} else {
|
|
9178
9210
|
// here
|
|
9179
9211
|
setvariantnotchosendisclaimer('This field is required');
|
|
9180
|
-
NotificationManager.warning('', authdetailsContext?.instinfo?.contactinfo.instid == '674f0617c7811' ? 'Please Choose Size & Color' :
|
|
9212
|
+
NotificationManager.warning('', authdetailsContext?.instinfo?.contactinfo.instid == '674f0617c7811' ? 'Please Choose Size & Color' : 'Please Choose Product Options');
|
|
9181
9213
|
}
|
|
9182
9214
|
} else {
|
|
9183
9215
|
runfunc = true;
|
|
@@ -9189,9 +9221,6 @@ const Productinfo = props => {
|
|
|
9189
9221
|
var tempaddtocardpayloadobj = {
|
|
9190
9222
|
...addtocardpayloadobj
|
|
9191
9223
|
};
|
|
9192
|
-
if (fetchProductInfoQueryContext?.data?.data?.productinfo?.quantitystepincrearse != 1 && fetchProductInfoQueryContext?.data?.data?.productinfo?.quantitystepincrearse != '') {
|
|
9193
|
-
tempaddtocardpayloadobj.quantity = parseFloat(tempaddtocardpayloadobj.quantity).toFixed(3);
|
|
9194
|
-
}
|
|
9195
9224
|
tempaddtocardpayloadobj.isproductforcedtocheckout = fetchProductInfoQueryContext?.data?.data?.productinfo?.isproductforcedtocheckout;
|
|
9196
9225
|
tempaddtocardpayloadobj.vendorid = fetchProductInfoQueryContext?.data?.data?.productinfo?.vendorproviderid;
|
|
9197
9226
|
if (forcetocheckoutvalue != undefined) {
|
|
@@ -9319,7 +9348,7 @@ const Productinfo = props => {
|
|
|
9319
9348
|
}, /*#__PURE__*/React.createElement(ScrollMenu, {
|
|
9320
9349
|
transitionBehavior: 'auto',
|
|
9321
9350
|
wrapperClassName: '',
|
|
9322
|
-
itemClassName: authdetailsContext?.instinfo?.contactinfo.instid == '67dc756de56bd' ? 'scrollmenuclassnameitemrelatedproductkingtut' :
|
|
9351
|
+
itemClassName: authdetailsContext?.instinfo?.contactinfo.instid == '67dc756de56bd' ? 'scrollmenuclassnameitemrelatedproductkingtut' : 'scrollmenuclassnameitemrelatedproduct',
|
|
9323
9352
|
scrollContainerClassName: 'scrollmenuclasssubscrollbarrelatedproducts'
|
|
9324
9353
|
}, Relatedproducts.map((item, index) => {
|
|
9325
9354
|
if (item.productinfo != null) {
|
|
@@ -9338,10 +9367,7 @@ const Productinfo = props => {
|
|
|
9338
9367
|
}, /*#__PURE__*/React.createElement("div", {
|
|
9339
9368
|
class: ' cursor-pointer w-100 '
|
|
9340
9369
|
}, /*#__PURE__*/React.createElement("div", {
|
|
9341
|
-
class: `${productinfo_cssstyles.relatedProductImageCont}` + ' w-100 p-0 mb-2 '
|
|
9342
|
-
style: {
|
|
9343
|
-
background: '#F1EDE7'
|
|
9344
|
-
}
|
|
9370
|
+
class: `${productinfo_cssstyles.relatedProductImageCont}` + ' w-100 p-0 mb-2 '
|
|
9345
9371
|
}, /*#__PURE__*/React.createElement(Imagekitimagecomp, {
|
|
9346
9372
|
urlEndpoint: ikimagecredcontext?.ikimageendpoint,
|
|
9347
9373
|
publicKey: ikimagecredcontext?.ikimagepublickey
|
|
@@ -10350,7 +10376,7 @@ const Productinfo = props => {
|
|
|
10350
10376
|
sizeguideimage: sizeguideimage,
|
|
10351
10377
|
setopensizeguidemodal: setopensizeguidemodal
|
|
10352
10378
|
}
|
|
10353
|
-
}), props.srcfromprops != 'templatedraftrouter' &&
|
|
10379
|
+
}), props.srcfromprops != 'templatedraftrouter' && /*#__PURE__*/React.createElement("div", {
|
|
10354
10380
|
className: sectionproperties.card_marginLeft != 0 ? ' col-lg-12 p-0 pl-lg-3 pr-lg-3 pl-md-4 pr-md-4 pl-sm-1 pr-sm-1 ' : ' col-lg-12 p-sm-0 ',
|
|
10355
10381
|
style: {
|
|
10356
10382
|
paddingLeft: props.srcfromprops == 'Productinfomodel' ? langdetect == 'en' ? sectionproperties.card_marginLeft + 'px' : sectionproperties.card_marginRight + 'px' : 0,
|
package/dist/index.umd.js
CHANGED
|
@@ -8732,6 +8732,39 @@
|
|
|
8732
8732
|
});
|
|
8733
8733
|
setfinalProductId(productid);
|
|
8734
8734
|
};
|
|
8735
|
+
const cloudFlare_Image_Trans = (pathParams, urlEndpointParams) => {
|
|
8736
|
+
var imagePath = pathParams; // e.g. "tr:h-100,w-200/path/to/image.jpg"
|
|
8737
|
+
var urlEndpoint = urlEndpointParams.replace(/\/+$/, ''); // e.g. "https://image.tabexseries.com"
|
|
8738
|
+
|
|
8739
|
+
// Extract the tr: transformation part from the path (e.g. tr:h-100,w-200)
|
|
8740
|
+
var trMatch = imagePath.match(/tr:([^\/]+)/);
|
|
8741
|
+
var width = null;
|
|
8742
|
+
var height = null;
|
|
8743
|
+
if (trMatch) {
|
|
8744
|
+
var transformations = trMatch[1].split(',');
|
|
8745
|
+
transformations.forEach(transform => {
|
|
8746
|
+
if (transform.startsWith('w-')) {
|
|
8747
|
+
width = transform.substring(2);
|
|
8748
|
+
} else if (transform.startsWith('h-')) {
|
|
8749
|
+
height = transform.substring(2);
|
|
8750
|
+
}
|
|
8751
|
+
});
|
|
8752
|
+
}
|
|
8753
|
+
|
|
8754
|
+
// Remove the tr: part from the image path to get the clean image path
|
|
8755
|
+
var cleanPath = imagePath.replace(/(?:^|\/)tr:[^\/]+\/+/g, '');
|
|
8756
|
+
cleanPath = cleanPath.replace(/^\/+/, '');
|
|
8757
|
+
|
|
8758
|
+
// Only add transforms if both width AND height are present
|
|
8759
|
+
var cfTransformStr = '';
|
|
8760
|
+
if (width != undefined && width != null && width != 'null' && width != 0 && width != '0' && width.length != 0 && height != undefined && height != null && height != 0 && height != '0' && height != 'null' && height.length != 0) {
|
|
8761
|
+
cfTransformStr = `cdn-cgi/image/width=${width},height=${height}/`;
|
|
8762
|
+
}
|
|
8763
|
+
|
|
8764
|
+
// Construct the full Cloudflare URL
|
|
8765
|
+
var fullPath = urlEndpoint + '/' + cfTransformStr + cleanPath;
|
|
8766
|
+
return fullPath;
|
|
8767
|
+
};
|
|
8735
8768
|
React.useEffect(() => {
|
|
8736
8769
|
// if (!fetchProductInfoQueryContext.isFetching && fetchProductInfoQueryContext.isSuccess && ikimagecredcontext != undefined) {
|
|
8737
8770
|
if (isProductPageLoading == false && Object.keys(fetchProductInfoQueryContext) != 0 && fetchProductInfoQueryContext?.data?.data?.productinfo != undefined && fetchProductInfoQueryContext?.data?.data?.productinfo != null && ikimagecredcontext != undefined) {
|
|
@@ -8747,27 +8780,31 @@
|
|
|
8747
8780
|
// original: arrayItem.path,
|
|
8748
8781
|
// galleryid: arrayItem.galleryid,
|
|
8749
8782
|
// };
|
|
8750
|
-
|
|
8751
|
-
|
|
8752
|
-
|
|
8753
|
-
|
|
8783
|
+
if (ikimagecredcontext?.ikimageendpoint?.includes('image.tabexseries.com')) {
|
|
8784
|
+
var img_endpoint = ikimagecredcontext?.ikimageendpoint;
|
|
8785
|
+
var path = '/tr:w-' + sectionproperties.imagetr_w + ',h-' + sectionproperties.imagetr_h + '/' + arrayItem.path;
|
|
8786
|
+
var imagePath = cloudFlare_Image_Trans(path, img_endpoint);
|
|
8754
8787
|
var productimagesarrayobj = {
|
|
8755
|
-
thumbnail:
|
|
8756
|
-
original:
|
|
8788
|
+
thumbnail: imagePath,
|
|
8789
|
+
original: imagePath,
|
|
8757
8790
|
galleryid: arrayItem.galleryid
|
|
8758
8791
|
};
|
|
8759
8792
|
} else {
|
|
8760
|
-
|
|
8761
|
-
|
|
8762
|
-
|
|
8763
|
-
|
|
8764
|
-
|
|
8765
|
-
|
|
8766
|
-
|
|
8767
|
-
|
|
8768
|
-
|
|
8769
|
-
|
|
8770
|
-
|
|
8793
|
+
if (imagepath.includes('https')) {
|
|
8794
|
+
let position = imagepath.search('https');
|
|
8795
|
+
imagepath.slice(position);
|
|
8796
|
+
var productimagesarrayobj = {
|
|
8797
|
+
thumbnail: arrayItem.path,
|
|
8798
|
+
original: arrayItem.path,
|
|
8799
|
+
galleryid: arrayItem.galleryid
|
|
8800
|
+
};
|
|
8801
|
+
} else {
|
|
8802
|
+
var productimagesarrayobj = {
|
|
8803
|
+
thumbnail: ikimagecredcontext?.ikimageendpoint + '/tr:w-' + sectionproperties.imagetr_w + ',h-' + sectionproperties.imagetr_h + '/' + arrayItem.path,
|
|
8804
|
+
original: ikimagecredcontext?.ikimageendpoint + '/tr:w-' + sectionproperties.imagetr_w + ',h-' + sectionproperties.imagetr_h + '/' + arrayItem.path,
|
|
8805
|
+
galleryid: arrayItem.galleryid
|
|
8806
|
+
};
|
|
8807
|
+
}
|
|
8771
8808
|
}
|
|
8772
8809
|
// tempproductimagesarray.push(productimagesarrayobj);
|
|
8773
8810
|
if (arrayItem?.is_size_guide != undefined && arrayItem?.is_size_guide != null && arrayItem?.is_size_guide == 1) {
|
|
@@ -8811,11 +8848,6 @@
|
|
|
8811
8848
|
}
|
|
8812
8849
|
// quantitystepincrearse = parseFloat(fetchProductInfoQueryContext?.data?.data?.productinfo?.quantitystepincrearse);
|
|
8813
8850
|
}
|
|
8814
|
-
// if (fetchProductInfoQueryContext?.data?.data?.productinfo?.quantitystepincrearse != 1 && fetchProductInfoQueryContext?.data?.data?.productinfo?.quantitystepincrearse != '') {
|
|
8815
|
-
// quantitystepincrearse = parseFloat(fetchProductInfoQueryContext?.data?.data?.productinfo?.quantitystepincrearse);
|
|
8816
|
-
// } else {
|
|
8817
|
-
// quantitystepincrearse = parseInt(fetchProductInfoQueryContext?.data?.data?.productinfo?.quantitystepincrearse);
|
|
8818
|
-
// }
|
|
8819
8851
|
tempaddtocardpayloadobj.quantity = quantitystepincrearse;
|
|
8820
8852
|
setaddtocardpayloadobj({
|
|
8821
8853
|
...tempaddtocardpayloadobj
|
|
@@ -9037,7 +9069,7 @@
|
|
|
9037
9069
|
} else {
|
|
9038
9070
|
// here
|
|
9039
9071
|
setvariantnotchosendisclaimer('This field is required');
|
|
9040
|
-
NotificationManager.warning('', authdetailsContext?.instinfo?.contactinfo.instid == '674f0617c7811' ? 'Please Choose Size & Color' :
|
|
9072
|
+
NotificationManager.warning('', authdetailsContext?.instinfo?.contactinfo.instid == '674f0617c7811' ? 'Please Choose Size & Color' : 'Please Choose Product Options');
|
|
9041
9073
|
}
|
|
9042
9074
|
} else {
|
|
9043
9075
|
runfunc = true;
|
|
@@ -9049,9 +9081,6 @@
|
|
|
9049
9081
|
var tempaddtocardpayloadobj = {
|
|
9050
9082
|
...addtocardpayloadobj
|
|
9051
9083
|
};
|
|
9052
|
-
if (fetchProductInfoQueryContext?.data?.data?.productinfo?.quantitystepincrearse != 1 && fetchProductInfoQueryContext?.data?.data?.productinfo?.quantitystepincrearse != '') {
|
|
9053
|
-
tempaddtocardpayloadobj.quantity = parseFloat(tempaddtocardpayloadobj.quantity).toFixed(3);
|
|
9054
|
-
}
|
|
9055
9084
|
tempaddtocardpayloadobj.isproductforcedtocheckout = fetchProductInfoQueryContext?.data?.data?.productinfo?.isproductforcedtocheckout;
|
|
9056
9085
|
tempaddtocardpayloadobj.vendorid = fetchProductInfoQueryContext?.data?.data?.productinfo?.vendorproviderid;
|
|
9057
9086
|
if (forcetocheckoutvalue != undefined) {
|
|
@@ -9179,7 +9208,7 @@
|
|
|
9179
9208
|
}, /*#__PURE__*/React__default["default"].createElement(reactHorizontalScrollingMenu.ScrollMenu, {
|
|
9180
9209
|
transitionBehavior: 'auto',
|
|
9181
9210
|
wrapperClassName: '',
|
|
9182
|
-
itemClassName: authdetailsContext?.instinfo?.contactinfo.instid == '67dc756de56bd' ? 'scrollmenuclassnameitemrelatedproductkingtut' :
|
|
9211
|
+
itemClassName: authdetailsContext?.instinfo?.contactinfo.instid == '67dc756de56bd' ? 'scrollmenuclassnameitemrelatedproductkingtut' : 'scrollmenuclassnameitemrelatedproduct',
|
|
9183
9212
|
scrollContainerClassName: 'scrollmenuclasssubscrollbarrelatedproducts'
|
|
9184
9213
|
}, Relatedproducts.map((item, index) => {
|
|
9185
9214
|
if (item.productinfo != null) {
|
|
@@ -9198,10 +9227,7 @@
|
|
|
9198
9227
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
9199
9228
|
class: ' cursor-pointer w-100 '
|
|
9200
9229
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
9201
|
-
class: `${productinfo_cssstyles.relatedProductImageCont}` + ' w-100 p-0 mb-2 '
|
|
9202
|
-
style: {
|
|
9203
|
-
background: '#F1EDE7'
|
|
9204
|
-
}
|
|
9230
|
+
class: `${productinfo_cssstyles.relatedProductImageCont}` + ' w-100 p-0 mb-2 '
|
|
9205
9231
|
}, /*#__PURE__*/React__default["default"].createElement(Imagekitimagecomp, {
|
|
9206
9232
|
urlEndpoint: ikimagecredcontext?.ikimageendpoint,
|
|
9207
9233
|
publicKey: ikimagecredcontext?.ikimagepublickey
|
|
@@ -10210,7 +10236,7 @@
|
|
|
10210
10236
|
sizeguideimage: sizeguideimage,
|
|
10211
10237
|
setopensizeguidemodal: setopensizeguidemodal
|
|
10212
10238
|
}
|
|
10213
|
-
}), props.srcfromprops != 'templatedraftrouter' &&
|
|
10239
|
+
}), props.srcfromprops != 'templatedraftrouter' && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
10214
10240
|
className: sectionproperties.card_marginLeft != 0 ? ' col-lg-12 p-0 pl-lg-3 pr-lg-3 pl-md-4 pr-md-4 pl-sm-1 pr-sm-1 ' : ' col-lg-12 p-sm-0 ',
|
|
10215
10241
|
style: {
|
|
10216
10242
|
paddingLeft: props.srcfromprops == 'Productinfomodel' ? langdetect == 'en' ? sectionproperties.card_marginLeft + 'px' : sectionproperties.card_marginRight + 'px' : 0,
|