s-platform-landing-section 0.1.35 → 0.1.36-beta.10
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.js +1867 -943
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +1856 -945
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
- package/dist/angle-small-left~biOSnepC.svg +0 -2
- package/dist/angle-small-right~rycMvNof.svg +0 -2
- package/dist/no-photo~HEpaubbO.svg +0 -7
package/dist/index.js
CHANGED
|
@@ -10,16 +10,16 @@ var pi = require('react-icons/pi');
|
|
|
10
10
|
var tb = require('react-icons/tb');
|
|
11
11
|
var si = require('react-icons/si');
|
|
12
12
|
var io = require('react-icons/io');
|
|
13
|
+
var md = require('react-icons/md');
|
|
13
14
|
var fa6 = require('react-icons/fa6');
|
|
14
|
-
require('react-icons/
|
|
15
|
-
var bs = require('react-icons/bs');
|
|
15
|
+
var ai = require('react-icons/ai');
|
|
16
16
|
var lu = require('react-icons/lu');
|
|
17
17
|
var DatePicker = _interopDefault(require('react-datepicker'));
|
|
18
18
|
require('react-datepicker/dist/react-datepicker.css');
|
|
19
19
|
var Slider = _interopDefault(require('react-slick'));
|
|
20
20
|
require('slick-carousel/slick/slick.css');
|
|
21
21
|
require('slick-carousel/slick/slick-theme.css');
|
|
22
|
-
var
|
|
22
|
+
var bs = require('react-icons/bs');
|
|
23
23
|
var go = require('react-icons/go');
|
|
24
24
|
var gr = require('react-icons/gr');
|
|
25
25
|
var ri = require('react-icons/ri');
|
|
@@ -115,33 +115,34 @@ var getDurationValue = function getDurationValue(attributes) {
|
|
|
115
115
|
return durationAtt ? ((durationAtt === null || durationAtt === void 0 ? void 0 : (_durationAtt$value = durationAtt.value) === null || _durationAtt$value === void 0 ? void 0 : _durationAtt$value[0]) || "0") + " p" : "";
|
|
116
116
|
};
|
|
117
117
|
var genProductSlugVi = function genProductSlugVi(productName, id) {
|
|
118
|
-
var _productName$replace;
|
|
119
|
-
|
|
118
|
+
var _productName$replace, _productName$replace$, _productName$replace$2, _productName$replace$3, _productName$replace$4;
|
|
119
|
+
var slug = productName === null || productName === void 0 ? void 0 : (_productName$replace = productName.replace(/%/g, 'pct')) === null || _productName$replace === void 0 ? void 0 : (_productName$replace$ = _productName$replace.replace(/\//g, 'fs')) === null || _productName$replace$ === void 0 ? void 0 : (_productName$replace$2 = _productName$replace$.replace(/&/g, 'amp')) === null || _productName$replace$2 === void 0 ? void 0 : (_productName$replace$3 = _productName$replace$2.replace(/-/g, 'hyp')) === null || _productName$replace$3 === void 0 ? void 0 : (_productName$replace$4 = _productName$replace$3.replace(/\s+/g, '-')) === null || _productName$replace$4 === void 0 ? void 0 : _productName$replace$4.replace(/(?:[\0-!#%-'\*\+\/<-\?\\\^`\{\}\x7F-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C8B-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA620-\uA629\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6E6-\uA716\uA720\uA721\uA789\uA78A\uA7CE\uA7CF\uA7D2\uA7D4\uA7DD-\uA7F1\uA802\uA806\uA80B\uA823-\uA83F\uA874-\uA881\uA8B4-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF-\uA909\uA926-\uA92F\uA947-\uA95F\uA97D-\uA983\uA9B3-\uA9CE\uA9D0-\uA9DF\uA9E5\uA9F0-\uA9F9\uA9FF\uAA29-\uAA3F\uAA43\uAA4C-\uAA5F\uAA77-\uAA79\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAC3-\uAADA\uAADE\uAADF\uAAEB-\uAAF1\uAAF5-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABE3-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB1E\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFE6F\uFE75\uFEFD-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEFF\uDF20-\uDF2C\uDF41\uDF4A-\uDF4F\uDF76-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0-\uDFFF]|\uD801[\uDC9E-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDD6F\uDD7B\uDD8B\uDD93\uDD96\uDDA2\uDDB2\uDDBA\uDDBD-\uDDBF\uDDF4-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDF7F\uDF86\uDFB1\uDFBB-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE01-\uDE0F\uDE14\uDE18\uDE36-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE5-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD24-\uDD49\uDD66-\uDD6E\uDD86-\uDE7F\uDEAA-\uDEAF\uDEB2-\uDEC1\uDEC5-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF46-\uDF6F\uDF82-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC00-\uDC02\uDC38-\uDC70\uDC73\uDC74\uDC76-\uDC82\uDCB0-\uDCCF\uDCE9-\uDD02\uDD27-\uDD43\uDD45\uDD46\uDD48-\uDD4F\uDD73-\uDD75\uDD77-\uDD82\uDDB3-\uDDC0\uDDC5-\uDDD9\uDDDB\uDDDD-\uDDFF\uDE12\uDE2C-\uDE3E\uDE41-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEDF-\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A-\uDF3C\uDF3E-\uDF4F\uDF51-\uDF5C\uDF62-\uDF7F\uDF8A\uDF8C\uDF8D\uDF8F\uDFB6\uDFB8-\uDFD0\uDFD2\uDFD4-\uDFFF]|\uD805[\uDC35-\uDC46\uDC4B-\uDC5E\uDC62-\uDC7F\uDCB0-\uDCC3\uDCC6\uDCC8-\uDD7F\uDDAF-\uDDD7\uDDDC-\uDDFF\uDE30-\uDE43\uDE45-\uDE7F\uDEAB-\uDEB7\uDEB9-\uDEFF\uDF1B-\uDF3F\uDF47-\uDFFF]|\uD806[\uDC2C-\uDC9F\uDCE0-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD30-\uDD3E\uDD40\uDD42-\uDD9F\uDDA8\uDDA9\uDDD1-\uDDE0\uDDE2\uDDE4-\uDDFF\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE4F\uDE51-\uDE5B\uDE8A-\uDE9C\uDE9E-\uDEAF\uDEF9-\uDFBF\uDFE1-\uDFFF]|\uD807[\uDC09\uDC2F-\uDC3F\uDC41-\uDC71\uDC90-\uDCFF\uDD07\uDD0A\uDD31-\uDD45\uDD47-\uDD5F\uDD66\uDD69\uDD8A-\uDD97\uDD99-\uDEDF\uDEF3-\uDF01\uDF03\uDF11\uDF34-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC00-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD812-\uD817\uD819\uD824-\uD82A\uD82D\uD82E\uD830-\uD834\uD836\uD83C-\uD83F\uD87C\uD87D\uD87F\uD889-\uDBFF][\uDC00-\uDFFF]|\uD80B[\uDC00-\uDF8F\uDFF1-\uDFFF]|\uD80D[\uDC30-\uDC40\uDC47-\uDC5F]|\uD810[\uDFFB-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD818[\uDC00-\uDCFF\uDD1E-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F-\uDE6F\uDEBF-\uDECF\uDEEE-\uDEFF\uDF30-\uDF3F\uDF44-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDD3F\uDD6D-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4F\uDF51-\uDF92\uDFA0-\uDFDF\uDFE2\uDFE4-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFE\uDD09-\uDFFF]|\uD82B[\uDC00-\uDFEF\uDFF4\uDFFC\uDFFF]|\uD82C[\uDD23-\uDD31\uDD33-\uDD4F\uDD53\uDD54\uDD56-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC-\uDFFF]|\uD837[\uDC00-\uDEFF\uDF1F-\uDF24\uDF2B-\uDFFF]|\uD838[\uDC00-\uDC2F\uDC6E-\uDCFF\uDD2D-\uDD36\uDD3E-\uDD4D\uDD4F-\uDE8F\uDEAE-\uDEBF\uDEEC-\uDFFF]|\uD839[\uDC00-\uDCCF\uDCEC-\uDDCF\uDDEE\uDDEF\uDDF1-\uDFDF\uDFE7\uDFEC\uDFEF\uDFFF]|\uD83A[\uDCC5-\uDCFF\uDD44-\uDD4A\uDD4C-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF3A-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFEF]|\uD87B[\uDE5E-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g, '');
|
|
120
|
+
return slug + "-" + id;
|
|
120
121
|
};
|
|
121
122
|
var getLinkProductDetail = function getLinkProductDetail(product) {
|
|
122
123
|
var slug = genProductSlugVi(product === null || product === void 0 ? void 0 : product.productName, product === null || product === void 0 ? void 0 : product.productId);
|
|
123
|
-
return "/san-pham/" + slug;
|
|
124
|
+
return "/san-pham/" + encodeURIComponent(slug);
|
|
124
125
|
};
|
|
125
126
|
var getLinkServiceDetail = function getLinkServiceDetail(product) {
|
|
126
127
|
var slug = genProductSlugVi(product === null || product === void 0 ? void 0 : product.productName, product === null || product === void 0 ? void 0 : product.productId);
|
|
127
|
-
return "/dich-vu/" + slug;
|
|
128
|
+
return "/dich-vu/" + encodeURIComponent(slug);
|
|
128
129
|
};
|
|
129
130
|
var getLinkNewsDetail = function getLinkNewsDetail(news) {
|
|
130
131
|
var slug = genProductSlugVi(news === null || news === void 0 ? void 0 : news.title, news === null || news === void 0 ? void 0 : news.articleId);
|
|
131
132
|
var category = genProductSlugVi(news === null || news === void 0 ? void 0 : news.catName, news === null || news === void 0 ? void 0 : news.catId);
|
|
132
|
-
return "/tin-tuc/" + category + "/" + slug;
|
|
133
|
+
return "/tin-tuc/" + encodeURIComponent(category) + "/" + encodeURIComponent(slug);
|
|
133
134
|
};
|
|
134
135
|
var getLinkNewsByCategory = function getLinkNewsByCategory(news) {
|
|
135
136
|
var slug = genProductSlugVi(news === null || news === void 0 ? void 0 : news.catName, news === null || news === void 0 ? void 0 : news.catId);
|
|
136
|
-
return "/tin-tuc-theo-danh-muc/" + slug;
|
|
137
|
+
return "/tin-tuc-theo-danh-muc/" + encodeURIComponent(slug);
|
|
137
138
|
};
|
|
138
139
|
var getLinkProductsByCategory = function getLinkProductsByCategory(product) {
|
|
139
140
|
if (product !== null && product !== void 0 && product.categoryName) {
|
|
140
141
|
var slug = genProductSlugVi(product === null || product === void 0 ? void 0 : product.categoryName, product === null || product === void 0 ? void 0 : product.categoryId);
|
|
141
|
-
return "/danh-muc/" + slug;
|
|
142
|
+
return "/danh-muc/" + encodeURIComponent(slug);
|
|
142
143
|
} else {
|
|
143
144
|
var _slug12 = genProductSlugVi(product === null || product === void 0 ? void 0 : product.cateName, product === null || product === void 0 ? void 0 : product.categoryId);
|
|
144
|
-
return "/danh-muc/" + _slug12;
|
|
145
|
+
return "/danh-muc/" + encodeURIComponent(_slug12);
|
|
145
146
|
}
|
|
146
147
|
};
|
|
147
148
|
var LinkToPage = function LinkToPage(props) {
|
|
@@ -155,7 +156,7 @@ var genLinkSearch = function genLinkSearch(keyword) {
|
|
|
155
156
|
};
|
|
156
157
|
var configSvg = function configSvg(data) {
|
|
157
158
|
var _data$replace, _data$replace$replace;
|
|
158
|
-
return data === null || data === void 0 ? void 0 : (_data$replace = data.replace(/<path(?![^>]*fill=")[^>]*>/g, "<path fill=\"currentColor\" $&")) === null || _data$replace === void 0 ? void 0 : (_data$replace$replace = _data$replace.replace(/width="[^"]*"
|
|
159
|
+
return data === null || data === void 0 ? void 0 : (_data$replace = data.replace(/<path(?![^>]*fill=")[^>]*>/g, "<path fill=\"currentColor\" $&")) === null || _data$replace === void 0 ? void 0 : (_data$replace$replace = _data$replace.replace(/width=['"][^'"]*['"]/g, '')) === null || _data$replace$replace === void 0 ? void 0 : _data$replace$replace.replace(/height=['"][^'"]*['"]/g, '');
|
|
159
160
|
};
|
|
160
161
|
var urlMappings = {
|
|
161
162
|
"/products": "/san-pham",
|
|
@@ -436,7 +437,7 @@ var NavBar7 = function NavBar7(props) {
|
|
|
436
437
|
href: "/",
|
|
437
438
|
className: "flex items-center gap-2"
|
|
438
439
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
439
|
-
className: "object-
|
|
440
|
+
className: "object-contain w-12 h-12",
|
|
440
441
|
src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl
|
|
441
442
|
}), /*#__PURE__*/React__default.createElement("h3", {
|
|
442
443
|
className: "text-xl md:text-2xl text-primary font-headingFont text-wrap line-clamp-2 leading-tight"
|
|
@@ -499,7 +500,7 @@ var NavBar7 = function NavBar7(props) {
|
|
|
499
500
|
href: "/",
|
|
500
501
|
className: "flex flex-1 gap-2 items-center"
|
|
501
502
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
502
|
-
className: "object-
|
|
503
|
+
className: "object-contain w-12 h-12",
|
|
503
504
|
src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl
|
|
504
505
|
}), /*#__PURE__*/React__default.createElement("h3", {
|
|
505
506
|
className: "text-xl md:text-2xl font-headingFont text-wrap text-primary line-clamp-2"
|
|
@@ -533,7 +534,7 @@ var NavBar7 = function NavBar7(props) {
|
|
|
533
534
|
className: "flex gap-2 items-center mb-2"
|
|
534
535
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
535
536
|
src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
|
|
536
|
-
className: "
|
|
537
|
+
className: "h-14 w-14 object-contain"
|
|
537
538
|
}), /*#__PURE__*/React__default.createElement("h3", {
|
|
538
539
|
className: "text-xl font-headingFont text-primary line-clamp-1"
|
|
539
540
|
}, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName))), /*#__PURE__*/React__default.createElement("button", {
|
|
@@ -729,7 +730,7 @@ var NavBar1 = function NavBar1(props) {
|
|
|
729
730
|
href: "/",
|
|
730
731
|
className: "flex items-center gap-2"
|
|
731
732
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
732
|
-
className: "object-
|
|
733
|
+
className: "object-contain w-12 h-12",
|
|
733
734
|
src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
|
|
734
735
|
alt: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName
|
|
735
736
|
}), /*#__PURE__*/React__default.createElement("h3", {
|
|
@@ -791,7 +792,7 @@ var NavBar1 = function NavBar1(props) {
|
|
|
791
792
|
href: "/",
|
|
792
793
|
className: "flex flex-1 gap-2 items-center"
|
|
793
794
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
794
|
-
className: "object-
|
|
795
|
+
className: "object-contain w-12 h-12",
|
|
795
796
|
src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
|
|
796
797
|
alt: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName
|
|
797
798
|
}), /*#__PURE__*/React__default.createElement("h3", {
|
|
@@ -826,7 +827,7 @@ var NavBar1 = function NavBar1(props) {
|
|
|
826
827
|
className: "flex gap-2 items-center mb-2"
|
|
827
828
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
828
829
|
src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
|
|
829
|
-
className: "
|
|
830
|
+
className: "h-14 w-14 object-contain"
|
|
830
831
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
831
832
|
className: "text-xl font-headingFont text-primary line-clamp-1"
|
|
832
833
|
}, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName))), /*#__PURE__*/React__default.createElement("button", {
|
|
@@ -951,7 +952,7 @@ var SectionTitle2 = function SectionTitle2(props) {
|
|
|
951
952
|
}), /*#__PURE__*/React__default.createElement(io.IoIosStar, {
|
|
952
953
|
className: "w-4 h-4 text-warning"
|
|
953
954
|
})) : null, data !== null && data !== void 0 && data.sectionDescription ? /*#__PURE__*/React__default.createElement("div", {
|
|
954
|
-
className: "text-xl text-center leading-relaxed text-textSecondary"
|
|
955
|
+
className: "text-xl text-center leading-relaxed text-textSecondary pb-4"
|
|
955
956
|
}, data === null || data === void 0 ? void 0 : data.sectionDescription) : null);
|
|
956
957
|
};
|
|
957
958
|
|
|
@@ -978,10 +979,27 @@ var SectionTitle4 = function SectionTitle4(props) {
|
|
|
978
979
|
}, data === null || data === void 0 ? void 0 : (_data$sectionTitle = data.sectionTitle) === null || _data$sectionTitle === void 0 ? void 0 : _data$sectionTitle.toUpperCase()), /*#__PURE__*/React__default.createElement("div", {
|
|
979
980
|
className: "border w-32 border-primary"
|
|
980
981
|
})) : null, data !== null && data !== void 0 && data.sectionDescription ? /*#__PURE__*/React__default.createElement("p", {
|
|
981
|
-
className: "text-xl text-center
|
|
982
|
+
className: "text-xl text-center leading-relaxed text-secondary mt-2"
|
|
982
983
|
}, data === null || data === void 0 ? void 0 : data.sectionDescription) : null);
|
|
983
984
|
};
|
|
984
985
|
|
|
986
|
+
var SectionTitle5 = function SectionTitle5(props) {
|
|
987
|
+
var data = props.data;
|
|
988
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
989
|
+
className: true
|
|
990
|
+
}, data !== null && data !== void 0 && data.sectionTitle ? /*#__PURE__*/React__default.createElement("div", {
|
|
991
|
+
className: "flex items-start gap-2"
|
|
992
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
993
|
+
className: "text-secondary text-4xl md:text-5xl"
|
|
994
|
+
}, /*#__PURE__*/React__default.createElement(md.MdKeyboardDoubleArrowRight, null)), /*#__PURE__*/React__default.createElement("div", {
|
|
995
|
+
className: "flex flex-col gap-2"
|
|
996
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
997
|
+
className: "text-2xl md:text-4xl text-textHeading font-medium font-fontHeading"
|
|
998
|
+
}, data === null || data === void 0 ? void 0 : data.sectionTitle), data !== null && data !== void 0 && data.sectionDescription ? /*#__PURE__*/React__default.createElement("p", {
|
|
999
|
+
className: "text-lg md:text-2xl leading-relaxed text-textSecondary"
|
|
1000
|
+
}, data === null || data === void 0 ? void 0 : data.sectionDescription) : null)) : null);
|
|
1001
|
+
};
|
|
1002
|
+
|
|
985
1003
|
var Input = React.forwardRef(function (props, ref) {
|
|
986
1004
|
var _props$label = props.label,
|
|
987
1005
|
label = _props$label === void 0 ? "" : _props$label,
|
|
@@ -1214,20 +1232,22 @@ var Hero2 = function Hero2(props) {
|
|
|
1214
1232
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
1215
1233
|
src: data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : (_data$data$$srcImages = _data$data$.srcImages) === null || _data$data$$srcImages === void 0 ? void 0 : _data$data$$srcImages[0],
|
|
1216
1234
|
alt: data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : (_data$data2$ = _data$data2[0]) === null || _data$data2$ === void 0 ? void 0 : _data$data2$.title,
|
|
1217
|
-
className: "w-full h-auto object-cover min-h-[
|
|
1235
|
+
className: "w-full h-auto object-cover min-h-[35vh] max-h-[100vh]"
|
|
1218
1236
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
1219
|
-
className: "absolute inset-y-0 right-[
|
|
1237
|
+
className: "absolute inset-y-0 right-[2%] md:right-[4%] w-[58%] md:w-[54%] flex flex-col gap-2 md:gap-4 xl:gap-6 justify-center items-start px-4 pt-4 pb-2 md:px-8 md:pt-8 md:pb-6 xl:p-8"
|
|
1220
1238
|
}, shopConfig !== null && shopConfig !== void 0 && shopConfig.logoUrl ? /*#__PURE__*/React__default.createElement("img", {
|
|
1221
1239
|
src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
|
|
1222
|
-
className: "h-6 w-6 sm:h-10 sm:w-10 md:h-12 md:w-12 lg:w-14 lg:h-14 xl:h-20 xl:w-20"
|
|
1240
|
+
className: "h-6 w-6 object-contain sm:h-10 sm:w-10 md:h-12 md:w-12 lg:w-14 lg:h-14 xl:h-20 xl:w-20"
|
|
1223
1241
|
}) : null, /*#__PURE__*/React__default.createElement("div", {
|
|
1224
|
-
className: "font-medium line-clamp-1 ",
|
|
1242
|
+
className: "font-medium line-clamp-2 lg:line-clamp-1 text-2xl md:text-3xl lg:text-4xl xl:text-6xl",
|
|
1225
1243
|
style: {
|
|
1226
|
-
fontSize: "clamp(1.25rem, 4vw, 3.5rem)",
|
|
1227
1244
|
lineHeight: "1.5"
|
|
1228
1245
|
}
|
|
1229
1246
|
}, data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : (_data$data3$ = _data$data3[0]) === null || _data$data3$ === void 0 ? void 0 : _data$data3$.title), /*#__PURE__*/React__default.createElement("div", {
|
|
1230
|
-
className: "
|
|
1247
|
+
className: "line-clamp-3 text-ellipsis text-base md:text-lg lg:text-xl xl:text-2xl",
|
|
1248
|
+
style: {
|
|
1249
|
+
lineHeight: 1.625
|
|
1250
|
+
}
|
|
1231
1251
|
}, data === null || data === void 0 ? void 0 : (_data$data4 = data.data) === null || _data$data4 === void 0 ? void 0 : (_data$data4$ = _data$data4[0]) === null || _data$data4$ === void 0 ? void 0 : _data$data4$.description)));
|
|
1232
1252
|
};
|
|
1233
1253
|
|
|
@@ -1239,13 +1259,16 @@ var Hero5 = function Hero5(props) {
|
|
|
1239
1259
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
1240
1260
|
src: data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : (_data$data$$srcImages = _data$data$.srcImages) === null || _data$data$$srcImages === void 0 ? void 0 : _data$data$$srcImages[0],
|
|
1241
1261
|
alt: data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : (_data$data2$ = _data$data2[0]) === null || _data$data2$ === void 0 ? void 0 : _data$data2$.title,
|
|
1242
|
-
className: "w-full min-h-[
|
|
1262
|
+
className: "w-full min-h-[35vh] max-h-[100vh] object-cover"
|
|
1243
1263
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
1244
|
-
className: "absolute inset-0 flex flex-col top-[
|
|
1264
|
+
className: "absolute inset-0 flex flex-col top-[8%] md:top-[10%] gap-1 md:gap-4 p-4 lg:p-10 w-3/5 md:w-1/2 max-w-[90%] left-1 lg:left-10 xl:left-20"
|
|
1245
1265
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
1246
|
-
className: "text-xl sm:text-2xl md:text-3xl lg:text-4xl text-textHeading
|
|
1266
|
+
className: "text-xl sm:text-2xl md:text-3xl lg:text-4xl text-textHeading overflow-hidden text-ellipsis font-medium line-clamp-2",
|
|
1267
|
+
style: {
|
|
1268
|
+
lineHeight: 1.5
|
|
1269
|
+
}
|
|
1247
1270
|
}, data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : (_data$data3$ = _data$data3[0]) === null || _data$data3$ === void 0 ? void 0 : _data$data3$.title), /*#__PURE__*/React__default.createElement("div", {
|
|
1248
|
-
className: "text-sm md:text-xl lg:text-2xl text-primary line-clamp-3
|
|
1271
|
+
className: "text-sm md:text-xl lg:text-2xl text-primary line-clamp-3 overflow-hidden text-ellipsis"
|
|
1249
1272
|
}, data === null || data === void 0 ? void 0 : (_data$data4 = data.data) === null || _data$data4 === void 0 ? void 0 : (_data$data4$ = _data$data4[0]) === null || _data$data4$ === void 0 ? void 0 : _data$data4$.description)));
|
|
1250
1273
|
};
|
|
1251
1274
|
|
|
@@ -1261,21 +1284,20 @@ var Hero6 = function Hero6(props) {
|
|
|
1261
1284
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
1262
1285
|
src: data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : (_data$data$$srcImages = _data$data$.srcImages) === null || _data$data$$srcImages === void 0 ? void 0 : _data$data$$srcImages[0],
|
|
1263
1286
|
alt: data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : (_data$data2$ = _data$data2[0]) === null || _data$data2$ === void 0 ? void 0 : _data$data2$.title,
|
|
1264
|
-
className: "object-cover w-full h-
|
|
1287
|
+
className: "object-cover w-full min-h-[30vh] max-h-[100vh]"
|
|
1265
1288
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
1266
|
-
className: "absolute inset-0 flex flex-col items-center justify-center md:gap-1 lg:gap-2 text-center py-1 md:py-4 px-
|
|
1289
|
+
className: "absolute w-full md:w-2/3 mx-auto inset-0 flex flex-col items-center justify-center md:gap-1 lg:gap-2 text-center py-1 md:py-4 px-10"
|
|
1267
1290
|
}, data !== null && data !== void 0 && (_data$data3 = data.data) !== null && _data$data3 !== void 0 && (_data$data3$ = _data$data3[0]) !== null && _data$data3$ !== void 0 && _data$data3$.title ? /*#__PURE__*/React__default.createElement("div", {
|
|
1268
|
-
className: "text-primary font-headingFont text-center line-clamp-1 text-
|
|
1291
|
+
className: "text-primary font-headingFont text-center line-clamp-1 text-2xl md:text-4xl xl:text-6xl text-ellipsis",
|
|
1269
1292
|
style: {
|
|
1270
|
-
fontSize: "clamp(1rem, 4vw, 3rem)",
|
|
1271
1293
|
lineHeight: "2"
|
|
1272
1294
|
}
|
|
1273
1295
|
}, data === null || data === void 0 ? void 0 : (_data$data4 = data.data) === null || _data$data4 === void 0 ? void 0 : (_data$data4$ = _data$data4[0]) === null || _data$data4$ === void 0 ? void 0 : _data$data4$.title) : null, /*#__PURE__*/React__default.createElement("div", {
|
|
1274
|
-
className: "flex flex-col gap-
|
|
1296
|
+
className: "flex flex-col gap-4 lg:gap-6 "
|
|
1275
1297
|
}, data !== null && data !== void 0 && (_data$data5 = data.data) !== null && _data$data5 !== void 0 && (_data$data5$ = _data$data5[0]) !== null && _data$data5$ !== void 0 && _data$data5$.description ? /*#__PURE__*/React__default.createElement("div", {
|
|
1276
|
-
className: "line-clamp-
|
|
1298
|
+
className: "line-clamp-2 lg:line-clamp-3 md:text-xl xl:text-2xl",
|
|
1277
1299
|
style: {
|
|
1278
|
-
|
|
1300
|
+
lineHeight: 1.5
|
|
1279
1301
|
}
|
|
1280
1302
|
}, data === null || data === void 0 ? void 0 : (_data$data6 = data.data) === null || _data$data6 === void 0 ? void 0 : (_data$data6$ = _data$data6[0]) === null || _data$data6$ === void 0 ? void 0 : _data$data6$.description) : null, sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : (_sectionData$$buttons = _sectionData$.buttons) === null || _sectionData$$buttons === void 0 ? void 0 : _sectionData$$buttons.map(function (button) {
|
|
1281
1303
|
return button !== null && button !== void 0 && button.label && (button !== null && button !== void 0 && button.route || button !== null && button !== void 0 && button.link) ? /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
@@ -1322,13 +1344,16 @@ var Hero10 = function Hero10(props) {
|
|
|
1322
1344
|
|
|
1323
1345
|
var SECTION_DEFAULT_CLASS = "my-12 mx-4 xl:mx-20 bg-background";
|
|
1324
1346
|
var SECTION_CLASS = "my-6 md:my-12 px-4 xl:px-20 bg-background";
|
|
1347
|
+
var SECTION_CLASS_PADDING = "py-6 md:py-12 px-4 xl:px-20 bg-background";
|
|
1325
1348
|
|
|
1326
1349
|
var Hero11 = function Hero11(props) {
|
|
1327
|
-
var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data2$$title, _data$data3, _data$data3
|
|
1350
|
+
var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data2$$title, _data$data3, _data$data3$, _data$data4, _data$data4$, _data$data4$$buttons;
|
|
1328
1351
|
var _props$data = props.data,
|
|
1329
1352
|
data = _props$data === void 0 ? {} : _props$data,
|
|
1330
1353
|
_props$shopConfigStyl = props.shopConfigStyle,
|
|
1331
|
-
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl
|
|
1354
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
1355
|
+
_props$Link = props.Link,
|
|
1356
|
+
Link = _props$Link === void 0 ? null : _props$Link;
|
|
1332
1357
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
1333
1358
|
className: SECTION_CLASS + " grid grid-cols-1 md:grid-cols-2 py-12 !bg-bgSecondary gap-6 md:gap-12"
|
|
1334
1359
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -1356,11 +1381,16 @@ var Hero11 = function Hero11(props) {
|
|
|
1356
1381
|
className: "text-2xl md:text-4xl !leading-[1.6] font-headingFont w-max text-center text-primary"
|
|
1357
1382
|
}, data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : (_data$data2$ = _data$data2[0]) === null || _data$data2$ === void 0 ? void 0 : (_data$data2$$title = _data$data2$.title) === null || _data$data2$$title === void 0 ? void 0 : _data$data2$$title.toUpperCase()), /*#__PURE__*/React__default.createElement("div", {
|
|
1358
1383
|
className: "text-lg md:text-xl lg:text-2xl"
|
|
1359
|
-
}, data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : (_data$data3$ = _data$data3[0]) === null || _data$data3$ === void 0 ? void 0 : _data$data3$.description),
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1384
|
+
}, data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : (_data$data3$ = _data$data3[0]) === null || _data$data3$ === void 0 ? void 0 : _data$data3$.description), data === null || data === void 0 ? void 0 : (_data$data4 = data.data) === null || _data$data4 === void 0 ? void 0 : (_data$data4$ = _data$data4[0]) === null || _data$data4$ === void 0 ? void 0 : (_data$data4$$buttons = _data$data4$.buttons) === null || _data$data4$$buttons === void 0 ? void 0 : _data$data4$$buttons.map(function (button, index) {
|
|
1385
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
1386
|
+
Link: Link,
|
|
1387
|
+
key: "gdf-" + index,
|
|
1388
|
+
href: convertURL(button === null || button === void 0 ? void 0 : button.route) || (button === null || button === void 0 ? void 0 : button.link) || "#"
|
|
1389
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
1390
|
+
label: button === null || button === void 0 ? void 0 : button.label,
|
|
1391
|
+
shopConfigStyle: shopConfigStyle,
|
|
1392
|
+
className: "!font-normal w-max"
|
|
1393
|
+
}));
|
|
1364
1394
|
})));
|
|
1365
1395
|
};
|
|
1366
1396
|
|
|
@@ -1386,113 +1416,6 @@ var Hero12 = function Hero12(props) {
|
|
|
1386
1416
|
}, data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : (_data$data3$ = _data$data3[0]) === null || _data$data3$ === void 0 ? void 0 : _data$data3$.description)));
|
|
1387
1417
|
};
|
|
1388
1418
|
|
|
1389
|
-
var CarouselItem = function CarouselItem(props) {
|
|
1390
|
-
var _Object$keys;
|
|
1391
|
-
var _props$data = props.data,
|
|
1392
|
-
data = _props$data === void 0 ? [] : _props$data,
|
|
1393
|
-
_props$className = props.className,
|
|
1394
|
-
className = _props$className === void 0 ? "" : _props$className,
|
|
1395
|
-
_props$style = props.style,
|
|
1396
|
-
style = _props$style === void 0 ? {} : _props$style,
|
|
1397
|
-
_props$onClick = props.onClick,
|
|
1398
|
-
onClick = _props$onClick === void 0 ? function () {} : _props$onClick,
|
|
1399
|
-
_props$isAll = props.isAll,
|
|
1400
|
-
isAll = _props$isAll === void 0 ? true : _props$isAll,
|
|
1401
|
-
_props$isNavigateButt = props.isNavigateButton,
|
|
1402
|
-
isNavigateButton = _props$isNavigateButt === void 0 ? true : _props$isNavigateButt,
|
|
1403
|
-
_props$itemClassName = props.itemClassName,
|
|
1404
|
-
itemClassName = _props$itemClassName === void 0 ? "" : _props$itemClassName;
|
|
1405
|
-
var listRef = React.useRef(null);
|
|
1406
|
-
var _useState = React.useState(false),
|
|
1407
|
-
canScrollLeft = _useState[0],
|
|
1408
|
-
setCanScrollLeft = _useState[1];
|
|
1409
|
-
var _useState2 = React.useState(false),
|
|
1410
|
-
canScrollRight = _useState2[0],
|
|
1411
|
-
setCanScrollRight = _useState2[1];
|
|
1412
|
-
var _useState3 = React.useState({}),
|
|
1413
|
-
value = _useState3[0],
|
|
1414
|
-
setValue = _useState3[1];
|
|
1415
|
-
React.useEffect(function () {
|
|
1416
|
-
var _listRef$current;
|
|
1417
|
-
checkScroll();
|
|
1418
|
-
(_listRef$current = listRef.current) === null || _listRef$current === void 0 ? void 0 : _listRef$current.addEventListener("scroll", checkScroll);
|
|
1419
|
-
return function () {
|
|
1420
|
-
var _listRef$current2;
|
|
1421
|
-
return (_listRef$current2 = listRef.current) === null || _listRef$current2 === void 0 ? void 0 : _listRef$current2.removeEventListener("scroll", checkScroll);
|
|
1422
|
-
};
|
|
1423
|
-
}, [data]);
|
|
1424
|
-
var checkScroll = function checkScroll() {
|
|
1425
|
-
if (listRef.current) {
|
|
1426
|
-
var _listRef$current3 = listRef.current,
|
|
1427
|
-
scrollLeft = _listRef$current3.scrollLeft,
|
|
1428
|
-
scrollWidth = _listRef$current3.scrollWidth,
|
|
1429
|
-
clientWidth = _listRef$current3.clientWidth;
|
|
1430
|
-
setCanScrollLeft(scrollLeft > 0);
|
|
1431
|
-
setCanScrollRight(scrollLeft + clientWidth < scrollWidth - 1);
|
|
1432
|
-
}
|
|
1433
|
-
};
|
|
1434
|
-
var handleClickPrevImg = function handleClickPrevImg() {
|
|
1435
|
-
if (listRef.current) {
|
|
1436
|
-
checkScroll();
|
|
1437
|
-
listRef.current.scrollBy({
|
|
1438
|
-
left: -300,
|
|
1439
|
-
behavior: "smooth"
|
|
1440
|
-
});
|
|
1441
|
-
}
|
|
1442
|
-
};
|
|
1443
|
-
var handleClickNextImg = function handleClickNextImg() {
|
|
1444
|
-
if (listRef.current) {
|
|
1445
|
-
checkScroll();
|
|
1446
|
-
listRef.current.scrollBy({
|
|
1447
|
-
left: 300,
|
|
1448
|
-
behavior: "smooth"
|
|
1449
|
-
});
|
|
1450
|
-
}
|
|
1451
|
-
};
|
|
1452
|
-
var handleOnClick = function handleOnClick(item) {
|
|
1453
|
-
setValue(item);
|
|
1454
|
-
onClick === null || onClick === void 0 ? void 0 : onClick(item);
|
|
1455
|
-
};
|
|
1456
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
1457
|
-
className: "h-10 md:h-12 flex justify-between items-center " + className,
|
|
1458
|
-
style: style
|
|
1459
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
1460
|
-
className: "w-full overflow-hidden "
|
|
1461
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
1462
|
-
className: "flex overflow-x-auto gap-2 " + (isNavigateButton ? "no-scrollbar" : "scroll-custom pb-2") + " items-center",
|
|
1463
|
-
ref: listRef
|
|
1464
|
-
}, isAll ? /*#__PURE__*/React__default.createElement("div", {
|
|
1465
|
-
className: " " + ((Object === null || Object === void 0 ? void 0 : (_Object$keys = Object.keys(value)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length) <= 0 ? "bg-primary text-textButton" : "bg-background") + " w-max border border-primary p-1 md:p-2 rounded-lg cursor-pointer whitespace-nowrap",
|
|
1466
|
-
onClick: function onClick() {
|
|
1467
|
-
handleOnClick({});
|
|
1468
|
-
}
|
|
1469
|
-
}, "T\u1EA5t c\u1EA3") : null, data && (data === null || data === void 0 ? void 0 : data.length) > 0 && (data === null || data === void 0 ? void 0 : data.map(function (item, index) {
|
|
1470
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
1471
|
-
className: ((value === null || value === void 0 ? void 0 : value.value) === (item === null || item === void 0 ? void 0 : item.value) ? "bg-primary text-textButton" : "bg-background") + " w-max border border-primary py-1 px-2 md:py-2 md:px-3 rounded-lg cursor-pointer whitespace-nowrap " + itemClassName,
|
|
1472
|
-
key: "carousel-" + index,
|
|
1473
|
-
onClick: function onClick() {
|
|
1474
|
-
handleOnClick(item);
|
|
1475
|
-
}
|
|
1476
|
-
}, item === null || item === void 0 ? void 0 : item.label);
|
|
1477
|
-
})))), isNavigateButton ? /*#__PURE__*/React__default.createElement("div", {
|
|
1478
|
-
className: "hidden my-auto gap-4 md:flex justify-end ps-10"
|
|
1479
|
-
}, /*#__PURE__*/React__default.createElement("button", {
|
|
1480
|
-
className: "h-full w-9 h-9 md:h-11 md:w-11 items-center justify-center rounded-full " + (canScrollLeft ? "bg-primary cursor-pointer text-textButton" : "bg-gray5 text-gray3 cursor-not-allowed"),
|
|
1481
|
-
onClick: handleClickPrevImg,
|
|
1482
|
-
disabled: !canScrollLeft
|
|
1483
|
-
}, /*#__PURE__*/React__default.createElement(io.IoIosArrowBack, {
|
|
1484
|
-
size: 24,
|
|
1485
|
-
className: "inline-block text-lg"
|
|
1486
|
-
})), /*#__PURE__*/React__default.createElement("button", {
|
|
1487
|
-
className: "h-full w-9 h-9 md:h-11 md:w-11 flex items-center justify-center rounded-full " + (canScrollRight ? "bg-primary cursor-pointer text-textButton" : "bg-gray5 text-gray3 cursor-not-allowed"),
|
|
1488
|
-
onClick: handleClickNextImg,
|
|
1489
|
-
disabled: !canScrollRight
|
|
1490
|
-
}, /*#__PURE__*/React__default.createElement(io.IoIosArrowForward, {
|
|
1491
|
-
size: 24,
|
|
1492
|
-
className: "inline-block text-lg "
|
|
1493
|
-
}))) : null);
|
|
1494
|
-
};
|
|
1495
|
-
|
|
1496
1419
|
// A type of promise-like that resolves synchronously and supports only one observer
|
|
1497
1420
|
|
|
1498
1421
|
const _iteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator"))) : "@@iterator";
|
|
@@ -1512,6 +1435,19 @@ function _catch(body, recover) {
|
|
|
1512
1435
|
return result;
|
|
1513
1436
|
}
|
|
1514
1437
|
|
|
1438
|
+
// Asynchronously await a promise and pass the result to a finally continuation
|
|
1439
|
+
function _finallyRethrows(body, finalizer) {
|
|
1440
|
+
try {
|
|
1441
|
+
var result = body();
|
|
1442
|
+
} catch (e) {
|
|
1443
|
+
return finalizer(true, e);
|
|
1444
|
+
}
|
|
1445
|
+
if (result && result.then) {
|
|
1446
|
+
return result.then(finalizer.bind(null, false), finalizer.bind(null, true));
|
|
1447
|
+
}
|
|
1448
|
+
return finalizer(false, result);
|
|
1449
|
+
}
|
|
1450
|
+
|
|
1515
1451
|
function bind(fn, thisArg) {
|
|
1516
1452
|
return function wrap() {
|
|
1517
1453
|
return fn.apply(thisArg, arguments);
|
|
@@ -7603,6 +7539,14 @@ var formatCurrency = function formatCurrency(amount) {
|
|
|
7603
7539
|
var formattedAmount = roundedAmount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, '.');
|
|
7604
7540
|
return formattedAmount + " \u20AB";
|
|
7605
7541
|
};
|
|
7542
|
+
var formatCurrency2 = function formatCurrency2(amount) {
|
|
7543
|
+
if (isNaN(amount)) {
|
|
7544
|
+
return 'đ 0';
|
|
7545
|
+
}
|
|
7546
|
+
var roundedAmount = Math.round(amount);
|
|
7547
|
+
var formattedAmount = roundedAmount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, '.');
|
|
7548
|
+
return "\u0111 " + formattedAmount;
|
|
7549
|
+
};
|
|
7606
7550
|
var pattern = {
|
|
7607
7551
|
phoneNumberPattern: /^(?:\+84|0)\d{9}$/
|
|
7608
7552
|
};
|
|
@@ -7698,106 +7642,282 @@ var CategoryController = function CategoryController(props) {
|
|
|
7698
7642
|
|
|
7699
7643
|
var Hero13 = function Hero13(props) {
|
|
7700
7644
|
var _sectionData$, _sectionData$$srcImag, _data$data, _data$data$;
|
|
7701
|
-
var
|
|
7702
|
-
|
|
7703
|
-
var data = props.data;
|
|
7645
|
+
var shopConfig = props.shopConfig,
|
|
7646
|
+
data = props.data;
|
|
7704
7647
|
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
7705
|
-
var _CategoryController = CategoryController(props);
|
|
7706
7648
|
return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("img", {
|
|
7707
7649
|
src: sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : (_sectionData$$srcImag = _sectionData$.srcImages) === null || _sectionData$$srcImag === void 0 ? void 0 : _sectionData$$srcImag[0],
|
|
7708
7650
|
alt: data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : _data$data$.title,
|
|
7709
7651
|
className: "w-full object-cover"
|
|
7710
|
-
})
|
|
7711
|
-
|
|
7712
|
-
|
|
7713
|
-
|
|
7714
|
-
var data = props.data;
|
|
7715
|
-
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
7716
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
7717
|
-
className: "" + SECTION_DEFAULT_CLASS
|
|
7652
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
7653
|
+
className: "fixed right-6 bottom-10 md:bottom-24 z-50 flex flex-col gap-4 w-max"
|
|
7654
|
+
}, (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopPhone) && /*#__PURE__*/React__default.createElement("a", {
|
|
7655
|
+
href: "tel:" + (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopPhone)
|
|
7718
7656
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7719
|
-
className: "
|
|
7720
|
-
},
|
|
7721
|
-
|
|
7722
|
-
|
|
7723
|
-
|
|
7724
|
-
|
|
7725
|
-
|
|
7726
|
-
|
|
7727
|
-
|
|
7728
|
-
|
|
7729
|
-
|
|
7730
|
-
|
|
7731
|
-
|
|
7732
|
-
|
|
7733
|
-
|
|
7734
|
-
|
|
7657
|
+
className: "relative w-max"
|
|
7658
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
7659
|
+
className: "absolute inset-0 rounded-full bg-primary opacity-30 animate-ping"
|
|
7660
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
7661
|
+
className: "relative z-10 p-2 rounded-full bg-primary text-textButton animate-bounce"
|
|
7662
|
+
}, /*#__PURE__*/React__default.createElement(ai.AiOutlinePhone, {
|
|
7663
|
+
size: 36
|
|
7664
|
+
})))), (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopMessenger) && /*#__PURE__*/React__default.createElement("a", {
|
|
7665
|
+
href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopMessenger) || "#",
|
|
7666
|
+
target: "_blank"
|
|
7667
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7668
|
+
className: "relative w-max"
|
|
7669
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
7670
|
+
className: "absolute inset-0 rounded-full bg-primary opacity-30 animate-ping"
|
|
7671
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
7672
|
+
className: "relative z-10 p-2 rounded-full bg-primary text-textButton animate-bounce"
|
|
7673
|
+
}, /*#__PURE__*/React__default.createElement(fa.FaFacebookMessenger, {
|
|
7674
|
+
size: 32
|
|
7675
|
+
})))), (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopZalo) && /*#__PURE__*/React__default.createElement("a", {
|
|
7676
|
+
href: "https://zalo.me/" + (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopZalo) || "#",
|
|
7677
|
+
target: "_blank"
|
|
7678
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7679
|
+
className: "relative w-max"
|
|
7680
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
7681
|
+
className: "absolute inset-0 rounded-full bg-primary opacity-30 animate-ping"
|
|
7682
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
7683
|
+
className: "relative z-10 p-2 rounded-full bg-primary text-textButton animate-bounce"
|
|
7684
|
+
}, /*#__PURE__*/React__default.createElement(si.SiZalo, {
|
|
7685
|
+
size: 32
|
|
7686
|
+
}))))));
|
|
7735
7687
|
};
|
|
7736
7688
|
|
|
7737
|
-
var
|
|
7738
|
-
var _data$
|
|
7689
|
+
var Hero14 = function Hero14(props) {
|
|
7690
|
+
var _data$data, _data$data$, _data$data$$srcImages, _sectionData$, _sectionData$2, _sectionData$3, _sectionData$4, _sectionData$4$button;
|
|
7739
7691
|
var shopConfigStyle = props.shopConfigStyle,
|
|
7740
|
-
shopConfig = props.shopConfig,
|
|
7741
7692
|
data = props.data,
|
|
7742
|
-
_props$SectionTitle = props.SectionTitle,
|
|
7743
|
-
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
|
|
7744
7693
|
_props$Link = props.Link,
|
|
7745
7694
|
Link = _props$Link === void 0 ? null : _props$Link;
|
|
7746
7695
|
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
7747
|
-
data.sectionTitle = data === null || data === void 0 ? void 0 : (_data$sectionTitle = data.sectionTitle) === null || _data$sectionTitle === void 0 ? void 0 : _data$sectionTitle.replace("{shopName}", shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName);
|
|
7748
|
-
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
7749
|
-
_shopConfigStyle$colo3 = _shopConfigStyle$colo.textBody,
|
|
7750
|
-
textBody = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
|
|
7751
|
-
_shopConfigStyle$colo4 = _shopConfigStyle$colo.background,
|
|
7752
|
-
background = _shopConfigStyle$colo4 === void 0 ? "#fff" : _shopConfigStyle$colo4,
|
|
7753
|
-
_shopConfigStyle$colo5 = _shopConfigStyle$colo.bgSecondary,
|
|
7754
|
-
bgSecondary = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5;
|
|
7755
7696
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
7756
|
-
className:
|
|
7697
|
+
className: "relative w-full bg-cover bg-center bg-no-repeat ",
|
|
7757
7698
|
style: {
|
|
7758
|
-
|
|
7759
|
-
color: textBody
|
|
7699
|
+
backgroundImage: "url(" + (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : (_data$data$$srcImages = _data$data$.srcImages) === null || _data$data$$srcImages === void 0 ? void 0 : _data$data$$srcImages[0]) + ")"
|
|
7760
7700
|
}
|
|
7761
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
7762
|
-
|
|
7763
|
-
shopConfigStyle: shopConfigStyle
|
|
7701
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7702
|
+
className: "absolute top-0 w-full h-full bg-black opacity-40 z-0"
|
|
7764
7703
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
7765
|
-
className: "
|
|
7766
|
-
},
|
|
7704
|
+
className: "relative w-full min-h-[540px] p-12 z-10 flex flex-col gap-6 items-center justify-end bg-gradient-to-t from-black/50 to-transparent"
|
|
7705
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7706
|
+
className: "text-3xl md:text-5xl text-white leading-[1.6] md:leading-[1.6] text-center font-headingFont"
|
|
7707
|
+
}, sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : _sectionData$.title), sectionData !== null && sectionData !== void 0 && (_sectionData$2 = sectionData[0]) !== null && _sectionData$2 !== void 0 && _sectionData$2.description ? /*#__PURE__*/React__default.createElement("div", {
|
|
7708
|
+
className: "text-lg text-center text-white md:text-2xl"
|
|
7709
|
+
}, sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$3 = sectionData[0]) === null || _sectionData$3 === void 0 ? void 0 : _sectionData$3.description) : null, sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$4 = sectionData[0]) === null || _sectionData$4 === void 0 ? void 0 : (_sectionData$4$button = _sectionData$4.buttons) === null || _sectionData$4$button === void 0 ? void 0 : _sectionData$4$button.map(function (button, index) {
|
|
7767
7710
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
7768
7711
|
Link: Link,
|
|
7769
|
-
|
|
7770
|
-
|
|
7771
|
-
|
|
7772
|
-
|
|
7773
|
-
|
|
7774
|
-
|
|
7775
|
-
|
|
7776
|
-
}, /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.title), item !== null && item !== void 0 && item.svgImage ? /*#__PURE__*/React__default.createElement("div", {
|
|
7777
|
-
className: "w-12 text-primary md:w-20 lg:w-24 xl:w-32 h-auto"
|
|
7778
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7779
|
-
dangerouslySetInnerHTML: {
|
|
7780
|
-
__html: configSvg(item === null || item === void 0 ? void 0 : item.svgImage)
|
|
7781
|
-
}
|
|
7782
|
-
})) : /*#__PURE__*/React__default.createElement("img", {
|
|
7783
|
-
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
7784
|
-
className: "w-12 text-primary md:w-20 lg:w-24 xl:w-32 object-cover",
|
|
7785
|
-
alt: ""
|
|
7786
|
-
})));
|
|
7712
|
+
key: "gdf-" + index,
|
|
7713
|
+
href: convertURL(button === null || button === void 0 ? void 0 : button.route) || (button === null || button === void 0 ? void 0 : button.link) || "#"
|
|
7714
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
7715
|
+
label: button === null || button === void 0 ? void 0 : button.label,
|
|
7716
|
+
className: "!bg-secondary",
|
|
7717
|
+
shopConfigStyle: shopConfigStyle
|
|
7718
|
+
}));
|
|
7787
7719
|
})));
|
|
7788
7720
|
};
|
|
7789
7721
|
|
|
7790
|
-
var
|
|
7791
|
-
var
|
|
7792
|
-
|
|
7793
|
-
_props$
|
|
7794
|
-
|
|
7795
|
-
|
|
7796
|
-
|
|
7797
|
-
|
|
7798
|
-
|
|
7799
|
-
|
|
7800
|
-
|
|
7722
|
+
var Hero15 = function Hero15(props) {
|
|
7723
|
+
var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data2$$title, _data$data3, _data$data3$, _data$data4, _data$data4$, _data$data4$$buttons, _data$data5, _data$data5$, _data$data5$$buttons, _data$data5$$buttons$, _data$data6, _data$data6$, _data$data6$$buttons, _data$data6$$buttons$, _data$data7, _data$data7$, _data$data7$$buttons, _data$data7$$buttons$, _data$data8, _data$data8$, _data$data8$$srcImage;
|
|
7724
|
+
var _props$data = props.data,
|
|
7725
|
+
data = _props$data === void 0 ? {} : _props$data,
|
|
7726
|
+
_props$shopConfigStyl = props.shopConfigStyle,
|
|
7727
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
7728
|
+
_props$Link = props.Link,
|
|
7729
|
+
Link = _props$Link === void 0 ? null : _props$Link;
|
|
7730
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
7731
|
+
className: SECTION_CLASS + " grid grid-cols-1 md:grid-cols-2 py-12 !bg-primary gap-6 md:gap-10"
|
|
7732
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
7733
|
+
src: data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : (_data$data$$srcImages = _data$data$.srcImages) === null || _data$data$$srcImages === void 0 ? void 0 : _data$data$$srcImages[0],
|
|
7734
|
+
className: "object-cover max-w-full h-auto border-4 border-secondary block md:hidden"
|
|
7735
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
7736
|
+
className: "relative flex flex-col justify-center gap-6 lg:gap-10"
|
|
7737
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7738
|
+
className: "text-2xl md:text-4xl !leading-[1.6] font-headingFont text-textSecondary"
|
|
7739
|
+
}, data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : (_data$data2$ = _data$data2[0]) === null || _data$data2$ === void 0 ? void 0 : (_data$data2$$title = _data$data2$.title) === null || _data$data2$$title === void 0 ? void 0 : _data$data2$$title.toUpperCase()), /*#__PURE__*/React__default.createElement("div", {
|
|
7740
|
+
className: "text-lg text-textButton"
|
|
7741
|
+
}, data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : (_data$data3$ = _data$data3[0]) === null || _data$data3$ === void 0 ? void 0 : _data$data3$.description), /*#__PURE__*/React__default.createElement("hr", {
|
|
7742
|
+
className: "w-1/3"
|
|
7743
|
+
}), (data === null || data === void 0 ? void 0 : (_data$data4 = data.data) === null || _data$data4 === void 0 ? void 0 : (_data$data4$ = _data$data4[0]) === null || _data$data4$ === void 0 ? void 0 : (_data$data4$$buttons = _data$data4$.buttons) === null || _data$data4$$buttons === void 0 ? void 0 : _data$data4$$buttons.length) > 0 ? /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
7744
|
+
Link: Link,
|
|
7745
|
+
href: convertURL(data === null || data === void 0 ? void 0 : (_data$data5 = data.data) === null || _data$data5 === void 0 ? void 0 : (_data$data5$ = _data$data5[0]) === null || _data$data5$ === void 0 ? void 0 : (_data$data5$$buttons = _data$data5$.buttons) === null || _data$data5$$buttons === void 0 ? void 0 : (_data$data5$$buttons$ = _data$data5$$buttons[0]) === null || _data$data5$$buttons$ === void 0 ? void 0 : _data$data5$$buttons$.route) || (data === null || data === void 0 ? void 0 : (_data$data6 = data.data) === null || _data$data6 === void 0 ? void 0 : (_data$data6$ = _data$data6[0]) === null || _data$data6$ === void 0 ? void 0 : (_data$data6$$buttons = _data$data6$.buttons) === null || _data$data6$$buttons === void 0 ? void 0 : (_data$data6$$buttons$ = _data$data6$$buttons[0]) === null || _data$data6$$buttons$ === void 0 ? void 0 : _data$data6$$buttons$.link) || "#"
|
|
7746
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
7747
|
+
label: data === null || data === void 0 ? void 0 : (_data$data7 = data.data) === null || _data$data7 === void 0 ? void 0 : (_data$data7$ = _data$data7[0]) === null || _data$data7$ === void 0 ? void 0 : (_data$data7$$buttons = _data$data7$.buttons) === null || _data$data7$$buttons === void 0 ? void 0 : (_data$data7$$buttons$ = _data$data7$$buttons[0]) === null || _data$data7$$buttons$ === void 0 ? void 0 : _data$data7$$buttons$.label,
|
|
7748
|
+
shopConfigStyle: shopConfigStyle,
|
|
7749
|
+
className: "!font-normal w-max !bg-secondary"
|
|
7750
|
+
})) : null), /*#__PURE__*/React__default.createElement("img", {
|
|
7751
|
+
src: data === null || data === void 0 ? void 0 : (_data$data8 = data.data) === null || _data$data8 === void 0 ? void 0 : (_data$data8$ = _data$data8[0]) === null || _data$data8$ === void 0 ? void 0 : (_data$data8$$srcImage = _data$data8$.srcImages) === null || _data$data8$$srcImage === void 0 ? void 0 : _data$data8$$srcImage[0],
|
|
7752
|
+
className: "object-cover max-w-full h-auto border-4 border-secondary hidden md:block"
|
|
7753
|
+
}));
|
|
7754
|
+
};
|
|
7755
|
+
|
|
7756
|
+
var Hero16 = function Hero16(props) {
|
|
7757
|
+
var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data3, _data$data3$, _data$data4, _data$data4$, _data$data4$$srcImage;
|
|
7758
|
+
var _props$data = props.data,
|
|
7759
|
+
data = _props$data === void 0 ? {} : _props$data,
|
|
7760
|
+
_props$shopConfigStyl = props.shopConfigStyle,
|
|
7761
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
7762
|
+
_props$router = props.router,
|
|
7763
|
+
router = _props$router === void 0 ? function () {} : _props$router,
|
|
7764
|
+
_props$Link = props.Link,
|
|
7765
|
+
Link = _props$Link === void 0 ? null : _props$Link;
|
|
7766
|
+
var _useState = React.useState(""),
|
|
7767
|
+
value = _useState[0],
|
|
7768
|
+
setValue = _useState[1];
|
|
7769
|
+
var handleSearch = function handleSearch(e) {
|
|
7770
|
+
if ((e === null || e === void 0 ? void 0 : e.key) === "Enter" && value && value.length > 0) {
|
|
7771
|
+
router === null || router === void 0 ? void 0 : router.push(genLinkSearch(value));
|
|
7772
|
+
}
|
|
7773
|
+
};
|
|
7774
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
7775
|
+
className: "min-h-[480px] w-full h-full relative"
|
|
7776
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
7777
|
+
src: data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : (_data$data$$srcImages = _data$data$.srcImages) === null || _data$data$$srcImages === void 0 ? void 0 : _data$data$$srcImages[0],
|
|
7778
|
+
className: "object-cover w-full h-full min-h-[480px]"
|
|
7779
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
7780
|
+
className: "absolute top-0 left-0 z-0 bg-secondary opacity-80 w-full h-full"
|
|
7781
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
7782
|
+
className: "w-full sm:w-2/3 absolute z-20 top-[15%] md:top-1/3 left-0 z-10 px-4 xl:px-20 flex flex-col gap-6 text-textButton my-auto"
|
|
7783
|
+
}, /*#__PURE__*/React__default.createElement("h2", {
|
|
7784
|
+
className: "font-medium text-2xl lg:text-4xl"
|
|
7785
|
+
}, data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : (_data$data2$ = _data$data2[0]) === null || _data$data2$ === void 0 ? void 0 : _data$data2$.title), /*#__PURE__*/React__default.createElement("div", {
|
|
7786
|
+
className: " text-lg lg:text-2xl"
|
|
7787
|
+
}, data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : (_data$data3$ = _data$data3[0]) === null || _data$data3$ === void 0 ? void 0 : _data$data3$.description), /*#__PURE__*/React__default.createElement("div", {
|
|
7788
|
+
className: "flex flex-col sm:flex-row gap-4 w-full"
|
|
7789
|
+
}, /*#__PURE__*/React__default.createElement(Input, {
|
|
7790
|
+
wrapClassName: "w-2/3 sm:w-[80%] xl:w-[85%]",
|
|
7791
|
+
icons: /*#__PURE__*/React__default.createElement(lu.LuSearch, {
|
|
7792
|
+
className: "text-gray3",
|
|
7793
|
+
size: 18
|
|
7794
|
+
}),
|
|
7795
|
+
placeholder: "Nh\u1EADp t\xEAn s\u1EA3n ph\u1EA9m",
|
|
7796
|
+
inputClassName: "w-full text-textBody",
|
|
7797
|
+
className: "h-12",
|
|
7798
|
+
onKeyDown: function onKeyDown(e) {
|
|
7799
|
+
handleSearch(e);
|
|
7800
|
+
},
|
|
7801
|
+
onChange: setValue
|
|
7802
|
+
}), value && (value === null || value === void 0 ? void 0 : value.length) > 0 ? /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
7803
|
+
Link: Link,
|
|
7804
|
+
href: genLinkSearch(value)
|
|
7805
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
7806
|
+
label: "T\xECm ki\u1EBFm",
|
|
7807
|
+
className: "whitespace-nowrap h-12 w-max",
|
|
7808
|
+
shopConfigStyle: shopConfigStyle
|
|
7809
|
+
})) : /*#__PURE__*/React__default.createElement(Button, {
|
|
7810
|
+
label: "T\xECm ki\u1EBFm",
|
|
7811
|
+
className: "whitespace-nowrap w-max h-12",
|
|
7812
|
+
shopConfigStyle: shopConfigStyle
|
|
7813
|
+
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
7814
|
+
className: "absolute bottom-0 right-0 text-primary w-[45%] z-10"
|
|
7815
|
+
}, /*#__PURE__*/React__default.createElement("svg", {
|
|
7816
|
+
viewBox: "0 0 480 212",
|
|
7817
|
+
fill: "none",
|
|
7818
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
7819
|
+
}, /*#__PURE__*/React__default.createElement("path", {
|
|
7820
|
+
d: "M75.1847 149.804C55 189.553 14.9932 204.532 0 212H480V0C424.514 20.7319 393 94.1529 216.361 62.1956C120.186 44.7957 96.1405 108.537 75.1847 149.804Z",
|
|
7821
|
+
fill: "currentColor"
|
|
7822
|
+
}))), /*#__PURE__*/React__default.createElement("img", {
|
|
7823
|
+
src: data === null || data === void 0 ? void 0 : (_data$data4 = data.data) === null || _data$data4 === void 0 ? void 0 : (_data$data4$ = _data$data4[0]) === null || _data$data4$ === void 0 ? void 0 : (_data$data4$$srcImage = _data$data4$.srcImages) === null || _data$data4$$srcImage === void 0 ? void 0 : _data$data4$$srcImage[1],
|
|
7824
|
+
className: "object-cover w-[25%] h-auto max-h-full absolute right-10 opacity-100 bottom-0 z-10"
|
|
7825
|
+
}));
|
|
7826
|
+
};
|
|
7827
|
+
|
|
7828
|
+
var Features2 = function Features2(props) {
|
|
7829
|
+
var data = props.data,
|
|
7830
|
+
_props$Link = props.Link,
|
|
7831
|
+
Link = _props$Link === void 0 ? null : _props$Link;
|
|
7832
|
+
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
7833
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
7834
|
+
className: "" + SECTION_DEFAULT_CLASS
|
|
7835
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7836
|
+
className: "p-6 grid grid-cols-2 md:grid-cols-4 gap-4 md:gap-6 lg:gap-8 rounded-xl bg-bgSecondary"
|
|
7837
|
+
}, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
|
|
7838
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
7839
|
+
Link: Link,
|
|
7840
|
+
href: convertURL(item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#"
|
|
7841
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7842
|
+
className: "flex flex-col gap-2 items-center text-sm lg:text-lg font-semibold text-center",
|
|
7843
|
+
key: "dfgg-" + index
|
|
7844
|
+
}, item !== null && item !== void 0 && item.svgImage ? /*#__PURE__*/React__default.createElement("div", {
|
|
7845
|
+
className: "w-12 text-primary md:w-16 lg:w-20 xl:w-24 aspect-square",
|
|
7846
|
+
dangerouslySetInnerHTML: {
|
|
7847
|
+
__html: configSvg(item === null || item === void 0 ? void 0 : item.svgImage)
|
|
7848
|
+
}
|
|
7849
|
+
}) : /*#__PURE__*/React__default.createElement("img", {
|
|
7850
|
+
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
7851
|
+
className: "w-12 md:w-16 lg:w-20 object-contain xl:w-24 aspect-square text-primary",
|
|
7852
|
+
alt: "logo"
|
|
7853
|
+
}), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.title)));
|
|
7854
|
+
})));
|
|
7855
|
+
};
|
|
7856
|
+
|
|
7857
|
+
var Features3 = function Features3(props) {
|
|
7858
|
+
var _data$sectionTitle;
|
|
7859
|
+
var shopConfigStyle = props.shopConfigStyle,
|
|
7860
|
+
shopConfig = props.shopConfig,
|
|
7861
|
+
data = props.data,
|
|
7862
|
+
_props$SectionTitle = props.SectionTitle,
|
|
7863
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
|
|
7864
|
+
_props$Link = props.Link,
|
|
7865
|
+
Link = _props$Link === void 0 ? null : _props$Link;
|
|
7866
|
+
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
7867
|
+
data.sectionTitle = data === null || data === void 0 ? void 0 : (_data$sectionTitle = data.sectionTitle) === null || _data$sectionTitle === void 0 ? void 0 : _data$sectionTitle.replace("{shopName}", shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName);
|
|
7868
|
+
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
7869
|
+
_shopConfigStyle$colo3 = _shopConfigStyle$colo.textBody,
|
|
7870
|
+
textBody = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
|
|
7871
|
+
_shopConfigStyle$colo4 = _shopConfigStyle$colo.background,
|
|
7872
|
+
background = _shopConfigStyle$colo4 === void 0 ? "#fff" : _shopConfigStyle$colo4,
|
|
7873
|
+
_shopConfigStyle$colo5 = _shopConfigStyle$colo.bgSecondary,
|
|
7874
|
+
bgSecondary = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5;
|
|
7875
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
7876
|
+
className: SECTION_DEFAULT_CLASS + " flex flex-col gap-4 lg:gap-6",
|
|
7877
|
+
style: {
|
|
7878
|
+
background: background,
|
|
7879
|
+
color: textBody
|
|
7880
|
+
}
|
|
7881
|
+
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
7882
|
+
data: data,
|
|
7883
|
+
shopConfigStyle: shopConfigStyle
|
|
7884
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
7885
|
+
className: "grid grid-cols-2 sm:grid-cols-4 gap-6 text-sm md:text-base"
|
|
7886
|
+
}, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
|
|
7887
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
7888
|
+
Link: Link,
|
|
7889
|
+
href: (item === null || item === void 0 ? void 0 : item.link) || convertURL(item === null || item === void 0 ? void 0 : item.route) || "#"
|
|
7890
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7891
|
+
className: "grid grid-cols-2 p-3 h-full w-full rounded-lg font-semibold",
|
|
7892
|
+
key: "dfsdfj-" + index,
|
|
7893
|
+
style: {
|
|
7894
|
+
background: bgSecondary
|
|
7895
|
+
}
|
|
7896
|
+
}, /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.title), item !== null && item !== void 0 && item.svgImage ? /*#__PURE__*/React__default.createElement("div", {
|
|
7897
|
+
className: "w-12 text-primary md:w-20 lg:w-24 xl:w-32 h-auto"
|
|
7898
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7899
|
+
dangerouslySetInnerHTML: {
|
|
7900
|
+
__html: configSvg(item === null || item === void 0 ? void 0 : item.svgImage)
|
|
7901
|
+
}
|
|
7902
|
+
})) : /*#__PURE__*/React__default.createElement("img", {
|
|
7903
|
+
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
7904
|
+
className: "w-12 text-primary md:w-20 lg:w-24 xl:w-32 object-cover",
|
|
7905
|
+
alt: ""
|
|
7906
|
+
})));
|
|
7907
|
+
})));
|
|
7908
|
+
};
|
|
7909
|
+
|
|
7910
|
+
var ProductController = function ProductController(props) {
|
|
7911
|
+
var shopConfig = props.shopConfig,
|
|
7912
|
+
params = props.params,
|
|
7913
|
+
_props$isAutoGetList = props.isAutoGetList,
|
|
7914
|
+
isAutoGetList = _props$isAutoGetList === void 0 ? true : _props$isAutoGetList;
|
|
7915
|
+
var _useState = React.useState([]),
|
|
7916
|
+
products = _useState[0],
|
|
7917
|
+
setProducts = _useState[1];
|
|
7918
|
+
var _useState2 = React.useState(false),
|
|
7919
|
+
loading = _useState2[0],
|
|
7920
|
+
setLoading = _useState2[1];
|
|
7801
7921
|
var _useState3 = React.useState(),
|
|
7802
7922
|
page = _useState3[0],
|
|
7803
7923
|
setPage = _useState3[1];
|
|
@@ -7822,11 +7942,6 @@ var ProductController = function ProductController(props) {
|
|
|
7822
7942
|
var _res$data2, _res$data3;
|
|
7823
7943
|
setProducts(res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.data);
|
|
7824
7944
|
setPage(res === null || res === void 0 ? void 0 : (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.page);
|
|
7825
|
-
var url = new URL(window.location.href);
|
|
7826
|
-
if (/^(\/(danh-muc))\/[^/]+-\d+$/.test(url.pathname)) {
|
|
7827
|
-
url.pathname = url.pathname.replace(/\/[^/]+-\d+$/, "");
|
|
7828
|
-
window.history.replaceState({}, '', url.pathname + url.search);
|
|
7829
|
-
}
|
|
7830
7945
|
}
|
|
7831
7946
|
setLoading(false);
|
|
7832
7947
|
});
|
|
@@ -8226,6 +8341,7 @@ var NotFoundProduct = function NotFoundProduct(props) {
|
|
|
8226
8341
|
};
|
|
8227
8342
|
|
|
8228
8343
|
var TreatmentsCategory7 = function TreatmentsCategory7(props) {
|
|
8344
|
+
var _products$slice;
|
|
8229
8345
|
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
8230
8346
|
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
8231
8347
|
_props$data = props.data,
|
|
@@ -8238,7 +8354,8 @@ var TreatmentsCategory7 = function TreatmentsCategory7(props) {
|
|
|
8238
8354
|
_shopConfigStyle$colo2 = _shopConfigStyle$colo.secondary,
|
|
8239
8355
|
secondary = _shopConfigStyle$colo2 === void 0 ? "#000" : _shopConfigStyle$colo2;
|
|
8240
8356
|
var _useState = React.useState({
|
|
8241
|
-
types: "1"
|
|
8357
|
+
types: "1,10",
|
|
8358
|
+
size: 12
|
|
8242
8359
|
}),
|
|
8243
8360
|
params = _useState[0],
|
|
8244
8361
|
setParams = _useState[1];
|
|
@@ -8255,15 +8372,27 @@ var TreatmentsCategory7 = function TreatmentsCategory7(props) {
|
|
|
8255
8372
|
var _useState2 = React.useState(0),
|
|
8256
8373
|
selectedCategory = _useState2[0],
|
|
8257
8374
|
setSelectedCategory = _useState2[1];
|
|
8375
|
+
var _useState3 = React.useState(true),
|
|
8376
|
+
isGetMore = _useState3[0],
|
|
8377
|
+
setIsGetMore = _useState3[1];
|
|
8258
8378
|
React.useEffect(function () {
|
|
8259
8379
|
var newParams = _extends({}, params, {
|
|
8260
|
-
categoryId: selectedCategory
|
|
8380
|
+
categoryId: selectedCategory,
|
|
8381
|
+
size: 12
|
|
8261
8382
|
});
|
|
8262
8383
|
if (!selectedCategory) {
|
|
8263
8384
|
delete newParams.categoryId;
|
|
8264
8385
|
}
|
|
8265
8386
|
setParams(newParams);
|
|
8266
8387
|
}, [selectedCategory]);
|
|
8388
|
+
var handleGetMoreProducts = function handleGetMoreProducts() {
|
|
8389
|
+
setIsGetMore(false);
|
|
8390
|
+
setParams(function (prev) {
|
|
8391
|
+
return _extends({}, prev, {
|
|
8392
|
+
size: (prev === null || prev === void 0 ? void 0 : prev.size) + 4
|
|
8393
|
+
});
|
|
8394
|
+
});
|
|
8395
|
+
};
|
|
8267
8396
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
8268
8397
|
className: SECTION_DEFAULT_CLASS + " relative"
|
|
8269
8398
|
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
@@ -8280,15 +8409,16 @@ var TreatmentsCategory7 = function TreatmentsCategory7(props) {
|
|
|
8280
8409
|
key: index,
|
|
8281
8410
|
className: "p-3 flex gap-3 shrink-0 cursor-pointer text-base " + (selectedCategory === item.categoryId ? "bg-primary text-textButton" : ""),
|
|
8282
8411
|
onClick: function onClick() {
|
|
8283
|
-
|
|
8412
|
+
setSelectedCategory(item.categoryId);
|
|
8413
|
+
setIsGetMore(true);
|
|
8284
8414
|
}
|
|
8285
8415
|
}, item === null || item === void 0 ? void 0 : item.cateName);
|
|
8286
8416
|
}
|
|
8287
|
-
}), loading ? /*#__PURE__*/React__default.createElement("div", {
|
|
8417
|
+
}), loading && isGetMore ? /*#__PURE__*/React__default.createElement("div", {
|
|
8288
8418
|
className: "flex w-full justify-center p-12"
|
|
8289
|
-
}, /*#__PURE__*/React__default.createElement(Loading, null)) : products
|
|
8419
|
+
}, /*#__PURE__*/React__default.createElement(Loading, null)) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
8290
8420
|
className: "grid grid-cols-1 md:grid-cols-2 gap-10 mt-6"
|
|
8291
|
-
}, products === null || products === void 0 ? void 0 : products.map(function (product, index) {
|
|
8421
|
+
}, products === null || products === void 0 ? void 0 : (_products$slice = products.slice(0, (params === null || params === void 0 ? void 0 : params.size) - 4)) === null || _products$slice === void 0 ? void 0 : _products$slice.map(function (product, index) {
|
|
8292
8422
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
8293
8423
|
key: index,
|
|
8294
8424
|
Link: Link,
|
|
@@ -8298,7 +8428,13 @@ var TreatmentsCategory7 = function TreatmentsCategory7(props) {
|
|
|
8298
8428
|
}));
|
|
8299
8429
|
})) : /*#__PURE__*/React__default.createElement(NotFoundProduct, {
|
|
8300
8430
|
text: "d\u1ECBch v\u1EE5"
|
|
8301
|
-
})
|
|
8431
|
+
}), !loading && (products === null || products === void 0 ? void 0 : products.length) > (params === null || params === void 0 ? void 0 : params.size) - 4 ? /*#__PURE__*/React__default.createElement("div", {
|
|
8432
|
+
className: "w-full flex justify-center mt-6"
|
|
8433
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
8434
|
+
label: "Xem thêm",
|
|
8435
|
+
onClick: handleGetMoreProducts,
|
|
8436
|
+
className: "" + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass)
|
|
8437
|
+
})) : null), /*#__PURE__*/React__default.createElement(Dash, {
|
|
8302
8438
|
color: secondary
|
|
8303
8439
|
}));
|
|
8304
8440
|
};
|
|
@@ -8316,7 +8452,7 @@ var TreatmentsList6 = function TreatmentsList6(props) {
|
|
|
8316
8452
|
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl;
|
|
8317
8453
|
var _useState = React.useState({
|
|
8318
8454
|
size: 12,
|
|
8319
|
-
types: "1"
|
|
8455
|
+
types: "1,10"
|
|
8320
8456
|
}),
|
|
8321
8457
|
params = _useState[0],
|
|
8322
8458
|
setParams = _useState[1];
|
|
@@ -8515,75 +8651,171 @@ var BookingController = function BookingController(props) {
|
|
|
8515
8651
|
};
|
|
8516
8652
|
};
|
|
8517
8653
|
|
|
8518
|
-
var
|
|
8654
|
+
var DateTimePicker = React.forwardRef(function (props, ref) {
|
|
8519
8655
|
var _props$label = props.label,
|
|
8520
8656
|
label = _props$label === void 0 ? "" : _props$label,
|
|
8521
|
-
_props$labelClassName = props.labelClassName,
|
|
8522
|
-
labelClassName = _props$labelClassName === void 0 ? "" : _props$labelClassName,
|
|
8523
|
-
_props$placeholder = props.placeholder,
|
|
8524
|
-
placeholder = _props$placeholder === void 0 ? "" : _props$placeholder,
|
|
8525
8657
|
_props$className = props.className,
|
|
8526
8658
|
className = _props$className === void 0 ? "" : _props$className,
|
|
8527
|
-
_props$
|
|
8528
|
-
|
|
8529
|
-
_props$wrapClassName = props.wrapClassName,
|
|
8530
|
-
wrapClassName = _props$wrapClassName === void 0 ? "" : _props$wrapClassName,
|
|
8531
|
-
_props$selectClassNam = props.selectClassName,
|
|
8532
|
-
selectClassName = _props$selectClassNam === void 0 ? "" : _props$selectClassNam,
|
|
8533
|
-
_props$disabled = props.disabled,
|
|
8534
|
-
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
8535
|
-
_props$rules = props.rules,
|
|
8536
|
-
rules = _props$rules === void 0 ? [] : _props$rules,
|
|
8537
|
-
options = props.options,
|
|
8659
|
+
_props$labelClassName = props.labelClassName,
|
|
8660
|
+
labelClassName = _props$labelClassName === void 0 ? "" : _props$labelClassName,
|
|
8538
8661
|
_props$defaultValue = props.defaultValue,
|
|
8539
|
-
defaultValue = _props$defaultValue === void 0 ?
|
|
8540
|
-
|
|
8541
|
-
_props$
|
|
8542
|
-
|
|
8543
|
-
|
|
8544
|
-
|
|
8545
|
-
|
|
8546
|
-
isButtonDelete = _props$isButtonDelete === void 0 ? false : _props$isButtonDelete,
|
|
8547
|
-
_props$funcDelete = props.funcDelete,
|
|
8548
|
-
funcDelete = _props$funcDelete === void 0 ? function () {} : _props$funcDelete,
|
|
8549
|
-
_props$isSearch = props.isSearch,
|
|
8550
|
-
isSearch = _props$isSearch === void 0 ? true : _props$isSearch,
|
|
8551
|
-
renderItem = props.renderItem;
|
|
8552
|
-
var _useState = React.useState(false),
|
|
8553
|
-
isOpen = _useState[0],
|
|
8554
|
-
setIsOpen = _useState[1];
|
|
8555
|
-
var selectRef = React.useRef(null);
|
|
8662
|
+
defaultValue = _props$defaultValue === void 0 ? new Date() : _props$defaultValue,
|
|
8663
|
+
_props$time = props.time,
|
|
8664
|
+
time = _props$time === void 0 ? false : _props$time,
|
|
8665
|
+
rules = props.rules;
|
|
8666
|
+
var _useState = React.useState(defaultValue),
|
|
8667
|
+
value = _useState[0],
|
|
8668
|
+
_setValue = _useState[1];
|
|
8556
8669
|
var _useState2 = React.useState(""),
|
|
8557
8670
|
error = _useState2[0],
|
|
8558
8671
|
_setError = _useState2[1];
|
|
8559
|
-
var
|
|
8560
|
-
|
|
8561
|
-
|
|
8562
|
-
|
|
8563
|
-
|
|
8564
|
-
|
|
8565
|
-
|
|
8566
|
-
|
|
8567
|
-
|
|
8568
|
-
|
|
8569
|
-
|
|
8570
|
-
|
|
8571
|
-
|
|
8572
|
-
|
|
8573
|
-
|
|
8574
|
-
|
|
8575
|
-
|
|
8576
|
-
|
|
8577
|
-
|
|
8578
|
-
|
|
8579
|
-
|
|
8580
|
-
|
|
8581
|
-
|
|
8582
|
-
|
|
8583
|
-
|
|
8584
|
-
|
|
8585
|
-
|
|
8586
|
-
|
|
8672
|
+
var _className = "h-10 flex items-center py-1 px-2 border border-stroke rounded bg-white cursor-pointer " + className;
|
|
8673
|
+
var CustomInput = React.forwardRef(function (_ref, ref) {
|
|
8674
|
+
var value = _ref.value,
|
|
8675
|
+
onClick = _ref.onClick,
|
|
8676
|
+
className = _ref.className;
|
|
8677
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
8678
|
+
className: className,
|
|
8679
|
+
onClick: onClick,
|
|
8680
|
+
ref: ref
|
|
8681
|
+
}, value);
|
|
8682
|
+
});
|
|
8683
|
+
React.useImperativeHandle(ref, function () {
|
|
8684
|
+
return {
|
|
8685
|
+
validateData: function validateData() {
|
|
8686
|
+
return _validateData();
|
|
8687
|
+
},
|
|
8688
|
+
setValue: function setValue(text) {
|
|
8689
|
+
return _setValue(text);
|
|
8690
|
+
},
|
|
8691
|
+
getValue: function getValue() {
|
|
8692
|
+
return value;
|
|
8693
|
+
},
|
|
8694
|
+
setError: function setError(err) {
|
|
8695
|
+
return _setError(err);
|
|
8696
|
+
}
|
|
8697
|
+
};
|
|
8698
|
+
});
|
|
8699
|
+
var _validateData = function _validateData() {
|
|
8700
|
+
var count = 0;
|
|
8701
|
+
rules === null || rules === void 0 ? void 0 : rules.forEach(function (e) {
|
|
8702
|
+
var _e$pattern, _e$validate;
|
|
8703
|
+
if ((e === null || e === void 0 ? void 0 : e.type) === 'required' && value === '') {
|
|
8704
|
+
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
8705
|
+
count++;
|
|
8706
|
+
return false;
|
|
8707
|
+
} else if ((e === null || e === void 0 ? void 0 : e.type) === 'pattern' && !(e !== null && e !== void 0 && (_e$pattern = e.pattern) !== null && _e$pattern !== void 0 && _e$pattern.test(value))) {
|
|
8708
|
+
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
8709
|
+
count++;
|
|
8710
|
+
return false;
|
|
8711
|
+
} else if (value !== "" && (e === null || e === void 0 ? void 0 : e.type) === "validate" && e !== null && e !== void 0 && e.validate && !(e !== null && e !== void 0 && (_e$validate = e.validate) !== null && _e$validate !== void 0 && _e$validate.call(e))) {
|
|
8712
|
+
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
8713
|
+
count++;
|
|
8714
|
+
return false;
|
|
8715
|
+
}
|
|
8716
|
+
});
|
|
8717
|
+
if (count) {
|
|
8718
|
+
return false;
|
|
8719
|
+
} else {
|
|
8720
|
+
_setError('');
|
|
8721
|
+
return true;
|
|
8722
|
+
}
|
|
8723
|
+
};
|
|
8724
|
+
var required = !!(rules !== null && rules !== void 0 && rules.find(function (e) {
|
|
8725
|
+
return (e === null || e === void 0 ? void 0 : e.type) === "required";
|
|
8726
|
+
}));
|
|
8727
|
+
var labelRequired = required ? /*#__PURE__*/React__default.createElement("span", {
|
|
8728
|
+
className: "text-danger"
|
|
8729
|
+
}, " *") : null;
|
|
8730
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
8731
|
+
className: "w-full"
|
|
8732
|
+
}, label ? /*#__PURE__*/React__default.createElement("div", {
|
|
8733
|
+
className: "mb-1 " + labelClassName
|
|
8734
|
+
}, label, labelRequired) : null, /*#__PURE__*/React__default.createElement(DatePicker, {
|
|
8735
|
+
selected: value,
|
|
8736
|
+
onChange: function onChange(date) {
|
|
8737
|
+
_setValue(date);
|
|
8738
|
+
},
|
|
8739
|
+
customInput: /*#__PURE__*/React__default.createElement(CustomInput, {
|
|
8740
|
+
className: _className
|
|
8741
|
+
}),
|
|
8742
|
+
dateFormat: time ? "dd/MM/yyyy HH:mm" : "dd/MM/yyyy",
|
|
8743
|
+
showTimeSelect: time,
|
|
8744
|
+
timeIntervals: 15,
|
|
8745
|
+
wrapperClassName: "w-full"
|
|
8746
|
+
}), error ? /*#__PURE__*/React__default.createElement("div", {
|
|
8747
|
+
className: "text-danger"
|
|
8748
|
+
}, error) : null);
|
|
8749
|
+
});
|
|
8750
|
+
|
|
8751
|
+
var Select = React.forwardRef(function (props, ref) {
|
|
8752
|
+
var _props$label = props.label,
|
|
8753
|
+
label = _props$label === void 0 ? "" : _props$label,
|
|
8754
|
+
_props$labelClassName = props.labelClassName,
|
|
8755
|
+
labelClassName = _props$labelClassName === void 0 ? "" : _props$labelClassName,
|
|
8756
|
+
_props$placeholder = props.placeholder,
|
|
8757
|
+
placeholder = _props$placeholder === void 0 ? "" : _props$placeholder,
|
|
8758
|
+
_props$className = props.className,
|
|
8759
|
+
className = _props$className === void 0 ? "" : _props$className,
|
|
8760
|
+
_props$optionClassNam = props.optionClassName,
|
|
8761
|
+
optionClassName = _props$optionClassNam === void 0 ? "" : _props$optionClassNam,
|
|
8762
|
+
_props$wrapClassName = props.wrapClassName,
|
|
8763
|
+
wrapClassName = _props$wrapClassName === void 0 ? "" : _props$wrapClassName,
|
|
8764
|
+
_props$selectClassNam = props.selectClassName,
|
|
8765
|
+
selectClassName = _props$selectClassNam === void 0 ? "" : _props$selectClassNam,
|
|
8766
|
+
_props$disabled = props.disabled,
|
|
8767
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
8768
|
+
_props$rules = props.rules,
|
|
8769
|
+
rules = _props$rules === void 0 ? [] : _props$rules,
|
|
8770
|
+
options = props.options,
|
|
8771
|
+
_props$defaultValue = props.defaultValue,
|
|
8772
|
+
defaultValue = _props$defaultValue === void 0 ? {} : _props$defaultValue,
|
|
8773
|
+
_props$isMulti = props.isMulti,
|
|
8774
|
+
isMulti = _props$isMulti === void 0 ? false : _props$isMulti,
|
|
8775
|
+
_props$onClick = props.onClick,
|
|
8776
|
+
onClick = _props$onClick === void 0 ? function () {} : _props$onClick,
|
|
8777
|
+
_props$isButtonDelete = props.isButtonDelete,
|
|
8778
|
+
isButtonDelete = _props$isButtonDelete === void 0 ? false : _props$isButtonDelete,
|
|
8779
|
+
_props$funcDelete = props.funcDelete,
|
|
8780
|
+
funcDelete = _props$funcDelete === void 0 ? function () {} : _props$funcDelete,
|
|
8781
|
+
_props$isSearch = props.isSearch,
|
|
8782
|
+
isSearch = _props$isSearch === void 0 ? true : _props$isSearch,
|
|
8783
|
+
renderItem = props.renderItem;
|
|
8784
|
+
var _useState = React.useState(false),
|
|
8785
|
+
isOpen = _useState[0],
|
|
8786
|
+
setIsOpen = _useState[1];
|
|
8787
|
+
var selectRef = React.useRef(null);
|
|
8788
|
+
var _useState2 = React.useState(""),
|
|
8789
|
+
error = _useState2[0],
|
|
8790
|
+
_setError = _useState2[1];
|
|
8791
|
+
var _useState3 = React.useState(""),
|
|
8792
|
+
inputSearch = _useState3[0],
|
|
8793
|
+
setInputSearch = _useState3[1];
|
|
8794
|
+
var _useState4 = React.useState(defaultValue),
|
|
8795
|
+
value = _useState4[0],
|
|
8796
|
+
setValue = _useState4[1];
|
|
8797
|
+
var _useState5 = React.useState(options),
|
|
8798
|
+
listOptions = _useState5[0],
|
|
8799
|
+
setListOptions = _useState5[1];
|
|
8800
|
+
var dropdownRef = React.useRef(null);
|
|
8801
|
+
var _useState6 = React.useState('bottom'),
|
|
8802
|
+
dropdownPosition = _useState6[0],
|
|
8803
|
+
setDropdownPosition = _useState6[1];
|
|
8804
|
+
var inputRef = React.useRef(null);
|
|
8805
|
+
React.useEffect(function () {
|
|
8806
|
+
if (isMulti) setValue(defaultValue);
|
|
8807
|
+
}, [defaultValue]);
|
|
8808
|
+
React.useEffect(function () {
|
|
8809
|
+
setListOptions(options);
|
|
8810
|
+
if (!isMulti) setValue(defaultValue);
|
|
8811
|
+
}, [options]);
|
|
8812
|
+
React.useEffect(function () {
|
|
8813
|
+
var delayDebounceFn = setTimeout(function () {
|
|
8814
|
+
handleSearch === null || handleSearch === void 0 ? void 0 : handleSearch(inputSearch);
|
|
8815
|
+
}, 600);
|
|
8816
|
+
return function () {
|
|
8817
|
+
return clearTimeout(delayDebounceFn);
|
|
8818
|
+
};
|
|
8587
8819
|
}, [inputSearch]);
|
|
8588
8820
|
React.useEffect(function () {
|
|
8589
8821
|
var _inputRef$current;
|
|
@@ -8662,20 +8894,13 @@ var Select = React.forwardRef(function (props, ref) {
|
|
|
8662
8894
|
}
|
|
8663
8895
|
};
|
|
8664
8896
|
var handleSearch = function handleSearch(searchValue) {
|
|
8665
|
-
|
|
8666
|
-
|
|
8667
|
-
|
|
8668
|
-
|
|
8669
|
-
|
|
8670
|
-
return item === null || item === void 0 ? void 0 : (_item$label = item.label) === null || _item$label === void 0 ? void 0 : _item$label.toLowerCase().includes(searchValue === null || searchValue === void 0 ? void 0 : searchValue.toLowerCase());
|
|
8671
|
-
});
|
|
8672
|
-
setListOptions(listFilterOptions);
|
|
8673
|
-
}
|
|
8897
|
+
var listFilterOptions = options.filter(function (item) {
|
|
8898
|
+
var _item$label;
|
|
8899
|
+
return item === null || item === void 0 ? void 0 : (_item$label = item.label) === null || _item$label === void 0 ? void 0 : _item$label.toLowerCase().includes(searchValue === null || searchValue === void 0 ? void 0 : searchValue.toLowerCase());
|
|
8900
|
+
});
|
|
8901
|
+
setListOptions(listFilterOptions);
|
|
8674
8902
|
};
|
|
8675
8903
|
var handleToggleSelect = function handleToggleSelect() {
|
|
8676
|
-
if (!isOpen && handleSearchOption && typeof handleSearchOption === 'function') {
|
|
8677
|
-
handleSearchOption("");
|
|
8678
|
-
}
|
|
8679
8904
|
setIsOpen(!isOpen);
|
|
8680
8905
|
setInputSearch("");
|
|
8681
8906
|
setListOptions(options);
|
|
@@ -8774,103 +8999,6 @@ var Select = React.forwardRef(function (props, ref) {
|
|
|
8774
8999
|
});
|
|
8775
9000
|
var Select$1 = React.memo(Select);
|
|
8776
9001
|
|
|
8777
|
-
var DateTimePicker = React.forwardRef(function (props, ref) {
|
|
8778
|
-
var _props$label = props.label,
|
|
8779
|
-
label = _props$label === void 0 ? "" : _props$label,
|
|
8780
|
-
_props$className = props.className,
|
|
8781
|
-
className = _props$className === void 0 ? "" : _props$className,
|
|
8782
|
-
_props$labelClassName = props.labelClassName,
|
|
8783
|
-
labelClassName = _props$labelClassName === void 0 ? "" : _props$labelClassName,
|
|
8784
|
-
_props$defaultValue = props.defaultValue,
|
|
8785
|
-
defaultValue = _props$defaultValue === void 0 ? new Date() : _props$defaultValue,
|
|
8786
|
-
_props$time = props.time,
|
|
8787
|
-
time = _props$time === void 0 ? false : _props$time,
|
|
8788
|
-
rules = props.rules;
|
|
8789
|
-
var _useState = React.useState(defaultValue),
|
|
8790
|
-
value = _useState[0],
|
|
8791
|
-
_setValue = _useState[1];
|
|
8792
|
-
var _useState2 = React.useState(""),
|
|
8793
|
-
error = _useState2[0],
|
|
8794
|
-
_setError = _useState2[1];
|
|
8795
|
-
var _className = "h-10 flex items-center py-1 px-2 border border-stroke rounded bg-white cursor-pointer " + className;
|
|
8796
|
-
var CustomInput = React.forwardRef(function (_ref, ref) {
|
|
8797
|
-
var value = _ref.value,
|
|
8798
|
-
onClick = _ref.onClick,
|
|
8799
|
-
className = _ref.className;
|
|
8800
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
8801
|
-
className: className,
|
|
8802
|
-
onClick: onClick,
|
|
8803
|
-
ref: ref
|
|
8804
|
-
}, value);
|
|
8805
|
-
});
|
|
8806
|
-
React.useImperativeHandle(ref, function () {
|
|
8807
|
-
return {
|
|
8808
|
-
validateData: function validateData() {
|
|
8809
|
-
return _validateData();
|
|
8810
|
-
},
|
|
8811
|
-
setValue: function setValue(text) {
|
|
8812
|
-
return _setValue(text);
|
|
8813
|
-
},
|
|
8814
|
-
getValue: function getValue() {
|
|
8815
|
-
return value;
|
|
8816
|
-
},
|
|
8817
|
-
setError: function setError(err) {
|
|
8818
|
-
return _setError(err);
|
|
8819
|
-
}
|
|
8820
|
-
};
|
|
8821
|
-
});
|
|
8822
|
-
var _validateData = function _validateData() {
|
|
8823
|
-
var count = 0;
|
|
8824
|
-
rules === null || rules === void 0 ? void 0 : rules.forEach(function (e) {
|
|
8825
|
-
var _e$pattern, _e$validate;
|
|
8826
|
-
if ((e === null || e === void 0 ? void 0 : e.type) === 'required' && value === '') {
|
|
8827
|
-
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
8828
|
-
count++;
|
|
8829
|
-
return false;
|
|
8830
|
-
} else if ((e === null || e === void 0 ? void 0 : e.type) === 'pattern' && !(e !== null && e !== void 0 && (_e$pattern = e.pattern) !== null && _e$pattern !== void 0 && _e$pattern.test(value))) {
|
|
8831
|
-
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
8832
|
-
count++;
|
|
8833
|
-
return false;
|
|
8834
|
-
} else if (value !== "" && (e === null || e === void 0 ? void 0 : e.type) === "validate" && e !== null && e !== void 0 && e.validate && !(e !== null && e !== void 0 && (_e$validate = e.validate) !== null && _e$validate !== void 0 && _e$validate.call(e))) {
|
|
8835
|
-
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
8836
|
-
count++;
|
|
8837
|
-
return false;
|
|
8838
|
-
}
|
|
8839
|
-
});
|
|
8840
|
-
if (count) {
|
|
8841
|
-
return false;
|
|
8842
|
-
} else {
|
|
8843
|
-
_setError('');
|
|
8844
|
-
return true;
|
|
8845
|
-
}
|
|
8846
|
-
};
|
|
8847
|
-
var required = !!(rules !== null && rules !== void 0 && rules.find(function (e) {
|
|
8848
|
-
return (e === null || e === void 0 ? void 0 : e.type) === "required";
|
|
8849
|
-
}));
|
|
8850
|
-
var labelRequired = required ? /*#__PURE__*/React__default.createElement("span", {
|
|
8851
|
-
className: "text-danger"
|
|
8852
|
-
}, " *") : null;
|
|
8853
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
8854
|
-
className: "w-full"
|
|
8855
|
-
}, label ? /*#__PURE__*/React__default.createElement("div", {
|
|
8856
|
-
className: "mb-1 " + labelClassName
|
|
8857
|
-
}, label, labelRequired) : null, /*#__PURE__*/React__default.createElement(DatePicker, {
|
|
8858
|
-
selected: value,
|
|
8859
|
-
onChange: function onChange(date) {
|
|
8860
|
-
_setValue(date);
|
|
8861
|
-
},
|
|
8862
|
-
customInput: /*#__PURE__*/React__default.createElement(CustomInput, {
|
|
8863
|
-
className: _className
|
|
8864
|
-
}),
|
|
8865
|
-
dateFormat: time ? "dd/MM/yyyy HH:mm" : "dd/MM/yyyy",
|
|
8866
|
-
showTimeSelect: time,
|
|
8867
|
-
timeIntervals: 15,
|
|
8868
|
-
wrapperClassName: "w-full"
|
|
8869
|
-
}), error ? /*#__PURE__*/React__default.createElement("div", {
|
|
8870
|
-
className: "text-danger"
|
|
8871
|
-
}, error) : null);
|
|
8872
|
-
});
|
|
8873
|
-
|
|
8874
9002
|
var InputPhoneNumber = React.forwardRef(function (props, ref) {
|
|
8875
9003
|
var _props$label = props.label,
|
|
8876
9004
|
label = _props$label === void 0 ? "" : _props$label,
|
|
@@ -9019,150 +9147,316 @@ var InputPhoneNumber = React.forwardRef(function (props, ref) {
|
|
|
9019
9147
|
}, error) : null);
|
|
9020
9148
|
});
|
|
9021
9149
|
|
|
9022
|
-
var
|
|
9023
|
-
|
|
9024
|
-
|
|
9025
|
-
|
|
9026
|
-
|
|
9027
|
-
|
|
9028
|
-
|
|
9029
|
-
|
|
9030
|
-
|
|
9031
|
-
|
|
9032
|
-
|
|
9033
|
-
|
|
9034
|
-
|
|
9035
|
-
|
|
9036
|
-
|
|
9037
|
-
|
|
9038
|
-
|
|
9039
|
-
|
|
9040
|
-
|
|
9041
|
-
|
|
9042
|
-
|
|
9043
|
-
|
|
9044
|
-
|
|
9045
|
-
|
|
9046
|
-
|
|
9047
|
-
|
|
9048
|
-
|
|
9049
|
-
|
|
9050
|
-
|
|
9051
|
-
|
|
9052
|
-
|
|
9053
|
-
|
|
9054
|
-
|
|
9055
|
-
|
|
9056
|
-
|
|
9057
|
-
|
|
9058
|
-
|
|
9059
|
-
|
|
9060
|
-
|
|
9061
|
-
|
|
9062
|
-
|
|
9063
|
-
|
|
9064
|
-
|
|
9065
|
-
|
|
9066
|
-
|
|
9067
|
-
|
|
9068
|
-
|
|
9069
|
-
|
|
9070
|
-
|
|
9150
|
+
var Select$2 = React.forwardRef(function (props, ref) {
|
|
9151
|
+
var _props$label = props.label,
|
|
9152
|
+
label = _props$label === void 0 ? "" : _props$label,
|
|
9153
|
+
_props$labelClassName = props.labelClassName,
|
|
9154
|
+
labelClassName = _props$labelClassName === void 0 ? "" : _props$labelClassName,
|
|
9155
|
+
_props$placeholder = props.placeholder,
|
|
9156
|
+
placeholder = _props$placeholder === void 0 ? "" : _props$placeholder,
|
|
9157
|
+
_props$className = props.className,
|
|
9158
|
+
className = _props$className === void 0 ? "" : _props$className,
|
|
9159
|
+
_props$optionClassNam = props.optionClassName,
|
|
9160
|
+
optionClassName = _props$optionClassNam === void 0 ? "" : _props$optionClassNam,
|
|
9161
|
+
_props$wrapClassName = props.wrapClassName,
|
|
9162
|
+
wrapClassName = _props$wrapClassName === void 0 ? "" : _props$wrapClassName,
|
|
9163
|
+
_props$selectClassNam = props.selectClassName,
|
|
9164
|
+
selectClassName = _props$selectClassNam === void 0 ? "" : _props$selectClassNam,
|
|
9165
|
+
_props$disabled = props.disabled,
|
|
9166
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
9167
|
+
_props$loading = props.loading,
|
|
9168
|
+
loading = _props$loading === void 0 ? false : _props$loading,
|
|
9169
|
+
_props$rules = props.rules,
|
|
9170
|
+
rules = _props$rules === void 0 ? [] : _props$rules,
|
|
9171
|
+
options = props.options,
|
|
9172
|
+
_props$defaultValue = props.defaultValue,
|
|
9173
|
+
defaultValue = _props$defaultValue === void 0 ? {} : _props$defaultValue,
|
|
9174
|
+
handleSearchOption = props.handleSearchOption,
|
|
9175
|
+
_props$isMulti = props.isMulti,
|
|
9176
|
+
isMulti = _props$isMulti === void 0 ? false : _props$isMulti,
|
|
9177
|
+
_props$onClick = props.onClick,
|
|
9178
|
+
onClick = _props$onClick === void 0 ? function () {} : _props$onClick,
|
|
9179
|
+
_props$isButtonDelete = props.isButtonDelete,
|
|
9180
|
+
isButtonDelete = _props$isButtonDelete === void 0 ? false : _props$isButtonDelete,
|
|
9181
|
+
_props$funcDelete = props.funcDelete,
|
|
9182
|
+
funcDelete = _props$funcDelete === void 0 ? function () {} : _props$funcDelete,
|
|
9183
|
+
setParams = props.setParams,
|
|
9184
|
+
_props$isSearch = props.isSearch,
|
|
9185
|
+
isSearch = _props$isSearch === void 0 ? true : _props$isSearch,
|
|
9186
|
+
renderItem = props.renderItem;
|
|
9187
|
+
var _useState = React.useState(false),
|
|
9188
|
+
isOpen = _useState[0],
|
|
9189
|
+
setIsOpen = _useState[1];
|
|
9190
|
+
var selectRef = React.useRef(null);
|
|
9191
|
+
var _useState2 = React.useState(""),
|
|
9192
|
+
error = _useState2[0],
|
|
9193
|
+
_setError = _useState2[1];
|
|
9194
|
+
var _useState3 = React.useState(""),
|
|
9195
|
+
inputSearch = _useState3[0],
|
|
9196
|
+
setInputSearch = _useState3[1];
|
|
9197
|
+
var _useState4 = React.useState(defaultValue),
|
|
9198
|
+
value = _useState4[0],
|
|
9199
|
+
setValue = _useState4[1];
|
|
9200
|
+
var _useState5 = React.useState(options),
|
|
9201
|
+
listOptions = _useState5[0],
|
|
9202
|
+
setListOptions = _useState5[1];
|
|
9203
|
+
var dropdownRef = React.useRef(null);
|
|
9204
|
+
var _useState6 = React.useState('bottom'),
|
|
9205
|
+
dropdownPosition = _useState6[0],
|
|
9206
|
+
setDropdownPosition = _useState6[1];
|
|
9207
|
+
var inputRef = React.useRef(null);
|
|
9208
|
+
var _useState7 = React.useState(12),
|
|
9209
|
+
nextTrigger = _useState7[0],
|
|
9210
|
+
setNextTrigger = _useState7[1];
|
|
9211
|
+
var optionRef = React.useRef(null);
|
|
9212
|
+
var triggeredRef = React.useRef(false);
|
|
9213
|
+
React.useEffect(function () {
|
|
9214
|
+
if (isMulti) setValue(defaultValue);
|
|
9215
|
+
}, [defaultValue]);
|
|
9216
|
+
React.useEffect(function () {
|
|
9217
|
+
setListOptions(options);
|
|
9218
|
+
if (!isMulti) setValue(defaultValue);
|
|
9219
|
+
}, [options]);
|
|
9220
|
+
React.useEffect(function () {
|
|
9221
|
+
var _optionRef$current;
|
|
9222
|
+
if (typeof setParams !== 'function') return;
|
|
9223
|
+
triggeredRef.current = false;
|
|
9224
|
+
var options = (_optionRef$current = optionRef.current) === null || _optionRef$current === void 0 ? void 0 : _optionRef$current.querySelectorAll('div.option');
|
|
9225
|
+
if (!options || options.length === 0) return;
|
|
9226
|
+
var targetElement = options[nextTrigger];
|
|
9227
|
+
if (!targetElement) return;
|
|
9228
|
+
var observer = new IntersectionObserver(function (_ref) {
|
|
9229
|
+
var entry = _ref[0];
|
|
9230
|
+
if (entry.isIntersecting && !triggeredRef.current) {
|
|
9231
|
+
triggeredRef.current = true;
|
|
9232
|
+
setParams(function (prev) {
|
|
9233
|
+
return _extends({}, prev, {
|
|
9234
|
+
size: prev.size + 8
|
|
9235
|
+
});
|
|
9236
|
+
});
|
|
9237
|
+
setNextTrigger(function (prev) {
|
|
9238
|
+
return prev + 8;
|
|
9239
|
+
});
|
|
9071
9240
|
}
|
|
9072
|
-
|
|
9073
|
-
|
|
9241
|
+
}, {
|
|
9242
|
+
root: optionRef.current,
|
|
9243
|
+
threshold: 1.0
|
|
9244
|
+
});
|
|
9245
|
+
observer.observe(targetElement);
|
|
9246
|
+
return function () {
|
|
9247
|
+
observer.disconnect();
|
|
9248
|
+
};
|
|
9249
|
+
}, [listOptions, nextTrigger]);
|
|
9250
|
+
React.useEffect(function () {
|
|
9251
|
+
var delayDebounceFn = setTimeout(function () {
|
|
9252
|
+
handleSearch === null || handleSearch === void 0 ? void 0 : handleSearch(inputSearch);
|
|
9253
|
+
if (optionRef.current) {
|
|
9254
|
+
optionRef.current.scrollTop = 0;
|
|
9074
9255
|
}
|
|
9075
|
-
|
|
9076
|
-
|
|
9077
|
-
|
|
9078
|
-
|
|
9079
|
-
|
|
9080
|
-
|
|
9081
|
-
|
|
9082
|
-
|
|
9083
|
-
|
|
9084
|
-
|
|
9085
|
-
|
|
9086
|
-
|
|
9087
|
-
|
|
9088
|
-
|
|
9089
|
-
|
|
9256
|
+
}, 600);
|
|
9257
|
+
return function () {
|
|
9258
|
+
return clearTimeout(delayDebounceFn);
|
|
9259
|
+
};
|
|
9260
|
+
}, [inputSearch]);
|
|
9261
|
+
React.useEffect(function () {
|
|
9262
|
+
var _inputRef$current;
|
|
9263
|
+
inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
|
|
9264
|
+
var updateDropdownPosition = function updateDropdownPosition() {
|
|
9265
|
+
if (selectRef.current && dropdownRef.current) {
|
|
9266
|
+
var _selectRef$current, _window;
|
|
9267
|
+
var selectRect = selectRef === null || selectRef === void 0 ? void 0 : (_selectRef$current = selectRef.current) === null || _selectRef$current === void 0 ? void 0 : _selectRef$current.getBoundingClientRect();
|
|
9268
|
+
var spaceBelow = ((_window = window) === null || _window === void 0 ? void 0 : _window.innerHeight) - (selectRect === null || selectRect === void 0 ? void 0 : selectRect.bottom);
|
|
9269
|
+
var spaceAbove = selectRect === null || selectRect === void 0 ? void 0 : selectRect.top;
|
|
9270
|
+
if (spaceBelow < spaceAbove) {
|
|
9271
|
+
setDropdownPosition('top');
|
|
9272
|
+
} else {
|
|
9273
|
+
setDropdownPosition('bottom');
|
|
9090
9274
|
}
|
|
9091
|
-
|
|
9092
|
-
// Considers RFC 6265 section 5.2:
|
|
9093
|
-
// ...
|
|
9094
|
-
// 3. If the remaining unparsed-attributes contains a %x3B (";")
|
|
9095
|
-
// character:
|
|
9096
|
-
// Consume the characters of the unparsed-attributes up to,
|
|
9097
|
-
// not including, the first %x3B (";") character.
|
|
9098
|
-
// ...
|
|
9099
|
-
stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];
|
|
9100
9275
|
}
|
|
9101
|
-
|
|
9102
|
-
|
|
9103
|
-
|
|
9276
|
+
};
|
|
9277
|
+
if (isOpen) {
|
|
9278
|
+
updateDropdownPosition();
|
|
9279
|
+
window.addEventListener('resize', updateDropdownPosition);
|
|
9104
9280
|
}
|
|
9105
|
-
|
|
9106
|
-
|
|
9107
|
-
|
|
9108
|
-
|
|
9281
|
+
return function () {
|
|
9282
|
+
window.removeEventListener('resize', updateDropdownPosition);
|
|
9283
|
+
};
|
|
9284
|
+
}, [isOpen]);
|
|
9285
|
+
var handleClickOutside = function handleClickOutside(event) {
|
|
9286
|
+
var _selectRef$current2;
|
|
9287
|
+
if (selectRef !== null && selectRef !== void 0 && selectRef.current && !(selectRef !== null && selectRef !== void 0 && (_selectRef$current2 = selectRef.current) !== null && _selectRef$current2 !== void 0 && _selectRef$current2.contains(event.target))) {
|
|
9288
|
+
setIsOpen(false);
|
|
9289
|
+
setInputSearch("");
|
|
9290
|
+
setListOptions(options);
|
|
9291
|
+
}
|
|
9292
|
+
};
|
|
9293
|
+
React.useEffect(function () {
|
|
9294
|
+
document.addEventListener('click', handleClickOutside);
|
|
9295
|
+
return function () {
|
|
9296
|
+
document.removeEventListener('click', handleClickOutside);
|
|
9297
|
+
};
|
|
9298
|
+
}, []);
|
|
9299
|
+
React.useImperativeHandle(ref, function () {
|
|
9300
|
+
return {
|
|
9301
|
+
validateData: function validateData() {
|
|
9302
|
+
return _validateData();
|
|
9303
|
+
},
|
|
9304
|
+
setError: function setError(err) {
|
|
9305
|
+
return _setError(err);
|
|
9109
9306
|
}
|
|
9110
|
-
|
|
9111
|
-
|
|
9112
|
-
|
|
9113
|
-
|
|
9114
|
-
|
|
9115
|
-
|
|
9116
|
-
|
|
9117
|
-
|
|
9118
|
-
|
|
9119
|
-
|
|
9120
|
-
|
|
9121
|
-
|
|
9122
|
-
|
|
9123
|
-
|
|
9124
|
-
|
|
9125
|
-
|
|
9126
|
-
|
|
9307
|
+
};
|
|
9308
|
+
});
|
|
9309
|
+
var isEmpty = function isEmpty(value) {
|
|
9310
|
+
var _Object$keys;
|
|
9311
|
+
if (Array !== null && Array !== void 0 && Array.isArray(value)) return (value === null || value === void 0 ? void 0 : value.length) <= 0;
|
|
9312
|
+
if (typeof value === 'object') return (Object === null || Object === void 0 ? void 0 : (_Object$keys = Object.keys(value)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length) <= 0;
|
|
9313
|
+
return false;
|
|
9314
|
+
};
|
|
9315
|
+
var _validateData = function _validateData() {
|
|
9316
|
+
var count = 0;
|
|
9317
|
+
for (var _iterator = _createForOfIteratorHelperLoose(rules), _step; !(_step = _iterator()).done;) {
|
|
9318
|
+
var _e$pattern;
|
|
9319
|
+
var e = _step.value;
|
|
9320
|
+
if ((e === null || e === void 0 ? void 0 : e.type) === 'required' && isEmpty(value)) {
|
|
9321
|
+
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
9322
|
+
count++;
|
|
9323
|
+
break;
|
|
9324
|
+
} else if ((e === null || e === void 0 ? void 0 : e.type) === 'pattern' && !(e !== null && e !== void 0 && (_e$pattern = e.pattern) !== null && _e$pattern !== void 0 && _e$pattern.test(value))) {
|
|
9325
|
+
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
9326
|
+
count++;
|
|
9327
|
+
break;
|
|
9127
9328
|
}
|
|
9128
|
-
|
|
9129
|
-
return name ? jar[name] : jar
|
|
9130
9329
|
}
|
|
9131
|
-
|
|
9132
|
-
|
|
9133
|
-
|
|
9134
|
-
|
|
9135
|
-
|
|
9136
|
-
|
|
9137
|
-
|
|
9138
|
-
|
|
9139
|
-
|
|
9140
|
-
|
|
9141
|
-
|
|
9142
|
-
|
|
9143
|
-
|
|
9144
|
-
|
|
9145
|
-
|
|
9146
|
-
|
|
9147
|
-
|
|
9148
|
-
|
|
9149
|
-
|
|
9150
|
-
|
|
9151
|
-
|
|
9152
|
-
|
|
9153
|
-
|
|
9154
|
-
|
|
9330
|
+
if (count) {
|
|
9331
|
+
return false;
|
|
9332
|
+
} else {
|
|
9333
|
+
_setError('');
|
|
9334
|
+
return true;
|
|
9335
|
+
}
|
|
9336
|
+
};
|
|
9337
|
+
var handleSearch = function handleSearch(searchValue) {
|
|
9338
|
+
if (handleSearchOption && typeof handleSearchOption === 'function') {
|
|
9339
|
+
handleSearchOption === null || handleSearchOption === void 0 ? void 0 : handleSearchOption(searchValue);
|
|
9340
|
+
setNextTrigger(12);
|
|
9341
|
+
} else {
|
|
9342
|
+
var listFilterOptions = options.filter(function (item) {
|
|
9343
|
+
var _item$label;
|
|
9344
|
+
return item === null || item === void 0 ? void 0 : (_item$label = item.label) === null || _item$label === void 0 ? void 0 : _item$label.toLowerCase().includes(searchValue === null || searchValue === void 0 ? void 0 : searchValue.toLowerCase());
|
|
9345
|
+
});
|
|
9346
|
+
setListOptions(listFilterOptions);
|
|
9347
|
+
}
|
|
9348
|
+
};
|
|
9349
|
+
var handleToggleSelect = function handleToggleSelect() {
|
|
9350
|
+
setIsOpen(!isOpen);
|
|
9351
|
+
setInputSearch("");
|
|
9352
|
+
setListOptions(options);
|
|
9353
|
+
if (typeof setParams === 'function') {
|
|
9354
|
+
setParams === null || setParams === void 0 ? void 0 : setParams(function (prev) {
|
|
9355
|
+
return _extends({}, prev, {
|
|
9356
|
+
size: 16
|
|
9357
|
+
});
|
|
9358
|
+
});
|
|
9359
|
+
setNextTrigger(12);
|
|
9360
|
+
}
|
|
9361
|
+
};
|
|
9362
|
+
var checkSelection = function checkSelection(valueId) {
|
|
9363
|
+
if (isMulti) return value === null || value === void 0 ? void 0 : value.some(function (item) {
|
|
9364
|
+
return (item === null || item === void 0 ? void 0 : item.value) === valueId;
|
|
9365
|
+
});
|
|
9366
|
+
return (value === null || value === void 0 ? void 0 : value.value) == valueId;
|
|
9367
|
+
};
|
|
9368
|
+
var handleSelection = function handleSelection(item, e) {
|
|
9369
|
+
e.stopPropagation();
|
|
9370
|
+
if (!isMulti) {
|
|
9371
|
+
setValue(item);
|
|
9372
|
+
setIsOpen(false);
|
|
9373
|
+
}
|
|
9374
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(item);
|
|
9375
|
+
};
|
|
9376
|
+
var handleDeleteSelection = function handleDeleteSelection(e, item) {
|
|
9377
|
+
e.stopPropagation();
|
|
9378
|
+
if (isMulti === false) setValue({});
|
|
9379
|
+
funcDelete === null || funcDelete === void 0 ? void 0 : funcDelete(item);
|
|
9380
|
+
};
|
|
9381
|
+
var required = !!(rules !== null && rules !== void 0 && rules.find(function (e) {
|
|
9382
|
+
return (e === null || e === void 0 ? void 0 : e.type) === "required";
|
|
9383
|
+
}));
|
|
9384
|
+
var labelRequired = required ? /*#__PURE__*/React__default.createElement("span", {
|
|
9385
|
+
className: "text-danger"
|
|
9386
|
+
}, " *") : null;
|
|
9387
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
9388
|
+
ref: selectRef,
|
|
9389
|
+
className: "relative " + wrapClassName
|
|
9390
|
+
}, label ? /*#__PURE__*/React__default.createElement("div", {
|
|
9391
|
+
className: "mb-1 " + labelClassName
|
|
9392
|
+
}, label, " ", labelRequired) : null, /*#__PURE__*/React__default.createElement("div", {
|
|
9393
|
+
className: "flex flex-col gap-2 rounded-lg w-full bg-white " + (disabled ? "!bg-gray6" : "") + " border border-stroke " + className
|
|
9394
|
+
}, /*#__PURE__*/React__default.createElement("button", {
|
|
9395
|
+
className: " w-full h-10 bg-transparent flex justify-between items-center px-3 py-2 " + selectClassName,
|
|
9396
|
+
onClick: handleToggleSelect,
|
|
9397
|
+
disabled: disabled
|
|
9398
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9399
|
+
className: "flex justify-between items-center w-full"
|
|
9400
|
+
}, isEmpty(value) || isMulti ? /*#__PURE__*/React__default.createElement("div", {
|
|
9401
|
+
className: "text-gray3 line-clamp-1"
|
|
9402
|
+
}, placeholder) : /*#__PURE__*/React__default.createElement("div", {
|
|
9403
|
+
className: "w-full text-start pointer-events-none line-clamp-1",
|
|
9404
|
+
dangerouslySetInnerHTML: {
|
|
9405
|
+
__html: value === null || value === void 0 ? void 0 : value.label
|
|
9406
|
+
}
|
|
9407
|
+
}), isButtonDelete && !isEmpty(value) ? /*#__PURE__*/React__default.createElement("div", {
|
|
9408
|
+
onClick: function onClick(e) {
|
|
9409
|
+
handleDeleteSelection(e, value);
|
|
9410
|
+
}
|
|
9411
|
+
}, /*#__PURE__*/React__default.createElement(rx.RxCross2, null)) : /*#__PURE__*/React__default.createElement("div", {
|
|
9412
|
+
className: "ms-1"
|
|
9413
|
+
}, /*#__PURE__*/React__default.createElement(fa.FaAngleUp, {
|
|
9414
|
+
className: "text-xs"
|
|
9415
|
+
}), /*#__PURE__*/React__default.createElement(fa.FaAngleDown, {
|
|
9416
|
+
className: "text-xs"
|
|
9417
|
+
})))), isOpen ? /*#__PURE__*/React__default.createElement("div", {
|
|
9418
|
+
ref: dropdownRef,
|
|
9419
|
+
style: {
|
|
9420
|
+
background: "#FFFFFF"
|
|
9421
|
+
},
|
|
9422
|
+
className: "absolute p-1 my-2 rounded-2xl w-full z-40 border " + (dropdownPosition === 'top' ? 'bottom-full mb-2' : 'top-full mt-2') + " " + optionClassName
|
|
9423
|
+
}, /*#__PURE__*/React__default.createElement("div", null, isSearch ? /*#__PURE__*/React__default.createElement("div", {
|
|
9424
|
+
className: "px-3 flex items-center border-b-[1px]"
|
|
9425
|
+
}, /*#__PURE__*/React__default.createElement(lu.LuSearch, {
|
|
9426
|
+
className: "inline text-gray3 me-2"
|
|
9427
|
+
}), /*#__PURE__*/React__default.createElement("input", {
|
|
9428
|
+
type: "text",
|
|
9429
|
+
ref: inputRef,
|
|
9430
|
+
className: "py-2 w-full border-0 focus:outline-none focus:ring-0",
|
|
9431
|
+
placeholder: "T\xECm ki\u1EBFm",
|
|
9432
|
+
value: inputSearch,
|
|
9433
|
+
onChange: function onChange(e) {
|
|
9434
|
+
setInputSearch(e.target.value);
|
|
9435
|
+
}
|
|
9436
|
+
})) : null, /*#__PURE__*/React__default.createElement("div", {
|
|
9437
|
+
className: "overflow-y-auto max-h-72 scroll-container",
|
|
9438
|
+
ref: optionRef
|
|
9439
|
+
}, (listOptions === null || listOptions === void 0 ? void 0 : listOptions.length) > 0 ? /*#__PURE__*/React__default.createElement("div", null, listOptions === null || listOptions === void 0 ? void 0 : listOptions.map(function (item, index) {
|
|
9440
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
9441
|
+
key: "gjfd-" + index,
|
|
9442
|
+
className: "option px-2 cursor-default py-1.5 flex items-center hover:bg-gray-100 rounded-lg",
|
|
9443
|
+
onClick: function onClick(e) {
|
|
9444
|
+
handleSelection(item, e);
|
|
9155
9445
|
}
|
|
9156
|
-
|
|
9157
|
-
|
|
9158
|
-
|
|
9159
|
-
|
|
9160
|
-
|
|
9161
|
-
|
|
9162
|
-
|
|
9163
|
-
|
|
9164
|
-
|
|
9446
|
+
}, /*#__PURE__*/React__default.createElement(io.IoMdCheckmark, {
|
|
9447
|
+
className: (checkSelection(item === null || item === void 0 ? void 0 : item.value) ? "" : 'invisible') + " inline me-2 w-4"
|
|
9448
|
+
}), renderItem ? renderItem(item) : /*#__PURE__*/React__default.createElement("div", {
|
|
9449
|
+
className: " whitespace-nowrap line-clamp-1"
|
|
9450
|
+
}, item === null || item === void 0 ? void 0 : item.label));
|
|
9451
|
+
}), loading ? /*#__PURE__*/React__default.createElement("div", {
|
|
9452
|
+
className: "flex justify-center py-4"
|
|
9453
|
+
}, /*#__PURE__*/React__default.createElement(Loading, null)) : null) : /*#__PURE__*/React__default.createElement("div", {
|
|
9454
|
+
className: "py-6 text-center"
|
|
9455
|
+
}, "Kh\xF4ng c\xF3 k\u1EBFt qu\u1EA3")))) : null), error ? /*#__PURE__*/React__default.createElement("div", {
|
|
9456
|
+
className: "text-danger"
|
|
9457
|
+
}, error) : null);
|
|
9165
9458
|
});
|
|
9459
|
+
var SelectDynamic = React.memo(Select$2);
|
|
9166
9460
|
|
|
9167
9461
|
var BookingForm = function BookingForm(props) {
|
|
9168
9462
|
var _props$shopConfig = props.shopConfig,
|
|
@@ -9179,7 +9473,8 @@ var BookingForm = function BookingForm(props) {
|
|
|
9179
9473
|
isModalBooking = _props$isModalBooking === void 0 ? false : _props$isModalBooking;
|
|
9180
9474
|
var _useState = React.useState(false);
|
|
9181
9475
|
var _useState2 = React.useState({
|
|
9182
|
-
types: "1,10"
|
|
9476
|
+
types: "1,10",
|
|
9477
|
+
size: 16
|
|
9183
9478
|
}),
|
|
9184
9479
|
productsParams = _useState2[0],
|
|
9185
9480
|
setProductsParams = _useState2[1];
|
|
@@ -9209,7 +9504,8 @@ var BookingForm = function BookingForm(props) {
|
|
|
9209
9504
|
var _ProductController = ProductController(_extends({}, props, {
|
|
9210
9505
|
params: productsParams
|
|
9211
9506
|
})),
|
|
9212
|
-
products = _ProductController.products
|
|
9507
|
+
products = _ProductController.products,
|
|
9508
|
+
loading = _ProductController.loading;
|
|
9213
9509
|
var _BookingController = BookingController(props),
|
|
9214
9510
|
_BookingController$cr = _BookingController.createSchedule,
|
|
9215
9511
|
createSchedule = _BookingController$cr === void 0 ? function () {} : _BookingController$cr;
|
|
@@ -9353,6 +9649,7 @@ var BookingForm = function BookingForm(props) {
|
|
|
9353
9649
|
var handleSearchProducts = function handleSearchProducts(value) {
|
|
9354
9650
|
setProductsParams(function (prev) {
|
|
9355
9651
|
return _extends({}, prev, {
|
|
9652
|
+
size: 16,
|
|
9356
9653
|
productName: value
|
|
9357
9654
|
});
|
|
9358
9655
|
});
|
|
@@ -9389,9 +9686,11 @@ var BookingForm = function BookingForm(props) {
|
|
|
9389
9686
|
className: "grid grid-cols-1 gap-4"
|
|
9390
9687
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9391
9688
|
className: "relative"
|
|
9392
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
9689
|
+
}, /*#__PURE__*/React__default.createElement(SelectDynamic, {
|
|
9690
|
+
setParams: setProductsParams,
|
|
9393
9691
|
ref: inputSelectedRef,
|
|
9394
9692
|
isMulti: true,
|
|
9693
|
+
loading: loading,
|
|
9395
9694
|
defaultValue: listProductSelected,
|
|
9396
9695
|
onClick: handleSelectedProduct,
|
|
9397
9696
|
handleSearchOption: handleSearchProducts,
|
|
@@ -9505,6 +9804,7 @@ var BookingForm = function BookingForm(props) {
|
|
|
9505
9804
|
className: "text-center"
|
|
9506
9805
|
}, "Ch\xFAng t\xF4i \u0111\xE3 ghi nh\u1EADn th\xF4ng tin c\u1EE7a b\u1EA1n v\xE0 s\u1EBD li\xEAn h\u1EC7 l\u1EA1i ngay"))));
|
|
9507
9806
|
};
|
|
9807
|
+
var BookingForm$1 = React.memo(BookingForm);
|
|
9508
9808
|
|
|
9509
9809
|
var TreatmentsList7 = function TreatmentsList7(props) {
|
|
9510
9810
|
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
@@ -9625,7 +9925,7 @@ var TreatmentsList7 = function TreatmentsList7(props) {
|
|
|
9625
9925
|
color: secondary
|
|
9626
9926
|
}), isOpenModal ? /*#__PURE__*/React__default.createElement(ModalNotification, {
|
|
9627
9927
|
onClose: handleCloseModal
|
|
9628
|
-
}, /*#__PURE__*/React__default.createElement(BookingForm, {
|
|
9928
|
+
}, /*#__PURE__*/React__default.createElement(BookingForm$1, {
|
|
9629
9929
|
className: "overflow-y-auto no-scrollbar w-[85vw] sm:w-[70vw] md:w-[60vw] lg:w-[50vw] max-h-[80vh] !bg-bgSecondary",
|
|
9630
9930
|
onCloseFormBooking: handleCloseModal,
|
|
9631
9931
|
defaultValue: dataBooking,
|
|
@@ -9767,13 +10067,13 @@ var ServiceDetail1 = function ServiceDetail1(props) {
|
|
|
9767
10067
|
product: product,
|
|
9768
10068
|
className: "w-full aspect-square !object-contain rounded-2xl"
|
|
9769
10069
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
9770
|
-
className: "flex gap-
|
|
10070
|
+
className: "flex gap-2 pb-3 md:pb-0 overflow-x-auto md:w-full lg:gap-3 md:grid md:grid-cols-4 xl:grid-cols-5"
|
|
9771
10071
|
}, product === null || product === void 0 ? void 0 : (_product$images = product.images) === null || _product$images === void 0 ? void 0 : _product$images.map(function (item) {
|
|
9772
10072
|
return /*#__PURE__*/React__default.createElement("img", {
|
|
9773
10073
|
src: item === null || item === void 0 ? void 0 : item.imageUrl,
|
|
9774
10074
|
key: item === null || item === void 0 ? void 0 : item.imageId,
|
|
9775
10075
|
alt: "",
|
|
9776
|
-
className: (displayImage ? "" : "first:border first:opacity-100 first:brightness-100") + " h-
|
|
10076
|
+
className: (displayImage ? "" : "first:border first:opacity-100 first:brightness-100") + " \n h-20 w-20 md:max-h-32 md:max-w-32 md:h-full md:w-full rounded-md lg:rounded-lg aspect-square object-contain\n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border" : "opacity-50 brightness-75 bg-background"),
|
|
9777
10077
|
onClick: function onClick() {
|
|
9778
10078
|
handleDisplayImage(item);
|
|
9779
10079
|
}
|
|
@@ -9820,7 +10120,7 @@ var ServiceDetail1 = function ServiceDetail1(props) {
|
|
|
9820
10120
|
className: "text-gray3 mt-2"
|
|
9821
10121
|
}, "Kh\xF4ng c\xF3 th\xF4ng tin"))), isBooking ? /*#__PURE__*/React__default.createElement(ModalNotification, {
|
|
9822
10122
|
onClose: handleCloseModal
|
|
9823
|
-
}, /*#__PURE__*/React__default.createElement(BookingForm, {
|
|
10123
|
+
}, /*#__PURE__*/React__default.createElement(BookingForm$1, {
|
|
9824
10124
|
isModalBooking: isBooking,
|
|
9825
10125
|
className: "overflow-y-auto no-scrollbar w-[85vw] sm:w-[70vw] md:w-[60vw] lg:w-[50vw] max-h-[80vh]",
|
|
9826
10126
|
onCloseFormBooking: handleCloseModal,
|
|
@@ -9894,7 +10194,7 @@ var TreatmentDetail1 = function TreatmentDetail1(props) {
|
|
|
9894
10194
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9895
10195
|
className: "flex flex-col gap-4 col-span-2"
|
|
9896
10196
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9897
|
-
className: "rounded-2xl
|
|
10197
|
+
className: "rounded-2xl bg-background border"
|
|
9898
10198
|
}, displayImage ? /*#__PURE__*/React__default.createElement("img", {
|
|
9899
10199
|
src: displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageUrl,
|
|
9900
10200
|
className: "w-full aspect-square object-contain rounded-2xl"
|
|
@@ -9902,13 +10202,13 @@ var TreatmentDetail1 = function TreatmentDetail1(props) {
|
|
|
9902
10202
|
product: product,
|
|
9903
10203
|
className: "w-full aspect-square !object-contain rounded-2xl"
|
|
9904
10204
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
9905
|
-
className: "flex gap-
|
|
10205
|
+
className: "flex gap-2 pb-3 md:pb-0 overflow-x-auto md:w-full lg:gap-3 md:grid md:grid-cols-4 xl:grid-cols-5"
|
|
9906
10206
|
}, product === null || product === void 0 ? void 0 : (_product$images = product.images) === null || _product$images === void 0 ? void 0 : _product$images.map(function (item) {
|
|
9907
10207
|
return /*#__PURE__*/React__default.createElement("img", {
|
|
9908
10208
|
src: item === null || item === void 0 ? void 0 : item.imageUrl,
|
|
9909
10209
|
key: item === null || item === void 0 ? void 0 : item.imageId,
|
|
9910
10210
|
alt: "",
|
|
9911
|
-
className: (displayImage ? "" : "first:border first:opacity-100 first:brightness-100") + " h-
|
|
10211
|
+
className: (displayImage ? "" : "first:border first:opacity-100 first:brightness-100") + " \n h-20 w-20 md:max-h-32 md:max-w-32 md:h-full md:w-full rounded-md lg:rounded-lg aspect-square object-contain\n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border" : "opacity-50 brightness-75 bg-background"),
|
|
9912
10212
|
onClick: function onClick() {
|
|
9913
10213
|
handleDisplayImage(item);
|
|
9914
10214
|
}
|
|
@@ -9955,7 +10255,7 @@ var TreatmentDetail1 = function TreatmentDetail1(props) {
|
|
|
9955
10255
|
className: "text-gray3 mt-2"
|
|
9956
10256
|
}, "Kh\xF4ng c\xF3 th\xF4ng tin"))), isBooking ? /*#__PURE__*/React__default.createElement(ModalNotification, {
|
|
9957
10257
|
onClose: handleCloseModal
|
|
9958
|
-
}, /*#__PURE__*/React__default.createElement(BookingForm, {
|
|
10258
|
+
}, /*#__PURE__*/React__default.createElement(BookingForm$1, {
|
|
9959
10259
|
isModalBooking: isBooking,
|
|
9960
10260
|
className: "overflow-y-auto no-scrollbar w-[85vw] sm:w-[70vw] md:w-[60vw] lg:w-[50vw] max-h-[80vh]",
|
|
9961
10261
|
onCloseFormBooking: handleCloseModal,
|
|
@@ -10030,7 +10330,7 @@ var ProductItem3 = function ProductItem3(props) {
|
|
|
10030
10330
|
className: "w-full border border-stroke rounded-2xl " + className
|
|
10031
10331
|
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10032
10332
|
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10033
|
-
className: "w-full
|
|
10333
|
+
className: "w-full rounded-t-2xl"
|
|
10034
10334
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
10035
10335
|
className: "p-4 flex flex-col gap-2 md:gap-4 items-start"
|
|
10036
10336
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -10057,7 +10357,7 @@ var ProductItem4 = function ProductItem4(props) {
|
|
|
10057
10357
|
className: "w-full border border-stroke flex flex-col gap-2 md:gap-4 rounded-2xl p-2 md:p-4 xl:p-6 " + className
|
|
10058
10358
|
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10059
10359
|
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10060
|
-
className: "w-full
|
|
10360
|
+
className: "w-full rounded-2xl"
|
|
10061
10361
|
}), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
10062
10362
|
className: "text-start line-clamp-1 w-full overflow-hidden text-ellipsis text-lg"
|
|
10063
10363
|
}, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
@@ -10076,7 +10376,271 @@ var ProductItem4 = function ProductItem4(props) {
|
|
|
10076
10376
|
}))));
|
|
10077
10377
|
};
|
|
10078
10378
|
|
|
10079
|
-
var ProductItem5 = function ProductItem5(props) {
|
|
10379
|
+
var ProductItem5 = function ProductItem5(props) {
|
|
10380
|
+
var _product$productInfo;
|
|
10381
|
+
var product = props.product,
|
|
10382
|
+
_props$Link = props.Link,
|
|
10383
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
10384
|
+
_props$shopConfigStyl = props.shopConfigStyle,
|
|
10385
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
10386
|
+
_props$className = props.className,
|
|
10387
|
+
className = _props$className === void 0 ? "" : _props$className;
|
|
10388
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10389
|
+
Link: Link,
|
|
10390
|
+
href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
|
|
10391
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10392
|
+
className: "w-full flex flex-col gap-4 rounded-2xl p-1 " + className
|
|
10393
|
+
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10394
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10395
|
+
className: "w-full rounded-2xl"
|
|
10396
|
+
}), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
10397
|
+
className: "text-start line-clamp-1 w-full overflow-hidden text-ellipsis mb-2"
|
|
10398
|
+
}, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
10399
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10400
|
+
className: "text-lg text-start " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "")
|
|
10401
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
10402
|
+
className: "flex gap-2 md:gap-4 "
|
|
10403
|
+
}, /*#__PURE__*/React__default.createElement(ai.AiOutlineShoppingCart, {
|
|
10404
|
+
className: "text-primary p-2.5 h-10 w-12 border border-primary rounded-lg hover:bg-primary hover:text-textButton " + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass)
|
|
10405
|
+
}), /*#__PURE__*/React__default.createElement(Button, {
|
|
10406
|
+
label: "Mua ngay",
|
|
10407
|
+
className: "w-full",
|
|
10408
|
+
shopConfigStyle: shopConfigStyle
|
|
10409
|
+
}))));
|
|
10410
|
+
};
|
|
10411
|
+
|
|
10412
|
+
var ProductItem6 = function ProductItem6(props) {
|
|
10413
|
+
var _product$productInfo;
|
|
10414
|
+
var product = props.product,
|
|
10415
|
+
_props$shopConfigStyl = props.shopConfigStyle,
|
|
10416
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
10417
|
+
_props$Link = props.Link,
|
|
10418
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
10419
|
+
_props$className = props.className,
|
|
10420
|
+
className = _props$className === void 0 ? "" : _props$className;
|
|
10421
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10422
|
+
Link: Link,
|
|
10423
|
+
href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
|
|
10424
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10425
|
+
className: "w-full border border-stroke flex flex-col gap-2 md:gap-4 rounded-2xl p-2 md:p-4 xl:p-6 " + className
|
|
10426
|
+
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10427
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10428
|
+
className: "w-full !aspect-[3/4] rounded-2xl"
|
|
10429
|
+
}), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
10430
|
+
className: "text start line-clamp-1 w-full overflow-hidden text-ellipsis"
|
|
10431
|
+
}, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
10432
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10433
|
+
className: "text-lg text-start " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "")
|
|
10434
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
10435
|
+
className: "flex pt-4 gap-2 md:gap-4 border-t items-center"
|
|
10436
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10437
|
+
className: "p-2 md:p-[10px] text-primary rounded-lg hover:bg-primary hover:text-textButton hover:opacity-80 border border-primary h-full w-auto flex items-center justify-center " + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass) + " "
|
|
10438
|
+
}, /*#__PURE__*/React__default.createElement(fi.FiShoppingCart, null)), /*#__PURE__*/React__default.createElement(Button, {
|
|
10439
|
+
label: "Mua ngay",
|
|
10440
|
+
className: "w-full",
|
|
10441
|
+
shopConfigStyle: shopConfigStyle
|
|
10442
|
+
}))));
|
|
10443
|
+
};
|
|
10444
|
+
|
|
10445
|
+
var ProductItem7 = function ProductItem7(props) {
|
|
10446
|
+
var _product$productInfo, _product$productInfo2, _product$productInfo3, _product$productInfo4, _product$productInfo5, _product$productInfo6, _product$productInfo7, _product$productInfo8, _product$productInfo9, _product$productInfo10, _product$productInfo11;
|
|
10447
|
+
var product = props.product,
|
|
10448
|
+
_props$Link = props.Link,
|
|
10449
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
10450
|
+
_props$className = props.className,
|
|
10451
|
+
className = _props$className === void 0 ? "" : _props$className;
|
|
10452
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10453
|
+
Link: Link,
|
|
10454
|
+
href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
|
|
10455
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10456
|
+
className: "w-full bg-bgSecondary relative p-2 md:p-4 rounded-2xl " + className
|
|
10457
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10458
|
+
className: "relative"
|
|
10459
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10460
|
+
className: "px-2 md:px-4 xl:px-6"
|
|
10461
|
+
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10462
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10463
|
+
className: "w-full hover:scale-105 transition duration-300 ease-in-out rounded-2xl !object-contain"
|
|
10464
|
+
})), (product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.price) !== (product === null || product === void 0 ? void 0 : (_product$productInfo2 = product.productInfo) === null || _product$productInfo2 === void 0 ? void 0 : _product$productInfo2.priceBeforeDiscount) && product !== null && product !== void 0 && (_product$productInfo3 = product.productInfo) !== null && _product$productInfo3 !== void 0 && _product$productInfo3.priceBeforeDiscount ? /*#__PURE__*/React__default.createElement("div", {
|
|
10465
|
+
className: "absolute top-4 left-0 py-1 px-4 rounded-r-2xl bg-danger text-textButton font-semibold shadow-lg"
|
|
10466
|
+
}, "-", Math.round(100 - (product === null || product === void 0 ? void 0 : (_product$productInfo4 = product.productInfo) === null || _product$productInfo4 === void 0 ? void 0 : _product$productInfo4.price) / (product === null || product === void 0 ? void 0 : (_product$productInfo5 = product.productInfo) === null || _product$productInfo5 === void 0 ? void 0 : _product$productInfo5.priceBeforeDiscount) * 100)) : null), /*#__PURE__*/React__default.createElement("div", {
|
|
10467
|
+
className: "flex flex-col mt-4 gap-4 items-start"
|
|
10468
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10469
|
+
className: "line-clamp-2 min-h-12 w-full overflow-hidden text-ellipsis"
|
|
10470
|
+
}, product === null || product === void 0 ? void 0 : (_product$productInfo6 = product.productInfo) === null || _product$productInfo6 === void 0 ? void 0 : _product$productInfo6.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
10471
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10472
|
+
className: "text-start " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "")
|
|
10473
|
+
})), product !== null && product !== void 0 && product.isShowProductPriceOnLanding && product !== null && product !== void 0 && (_product$productInfo7 = product.productInfo) !== null && _product$productInfo7 !== void 0 && _product$productInfo7.priceBeforeDiscount && (product === null || product === void 0 ? void 0 : (_product$productInfo8 = product.productInfo) === null || _product$productInfo8 === void 0 ? void 0 : _product$productInfo8.priceBeforeDiscount) !== (product === null || product === void 0 ? void 0 : (_product$productInfo9 = product.productInfo) === null || _product$productInfo9 === void 0 ? void 0 : _product$productInfo9.price) ? /*#__PURE__*/React__default.createElement("div", {
|
|
10474
|
+
className: "absolute top-5 left-0 font-semibold px-3 py-1 bg-danger text-textButton rounded-r-2xl shadow-lg v-max"
|
|
10475
|
+
}, 1 - 100 * (product === null || product === void 0 ? void 0 : (_product$productInfo10 = product.productInfo) === null || _product$productInfo10 === void 0 ? void 0 : _product$productInfo10.price) / (product === null || product === void 0 ? void 0 : (_product$productInfo11 = product.productInfo) === null || _product$productInfo11 === void 0 ? void 0 : _product$productInfo11.priceBeforeDiscount)) : null));
|
|
10476
|
+
};
|
|
10477
|
+
|
|
10478
|
+
var ProductItem8 = function ProductItem8(props) {
|
|
10479
|
+
var _product$productInfo;
|
|
10480
|
+
var product = props.product,
|
|
10481
|
+
_props$Link = props.Link,
|
|
10482
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
10483
|
+
_props$className = props.className,
|
|
10484
|
+
className = _props$className === void 0 ? "" : _props$className,
|
|
10485
|
+
_props$shopConfigStyl = props.shopConfigStyle,
|
|
10486
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl;
|
|
10487
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10488
|
+
Link: Link,
|
|
10489
|
+
href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
|
|
10490
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10491
|
+
className: "text-center rounded relative group " + className
|
|
10492
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10493
|
+
className: "relative "
|
|
10494
|
+
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10495
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10496
|
+
className: "!aspect-[5/8] rounded"
|
|
10497
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
10498
|
+
className: "absolute bottom-0 rounded-b pb-6 px-4 bg-gradient-to-t from-black/50 to-transparent flex flex-col items-center h-1/2 gap-2 w-full justify-end "
|
|
10499
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10500
|
+
className: "text-lg text-textButton"
|
|
10501
|
+
}, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
10502
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10503
|
+
className: !(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "",
|
|
10504
|
+
priceClassName: "text-textButton !font-normal",
|
|
10505
|
+
priceBeforeDiscountClassName: "text-textButton !font-normal"
|
|
10506
|
+
}), /*#__PURE__*/React__default.createElement(Button, {
|
|
10507
|
+
label: "Th\xEAm v\xE0o gi\u1ECF",
|
|
10508
|
+
shopConfigStyle: shopConfigStyle,
|
|
10509
|
+
className: "hidden group-hover:block transition-all duration-300 !font-normal"
|
|
10510
|
+
})))));
|
|
10511
|
+
};
|
|
10512
|
+
|
|
10513
|
+
var ProductItem9 = function ProductItem9(props) {
|
|
10514
|
+
var _product$productInfo;
|
|
10515
|
+
var product = props.product,
|
|
10516
|
+
_props$Link = props.Link,
|
|
10517
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
10518
|
+
_props$shopConfigStyl = props.shopConfigStyle,
|
|
10519
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
10520
|
+
_props$className = props.className,
|
|
10521
|
+
className = _props$className === void 0 ? "" : _props$className;
|
|
10522
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10523
|
+
Link: Link,
|
|
10524
|
+
href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
|
|
10525
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10526
|
+
className: "w-full flex flex-col gap-4 rounded-2xl p-2 md:p-6 bg-bgSecondary " + className
|
|
10527
|
+
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10528
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10529
|
+
className: "hover:scale-105 transition duration-300 ease-in-out !object-contain !aspect-[9/8]"
|
|
10530
|
+
}), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
10531
|
+
className: "text-start line-clamp-2 font-medium min-h-12 w-full overflow-hidden text-ellipsis mb-2"
|
|
10532
|
+
}, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
10533
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10534
|
+
priceClassName: "!text-secondary !text-base !font-normal",
|
|
10535
|
+
className: "text-lg text-start " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "")
|
|
10536
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
10537
|
+
className: "flex gap-2 md:gap-4 "
|
|
10538
|
+
}, /*#__PURE__*/React__default.createElement(ai.AiOutlineShoppingCart, {
|
|
10539
|
+
className: "text-primary p-2.5 h-10 w-12 border border-primary rounded-lg hover:bg-primary hover:text-textButton " + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass)
|
|
10540
|
+
}), /*#__PURE__*/React__default.createElement(Button, {
|
|
10541
|
+
label: "Mua ngay",
|
|
10542
|
+
className: "w-full",
|
|
10543
|
+
shopConfigStyle: shopConfigStyle
|
|
10544
|
+
}))));
|
|
10545
|
+
};
|
|
10546
|
+
|
|
10547
|
+
var ProductItem10 = function ProductItem10(props) {
|
|
10548
|
+
var _product$productInfo;
|
|
10549
|
+
var product = props.product;
|
|
10550
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
10551
|
+
className: "flex border-b border-stroke items-center py-4"
|
|
10552
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10553
|
+
className: "mb-auto"
|
|
10554
|
+
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10555
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10556
|
+
className: "!w-24 rounded-lg"
|
|
10557
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
10558
|
+
className: "ml-4 flex-1"
|
|
10559
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10560
|
+
className: "text-xl"
|
|
10561
|
+
}, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), product !== null && product !== void 0 && product.isShowProductPriceOnLanding ? /*#__PURE__*/React__default.createElement("div", {
|
|
10562
|
+
className: "mt-2"
|
|
10563
|
+
}, /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
10564
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10565
|
+
priceClassName: "!font-normal text-lg"
|
|
10566
|
+
})) : null));
|
|
10567
|
+
};
|
|
10568
|
+
|
|
10569
|
+
function getMinMax$1(array, field) {
|
|
10570
|
+
if (!(array !== null && array !== void 0 && array.length) || !array[0].hasOwnProperty(field)) {
|
|
10571
|
+
return null;
|
|
10572
|
+
}
|
|
10573
|
+
var _array$reduce = array.reduce(function (acc, obj) {
|
|
10574
|
+
var value = obj[field];
|
|
10575
|
+
return {
|
|
10576
|
+
min: value < acc.min ? value : acc.min,
|
|
10577
|
+
max: value > acc.max ? value : acc.max
|
|
10578
|
+
};
|
|
10579
|
+
}, {
|
|
10580
|
+
min: array[0][field],
|
|
10581
|
+
max: array[0][field]
|
|
10582
|
+
}),
|
|
10583
|
+
min = _array$reduce.min,
|
|
10584
|
+
max = _array$reduce.max;
|
|
10585
|
+
return {
|
|
10586
|
+
min: min,
|
|
10587
|
+
max: max
|
|
10588
|
+
};
|
|
10589
|
+
}
|
|
10590
|
+
var ProductPrice2 = function ProductPrice2(props) {
|
|
10591
|
+
var product = props.product,
|
|
10592
|
+
variant = props.variant,
|
|
10593
|
+
_props$className = props.className,
|
|
10594
|
+
className = _props$className === void 0 ? "" : _props$className,
|
|
10595
|
+
_props$style = props.style,
|
|
10596
|
+
style = _props$style === void 0 ? {} : _props$style,
|
|
10597
|
+
_props$priceClassName = props.priceClassName,
|
|
10598
|
+
priceClassName = _props$priceClassName === void 0 ? "" : _props$priceClassName,
|
|
10599
|
+
_props$priceBeforeDis = props.priceBeforeDiscountClassName,
|
|
10600
|
+
priceBeforeDiscountClassName = _props$priceBeforeDis === void 0 ? "" : _props$priceBeforeDis;
|
|
10601
|
+
var _useState = React.useState(),
|
|
10602
|
+
displayPrice = _useState[0],
|
|
10603
|
+
setDisplayPrice = _useState[1];
|
|
10604
|
+
var _useState2 = React.useState(),
|
|
10605
|
+
displayPriceBeforeDiscount = _useState2[0],
|
|
10606
|
+
setDisplayPriceBeforeDiscount = _useState2[1];
|
|
10607
|
+
React.useEffect(function () {
|
|
10608
|
+
if (variant) {
|
|
10609
|
+
genProductPrice([variant]);
|
|
10610
|
+
} else if (product) {
|
|
10611
|
+
genProductPrice(product.variants);
|
|
10612
|
+
}
|
|
10613
|
+
}, [product, variant]);
|
|
10614
|
+
var genProductPrice = function genProductPrice(variants) {
|
|
10615
|
+
var mPrice = getMinMax$1(variants, 'price');
|
|
10616
|
+
var mPriceBeforeDiscount = getMinMax$1(variants, 'priceBeforeDiscount');
|
|
10617
|
+
if (mPrice && mPriceBeforeDiscount) {
|
|
10618
|
+
var _displayPriceBeforeDiscount = formatCurrency2(mPriceBeforeDiscount.min);
|
|
10619
|
+
var _displayPrice = formatCurrency2(mPrice.min);
|
|
10620
|
+
if (mPrice.min !== mPrice.max) {
|
|
10621
|
+
_displayPrice += " - " + formatCurrency2(mPrice.max);
|
|
10622
|
+
}
|
|
10623
|
+
if (mPriceBeforeDiscount.min !== mPriceBeforeDiscount.max) {
|
|
10624
|
+
_displayPriceBeforeDiscount += " - " + formatCurrency2(mPriceBeforeDiscount.max);
|
|
10625
|
+
}
|
|
10626
|
+
setDisplayPrice(_displayPrice);
|
|
10627
|
+
setDisplayPriceBeforeDiscount(_displayPriceBeforeDiscount);
|
|
10628
|
+
} else {
|
|
10629
|
+
var _displayPrice2 = formatCurrency2(product === null || product === void 0 ? void 0 : product.price);
|
|
10630
|
+
setDisplayPrice(_displayPrice2);
|
|
10631
|
+
}
|
|
10632
|
+
};
|
|
10633
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
10634
|
+
className: "flex gap-4 flex-wrap " + className
|
|
10635
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
10636
|
+
className: "text-primary font-semibold " + priceClassName,
|
|
10637
|
+
style: style
|
|
10638
|
+
}, displayPrice), displayPriceBeforeDiscount !== displayPrice && displayPriceBeforeDiscount != null ? /*#__PURE__*/React__default.createElement("span", {
|
|
10639
|
+
className: "text-gray3 line-through " + priceBeforeDiscountClassName + " "
|
|
10640
|
+
}, displayPriceBeforeDiscount) : null);
|
|
10641
|
+
};
|
|
10642
|
+
|
|
10643
|
+
var ProductItem11 = function ProductItem11(props) {
|
|
10080
10644
|
var _product$productInfo;
|
|
10081
10645
|
var product = props.product,
|
|
10082
10646
|
_props$Link = props.Link,
|
|
@@ -10089,14 +10653,19 @@ var ProductItem5 = function ProductItem5(props) {
|
|
|
10089
10653
|
Link: Link,
|
|
10090
10654
|
href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
|
|
10091
10655
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10092
|
-
className: "w-full
|
|
10656
|
+
className: "w-full bg-bgSecondary " + className
|
|
10657
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10658
|
+
className: "overflow-hidden"
|
|
10093
10659
|
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10094
10660
|
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10095
|
-
className: "
|
|
10096
|
-
}), /*#__PURE__*/React__default.createElement("div",
|
|
10661
|
+
className: "hover:scale-105 transition duration-300 ease-in-out"
|
|
10662
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
10663
|
+
className: "p-4 flex flex-col gap-4"
|
|
10664
|
+
}, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
10097
10665
|
className: "text-start line-clamp-1 w-full overflow-hidden text-ellipsis mb-2"
|
|
10098
|
-
}, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(
|
|
10666
|
+
}, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice2, {
|
|
10099
10667
|
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10668
|
+
priceClassName: "!font-normal",
|
|
10100
10669
|
className: "text-lg text-start " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "")
|
|
10101
10670
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
10102
10671
|
className: "flex gap-2 md:gap-4 "
|
|
@@ -10106,108 +10675,11 @@ var ProductItem5 = function ProductItem5(props) {
|
|
|
10106
10675
|
label: "Mua ngay",
|
|
10107
10676
|
className: "w-full",
|
|
10108
10677
|
shopConfigStyle: shopConfigStyle
|
|
10109
|
-
}))));
|
|
10110
|
-
};
|
|
10111
|
-
|
|
10112
|
-
var ProductItem6 = function ProductItem6(props) {
|
|
10113
|
-
var _product$productInfo;
|
|
10114
|
-
var product = props.product,
|
|
10115
|
-
_props$shopConfigStyl = props.shopConfigStyle,
|
|
10116
|
-
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
10117
|
-
_props$Link = props.Link,
|
|
10118
|
-
Link = _props$Link === void 0 ? null : _props$Link,
|
|
10119
|
-
_props$className = props.className,
|
|
10120
|
-
className = _props$className === void 0 ? "" : _props$className;
|
|
10121
|
-
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10122
|
-
Link: Link,
|
|
10123
|
-
href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
|
|
10124
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10125
|
-
className: "w-full border border-stroke flex flex-col gap-2 md:gap-4 rounded-2xl p-2 md:p-4 xl:p-6 " + className
|
|
10126
|
-
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10127
|
-
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10128
|
-
className: "w-full h-48 md:h-60 xl:h-72 rounded-2xl"
|
|
10129
|
-
}), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
10130
|
-
className: "text start line-clamp-1 w-full overflow-hidden text-ellipsis"
|
|
10131
|
-
}, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
10132
|
-
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10133
|
-
className: "text-lg text-start " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "")
|
|
10134
|
-
})), /*#__PURE__*/React__default.createElement("div", {
|
|
10135
|
-
className: "flex pt-4 gap-2 md:gap-4 border-t items-center"
|
|
10136
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10137
|
-
className: "p-2 md:p-[10px] text-primary rounded-lg hover:bg-primary hover:text-textButton hover:opacity-80 border border-primary h-full w-auto flex items-center justify-center " + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass) + " "
|
|
10138
|
-
}, /*#__PURE__*/React__default.createElement(fi.FiShoppingCart, null)), /*#__PURE__*/React__default.createElement(Button, {
|
|
10139
|
-
label: "Mua ngay",
|
|
10140
|
-
className: "w-full",
|
|
10141
|
-
shopConfigStyle: shopConfigStyle
|
|
10142
|
-
}))));
|
|
10143
|
-
};
|
|
10144
|
-
|
|
10145
|
-
var ProductItem7 = function ProductItem7(props) {
|
|
10146
|
-
var _product$productInfo, _product$productInfo2, _product$productInfo3, _product$productInfo4, _product$productInfo5, _product$productInfo6;
|
|
10147
|
-
var product = props.product,
|
|
10148
|
-
_props$Link = props.Link,
|
|
10149
|
-
Link = _props$Link === void 0 ? null : _props$Link,
|
|
10150
|
-
_props$className = props.className,
|
|
10151
|
-
className = _props$className === void 0 ? "" : _props$className,
|
|
10152
|
-
_props$classNamePrice = props.classNamePrice,
|
|
10153
|
-
classNamePrice = _props$classNamePrice === void 0 ? "text-lg" : _props$classNamePrice;
|
|
10154
|
-
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10155
|
-
Link: Link,
|
|
10156
|
-
href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
|
|
10157
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10158
|
-
className: "w-full bg-bgSecondary relative rounded-2xl " + className
|
|
10159
|
-
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10160
|
-
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10161
|
-
className: "w-full h-44 md:h-56 lg:h-64 xl:h-72 bg-cover bg-no-repeat rounded-t-2xl"
|
|
10162
|
-
}), /*#__PURE__*/React__default.createElement("div", {
|
|
10163
|
-
className: "p-3 sm:p-4 flex flex-col gap-4 items-start"
|
|
10164
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10165
|
-
className: "line-clamp-1 w-full overflow-hidden text-ellipsis"
|
|
10166
|
-
}, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
10167
|
-
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10168
|
-
className: "text-start " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "") + " " + classNamePrice
|
|
10169
|
-
})), product !== null && product !== void 0 && product.isShowProductPriceOnLanding && product !== null && product !== void 0 && (_product$productInfo2 = product.productInfo) !== null && _product$productInfo2 !== void 0 && _product$productInfo2.priceBeforeDiscount && (product === null || product === void 0 ? void 0 : (_product$productInfo3 = product.productInfo) === null || _product$productInfo3 === void 0 ? void 0 : _product$productInfo3.priceBeforeDiscount) !== (product === null || product === void 0 ? void 0 : (_product$productInfo4 = product.productInfo) === null || _product$productInfo4 === void 0 ? void 0 : _product$productInfo4.price) ? /*#__PURE__*/React__default.createElement("div", {
|
|
10170
|
-
className: "absolute top-5 left-0 font-semibold px-3 py-1 bg-danger text-textButton rounded-r-2xl shadow-lg v-max"
|
|
10171
|
-
}, 1 - 100 * (product === null || product === void 0 ? void 0 : (_product$productInfo5 = product.productInfo) === null || _product$productInfo5 === void 0 ? void 0 : _product$productInfo5.price) / (product === null || product === void 0 ? void 0 : (_product$productInfo6 = product.productInfo) === null || _product$productInfo6 === void 0 ? void 0 : _product$productInfo6.priceBeforeDiscount)) : null));
|
|
10172
|
-
};
|
|
10173
|
-
|
|
10174
|
-
var ProductItem8 = function ProductItem8(props) {
|
|
10175
|
-
var _product$productInfo;
|
|
10176
|
-
var product = props.product,
|
|
10177
|
-
_props$Link = props.Link,
|
|
10178
|
-
Link = _props$Link === void 0 ? null : _props$Link,
|
|
10179
|
-
_props$className = props.className,
|
|
10180
|
-
className = _props$className === void 0 ? "" : _props$className,
|
|
10181
|
-
_props$shopConfigStyl = props.shopConfigStyle,
|
|
10182
|
-
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl;
|
|
10183
|
-
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10184
|
-
Link: Link,
|
|
10185
|
-
href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
|
|
10186
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10187
|
-
className: "text-center rounded relative group " + className
|
|
10188
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10189
|
-
className: "relative "
|
|
10190
|
-
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10191
|
-
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10192
|
-
className: "min-h-[360px] md:min-h-[400px] xl:min-h-[440px] !object-cover !rounded"
|
|
10193
|
-
}), /*#__PURE__*/React__default.createElement("div", {
|
|
10194
|
-
className: "absolute bottom-0 rounded-b pb-6 px-4 bg-gradient-to-t from-black/50 to-transparent flex flex-col items-center h-1/2 gap-2 w-full justify-end "
|
|
10195
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10196
|
-
className: "text-lg text-textButton"
|
|
10197
|
-
}, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
10198
|
-
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10199
|
-
className: !(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "",
|
|
10200
|
-
priceClassName: "text-textButton !font-normal",
|
|
10201
|
-
priceBeforeDiscountClassName: "text-textButton !font-normal"
|
|
10202
|
-
}), /*#__PURE__*/React__default.createElement(Button, {
|
|
10203
|
-
label: "Th\xEAm v\xE0o gi\u1ECF",
|
|
10204
|
-
shopConfigStyle: shopConfigStyle,
|
|
10205
|
-
className: "hidden group-hover:block transition-all duration-300 !font-normal"
|
|
10206
10678
|
})))));
|
|
10207
10679
|
};
|
|
10208
10680
|
|
|
10209
10681
|
var TreatmentItem1 = function TreatmentItem1(props) {
|
|
10210
|
-
var _product$productInfo;
|
|
10682
|
+
var _product$productInfo, _product$productInfo2;
|
|
10211
10683
|
var product = props.product,
|
|
10212
10684
|
_props$Link = props.Link,
|
|
10213
10685
|
Link = _props$Link === void 0 ? null : _props$Link,
|
|
@@ -10220,7 +10692,7 @@ var TreatmentItem1 = function TreatmentItem1(props) {
|
|
|
10220
10692
|
className: "w-full flex flex-col gap-4 rounded-2xl p-1"
|
|
10221
10693
|
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10222
10694
|
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10223
|
-
className: "
|
|
10695
|
+
className: " rounded-2xl"
|
|
10224
10696
|
}), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
10225
10697
|
className: "line-clamp-1 mb-2 font-medium text-lg"
|
|
10226
10698
|
}, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
@@ -10230,7 +10702,7 @@ var TreatmentItem1 = function TreatmentItem1(props) {
|
|
|
10230
10702
|
className: "flex flex-col md:flex-row gap-2 md:items-center md:gap-6 "
|
|
10231
10703
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10232
10704
|
className: "whitespace-nowrap"
|
|
10233
|
-
}, "Th\u1EDDi gian:
|
|
10705
|
+
}, "Th\u1EDDi gian: ", getDurationValue(product === null || product === void 0 ? void 0 : (_product$productInfo2 = product.productInfo) === null || _product$productInfo2 === void 0 ? void 0 : _product$productInfo2.attributes)), /*#__PURE__*/React__default.createElement(Button, {
|
|
10234
10706
|
shopConfigStyle: shopConfigStyle,
|
|
10235
10707
|
label: "\u0110\u1EB7t l\u1ECBch",
|
|
10236
10708
|
className: "w-full"
|
|
@@ -10309,7 +10781,14 @@ var Products2 = function Products2(props) {
|
|
|
10309
10781
|
var _useState2 = React.useState(false),
|
|
10310
10782
|
canGoNext = _useState2[0],
|
|
10311
10783
|
setCanGoNext = _useState2[1];
|
|
10312
|
-
var
|
|
10784
|
+
var _useState3 = React.useState({
|
|
10785
|
+
size: 16,
|
|
10786
|
+
isSale: true
|
|
10787
|
+
}),
|
|
10788
|
+
params = _useState3[0];
|
|
10789
|
+
var _ProductController = ProductController(_extends({}, props, {
|
|
10790
|
+
params: params
|
|
10791
|
+
})),
|
|
10313
10792
|
_ProductController$pr = _ProductController.products,
|
|
10314
10793
|
products = _ProductController$pr === void 0 ? [] : _ProductController$pr,
|
|
10315
10794
|
_ProductController$lo = _ProductController.loading,
|
|
@@ -10331,13 +10810,13 @@ var Products2 = function Products2(props) {
|
|
|
10331
10810
|
breakpoint: 1024,
|
|
10332
10811
|
settings: {
|
|
10333
10812
|
slidesToShow: 4,
|
|
10334
|
-
slidesToScroll:
|
|
10813
|
+
slidesToScroll: 1
|
|
10335
10814
|
}
|
|
10336
10815
|
}, {
|
|
10337
10816
|
breakpoint: 1023,
|
|
10338
10817
|
settings: {
|
|
10339
10818
|
slidesToShow: 3,
|
|
10340
|
-
slidesToScroll:
|
|
10819
|
+
slidesToScroll: 1
|
|
10341
10820
|
}
|
|
10342
10821
|
}, {
|
|
10343
10822
|
breakpoint: 635,
|
|
@@ -10345,6 +10824,12 @@ var Products2 = function Products2(props) {
|
|
|
10345
10824
|
slidesToShow: 2,
|
|
10346
10825
|
slidesToScroll: 2
|
|
10347
10826
|
}
|
|
10827
|
+
}, {
|
|
10828
|
+
breakpoint: 370,
|
|
10829
|
+
settings: {
|
|
10830
|
+
slidesToShow: 1,
|
|
10831
|
+
slidesToScroll: 1
|
|
10832
|
+
}
|
|
10348
10833
|
}]
|
|
10349
10834
|
};
|
|
10350
10835
|
React.useEffect(function () {
|
|
@@ -10378,12 +10863,12 @@ var Products2 = function Products2(props) {
|
|
|
10378
10863
|
color: textBody
|
|
10379
10864
|
}
|
|
10380
10865
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10381
|
-
className: "relative rounded-3xl w-full py-
|
|
10866
|
+
className: "relative rounded-3xl w-full py-6 md:py-10 md:px-6 px-3 xl:px-10",
|
|
10382
10867
|
style: {
|
|
10383
10868
|
background: secondary
|
|
10384
10869
|
}
|
|
10385
10870
|
}, /*#__PURE__*/React__default.createElement("h2", {
|
|
10386
|
-
className: "font-semibold text-2xl md:text-4xl lg:text-4xl ps-5 pb-
|
|
10871
|
+
className: "font-semibold text-2xl md:text-4xl lg:text-4xl ps-5 pb-6",
|
|
10387
10872
|
style: {
|
|
10388
10873
|
color: textButton
|
|
10389
10874
|
}
|
|
@@ -10397,16 +10882,15 @@ var Products2 = function Products2(props) {
|
|
|
10397
10882
|
beforeChange: handleBeforeChange
|
|
10398
10883
|
}), products === null || products === void 0 ? void 0 : products.map(function (product, index) {
|
|
10399
10884
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
10400
|
-
className: "px-2 lg:px-3",
|
|
10885
|
+
className: "px-1 md:px-2 lg:px-3",
|
|
10401
10886
|
key: "dfg-" + index
|
|
10402
10887
|
}, /*#__PURE__*/React__default.createElement(ProductItem, {
|
|
10403
10888
|
product: product,
|
|
10404
10889
|
Link: Link,
|
|
10405
|
-
shopConfigStyle: shopConfigStyle
|
|
10406
|
-
classNamePrice: "text-base md:text-lg"
|
|
10890
|
+
shopConfigStyle: shopConfigStyle
|
|
10407
10891
|
}));
|
|
10408
10892
|
})) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null)), /*#__PURE__*/React__default.createElement("div", {
|
|
10409
|
-
className: "absolute left-0 top-
|
|
10893
|
+
className: "absolute left-0 top-[45%] w-full flex justify-between px-2 md:px-4 lg:px-6"
|
|
10410
10894
|
}, /*#__PURE__*/React__default.createElement("button", {
|
|
10411
10895
|
onClick: goToPrev,
|
|
10412
10896
|
className: (canGoPrev ? "bg-primary" : "bg-gray5 cursor-not-allowed") + " p-2 rounded-full"
|
|
@@ -10451,7 +10935,7 @@ var Pagination = function Pagination(_ref) {
|
|
|
10451
10935
|
for (var i = start; i <= end; i++) {
|
|
10452
10936
|
pages.push(i);
|
|
10453
10937
|
}
|
|
10454
|
-
if (current_page < total_pages -
|
|
10938
|
+
if (current_page < total_pages - 3) pages.push("...");
|
|
10455
10939
|
pages.push(total_pages);
|
|
10456
10940
|
return pages;
|
|
10457
10941
|
};
|
|
@@ -10471,7 +10955,7 @@ var Pagination = function Pagination(_ref) {
|
|
|
10471
10955
|
onClick: function onClick() {
|
|
10472
10956
|
return typeof page === "number" && handlePageChange(page - 1);
|
|
10473
10957
|
},
|
|
10474
|
-
className: "px-4 py-1 rounded-md " + (page === current_page + 1 ? "bg-primary text-white" : "bg-transparent text-primary") + " hover:opacity-80 " + (page === "..." ? "cursor-default text-gray-500" : ""),
|
|
10958
|
+
className: "px-2 md:px-4 py-1 rounded-md " + (page === current_page + 1 ? "bg-primary text-white" : "bg-transparent text-primary") + " hover:opacity-80 " + (page === "..." ? "cursor-default text-gray-500" : ""),
|
|
10475
10959
|
disabled: page === "..."
|
|
10476
10960
|
}, page);
|
|
10477
10961
|
})), /*#__PURE__*/React__default.createElement(io5.IoChevronForwardOutline, {
|
|
@@ -10523,111 +11007,284 @@ var Products3 = function Products3(props) {
|
|
|
10523
11007
|
categoryId: categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.categoryId
|
|
10524
11008
|
}));
|
|
10525
11009
|
}
|
|
10526
|
-
}, [categorySelected]);
|
|
10527
|
-
var onSelectCategory = function onSelectCategory(category) {
|
|
10528
|
-
setCategorySelected(category);
|
|
11010
|
+
}, [categorySelected]);
|
|
11011
|
+
var onSelectCategory = function onSelectCategory(category) {
|
|
11012
|
+
setCategorySelected(category);
|
|
11013
|
+
};
|
|
11014
|
+
var onPageChange = function onPageChange(pageNum) {
|
|
11015
|
+
setProductParams(_extends({}, productParams, {
|
|
11016
|
+
page: pageNum
|
|
11017
|
+
}));
|
|
11018
|
+
};
|
|
11019
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
11020
|
+
className: "" + SECTION_DEFAULT_CLASS
|
|
11021
|
+
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
11022
|
+
data: data,
|
|
11023
|
+
shopConfigStyle: shopConfigStyle
|
|
11024
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
11025
|
+
className: "grid grid-cols-1 md:grid-cols-4 gap-12"
|
|
11026
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11027
|
+
className: "hidden md:block"
|
|
11028
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11029
|
+
className: "text-xl"
|
|
11030
|
+
}, "Danh m\u1EE5c s\u1EA3n ph\u1EA9m"), /*#__PURE__*/React__default.createElement("div", {
|
|
11031
|
+
className: "overflow-y-auto max-h-96 scroll-container pr-3"
|
|
11032
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11033
|
+
className: "flex gap-2 py-4 border-b border-stroke cursor-pointer hover:text-primary " + (!(categorySelected !== null && categorySelected !== void 0 && categorySelected.categoryId) ? "text-primary" : "text-textSecondary"),
|
|
11034
|
+
onClick: function onClick() {
|
|
11035
|
+
return onSelectCategory({
|
|
11036
|
+
categoryId: undefined
|
|
11037
|
+
});
|
|
11038
|
+
}
|
|
11039
|
+
}, /*#__PURE__*/React__default.createElement(io.IoIosHeartEmpty, {
|
|
11040
|
+
size: 24
|
|
11041
|
+
}), /*#__PURE__*/React__default.createElement("div", null, "T\u1EA5t c\u1EA3")), categories === null || categories === void 0 ? void 0 : categories.map(function (category, index) {
|
|
11042
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
11043
|
+
className: "flex gap-2 py-4 border-b border-stroke cursor-pointer hover:text-primary " + ((categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.categoryId) === (category === null || category === void 0 ? void 0 : category.categoryId) ? "text-primary" : "text-textSecondary"),
|
|
11044
|
+
key: index,
|
|
11045
|
+
onClick: function onClick() {
|
|
11046
|
+
return onSelectCategory(category);
|
|
11047
|
+
}
|
|
11048
|
+
}, /*#__PURE__*/React__default.createElement(io.IoIosHeartEmpty, {
|
|
11049
|
+
size: 24
|
|
11050
|
+
}), /*#__PURE__*/React__default.createElement("div", null, category === null || category === void 0 ? void 0 : category.cateName));
|
|
11051
|
+
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
11052
|
+
className: "md:hidden"
|
|
11053
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
11054
|
+
className: "col-span-3 text-center"
|
|
11055
|
+
}, loading ? /*#__PURE__*/React__default.createElement("div", {
|
|
11056
|
+
className: "flex w-full justify-center items-center p-12 h-[700px]"
|
|
11057
|
+
}, /*#__PURE__*/React__default.createElement(Loading, {
|
|
11058
|
+
size: 32
|
|
11059
|
+
})) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
11060
|
+
className: "grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-12 mt-12"
|
|
11061
|
+
}, products === null || products === void 0 ? void 0 : products.map(function (product, index) {
|
|
11062
|
+
return /*#__PURE__*/React__default.createElement(ProductItem, {
|
|
11063
|
+
Link: Link,
|
|
11064
|
+
key: index,
|
|
11065
|
+
shopConfigStyle: shopConfigStyle,
|
|
11066
|
+
product: product
|
|
11067
|
+
});
|
|
11068
|
+
})) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null), (page === null || page === void 0 ? void 0 : page.total_pages) > 1 ? /*#__PURE__*/React__default.createElement(Pagination, _extends({
|
|
11069
|
+
className: "mt-12"
|
|
11070
|
+
}, page, {
|
|
11071
|
+
onPageChange: onPageChange
|
|
11072
|
+
})) : null))), /*#__PURE__*/React__default.createElement(Dash, {
|
|
11073
|
+
color: secondary
|
|
11074
|
+
}));
|
|
11075
|
+
};
|
|
11076
|
+
|
|
11077
|
+
var CarouselItem = function CarouselItem(props) {
|
|
11078
|
+
var _Object$keys;
|
|
11079
|
+
var _props$data = props.data,
|
|
11080
|
+
data = _props$data === void 0 ? [] : _props$data,
|
|
11081
|
+
_props$className = props.className,
|
|
11082
|
+
className = _props$className === void 0 ? "" : _props$className,
|
|
11083
|
+
_props$style = props.style,
|
|
11084
|
+
style = _props$style === void 0 ? {} : _props$style,
|
|
11085
|
+
_props$onClick = props.onClick,
|
|
11086
|
+
onClick = _props$onClick === void 0 ? function () {} : _props$onClick,
|
|
11087
|
+
_props$isAll = props.isAll,
|
|
11088
|
+
isAll = _props$isAll === void 0 ? true : _props$isAll,
|
|
11089
|
+
_props$isNavigateButt = props.isNavigateButton,
|
|
11090
|
+
isNavigateButton = _props$isNavigateButt === void 0 ? true : _props$isNavigateButt,
|
|
11091
|
+
_props$itemClassName = props.itemClassName,
|
|
11092
|
+
itemClassName = _props$itemClassName === void 0 ? "" : _props$itemClassName;
|
|
11093
|
+
var listRef = React.useRef(null);
|
|
11094
|
+
var _useState = React.useState(false),
|
|
11095
|
+
canScrollLeft = _useState[0],
|
|
11096
|
+
setCanScrollLeft = _useState[1];
|
|
11097
|
+
var _useState2 = React.useState(false),
|
|
11098
|
+
canScrollRight = _useState2[0],
|
|
11099
|
+
setCanScrollRight = _useState2[1];
|
|
11100
|
+
var _useState3 = React.useState({}),
|
|
11101
|
+
value = _useState3[0],
|
|
11102
|
+
setValue = _useState3[1];
|
|
11103
|
+
React.useEffect(function () {
|
|
11104
|
+
var _listRef$current;
|
|
11105
|
+
checkScroll();
|
|
11106
|
+
(_listRef$current = listRef.current) === null || _listRef$current === void 0 ? void 0 : _listRef$current.addEventListener("scroll", checkScroll);
|
|
11107
|
+
return function () {
|
|
11108
|
+
var _listRef$current2;
|
|
11109
|
+
return (_listRef$current2 = listRef.current) === null || _listRef$current2 === void 0 ? void 0 : _listRef$current2.removeEventListener("scroll", checkScroll);
|
|
11110
|
+
};
|
|
11111
|
+
}, [data]);
|
|
11112
|
+
var checkScroll = function checkScroll() {
|
|
11113
|
+
if (listRef.current) {
|
|
11114
|
+
var _listRef$current3 = listRef.current,
|
|
11115
|
+
scrollLeft = _listRef$current3.scrollLeft,
|
|
11116
|
+
scrollWidth = _listRef$current3.scrollWidth,
|
|
11117
|
+
clientWidth = _listRef$current3.clientWidth;
|
|
11118
|
+
setCanScrollLeft(scrollLeft > 0);
|
|
11119
|
+
setCanScrollRight(scrollLeft + clientWidth < scrollWidth - 1);
|
|
11120
|
+
}
|
|
11121
|
+
};
|
|
11122
|
+
var handleClickPrevImg = function handleClickPrevImg() {
|
|
11123
|
+
if (listRef.current) {
|
|
11124
|
+
checkScroll();
|
|
11125
|
+
listRef.current.scrollBy({
|
|
11126
|
+
left: -300,
|
|
11127
|
+
behavior: "smooth"
|
|
11128
|
+
});
|
|
11129
|
+
}
|
|
10529
11130
|
};
|
|
10530
|
-
var
|
|
10531
|
-
|
|
10532
|
-
|
|
10533
|
-
|
|
11131
|
+
var handleClickNextImg = function handleClickNextImg() {
|
|
11132
|
+
if (listRef.current) {
|
|
11133
|
+
checkScroll();
|
|
11134
|
+
listRef.current.scrollBy({
|
|
11135
|
+
left: 300,
|
|
11136
|
+
behavior: "smooth"
|
|
11137
|
+
});
|
|
11138
|
+
}
|
|
10534
11139
|
};
|
|
10535
|
-
|
|
10536
|
-
|
|
10537
|
-
|
|
10538
|
-
|
|
10539
|
-
|
|
10540
|
-
|
|
10541
|
-
|
|
10542
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10543
|
-
className: "hidden md:block"
|
|
11140
|
+
var handleOnClick = function handleOnClick(item) {
|
|
11141
|
+
setValue(item);
|
|
11142
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(item);
|
|
11143
|
+
};
|
|
11144
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
11145
|
+
className: "h-10 md:h-12 flex justify-between items-center " + className,
|
|
11146
|
+
style: style
|
|
10544
11147
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10545
|
-
className: "
|
|
10546
|
-
}, "Danh m\u1EE5c s\u1EA3n ph\u1EA9m"), /*#__PURE__*/React__default.createElement("div", {
|
|
10547
|
-
className: "overflow-y-auto max-h-96 scroll-container pr-3"
|
|
11148
|
+
className: "w-full overflow-hidden "
|
|
10548
11149
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10549
|
-
className: "flex
|
|
11150
|
+
className: "flex overflow-x-auto gap-2 " + (isNavigateButton ? "no-scrollbar" : "scroll-custom pb-2") + " items-center",
|
|
11151
|
+
ref: listRef
|
|
11152
|
+
}, isAll ? /*#__PURE__*/React__default.createElement("div", {
|
|
11153
|
+
className: " " + ((Object === null || Object === void 0 ? void 0 : (_Object$keys = Object.keys(value)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length) <= 0 ? "bg-primary text-textButton" : "bg-background") + " text-primary w-max border border-primary p-1 md:p-2 rounded-lg cursor-pointer whitespace-nowrap",
|
|
10550
11154
|
onClick: function onClick() {
|
|
10551
|
-
|
|
10552
|
-
categoryId: undefined
|
|
10553
|
-
});
|
|
11155
|
+
handleOnClick({});
|
|
10554
11156
|
}
|
|
10555
|
-
},
|
|
10556
|
-
size: 24
|
|
10557
|
-
}), /*#__PURE__*/React__default.createElement("div", null, "T\u1EA5t c\u1EA3")), categories === null || categories === void 0 ? void 0 : categories.map(function (category, index) {
|
|
11157
|
+
}, "T\u1EA5t c\u1EA3") : null, data && (data === null || data === void 0 ? void 0 : data.length) > 0 && (data === null || data === void 0 ? void 0 : data.map(function (item, index) {
|
|
10558
11158
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
10559
|
-
className:
|
|
10560
|
-
key: index,
|
|
11159
|
+
className: ((value === null || value === void 0 ? void 0 : value.value) === (item === null || item === void 0 ? void 0 : item.value) ? "bg-primary text-textButton" : "bg-background") + " w-max border text-primary border-primary py-1 px-2 md:py-2 md:px-3 rounded-lg cursor-pointer whitespace-nowrap " + itemClassName,
|
|
11160
|
+
key: "carousel-" + index,
|
|
10561
11161
|
onClick: function onClick() {
|
|
10562
|
-
|
|
11162
|
+
handleOnClick(item);
|
|
10563
11163
|
}
|
|
10564
|
-
},
|
|
10565
|
-
|
|
10566
|
-
|
|
10567
|
-
}
|
|
10568
|
-
className: "md:
|
|
10569
|
-
|
|
10570
|
-
|
|
10571
|
-
},
|
|
10572
|
-
|
|
10573
|
-
|
|
10574
|
-
|
|
10575
|
-
|
|
10576
|
-
|
|
10577
|
-
|
|
10578
|
-
|
|
10579
|
-
|
|
10580
|
-
|
|
10581
|
-
|
|
10582
|
-
product: product
|
|
10583
|
-
});
|
|
10584
|
-
})) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null), (page === null || page === void 0 ? void 0 : page.total_pages) > 1 ? /*#__PURE__*/React__default.createElement(Pagination, _extends({
|
|
10585
|
-
className: "mt-12"
|
|
10586
|
-
}, page, {
|
|
10587
|
-
onPageChange: onPageChange
|
|
10588
|
-
})) : null))), /*#__PURE__*/React__default.createElement(Dash, {
|
|
10589
|
-
color: secondary
|
|
10590
|
-
}));
|
|
11164
|
+
}, item === null || item === void 0 ? void 0 : item.label);
|
|
11165
|
+
})))), isNavigateButton ? /*#__PURE__*/React__default.createElement("div", {
|
|
11166
|
+
className: "hidden my-auto gap-4 md:flex justify-end ps-10"
|
|
11167
|
+
}, /*#__PURE__*/React__default.createElement("button", {
|
|
11168
|
+
className: "h-full w-9 h-9 md:h-11 md:w-11 items-center justify-center rounded-full " + (canScrollLeft ? "bg-primary cursor-pointer text-textButton" : "bg-gray5 text-gray3 cursor-not-allowed"),
|
|
11169
|
+
onClick: handleClickPrevImg,
|
|
11170
|
+
disabled: !canScrollLeft
|
|
11171
|
+
}, /*#__PURE__*/React__default.createElement(io.IoIosArrowBack, {
|
|
11172
|
+
size: 24,
|
|
11173
|
+
className: "inline-block text-lg"
|
|
11174
|
+
})), /*#__PURE__*/React__default.createElement("button", {
|
|
11175
|
+
className: "h-full w-9 h-9 md:h-11 md:w-11 flex items-center justify-center rounded-full " + (canScrollRight ? "bg-primary cursor-pointer text-textButton" : "bg-gray5 text-gray3 cursor-not-allowed"),
|
|
11176
|
+
onClick: handleClickNextImg,
|
|
11177
|
+
disabled: !canScrollRight
|
|
11178
|
+
}, /*#__PURE__*/React__default.createElement(io.IoIosArrowForward, {
|
|
11179
|
+
size: 24,
|
|
11180
|
+
className: "inline-block text-lg "
|
|
11181
|
+
}))) : null);
|
|
10591
11182
|
};
|
|
10592
11183
|
|
|
10593
11184
|
var Products9 = function Products9(props) {
|
|
10594
|
-
var _Object$
|
|
11185
|
+
var _Object$keys2;
|
|
10595
11186
|
var _props$Link = props.Link,
|
|
10596
11187
|
Link = _props$Link === void 0 ? null : _props$Link,
|
|
10597
11188
|
shopConfigStyle = props.shopConfigStyle,
|
|
10598
11189
|
_props$ProductItem = props.ProductItem,
|
|
10599
11190
|
ProductItem = _props$ProductItem === void 0 ? null : _props$ProductItem;
|
|
10600
|
-
var _useState = React.useState(
|
|
11191
|
+
var _useState = React.useState(true),
|
|
11192
|
+
loading = _useState[0],
|
|
11193
|
+
setLoading = _useState[1];
|
|
11194
|
+
var _useState2 = React.useState({
|
|
10601
11195
|
size: 12
|
|
10602
11196
|
}),
|
|
10603
|
-
params =
|
|
10604
|
-
|
|
11197
|
+
params = _useState2[0];
|
|
11198
|
+
var _useState3 = React.useState(false),
|
|
11199
|
+
isAutoGetList = _useState3[0];
|
|
10605
11200
|
var _CategoryController = CategoryController(_extends({}, props, {
|
|
10606
11201
|
types: "0"
|
|
10607
11202
|
})),
|
|
10608
11203
|
_CategoryController$c = _CategoryController.categories,
|
|
10609
11204
|
categories = _CategoryController$c === void 0 ? [] : _CategoryController$c;
|
|
10610
11205
|
var _ProductController = ProductController(_extends({}, props, {
|
|
10611
|
-
params: params
|
|
11206
|
+
params: params,
|
|
11207
|
+
isAutoGetList: isAutoGetList
|
|
10612
11208
|
})),
|
|
10613
|
-
|
|
10614
|
-
|
|
10615
|
-
|
|
11209
|
+
getProductListSearch = _ProductController.getProductListSearch;
|
|
11210
|
+
var _useState4 = React.useState([]),
|
|
11211
|
+
categoryProducts = _useState4[0],
|
|
11212
|
+
setCategoryProducts = _useState4[1];
|
|
11213
|
+
React.useEffect(function () {
|
|
11214
|
+
if ((categories === null || categories === void 0 ? void 0 : categories.length) > 0) {
|
|
11215
|
+
fetchAll();
|
|
11216
|
+
}
|
|
11217
|
+
}, [categories]);
|
|
11218
|
+
var fetchAll = function fetchAll() {
|
|
11219
|
+
try {
|
|
11220
|
+
setLoading(true);
|
|
11221
|
+
var _temp = _finallyRethrows(function () {
|
|
11222
|
+
return _catch(function () {
|
|
11223
|
+
var _categories$slice;
|
|
11224
|
+
var result = {};
|
|
11225
|
+
return Promise.resolve(Promise.all(categories === null || categories === void 0 ? void 0 : (_categories$slice = categories.slice(0, 4)) === null || _categories$slice === void 0 ? void 0 : _categories$slice.map(function (cat) {
|
|
11226
|
+
try {
|
|
11227
|
+
return Promise.resolve(getProductListSearch({
|
|
11228
|
+
categoryId: cat === null || cat === void 0 ? void 0 : cat.categoryId,
|
|
11229
|
+
size: 4
|
|
11230
|
+
})).then(function (products) {
|
|
11231
|
+
if ((products === null || products === void 0 ? void 0 : products.length) > 0) {
|
|
11232
|
+
result[cat === null || cat === void 0 ? void 0 : cat.cateName] = products;
|
|
11233
|
+
}
|
|
11234
|
+
});
|
|
11235
|
+
} catch (e) {
|
|
11236
|
+
return Promise.reject(e);
|
|
11237
|
+
}
|
|
11238
|
+
}))).then(function () {
|
|
11239
|
+
setCategoryProducts(result);
|
|
11240
|
+
});
|
|
11241
|
+
}, function (error) {
|
|
11242
|
+
console.log(error);
|
|
11243
|
+
});
|
|
11244
|
+
}, function (_wasThrown, _result) {
|
|
11245
|
+
setLoading(false);
|
|
11246
|
+
if (_wasThrown) throw _result;
|
|
11247
|
+
return _result;
|
|
11248
|
+
});
|
|
11249
|
+
return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
|
|
11250
|
+
} catch (e) {
|
|
11251
|
+
return Promise.reject(e);
|
|
11252
|
+
}
|
|
11253
|
+
};
|
|
10616
11254
|
var handleChooseCategory = function handleChooseCategory(item) {
|
|
10617
|
-
|
|
10618
|
-
|
|
10619
|
-
|
|
10620
|
-
}
|
|
11255
|
+
var _Object$keys;
|
|
11256
|
+
if ((Object === null || Object === void 0 ? void 0 : (_Object$keys = Object.keys(item)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length) <= 0) {
|
|
11257
|
+
fetchAll();
|
|
11258
|
+
} else {
|
|
11259
|
+
fetchOne(item);
|
|
11260
|
+
}
|
|
10621
11261
|
};
|
|
10622
|
-
var
|
|
10623
|
-
|
|
10624
|
-
|
|
10625
|
-
|
|
10626
|
-
|
|
11262
|
+
var fetchOne = function fetchOne(item) {
|
|
11263
|
+
try {
|
|
11264
|
+
setLoading(true);
|
|
11265
|
+
var _temp2 = _finallyRethrows(function () {
|
|
11266
|
+
return _catch(function () {
|
|
11267
|
+
return Promise.resolve(getProductListSearch({
|
|
11268
|
+
categoryId: item === null || item === void 0 ? void 0 : item.categoryId,
|
|
11269
|
+
size: 12
|
|
11270
|
+
})).then(function (products) {
|
|
11271
|
+
var _setCategoryProducts, _console$log;
|
|
11272
|
+
setCategoryProducts((_setCategoryProducts = {}, _setCategoryProducts[item === null || item === void 0 ? void 0 : item.cateName] = products, _setCategoryProducts));
|
|
11273
|
+
console.log("check::::", (_console$log = {}, _console$log[item === null || item === void 0 ? void 0 : item.cateName] = products, _console$log));
|
|
11274
|
+
});
|
|
11275
|
+
}, function (error) {
|
|
11276
|
+
console.log(error);
|
|
11277
|
+
});
|
|
11278
|
+
}, function (_wasThrown2, _result2) {
|
|
11279
|
+
setLoading(false);
|
|
11280
|
+
if (_wasThrown2) throw _result2;
|
|
11281
|
+
return _result2;
|
|
11282
|
+
});
|
|
11283
|
+
return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(function () {}) : void 0);
|
|
11284
|
+
} catch (e) {
|
|
11285
|
+
return Promise.reject(e);
|
|
10627
11286
|
}
|
|
10628
|
-
|
|
10629
|
-
return acc;
|
|
10630
|
-
}, {});
|
|
11287
|
+
};
|
|
10631
11288
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
10632
11289
|
className: SECTION_CLASS + " flex flex-col gap-4 md:!my-6 md:gap-6 "
|
|
10633
11290
|
}, /*#__PURE__*/React__default.createElement(CarouselItem, {
|
|
@@ -10635,7 +11292,7 @@ var Products9 = function Products9(props) {
|
|
|
10635
11292
|
onClick: handleChooseCategory
|
|
10636
11293
|
}), loading ? /*#__PURE__*/React__default.createElement("div", {
|
|
10637
11294
|
className: "m-auto mt-20 min-h-32"
|
|
10638
|
-
}, /*#__PURE__*/React__default.createElement(Loading, null)) : (Object === null || Object === void 0 ? void 0 : (_Object$
|
|
11295
|
+
}, /*#__PURE__*/React__default.createElement(Loading, null)) : (Object === null || Object === void 0 ? void 0 : (_Object$keys2 = Object.keys(categoryProducts)) === null || _Object$keys2 === void 0 ? void 0 : _Object$keys2.length) > 0 ? Object.entries(categoryProducts).map(function (_ref, index) {
|
|
10639
11296
|
var _products$;
|
|
10640
11297
|
var categoryName = _ref[0],
|
|
10641
11298
|
products = _ref[1];
|
|
@@ -10659,7 +11316,9 @@ var Products9 = function Products9(props) {
|
|
|
10659
11316
|
product: product,
|
|
10660
11317
|
key: product === null || product === void 0 ? void 0 : product.landingShopProductId
|
|
10661
11318
|
});
|
|
10662
|
-
}) :
|
|
11319
|
+
}) : /*#__PURE__*/React__default.createElement("div", {
|
|
11320
|
+
className: "col-span-2 sm:col-span-3 lg:col-span-4"
|
|
11321
|
+
}, /*#__PURE__*/React__default.createElement(NotFoundProduct, null))));
|
|
10663
11322
|
}) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null));
|
|
10664
11323
|
};
|
|
10665
11324
|
|
|
@@ -10730,34 +11389,30 @@ var listFilter = [{
|
|
|
10730
11389
|
value: "sortPriceDESC"
|
|
10731
11390
|
}];
|
|
10732
11391
|
var Products11 = function Products11(props) {
|
|
10733
|
-
var _productsFilter$slice;
|
|
10734
11392
|
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
10735
11393
|
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
10736
11394
|
_props$Link = props.Link,
|
|
10737
11395
|
Link = _props$Link === void 0 ? null : _props$Link,
|
|
10738
11396
|
_props$categoryId = props.categoryId,
|
|
10739
|
-
categoryId = _props$categoryId === void 0 ?
|
|
11397
|
+
categoryId = _props$categoryId === void 0 ? "" : _props$categoryId,
|
|
10740
11398
|
_props$ProductItem = props.ProductItem,
|
|
10741
11399
|
ProductItem = _props$ProductItem === void 0 ? null : _props$ProductItem;
|
|
10742
11400
|
var _useState = React.useState({
|
|
10743
11401
|
page: 0,
|
|
10744
11402
|
size: 12,
|
|
10745
|
-
categoryId: categoryId
|
|
11403
|
+
categoryId: categoryId || ""
|
|
10746
11404
|
}),
|
|
10747
11405
|
params = _useState[0],
|
|
10748
11406
|
setParams = _useState[1];
|
|
10749
|
-
var _useState2 = React.useState(
|
|
10750
|
-
|
|
10751
|
-
|
|
10752
|
-
var _useState3 = React.useState(
|
|
10753
|
-
|
|
10754
|
-
|
|
10755
|
-
var _useState4 = React.useState([]),
|
|
10756
|
-
|
|
10757
|
-
|
|
10758
|
-
var _useState5 = React.useState(listFilter === null || listFilter === void 0 ? void 0 : listFilter[0]),
|
|
10759
|
-
filterItem = _useState5[0],
|
|
10760
|
-
setFilterItem = _useState5[1];
|
|
11407
|
+
var _useState2 = React.useState({}),
|
|
11408
|
+
categorySelected = _useState2[0],
|
|
11409
|
+
setCategorySelected = _useState2[1];
|
|
11410
|
+
var _useState3 = React.useState([]),
|
|
11411
|
+
productsFilter = _useState3[0],
|
|
11412
|
+
setProductsFilter = _useState3[1];
|
|
11413
|
+
var _useState4 = React.useState(listFilter === null || listFilter === void 0 ? void 0 : listFilter[0]),
|
|
11414
|
+
filterItem = _useState4[0],
|
|
11415
|
+
setFilterItem = _useState4[1];
|
|
10761
11416
|
var _CategoryController = CategoryController(_extends({}, props, {
|
|
10762
11417
|
types: "0"
|
|
10763
11418
|
})),
|
|
@@ -10771,22 +11426,33 @@ var Products11 = function Products11(props) {
|
|
|
10771
11426
|
loading = _ProductController.loading,
|
|
10772
11427
|
page = _ProductController.page;
|
|
10773
11428
|
var handleOnChangePage = function handleOnChangePage(pageIndex) {
|
|
10774
|
-
setFirstLoading(false);
|
|
10775
11429
|
setParams(function (prev) {
|
|
10776
11430
|
return _extends({}, prev, {
|
|
10777
11431
|
page: pageIndex
|
|
10778
11432
|
});
|
|
10779
11433
|
});
|
|
11434
|
+
window.scrollTo({
|
|
11435
|
+
top: 0,
|
|
11436
|
+
behavior: 'smooth'
|
|
11437
|
+
});
|
|
10780
11438
|
};
|
|
10781
11439
|
var handleChooseCategory = function handleChooseCategory(category) {
|
|
11440
|
+
if (categoryId) {
|
|
11441
|
+
var newUrl = getLinkProductsByCategory(category);
|
|
11442
|
+
window.history.replaceState(null, '', newUrl);
|
|
11443
|
+
}
|
|
10782
11444
|
setCategorySelected(category);
|
|
10783
|
-
setFirstLoading(true);
|
|
10784
11445
|
setFilterItem(listFilter === null || listFilter === void 0 ? void 0 : listFilter[0]);
|
|
10785
11446
|
setParams(function (prev) {
|
|
10786
|
-
return
|
|
11447
|
+
return {
|
|
11448
|
+
page: 0,
|
|
10787
11449
|
categoryId: category === null || category === void 0 ? void 0 : category.categoryId,
|
|
10788
11450
|
size: 12
|
|
10789
|
-
}
|
|
11451
|
+
};
|
|
11452
|
+
});
|
|
11453
|
+
window.scrollTo({
|
|
11454
|
+
top: 0,
|
|
11455
|
+
behavior: 'smooth'
|
|
10790
11456
|
});
|
|
10791
11457
|
};
|
|
10792
11458
|
React.useEffect(function () {
|
|
@@ -10798,44 +11464,54 @@ var Products11 = function Products11(props) {
|
|
|
10798
11464
|
}
|
|
10799
11465
|
}, [categories]);
|
|
10800
11466
|
React.useEffect(function () {
|
|
10801
|
-
|
|
11467
|
+
if ((filterItem === null || filterItem === void 0 ? void 0 : filterItem.value) === "sortPriceDESC") {
|
|
11468
|
+
var productsCopy = [].concat(products);
|
|
11469
|
+
productsCopy === null || productsCopy === void 0 ? void 0 : productsCopy.sort(function (a, b) {
|
|
11470
|
+
var _a$productInfo, _b$productInfo;
|
|
11471
|
+
return (a === null || a === void 0 ? void 0 : (_a$productInfo = a.productInfo) === null || _a$productInfo === void 0 ? void 0 : _a$productInfo.price) - (b === null || b === void 0 ? void 0 : (_b$productInfo = b.productInfo) === null || _b$productInfo === void 0 ? void 0 : _b$productInfo.price);
|
|
11472
|
+
});
|
|
11473
|
+
setProductsFilter(productsCopy);
|
|
11474
|
+
} else {
|
|
11475
|
+
setProductsFilter(products);
|
|
11476
|
+
}
|
|
10802
11477
|
}, [products, categorySelected]);
|
|
10803
11478
|
var handleFilter = function handleFilter(item) {
|
|
10804
11479
|
setFilterItem(item);
|
|
10805
|
-
if ((item === null || item === void 0 ? void 0 : item.value) === "sortPriceDESC") {
|
|
11480
|
+
if ((item === null || item === void 0 ? void 0 : item.value) === "sortPriceDESC" && !(params !== null && params !== void 0 && params.isHighlight) && !(params !== null && params !== void 0 && params.isSale)) {
|
|
10806
11481
|
var productsCopy = [].concat(products);
|
|
10807
11482
|
productsCopy === null || productsCopy === void 0 ? void 0 : productsCopy.sort(function (a, b) {
|
|
10808
|
-
var
|
|
10809
|
-
return
|
|
11483
|
+
var _a$productInfo2, _b$productInfo2;
|
|
11484
|
+
return (a === null || a === void 0 ? void 0 : (_a$productInfo2 = a.productInfo) === null || _a$productInfo2 === void 0 ? void 0 : _a$productInfo2.price) - (b === null || b === void 0 ? void 0 : (_b$productInfo2 = b.productInfo) === null || _b$productInfo2 === void 0 ? void 0 : _b$productInfo2.price);
|
|
10810
11485
|
});
|
|
10811
11486
|
setProductsFilter(productsCopy);
|
|
10812
11487
|
} else if ((item === null || item === void 0 ? void 0 : item.value) === "discount") {
|
|
10813
|
-
|
|
10814
|
-
|
|
10815
|
-
|
|
11488
|
+
setParams({
|
|
11489
|
+
page: 0,
|
|
11490
|
+
categoryId: categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.categoryId,
|
|
11491
|
+
size: 12,
|
|
11492
|
+
isSale: true
|
|
10816
11493
|
});
|
|
10817
|
-
setProductsFilter(_productsCopy);
|
|
10818
11494
|
} else if ((item === null || item === void 0 ? void 0 : item.value) === "isHighlight") {
|
|
10819
|
-
setParams(
|
|
10820
|
-
|
|
10821
|
-
|
|
10822
|
-
|
|
11495
|
+
setParams({
|
|
11496
|
+
page: 0,
|
|
11497
|
+
categoryId: categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.categoryId,
|
|
11498
|
+
size: 12,
|
|
11499
|
+
isHighlight: true
|
|
10823
11500
|
});
|
|
10824
11501
|
} else {
|
|
10825
|
-
setParams(
|
|
10826
|
-
|
|
10827
|
-
|
|
10828
|
-
|
|
10829
|
-
});
|
|
11502
|
+
setParams({
|
|
11503
|
+
page: 0,
|
|
11504
|
+
categoryId: categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.categoryId,
|
|
11505
|
+
size: 12
|
|
10830
11506
|
});
|
|
10831
11507
|
}
|
|
10832
11508
|
};
|
|
10833
11509
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
10834
11510
|
className: SECTION_CLASS + " grid grid-cols-1 !my-6 !md:my-6 md:grid-cols-4 gap-6"
|
|
10835
11511
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10836
|
-
className: "md:sticky top-
|
|
11512
|
+
className: "md:sticky top-16 self-start"
|
|
10837
11513
|
}, (categories === null || categories === void 0 ? void 0 : categories.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
10838
|
-
className: " flex flex-col gap-2 rounded-
|
|
11514
|
+
className: " flex flex-col gap-2 rounded-2xl bg-bgSecondary p-4 max-h-96 scroll-container overflow-y-auto"
|
|
10839
11515
|
}, categories === null || categories === void 0 ? void 0 : categories.map(function (item, index) {
|
|
10840
11516
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
10841
11517
|
className: "px-6 py-2 hover:bg-gray-100 hover:text-primary cursor-pointer rounded-lg " + ((categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.categoryId) === (item === null || item === void 0 ? void 0 : item.categoryId) ? " bg-primary text-textButton" : ""),
|
|
@@ -10843,7 +11519,9 @@ var Products11 = function Products11(props) {
|
|
|
10843
11519
|
onClick: function onClick() {
|
|
10844
11520
|
handleChooseCategory(item);
|
|
10845
11521
|
}
|
|
10846
|
-
},
|
|
11522
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11523
|
+
className: "line-clamp-2"
|
|
11524
|
+
}, item === null || item === void 0 ? void 0 : item.cateName));
|
|
10847
11525
|
})) : null), /*#__PURE__*/React__default.createElement("div", {
|
|
10848
11526
|
className: "md:col-span-3 flex flex-col gap-6"
|
|
10849
11527
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -10856,11 +11534,11 @@ var Products11 = function Products11(props) {
|
|
|
10856
11534
|
handleFilter(item);
|
|
10857
11535
|
}
|
|
10858
11536
|
}, item === null || item === void 0 ? void 0 : item.label);
|
|
10859
|
-
})), loading
|
|
11537
|
+
})), loading ? /*#__PURE__*/React__default.createElement("div", {
|
|
10860
11538
|
className: "w-full h-96 mb-1 flex justify-center items-center"
|
|
10861
11539
|
}, /*#__PURE__*/React__default.createElement(Loading, null)) : /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
10862
|
-
className: "grid grid-cols-2 md:grid-cols-2 lg:grid-cols-3 gap-3 md:gap-6
|
|
10863
|
-
}, (productsFilter === null || productsFilter === void 0 ? void 0 : productsFilter.length) > 0 ? productsFilter === null || productsFilter === void 0 ? void 0 :
|
|
11540
|
+
className: "grid grid-cols-2 md:grid-cols-2 lg:grid-cols-3 gap-3 md:gap-6 xl:gap-8"
|
|
11541
|
+
}, (productsFilter === null || productsFilter === void 0 ? void 0 : productsFilter.length) > 0 ? productsFilter === null || productsFilter === void 0 ? void 0 : productsFilter.map(function (product, index) {
|
|
10864
11542
|
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
10865
11543
|
href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo),
|
|
10866
11544
|
Link: Link,
|
|
@@ -10884,26 +11562,6 @@ var Products11 = function Products11(props) {
|
|
|
10884
11562
|
}) : null)));
|
|
10885
11563
|
};
|
|
10886
11564
|
|
|
10887
|
-
var ProductItem9 = function ProductItem9(props) {
|
|
10888
|
-
var _product$productInfo;
|
|
10889
|
-
var product = props.product;
|
|
10890
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
10891
|
-
className: "flex border-b border-stroke items-center py-4"
|
|
10892
|
-
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
10893
|
-
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10894
|
-
className: "!w-24 rounded-lg"
|
|
10895
|
-
}), /*#__PURE__*/React__default.createElement("div", {
|
|
10896
|
-
className: "ml-4 flex-1"
|
|
10897
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10898
|
-
className: "text-xl"
|
|
10899
|
-
}, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), product !== null && product !== void 0 && product.isShowProductPriceOnLanding ? /*#__PURE__*/React__default.createElement("div", {
|
|
10900
|
-
className: "mt-2"
|
|
10901
|
-
}, /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
10902
|
-
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
10903
|
-
priceClassName: "!font-normal text-lg"
|
|
10904
|
-
})) : null));
|
|
10905
|
-
};
|
|
10906
|
-
|
|
10907
11565
|
var Products12 = function Products12(props) {
|
|
10908
11566
|
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
10909
11567
|
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
@@ -10923,40 +11581,102 @@ var Products12 = function Products12(props) {
|
|
|
10923
11581
|
})),
|
|
10924
11582
|
categories = _CategoryController.categories;
|
|
10925
11583
|
var _ProductController = ProductController(_extends({}, props, {
|
|
10926
|
-
params: params
|
|
11584
|
+
params: params
|
|
11585
|
+
})),
|
|
11586
|
+
_ProductController$pr = _ProductController.products,
|
|
11587
|
+
products = _ProductController$pr === void 0 ? [] : _ProductController$pr,
|
|
11588
|
+
loading = _ProductController.loading;
|
|
11589
|
+
var handleFilterByCategory = function handleFilterByCategory(category) {
|
|
11590
|
+
setParams(function (prev) {
|
|
11591
|
+
return _extends({}, prev, {
|
|
11592
|
+
categoryId: category === null || category === void 0 ? void 0 : category.categoryId
|
|
11593
|
+
});
|
|
11594
|
+
});
|
|
11595
|
+
};
|
|
11596
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
11597
|
+
className: SECTION_CLASS + " w-full flex flex-col gap-6"
|
|
11598
|
+
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
11599
|
+
data: data,
|
|
11600
|
+
shopConfigStyle: shopConfigStyle
|
|
11601
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
11602
|
+
className: "flex justify-center"
|
|
11603
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11604
|
+
className: "!overflow-hidden max-w-[80%] md:max-w-[67%] pt-2"
|
|
11605
|
+
}, /*#__PURE__*/React__default.createElement(CarouselItem, {
|
|
11606
|
+
isNavigateButton: false,
|
|
11607
|
+
data: categories,
|
|
11608
|
+
onClick: handleFilterByCategory
|
|
11609
|
+
}))), loading ? /*#__PURE__*/React__default.createElement("div", {
|
|
11610
|
+
className: "flex w-full justify-center p-12"
|
|
11611
|
+
}, /*#__PURE__*/React__default.createElement(Loading, null)) : products !== null && products !== void 0 && products.length ? /*#__PURE__*/React__default.createElement("div", {
|
|
11612
|
+
className: "grid grid-cols-1 md:grid-cols-2 gap-x-12"
|
|
11613
|
+
}, products === null || products === void 0 ? void 0 : products.map(function (product, index) {
|
|
11614
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
11615
|
+
key: index,
|
|
11616
|
+
Link: Link,
|
|
11617
|
+
href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
|
|
11618
|
+
}, /*#__PURE__*/React__default.createElement(ProductItem10, {
|
|
11619
|
+
product: product
|
|
11620
|
+
}));
|
|
11621
|
+
})) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null)));
|
|
11622
|
+
};
|
|
11623
|
+
|
|
11624
|
+
var Products14 = function Products14(props) {
|
|
11625
|
+
var _products$slice;
|
|
11626
|
+
var _props$Link = props.Link,
|
|
11627
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
11628
|
+
data = props.data,
|
|
11629
|
+
_props$shopConfigStyl = props.shopConfigStyle,
|
|
11630
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
11631
|
+
_props$SectionTitle = props.SectionTitle,
|
|
11632
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
|
|
11633
|
+
_props$ProductItem = props.ProductItem,
|
|
11634
|
+
ProductItem = _props$ProductItem === void 0 ? null : _props$ProductItem;
|
|
11635
|
+
var _ProductDetailControl = ProductDetailController(props),
|
|
11636
|
+
product = _ProductDetailControl.product;
|
|
11637
|
+
var _useState = React.useState(false),
|
|
11638
|
+
isAutoGetList = _useState[0],
|
|
11639
|
+
setIsAutoGetList = _useState[1];
|
|
11640
|
+
var _useState2 = React.useState({
|
|
11641
|
+
size: 12,
|
|
11642
|
+
categoryId: product === null || product === void 0 ? void 0 : product.categoryId
|
|
11643
|
+
}),
|
|
11644
|
+
params = _useState2[0],
|
|
11645
|
+
setParams = _useState2[1];
|
|
11646
|
+
var _ProductController = ProductController(_extends({}, props, {
|
|
11647
|
+
params: params,
|
|
11648
|
+
isAutoGetList: isAutoGetList
|
|
10927
11649
|
})),
|
|
10928
11650
|
_ProductController$pr = _ProductController.products,
|
|
10929
11651
|
products = _ProductController$pr === void 0 ? [] : _ProductController$pr,
|
|
10930
11652
|
loading = _ProductController.loading;
|
|
10931
|
-
|
|
10932
|
-
|
|
10933
|
-
|
|
10934
|
-
|
|
11653
|
+
React.useEffect(function () {
|
|
11654
|
+
if (product !== null && product !== void 0 && product.categoryId) {
|
|
11655
|
+
setParams(function (prev) {
|
|
11656
|
+
return _extends({}, prev, {
|
|
11657
|
+
categoryId: product === null || product === void 0 ? void 0 : product.categoryId
|
|
11658
|
+
});
|
|
10935
11659
|
});
|
|
10936
|
-
|
|
10937
|
-
|
|
10938
|
-
|
|
10939
|
-
|
|
11660
|
+
setIsAutoGetList(true);
|
|
11661
|
+
}
|
|
11662
|
+
}, [product]);
|
|
11663
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
11664
|
+
className: SECTION_CLASS + " flex flex-col gap-6 md:gap-12"
|
|
10940
11665
|
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
10941
11666
|
data: data,
|
|
10942
11667
|
shopConfigStyle: shopConfigStyle
|
|
10943
|
-
}), /*#__PURE__*/React__default.createElement(CarouselItem, {
|
|
10944
|
-
isNavigateButton: false,
|
|
10945
|
-
data: categories,
|
|
10946
|
-
onClick: handleFilterByCategory
|
|
10947
11668
|
}), loading ? /*#__PURE__*/React__default.createElement("div", {
|
|
10948
|
-
className: "
|
|
10949
|
-
}, /*#__PURE__*/React__default.createElement(Loading, null)) : products
|
|
10950
|
-
className: "grid grid-cols-
|
|
10951
|
-
}, products === null || products === void 0 ? void 0 : products.map(function (product,
|
|
10952
|
-
return /*#__PURE__*/React__default.createElement(
|
|
10953
|
-
key: index,
|
|
11669
|
+
className: "m-auto mt-20 min-h-32"
|
|
11670
|
+
}, /*#__PURE__*/React__default.createElement(Loading, null)) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
11671
|
+
className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-x-2 gap-y-4 md:gap-4 xl:gap-6"
|
|
11672
|
+
}, products === null || products === void 0 ? void 0 : (_products$slice = products.slice(0, (params === null || params === void 0 ? void 0 : params.size) - 4)) === null || _products$slice === void 0 ? void 0 : _products$slice.map(function (product, idx) {
|
|
11673
|
+
return /*#__PURE__*/React__default.createElement(ProductItem, {
|
|
10954
11674
|
Link: Link,
|
|
10955
|
-
|
|
10956
|
-
|
|
10957
|
-
|
|
10958
|
-
})
|
|
10959
|
-
})) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null))
|
|
11675
|
+
shopConfigStyle: shopConfigStyle,
|
|
11676
|
+
product: product,
|
|
11677
|
+
key: "zjk-" + idx
|
|
11678
|
+
});
|
|
11679
|
+
})) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null));
|
|
10960
11680
|
};
|
|
10961
11681
|
|
|
10962
11682
|
var ProductCategory2 = function ProductCategory2(props) {
|
|
@@ -11080,7 +11800,7 @@ var listFilter$1 = [{
|
|
|
11080
11800
|
}
|
|
11081
11801
|
}];
|
|
11082
11802
|
var ProductSearch1 = function ProductSearch1(props) {
|
|
11083
|
-
var _window, _window$location,
|
|
11803
|
+
var _window, _window$location, _products$slice;
|
|
11084
11804
|
var _props$Link = props.Link,
|
|
11085
11805
|
Link = _props$Link === void 0 ? null : _props$Link,
|
|
11086
11806
|
_props$SectionTitle = props.SectionTitle,
|
|
@@ -11090,27 +11810,25 @@ var ProductSearch1 = function ProductSearch1(props) {
|
|
|
11090
11810
|
shopConfigStyle = props.shopConfigStyle;
|
|
11091
11811
|
var queryParams = new URLSearchParams((_window = window) === null || _window === void 0 ? void 0 : (_window$location = _window.location) === null || _window$location === void 0 ? void 0 : _window$location.search);
|
|
11092
11812
|
var keywordValue = queryParams === null || queryParams === void 0 ? void 0 : queryParams.get('tu-khoa');
|
|
11093
|
-
var _useState = React.useState(
|
|
11094
|
-
productsFilter = _useState[0],
|
|
11095
|
-
setProductsFilter = _useState[1];
|
|
11096
|
-
var _useState2 = React.useState({
|
|
11813
|
+
var _useState = React.useState({
|
|
11097
11814
|
productName: keywordValue,
|
|
11098
11815
|
size: 12
|
|
11099
11816
|
}),
|
|
11100
|
-
params =
|
|
11101
|
-
setParams =
|
|
11102
|
-
var
|
|
11103
|
-
isGetMore =
|
|
11104
|
-
setIsGetMore =
|
|
11105
|
-
var
|
|
11106
|
-
isAutoGetList =
|
|
11107
|
-
setIsAutoGetList =
|
|
11817
|
+
params = _useState[0],
|
|
11818
|
+
setParams = _useState[1];
|
|
11819
|
+
var _useState2 = React.useState(true),
|
|
11820
|
+
isGetMore = _useState2[0],
|
|
11821
|
+
setIsGetMore = _useState2[1];
|
|
11822
|
+
var _useState3 = React.useState(false),
|
|
11823
|
+
isAutoGetList = _useState3[0],
|
|
11824
|
+
setIsAutoGetList = _useState3[1];
|
|
11108
11825
|
var _ProductController = ProductController(_extends({}, props, {
|
|
11109
11826
|
params: params,
|
|
11110
11827
|
isAutoGetList: isAutoGetList
|
|
11111
11828
|
})),
|
|
11112
11829
|
products = _ProductController.products,
|
|
11113
|
-
loading = _ProductController.loading
|
|
11830
|
+
loading = _ProductController.loading,
|
|
11831
|
+
page = _ProductController.page;
|
|
11114
11832
|
React.useEffect(function () {
|
|
11115
11833
|
setIsAutoGetList(true);
|
|
11116
11834
|
setParams(function (prev) {
|
|
@@ -11119,11 +11837,6 @@ var ProductSearch1 = function ProductSearch1(props) {
|
|
|
11119
11837
|
});
|
|
11120
11838
|
});
|
|
11121
11839
|
}, [keywordValue]);
|
|
11122
|
-
React.useEffect(function () {
|
|
11123
|
-
if ((products === null || products === void 0 ? void 0 : products.length) > 0) setProductsFilter(products);else {
|
|
11124
|
-
setProductsFilter([]);
|
|
11125
|
-
}
|
|
11126
|
-
}, [products]);
|
|
11127
11840
|
var handleGetMoreProducts = function handleGetMoreProducts() {
|
|
11128
11841
|
setIsGetMore(false);
|
|
11129
11842
|
setParams(function (prev) {
|
|
@@ -11134,16 +11847,16 @@ var ProductSearch1 = function ProductSearch1(props) {
|
|
|
11134
11847
|
};
|
|
11135
11848
|
var handleFilter = function handleFilter(item) {
|
|
11136
11849
|
if ((item === null || item === void 0 ? void 0 : item.value) === "discount") {
|
|
11137
|
-
|
|
11138
|
-
|
|
11139
|
-
|
|
11850
|
+
setParams({
|
|
11851
|
+
size: 12,
|
|
11852
|
+
productName: keywordValue,
|
|
11853
|
+
isSale: true
|
|
11140
11854
|
});
|
|
11141
|
-
setProductsFilter(productsCopy);
|
|
11142
11855
|
} else if ((item === null || item === void 0 ? void 0 : item.value) === "isHighlight") {
|
|
11143
|
-
setParams(
|
|
11144
|
-
|
|
11145
|
-
|
|
11146
|
-
|
|
11856
|
+
setParams({
|
|
11857
|
+
size: 12,
|
|
11858
|
+
productName: keywordValue,
|
|
11859
|
+
isHighlight: true
|
|
11147
11860
|
});
|
|
11148
11861
|
} else {
|
|
11149
11862
|
setParams({
|
|
@@ -11161,21 +11874,21 @@ var ProductSearch1 = function ProductSearch1(props) {
|
|
|
11161
11874
|
shopConfigStyle: shopConfigStyle
|
|
11162
11875
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
11163
11876
|
className: "text-lg"
|
|
11164
|
-
}, "T\u1EEB kh\xF3a \"", keywordValue, "\" (",
|
|
11877
|
+
}, "T\u1EEB kh\xF3a \"", keywordValue, "\" (", page === null || page === void 0 ? void 0 : page.total_elements, " s\u1EA3n ph\u1EA9m)"), /*#__PURE__*/React__default.createElement(CarouselItem, {
|
|
11165
11878
|
data: listFilter$1,
|
|
11166
11879
|
isNavigateButton: false,
|
|
11167
11880
|
onClick: handleFilter
|
|
11168
11881
|
}), loading && isGetMore ? /*#__PURE__*/React__default.createElement("div", {
|
|
11169
11882
|
className: "m-auto mt-20 min-h-32"
|
|
11170
|
-
}, /*#__PURE__*/React__default.createElement(Loading, null)) : (
|
|
11883
|
+
}, /*#__PURE__*/React__default.createElement(Loading, null)) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
11171
11884
|
className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-x-2 gap-y-4 md:gap-4 xl:gap-6"
|
|
11172
|
-
},
|
|
11885
|
+
}, products === null || products === void 0 ? void 0 : (_products$slice = products.slice(0, (params === null || params === void 0 ? void 0 : params.size) - 4)) === null || _products$slice === void 0 ? void 0 : _products$slice.map(function (product, idx) {
|
|
11173
11886
|
return /*#__PURE__*/React__default.createElement(ProductItem, {
|
|
11174
11887
|
Link: Link,
|
|
11175
11888
|
product: product,
|
|
11176
11889
|
key: "htrhr-" + idx
|
|
11177
11890
|
});
|
|
11178
|
-
})) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null), !loading && (
|
|
11891
|
+
})) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null), !loading && (products === null || products === void 0 ? void 0 : products.length) > (params === null || params === void 0 ? void 0 : params.size) - 4 ? /*#__PURE__*/React__default.createElement(Button, {
|
|
11179
11892
|
label: "Xem thêm",
|
|
11180
11893
|
onClick: handleGetMoreProducts,
|
|
11181
11894
|
className: "mx-auto " + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass),
|
|
@@ -11555,12 +12268,12 @@ var ProductDetail10 = function ProductDetail10(props) {
|
|
|
11555
12268
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
11556
12269
|
className: SECTION_CLASS + " mt-0 md:mt-0 mb-0 " + ((shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingTemplateCode) === 'fashion_1' ? "bg-bgSecondary pb-8" : "bg-background")
|
|
11557
12270
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11558
|
-
className: ((shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingTemplateCode) === 'fashion_1' ? "" : "px-4 md:px-6") + " py-4 md:py-6 rounded-2xl grid grid-cols-1 md:grid-cols-5 md:gap-6 bg-bgSecondary"
|
|
12271
|
+
className: ((shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingTemplateCode) === 'fashion_1' ? "" : "px-4 md:px-6") + " py-4 md:py-6 rounded-2xl grid grid-cols-1 md:grid-cols-5 gap-3 md:gap-6 bg-bgSecondary"
|
|
11559
12272
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11560
|
-
className: "flex flex-col gap-4 col-span-2 "
|
|
12273
|
+
className: "flex flex-col gap-4 md:col-span-2 "
|
|
11561
12274
|
}, displayImage ? /*#__PURE__*/React__default.createElement("img", {
|
|
11562
12275
|
src: displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageUrl,
|
|
11563
|
-
className: "w-full border
|
|
12276
|
+
className: "w-full border bg-background aspect-square object-contain rounded-2xl "
|
|
11564
12277
|
}) : /*#__PURE__*/React__default.createElement("div", {
|
|
11565
12278
|
className: "flex justify-center items-center w-full border rounded-2xl aspect-square",
|
|
11566
12279
|
style: {
|
|
@@ -11571,19 +12284,19 @@ var ProductDetail10 = function ProductDetail10(props) {
|
|
|
11571
12284
|
height: "25%",
|
|
11572
12285
|
fill: "#D9D9D9"
|
|
11573
12286
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
11574
|
-
className: "flex gap-
|
|
12287
|
+
className: "flex gap-2 pb-3 md:pb-0 overflow-x-auto md:w-full lg:gap-3 md:grid md:grid-cols-4 xl:grid-cols-5"
|
|
11575
12288
|
}, product === null || product === void 0 ? void 0 : (_product$images2 = product.images) === null || _product$images2 === void 0 ? void 0 : _product$images2.map(function (item) {
|
|
11576
12289
|
return /*#__PURE__*/React__default.createElement("img", {
|
|
11577
12290
|
src: item === null || item === void 0 ? void 0 : item.imageUrl,
|
|
11578
12291
|
key: item === null || item === void 0 ? void 0 : item.imageId,
|
|
11579
12292
|
alt: "",
|
|
11580
|
-
className: "cursor-pointer h-
|
|
12293
|
+
className: "cursor-pointer h-20 w-20 md:max-h-32 md:max-w-32 md:h-full md:w-full aspect-square rounded-md lg:rounded-lg bg-background object-contain\n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border" : "opacity-50 brightness-75 "),
|
|
11581
12294
|
onClick: function onClick() {
|
|
11582
12295
|
handleDisplayImage(item);
|
|
11583
12296
|
}
|
|
11584
12297
|
});
|
|
11585
12298
|
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
11586
|
-
className: "col-span-3"
|
|
12299
|
+
className: "md:col-span-3 "
|
|
11587
12300
|
}, /*#__PURE__*/React__default.createElement("p", {
|
|
11588
12301
|
className: "font-semibold text-2xl"
|
|
11589
12302
|
}, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
@@ -11597,7 +12310,7 @@ var ProductDetail10 = function ProductDetail10(props) {
|
|
|
11597
12310
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11598
12311
|
className: "min-w-24"
|
|
11599
12312
|
}, option === null || option === void 0 ? void 0 : option.name, ":"), /*#__PURE__*/React__default.createElement("div", {
|
|
11600
|
-
className: "flex gap-2"
|
|
12313
|
+
className: "flex flex-wrap gap-2"
|
|
11601
12314
|
}, ((option === null || option === void 0 ? void 0 : option.value) || []).map(function (v, i) {
|
|
11602
12315
|
return /*#__PURE__*/React__default.createElement("button", {
|
|
11603
12316
|
key: i,
|
|
@@ -11649,7 +12362,7 @@ var ProductDetail10 = function ProductDetail10(props) {
|
|
|
11649
12362
|
__html: product === null || product === void 0 ? void 0 : product.description
|
|
11650
12363
|
}
|
|
11651
12364
|
}), !isSeeMore && !hiddenButton ? /*#__PURE__*/React__default.createElement("div", {
|
|
11652
|
-
className: "h-
|
|
12365
|
+
className: "h-28 relative -mt-28 rounded-b-lg",
|
|
11653
12366
|
style: {
|
|
11654
12367
|
background: "linear-gradient(to top, #81818169 0%, #00000003 50%)"
|
|
11655
12368
|
}
|
|
@@ -11794,7 +12507,7 @@ var ProductDetail11 = function ProductDetail11(props) {
|
|
|
11794
12507
|
src: item === null || item === void 0 ? void 0 : item.imageUrl,
|
|
11795
12508
|
key: item === null || item === void 0 ? void 0 : item.imageId,
|
|
11796
12509
|
alt: "",
|
|
11797
|
-
className: "cursor-pointer px-3 py-2 !h-24 !w-24 object-
|
|
12510
|
+
className: "cursor-pointer px-3 py-2 !h-24 !w-24 object-contain aspect-square rounded-lg \n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border border-primary" : ""),
|
|
11798
12511
|
onClick: function onClick() {
|
|
11799
12512
|
handleDisplayImage(item);
|
|
11800
12513
|
}
|
|
@@ -11826,7 +12539,7 @@ var ProductDetail11 = function ProductDetail11(props) {
|
|
|
11826
12539
|
src: item === null || item === void 0 ? void 0 : item.imageUrl,
|
|
11827
12540
|
key: item === null || item === void 0 ? void 0 : item.imageId,
|
|
11828
12541
|
alt: "",
|
|
11829
|
-
className: "cursor-pointer px-2 py-1 !h-24 !w-24 object-
|
|
12542
|
+
className: "cursor-pointer px-2 py-1 !h-24 !w-24 object-contain rounded-lg aspect-square\n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border border-primary" : ""),
|
|
11830
12543
|
onClick: function onClick() {
|
|
11831
12544
|
handleDisplayImage(item);
|
|
11832
12545
|
}
|
|
@@ -11846,7 +12559,7 @@ var ProductDetail11 = function ProductDetail11(props) {
|
|
|
11846
12559
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11847
12560
|
className: "min-w-24 my-auto"
|
|
11848
12561
|
}, option === null || option === void 0 ? void 0 : option.name, ":"), /*#__PURE__*/React__default.createElement("div", {
|
|
11849
|
-
className: "flex gap-2"
|
|
12562
|
+
className: "flex flex-wrap gap-2"
|
|
11850
12563
|
}, ((option === null || option === void 0 ? void 0 : option.value) || []).map(function (v, i) {
|
|
11851
12564
|
return /*#__PURE__*/React__default.createElement("button", {
|
|
11852
12565
|
key: i,
|
|
@@ -11958,7 +12671,7 @@ var Booking1 = function Booking1(props) {
|
|
|
11958
12671
|
shopConfigStyle: shopConfigStyle
|
|
11959
12672
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
11960
12673
|
className: "mt-12 grid grid-cols-1 gap-6 md:grid-cols-2 md:gap-12"
|
|
11961
|
-
}, /*#__PURE__*/React__default.createElement(BookingForm, {
|
|
12674
|
+
}, /*#__PURE__*/React__default.createElement(BookingForm$1, {
|
|
11962
12675
|
shopConfigStyle: shopConfigStyle,
|
|
11963
12676
|
shopConfig: shopConfig,
|
|
11964
12677
|
className: "!bg-bgSecondary"
|
|
@@ -12000,7 +12713,7 @@ var BookingForm6 = function BookingForm6(props) {
|
|
|
12000
12713
|
className: "w-full h-auto"
|
|
12001
12714
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
12002
12715
|
className: "mt-4 whitespace-pre-line"
|
|
12003
|
-
}, data === null || data === void 0 ? void 0 : (_data$data6 = data.data) === null || _data$data6 === void 0 ? void 0 : (_data$data6$ = _data$data6[0]) === null || _data$data6$ === void 0 ? void 0 : _data$data6$.description)), /*#__PURE__*/React__default.createElement(BookingForm, {
|
|
12716
|
+
}, data === null || data === void 0 ? void 0 : (_data$data6 = data.data) === null || _data$data6 === void 0 ? void 0 : (_data$data6$ = _data$data6[0]) === null || _data$data6$ === void 0 ? void 0 : _data$data6$.description)), /*#__PURE__*/React__default.createElement(BookingForm$1, {
|
|
12004
12717
|
shopConfigStyle: shopConfigStyle,
|
|
12005
12718
|
shopConfig: shopConfig,
|
|
12006
12719
|
className: "col-span-2"
|
|
@@ -12244,7 +12957,7 @@ var BookingFoodForm = function BookingFoodForm(props) {
|
|
|
12244
12957
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
12245
12958
|
className: "text-center"
|
|
12246
12959
|
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
12247
|
-
label: "Đặt
|
|
12960
|
+
label: "Đặt bàn ngay",
|
|
12248
12961
|
shopConfigStyle: shopConfigStyle,
|
|
12249
12962
|
onClick: handleSubmit
|
|
12250
12963
|
}))) : null, isOpenPopup && /*#__PURE__*/React__default.createElement(ModalNotification, {
|
|
@@ -12261,7 +12974,7 @@ var BookingFoodForm = function BookingFoodForm(props) {
|
|
|
12261
12974
|
}
|
|
12262
12975
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
12263
12976
|
className: "font-medium text-2xl"
|
|
12264
|
-
}, "\u0110\u1EB7t
|
|
12977
|
+
}, "\u0110\u1EB7t b\xE0n th\xE0nh c\xF4ng"), /*#__PURE__*/React__default.createElement("div", {
|
|
12265
12978
|
className: "text-center"
|
|
12266
12979
|
}, "Ch\xFAng t\xF4i \u0111\xE3 ghi nh\u1EADn th\xF4ng tin c\u1EE7a b\u1EA1n v\xE0 s\u1EBD li\xEAn h\u1EC7 l\u1EA1i ngay"))));
|
|
12267
12980
|
};
|
|
@@ -12283,7 +12996,7 @@ var BookingTable1 = function BookingTable1(props) {
|
|
|
12283
12996
|
data: data,
|
|
12284
12997
|
shopConfigStyle: shopConfigStyle
|
|
12285
12998
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
12286
|
-
className: "mt-6 md:mt-12 grid grid-cols-1 gap-6 md:grid-cols-3
|
|
12999
|
+
className: "mt-6 md:mt-12 grid grid-cols-1 gap-6 md:grid-cols-3 lg:gap-12"
|
|
12287
13000
|
}, /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
12288
13001
|
href: convertURL(data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : _data$data$.route) || (data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : (_data$data2$ = _data$data2[0]) === null || _data$data2$ === void 0 ? void 0 : _data$data2$.link) || "#"
|
|
12289
13002
|
}, data !== null && data !== void 0 && (_data$data3 = data.data) !== null && _data$data3 !== void 0 && (_data$data3$ = _data$data3[0]) !== null && _data$data3$ !== void 0 && _data$data3$.svgImage ? /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -12294,13 +13007,13 @@ var BookingTable1 = function BookingTable1(props) {
|
|
|
12294
13007
|
}
|
|
12295
13008
|
})) : /*#__PURE__*/React__default.createElement("img", {
|
|
12296
13009
|
src: data === null || data === void 0 ? void 0 : (_data$data5 = data.data) === null || _data$data5 === void 0 ? void 0 : (_data$data5$ = _data$data5[0]) === null || _data$data5$ === void 0 ? void 0 : _data$data5$.srcImage,
|
|
12297
|
-
className: "w-full h-auto"
|
|
13010
|
+
className: "w-full h-full lg:h-auto object-cover rounded-2xl"
|
|
12298
13011
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
12299
13012
|
className: "mt-4 whitespace-pre-line"
|
|
12300
13013
|
}, data === null || data === void 0 ? void 0 : (_data$data6 = data.data) === null || _data$data6 === void 0 ? void 0 : (_data$data6$ = _data$data6[0]) === null || _data$data6$ === void 0 ? void 0 : _data$data6$.description)), /*#__PURE__*/React__default.createElement(BookingFoodForm, {
|
|
12301
13014
|
shopConfigStyle: shopConfigStyle,
|
|
12302
13015
|
shopConfig: shopConfig,
|
|
12303
|
-
className: "col-span-2"
|
|
13016
|
+
className: "md:col-span-2"
|
|
12304
13017
|
})));
|
|
12305
13018
|
};
|
|
12306
13019
|
|
|
@@ -12308,7 +13021,9 @@ var Banner1 = function Banner1(props) {
|
|
|
12308
13021
|
var data = props.data,
|
|
12309
13022
|
shopConfigStyle = props.shopConfigStyle,
|
|
12310
13023
|
_props$SectionTitle = props.SectionTitle,
|
|
12311
|
-
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle
|
|
13024
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
|
|
13025
|
+
_props$Link = props.Link,
|
|
13026
|
+
Link = _props$Link === void 0 ? null : _props$Link;
|
|
12312
13027
|
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
12313
13028
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
12314
13029
|
className: "" + SECTION_DEFAULT_CLASS
|
|
@@ -12318,12 +13033,15 @@ var Banner1 = function Banner1(props) {
|
|
|
12318
13033
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
12319
13034
|
className: "grid grid-cols-1 sm:grid-cols-3 gap-4 lg:gap-6 mt-6"
|
|
12320
13035
|
}, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
|
|
12321
|
-
return /*#__PURE__*/React__default.createElement(
|
|
13036
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
13037
|
+
Link: Link,
|
|
13038
|
+
href: convertURL(item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#"
|
|
13039
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
12322
13040
|
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
12323
13041
|
alt: "",
|
|
12324
13042
|
className: "rounded-2xl",
|
|
12325
13043
|
key: "hnfhn-" + index
|
|
12326
|
-
});
|
|
13044
|
+
}));
|
|
12327
13045
|
})));
|
|
12328
13046
|
};
|
|
12329
13047
|
|
|
@@ -12412,6 +13130,35 @@ var Banner3 = function Banner3(props) {
|
|
|
12412
13130
|
}));
|
|
12413
13131
|
};
|
|
12414
13132
|
|
|
13133
|
+
var Banner4 = function Banner4(props) {
|
|
13134
|
+
var _data$data, _data$data$, _data$data2, _data$data2$, _data$data3, _data$data3$, _data$data4, _data$data4$slice;
|
|
13135
|
+
var data = props.data,
|
|
13136
|
+
_props$Link = props.Link,
|
|
13137
|
+
Link = _props$Link === void 0 ? null : _props$Link;
|
|
13138
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
13139
|
+
className: SECTION_CLASS_PADDING + " grid grid-cols-1 bg-bgSecondary md:grid-cols-3 gap-6"
|
|
13140
|
+
}, /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
13141
|
+
className: "md:col-span-2",
|
|
13142
|
+
Link: Link,
|
|
13143
|
+
href: convertURL(data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : _data$data$.route) || (data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : (_data$data2$ = _data$data2[0]) === null || _data$data2$ === void 0 ? void 0 : _data$data2$.link) || "#"
|
|
13144
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
13145
|
+
src: data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : (_data$data3$ = _data$data3[0]) === null || _data$data3$ === void 0 ? void 0 : _data$data3$.srcImage,
|
|
13146
|
+
className: " object-cover w-full h-full rounded-[10px]"
|
|
13147
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
13148
|
+
className: "flex flex-col gap-6 h-full"
|
|
13149
|
+
}, data === null || data === void 0 ? void 0 : (_data$data4 = data.data) === null || _data$data4 === void 0 ? void 0 : (_data$data4$slice = _data$data4.slice(1, 3)) === null || _data$data4$slice === void 0 ? void 0 : _data$data4$slice.map(function (item, index) {
|
|
13150
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
13151
|
+
Link: Link,
|
|
13152
|
+
href: convertURL(item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#",
|
|
13153
|
+
className: "flex-1 min-h-0",
|
|
13154
|
+
key: "djsd-" + index
|
|
13155
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
13156
|
+
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
13157
|
+
className: "object-cover w-full h-full rounded-[10px]"
|
|
13158
|
+
}));
|
|
13159
|
+
})));
|
|
13160
|
+
};
|
|
13161
|
+
|
|
12415
13162
|
var Banner7 = function Banner7(props) {
|
|
12416
13163
|
var _data$data;
|
|
12417
13164
|
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
@@ -12483,7 +13230,7 @@ var Partner1 = function Partner1(props) {
|
|
|
12483
13230
|
data: data,
|
|
12484
13231
|
shopConfigStyle: shopConfigStyle
|
|
12485
13232
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
12486
|
-
className: "grid grid-cols-4 md:grid-cols-6 gap-6 mt-4 md:mt-6 p-6 rounded-xl",
|
|
13233
|
+
className: "grid grid-cols-4 md:grid-cols-6 gap-6 mt-4 md:mt-6 p-4 md:p-6 rounded-xl",
|
|
12487
13234
|
style: {
|
|
12488
13235
|
background: bgSecondary
|
|
12489
13236
|
}
|
|
@@ -12814,7 +13561,7 @@ var Footer1 = function Footer1(props) {
|
|
|
12814
13561
|
href: "/",
|
|
12815
13562
|
className: "flex items-center"
|
|
12816
13563
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
12817
|
-
className: "object-
|
|
13564
|
+
className: "object-contain w-14 h-14",
|
|
12818
13565
|
src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl
|
|
12819
13566
|
}), /*#__PURE__*/React__default.createElement("h3", {
|
|
12820
13567
|
className: "text-2xl md:text-3xl ms-2 font-headingFont ",
|
|
@@ -12957,7 +13704,7 @@ var Footer7 = function Footer7(props) {
|
|
|
12957
13704
|
href: "/",
|
|
12958
13705
|
className: "flex items-center gap-2"
|
|
12959
13706
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
12960
|
-
className: "object-
|
|
13707
|
+
className: "object-contain w-14 h-14",
|
|
12961
13708
|
src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl
|
|
12962
13709
|
}), /*#__PURE__*/React__default.createElement("h3", {
|
|
12963
13710
|
className: " text-2xl md:text-3xl ms-2 font-headingFont ",
|
|
@@ -13037,7 +13784,9 @@ var Footer7 = function Footer7(props) {
|
|
|
13037
13784
|
style: {
|
|
13038
13785
|
background: primary
|
|
13039
13786
|
}
|
|
13040
|
-
}))))), /*#__PURE__*/React__default.createElement("hr",
|
|
13787
|
+
}))))), /*#__PURE__*/React__default.createElement("hr", {
|
|
13788
|
+
className: "mt-12"
|
|
13789
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
13041
13790
|
className: "py-4"
|
|
13042
13791
|
}, /*#__PURE__*/React__default.createElement("small", {
|
|
13043
13792
|
className: "me-5"
|
|
@@ -13057,24 +13806,26 @@ var RatingStar = function RatingStar(props) {
|
|
|
13057
13806
|
star = _props$star === void 0 ? 5 : _props$star,
|
|
13058
13807
|
_props$style = props.style,
|
|
13059
13808
|
style = _props$style === void 0 ? {} : _props$style,
|
|
13809
|
+
_props$color = props.color,
|
|
13810
|
+
color = _props$color === void 0 ? "#E2B93B" : _props$color,
|
|
13060
13811
|
_props$className = props.className,
|
|
13061
13812
|
className = _props$className === void 0 ? "" : _props$className;
|
|
13062
13813
|
var res = [];
|
|
13063
13814
|
for (var i = 1; i <= star; i++) {
|
|
13064
13815
|
res.push(/*#__PURE__*/React__default.createElement(fa6.FaStar, {
|
|
13065
|
-
color:
|
|
13816
|
+
color: color
|
|
13066
13817
|
}));
|
|
13067
|
-
if (i
|
|
13818
|
+
if (i >= 5) break;
|
|
13068
13819
|
}
|
|
13069
13820
|
var decimalPart = star % 1;
|
|
13070
13821
|
if (decimalPart && decimalPart >= 0.5) {
|
|
13071
13822
|
res.push(/*#__PURE__*/React__default.createElement(fa6.FaRegStarHalfStroke, {
|
|
13072
|
-
color:
|
|
13823
|
+
color: color
|
|
13073
13824
|
}));
|
|
13074
13825
|
}
|
|
13075
13826
|
for (var _i = res === null || res === void 0 ? void 0 : res.length; _i < 5; _i++) {
|
|
13076
13827
|
res.push(/*#__PURE__*/React__default.createElement(fa6.FaRegStar, {
|
|
13077
|
-
color:
|
|
13828
|
+
color: color
|
|
13078
13829
|
}));
|
|
13079
13830
|
}
|
|
13080
13831
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -13244,23 +13995,75 @@ var CustomerRating8 = function CustomerRating8(props) {
|
|
|
13244
13995
|
src: item === null || item === void 0 ? void 0 : item.avatar,
|
|
13245
13996
|
className: "w-40 h-40 rounded-full object-cover border-8 border-stroke"
|
|
13246
13997
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
13247
|
-
className: "text-xl text-primary"
|
|
13998
|
+
className: "text-xl text-primary text-center"
|
|
13248
13999
|
}, item === null || item === void 0 ? void 0 : item.name), /*#__PURE__*/React__default.createElement("div", {
|
|
13249
|
-
className: "text-gray3"
|
|
14000
|
+
className: "text-gray3 text-center"
|
|
13250
14001
|
}, item === null || item === void 0 ? void 0 : item.description), /*#__PURE__*/React__default.createElement("div", {
|
|
13251
14002
|
className: "flex gap-2 "
|
|
13252
14003
|
}, /*#__PURE__*/React__default.createElement(ri.RiDoubleQuotesL, {
|
|
13253
|
-
className: "text-
|
|
13254
|
-
size:
|
|
14004
|
+
className: "flex-shrink-0 text-gray4",
|
|
14005
|
+
size: 16
|
|
13255
14006
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
13256
14007
|
className: "pt-4"
|
|
13257
|
-
}, item === null || item === void 0 ? void 0 : item.content), /*#__PURE__*/React__default.createElement(ri.
|
|
13258
|
-
className: " mt-auto text-
|
|
13259
|
-
size:
|
|
14008
|
+
}, item === null || item === void 0 ? void 0 : item.content), /*#__PURE__*/React__default.createElement(ri.RiDoubleQuotesR, {
|
|
14009
|
+
className: "flex-shrink-0 mt-auto text-gray4",
|
|
14010
|
+
size: 16
|
|
13260
14011
|
})));
|
|
13261
14012
|
}))));
|
|
13262
14013
|
};
|
|
13263
14014
|
|
|
14015
|
+
var CustomerRating9 = function CustomerRating9(props) {
|
|
14016
|
+
var _data$data;
|
|
14017
|
+
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
14018
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
14019
|
+
_props$data = props.data,
|
|
14020
|
+
data = _props$data === void 0 ? {} : _props$data,
|
|
14021
|
+
_props$SectionTitle = props.SectionTitle,
|
|
14022
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
|
|
14023
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
14024
|
+
className: SECTION_DEFAULT_CLASS
|
|
14025
|
+
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
14026
|
+
data: data,
|
|
14027
|
+
shopConfigStyle: shopConfigStyle
|
|
14028
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
14029
|
+
className: "mt-12 grid grid-cols-1 lg:grid-cols-3 gap-6"
|
|
14030
|
+
}, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map(function (item, index) {
|
|
14031
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
14032
|
+
key: index,
|
|
14033
|
+
className: "flex bg-primary pt-16 px-6 pb-6"
|
|
14034
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
14035
|
+
className: "bg-background relative"
|
|
14036
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
14037
|
+
className: "flex justify-between items-center pr-4 w-full absolute top-[-40px]"
|
|
14038
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
14039
|
+
className: "text-[#A85A09]"
|
|
14040
|
+
}, /*#__PURE__*/React__default.createElement("svg", {
|
|
14041
|
+
width: "39",
|
|
14042
|
+
height: "28",
|
|
14043
|
+
viewBox: "0 0 39 28",
|
|
14044
|
+
fill: "none",
|
|
14045
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
14046
|
+
}, /*#__PURE__*/React__default.createElement("path", {
|
|
14047
|
+
d: "M34.5852 25.8793C34.9242 26.5446 34.4409 27.3333 33.6942 27.3333H27.7867C27.4106 27.3333 27.0664 27.1223 26.8957 26.7873L21.7391 16.6666V3.66663C21.7391 2.00977 23.0822 0.666626 24.7391 0.666626H35.0435C36.7003 0.666626 38.0435 2.00977 38.0435 3.66663V16.6666H29.8913L34.5852 25.8793ZM12.8461 25.8793C13.185 26.5446 12.7017 27.3333 11.955 27.3333H6.0475C5.67146 27.3333 5.3272 27.1223 5.15649 26.7873L-0.000110626 16.6666V3.66663C-0.000110626 2.00977 1.34304 0.666626 2.99989 0.666626H13.3043C14.9611 0.666626 16.3043 2.00977 16.3043 3.66663V16.6666H8.15208L12.8461 25.8793Z",
|
|
14048
|
+
fill: "currentColor"
|
|
14049
|
+
}))), /*#__PURE__*/React__default.createElement("img", {
|
|
14050
|
+
src: item === null || item === void 0 ? void 0 : item.avatar,
|
|
14051
|
+
className: " w-20 object-cover h-20 rounded-full"
|
|
14052
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
14053
|
+
className: "p-4 flex flex-col gap-2"
|
|
14054
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
14055
|
+
className: "text-lg text-textHeading md:text-2xl"
|
|
14056
|
+
}, item === null || item === void 0 ? void 0 : item.name), /*#__PURE__*/React__default.createElement("div", {
|
|
14057
|
+
className: "w-full border border-secondary"
|
|
14058
|
+
}), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.content), /*#__PURE__*/React__default.createElement("div", {
|
|
14059
|
+
className: "ms-auto"
|
|
14060
|
+
}, /*#__PURE__*/React__default.createElement(RatingStar, {
|
|
14061
|
+
star: (item === null || item === void 0 ? void 0 : item.rate) || 5,
|
|
14062
|
+
color: "#A85A09"
|
|
14063
|
+
})))));
|
|
14064
|
+
}))));
|
|
14065
|
+
};
|
|
14066
|
+
|
|
13264
14067
|
var CustomerRating10 = function CustomerRating10(props) {
|
|
13265
14068
|
var _data$data;
|
|
13266
14069
|
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
@@ -13435,7 +14238,7 @@ var Gallery1 = function Gallery1(props) {
|
|
|
13435
14238
|
}));
|
|
13436
14239
|
};
|
|
13437
14240
|
|
|
13438
|
-
var
|
|
14241
|
+
var Gallery2 = function Gallery2(props) {
|
|
13439
14242
|
var _data$data, _data$data$slice, _data$data2, _data$data2$slice, _data$data3, _data$data3$slice;
|
|
13440
14243
|
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
13441
14244
|
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
@@ -13455,25 +14258,49 @@ var Gallery1$1 = function Gallery1(props) {
|
|
|
13455
14258
|
}, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$slice = _data$data.slice(0, 2)) === null || _data$data$slice === void 0 ? void 0 : _data$data$slice.map(function (item, index) {
|
|
13456
14259
|
return /*#__PURE__*/React__default.createElement("img", {
|
|
13457
14260
|
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
13458
|
-
className: "w-full h-full object-cover rounded-
|
|
14261
|
+
className: "w-full h-full object-cover rounded-lg md:rounded-2xl"
|
|
13459
14262
|
});
|
|
13460
14263
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
13461
14264
|
className: "flex flex-col gap-2 md:gap-4"
|
|
13462
14265
|
}, data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : (_data$data2$slice = _data$data2.slice(2, 4)) === null || _data$data2$slice === void 0 ? void 0 : _data$data2$slice.map(function (item, index) {
|
|
13463
14266
|
return /*#__PURE__*/React__default.createElement("img", {
|
|
13464
14267
|
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
13465
|
-
className: "w-full h-full object-cover rounded-
|
|
14268
|
+
className: "w-full h-full object-cover rounded-lg md:rounded-2xl odd:h-[130%]"
|
|
13466
14269
|
});
|
|
13467
14270
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
13468
14271
|
className: "flex flex-col gap-2 md:gap-4"
|
|
13469
14272
|
}, data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : (_data$data3$slice = _data$data3.slice(4, 6)) === null || _data$data3$slice === void 0 ? void 0 : _data$data3$slice.map(function (item, index) {
|
|
13470
14273
|
return /*#__PURE__*/React__default.createElement("img", {
|
|
13471
14274
|
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
13472
|
-
className: "w-full h-full object-cover rounded-
|
|
14275
|
+
className: "w-full h-full object-cover rounded-lg md:rounded-2xl even:h-[130%]"
|
|
13473
14276
|
});
|
|
13474
14277
|
})))));
|
|
13475
14278
|
};
|
|
13476
14279
|
|
|
14280
|
+
var Gallery3 = function Gallery3(props) {
|
|
14281
|
+
var _data$data;
|
|
14282
|
+
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
14283
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
14284
|
+
_props$data = props.data,
|
|
14285
|
+
data = _props$data === void 0 ? {} : _props$data,
|
|
14286
|
+
_props$SectionTitle = props.SectionTitle,
|
|
14287
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
|
|
14288
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
14289
|
+
className: "" + SECTION_DEFAULT_CLASS
|
|
14290
|
+
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
14291
|
+
data: data,
|
|
14292
|
+
shopConfigStyle: shopConfigStyle
|
|
14293
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
14294
|
+
className: "grid grid-cols-3 gap-2 md:gap-6 mt-6 md:mt-12"
|
|
14295
|
+
}, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map(function (item, index) {
|
|
14296
|
+
return /*#__PURE__*/React__default.createElement("img", {
|
|
14297
|
+
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
14298
|
+
key: "iggdf-" + index,
|
|
14299
|
+
className: (index === 1 || index === 5 ? "col-span-2" : "") + " w-full h-full object-cover"
|
|
14300
|
+
});
|
|
14301
|
+
}))));
|
|
14302
|
+
};
|
|
14303
|
+
|
|
13477
14304
|
var PageTitle1 = function PageTitle1(props) {
|
|
13478
14305
|
var _sectionData$;
|
|
13479
14306
|
var data = props.data,
|
|
@@ -13504,13 +14331,13 @@ var PageTitle2 = function PageTitle2(props) {
|
|
|
13504
14331
|
backgroundImage: "url(" + (sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : _sectionData$.srcImage) + ")"
|
|
13505
14332
|
}
|
|
13506
14333
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
13507
|
-
className: "absolute top-0 w-full h-full bg-black
|
|
14334
|
+
className: "absolute top-0 w-full h-full bg-black/60 z-0"
|
|
13508
14335
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
13509
|
-
className: "relative w-full p-20 z-10 flex flex-col gap-6 items-center justify-center"
|
|
14336
|
+
className: "relative w-full p-10 lg:p-20 z-10 flex flex-col gap-6 items-center justify-center"
|
|
13510
14337
|
}, /*#__PURE__*/React__default.createElement("h2", {
|
|
13511
14338
|
className: "text-3xl md:text-5xl text-white leading-[1.6] md:leading-[1.6] text-center font-headingFont"
|
|
13512
14339
|
}, data !== null && data !== void 0 && data.sectionTitle ? data === null || data === void 0 ? void 0 : data.sectionTitle : route === null || route === void 0 ? void 0 : route.label), data !== null && data !== void 0 && data.sectionDescription ? /*#__PURE__*/React__default.createElement("div", {
|
|
13513
|
-
className: "text-lg md:text-2xl text-white"
|
|
14340
|
+
className: "text-lg md:text-2xl text-white text-center"
|
|
13514
14341
|
}, data === null || data === void 0 ? void 0 : data.sectionDescription) : null));
|
|
13515
14342
|
};
|
|
13516
14343
|
|
|
@@ -13540,12 +14367,12 @@ var Breadcrumb1 = function Breadcrumb1(props) {
|
|
|
13540
14367
|
return e === null || e === void 0 ? void 0 : e.length;
|
|
13541
14368
|
})) === null || _route$route$split$fi === void 0 ? void 0 : _route$route$split$fi.slice(0, 2);
|
|
13542
14369
|
items = (_items = items) === null || _items === void 0 ? void 0 : _items.map(function (e) {
|
|
13543
|
-
var _e, _e$replace, _e$replace$replace, _e$replace$replace$re;
|
|
14370
|
+
var _e, _e$replace, _e$replace$replace, _e$replace$replace$re, _e$replace$replace$re2;
|
|
13544
14371
|
if (e === "product") e = "products";else if (e === "service") e = "services";
|
|
13545
14372
|
return (routes === null || routes === void 0 ? void 0 : routes.find(function (r) {
|
|
13546
14373
|
return (r === null || r === void 0 ? void 0 : r.name) === e;
|
|
13547
14374
|
})) || {
|
|
13548
|
-
label: (_e = e) === null || _e === void 0 ? void 0 : (_e$replace = _e.replace(
|
|
14375
|
+
label: (_e = e) === null || _e === void 0 ? void 0 : (_e$replace = _e.replace(/pct/g, '%')) === null || _e$replace === void 0 ? void 0 : (_e$replace$replace = _e$replace.replace(/fs/g, '/')) === null || _e$replace$replace === void 0 ? void 0 : (_e$replace$replace$re = _e$replace$replace.replace(/amp/g, '&')) === null || _e$replace$replace$re === void 0 ? void 0 : (_e$replace$replace$re2 = _e$replace$replace$re.replace(/-/g, ' ')) === null || _e$replace$replace$re2 === void 0 ? void 0 : _e$replace$replace$re2.replace(/hyp/g, '-')
|
|
13549
14376
|
};
|
|
13550
14377
|
});
|
|
13551
14378
|
(_items2 = items) === null || _items2 === void 0 ? void 0 : _items2.unshift({
|
|
@@ -13553,7 +14380,6 @@ var Breadcrumb1 = function Breadcrumb1(props) {
|
|
|
13553
14380
|
label: "Trang chủ",
|
|
13554
14381
|
route: "/"
|
|
13555
14382
|
});
|
|
13556
|
-
console.log(items);
|
|
13557
14383
|
setItems(items);
|
|
13558
14384
|
};
|
|
13559
14385
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -13591,9 +14417,9 @@ var PageTitle3 = function PageTitle3(props) {
|
|
|
13591
14417
|
backgroundImage: "url(" + (sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : _sectionData$.srcImage) + ")"
|
|
13592
14418
|
}
|
|
13593
14419
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
13594
|
-
className: "absolute top-0 w-full h-full bg-black
|
|
14420
|
+
className: "absolute top-0 w-full h-full bg-black/60 z-0"
|
|
13595
14421
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
13596
|
-
className: "relative w-full p-20 z-10 flex flex-col items-center justify-center"
|
|
14422
|
+
className: "relative w-full pt-8 md:p-2 md:p-12 lg:p-20 z-10 flex flex-col items-center justify-center"
|
|
13597
14423
|
}, /*#__PURE__*/React__default.createElement("h2", {
|
|
13598
14424
|
className: "text-3xl md:text-5xl text-white leading-[1.6] md:leading-[1.6] text-center font-headingFont"
|
|
13599
14425
|
}, route === null || route === void 0 ? void 0 : (_route$route = route.route) === null || _route$route === void 0 ? void 0 : (_route$route$split = _route$route.split("/")) === null || _route$route$split === void 0 ? void 0 : (_route$route$split$fi = _route$route$split.filter(function (e) {
|
|
@@ -14066,6 +14892,10 @@ var FormCheckout = React.forwardRef(function (props, ref) {
|
|
|
14066
14892
|
})));
|
|
14067
14893
|
});
|
|
14068
14894
|
|
|
14895
|
+
var dayjs_min = createCommonjsModule(function (module, exports) {
|
|
14896
|
+
!function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return "["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p="$isDayjsObject",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0;}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return b},m.isValid=function(){return !(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+"Hours",0);case u:return $(v+"Minutes",1);case s:return $(v+"Seconds",2);case i:return $(v+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=b.p(t),f="set"+(this.$u?"UTC":""),l=(n={},n[a]=f+"Date",n[d]=f+"Date",n[c]=f+"Month",n[h]=f+"FullYear",n[u]=f+"Hours",n[s]=f+"Minutes",n[i]=f+"Seconds",n[r]=f+"Milliseconds",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,"0")},$=f||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return b.s(e.$y,4,"0");case"M":return a+1;case"MM":return b.s(a+1,2,"0");case"MMM":return h(n.monthsShort,a,c,3);case"MMMM":return h(c,a);case"D":return e.$D;case"DD":return b.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return h(n.weekdaysMin,e.$W,o,2);case"ddd":return h(n.weekdaysShort,e.$W,o,3);case"dddd":return o[e.$W];case"H":return String(s);case"HH":return b.s(s,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return $(s,u,!0);case"A":return $(s,u,!1);case"m":return String(u);case"mm":return b.s(u,2,"0");case"s":return String(e.$s);case"ss":return b.s(e.$s,2,"0");case"SSS":return b.s(e.$ms,3,"0");case"Z":return i}return null}(t)||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g;}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),k=_.prototype;return O.prototype=k,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",c],["$y",h],["$D",d]].forEach((function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=!0),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));
|
|
14897
|
+
});
|
|
14898
|
+
|
|
14069
14899
|
var OrderControllerWithoutLogin = function OrderControllerWithoutLogin(props) {
|
|
14070
14900
|
_objectDestructuringEmpty(props);
|
|
14071
14901
|
var draftOrderWithoutLogin = function draftOrderWithoutLogin(shopId, dataOrder) {
|
|
@@ -14735,7 +15565,7 @@ var SearchBar6 = function SearchBar6(props) {
|
|
|
14735
15565
|
}
|
|
14736
15566
|
};
|
|
14737
15567
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
14738
|
-
className: "w-full flex flex-col justify-center px-3 md:px-6 gap-2 md:gap-4 lg:gap-6 items-center
|
|
15568
|
+
className: "w-full flex flex-col justify-center px-3 md:px-6 gap-2 md:gap-4 lg:gap-6 items-center py-6 md:py-12 lg:px-20",
|
|
14739
15569
|
style: {
|
|
14740
15570
|
background: "url(" + (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.srcImage) + ")",
|
|
14741
15571
|
backgroundPosition: "center",
|
|
@@ -14794,7 +15624,7 @@ var ShopHighlights2 = function ShopHighlights2(props) {
|
|
|
14794
15624
|
}) : /*#__PURE__*/React__default.createElement("img", {
|
|
14795
15625
|
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
14796
15626
|
alt: "logo",
|
|
14797
|
-
className: "w-16 h-16 p-3 rounded-full bg-primary"
|
|
15627
|
+
className: "w-16 h-16 p-3 rounded-full object-cover bg-primary"
|
|
14798
15628
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
14799
15629
|
className: "font-medium text-lg"
|
|
14800
15630
|
}, item === null || item === void 0 ? void 0 : (_item$title = item.title) === null || _item$title === void 0 ? void 0 : _item$title.toUpperCase()), /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -14826,7 +15656,7 @@ var ShopHighlights5 = function ShopHighlights5(props) {
|
|
|
14826
15656
|
}) : /*#__PURE__*/React__default.createElement("img", {
|
|
14827
15657
|
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
14828
15658
|
alt: "logo",
|
|
14829
|
-
className: "w-16 h-16 rounded-full bg-primary"
|
|
15659
|
+
className: "w-16 h-16 rounded-full object-cover bg-primary"
|
|
14830
15660
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
14831
15661
|
className: "font-semibold text-xl text-textHeading pt-2 border-t border-textHeading"
|
|
14832
15662
|
}, item === null || item === void 0 ? void 0 : (_item$title = item.title) === null || _item$title === void 0 ? void 0 : _item$title.toUpperCase()), /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -14856,7 +15686,7 @@ var ShopHighlights6 = function ShopHighlights6(props) {
|
|
|
14856
15686
|
}) : /*#__PURE__*/React__default.createElement("img", {
|
|
14857
15687
|
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
14858
15688
|
alt: "logo",
|
|
14859
|
-
className: "w-16 h-16"
|
|
15689
|
+
className: "w-16 h-16 object-cover"
|
|
14860
15690
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
14861
15691
|
className: " w-44 h-0.5 rounded-full bg-primary"
|
|
14862
15692
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -14948,7 +15778,7 @@ var ShopHighlights8 = function ShopHighlights8(props) {
|
|
|
14948
15778
|
className: "flex flex-col h-full gap-3"
|
|
14949
15779
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
14950
15780
|
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
14951
|
-
className: "object-cover"
|
|
15781
|
+
className: "object-cover rounded-lg"
|
|
14952
15782
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
14953
15783
|
className: "text-2xl text-textBody"
|
|
14954
15784
|
}, item === null || item === void 0 ? void 0 : item.title), /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -14957,6 +15787,89 @@ var ShopHighlights8 = function ShopHighlights8(props) {
|
|
|
14957
15787
|
})));
|
|
14958
15788
|
};
|
|
14959
15789
|
|
|
15790
|
+
var ShopHighlights9 = function ShopHighlights9(props) {
|
|
15791
|
+
var data = props.data,
|
|
15792
|
+
_props$Link = props.Link,
|
|
15793
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
15794
|
+
_props$SectionTitle = props.SectionTitle,
|
|
15795
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
|
|
15796
|
+
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
15797
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
15798
|
+
className: SECTION_CLASS + " flex flex-col gap-6 md:gap-10"
|
|
15799
|
+
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
15800
|
+
data: data
|
|
15801
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
15802
|
+
className: "grid grid-cols-1 lg:grid-cols-2 gap-4 lg:gap-x-12 lg:gap-y-6"
|
|
15803
|
+
}, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (item, index) {
|
|
15804
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
15805
|
+
Link: Link,
|
|
15806
|
+
href: convertURL(item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#",
|
|
15807
|
+
key: "kdf-" + index
|
|
15808
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
15809
|
+
className: "flex flex-col md:flex-row h-full gap-4"
|
|
15810
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
15811
|
+
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
15812
|
+
className: "object-cover rounded-lg w-full md:min-w-60 md:max-w-60"
|
|
15813
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
15814
|
+
className: "flex flex-col gap-2"
|
|
15815
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
15816
|
+
className: "text-lg font-semibold text-textHeading"
|
|
15817
|
+
}, item === null || item === void 0 ? void 0 : item.title), /*#__PURE__*/React__default.createElement("div", {
|
|
15818
|
+
className: "w-1/3 border border-stroke"
|
|
15819
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
15820
|
+
className: "flex-grow text-textBody leading-relaxed"
|
|
15821
|
+
}, item === null || item === void 0 ? void 0 : item.description))));
|
|
15822
|
+
})));
|
|
15823
|
+
};
|
|
15824
|
+
|
|
15825
|
+
var ShopHighlights10 = function ShopHighlights10(props) {
|
|
15826
|
+
var data = props.data,
|
|
15827
|
+
_props$Link = props.Link,
|
|
15828
|
+
Link = _props$Link === void 0 ? null : _props$Link;
|
|
15829
|
+
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
15830
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
15831
|
+
className: "pt-10"
|
|
15832
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
15833
|
+
className: "relative overflow-hidden w-full"
|
|
15834
|
+
}, /*#__PURE__*/React__default.createElement("svg", {
|
|
15835
|
+
viewBox: "0 0 1440 105",
|
|
15836
|
+
className: "text-[#FFE7CC] w-[105%]",
|
|
15837
|
+
fill: "none",
|
|
15838
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
15839
|
+
}, /*#__PURE__*/React__default.createElement("path", {
|
|
15840
|
+
d: "M439.5 55.3739C216.5 71.3734 77 37.8735 0 0.747667V104.606H1440C1410.56 83.7584 1313.93 35.6959 1162.92 10.2239C974.151 -21.6161 726.714 34.7672 439.5 55.3739Z",
|
|
15841
|
+
fill: "currentColor"
|
|
15842
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
15843
|
+
className: "text-primary w-[105%] absolute top-2"
|
|
15844
|
+
}, /*#__PURE__*/React__default.createElement("svg", {
|
|
15845
|
+
viewBox: "0 0 1440 104",
|
|
15846
|
+
fill: "none",
|
|
15847
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
15848
|
+
}, /*#__PURE__*/React__default.createElement("path", {
|
|
15849
|
+
d: "M439.5 54.6864C216.5 70.6859 77 37.186 0 0.0601582V103.918H1440C1410.56 83.0709 1313.93 35.0084 1162.92 9.53638C974.151 -22.3036 726.714 34.0797 439.5 54.6864Z",
|
|
15850
|
+
fill: "currentColor"
|
|
15851
|
+
})))), /*#__PURE__*/React__default.createElement("div", {
|
|
15852
|
+
className: SECTION_CLASS + " mt-0 md:mt-0 grid grid-cols-1 md:grid-cols-3 gap-4 md:gap-4 bg-primary py-10"
|
|
15853
|
+
}, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (item, index) {
|
|
15854
|
+
return /*#__PURE__*/React__default.createElement(LinkToPage, {
|
|
15855
|
+
Link: Link,
|
|
15856
|
+
href: convertURL(item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#",
|
|
15857
|
+
key: "kdf-" + index
|
|
15858
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
15859
|
+
className: "flex flex-col h-full gap-6"
|
|
15860
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
15861
|
+
className: "flex flex-col gap-3 items-center"
|
|
15862
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
15863
|
+
className: "text-2xl text-center text-textButton"
|
|
15864
|
+
}, item === null || item === void 0 ? void 0 : item.title), /*#__PURE__*/React__default.createElement("div", {
|
|
15865
|
+
className: "flex-grow text-lg leading-relaxed text-center text-textSecondary"
|
|
15866
|
+
}, item === null || item === void 0 ? void 0 : item.description)), /*#__PURE__*/React__default.createElement("img", {
|
|
15867
|
+
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
15868
|
+
className: "aspect-video object-cover mt-auto border-4 border-secondary"
|
|
15869
|
+
})));
|
|
15870
|
+
})));
|
|
15871
|
+
};
|
|
15872
|
+
|
|
14960
15873
|
var VideoFull1 = function VideoFull1(props) {
|
|
14961
15874
|
var _data$data, _data$data$;
|
|
14962
15875
|
var shopConfigStyle = props.shopConfigStyle,
|
|
@@ -15044,11 +15957,6 @@ var NewsController = function NewsController(props) {
|
|
|
15044
15957
|
var _response$data2, _response$data2$data, _response$data3, _response$data3$data;
|
|
15045
15958
|
setNewsArticles(response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : (_response$data2$data = _response$data2.data) === null || _response$data2$data === void 0 ? void 0 : _response$data2$data.content);
|
|
15046
15959
|
setPage(response === null || response === void 0 ? void 0 : (_response$data3 = response.data) === null || _response$data3 === void 0 ? void 0 : (_response$data3$data = _response$data3.data) === null || _response$data3$data === void 0 ? void 0 : _response$data3$data.totalElements);
|
|
15047
|
-
var url = new URL(window.location.href);
|
|
15048
|
-
if (/^(\/(tin-tuc-theo-danh-muc))\/[^/]+-\d+$/.test(url.pathname)) {
|
|
15049
|
-
url.pathname = url.pathname.replace(/\/[^/]+-\d+$/, "");
|
|
15050
|
-
window.history.replaceState({}, '', url.pathname + url.search);
|
|
15051
|
-
}
|
|
15052
15960
|
}
|
|
15053
15961
|
setLoading(false);
|
|
15054
15962
|
});
|
|
@@ -15282,7 +16190,8 @@ var News1 = function News1(props) {
|
|
|
15282
16190
|
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
15283
16191
|
_props$Link = props.Link,
|
|
15284
16192
|
Link = _props$Link === void 0 ? null : _props$Link,
|
|
15285
|
-
catId = props.catId
|
|
16193
|
+
_props$catId = props.catId,
|
|
16194
|
+
catId = _props$catId === void 0 ? "" : _props$catId;
|
|
15286
16195
|
var _useState = React.useState({
|
|
15287
16196
|
page: 0,
|
|
15288
16197
|
sort: "timeUpdate,DESC",
|
|
@@ -15322,6 +16231,18 @@ var News1 = function News1(props) {
|
|
|
15322
16231
|
setCategorySelected(category);
|
|
15323
16232
|
}
|
|
15324
16233
|
}, [newsCategories]);
|
|
16234
|
+
var handleSelectedCateogry = function handleSelectedCateogry(item) {
|
|
16235
|
+
if (catId) {
|
|
16236
|
+
var newUrl = getLinkNewsByCategory(item);
|
|
16237
|
+
window.history.replaceState(null, '', newUrl);
|
|
16238
|
+
}
|
|
16239
|
+
setCategorySelected(item);
|
|
16240
|
+
setParams(function (prev) {
|
|
16241
|
+
return _extends({}, prev, {
|
|
16242
|
+
catId: item === null || item === void 0 ? void 0 : item.catId
|
|
16243
|
+
});
|
|
16244
|
+
});
|
|
16245
|
+
};
|
|
15325
16246
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
15326
16247
|
className: SECTION_CLASS + " grid grid-cols-1 md:grid-cols-3 gap-6"
|
|
15327
16248
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -15342,12 +16263,7 @@ var News1 = function News1(props) {
|
|
|
15342
16263
|
className: "px-6 hover:bg-gray-100 hover:text-primary cursor-pointer " + ((item === null || item === void 0 ? void 0 : item.catId) === (categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.catId) ? "bg-gray-100 text-primary" : "") + " ",
|
|
15343
16264
|
key: "sdjfdh-" + index,
|
|
15344
16265
|
onClick: function onClick() {
|
|
15345
|
-
|
|
15346
|
-
setParams(function (prev) {
|
|
15347
|
-
return _extends({}, prev, {
|
|
15348
|
-
catId: item === null || item === void 0 ? void 0 : item.catId
|
|
15349
|
-
});
|
|
15350
|
-
});
|
|
16266
|
+
handleSelectedCateogry(item);
|
|
15351
16267
|
}
|
|
15352
16268
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
15353
16269
|
className: "border-b border-dashed py-4 " + ((newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.length) - 1 === index ? "border-b-0" : "")
|
|
@@ -15401,12 +16317,7 @@ var News1 = function News1(props) {
|
|
|
15401
16317
|
className: "px-4 hover:bg-gray-100 hover:text-primary cursor-pointer " + ((item === null || item === void 0 ? void 0 : item.catId) === (categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.catId) ? "bg-gray-100 text-primary" : "") + " ",
|
|
15402
16318
|
key: "sdjfdh-" + index,
|
|
15403
16319
|
onClick: function onClick() {
|
|
15404
|
-
|
|
15405
|
-
setParams(function (prev) {
|
|
15406
|
-
return _extends({}, prev, {
|
|
15407
|
-
catId: item === null || item === void 0 ? void 0 : item.catId
|
|
15408
|
-
});
|
|
15409
|
-
});
|
|
16320
|
+
handleSelectedCateogry(item);
|
|
15410
16321
|
}
|
|
15411
16322
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
15412
16323
|
className: "border-b border-dashed py-4 " + ((newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.length) - 1 === index ? "border-b-0" : "")
|
|
@@ -15502,7 +16413,7 @@ var NewsDetail1 = function NewsDetail1(props) {
|
|
|
15502
16413
|
}), (newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
15503
16414
|
className: "top-6 block md:hidden"
|
|
15504
16415
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
15505
|
-
className: "px-6 bg-primary rounded-t-lg text-lg text-textButton text-center"
|
|
16416
|
+
className: "px-6 py-3 bg-primary rounded-t-lg text-lg text-textButton text-center"
|
|
15506
16417
|
}, "Chuy\xEAn m\u1EE5c"), /*#__PURE__*/React__default.createElement("div", {
|
|
15507
16418
|
className: "rounded-b-lg bg-bgSecondary"
|
|
15508
16419
|
}, newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.map(function (item, index) {
|
|
@@ -15565,6 +16476,7 @@ exports.Address1 = Address1;
|
|
|
15565
16476
|
exports.Banner1 = Banner1;
|
|
15566
16477
|
exports.Banner2 = Banner2;
|
|
15567
16478
|
exports.Banner3 = Banner3;
|
|
16479
|
+
exports.Banner4 = Banner4;
|
|
15568
16480
|
exports.Banner7 = Banner7;
|
|
15569
16481
|
exports.BannerFull1 = BannerFull1;
|
|
15570
16482
|
exports.BannerFull2 = BannerFull2;
|
|
@@ -15580,6 +16492,7 @@ exports.CustomerRating10 = CustomerRating10;
|
|
|
15580
16492
|
exports.CustomerRating5 = CustomerRating5;
|
|
15581
16493
|
exports.CustomerRating6 = CustomerRating6;
|
|
15582
16494
|
exports.CustomerRating8 = CustomerRating8;
|
|
16495
|
+
exports.CustomerRating9 = CustomerRating9;
|
|
15583
16496
|
exports.DateTimePicker = DateTimePicker;
|
|
15584
16497
|
exports.Employees1 = Employees1;
|
|
15585
16498
|
exports.Features2 = Features2;
|
|
@@ -15587,12 +16500,16 @@ exports.Features3 = Features3;
|
|
|
15587
16500
|
exports.Footer1 = Footer1;
|
|
15588
16501
|
exports.Footer7 = Footer7;
|
|
15589
16502
|
exports.Gallery1 = Gallery1;
|
|
15590
|
-
exports.Gallery2 =
|
|
16503
|
+
exports.Gallery2 = Gallery2;
|
|
16504
|
+
exports.Gallery3 = Gallery3;
|
|
15591
16505
|
exports.Hero1 = Hero1;
|
|
15592
16506
|
exports.Hero10 = Hero10;
|
|
15593
16507
|
exports.Hero11 = Hero11;
|
|
15594
16508
|
exports.Hero12 = Hero12;
|
|
15595
16509
|
exports.Hero13 = Hero13;
|
|
16510
|
+
exports.Hero14 = Hero14;
|
|
16511
|
+
exports.Hero15 = Hero15;
|
|
16512
|
+
exports.Hero16 = Hero16;
|
|
15596
16513
|
exports.Hero2 = Hero2;
|
|
15597
16514
|
exports.Hero5 = Hero5;
|
|
15598
16515
|
exports.Hero6 = Hero6;
|
|
@@ -15616,6 +16533,8 @@ exports.ProductHighlight1 = ProductHighlight1;
|
|
|
15616
16533
|
exports.ProductHot1 = ProductHot1;
|
|
15617
16534
|
exports.ProductHot3 = ProductHot3;
|
|
15618
16535
|
exports.ProductImage = ProductImage;
|
|
16536
|
+
exports.ProductItem10 = ProductItem10;
|
|
16537
|
+
exports.ProductItem11 = ProductItem11;
|
|
15619
16538
|
exports.ProductItem2 = ProductItem2;
|
|
15620
16539
|
exports.ProductItem3 = ProductItem3;
|
|
15621
16540
|
exports.ProductItem4 = ProductItem4;
|
|
@@ -15623,6 +16542,7 @@ exports.ProductItem5 = ProductItem5;
|
|
|
15623
16542
|
exports.ProductItem6 = ProductItem6;
|
|
15624
16543
|
exports.ProductItem7 = ProductItem7;
|
|
15625
16544
|
exports.ProductItem8 = ProductItem8;
|
|
16545
|
+
exports.ProductItem9 = ProductItem9;
|
|
15626
16546
|
exports.ProductList5 = ProductList5;
|
|
15627
16547
|
exports.ProductList7 = ProductList7;
|
|
15628
16548
|
exports.ProductSale2 = ProductSale2;
|
|
@@ -15630,6 +16550,7 @@ exports.ProductSearch1 = ProductSearch1;
|
|
|
15630
16550
|
exports.Products10 = Products10;
|
|
15631
16551
|
exports.Products11 = Products11;
|
|
15632
16552
|
exports.Products12 = Products12;
|
|
16553
|
+
exports.Products14 = Products14;
|
|
15633
16554
|
exports.Products2 = Products2;
|
|
15634
16555
|
exports.Products3 = Products3;
|
|
15635
16556
|
exports.Products9 = Products9;
|
|
@@ -15642,13 +16563,16 @@ exports.SectionTitle1 = SectionTitle1;
|
|
|
15642
16563
|
exports.SectionTitle2 = SectionTitle2;
|
|
15643
16564
|
exports.SectionTitle3 = SectionTitle3;
|
|
15644
16565
|
exports.SectionTitle4 = SectionTitle4;
|
|
16566
|
+
exports.SectionTitle5 = SectionTitle5;
|
|
15645
16567
|
exports.Select = Select$1;
|
|
15646
16568
|
exports.ServiceDetail1 = ServiceDetail1;
|
|
16569
|
+
exports.ShopHighlights10 = ShopHighlights10;
|
|
15647
16570
|
exports.ShopHighlights2 = ShopHighlights2;
|
|
15648
16571
|
exports.ShopHighlights5 = ShopHighlights5;
|
|
15649
16572
|
exports.ShopHighlights6 = ShopHighlights6;
|
|
15650
16573
|
exports.ShopHighlights7 = ShopHighlights7;
|
|
15651
16574
|
exports.ShopHighlights8 = ShopHighlights8;
|
|
16575
|
+
exports.ShopHighlights9 = ShopHighlights9;
|
|
15652
16576
|
exports.TextArea = TextArea;
|
|
15653
16577
|
exports.TreatmentDetail1 = TreatmentDetail1;
|
|
15654
16578
|
exports.TreatmentItem1 = TreatmentItem1;
|