@enyxs/wikex-components 0.11.34 → 0.11.36
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/fees.js +57 -20
- package/dist/fees.js.map +1 -1
- package/dist/fees.mjs +57 -20
- package/dist/fees.mjs.map +1 -1
- package/dist/index.js +105 -24
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +105 -24
- package/dist/index.mjs.map +1 -1
- package/dist/manifest.json +50 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -4733,7 +4733,7 @@ function footerButtonField(field) {
|
|
|
4733
4733
|
return match ? { listField: match[1], index: Number(match[3]) } : void 0;
|
|
4734
4734
|
}
|
|
4735
4735
|
function isCmsButtonField(field) {
|
|
4736
|
-
return isCmsHeaderButtonField(field) || Boolean(downloadButtonField(field) || footerButtonField(field));
|
|
4736
|
+
return isCmsHeaderButtonField(field) || /^(vi|en)\.landing\.hero\.cta$/.test(field) || Boolean(downloadButtonField(field) || footerButtonField(field));
|
|
4737
4737
|
}
|
|
4738
4738
|
function safeCmsButtonHref(value4, type) {
|
|
4739
4739
|
const href = safeCmsTextHref(value4);
|
|
@@ -4744,7 +4744,7 @@ function getCmsButtonLink(content, field) {
|
|
|
4744
4744
|
const footer2 = footerButtonField(field);
|
|
4745
4745
|
const item = footer2 ? parseChromeItems(content[footer2.listField])?.[footer2.index] : void 0;
|
|
4746
4746
|
const key = downloadButtonField(field) ?? field;
|
|
4747
|
-
const value4 = footer2 ? item?.href ?? "" : String(content[`${key}Href`] ?? (field.endsWith(".register") ? "/#register" : ""));
|
|
4747
|
+
const value4 = footer2 ? item?.href ?? "" : String(content[`${key}Href`] ?? (field.endsWith(".register") || /^(vi|en)\.landing\.hero\.cta$/.test(field) ? "/#register" : ""));
|
|
4748
4748
|
const storedType = footer2 ? item?.linkType : content[`${key}LinkType`];
|
|
4749
4749
|
const type = storedType === "external" || storedType !== "internal" && /^https?:\/\//i.test(value4) ? "external" : "internal";
|
|
4750
4750
|
return { type, value: value4, href: item?.hrefEnabled === "false" ? void 0 : safeCmsButtonHref(value4, type) };
|
|
@@ -4761,6 +4761,30 @@ function cmsButtonLinkChanges(content, field, value4, type) {
|
|
|
4761
4761
|
const key = downloadButtonField(field) ?? field;
|
|
4762
4762
|
return { [`${key}Href`]: value4, [`${key}LinkType`]: type };
|
|
4763
4763
|
}
|
|
4764
|
+
var cmsHeroButtonLinkFields = ["vi", "en"].flatMap((language) => {
|
|
4765
|
+
const field = `${language}.landing.hero.cta`;
|
|
4766
|
+
const group = language === "vi" ? "Ti\u1EBFng Vi\u1EC7t" : "English";
|
|
4767
|
+
return [
|
|
4768
|
+
{
|
|
4769
|
+
key: `${field}LinkType`,
|
|
4770
|
+
label: "M\u1EDF t\xE0i kho\u1EA3n \u2014 lo\u1EA1i li\xEAn k\u1EBFt",
|
|
4771
|
+
type: "select",
|
|
4772
|
+
group,
|
|
4773
|
+
options: [{ value: "internal", label: "Internal \u2014 trong website" }, { value: "external", label: "External \u2014 website kh\xE1c (tab m\u1EDBi)" }]
|
|
4774
|
+
},
|
|
4775
|
+
{
|
|
4776
|
+
key: `${field}Href`,
|
|
4777
|
+
label: "M\u1EDF t\xE0i kho\u1EA3n \u2014 \u0111\u01B0\u1EDDng d\u1EABn",
|
|
4778
|
+
type: "link",
|
|
4779
|
+
group,
|
|
4780
|
+
helperText: "Internal: /duong-dan/ ho\u1EB7c #muc. External: https://\u2026 M\u1EDF trong tab m\u1EDBi."
|
|
4781
|
+
}
|
|
4782
|
+
];
|
|
4783
|
+
});
|
|
4784
|
+
var cmsHeroButtonLinkDefaults = Object.fromEntries(["vi", "en"].flatMap((language) => [
|
|
4785
|
+
[`${language}.landing.hero.ctaLinkType`, "internal"],
|
|
4786
|
+
[`${language}.landing.hero.ctaHref`, "/#register"]
|
|
4787
|
+
]));
|
|
4764
4788
|
var cmsDownloadButtonLinkFields = ["vi", "en"].flatMap(
|
|
4765
4789
|
(language) => ["appStore", "googlePlay", "web"].flatMap((platform) => {
|
|
4766
4790
|
const field = `${language}.landing.download.${platform}`;
|
|
@@ -8717,32 +8741,32 @@ var feesTheme = {
|
|
|
8717
8741
|
]))
|
|
8718
8742
|
};
|
|
8719
8743
|
var EditorActions = styled12.div.withConfig({
|
|
8720
|
-
componentId: "sc-
|
|
8744
|
+
componentId: "sc-bd9a89cb-0"
|
|
8721
8745
|
})([
|
|
8722
8746
|
`display:flex;flex-wrap:wrap;gap:8px;margin-top:16px;`
|
|
8723
8747
|
]);
|
|
8724
8748
|
var EditGroup = styled12.div.withConfig({
|
|
8725
|
-
componentId: "sc-
|
|
8749
|
+
componentId: "sc-bd9a89cb-1"
|
|
8726
8750
|
})([
|
|
8727
8751
|
`display:flex;flex-direction:column;gap:6px;`
|
|
8728
8752
|
]);
|
|
8729
8753
|
var HeaderGroup = styled12(EditGroup).withConfig({
|
|
8730
|
-
componentId: "sc-
|
|
8754
|
+
componentId: "sc-bd9a89cb-2"
|
|
8731
8755
|
})([
|
|
8732
8756
|
`gap:8px;`
|
|
8733
8757
|
]);
|
|
8734
8758
|
var HeaderTitle = styled12.div.withConfig({
|
|
8735
|
-
componentId: "sc-
|
|
8759
|
+
componentId: "sc-bd9a89cb-3"
|
|
8736
8760
|
})([
|
|
8737
8761
|
`display:flex;align-items:flex-start;min-height:var(--fees-header-title-height,36px);`
|
|
8738
8762
|
]);
|
|
8739
8763
|
var HeaderActions = styled12.div.withConfig({
|
|
8740
|
-
componentId: "sc-
|
|
8764
|
+
componentId: "sc-bd9a89cb-4"
|
|
8741
8765
|
})([
|
|
8742
8766
|
`display:flex;align-items:center;min-height:24px;`
|
|
8743
8767
|
]);
|
|
8744
8768
|
var AlignedFeesTable = styled12(FeesAndMarginTable).withConfig({
|
|
8745
|
-
componentId: "sc-
|
|
8769
|
+
componentId: "sc-bd9a89cb-5"
|
|
8746
8770
|
})([
|
|
8747
8771
|
`&[data-editable] th{vertical-align:top;}--fees-row-background:`,
|
|
8748
8772
|
`;--fees-stripe-background:`,
|
|
@@ -8775,14 +8799,14 @@ var AlignedFeesTable = styled12(FeesAndMarginTable).withConfig({
|
|
|
8775
8799
|
}
|
|
8776
8800
|
`).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);
|
|
8777
8801
|
var FeesCellContent = styled12.span.withConfig({
|
|
8778
|
-
componentId: "sc-
|
|
8802
|
+
componentId: "sc-bd9a89cb-6"
|
|
8779
8803
|
})([
|
|
8780
8804
|
`display:block;text-align:`,
|
|
8781
8805
|
`;@media (max-width:767px){text-align:`,
|
|
8782
8806
|
`;}`
|
|
8783
8807
|
], ({ $align, $alignRight }) => $align ?? ($alignRight ? "right" : "left"), ({ $align }) => $align ?? "left");
|
|
8784
8808
|
var EditorButton = styled12.button.withConfig({
|
|
8785
|
-
componentId: "sc-
|
|
8809
|
+
componentId: "sc-bd9a89cb-7"
|
|
8786
8810
|
})([
|
|
8787
8811
|
`padding:7px 12px;border:1px solid `,
|
|
8788
8812
|
`;border-radius:6px;background:`,
|
|
@@ -8791,17 +8815,17 @@ var EditorButton = styled12.button.withConfig({
|
|
|
8791
8815
|
`;}&:disabled{cursor:default;opacity:.4;}`
|
|
8792
8816
|
], ({ theme }) => theme.colors.border.line, ({ theme }) => theme.colors.background.input, ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.accent.primary);
|
|
8793
8817
|
var OrderActions = styled12.div.withConfig({
|
|
8794
|
-
componentId: "sc-
|
|
8818
|
+
componentId: "sc-bd9a89cb-8"
|
|
8795
8819
|
})([
|
|
8796
8820
|
`display:flex;gap:6px;align-items:center;flex-wrap:wrap;`
|
|
8797
8821
|
]);
|
|
8798
8822
|
var PositionLabel = styled12.label.withConfig({
|
|
8799
|
-
componentId: "sc-
|
|
8823
|
+
componentId: "sc-bd9a89cb-9"
|
|
8800
8824
|
})([
|
|
8801
8825
|
`display:inline-flex;align-items:center;gap:6px;font-size:12px;`
|
|
8802
8826
|
]);
|
|
8803
8827
|
var PositionInput = styled12.input.withConfig({
|
|
8804
|
-
componentId: "sc-
|
|
8828
|
+
componentId: "sc-bd9a89cb-10"
|
|
8805
8829
|
})([
|
|
8806
8830
|
`width:56px;padding:5px;border:1px solid `,
|
|
8807
8831
|
`;border-radius:4px;background:`,
|
|
@@ -8810,17 +8834,18 @@ var PositionInput = styled12.input.withConfig({
|
|
|
8810
8834
|
`;}`
|
|
8811
8835
|
], ({ theme }) => theme.colors.border.line, ({ theme }) => theme.colors.background.input, ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.accent.primary);
|
|
8812
8836
|
var ColumnRow = styled12.div.withConfig({
|
|
8813
|
-
componentId: "sc-
|
|
8837
|
+
componentId: "sc-bd9a89cb-11"
|
|
8814
8838
|
})([
|
|
8815
8839
|
`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;}`
|
|
8816
8840
|
]);
|
|
8817
8841
|
var PaginationControls = styled12(FeesAndMarginPagination).withConfig({
|
|
8818
|
-
componentId: "sc-
|
|
8842
|
+
componentId: "sc-bd9a89cb-12"
|
|
8819
8843
|
})([
|
|
8820
|
-
`align-items:center;flex-wrap:wrap;gap:16px 24px
|
|
8821
|
-
|
|
8844
|
+
`align-items:center;flex-wrap:wrap;gap:16px 24px;color:`,
|
|
8845
|
+
`;`
|
|
8846
|
+
], ({ theme }) => theme.colors.text.primary);
|
|
8822
8847
|
var PageSizeLabel = styled12.div.withConfig({
|
|
8823
|
-
componentId: "sc-
|
|
8848
|
+
componentId: "sc-bd9a89cb-13"
|
|
8824
8849
|
})([
|
|
8825
8850
|
`display:inline-flex;align-items:center;gap:8px;color:`,
|
|
8826
8851
|
`;font:inherit;font-size:13px;`
|
|
@@ -8848,12 +8873,12 @@ function Position({ value: value4, max, label, onMove }) {
|
|
|
8848
8873
|
});
|
|
8849
8874
|
}
|
|
8850
8875
|
var DeleteButton = styled12(EditorButton).withConfig({
|
|
8851
|
-
componentId: "sc-
|
|
8876
|
+
componentId: "sc-bd9a89cb-14"
|
|
8852
8877
|
})([
|
|
8853
8878
|
`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;}`
|
|
8854
8879
|
]);
|
|
8855
8880
|
var CellEditorInput = styled12.textarea.withConfig({
|
|
8856
|
-
componentId: "sc-
|
|
8881
|
+
componentId: "sc-bd9a89cb-15"
|
|
8857
8882
|
})([
|
|
8858
8883
|
`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:`,
|
|
8859
8884
|
`;}&:focus{outline:1px solid `,
|
|
@@ -9427,12 +9452,48 @@ function FeesTable({ value: value4, editable = false, onChange, labels: labels2,
|
|
|
9427
9452
|
"aria-label": english ? "Rows per page" : "S\u1ED1 d\xF2ng m\u1ED7i trang"
|
|
9428
9453
|
},
|
|
9429
9454
|
MenuProps: {
|
|
9430
|
-
container: () => tableRoot.current?.ownerDocument.body ?? document.body
|
|
9455
|
+
container: () => tableRoot.current?.ownerDocument.body ?? document.body,
|
|
9456
|
+
// The menu is portaled to body, so theme its paper explicitly too.
|
|
9457
|
+
slotProps: {
|
|
9458
|
+
paper: {
|
|
9459
|
+
sx: {
|
|
9460
|
+
color: feesTheme.colors.text.primary,
|
|
9461
|
+
bgcolor: feesTheme.colors.background.popup,
|
|
9462
|
+
backgroundImage: "none",
|
|
9463
|
+
border: `1px solid ${feesTheme.colors.border.line}`,
|
|
9464
|
+
"& .MuiMenuItem-root": {
|
|
9465
|
+
fontFamily: "var(--font-manrope, Manrope), Arial, Helvetica, sans-serif",
|
|
9466
|
+
fontSize: 13,
|
|
9467
|
+
"&:hover, &.Mui-focusVisible": {
|
|
9468
|
+
bgcolor: feesTheme.colors.background.hover
|
|
9469
|
+
},
|
|
9470
|
+
"&.Mui-selected, &.Mui-selected:hover, &.Mui-selected.Mui-focusVisible": {
|
|
9471
|
+
bgcolor: feesTheme.colors.accent.primary,
|
|
9472
|
+
color: feesTheme.colors.accent.foreground
|
|
9473
|
+
}
|
|
9474
|
+
}
|
|
9475
|
+
}
|
|
9476
|
+
}
|
|
9477
|
+
}
|
|
9431
9478
|
},
|
|
9432
9479
|
sx: {
|
|
9433
9480
|
minWidth: 80,
|
|
9434
9481
|
fontSize: 13,
|
|
9435
|
-
fontFamily: "inherit"
|
|
9482
|
+
fontFamily: "inherit",
|
|
9483
|
+
color: feesTheme.colors.text.primary,
|
|
9484
|
+
bgcolor: feesTheme.colors.background.canvas,
|
|
9485
|
+
"& .MuiSelect-icon": {
|
|
9486
|
+
color: feesTheme.colors.text.secondary
|
|
9487
|
+
},
|
|
9488
|
+
"& .MuiOutlinedInput-notchedOutline": {
|
|
9489
|
+
borderColor: feesTheme.colors.border.line
|
|
9490
|
+
},
|
|
9491
|
+
"&:hover .MuiOutlinedInput-notchedOutline": {
|
|
9492
|
+
borderColor: feesTheme.colors.text.secondary
|
|
9493
|
+
},
|
|
9494
|
+
"&.Mui-focused .MuiOutlinedInput-notchedOutline": {
|
|
9495
|
+
borderColor: feesTheme.colors.accent.primary
|
|
9496
|
+
}
|
|
9436
9497
|
},
|
|
9437
9498
|
onChange: (event) => {
|
|
9438
9499
|
setPageSize(Number(event.target.value));
|
|
@@ -15112,7 +15173,12 @@ var HeroArt_default = HeroArtBlock;
|
|
|
15112
15173
|
// src/commodity-original/components/LandingPage/HeroSection.tsx
|
|
15113
15174
|
import { jsx as jsx46, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
15114
15175
|
function HeroSection2() {
|
|
15115
|
-
const { t } = useTranslation23();
|
|
15176
|
+
const { t, i18n } = useTranslation23();
|
|
15177
|
+
const language = i18n.resolvedLanguage?.startsWith("en") ? "en" : "vi";
|
|
15178
|
+
const ctaField = `${language}.landing.hero.cta`;
|
|
15179
|
+
const content = useCmsElementContent();
|
|
15180
|
+
const editing = useCmsElementEditing();
|
|
15181
|
+
const ctaLink = getCmsButtonLink(content ?? {}, ctaField);
|
|
15116
15182
|
const background = useCmsImage(
|
|
15117
15183
|
"heroBackgroundImage",
|
|
15118
15184
|
"/landing-assets/keyvisual_bg.webp"
|
|
@@ -15151,6 +15217,21 @@ function HeroSection2() {
|
|
|
15151
15217
|
/* @__PURE__ */ jsx46(
|
|
15152
15218
|
Button_default,
|
|
15153
15219
|
{
|
|
15220
|
+
labelField: "landing.hero.cta",
|
|
15221
|
+
"data-cms-button-field": ctaField,
|
|
15222
|
+
href: ctaLink.href,
|
|
15223
|
+
target: ctaLink.href && ctaLink.type === "external" ? "_blank" : void 0,
|
|
15224
|
+
rel: ctaLink.href && ctaLink.type === "external" ? "noopener noreferrer" : void 0,
|
|
15225
|
+
disabled: !ctaLink.href && !editing?.editable,
|
|
15226
|
+
onClick: (event) => {
|
|
15227
|
+
if (editing?.editable) {
|
|
15228
|
+
event.preventDefault();
|
|
15229
|
+
event.stopPropagation();
|
|
15230
|
+
const text2 = event.currentTarget.querySelector("[data-cms-text-field]");
|
|
15231
|
+
text2?.focus();
|
|
15232
|
+
editing.onSelectText?.({ field: ctaField, currentColor: text2?.ownerDocument.defaultView?.getComputedStyle(text2).color ?? "" });
|
|
15233
|
+
}
|
|
15234
|
+
},
|
|
15154
15235
|
size: "sm",
|
|
15155
15236
|
radius: 6,
|
|
15156
15237
|
tint: "#F9FAFB",
|
|
@@ -16832,7 +16913,7 @@ var footer = exactBlock(
|
|
|
16832
16913
|
FooterWithFloatingActions
|
|
16833
16914
|
);
|
|
16834
16915
|
var hero = exactBlock(
|
|
16835
|
-
{ type: "commodity-hero", name: "Landing \u2014 Hero g\u1ED1c", description: "Hero nguy\xEAn b\u1EA3n.", prefixes: ["landing.hero."], images: heroImages },
|
|
16916
|
+
{ type: "commodity-hero", name: "Landing \u2014 Hero g\u1ED1c", description: "Hero nguy\xEAn b\u1EA3n.", prefixes: ["landing.hero."], images: heroImages, fields: cmsHeroButtonLinkFields, defaults: cmsHeroButtonLinkDefaults },
|
|
16836
16917
|
function OriginalHero() {
|
|
16837
16918
|
return /* @__PURE__ */ jsxs41(Fragment12, { children: [
|
|
16838
16919
|
/* @__PURE__ */ jsx49(LandingAnimations, {}),
|