@enyxs/wikex-components 0.11.32 → 0.11.34
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/README.md +9 -7
- package/dist/fees-model.d.mts +3 -1
- package/dist/fees-model.d.ts +3 -1
- package/dist/fees-model.js +20 -0
- package/dist/fees-model.js.map +1 -1
- package/dist/fees-model.mjs +19 -0
- package/dist/fees-model.mjs.map +1 -1
- package/dist/fees.js +125 -112
- package/dist/fees.js.map +1 -1
- package/dist/fees.mjs +120 -107
- package/dist/fees.mjs.map +1 -1
- package/dist/index.js +278 -265
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +194 -181
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -67,7 +67,7 @@ __export(index_exports, {
|
|
|
67
67
|
wikexComponents: () => wikexComponents
|
|
68
68
|
});
|
|
69
69
|
module.exports = __toCommonJS(index_exports);
|
|
70
|
-
var
|
|
70
|
+
var import_react41 = require("react");
|
|
71
71
|
|
|
72
72
|
// src/minimal-ui/blocks.tsx
|
|
73
73
|
var import_react5 = require("react");
|
|
@@ -3612,7 +3612,7 @@ var dynamicListBlocks = configs.map(createBlock);
|
|
|
3612
3612
|
var dynamicListTypes = new Set(dynamicListBlocks.map((block) => block.definition.type));
|
|
3613
3613
|
|
|
3614
3614
|
// src/wikex/original-commodity-blocks.tsx
|
|
3615
|
-
var
|
|
3615
|
+
var import_react38 = require("react");
|
|
3616
3616
|
var import_navigation3 = require("next/navigation.js");
|
|
3617
3617
|
var import_i18next = require("i18next");
|
|
3618
3618
|
var import_react_i18next27 = require("react-i18next");
|
|
@@ -5550,48 +5550,48 @@ var dropOut = (0, import_styled_components3.keyframes)([
|
|
|
5550
5550
|
`from{opacity:1;transform:translateY(0);}to{opacity:0;transform:translateY(-12px);}`
|
|
5551
5551
|
]);
|
|
5552
5552
|
var HeaderShell = import_styled_components3.default.header.withConfig({
|
|
5553
|
-
componentId: "sc-
|
|
5553
|
+
componentId: "sc-eabee95e-0"
|
|
5554
5554
|
})([
|
|
5555
5555
|
`position:sticky;top:0;z-index:100;display:flex;height:64px;padding:12px 20px;align-items:center;justify-content:center;background:`,
|
|
5556
5556
|
`;box-shadow:0 1px 12px rgb(0 0 0 / 4%);:root[data-theme="dark"] &{background:#18181a;}@media (max-width:768px){padding-inline:15px;}@media (max-width:620px){height:62px;padding:16px 16px 12px;box-shadow:0 1px 0 rgb(5 8 15 / 8%);}`
|
|
5557
5557
|
], ({ theme }) => theme.colors.background.canvas);
|
|
5558
5558
|
var HeaderInner = import_styled_components3.default.div.withConfig({
|
|
5559
|
-
componentId: "sc-
|
|
5559
|
+
componentId: "sc-eabee95e-1"
|
|
5560
5560
|
})([
|
|
5561
5561
|
`display:flex;width:100%;max-width:1560px;height:40px;margin:0 auto;align-items:center;gap:32px;@media (max-width:1279px){justify-content:space-between;}@media only screen and (max-width:767px){gap:0;}@media (max-width:620px){height:34px;justify-content:space-between;}`
|
|
5562
5562
|
]);
|
|
5563
5563
|
var BrandGroup = import_styled_components3.default.div.withConfig({
|
|
5564
|
-
componentId: "sc-
|
|
5564
|
+
componentId: "sc-eabee95e-2"
|
|
5565
5565
|
})([
|
|
5566
5566
|
`display:flex;flex:0 0 auto;align-items:center;gap:16px;`
|
|
5567
5567
|
]);
|
|
5568
5568
|
var WikiBrand = (0, import_styled_components3.default)(import_link.default).withConfig({
|
|
5569
|
-
componentId: "sc-
|
|
5569
|
+
componentId: "sc-eabee95e-3"
|
|
5570
5570
|
})([
|
|
5571
5571
|
`display:inline-flex;flex:0 0 auto;align-items:center;`
|
|
5572
5572
|
]);
|
|
5573
5573
|
var WikiLogo = (0, import_styled_components3.default)(import_image.default).withConfig({
|
|
5574
|
-
componentId: "sc-
|
|
5574
|
+
componentId: "sc-eabee95e-4"
|
|
5575
5575
|
})([
|
|
5576
5576
|
`display:block;width:142px;height:auto;@media (max-width:620px){width:84px;}`
|
|
5577
5577
|
]);
|
|
5578
5578
|
var PartnerBrand = import_styled_components3.default.a.withConfig({
|
|
5579
|
-
componentId: "sc-
|
|
5579
|
+
componentId: "sc-eabee95e-5"
|
|
5580
5580
|
})([
|
|
5581
5581
|
`display:inline-flex;align-items:center;gap:7.2px;color:#009ee3;@media (max-width:767px){display:inline-flex;}`
|
|
5582
5582
|
]);
|
|
5583
5583
|
var MxvLogo = (0, import_styled_components3.default)(import_image.default).withConfig({
|
|
5584
|
-
componentId: "sc-
|
|
5584
|
+
componentId: "sc-eabee95e-6"
|
|
5585
5585
|
})([
|
|
5586
5586
|
`display:block;width:95px;height:auto;:root[data-theme="dark"] &{filter:brightness(0) invert(1);}@media (max-width:620px){width:95px;}`
|
|
5587
5587
|
]);
|
|
5588
5588
|
var DesktopNavigation = import_styled_components3.default.nav.withConfig({
|
|
5589
|
-
componentId: "sc-
|
|
5589
|
+
componentId: "sc-eabee95e-7"
|
|
5590
5590
|
})([
|
|
5591
5591
|
`display:flex;align-items:center;gap:16px;@media (max-width:1279px){display:none;}`
|
|
5592
5592
|
]);
|
|
5593
5593
|
var NavigationLink = (0, import_styled_components3.default)(import_link.default).withConfig({
|
|
5594
|
-
componentId: "sc-
|
|
5594
|
+
componentId: "sc-eabee95e-8"
|
|
5595
5595
|
})([
|
|
5596
5596
|
`position:relative;color:`,
|
|
5597
5597
|
`;font-size:14px;font-weight:700;line-height:18px;white-space:nowrap;transition:color 160ms ease;&:hover,&:focus-visible{color:`,
|
|
@@ -5599,14 +5599,14 @@ var NavigationLink = (0, import_styled_components3.default)(import_link.default)
|
|
|
5599
5599
|
`;}@media (min-width:1280px) and (max-width:1439px){font-size:11px;}`
|
|
5600
5600
|
], ({ theme }) => theme.colors.text.secondary, ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.accent.primary);
|
|
5601
5601
|
var ProductsMenuTrigger = import_styled_components3.default.button.withConfig({
|
|
5602
|
-
componentId: "sc-
|
|
5602
|
+
componentId: "sc-eabee95e-9"
|
|
5603
5603
|
})([
|
|
5604
5604
|
`display:inline-flex;align-items:center;gap:4px;padding:0;border:0;color:`,
|
|
5605
5605
|
`;background:transparent;cursor:pointer;font-family:inherit;font-size:14px;font-weight:700;line-height:18px;white-space:nowrap;&[data-state="open"],&[data-active="true"],&:hover,&:focus-visible{color:`,
|
|
5606
5606
|
`;}&:focus-visible{outline:none;}&::after{content:"";border-inline:3px solid transparent;border-top:4px solid currentColor;transition:transform 160ms ease;}&[data-state="open"]::after{transform:rotate(180deg);}@media (min-width:1280px) and (max-width:1439px){font-size:11px;}@media (prefers-reduced-motion:reduce){&::after{transition:none;}}`
|
|
5607
5607
|
], ({ theme }) => theme.colors.text.secondary, ({ theme }) => theme.colors.accent.primary);
|
|
5608
5608
|
var ProductsMenuContent = (0, import_styled_components3.default)(import_radix_ui.DropdownMenu.Content).withConfig({
|
|
5609
|
-
componentId: "sc-
|
|
5609
|
+
componentId: "sc-eabee95e-10"
|
|
5610
5610
|
})([
|
|
5611
5611
|
`z-index:300;width:206px;max-width:var(--radix-dropdown-menu-content-available-width);padding:8px;border:1px solid `,
|
|
5612
5612
|
`;border-radius:8px;color:`,
|
|
@@ -5616,42 +5616,42 @@ var ProductsMenuContent = (0, import_styled_components3.default)(import_radix_ui
|
|
|
5616
5616
|
`;}`
|
|
5617
5617
|
], ({ theme }) => theme.colors.border.line, ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.background.popup, ({ theme }) => theme.colors.effect.popupShadow, ({ theme }) => theme.colors.border.subtle);
|
|
5618
5618
|
var ProductsMenuItem = (0, import_styled_components3.default)(import_radix_ui.DropdownMenu.Item).withConfig({
|
|
5619
|
-
componentId: "sc-
|
|
5619
|
+
componentId: "sc-eabee95e-11"
|
|
5620
5620
|
})([
|
|
5621
5621
|
`display:flex;height:44px;align-items:center;padding:12px 8px;border-radius:4px;cursor:pointer;font-size:14px;font-weight:400;line-height:18px;outline:none;color:inherit;text-decoration:none;&[aria-current="page"],&[data-highlighted],&:focus-visible{color:`,
|
|
5622
5622
|
`;background:transparent;outline:none;}`
|
|
5623
5623
|
], ({ theme }) => theme.colors.accent.primary);
|
|
5624
5624
|
var MobileNavigation2 = import_styled_components3.default.div.withConfig({
|
|
5625
|
-
componentId: "sc-
|
|
5625
|
+
componentId: "sc-eabee95e-12"
|
|
5626
5626
|
})([
|
|
5627
5627
|
`position:relative;display:none;align-items:center;gap:8px;@media (max-width:1279px){display:flex;}@media (max-width:767px){order:3;margin-left:auto;}@media (max-width:620px){gap:2px;}`
|
|
5628
5628
|
]);
|
|
5629
5629
|
var MobileThemeToggle = import_styled_components3.default.div.withConfig({
|
|
5630
|
-
componentId: "sc-
|
|
5630
|
+
componentId: "sc-eabee95e-13"
|
|
5631
5631
|
})([
|
|
5632
5632
|
`display:none;align-items:center;@media (max-width:767px){display:flex;}@media (max-width:620px){&& .theme-toggle--header{border-radius:4px;svg{width:20px;height:20px;}}}`
|
|
5633
5633
|
]);
|
|
5634
5634
|
var MobileLanguageToggle = import_styled_components3.default.div.withConfig({
|
|
5635
|
-
componentId: "sc-
|
|
5635
|
+
componentId: "sc-eabee95e-14"
|
|
5636
5636
|
})([
|
|
5637
5637
|
`display:none;align-items:center;@media (max-width:767px){display:flex;}`
|
|
5638
5638
|
]);
|
|
5639
5639
|
var MobileMenuTrigger = import_styled_components3.default.button.withConfig({
|
|
5640
|
-
componentId: "sc-
|
|
5640
|
+
componentId: "sc-eabee95e-15"
|
|
5641
5641
|
})([
|
|
5642
5642
|
`display:inline-flex;width:42px;height:42px;align-items:center;justify-content:center;border:0;border-radius:9999px;color:`,
|
|
5643
5643
|
`;background:transparent;cursor:pointer;transition:background-color 160ms ease;&:hover,&[data-state="open"]{background:`,
|
|
5644
5644
|
`;}@media (max-width:620px){width:24px;height:24px;border-radius:4px;svg{flex-shrink:0;}}`
|
|
5645
5645
|
], ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.background.hover);
|
|
5646
5646
|
var MobileDrawerOverlay = (0, import_styled_components3.default)(import_radix_ui.Dialog.Overlay).withConfig({
|
|
5647
|
-
componentId: "sc-
|
|
5647
|
+
componentId: "sc-eabee95e-16"
|
|
5648
5648
|
})([
|
|
5649
5649
|
`position:fixed;z-index:200;inset:0;background:rgb(0 0 0 / 48%);backdrop-filter:blur(2px);&[data-state="open"]{animation:`,
|
|
5650
5650
|
` 220ms ease-out;}&[data-state="closed"]{animation:`,
|
|
5651
5651
|
` 180ms ease-in;}@media (prefers-reduced-motion:reduce){animation:none;}@media (max-width:767px){top:var(--header-height);background:rgb(5 8 16 / 40%);backdrop-filter:blur(5px);}`
|
|
5652
5652
|
], fadeIn, fadeOut);
|
|
5653
5653
|
var MobileDrawerContent = (0, import_styled_components3.default)(import_radix_ui.Dialog.Content).withConfig({
|
|
5654
|
-
componentId: "sc-
|
|
5654
|
+
componentId: "sc-eabee95e-17"
|
|
5655
5655
|
})([
|
|
5656
5656
|
`position:fixed;z-index:201;top:0;right:0;width:320px;max-width:calc(100% - 24px);height:100vh;padding:20px;overflow-y:auto;color:`,
|
|
5657
5657
|
`;background:`,
|
|
@@ -5662,103 +5662,103 @@ var MobileDrawerContent = (0, import_styled_components3.default)(import_radix_ui
|
|
|
5662
5662
|
` 180ms ease-in;}}`
|
|
5663
5663
|
], ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.background.canvas, slideIn, slideOut, dropIn, dropOut);
|
|
5664
5664
|
var MobileDrawerHeader = import_styled_components3.default.div.withConfig({
|
|
5665
|
-
componentId: "sc-
|
|
5665
|
+
componentId: "sc-eabee95e-18"
|
|
5666
5666
|
})([
|
|
5667
5667
|
`display:flex;min-height:44px;margin-bottom:24px;align-items:center;justify-content:space-between;gap:16px;@media (max-width:767px){display:none;}`
|
|
5668
5668
|
]);
|
|
5669
5669
|
var MobileDrawerTitle = (0, import_styled_components3.default)(import_radix_ui.Dialog.Title).withConfig({
|
|
5670
|
-
componentId: "sc-
|
|
5670
|
+
componentId: "sc-eabee95e-19"
|
|
5671
5671
|
})([
|
|
5672
5672
|
`margin:0;font-size:20px;font-weight:700;line-height:28px;`
|
|
5673
5673
|
]);
|
|
5674
5674
|
var MobileDrawerClose = (0, import_styled_components3.default)(import_radix_ui.Dialog.Close).withConfig({
|
|
5675
|
-
componentId: "sc-
|
|
5675
|
+
componentId: "sc-eabee95e-20"
|
|
5676
5676
|
})([
|
|
5677
5677
|
`display:inline-flex;width:40px;height:40px;flex:0 0 40px;align-items:center;justify-content:center;border:0;border-radius:50%;color:`,
|
|
5678
5678
|
`;background:transparent;cursor:pointer;&:hover{background:`,
|
|
5679
5679
|
`;}`
|
|
5680
5680
|
], ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.background.hover);
|
|
5681
5681
|
var MobileDrawerActions = import_styled_components3.default.div.withConfig({
|
|
5682
|
-
componentId: "sc-
|
|
5682
|
+
componentId: "sc-eabee95e-21"
|
|
5683
5683
|
})([
|
|
5684
5684
|
`display:none;@media (max-width:767px){display:grid;width:100%;margin-bottom:8px;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}`
|
|
5685
5685
|
]);
|
|
5686
5686
|
var MobileMenuPanel = import_styled_components3.default.nav.withConfig({
|
|
5687
|
-
componentId: "sc-
|
|
5687
|
+
componentId: "sc-eabee95e-22"
|
|
5688
5688
|
})([
|
|
5689
5689
|
`display:flex;flex-direction:column;gap:6px;a,button{width:100%;border:0;display:flex;border-radius:8px;padding:14px 12px;color:`,
|
|
5690
5690
|
`;background:transparent;cursor:pointer;font-family:inherit;font-size:14px;font-weight:600;text-align:left;transition:color 160ms ease,background-color 160ms ease;}a:hover,a:focus-visible,button:not(:disabled):hover,button:not(:disabled):focus-visible{color:`,
|
|
5691
5691
|
`;background:`,
|
|
5692
5692
|
`;outline:none;}button:disabled{cursor:not-allowed;opacity:0.55;}.mobile-menu-group,.mobile-menu-submenu{display:flex;flex-direction:column;}.mobile-menu-submenu[hidden]{display:none;}a[aria-current="page"],button.mobile-menu-accordion-trigger[data-active="true"],button.mobile-menu-accordion-trigger[aria-expanded="true"]{color:`,
|
|
5693
|
-
`;}.mobile-menu-submenu a{padding-left:28px;font-size:13px;font-weight:500;}.mobile-products-chevron{display:inline-flex;transition:transform 160ms ease;}.mobile-menu-accordion-trigger[aria-expanded="true"] .mobile-products-chevron{transform:rotate(180deg);}@media (max-width:767px){gap:0;a,button{display:flex;min-height:42px;align-items:center;justify-content:space-between;padding:12px
|
|
5693
|
+
`;}.mobile-menu-submenu a{padding-left:28px;font-size:13px;font-weight:500;}.mobile-products-chevron{display:inline-flex;transition:transform 160ms ease;}.mobile-menu-accordion-trigger[aria-expanded="true"] .mobile-products-chevron{transform:rotate(180deg);}@media (max-width:767px){gap:0;a,button{display:flex;min-height:42px;align-items:center;justify-content:space-between;padding:12px;font-weight:700;line-height:18px;}a[data-accent="true"]{color:#f9bb3a;}.mobile-menu-submenu a{min-height:34px;padding:7px 12px 7px 28px;font-size:14px;font-weight:500;}.mobile-menu-login{display:none;}svg{width:18px;height:18px;flex:0 0 18px;}}@media (prefers-reduced-motion:reduce){.mobile-products-chevron{transition:none;}}`
|
|
5694
5694
|
], ({ theme }) => theme.colors.text.secondary, ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.background.hover, ({ theme }) => theme.colors.accent.primary);
|
|
5695
5695
|
var RightActions = import_styled_components3.default.div.withConfig({
|
|
5696
|
-
componentId: "sc-
|
|
5696
|
+
componentId: "sc-eabee95e-23"
|
|
5697
5697
|
})([
|
|
5698
5698
|
`display:flex;margin-left:auto;align-items:center;gap:12px;& > div{display:flex;align-items:center;gap:8px;}@media (max-width:1279px){display:none;}`
|
|
5699
5699
|
]);
|
|
5700
5700
|
var IconButton2 = import_styled_components3.default.button.withConfig({
|
|
5701
|
-
componentId: "sc-
|
|
5701
|
+
componentId: "sc-eabee95e-24"
|
|
5702
5702
|
})([
|
|
5703
5703
|
`display:inline-flex;width:36px;height:36px;flex:0 0 auto;align-items:center;justify-content:center;border:0;border-radius:8px;color:`,
|
|
5704
5704
|
`;background:transparent;cursor:pointer;transition:background-color 160ms ease;svg{width:24px;height:24px;}&:hover{background:`,
|
|
5705
5705
|
`;}@media (max-width:480px){display:none;}`
|
|
5706
5706
|
], ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.background.hover);
|
|
5707
5707
|
var LanguageTrigger = (0, import_styled_components3.default)(IconButton2).withConfig({
|
|
5708
|
-
componentId: "sc-
|
|
5708
|
+
componentId: "sc-eabee95e-25"
|
|
5709
5709
|
})([
|
|
5710
5710
|
`&[data-state="open"]{color:#f9bb3a;background:`,
|
|
5711
5711
|
`;}@media (max-width:767px){display:inline-flex;}@media (max-width:620px){border-radius:4px;svg{width:20px;height:20px;flex-shrink:0;}}`
|
|
5712
5712
|
], ({ theme }) => theme.colors.background.hover);
|
|
5713
5713
|
var LanguageMenuContent = (0, import_styled_components3.default)(import_radix_ui.DropdownMenu.Content).withConfig({
|
|
5714
|
-
componentId: "sc-
|
|
5714
|
+
componentId: "sc-eabee95e-26"
|
|
5715
5715
|
})([
|
|
5716
5716
|
`z-index:300;width:180px;padding:8px;border:1px solid #e6e7ea;border-radius:12px;color:#05080f;background:#f9fafb;box-shadow:0 4px 8px rgb(5 8 16 / 5%);outline:none;transform-origin:var(--radix-dropdown-menu-content-transform-origin);&[data-state="open"]{animation:`,
|
|
5717
5717
|
` 140ms ease-out;}&[data-state="closed"]{animation:`,
|
|
5718
5718
|
` 100ms ease-in;}:root[data-theme="dark"] &{border-color:#48484a;color:#f2f2f7;background:#2c2c2e;box-shadow:0 4px 12px rgb(0 0 0 / 24%);}&[data-compact="true"]{width:148px;padding:6px;}@media (prefers-reduced-motion:reduce){animation:none;}`
|
|
5719
5719
|
], fadeIn, fadeOut);
|
|
5720
5720
|
var LanguageMenuItem = (0, import_styled_components3.default)(import_radix_ui.DropdownMenu.RadioItem).withConfig({
|
|
5721
|
-
componentId: "sc-
|
|
5721
|
+
componentId: "sc-eabee95e-27"
|
|
5722
5722
|
})([
|
|
5723
5723
|
`display:flex;width:100%;height:46px;padding:12px 8px;align-items:center;gap:8px;border-radius:8px;cursor:pointer;font-size:16px;font-weight:500;line-height:22px;outline:none;user-select:none;&[data-highlighted]{background:#f1f2f4;}:root[data-theme="dark"] &[data-highlighted]{background:#3a3a3c;}`,
|
|
5724
5724
|
`[data-compact="true"] &{height:40px;padding:10px 6px;font-size:14px;line-height:18px;}`
|
|
5725
5725
|
], LanguageMenuContent);
|
|
5726
5726
|
var LanguageFlag = import_styled_components3.default.span.withConfig({
|
|
5727
|
-
componentId: "sc-
|
|
5727
|
+
componentId: "sc-eabee95e-28"
|
|
5728
5728
|
})([
|
|
5729
5729
|
`display:inline-flex;width:20px;height:20px;flex:0 0 20px;overflow:hidden;align-items:center;justify-content:center;border-radius:50%;img{width:100%;height:100%;max-width:none;object-fit:cover;}`
|
|
5730
5730
|
]);
|
|
5731
5731
|
var LanguageItemIndicator = (0, import_styled_components3.default)(import_radix_ui.DropdownMenu.ItemIndicator).withConfig({
|
|
5732
|
-
componentId: "sc-
|
|
5732
|
+
componentId: "sc-eabee95e-29"
|
|
5733
5733
|
})([
|
|
5734
5734
|
`display:inline-flex;width:18px;height:18px;margin-left:auto;flex:0 0 18px;align-items:center;justify-content:center;img{display:block;width:18px;height:18px;}`,
|
|
5735
5735
|
`[data-compact="true"] &,`,
|
|
5736
5736
|
`[data-compact="true"] & img{width:16px;height:16px;flex-basis:16px;}`
|
|
5737
5737
|
], LanguageMenuContent, LanguageMenuContent);
|
|
5738
5738
|
var ActionDivider = import_styled_components3.default.span.withConfig({
|
|
5739
|
-
componentId: "sc-
|
|
5739
|
+
componentId: "sc-eabee95e-30"
|
|
5740
5740
|
})([
|
|
5741
5741
|
`width:1px;height:16px;background:`,
|
|
5742
5742
|
`;@media (max-width:608px){display:none;}`
|
|
5743
5743
|
], ({ theme }) => theme.colors.border.line);
|
|
5744
5744
|
var LoginLink = import_styled_components3.default.a.withConfig({
|
|
5745
|
-
componentId: "sc-
|
|
5745
|
+
componentId: "sc-eabee95e-31"
|
|
5746
5746
|
})([
|
|
5747
5747
|
`display:inline-flex;text-decoration:none;height:40px;align-items:center;justify-content:center;border:1px solid #d2d5da;border-radius:6px;padding:0 16px;color:#05080f;background:transparent;font-size:14px;font-weight:700;line-height:18px;white-space:nowrap;transition:background-color 160ms ease,border-color 160ms ease;:root[data-theme="dark"] &{color:#fafafa;}&:not([aria-disabled="true"]):hover{background:`,
|
|
5748
5748
|
`;}&[aria-disabled="true"]{cursor:not-allowed;opacity:0.55;}@media (max-width:608px){display:none;}`
|
|
5749
5749
|
], ({ theme }) => theme.colors.background.hover);
|
|
5750
5750
|
var OpenAccountButton = (0, import_styled_components3.default)(Button_default).withConfig({
|
|
5751
|
-
componentId: "sc-
|
|
5751
|
+
componentId: "sc-eabee95e-32"
|
|
5752
5752
|
})([
|
|
5753
5753
|
`width:120px;height:40px;min-height:40px;border-radius:6px;padding:0;box-shadow:0 1px 20px rgb(249 187 58 / 60%);font-family:var(--font-inter),sans-serif;font-size:14px;font-weight:600;line-height:22px;white-space:nowrap;&:hover{&::before{opacity:0.8;}}&::before{content:"";position:absolute;left:50%;bottom:0;margin-left:-49px;width:98px;height:22px;background:#ffe492;filter:blur(10px);pointer-events:none;opacity:0;transition:opacity 0.15s linear;}@media (max-width:767px){display:none;}`
|
|
5754
5754
|
]);
|
|
5755
5755
|
var MobileDrawerLoginButton = (0, import_styled_components3.default)(LoginLink).withConfig({
|
|
5756
|
-
componentId: "sc-
|
|
5756
|
+
componentId: "sc-eabee95e-33"
|
|
5757
5757
|
})([
|
|
5758
5758
|
`display:none;@media (max-width:767px){display:inline-flex;width:100%;min-width:0;padding-inline:12px;&:disabled{opacity:1;}}`
|
|
5759
5759
|
]);
|
|
5760
5760
|
var MobileDrawerOpenAccountButton = (0, import_styled_components3.default)(OpenAccountButton).withConfig({
|
|
5761
|
-
componentId: "sc-
|
|
5761
|
+
componentId: "sc-eabee95e-34"
|
|
5762
5762
|
})([
|
|
5763
5763
|
`display:none;@media (max-width:767px){display:flex;width:100%;min-width:0;}`
|
|
5764
5764
|
]);
|
|
@@ -7602,12 +7602,12 @@ function AboutRegistrationSection(props) {
|
|
|
7602
7602
|
}
|
|
7603
7603
|
|
|
7604
7604
|
// src/commodity-original/app/bang-phi-ky-quy/FeesAndMarginContent.tsx
|
|
7605
|
-
var
|
|
7605
|
+
var import_react21 = require("react");
|
|
7606
7606
|
var import_react_i18next4 = require("react-i18next");
|
|
7607
7607
|
|
|
7608
7608
|
// src/wikex/fees-table.tsx
|
|
7609
7609
|
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
7610
|
-
var
|
|
7610
|
+
var import_react20 = require("react");
|
|
7611
7611
|
var import_styled_components12 = __toESM(require("styled-components"));
|
|
7612
7612
|
var import_TextField2 = __toESM(require("@mui/material/TextField"));
|
|
7613
7613
|
var import_Dialog = __toESM(require("@mui/material/Dialog"));
|
|
@@ -7660,23 +7660,23 @@ function moveFeesItem(items, from, to) {
|
|
|
7660
7660
|
next.splice(to, 0, item);
|
|
7661
7661
|
return next;
|
|
7662
7662
|
}
|
|
7663
|
-
function
|
|
7664
|
-
if (!table.columns.some((column) => column.key ===
|
|
7665
|
-
|
|
7666
|
-
|
|
7667
|
-
|
|
7663
|
+
function setFeesColumnAlignment(table, columnKey, textAlign) {
|
|
7664
|
+
if (!table.columns.some((column) => column.key === columnKey)) return table;
|
|
7665
|
+
return {
|
|
7666
|
+
...table,
|
|
7667
|
+
columns: table.columns.map((column) => {
|
|
7668
|
+
if (column.key !== columnKey) return column;
|
|
7668
7669
|
const { textAlign: _previous, ...rest } = column;
|
|
7669
7670
|
return { ...rest, ...textAlign ? { textAlign } : {} };
|
|
7670
|
-
})
|
|
7671
|
-
|
|
7672
|
-
|
|
7673
|
-
|
|
7674
|
-
|
|
7675
|
-
|
|
7676
|
-
|
|
7677
|
-
|
|
7678
|
-
|
|
7679
|
-
}) };
|
|
7671
|
+
}),
|
|
7672
|
+
rows: table.rows.map((row) => {
|
|
7673
|
+
if (!row.cellAlignments || !Object.prototype.hasOwnProperty.call(row.cellAlignments, columnKey)) return row;
|
|
7674
|
+
const { cellAlignments, ...rest } = row;
|
|
7675
|
+
const alignments = { ...cellAlignments };
|
|
7676
|
+
delete alignments[columnKey];
|
|
7677
|
+
return { ...rest, ...Object.keys(alignments).length ? { cellAlignments: alignments } : {} };
|
|
7678
|
+
})
|
|
7679
|
+
};
|
|
7680
7680
|
}
|
|
7681
7681
|
function validateFeesTextAlign(value4) {
|
|
7682
7682
|
if (!FEES_TEXT_ALIGNS.includes(value4)) throw new Error("C\u0103n l\u1EC1 b\u1EA3ng ph\xED kh\xF4ng h\u1EE3p l\u1EC7. Ch\u1ECDn c\u0103n tr\xE1i, gi\u1EEFa ho\u1EB7c ph\u1EA3i.");
|
|
@@ -7897,7 +7897,7 @@ function FeesTypographyControls({ value: value4, onChange }) {
|
|
|
7897
7897
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_material.Stack, { direction: { xs: "column", sm: "row" }, gap: 1.5, justifyContent: "space-between", alignItems: { sm: "center" }, sx: { mb: 2 }, children: [
|
|
7898
7898
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_material.Box, { children: [
|
|
7899
7899
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_material.Typography, { variant: "subtitle2", children: "\u0110\u1ECBnh d\u1EA1ng ch\u1EEF" }),
|
|
7900
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_material.Typography, { variant: "caption", color: "text.secondary", children: "C\u1EE1 ch\u1EEF v\xE0 \u0111\u1ED9 \u0111\u1EADm \xE1p d\u1EE5ng cho to\xE0n b\u1EA3ng, theo ng\xF4n ng\u1EEF \u0111ang ch\u1ECDn. C\u0103n l\u1EC1 \u0111\
|
|
7900
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_material.Typography, { variant: "caption", color: "text.secondary", children: "C\u1EE1 ch\u1EEF v\xE0 \u0111\u1ED9 \u0111\u1EADm \xE1p d\u1EE5ng cho to\xE0n b\u1EA3ng, theo ng\xF4n ng\u1EEF \u0111ang ch\u1ECDn. Ch\u1ECDn c\u1ED9t trong m\u1EE5c C\u0103n l\u1EC1 theo c\u1ED9t \u0111\u1EC3 ch\u1EC9nh ti\xEAu \u0111\u1EC1 v\xE0 to\xE0n b\u1ED9 gi\xE1 tr\u1ECB c\u1EE7a c\u1ED9t." })
|
|
7901
7901
|
] }),
|
|
7902
7902
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_material.Stack, { direction: "row", gap: 1, flexShrink: 0, children: [
|
|
7903
7903
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_material.Button, { size: "small", variant: "outlined", onClick: () => onChange({ thead: { ...value4?.thead, fontSize: 14, fontWeight: 700 }, tbody: { ...value4?.tbody, fontSize: 14, fontWeight: 500 } }), children: "D\u1EC5 \u0111\u1ECDc" }),
|
|
@@ -7936,53 +7936,78 @@ function FeesTypographyControls({ value: value4, onChange }) {
|
|
|
7936
7936
|
] });
|
|
7937
7937
|
}
|
|
7938
7938
|
|
|
7939
|
-
// src/wikex/fees-
|
|
7939
|
+
// src/wikex/fees-column-alignment-controls.tsx
|
|
7940
|
+
var import_react18 = require("react");
|
|
7940
7941
|
var import_material2 = require("@mui/material");
|
|
7941
7942
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
7942
7943
|
var labels = { left: "C\u0103n tr\xE1i", center: "C\u0103n gi\u1EEFa", right: "C\u0103n ph\u1EA3i" };
|
|
7943
7944
|
var englishLabels = { left: "Align left", center: "Align center", right: "Align right" };
|
|
7944
|
-
function
|
|
7945
|
+
function FeesColumnAlignmentControls({ columns, columnKey, english, onSelectColumn, onChange }) {
|
|
7946
|
+
const root = (0, import_react18.useRef)(null);
|
|
7947
|
+
const column = columns.find((item) => item.key === columnKey);
|
|
7945
7948
|
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
7946
7949
|
import_material2.Stack,
|
|
7947
7950
|
{
|
|
7951
|
+
ref: root,
|
|
7948
7952
|
role: "group",
|
|
7949
|
-
"aria-label": english ? "
|
|
7950
|
-
direction: { xs: "column", sm: "row" },
|
|
7953
|
+
"aria-label": english ? "Column alignment" : "C\u0103n l\u1EC1 theo c\u1ED9t",
|
|
7951
7954
|
spacing: 1.5,
|
|
7952
|
-
alignItems: { sm: "center" },
|
|
7953
7955
|
sx: { my: 2, p: 1.5, border: "1px solid", borderColor: "divider", borderRadius: 1.5 },
|
|
7954
7956
|
children: [
|
|
7955
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.
|
|
7956
|
-
|
|
7957
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.
|
|
7958
|
-
|
|
7959
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_material2.Stack, { direction: "row", spacing: 0.5, flexWrap: "wrap", useFlexGap: true, children: [
|
|
7960
|
-
FEES_TEXT_ALIGNS.map((align) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
7961
|
-
import_material2.Button,
|
|
7962
|
-
{
|
|
7963
|
-
size: "small",
|
|
7964
|
-
disabled: !label,
|
|
7965
|
-
variant: value4 === align ? "contained" : "outlined",
|
|
7966
|
-
"aria-pressed": value4 === align,
|
|
7967
|
-
onMouseDown: (event) => event.preventDefault(),
|
|
7968
|
-
onClick: () => onChange(align),
|
|
7969
|
-
children: (english ? englishLabels : labels)[align]
|
|
7970
|
-
},
|
|
7971
|
-
align
|
|
7972
|
-
)),
|
|
7973
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
7974
|
-
import_material2.Button,
|
|
7957
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_material2.Typography, { variant: "subtitle2", children: english ? "Column alignment" : "C\u0103n l\u1EC1 theo c\u1ED9t" }),
|
|
7958
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_material2.Stack, { direction: { xs: "column", sm: "row" }, spacing: 1.5, alignItems: { sm: "center" }, children: [
|
|
7959
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
7960
|
+
import_material2.TextField,
|
|
7975
7961
|
{
|
|
7962
|
+
select: true,
|
|
7976
7963
|
size: "small",
|
|
7977
|
-
|
|
7978
|
-
|
|
7979
|
-
|
|
7980
|
-
|
|
7981
|
-
|
|
7982
|
-
|
|
7964
|
+
label: english ? "Column to align" : "C\u1ED9t c\u1EA7n c\u0103n l\u1EC1",
|
|
7965
|
+
value: column?.key ?? "",
|
|
7966
|
+
sx: { flex: 1, minWidth: 0 },
|
|
7967
|
+
slotProps: { inputLabel: { shrink: true }, select: {
|
|
7968
|
+
displayEmpty: true,
|
|
7969
|
+
SelectDisplayProps: { "aria-labelledby": void 0 },
|
|
7970
|
+
inputProps: { "aria-label": english ? "Column to align" : "C\u1ED9t c\u1EA7n c\u0103n l\u1EC1" },
|
|
7971
|
+
MenuProps: { container: () => root.current?.ownerDocument.body ?? document.body }
|
|
7972
|
+
} },
|
|
7973
|
+
onChange: (event) => onSelectColumn(event.target.value),
|
|
7974
|
+
children: [
|
|
7975
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_material2.MenuItem, { value: "", disabled: true, children: english ? "Select a column" : "Ch\u1ECDn c\u1ED9t" }),
|
|
7976
|
+
columns.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_material2.MenuItem, { value: item.key, children: [
|
|
7977
|
+
index + 1,
|
|
7978
|
+
". ",
|
|
7979
|
+
item.title || (english ? "Untitled column" : "C\u1ED9t ch\u01B0a c\xF3 ti\xEAu \u0111\u1EC1")
|
|
7980
|
+
] }, item.key))
|
|
7981
|
+
]
|
|
7983
7982
|
}
|
|
7984
|
-
)
|
|
7985
|
-
|
|
7983
|
+
),
|
|
7984
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_material2.Stack, { direction: "row", spacing: 0.5, flexWrap: "wrap", useFlexGap: true, children: [
|
|
7985
|
+
FEES_TEXT_ALIGNS.map((align) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
7986
|
+
import_material2.Button,
|
|
7987
|
+
{
|
|
7988
|
+
size: "small",
|
|
7989
|
+
disabled: !column,
|
|
7990
|
+
variant: column?.textAlign === align ? "contained" : "outlined",
|
|
7991
|
+
"aria-pressed": column?.textAlign === align,
|
|
7992
|
+
onClick: () => onChange(align),
|
|
7993
|
+
children: (english ? englishLabels : labels)[align]
|
|
7994
|
+
},
|
|
7995
|
+
align
|
|
7996
|
+
)),
|
|
7997
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
7998
|
+
import_material2.Button,
|
|
7999
|
+
{
|
|
8000
|
+
size: "small",
|
|
8001
|
+
color: "inherit",
|
|
8002
|
+
disabled: !column,
|
|
8003
|
+
"aria-label": english ? "Reset selected column alignment" : "C\u0103n l\u1EC1 m\u1EB7c \u0111\u1ECBnh cho c\u1ED9t \u0111ang ch\u1ECDn",
|
|
8004
|
+
onClick: () => onChange(void 0),
|
|
8005
|
+
children: english ? "Default" : "M\u1EB7c \u0111\u1ECBnh"
|
|
8006
|
+
}
|
|
8007
|
+
)
|
|
8008
|
+
] })
|
|
8009
|
+
] }),
|
|
8010
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_material2.Typography, { variant: "caption", color: "text.secondary", children: english ? "Applies to the header and all values in the selected column, including filtered rows and other pages." : "\xC1p d\u1EE5ng cho ti\xEAu \u0111\u1EC1 v\xE0 to\xE0n b\u1ED9 gi\xE1 tr\u1ECB c\u1EE7a c\u1ED9t \u0111\xE3 ch\u1ECDn, k\u1EC3 c\u1EA3 c\xE1c d\xF2ng \u0111ang l\u1ECDc v\xE0 \u1EDF trang kh\xE1c." })
|
|
7986
8011
|
]
|
|
7987
8012
|
}
|
|
7988
8013
|
);
|
|
@@ -8131,7 +8156,7 @@ var appTheme = {
|
|
|
8131
8156
|
};
|
|
8132
8157
|
|
|
8133
8158
|
// src/commodity-original/components/Table/index.tsx
|
|
8134
|
-
var
|
|
8159
|
+
var import_react19 = require("react");
|
|
8135
8160
|
|
|
8136
8161
|
// src/commodity-original/components/Table/style.ts
|
|
8137
8162
|
var import_styled_components7 = __toESM(require("styled-components"));
|
|
@@ -8366,7 +8391,7 @@ function Table({
|
|
|
8366
8391
|
const recordKey = getRowKey(record);
|
|
8367
8392
|
const selectionProps = rowSelection?.getCheckboxProps?.(record);
|
|
8368
8393
|
const isExpanded = expandedRowKeySet.has(recordKey);
|
|
8369
|
-
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
8394
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react19.Fragment, { children: [
|
|
8370
8395
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(TableRow, { "data-row-key": recordKey, children: [
|
|
8371
8396
|
rowSelection ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
8372
8397
|
TableSelectionInput,
|
|
@@ -8747,32 +8772,32 @@ var feesTheme = {
|
|
|
8747
8772
|
]))
|
|
8748
8773
|
};
|
|
8749
8774
|
var EditorActions = import_styled_components12.default.div.withConfig({
|
|
8750
|
-
componentId: "sc-
|
|
8775
|
+
componentId: "sc-a4d52175-0"
|
|
8751
8776
|
})([
|
|
8752
8777
|
`display:flex;flex-wrap:wrap;gap:8px;margin-top:16px;`
|
|
8753
8778
|
]);
|
|
8754
8779
|
var EditGroup = import_styled_components12.default.div.withConfig({
|
|
8755
|
-
componentId: "sc-
|
|
8780
|
+
componentId: "sc-a4d52175-1"
|
|
8756
8781
|
})([
|
|
8757
8782
|
`display:flex;flex-direction:column;gap:6px;`
|
|
8758
8783
|
]);
|
|
8759
8784
|
var HeaderGroup = (0, import_styled_components12.default)(EditGroup).withConfig({
|
|
8760
|
-
componentId: "sc-
|
|
8785
|
+
componentId: "sc-a4d52175-2"
|
|
8761
8786
|
})([
|
|
8762
8787
|
`gap:8px;`
|
|
8763
8788
|
]);
|
|
8764
8789
|
var HeaderTitle = import_styled_components12.default.div.withConfig({
|
|
8765
|
-
componentId: "sc-
|
|
8790
|
+
componentId: "sc-a4d52175-3"
|
|
8766
8791
|
})([
|
|
8767
8792
|
`display:flex;align-items:flex-start;min-height:var(--fees-header-title-height,36px);`
|
|
8768
8793
|
]);
|
|
8769
8794
|
var HeaderActions = import_styled_components12.default.div.withConfig({
|
|
8770
|
-
componentId: "sc-
|
|
8795
|
+
componentId: "sc-a4d52175-4"
|
|
8771
8796
|
})([
|
|
8772
8797
|
`display:flex;align-items:center;min-height:24px;`
|
|
8773
8798
|
]);
|
|
8774
8799
|
var AlignedFeesTable = (0, import_styled_components12.default)(FeesAndMarginTable).withConfig({
|
|
8775
|
-
componentId: "sc-
|
|
8800
|
+
componentId: "sc-a4d52175-5"
|
|
8776
8801
|
})([
|
|
8777
8802
|
`&[data-editable] th{vertical-align:top;}--fees-row-background:`,
|
|
8778
8803
|
`;--fees-stripe-background:`,
|
|
@@ -8805,14 +8830,14 @@ var AlignedFeesTable = (0, import_styled_components12.default)(FeesAndMarginTabl
|
|
|
8805
8830
|
}
|
|
8806
8831
|
`).join(""), ({ $typography }) => $typography?.thead?.fontSize ?? 8, ({ $typography }) => $typography?.thead?.fontSize ? 1.4 : "10px", ({ $typography }) => $typography?.tbody?.fontSize ?? 10, ({ $typography }) => $typography?.tbody?.fontSize ? 1.4 : "14px", ({ theme }) => theme.colors.accent.primary);
|
|
8807
8832
|
var FeesCellContent = import_styled_components12.default.span.withConfig({
|
|
8808
|
-
componentId: "sc-
|
|
8833
|
+
componentId: "sc-a4d52175-6"
|
|
8809
8834
|
})([
|
|
8810
8835
|
`display:block;text-align:`,
|
|
8811
8836
|
`;@media (max-width:767px){text-align:`,
|
|
8812
8837
|
`;}`
|
|
8813
8838
|
], ({ $align, $alignRight }) => $align ?? ($alignRight ? "right" : "left"), ({ $align }) => $align ?? "left");
|
|
8814
8839
|
var EditorButton = import_styled_components12.default.button.withConfig({
|
|
8815
|
-
componentId: "sc-
|
|
8840
|
+
componentId: "sc-a4d52175-7"
|
|
8816
8841
|
})([
|
|
8817
8842
|
`padding:7px 12px;border:1px solid `,
|
|
8818
8843
|
`;border-radius:6px;background:`,
|
|
@@ -8821,17 +8846,17 @@ var EditorButton = import_styled_components12.default.button.withConfig({
|
|
|
8821
8846
|
`;}&:disabled{cursor:default;opacity:.4;}`
|
|
8822
8847
|
], ({ theme }) => theme.colors.border.line, ({ theme }) => theme.colors.background.input, ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.accent.primary);
|
|
8823
8848
|
var OrderActions = import_styled_components12.default.div.withConfig({
|
|
8824
|
-
componentId: "sc-
|
|
8849
|
+
componentId: "sc-a4d52175-8"
|
|
8825
8850
|
})([
|
|
8826
8851
|
`display:flex;gap:6px;align-items:center;flex-wrap:wrap;`
|
|
8827
8852
|
]);
|
|
8828
8853
|
var PositionLabel = import_styled_components12.default.label.withConfig({
|
|
8829
|
-
componentId: "sc-
|
|
8854
|
+
componentId: "sc-a4d52175-9"
|
|
8830
8855
|
})([
|
|
8831
8856
|
`display:inline-flex;align-items:center;gap:6px;font-size:12px;`
|
|
8832
8857
|
]);
|
|
8833
8858
|
var PositionInput = import_styled_components12.default.input.withConfig({
|
|
8834
|
-
componentId: "sc-
|
|
8859
|
+
componentId: "sc-a4d52175-10"
|
|
8835
8860
|
})([
|
|
8836
8861
|
`width:56px;padding:5px;border:1px solid `,
|
|
8837
8862
|
`;border-radius:4px;background:`,
|
|
@@ -8840,17 +8865,17 @@ var PositionInput = import_styled_components12.default.input.withConfig({
|
|
|
8840
8865
|
`;}`
|
|
8841
8866
|
], ({ theme }) => theme.colors.border.line, ({ theme }) => theme.colors.background.input, ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.accent.primary);
|
|
8842
8867
|
var ColumnRow = import_styled_components12.default.div.withConfig({
|
|
8843
|
-
componentId: "sc-
|
|
8868
|
+
componentId: "sc-a4d52175-11"
|
|
8844
8869
|
})([
|
|
8845
8870
|
`display:flex;gap:12px;align-items:center;margin:16px 0;> textarea{flex:1;min-width:120px;}@media (max-width:600px){align-items:stretch;flex-direction:column;}`
|
|
8846
8871
|
]);
|
|
8847
8872
|
var PaginationControls = (0, import_styled_components12.default)(FeesAndMarginPagination).withConfig({
|
|
8848
|
-
componentId: "sc-
|
|
8873
|
+
componentId: "sc-a4d52175-12"
|
|
8849
8874
|
})([
|
|
8850
8875
|
`align-items:center;flex-wrap:wrap;gap:16px 24px;`
|
|
8851
8876
|
]);
|
|
8852
8877
|
var PageSizeLabel = import_styled_components12.default.div.withConfig({
|
|
8853
|
-
componentId: "sc-
|
|
8878
|
+
componentId: "sc-a4d52175-13"
|
|
8854
8879
|
})([
|
|
8855
8880
|
`display:inline-flex;align-items:center;gap:8px;color:`,
|
|
8856
8881
|
`;font:inherit;font-size:13px;`
|
|
@@ -8878,20 +8903,20 @@ function Position({ value: value4, max, label, onMove }) {
|
|
|
8878
8903
|
});
|
|
8879
8904
|
}
|
|
8880
8905
|
var DeleteButton = (0, import_styled_components12.default)(EditorButton).withConfig({
|
|
8881
|
-
componentId: "sc-
|
|
8906
|
+
componentId: "sc-a4d52175-14"
|
|
8882
8907
|
})([
|
|
8883
8908
|
`align-self:flex-start;padding:4px 8px;border:0;border-radius:4px;background:#d32f2f;color:#fff;font-size:11px;font-weight:600;line-height:16px;white-space:nowrap;text-decoration:none;&:hover{background:#b71c1c;}&:focus-visible{outline:2px solid #d32f2f;outline-offset:2px;}`
|
|
8884
8909
|
]);
|
|
8885
8910
|
var CellEditorInput = import_styled_components12.default.textarea.withConfig({
|
|
8886
|
-
componentId: "sc-
|
|
8911
|
+
componentId: "sc-a4d52175-15"
|
|
8887
8912
|
})([
|
|
8888
8913
|
`display:block;box-sizing:border-box;width:100%;min-width:0;padding:3px;border:1px solid transparent;border-radius:3px;color:inherit;background:transparent;font:inherit;line-height:inherit;text-align:inherit;resize:none;overflow:hidden;&:hover{border-color:`,
|
|
8889
8914
|
`;}&:focus{outline:1px solid `,
|
|
8890
|
-
`;}&[data-fees-
|
|
8915
|
+
`;}&[data-fees-column-selected="true"]{border-color:`,
|
|
8891
8916
|
`;}`
|
|
8892
8917
|
], ({ theme }) => theme.colors.border.line, ({ theme }) => theme.colors.accent.primary, ({ theme }) => theme.colors.accent.primary);
|
|
8893
8918
|
function CellEditor({ onInput, ...props }) {
|
|
8894
|
-
const ref = (0,
|
|
8919
|
+
const ref = (0, import_react20.useRef)(null);
|
|
8895
8920
|
const fit = () => {
|
|
8896
8921
|
const element = ref.current;
|
|
8897
8922
|
if (!element) return;
|
|
@@ -8900,8 +8925,8 @@ function CellEditor({ onInput, ...props }) {
|
|
|
8900
8925
|
const border = parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth);
|
|
8901
8926
|
element.style.height = `${element.scrollHeight + border}px`;
|
|
8902
8927
|
};
|
|
8903
|
-
(0,
|
|
8904
|
-
(0,
|
|
8928
|
+
(0, import_react20.useLayoutEffect)(fit);
|
|
8929
|
+
(0, import_react20.useLayoutEffect)(() => {
|
|
8905
8930
|
const element = ref.current;
|
|
8906
8931
|
if (!element) return;
|
|
8907
8932
|
let width = element.getBoundingClientRect().width;
|
|
@@ -8933,7 +8958,7 @@ function CellEditor({ onInput, ...props }) {
|
|
|
8933
8958
|
});
|
|
8934
8959
|
}
|
|
8935
8960
|
function RowTagSelect({ selected, options, onChange }) {
|
|
8936
|
-
const selectRoot = (0,
|
|
8961
|
+
const selectRoot = (0, import_react20.useRef)(null);
|
|
8937
8962
|
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(EditGroup, {
|
|
8938
8963
|
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", {
|
|
8939
8964
|
ref: selectRoot,
|
|
@@ -9020,17 +9045,17 @@ var rightAlignedColumns = /* @__PURE__ */ new Set([
|
|
|
9020
9045
|
"unit"
|
|
9021
9046
|
]);
|
|
9022
9047
|
function FeesTable({ value: value4, editable = false, onChange, labels: labels2, size = "md", tagOrder = [], language = "vi" }) {
|
|
9023
|
-
const [search, setSearch] = (0,
|
|
9024
|
-
const [tag, setTag] = (0,
|
|
9025
|
-
const [page, setPage] = (0,
|
|
9026
|
-
const [pageSize, setPageSize] = (0,
|
|
9027
|
-
const [columnsOpen, setColumnsOpen] = (0,
|
|
9028
|
-
const [typographyOpen, setTypographyOpen] = (0,
|
|
9029
|
-
const [
|
|
9048
|
+
const [search, setSearch] = (0, import_react20.useState)("");
|
|
9049
|
+
const [tag, setTag] = (0, import_react20.useState)("");
|
|
9050
|
+
const [page, setPage] = (0, import_react20.useState)(1);
|
|
9051
|
+
const [pageSize, setPageSize] = (0, import_react20.useState)(FEES_PAGE_SIZE);
|
|
9052
|
+
const [columnsOpen, setColumnsOpen] = (0, import_react20.useState)(false);
|
|
9053
|
+
const [typographyOpen, setTypographyOpen] = (0, import_react20.useState)(false);
|
|
9054
|
+
const [selectedColumnKey, setSelectedColumnKey] = (0, import_react20.useState)("");
|
|
9030
9055
|
const english = language === "en";
|
|
9031
9056
|
const canEdit = editable && Boolean(onChange);
|
|
9032
|
-
const tableRoot = (0,
|
|
9033
|
-
(0,
|
|
9057
|
+
const tableRoot = (0, import_react20.useRef)(null);
|
|
9058
|
+
(0, import_react20.useLayoutEffect)(() => {
|
|
9034
9059
|
const root = tableRoot.current;
|
|
9035
9060
|
if (!root || !canEdit) return;
|
|
9036
9061
|
const editors = [
|
|
@@ -9048,11 +9073,11 @@ function FeesTable({ value: value4, editable = false, onChange, labels: labels2,
|
|
|
9048
9073
|
canEdit,
|
|
9049
9074
|
value4.columns
|
|
9050
9075
|
]);
|
|
9051
|
-
const dialogId = (0,
|
|
9076
|
+
const dialogId = (0, import_react20.useId)();
|
|
9052
9077
|
const mobileFontScale = Math.max(1, (value4.typography?.thead?.fontSize ?? 8) / 8, (value4.typography?.tbody?.fontSize ?? 10) / 10);
|
|
9053
|
-
const [createTagOpen, setCreateTagOpen] = (0,
|
|
9054
|
-
const [tagDraft, setTagDraft] = (0,
|
|
9055
|
-
const [deleteTarget, setDeleteTarget] = (0,
|
|
9078
|
+
const [createTagOpen, setCreateTagOpen] = (0, import_react20.useState)(false);
|
|
9079
|
+
const [tagDraft, setTagDraft] = (0, import_react20.useState)("");
|
|
9080
|
+
const [deleteTarget, setDeleteTarget] = (0, import_react20.useState)(null);
|
|
9056
9081
|
const confirmDelete = () => {
|
|
9057
9082
|
if (!deleteTarget || !canEdit) return;
|
|
9058
9083
|
if (deleteTarget.kind === "row") {
|
|
@@ -9107,16 +9132,12 @@ function FeesTable({ value: value4, editable = false, onChange, labels: labels2,
|
|
|
9107
9132
|
const filtered = filterFeesRows(value4, search, activeTag);
|
|
9108
9133
|
const displayedRows = canEdit ? filtered : sortFeesRowsByName(filtered, language);
|
|
9109
9134
|
const pagination = paginateFeesRows(displayedRows, page, pageSize);
|
|
9110
|
-
const selectedColumn =
|
|
9111
|
-
|
|
9112
|
-
|
|
9113
|
-
const selectedAlign = selectedTarget?.part === "thead" ? selectedColumn?.textAlign : selectedRow?.cellAlignments?.[selectedTarget?.columnKey ?? ""];
|
|
9114
|
-
const selectedLabel = selectedTarget ? selectedTarget.part === "thead" ? `${english ? "Header" : "Ti\xEAu \u0111\u1EC1"}: ${selectedColumn?.title}` : `${selectedColumn?.title} \u2014 ${selectedRow?.cells.name || (english ? "New row" : "H\xE0ng m\u1EDBi")}` : void 0;
|
|
9115
|
-
(0, import_react19.useLayoutEffect)(() => {
|
|
9116
|
-
if (selectedCell && !selectedTarget) setSelectedCell(null);
|
|
9135
|
+
const selectedColumn = value4.columns.find((column) => column.key === selectedColumnKey);
|
|
9136
|
+
(0, import_react20.useLayoutEffect)(() => {
|
|
9137
|
+
if (selectedColumnKey && !selectedColumn) setSelectedColumnKey("");
|
|
9117
9138
|
}, [
|
|
9118
|
-
|
|
9119
|
-
|
|
9139
|
+
selectedColumnKey,
|
|
9140
|
+
selectedColumn
|
|
9120
9141
|
]);
|
|
9121
9142
|
const moveColumn = (from, to) => onChange?.({
|
|
9122
9143
|
...value4,
|
|
@@ -9173,11 +9194,7 @@ function FeesTable({ value: value4, editable = false, onChange, labels: labels2,
|
|
|
9173
9194
|
style: {
|
|
9174
9195
|
textAlign: column.textAlign ?? value4.typography?.thead?.textAlign ?? "left"
|
|
9175
9196
|
},
|
|
9176
|
-
"data-fees-
|
|
9177
|
-
onFocus: () => setSelectedCell({
|
|
9178
|
-
part: "thead",
|
|
9179
|
-
columnKey: column.key
|
|
9180
|
-
}),
|
|
9197
|
+
"data-fees-column-selected": selectedColumnKey === column.key,
|
|
9181
9198
|
onChange: (event) => onChange?.({
|
|
9182
9199
|
...value4,
|
|
9183
9200
|
columns: value4.columns.map((item) => item.key === column.key ? {
|
|
@@ -9211,14 +9228,9 @@ function FeesTable({ value: value4, editable = false, onChange, labels: labels2,
|
|
|
9211
9228
|
value: row.cells[column.key] ?? "",
|
|
9212
9229
|
"aria-label": `${column.title} \u2014 ${row.cells.name || "H\xE0ng m\u1EDBi"}`,
|
|
9213
9230
|
style: {
|
|
9214
|
-
textAlign: row.cellAlignments?.[column.key] ?? value4.typography?.tbody?.textAlign ?? "left"
|
|
9231
|
+
textAlign: column.textAlign ?? row.cellAlignments?.[column.key] ?? value4.typography?.tbody?.textAlign ?? "left"
|
|
9215
9232
|
},
|
|
9216
|
-
"data-fees-
|
|
9217
|
-
onFocus: () => setSelectedCell({
|
|
9218
|
-
part: "tbody",
|
|
9219
|
-
rowId: row.id,
|
|
9220
|
-
columnKey: column.key
|
|
9221
|
-
}),
|
|
9233
|
+
"data-fees-column-selected": selectedColumnKey === column.key,
|
|
9222
9234
|
onChange: (event) => changeRow(row.id, {
|
|
9223
9235
|
cells: {
|
|
9224
9236
|
...row.cells,
|
|
@@ -9226,7 +9238,7 @@ function FeesTable({ value: value4, editable = false, onChange, labels: labels2,
|
|
|
9226
9238
|
}
|
|
9227
9239
|
})
|
|
9228
9240
|
}) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(FeesCellContent, {
|
|
9229
|
-
$align: row.cellAlignments?.[column.key] ?? value4.typography?.tbody?.textAlign,
|
|
9241
|
+
$align: column.textAlign ?? row.cellAlignments?.[column.key] ?? value4.typography?.tbody?.textAlign,
|
|
9230
9242
|
$alignRight: rightAlignedColumns.has(column.key),
|
|
9231
9243
|
children: row.cells[column.key] ?? ""
|
|
9232
9244
|
})
|
|
@@ -9429,12 +9441,13 @@ function FeesTable({ value: value4, editable = false, onChange, labels: labels2,
|
|
|
9429
9441
|
})
|
|
9430
9442
|
})
|
|
9431
9443
|
}),
|
|
9432
|
-
canEdit && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
9433
|
-
|
|
9434
|
-
|
|
9444
|
+
canEdit && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(FeesColumnAlignmentControls, {
|
|
9445
|
+
columns: value4.columns,
|
|
9446
|
+
columnKey: selectedColumnKey,
|
|
9435
9447
|
english,
|
|
9448
|
+
onSelectColumn: setSelectedColumnKey,
|
|
9436
9449
|
onChange: (textAlign) => {
|
|
9437
|
-
if (
|
|
9450
|
+
if (selectedColumn) onChange?.(setFeesColumnAlignment(value4, selectedColumn.key, textAlign));
|
|
9438
9451
|
}
|
|
9439
9452
|
}),
|
|
9440
9453
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(AlignedFeesTable, {
|
|
@@ -9721,7 +9734,7 @@ var monthCodes = [
|
|
|
9721
9734
|
function FeesAndMarginContent({ content, editable, onChange, readOnlyFields }) {
|
|
9722
9735
|
const { t } = (0, import_react_i18next4.useTranslation)();
|
|
9723
9736
|
const { isMobile } = useResponsive();
|
|
9724
|
-
const [activeMonth] = (0,
|
|
9737
|
+
const [activeMonth] = (0, import_react21.useState)(0);
|
|
9725
9738
|
const field = `${content.__cmsLanguage === "en" ? "en" : "vi"}.feesTable`;
|
|
9726
9739
|
const data = parseFeesTable(content[field], defaultFeesTable((key) => String(t(key))));
|
|
9727
9740
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(FeesAndMarginMain, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(FeesAndMarginPageContent, { children: [
|
|
@@ -10258,7 +10271,7 @@ function ComplaintPolicyPage() {
|
|
|
10258
10271
|
}
|
|
10259
10272
|
|
|
10260
10273
|
// src/commodity-original/app/noti-mxv/NotiMxvContent.tsx
|
|
10261
|
-
var
|
|
10274
|
+
var import_react23 = require("react");
|
|
10262
10275
|
var import_react_i18next9 = require("react-i18next");
|
|
10263
10276
|
|
|
10264
10277
|
// src/commodity-original/components/BlogCard/style.ts
|
|
@@ -10476,7 +10489,7 @@ function InformationHeroSection({
|
|
|
10476
10489
|
var import_styled_components19 = __toESM(require("styled-components"));
|
|
10477
10490
|
|
|
10478
10491
|
// src/commodity-original/components/DateRangePicker/index.tsx
|
|
10479
|
-
var
|
|
10492
|
+
var import_react22 = require("react");
|
|
10480
10493
|
var import_react_i18next8 = require("react-i18next");
|
|
10481
10494
|
var import_radix_ui3 = require("radix-ui");
|
|
10482
10495
|
|
|
@@ -10715,11 +10728,11 @@ function DateRangePicker({
|
|
|
10715
10728
|
}) {
|
|
10716
10729
|
const { i18n, t } = (0, import_react_i18next8.useTranslation)();
|
|
10717
10730
|
const { isMobile } = useResponsive();
|
|
10718
|
-
const rootRef = (0,
|
|
10719
|
-
const [open, setOpen] = (0,
|
|
10720
|
-
const [activeField, setActiveField] = (0,
|
|
10721
|
-
const [draft, setDraft] = (0,
|
|
10722
|
-
const [month, setMonth] = (0,
|
|
10731
|
+
const rootRef = (0, import_react22.useRef)(null);
|
|
10732
|
+
const [open, setOpen] = (0, import_react22.useState)(false);
|
|
10733
|
+
const [activeField, setActiveField] = (0, import_react22.useState)("from");
|
|
10734
|
+
const [draft, setDraft] = (0, import_react22.useState)(value4);
|
|
10735
|
+
const [month, setMonth] = (0, import_react22.useState)(() => getInitialMonth(value4));
|
|
10723
10736
|
const locale = i18n.resolvedLanguage?.startsWith("en") ? "en-US" : "vi-VN";
|
|
10724
10737
|
const format = (date) => date ? new Intl.DateTimeFormat(locale, {
|
|
10725
10738
|
day: "2-digit",
|
|
@@ -10728,7 +10741,7 @@ function DateRangePicker({
|
|
|
10728
10741
|
}).format(toDate(date)) : "";
|
|
10729
10742
|
const from = fromLabel ?? t("dateRangePicker.fromLabel");
|
|
10730
10743
|
const to = toLabel ?? t("dateRangePicker.toLabel");
|
|
10731
|
-
const calendarDays = (0,
|
|
10744
|
+
const calendarDays = (0, import_react22.useMemo)(() => getMonthDays(month), [month]);
|
|
10732
10745
|
const duration = getDays(draft);
|
|
10733
10746
|
const weekdays = [
|
|
10734
10747
|
"monday",
|
|
@@ -10739,7 +10752,7 @@ function DateRangePicker({
|
|
|
10739
10752
|
"saturday",
|
|
10740
10753
|
"sunday"
|
|
10741
10754
|
];
|
|
10742
|
-
(0,
|
|
10755
|
+
(0, import_react22.useEffect)(() => {
|
|
10743
10756
|
if (!open || isMobile) return;
|
|
10744
10757
|
const outside = (event) => {
|
|
10745
10758
|
if (!rootRef.current?.contains(event.target)) {
|
|
@@ -11091,12 +11104,12 @@ function NotiMxvContent() {
|
|
|
11091
11104
|
const { isMobile } = useResponsive();
|
|
11092
11105
|
const { t } = (0, import_react_i18next9.useTranslation)();
|
|
11093
11106
|
const resolveImage = useCmsImageResolver();
|
|
11094
|
-
const [search, setSearch] = (0,
|
|
11095
|
-
const [dateRange, setDateRange] = (0,
|
|
11107
|
+
const [search, setSearch] = (0, import_react23.useState)("");
|
|
11108
|
+
const [dateRange, setDateRange] = (0, import_react23.useState)({
|
|
11096
11109
|
from: "",
|
|
11097
11110
|
to: ""
|
|
11098
11111
|
});
|
|
11099
|
-
const [page, setPage] = (0,
|
|
11112
|
+
const [page, setPage] = (0, import_react23.useState)(1);
|
|
11100
11113
|
const pageCount = Math.ceil(notifications.length / notificationsPerPage);
|
|
11101
11114
|
const visibleNotifications = notifications.slice(
|
|
11102
11115
|
(page - 1) * notificationsPerPage,
|
|
@@ -11175,7 +11188,7 @@ function NotiMxvContent() {
|
|
|
11175
11188
|
}
|
|
11176
11189
|
|
|
11177
11190
|
// src/commodity-original/app/products/ProductsContent.tsx
|
|
11178
|
-
var
|
|
11191
|
+
var import_react24 = require("react");
|
|
11179
11192
|
|
|
11180
11193
|
// src/commodity-original/components/Breadcrumb/index.tsx
|
|
11181
11194
|
var import_link3 = __toESM(require("next/link.js"));
|
|
@@ -11606,7 +11619,7 @@ var productsPerPage = 8;
|
|
|
11606
11619
|
function ProductsContent() {
|
|
11607
11620
|
const { t } = (0, import_react_i18next10.useTranslation)();
|
|
11608
11621
|
const resolveImage = useCmsImageResolver();
|
|
11609
|
-
const [page, setPage] = (0,
|
|
11622
|
+
const [page, setPage] = (0, import_react24.useState)(1);
|
|
11610
11623
|
const title = t("landing.commodities.groups.0.title");
|
|
11611
11624
|
const pageCount = Math.max(1, Math.ceil(products2.length / productsPerPage));
|
|
11612
11625
|
const visibleProducts = products2.slice(
|
|
@@ -12156,7 +12169,7 @@ function getProductBySlug(slug) {
|
|
|
12156
12169
|
}
|
|
12157
12170
|
|
|
12158
12171
|
// src/commodity-original/app/thong-tin-wikex/FeaturedArticles.tsx
|
|
12159
|
-
var
|
|
12172
|
+
var import_react25 = require("react");
|
|
12160
12173
|
var import_react_i18next12 = require("react-i18next");
|
|
12161
12174
|
|
|
12162
12175
|
// src/commodity-original/app/thong-tin-wikex/data.ts
|
|
@@ -12320,7 +12333,7 @@ function FeaturedArticles() {
|
|
|
12320
12333
|
const { t } = (0, import_react_i18next12.useTranslation)();
|
|
12321
12334
|
const { isMobile } = useResponsive();
|
|
12322
12335
|
const resolveImage = useCmsImageResolver();
|
|
12323
|
-
const [activeSlide, setActiveSlide] = (0,
|
|
12336
|
+
const [activeSlide, setActiveSlide] = (0, import_react25.useState)(0);
|
|
12324
12337
|
const moveSlide = (step) => {
|
|
12325
12338
|
setActiveSlide(
|
|
12326
12339
|
(current) => (current + step + featuredArticles.length) % featuredArticles.length
|
|
@@ -12411,7 +12424,7 @@ function FeaturedArticles() {
|
|
|
12411
12424
|
|
|
12412
12425
|
// src/commodity-original/app/thong-tin-wikex/WikexInformationSections.tsx
|
|
12413
12426
|
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
12414
|
-
var
|
|
12427
|
+
var import_react26 = require("react");
|
|
12415
12428
|
var import_react_i18next13 = require("react-i18next");
|
|
12416
12429
|
var import_styled_components26 = __toESM(require("styled-components"));
|
|
12417
12430
|
|
|
@@ -12504,18 +12517,18 @@ function WikexInformationArticlesSection() {
|
|
|
12504
12517
|
const { isMobile } = useResponsive();
|
|
12505
12518
|
const { t } = (0, import_react_i18next13.useTranslation)();
|
|
12506
12519
|
const resolveImage = useCmsImageResolver();
|
|
12507
|
-
const [activeCategory, setActiveCategory] = (0,
|
|
12508
|
-
const [dateRange, setDateRange] = (0,
|
|
12520
|
+
const [activeCategory, setActiveCategory] = (0, import_react26.useState)("latest");
|
|
12521
|
+
const [dateRange, setDateRange] = (0, import_react26.useState)({
|
|
12509
12522
|
from: "",
|
|
12510
12523
|
to: ""
|
|
12511
12524
|
});
|
|
12512
|
-
const [page, setPage] = (0,
|
|
12513
|
-
const [search, setSearch] = (0,
|
|
12525
|
+
const [page, setPage] = (0, import_react26.useState)(1);
|
|
12526
|
+
const [search, setSearch] = (0, import_react26.useState)("");
|
|
12514
12527
|
const tabs = articleCategories.map((category) => ({
|
|
12515
12528
|
id: category,
|
|
12516
12529
|
label: t(`wikexInformation.tabs.${category}`)
|
|
12517
12530
|
}));
|
|
12518
|
-
const filteredArticles = (0,
|
|
12531
|
+
const filteredArticles = (0, import_react26.useMemo)(() => {
|
|
12519
12532
|
const normalizedSearch = search.trim().toLocaleLowerCase();
|
|
12520
12533
|
return articles.filter((article) => {
|
|
12521
12534
|
const matchesCategory = activeCategory === "latest" || article.category === activeCategory;
|
|
@@ -12662,7 +12675,7 @@ var import_react_i18next14 = require("react-i18next");
|
|
|
12662
12675
|
|
|
12663
12676
|
// src/commodity-original/lib/app-theme-provider.tsx
|
|
12664
12677
|
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
12665
|
-
var
|
|
12678
|
+
var import_react27 = require("react");
|
|
12666
12679
|
var import_styled_components28 = require("styled-components");
|
|
12667
12680
|
|
|
12668
12681
|
// src/commodity-original/app/global-styles.tsx
|
|
@@ -12763,7 +12776,7 @@ function getPreviewThemeStore(targetDocument) {
|
|
|
12763
12776
|
}
|
|
12764
12777
|
return store;
|
|
12765
12778
|
}
|
|
12766
|
-
var AppThemeContext = /* @__PURE__ */ (0,
|
|
12779
|
+
var AppThemeContext = /* @__PURE__ */ (0, import_react27.createContext)(null);
|
|
12767
12780
|
function isThemeName(value4) {
|
|
12768
12781
|
return value4 === "light" || value4 === "dark";
|
|
12769
12782
|
}
|
|
@@ -12801,15 +12814,15 @@ function subscribeToTheme(onStoreChange) {
|
|
|
12801
12814
|
};
|
|
12802
12815
|
}
|
|
12803
12816
|
function AppThemeProvider({ children }) {
|
|
12804
|
-
const rootRef = (0,
|
|
12805
|
-
const getTargetDocument = (0,
|
|
12806
|
-
const getSnapshot = (0,
|
|
12817
|
+
const rootRef = (0, import_react27.useRef)(null);
|
|
12818
|
+
const getTargetDocument = (0, import_react27.useCallback)(() => rootRef.current?.ownerDocument ?? document, []);
|
|
12819
|
+
const getSnapshot = (0, import_react27.useCallback)(() => {
|
|
12807
12820
|
const targetDocument = getTargetDocument();
|
|
12808
12821
|
return targetDocument === document ? getThemeSnapshot() : getPreviewThemeStore(targetDocument).themeName;
|
|
12809
12822
|
}, [
|
|
12810
12823
|
getTargetDocument
|
|
12811
12824
|
]);
|
|
12812
|
-
const subscribe = (0,
|
|
12825
|
+
const subscribe = (0, import_react27.useCallback)((onStoreChange) => {
|
|
12813
12826
|
const targetDocument = getTargetDocument();
|
|
12814
12827
|
if (targetDocument === document) return subscribeToTheme(onStoreChange);
|
|
12815
12828
|
const store = getPreviewThemeStore(targetDocument);
|
|
@@ -12820,15 +12833,15 @@ function AppThemeProvider({ children }) {
|
|
|
12820
12833
|
}, [
|
|
12821
12834
|
getTargetDocument
|
|
12822
12835
|
]);
|
|
12823
|
-
const themeName = (0,
|
|
12824
|
-
(0,
|
|
12836
|
+
const themeName = (0, import_react27.useSyncExternalStore)(subscribe, getSnapshot, getServerThemeSnapshot);
|
|
12837
|
+
(0, import_react27.useLayoutEffect)(() => {
|
|
12825
12838
|
applyTheme(getSnapshot(), getTargetDocument());
|
|
12826
12839
|
}, [
|
|
12827
12840
|
themeName,
|
|
12828
12841
|
getSnapshot,
|
|
12829
12842
|
getTargetDocument
|
|
12830
12843
|
]);
|
|
12831
|
-
const setTheme = (0,
|
|
12844
|
+
const setTheme = (0, import_react27.useCallback)((nextTheme) => {
|
|
12832
12845
|
const targetDocument = getTargetDocument();
|
|
12833
12846
|
if (targetDocument !== document) {
|
|
12834
12847
|
const store = getPreviewThemeStore(targetDocument);
|
|
@@ -12847,13 +12860,13 @@ function AppThemeProvider({ children }) {
|
|
|
12847
12860
|
}, [
|
|
12848
12861
|
getTargetDocument
|
|
12849
12862
|
]);
|
|
12850
|
-
const toggleTheme = (0,
|
|
12863
|
+
const toggleTheme = (0, import_react27.useCallback)(() => {
|
|
12851
12864
|
setTheme(themeName === "light" ? "dark" : "light");
|
|
12852
12865
|
}, [
|
|
12853
12866
|
setTheme,
|
|
12854
12867
|
themeName
|
|
12855
12868
|
]);
|
|
12856
|
-
const contextValue = (0,
|
|
12869
|
+
const contextValue = (0, import_react27.useMemo)(() => ({
|
|
12857
12870
|
themeName,
|
|
12858
12871
|
setTheme,
|
|
12859
12872
|
toggleTheme
|
|
@@ -12880,7 +12893,7 @@ function AppThemeProvider({ children }) {
|
|
|
12880
12893
|
});
|
|
12881
12894
|
}
|
|
12882
12895
|
function useAppTheme() {
|
|
12883
|
-
const context = (0,
|
|
12896
|
+
const context = (0, import_react27.useContext)(AppThemeContext);
|
|
12884
12897
|
if (!context) {
|
|
12885
12898
|
throw new Error("useAppTheme must be used within AppThemeProvider");
|
|
12886
12899
|
}
|
|
@@ -13046,18 +13059,18 @@ function Footer() {
|
|
|
13046
13059
|
}
|
|
13047
13060
|
|
|
13048
13061
|
// src/commodity-original/components/Header/index.tsx
|
|
13049
|
-
var
|
|
13062
|
+
var import_react29 = require("react");
|
|
13050
13063
|
var import_image9 = __toESM(require("next/image.js"));
|
|
13051
13064
|
var import_link7 = __toESM(require("next/link.js"));
|
|
13052
13065
|
var import_navigation2 = require("next/navigation.js");
|
|
13053
13066
|
var import_lucide3 = require("lucide");
|
|
13054
|
-
var
|
|
13067
|
+
var import_react30 = require("morphicons/react");
|
|
13055
13068
|
var import_radix_ui4 = require("radix-ui");
|
|
13056
13069
|
|
|
13057
13070
|
// src/commodity-original/components/theme-toggle.tsx
|
|
13058
13071
|
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
13059
13072
|
var import_lucide2 = require("lucide");
|
|
13060
|
-
var
|
|
13073
|
+
var import_react28 = require("morphicons/react");
|
|
13061
13074
|
var import_styled_components29 = __toESM(require("styled-components"));
|
|
13062
13075
|
var import_react_i18next15 = require("react-i18next");
|
|
13063
13076
|
var ToggleButton = import_styled_components29.default.button.withConfig({
|
|
@@ -13081,7 +13094,7 @@ function ThemeToggle({ variant = "floating" }) {
|
|
|
13081
13094
|
"aria-label": label,
|
|
13082
13095
|
"aria-pressed": isDarkTheme,
|
|
13083
13096
|
title: label,
|
|
13084
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
13097
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react28.MorphIcon, {
|
|
13085
13098
|
icon: isDarkTheme ? import_lucide2.Sun : import_lucide2.Moon,
|
|
13086
13099
|
size: 20,
|
|
13087
13100
|
strokeWidth: 2,
|
|
@@ -13094,7 +13107,7 @@ function ThemeToggle({ variant = "floating" }) {
|
|
|
13094
13107
|
// src/commodity-original/components/Header/index.tsx
|
|
13095
13108
|
var import_react_i18next16 = require("react-i18next");
|
|
13096
13109
|
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
13097
|
-
var
|
|
13110
|
+
var import_react31 = require("react");
|
|
13098
13111
|
var languages = [
|
|
13099
13112
|
{
|
|
13100
13113
|
value: "vi",
|
|
@@ -13136,7 +13149,7 @@ function LanguageSwitcher({
|
|
|
13136
13149
|
portalContainer
|
|
13137
13150
|
}) {
|
|
13138
13151
|
const { t } = (0, import_react_i18next16.useTranslation)();
|
|
13139
|
-
const triggerRef = (0,
|
|
13152
|
+
const triggerRef = (0, import_react29.useRef)(null);
|
|
13140
13153
|
const currentLanguage = languages.find((item) => item.value === language);
|
|
13141
13154
|
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_radix_ui4.DropdownMenu.Root, { children: [
|
|
13142
13155
|
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_radix_ui4.DropdownMenu.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
@@ -13204,17 +13217,17 @@ function Header() {
|
|
|
13204
13217
|
if (route === "/comming-soon") return false;
|
|
13205
13218
|
return pathname === route || pathname.startsWith(`${route}/`);
|
|
13206
13219
|
};
|
|
13207
|
-
const [portalContainer, setPortalContainer] = (0,
|
|
13208
|
-
const setHeaderRef = (0,
|
|
13220
|
+
const [portalContainer, setPortalContainer] = (0, import_react29.useState)(null);
|
|
13221
|
+
const setHeaderRef = (0, import_react29.useCallback)((element) => {
|
|
13209
13222
|
setPortalContainer(element);
|
|
13210
13223
|
}, []);
|
|
13211
|
-
const [isMenuOpen, setIsMenuOpen] = (0,
|
|
13212
|
-
const [isProductsOpen, setIsProductsOpen] = (0,
|
|
13213
|
-
const [isDesktopProductsOpen, setIsDesktopProductsOpen] = (0,
|
|
13224
|
+
const [isMenuOpen, setIsMenuOpen] = (0, import_react29.useState)(false);
|
|
13225
|
+
const [isProductsOpen, setIsProductsOpen] = (0, import_react29.useState)(null);
|
|
13226
|
+
const [isDesktopProductsOpen, setIsDesktopProductsOpen] = (0, import_react29.useState)(null);
|
|
13214
13227
|
const { t, i18n } = (0, import_react_i18next16.useTranslation)();
|
|
13215
13228
|
const language = i18n.resolvedLanguage?.startsWith("en") ? "en" : "vi";
|
|
13216
|
-
const mobileMenuTriggerRef = (0,
|
|
13217
|
-
const pendingMobileSectionRef = (0,
|
|
13229
|
+
const mobileMenuTriggerRef = (0, import_react29.useRef)(null);
|
|
13230
|
+
const pendingMobileSectionRef = (0, import_react29.useRef)(null);
|
|
13218
13231
|
const { themeName } = useAppTheme();
|
|
13219
13232
|
const isDarkTheme = themeName === "dark";
|
|
13220
13233
|
const lightLogo = useCmsImage("headerLogoImage", "/Logo/logo.png");
|
|
@@ -13302,7 +13315,7 @@ function Header() {
|
|
|
13302
13315
|
}
|
|
13303
13316
|
target.focus({ preventScroll: true });
|
|
13304
13317
|
};
|
|
13305
|
-
(0,
|
|
13318
|
+
(0, import_react29.useEffect)(() => {
|
|
13306
13319
|
const desktopMediaQuery = window.matchMedia("(min-width: 1280px)");
|
|
13307
13320
|
const closeDrawerOnDesktop = (event) => {
|
|
13308
13321
|
if (event.matches) {
|
|
@@ -13385,7 +13398,7 @@ function Header() {
|
|
|
13385
13398
|
item.labelKey
|
|
13386
13399
|
);
|
|
13387
13400
|
}
|
|
13388
|
-
return /* @__PURE__ */ (0,
|
|
13401
|
+
return /* @__PURE__ */ (0, import_react31.createElement)(
|
|
13389
13402
|
ExactText,
|
|
13390
13403
|
{
|
|
13391
13404
|
cmsAs: NavigationLink,
|
|
@@ -13422,7 +13435,7 @@ function Header() {
|
|
|
13422
13435
|
ref: mobileMenuTriggerRef,
|
|
13423
13436
|
"aria-label": isMenuOpen ? t("header.closeMenu") : t("header.openMenu"),
|
|
13424
13437
|
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
13425
|
-
|
|
13438
|
+
import_react30.MorphIcon,
|
|
13426
13439
|
{
|
|
13427
13440
|
icon: isMenuOpen ? import_lucide3.X : import_lucide3.Menu,
|
|
13428
13441
|
size: 21,
|
|
@@ -13457,7 +13470,7 @@ function Header() {
|
|
|
13457
13470
|
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(MobileDrawerHeader, { children: [
|
|
13458
13471
|
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ExactText, { cmsAs: MobileDrawerTitle, children: t("header.menu") }),
|
|
13459
13472
|
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(MobileDrawerClose, { "aria-label": t("header.closeMenu"), children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
13460
|
-
|
|
13473
|
+
import_react30.MorphIcon,
|
|
13461
13474
|
{
|
|
13462
13475
|
icon: import_lucide3.X,
|
|
13463
13476
|
size: 22,
|
|
@@ -13531,7 +13544,7 @@ function Header() {
|
|
|
13531
13544
|
"aria-hidden": "true",
|
|
13532
13545
|
className: "mobile-products-chevron",
|
|
13533
13546
|
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
13534
|
-
|
|
13547
|
+
import_react30.MorphIcon,
|
|
13535
13548
|
{
|
|
13536
13549
|
icon: import_lucide3.ChevronDown,
|
|
13537
13550
|
size: 18,
|
|
@@ -13553,7 +13566,7 @@ function Header() {
|
|
|
13553
13566
|
hidden: isProductsOpen !== item.index,
|
|
13554
13567
|
id: `mobile-products-panel-${item.index}`,
|
|
13555
13568
|
role: "region",
|
|
13556
|
-
children: item.children.map((child) => /* @__PURE__ */ (0,
|
|
13569
|
+
children: item.children.map((child) => /* @__PURE__ */ (0, import_react31.createElement)(
|
|
13557
13570
|
ExactText,
|
|
13558
13571
|
{
|
|
13559
13572
|
cmsAs: import_link7.default,
|
|
@@ -13578,7 +13591,7 @@ function Header() {
|
|
|
13578
13591
|
)
|
|
13579
13592
|
] }, item.labelKey);
|
|
13580
13593
|
}
|
|
13581
|
-
return /* @__PURE__ */ (0,
|
|
13594
|
+
return /* @__PURE__ */ (0, import_react31.createElement)(
|
|
13582
13595
|
import_link7.default,
|
|
13583
13596
|
{
|
|
13584
13597
|
...chromeItemAttributes(language, "header.menuItems", item.index),
|
|
@@ -13777,11 +13790,11 @@ function AudienceSection() {
|
|
|
13777
13790
|
}
|
|
13778
13791
|
|
|
13779
13792
|
// src/commodity-original/components/LandingPage/BenefitsSection.tsx
|
|
13780
|
-
var
|
|
13793
|
+
var import_react33 = require("react");
|
|
13781
13794
|
var import_react_i18next18 = require("react-i18next");
|
|
13782
13795
|
|
|
13783
13796
|
// src/commodity-original/components/LandingPage/BenefitIcon.tsx
|
|
13784
|
-
var
|
|
13797
|
+
var import_react32 = require("react");
|
|
13785
13798
|
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
13786
13799
|
var sharedProps = {
|
|
13787
13800
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -13794,7 +13807,7 @@ var sharedProps = {
|
|
|
13794
13807
|
focusable: "false"
|
|
13795
13808
|
};
|
|
13796
13809
|
function BenefitIcon({ name }) {
|
|
13797
|
-
const economyRevealId = (0,
|
|
13810
|
+
const economyRevealId = (0, import_react32.useId)();
|
|
13798
13811
|
const { themeName } = useAppTheme();
|
|
13799
13812
|
const isDarkTheme = themeName === "dark";
|
|
13800
13813
|
switch (name) {
|
|
@@ -14283,7 +14296,7 @@ function BenefitCopy({
|
|
|
14283
14296
|
}
|
|
14284
14297
|
function BenefitsSection() {
|
|
14285
14298
|
const { t, i18n } = (0, import_react_i18next18.useTranslation)();
|
|
14286
|
-
const [expandedCards, setExpandedCards] = (0,
|
|
14299
|
+
const [expandedCards, setExpandedCards] = (0, import_react33.useState)([]);
|
|
14287
14300
|
const language = i18n.resolvedLanguage?.startsWith("en") ? "en" : "vi";
|
|
14288
14301
|
const benefitCount = useCmsListCount(
|
|
14289
14302
|
"landing.benefits.cards.__count",
|
|
@@ -14664,14 +14677,14 @@ function DownloadSection() {
|
|
|
14664
14677
|
}
|
|
14665
14678
|
|
|
14666
14679
|
// src/commodity-original/components/LandingPage/FaqSection.tsx
|
|
14667
|
-
var
|
|
14680
|
+
var import_react34 = require("react");
|
|
14668
14681
|
var import_lucide4 = require("lucide");
|
|
14669
|
-
var
|
|
14682
|
+
var import_react35 = require("morphicons/react");
|
|
14670
14683
|
var import_radix_ui5 = require("radix-ui");
|
|
14671
14684
|
var import_react_i18next21 = require("react-i18next");
|
|
14672
14685
|
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
14673
14686
|
function FaqItem({ question, answer, order }) {
|
|
14674
|
-
const [isOpen, setIsOpen] = (0,
|
|
14687
|
+
const [isOpen, setIsOpen] = (0, import_react34.useState)(false);
|
|
14675
14688
|
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
14676
14689
|
import_radix_ui5.Collapsible.Root,
|
|
14677
14690
|
{
|
|
@@ -14683,7 +14696,7 @@ function FaqItem({ question, answer, order }) {
|
|
|
14683
14696
|
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_radix_ui5.Collapsible.Trigger, { className: "faq-trigger", children: [
|
|
14684
14697
|
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ExactText, { cmsAs: "span", children: question }),
|
|
14685
14698
|
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "faq-trigger-icon", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
14686
|
-
|
|
14699
|
+
import_react35.MorphIcon,
|
|
14687
14700
|
{
|
|
14688
14701
|
icon: isOpen ? import_lucide4.Minus : import_lucide4.Plus,
|
|
14689
14702
|
size: 22,
|
|
@@ -14728,7 +14741,7 @@ var import_react_i18next23 = require("react-i18next");
|
|
|
14728
14741
|
|
|
14729
14742
|
// src/commodity-original/components/Background/index.tsx
|
|
14730
14743
|
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
14731
|
-
var
|
|
14744
|
+
var import_react36 = require("react");
|
|
14732
14745
|
var import_styled_components31 = require("styled-components");
|
|
14733
14746
|
var TWO_PI = Math.PI * 2;
|
|
14734
14747
|
var DotContainer = import_styled_components31.styled.div.withConfig({
|
|
@@ -14736,28 +14749,28 @@ var DotContainer = import_styled_components31.styled.div.withConfig({
|
|
|
14736
14749
|
})([
|
|
14737
14750
|
`position:absolute;top:-130px;left:-200px;width:50%;height:100%;border-radius:20%;overflow:hidden;pointer-events:none;`
|
|
14738
14751
|
]);
|
|
14739
|
-
var DotField = /* @__PURE__ */ (0,
|
|
14740
|
-
const canvasRef = (0,
|
|
14741
|
-
const svgRef = (0,
|
|
14742
|
-
const glowRef = (0,
|
|
14743
|
-
const dotsRef = (0,
|
|
14744
|
-
const mouseRef = (0,
|
|
14752
|
+
var DotField = /* @__PURE__ */ (0, import_react36.memo)(({ dotRadius = 1.5, dotSpacing = 14, cursorRadius = 500, cursorForce = 0.1, bulgeOnly = true, bulgeStrength = 67, glowRadius = 160, sparkle = false, waveAmplitude = 0, gradientFrom = "rgba(168, 85, 247, 0.35)", gradientTo = "rgba(180, 151, 207, 0.25)", glowColor = "#120F17", ...rest }) => {
|
|
14753
|
+
const canvasRef = (0, import_react36.useRef)(null);
|
|
14754
|
+
const svgRef = (0, import_react36.useRef)(null);
|
|
14755
|
+
const glowRef = (0, import_react36.useRef)(null);
|
|
14756
|
+
const dotsRef = (0, import_react36.useRef)([]);
|
|
14757
|
+
const mouseRef = (0, import_react36.useRef)({
|
|
14745
14758
|
x: -9999,
|
|
14746
14759
|
y: -9999,
|
|
14747
14760
|
prevX: -9999,
|
|
14748
14761
|
prevY: -9999,
|
|
14749
14762
|
speed: 0
|
|
14750
14763
|
});
|
|
14751
|
-
const rafRef = (0,
|
|
14752
|
-
const sizeRef = (0,
|
|
14764
|
+
const rafRef = (0, import_react36.useRef)(null);
|
|
14765
|
+
const sizeRef = (0, import_react36.useRef)({
|
|
14753
14766
|
w: 0,
|
|
14754
14767
|
h: 0,
|
|
14755
14768
|
offsetX: 0,
|
|
14756
14769
|
offsetY: 0
|
|
14757
14770
|
});
|
|
14758
|
-
const glowOpacity = (0,
|
|
14759
|
-
const engagement = (0,
|
|
14760
|
-
const propsRef = (0,
|
|
14771
|
+
const glowOpacity = (0, import_react36.useRef)(0);
|
|
14772
|
+
const engagement = (0, import_react36.useRef)(0);
|
|
14773
|
+
const propsRef = (0, import_react36.useRef)({});
|
|
14761
14774
|
propsRef.current = {
|
|
14762
14775
|
dotRadius,
|
|
14763
14776
|
dotSpacing,
|
|
@@ -14770,9 +14783,9 @@ var DotField = /* @__PURE__ */ (0, import_react35.memo)(({ dotRadius = 1.5, dotS
|
|
|
14770
14783
|
gradientFrom,
|
|
14771
14784
|
gradientTo
|
|
14772
14785
|
};
|
|
14773
|
-
const rebuildRef = (0,
|
|
14774
|
-
const glowId = `dot-field-glow-${(0,
|
|
14775
|
-
(0,
|
|
14786
|
+
const rebuildRef = (0, import_react36.useRef)(null);
|
|
14787
|
+
const glowId = `dot-field-glow-${(0, import_react36.useId)().replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
14788
|
+
(0, import_react36.useEffect)(() => {
|
|
14776
14789
|
const canvas = canvasRef.current;
|
|
14777
14790
|
const glowEl = glowRef.current;
|
|
14778
14791
|
if (!canvas) return;
|
|
@@ -14995,7 +15008,7 @@ var DotField = /* @__PURE__ */ (0, import_react35.memo)(({ dotRadius = 1.5, dotS
|
|
|
14995
15008
|
window.removeEventListener("mousemove", onMouseMove);
|
|
14996
15009
|
};
|
|
14997
15010
|
}, []);
|
|
14998
|
-
(0,
|
|
15011
|
+
(0, import_react36.useEffect)(() => {
|
|
14999
15012
|
rebuildRef.current?.();
|
|
15000
15013
|
}, [
|
|
15001
15014
|
dotRadius,
|
|
@@ -15408,7 +15421,7 @@ function FloatingActions() {
|
|
|
15408
15421
|
|
|
15409
15422
|
// src/commodity-original/components/LandingPage/PositionSection.tsx
|
|
15410
15423
|
var import_image15 = __toESM(require("next/image.js"));
|
|
15411
|
-
var
|
|
15424
|
+
var import_react37 = require("react");
|
|
15412
15425
|
var import_react_i18next25 = require("react-i18next");
|
|
15413
15426
|
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
15414
15427
|
function PositionMedia({
|
|
@@ -15486,11 +15499,11 @@ function PositionMedia({
|
|
|
15486
15499
|
}
|
|
15487
15500
|
function PositionSection() {
|
|
15488
15501
|
const { t } = (0, import_react_i18next25.useTranslation)();
|
|
15489
|
-
const [expandedMobileCards, setExpandedMobileCards] = (0,
|
|
15490
|
-
const [desktopSlide, setDesktopSlide] = (0,
|
|
15491
|
-
const [mobileSlide, setMobileSlide] = (0,
|
|
15492
|
-
const mobileCarouselRef = (0,
|
|
15493
|
-
const mobileDragRef = (0,
|
|
15502
|
+
const [expandedMobileCards, setExpandedMobileCards] = (0, import_react37.useState)([]);
|
|
15503
|
+
const [desktopSlide, setDesktopSlide] = (0, import_react37.useState)(0);
|
|
15504
|
+
const [mobileSlide, setMobileSlide] = (0, import_react37.useState)(0);
|
|
15505
|
+
const mobileCarouselRef = (0, import_react37.useRef)(null);
|
|
15506
|
+
const mobileDragRef = (0, import_react37.useRef)(null);
|
|
15494
15507
|
const slideCount = useCmsListCount(
|
|
15495
15508
|
"landing.position.slides.__count",
|
|
15496
15509
|
positionSlides.length
|
|
@@ -16172,10 +16185,10 @@ function ExactEditableContent({
|
|
|
16172
16185
|
onSelectText,
|
|
16173
16186
|
selectedTextField
|
|
16174
16187
|
}) {
|
|
16175
|
-
const rootRef = (0,
|
|
16176
|
-
const callbacks = (0,
|
|
16188
|
+
const rootRef = (0, import_react38.useRef)(null);
|
|
16189
|
+
const callbacks = (0, import_react38.useRef)({ onChange, onSelectText });
|
|
16177
16190
|
callbacks.current = { onChange, onSelectText };
|
|
16178
|
-
(0,
|
|
16191
|
+
(0, import_react38.useLayoutEffect)(() => {
|
|
16179
16192
|
const root = rootRef.current;
|
|
16180
16193
|
if (!root || !editable) return void 0;
|
|
16181
16194
|
const cleanupTasks = [];
|
|
@@ -16256,7 +16269,7 @@ function ExactEditableContent({
|
|
|
16256
16269
|
});
|
|
16257
16270
|
return () => cleanupTasks.forEach((cleanup) => cleanup());
|
|
16258
16271
|
}, [content, editable, fieldKeys]);
|
|
16259
|
-
(0,
|
|
16272
|
+
(0, import_react38.useLayoutEffect)(() => {
|
|
16260
16273
|
rootRef.current?.querySelectorAll("[data-cms-exact-editable-text]").forEach((element) => {
|
|
16261
16274
|
element.dataset.cmsExactSelected = String(editable && element.dataset.cmsTextField === selectedTextField);
|
|
16262
16275
|
});
|
|
@@ -16303,7 +16316,7 @@ function ExactProviders({ content, children }) {
|
|
|
16303
16316
|
else if (field.startsWith("en.")) en[field.slice(3)] = value4;
|
|
16304
16317
|
else if (field in vi) vi[field] = value4;
|
|
16305
16318
|
}
|
|
16306
|
-
const instance = (0,
|
|
16319
|
+
const instance = (0, import_react38.useMemo)(() => {
|
|
16307
16320
|
const created = (0, import_i18next.createInstance)();
|
|
16308
16321
|
void created.use(import_react_i18next27.initReactI18next).init({
|
|
16309
16322
|
resources: {
|
|
@@ -16322,7 +16335,7 @@ function ExactProviders({ content, children }) {
|
|
|
16322
16335
|
}, [requestedLanguage]);
|
|
16323
16336
|
instance.addResourceBundle("vi", "translation", vi, true, true);
|
|
16324
16337
|
instance.addResourceBundle("en", "translation", en, true, true);
|
|
16325
|
-
(0,
|
|
16338
|
+
(0, import_react38.useEffect)(() => {
|
|
16326
16339
|
const initialLanguage = requestedLanguage ?? detectBrowserLanguage();
|
|
16327
16340
|
let receivingLanguage = false;
|
|
16328
16341
|
const syncLanguage = (value4) => {
|
|
@@ -16412,10 +16425,10 @@ function exactBlock(options, Component, wrapSection = false) {
|
|
|
16412
16425
|
)
|
|
16413
16426
|
};
|
|
16414
16427
|
const Renderer2 = (input) => {
|
|
16415
|
-
const props = { ...input, content: (0,
|
|
16428
|
+
const props = { ...input, content: (0, import_react38.useMemo)(() => migrateWikexChromeContent(options.type, input.content), [input.content]) };
|
|
16416
16429
|
const language = supportedLanguage(props.content.__cmsLanguage) ?? "vi";
|
|
16417
|
-
const chrome2 = (0,
|
|
16418
|
-
const listStates = (0,
|
|
16430
|
+
const chrome2 = (0, import_react38.useMemo)(() => flattenChromeLists(options.type, props.content, language), [props.content, language]);
|
|
16431
|
+
const listStates = (0, import_react38.useMemo)(() => lists.map((list) => {
|
|
16419
16432
|
const field = exactListFieldKey(language, list);
|
|
16420
16433
|
const templates = exactListDefaults(list, language);
|
|
16421
16434
|
return {
|
|
@@ -16425,10 +16438,10 @@ function exactBlock(options, Component, wrapSection = false) {
|
|
|
16425
16438
|
templates
|
|
16426
16439
|
};
|
|
16427
16440
|
}), [language, props.content]);
|
|
16428
|
-
const listCounts = (0,
|
|
16441
|
+
const listCounts = (0, import_react38.useMemo)(() => Object.fromEntries(
|
|
16429
16442
|
listStates.map(({ items, list }) => [list.countKey, items.length])
|
|
16430
16443
|
), [listStates]);
|
|
16431
|
-
const renderedContent = (0,
|
|
16444
|
+
const renderedContent = (0, import_react38.useMemo)(() => {
|
|
16432
16445
|
const renderedContent2 = { ...props.content, ...chrome2.values };
|
|
16433
16446
|
listStates.forEach(({ items, list }) => {
|
|
16434
16447
|
renderedContent2[`${language}.${list.countKey}`] = String(items.length);
|
|
@@ -16498,7 +16511,7 @@ function exactBlock(options, Component, wrapSection = false) {
|
|
|
16498
16511
|
)
|
|
16499
16512
|
);
|
|
16500
16513
|
};
|
|
16501
|
-
const fieldKeys = (0,
|
|
16514
|
+
const fieldKeys = (0, import_react38.useMemo)(() => [
|
|
16502
16515
|
...Object.keys(chrome2.values),
|
|
16503
16516
|
...translationEntries(options.prefixes).map(([key]) => `${language}.${key}`),
|
|
16504
16517
|
...listStates.flatMap(
|
|
@@ -17258,17 +17271,17 @@ var wikexCommodityRoutes = wikexCommodityPageTemplates.map(({ route, slug, key }
|
|
|
17258
17271
|
}));
|
|
17259
17272
|
|
|
17260
17273
|
// src/shared/text-toolbar.tsx
|
|
17261
|
-
var
|
|
17274
|
+
var import_react39 = require("react");
|
|
17262
17275
|
var import_material3 = require("@mui/material");
|
|
17263
17276
|
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
17264
17277
|
function CmsTextToolbar({ layout, color, colorPicker, inlineControls, structureControls, computedFontSize, computedLineHeight, computedFontFamily, computedTextAlign, onLayoutChange, onColorChange, onReset }) {
|
|
17265
|
-
const toolbarRef = (0,
|
|
17266
|
-
const [hex, setHex] = (0,
|
|
17278
|
+
const toolbarRef = (0, import_react39.useRef)(null);
|
|
17279
|
+
const [hex, setHex] = (0, import_react39.useState)(color);
|
|
17267
17280
|
const displayedSize = String(computedFontSize ?? layout.fontSize ?? 16);
|
|
17268
17281
|
const displayedLineHeight = String(layout.lineHeight ?? computedLineHeight ?? 1.5);
|
|
17269
|
-
const dirtyLineHeight = (0,
|
|
17270
|
-
const [lineHeight, setLineHeight] = (0,
|
|
17271
|
-
(0,
|
|
17282
|
+
const dirtyLineHeight = (0, import_react39.useRef)(false);
|
|
17283
|
+
const [lineHeight, setLineHeight] = (0, import_react39.useState)(displayedLineHeight);
|
|
17284
|
+
(0, import_react39.useEffect)(() => {
|
|
17272
17285
|
dirtyLineHeight.current = false;
|
|
17273
17286
|
setLineHeight(displayedLineHeight);
|
|
17274
17287
|
}, [displayedLineHeight]);
|
|
@@ -17283,10 +17296,10 @@ function CmsTextToolbar({ layout, color, colorPicker, inlineControls, structureC
|
|
|
17283
17296
|
if (Number.isFinite(value4) && value4 >= 0.5 && value4 <= 5) onLayoutChange({ lineHeight: value4 });
|
|
17284
17297
|
else setLineHeight(displayedLineHeight);
|
|
17285
17298
|
};
|
|
17286
|
-
const dirtySize = (0,
|
|
17287
|
-
const [size, setSize] = (0,
|
|
17288
|
-
(0,
|
|
17289
|
-
(0,
|
|
17299
|
+
const dirtySize = (0, import_react39.useRef)(false);
|
|
17300
|
+
const [size, setSize] = (0, import_react39.useState)(displayedSize);
|
|
17301
|
+
(0, import_react39.useEffect)(() => setHex(color), [color]);
|
|
17302
|
+
(0, import_react39.useEffect)(() => {
|
|
17290
17303
|
dirtySize.current = false;
|
|
17291
17304
|
setSize(displayedSize);
|
|
17292
17305
|
}, [displayedSize]);
|
|
@@ -17422,14 +17435,14 @@ function CmsTextToolbar({ layout, color, colorPicker, inlineControls, structureC
|
|
|
17422
17435
|
}
|
|
17423
17436
|
|
|
17424
17437
|
// src/shared/button-link-control.tsx
|
|
17425
|
-
var
|
|
17438
|
+
var import_react40 = require("react");
|
|
17426
17439
|
var import_material4 = require("@mui/material");
|
|
17427
17440
|
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
17428
17441
|
function CmsButtonLinkControl({ field, content, onChange }) {
|
|
17429
|
-
const [anchor, setAnchor] = (0,
|
|
17430
|
-
const [href, setHref] = (0,
|
|
17431
|
-
const [type, setType] = (0,
|
|
17432
|
-
const [error, setError] = (0,
|
|
17442
|
+
const [anchor, setAnchor] = (0, import_react40.useState)(null);
|
|
17443
|
+
const [href, setHref] = (0, import_react40.useState)("");
|
|
17444
|
+
const [type, setType] = (0, import_react40.useState)("internal");
|
|
17445
|
+
const [error, setError] = (0, import_react40.useState)("");
|
|
17433
17446
|
if (!isCmsButtonField(field)) return null;
|
|
17434
17447
|
const apply = (value4) => {
|
|
17435
17448
|
onChange(cmsButtonLinkChanges(content, field, value4, type));
|
|
@@ -17538,7 +17551,7 @@ var wikexCmsBlocks = sourceCmsBlocks.map((block) => {
|
|
|
17538
17551
|
const Renderer2 = cmsBlock.Renderer;
|
|
17539
17552
|
return {
|
|
17540
17553
|
...cmsBlock,
|
|
17541
|
-
Renderer: (props) => (0,
|
|
17554
|
+
Renderer: (props) => (0, import_react41.createElement)(
|
|
17542
17555
|
CmsTextColorProvider,
|
|
17543
17556
|
{
|
|
17544
17557
|
content: props.content,
|
|
@@ -17546,7 +17559,7 @@ var wikexCmsBlocks = sourceCmsBlocks.map((block) => {
|
|
|
17546
17559
|
onSelectText: props.onSelectText,
|
|
17547
17560
|
selectedTextField: props.selectedTextField
|
|
17548
17561
|
},
|
|
17549
|
-
(0,
|
|
17562
|
+
(0, import_react41.createElement)(CmsElementProvider, { ...props, children: (0, import_react41.createElement)(Renderer2, props) })
|
|
17550
17563
|
)
|
|
17551
17564
|
};
|
|
17552
17565
|
});
|