@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.js
CHANGED
|
@@ -4801,7 +4801,7 @@ function footerButtonField(field) {
|
|
|
4801
4801
|
return match ? { listField: match[1], index: Number(match[3]) } : void 0;
|
|
4802
4802
|
}
|
|
4803
4803
|
function isCmsButtonField(field) {
|
|
4804
|
-
return isCmsHeaderButtonField(field) || Boolean(downloadButtonField(field) || footerButtonField(field));
|
|
4804
|
+
return isCmsHeaderButtonField(field) || /^(vi|en)\.landing\.hero\.cta$/.test(field) || Boolean(downloadButtonField(field) || footerButtonField(field));
|
|
4805
4805
|
}
|
|
4806
4806
|
function safeCmsButtonHref(value4, type) {
|
|
4807
4807
|
const href = safeCmsTextHref(value4);
|
|
@@ -4812,7 +4812,7 @@ function getCmsButtonLink(content, field) {
|
|
|
4812
4812
|
const footer2 = footerButtonField(field);
|
|
4813
4813
|
const item = footer2 ? parseChromeItems(content[footer2.listField])?.[footer2.index] : void 0;
|
|
4814
4814
|
const key = downloadButtonField(field) ?? field;
|
|
4815
|
-
const value4 = footer2 ? item?.href ?? "" : String(content[`${key}Href`] ?? (field.endsWith(".register") ? "/#register" : ""));
|
|
4815
|
+
const value4 = footer2 ? item?.href ?? "" : String(content[`${key}Href`] ?? (field.endsWith(".register") || /^(vi|en)\.landing\.hero\.cta$/.test(field) ? "/#register" : ""));
|
|
4816
4816
|
const storedType = footer2 ? item?.linkType : content[`${key}LinkType`];
|
|
4817
4817
|
const type = storedType === "external" || storedType !== "internal" && /^https?:\/\//i.test(value4) ? "external" : "internal";
|
|
4818
4818
|
return { type, value: value4, href: item?.hrefEnabled === "false" ? void 0 : safeCmsButtonHref(value4, type) };
|
|
@@ -4829,6 +4829,30 @@ function cmsButtonLinkChanges(content, field, value4, type) {
|
|
|
4829
4829
|
const key = downloadButtonField(field) ?? field;
|
|
4830
4830
|
return { [`${key}Href`]: value4, [`${key}LinkType`]: type };
|
|
4831
4831
|
}
|
|
4832
|
+
var cmsHeroButtonLinkFields = ["vi", "en"].flatMap((language) => {
|
|
4833
|
+
const field = `${language}.landing.hero.cta`;
|
|
4834
|
+
const group = language === "vi" ? "Ti\u1EBFng Vi\u1EC7t" : "English";
|
|
4835
|
+
return [
|
|
4836
|
+
{
|
|
4837
|
+
key: `${field}LinkType`,
|
|
4838
|
+
label: "M\u1EDF t\xE0i kho\u1EA3n \u2014 lo\u1EA1i li\xEAn k\u1EBFt",
|
|
4839
|
+
type: "select",
|
|
4840
|
+
group,
|
|
4841
|
+
options: [{ value: "internal", label: "Internal \u2014 trong website" }, { value: "external", label: "External \u2014 website kh\xE1c (tab m\u1EDBi)" }]
|
|
4842
|
+
},
|
|
4843
|
+
{
|
|
4844
|
+
key: `${field}Href`,
|
|
4845
|
+
label: "M\u1EDF t\xE0i kho\u1EA3n \u2014 \u0111\u01B0\u1EDDng d\u1EABn",
|
|
4846
|
+
type: "link",
|
|
4847
|
+
group,
|
|
4848
|
+
helperText: "Internal: /duong-dan/ ho\u1EB7c #muc. External: https://\u2026 M\u1EDF trong tab m\u1EDBi."
|
|
4849
|
+
}
|
|
4850
|
+
];
|
|
4851
|
+
});
|
|
4852
|
+
var cmsHeroButtonLinkDefaults = Object.fromEntries(["vi", "en"].flatMap((language) => [
|
|
4853
|
+
[`${language}.landing.hero.ctaLinkType`, "internal"],
|
|
4854
|
+
[`${language}.landing.hero.ctaHref`, "/#register"]
|
|
4855
|
+
]));
|
|
4832
4856
|
var cmsDownloadButtonLinkFields = ["vi", "en"].flatMap(
|
|
4833
4857
|
(language) => ["appStore", "googlePlay", "web"].flatMap((platform) => {
|
|
4834
4858
|
const field = `${language}.landing.download.${platform}`;
|
|
@@ -8772,32 +8796,32 @@ var feesTheme = {
|
|
|
8772
8796
|
]))
|
|
8773
8797
|
};
|
|
8774
8798
|
var EditorActions = import_styled_components12.default.div.withConfig({
|
|
8775
|
-
componentId: "sc-
|
|
8799
|
+
componentId: "sc-bd9a89cb-0"
|
|
8776
8800
|
})([
|
|
8777
8801
|
`display:flex;flex-wrap:wrap;gap:8px;margin-top:16px;`
|
|
8778
8802
|
]);
|
|
8779
8803
|
var EditGroup = import_styled_components12.default.div.withConfig({
|
|
8780
|
-
componentId: "sc-
|
|
8804
|
+
componentId: "sc-bd9a89cb-1"
|
|
8781
8805
|
})([
|
|
8782
8806
|
`display:flex;flex-direction:column;gap:6px;`
|
|
8783
8807
|
]);
|
|
8784
8808
|
var HeaderGroup = (0, import_styled_components12.default)(EditGroup).withConfig({
|
|
8785
|
-
componentId: "sc-
|
|
8809
|
+
componentId: "sc-bd9a89cb-2"
|
|
8786
8810
|
})([
|
|
8787
8811
|
`gap:8px;`
|
|
8788
8812
|
]);
|
|
8789
8813
|
var HeaderTitle = import_styled_components12.default.div.withConfig({
|
|
8790
|
-
componentId: "sc-
|
|
8814
|
+
componentId: "sc-bd9a89cb-3"
|
|
8791
8815
|
})([
|
|
8792
8816
|
`display:flex;align-items:flex-start;min-height:var(--fees-header-title-height,36px);`
|
|
8793
8817
|
]);
|
|
8794
8818
|
var HeaderActions = import_styled_components12.default.div.withConfig({
|
|
8795
|
-
componentId: "sc-
|
|
8819
|
+
componentId: "sc-bd9a89cb-4"
|
|
8796
8820
|
})([
|
|
8797
8821
|
`display:flex;align-items:center;min-height:24px;`
|
|
8798
8822
|
]);
|
|
8799
8823
|
var AlignedFeesTable = (0, import_styled_components12.default)(FeesAndMarginTable).withConfig({
|
|
8800
|
-
componentId: "sc-
|
|
8824
|
+
componentId: "sc-bd9a89cb-5"
|
|
8801
8825
|
})([
|
|
8802
8826
|
`&[data-editable] th{vertical-align:top;}--fees-row-background:`,
|
|
8803
8827
|
`;--fees-stripe-background:`,
|
|
@@ -8830,14 +8854,14 @@ var AlignedFeesTable = (0, import_styled_components12.default)(FeesAndMarginTabl
|
|
|
8830
8854
|
}
|
|
8831
8855
|
`).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);
|
|
8832
8856
|
var FeesCellContent = import_styled_components12.default.span.withConfig({
|
|
8833
|
-
componentId: "sc-
|
|
8857
|
+
componentId: "sc-bd9a89cb-6"
|
|
8834
8858
|
})([
|
|
8835
8859
|
`display:block;text-align:`,
|
|
8836
8860
|
`;@media (max-width:767px){text-align:`,
|
|
8837
8861
|
`;}`
|
|
8838
8862
|
], ({ $align, $alignRight }) => $align ?? ($alignRight ? "right" : "left"), ({ $align }) => $align ?? "left");
|
|
8839
8863
|
var EditorButton = import_styled_components12.default.button.withConfig({
|
|
8840
|
-
componentId: "sc-
|
|
8864
|
+
componentId: "sc-bd9a89cb-7"
|
|
8841
8865
|
})([
|
|
8842
8866
|
`padding:7px 12px;border:1px solid `,
|
|
8843
8867
|
`;border-radius:6px;background:`,
|
|
@@ -8846,17 +8870,17 @@ var EditorButton = import_styled_components12.default.button.withConfig({
|
|
|
8846
8870
|
`;}&:disabled{cursor:default;opacity:.4;}`
|
|
8847
8871
|
], ({ theme }) => theme.colors.border.line, ({ theme }) => theme.colors.background.input, ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.accent.primary);
|
|
8848
8872
|
var OrderActions = import_styled_components12.default.div.withConfig({
|
|
8849
|
-
componentId: "sc-
|
|
8873
|
+
componentId: "sc-bd9a89cb-8"
|
|
8850
8874
|
})([
|
|
8851
8875
|
`display:flex;gap:6px;align-items:center;flex-wrap:wrap;`
|
|
8852
8876
|
]);
|
|
8853
8877
|
var PositionLabel = import_styled_components12.default.label.withConfig({
|
|
8854
|
-
componentId: "sc-
|
|
8878
|
+
componentId: "sc-bd9a89cb-9"
|
|
8855
8879
|
})([
|
|
8856
8880
|
`display:inline-flex;align-items:center;gap:6px;font-size:12px;`
|
|
8857
8881
|
]);
|
|
8858
8882
|
var PositionInput = import_styled_components12.default.input.withConfig({
|
|
8859
|
-
componentId: "sc-
|
|
8883
|
+
componentId: "sc-bd9a89cb-10"
|
|
8860
8884
|
})([
|
|
8861
8885
|
`width:56px;padding:5px;border:1px solid `,
|
|
8862
8886
|
`;border-radius:4px;background:`,
|
|
@@ -8865,17 +8889,18 @@ var PositionInput = import_styled_components12.default.input.withConfig({
|
|
|
8865
8889
|
`;}`
|
|
8866
8890
|
], ({ theme }) => theme.colors.border.line, ({ theme }) => theme.colors.background.input, ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.accent.primary);
|
|
8867
8891
|
var ColumnRow = import_styled_components12.default.div.withConfig({
|
|
8868
|
-
componentId: "sc-
|
|
8892
|
+
componentId: "sc-bd9a89cb-11"
|
|
8869
8893
|
})([
|
|
8870
8894
|
`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;}`
|
|
8871
8895
|
]);
|
|
8872
8896
|
var PaginationControls = (0, import_styled_components12.default)(FeesAndMarginPagination).withConfig({
|
|
8873
|
-
componentId: "sc-
|
|
8897
|
+
componentId: "sc-bd9a89cb-12"
|
|
8874
8898
|
})([
|
|
8875
|
-
`align-items:center;flex-wrap:wrap;gap:16px 24px
|
|
8876
|
-
|
|
8899
|
+
`align-items:center;flex-wrap:wrap;gap:16px 24px;color:`,
|
|
8900
|
+
`;`
|
|
8901
|
+
], ({ theme }) => theme.colors.text.primary);
|
|
8877
8902
|
var PageSizeLabel = import_styled_components12.default.div.withConfig({
|
|
8878
|
-
componentId: "sc-
|
|
8903
|
+
componentId: "sc-bd9a89cb-13"
|
|
8879
8904
|
})([
|
|
8880
8905
|
`display:inline-flex;align-items:center;gap:8px;color:`,
|
|
8881
8906
|
`;font:inherit;font-size:13px;`
|
|
@@ -8903,12 +8928,12 @@ function Position({ value: value4, max, label, onMove }) {
|
|
|
8903
8928
|
});
|
|
8904
8929
|
}
|
|
8905
8930
|
var DeleteButton = (0, import_styled_components12.default)(EditorButton).withConfig({
|
|
8906
|
-
componentId: "sc-
|
|
8931
|
+
componentId: "sc-bd9a89cb-14"
|
|
8907
8932
|
})([
|
|
8908
8933
|
`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;}`
|
|
8909
8934
|
]);
|
|
8910
8935
|
var CellEditorInput = import_styled_components12.default.textarea.withConfig({
|
|
8911
|
-
componentId: "sc-
|
|
8936
|
+
componentId: "sc-bd9a89cb-15"
|
|
8912
8937
|
})([
|
|
8913
8938
|
`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:`,
|
|
8914
8939
|
`;}&:focus{outline:1px solid `,
|
|
@@ -9482,12 +9507,48 @@ function FeesTable({ value: value4, editable = false, onChange, labels: labels2,
|
|
|
9482
9507
|
"aria-label": english ? "Rows per page" : "S\u1ED1 d\xF2ng m\u1ED7i trang"
|
|
9483
9508
|
},
|
|
9484
9509
|
MenuProps: {
|
|
9485
|
-
container: () => tableRoot.current?.ownerDocument.body ?? document.body
|
|
9510
|
+
container: () => tableRoot.current?.ownerDocument.body ?? document.body,
|
|
9511
|
+
// The menu is portaled to body, so theme its paper explicitly too.
|
|
9512
|
+
slotProps: {
|
|
9513
|
+
paper: {
|
|
9514
|
+
sx: {
|
|
9515
|
+
color: feesTheme.colors.text.primary,
|
|
9516
|
+
bgcolor: feesTheme.colors.background.popup,
|
|
9517
|
+
backgroundImage: "none",
|
|
9518
|
+
border: `1px solid ${feesTheme.colors.border.line}`,
|
|
9519
|
+
"& .MuiMenuItem-root": {
|
|
9520
|
+
fontFamily: "var(--font-manrope, Manrope), Arial, Helvetica, sans-serif",
|
|
9521
|
+
fontSize: 13,
|
|
9522
|
+
"&:hover, &.Mui-focusVisible": {
|
|
9523
|
+
bgcolor: feesTheme.colors.background.hover
|
|
9524
|
+
},
|
|
9525
|
+
"&.Mui-selected, &.Mui-selected:hover, &.Mui-selected.Mui-focusVisible": {
|
|
9526
|
+
bgcolor: feesTheme.colors.accent.primary,
|
|
9527
|
+
color: feesTheme.colors.accent.foreground
|
|
9528
|
+
}
|
|
9529
|
+
}
|
|
9530
|
+
}
|
|
9531
|
+
}
|
|
9532
|
+
}
|
|
9486
9533
|
},
|
|
9487
9534
|
sx: {
|
|
9488
9535
|
minWidth: 80,
|
|
9489
9536
|
fontSize: 13,
|
|
9490
|
-
fontFamily: "inherit"
|
|
9537
|
+
fontFamily: "inherit",
|
|
9538
|
+
color: feesTheme.colors.text.primary,
|
|
9539
|
+
bgcolor: feesTheme.colors.background.canvas,
|
|
9540
|
+
"& .MuiSelect-icon": {
|
|
9541
|
+
color: feesTheme.colors.text.secondary
|
|
9542
|
+
},
|
|
9543
|
+
"& .MuiOutlinedInput-notchedOutline": {
|
|
9544
|
+
borderColor: feesTheme.colors.border.line
|
|
9545
|
+
},
|
|
9546
|
+
"&:hover .MuiOutlinedInput-notchedOutline": {
|
|
9547
|
+
borderColor: feesTheme.colors.text.secondary
|
|
9548
|
+
},
|
|
9549
|
+
"&.Mui-focused .MuiOutlinedInput-notchedOutline": {
|
|
9550
|
+
borderColor: feesTheme.colors.accent.primary
|
|
9551
|
+
}
|
|
9491
9552
|
},
|
|
9492
9553
|
onChange: (event) => {
|
|
9493
9554
|
setPageSize(Number(event.target.value));
|
|
@@ -15167,7 +15228,12 @@ var HeroArt_default = HeroArtBlock;
|
|
|
15167
15228
|
// src/commodity-original/components/LandingPage/HeroSection.tsx
|
|
15168
15229
|
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
15169
15230
|
function HeroSection2() {
|
|
15170
|
-
const { t } = (0, import_react_i18next23.useTranslation)();
|
|
15231
|
+
const { t, i18n } = (0, import_react_i18next23.useTranslation)();
|
|
15232
|
+
const language = i18n.resolvedLanguage?.startsWith("en") ? "en" : "vi";
|
|
15233
|
+
const ctaField = `${language}.landing.hero.cta`;
|
|
15234
|
+
const content = useCmsElementContent();
|
|
15235
|
+
const editing = useCmsElementEditing();
|
|
15236
|
+
const ctaLink = getCmsButtonLink(content ?? {}, ctaField);
|
|
15171
15237
|
const background = useCmsImage(
|
|
15172
15238
|
"heroBackgroundImage",
|
|
15173
15239
|
"/landing-assets/keyvisual_bg.webp"
|
|
@@ -15206,6 +15272,21 @@ function HeroSection2() {
|
|
|
15206
15272
|
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
15207
15273
|
Button_default,
|
|
15208
15274
|
{
|
|
15275
|
+
labelField: "landing.hero.cta",
|
|
15276
|
+
"data-cms-button-field": ctaField,
|
|
15277
|
+
href: ctaLink.href,
|
|
15278
|
+
target: ctaLink.href && ctaLink.type === "external" ? "_blank" : void 0,
|
|
15279
|
+
rel: ctaLink.href && ctaLink.type === "external" ? "noopener noreferrer" : void 0,
|
|
15280
|
+
disabled: !ctaLink.href && !editing?.editable,
|
|
15281
|
+
onClick: (event) => {
|
|
15282
|
+
if (editing?.editable) {
|
|
15283
|
+
event.preventDefault();
|
|
15284
|
+
event.stopPropagation();
|
|
15285
|
+
const text2 = event.currentTarget.querySelector("[data-cms-text-field]");
|
|
15286
|
+
text2?.focus();
|
|
15287
|
+
editing.onSelectText?.({ field: ctaField, currentColor: text2?.ownerDocument.defaultView?.getComputedStyle(text2).color ?? "" });
|
|
15288
|
+
}
|
|
15289
|
+
},
|
|
15209
15290
|
size: "sm",
|
|
15210
15291
|
radius: 6,
|
|
15211
15292
|
tint: "#F9FAFB",
|
|
@@ -16887,7 +16968,7 @@ var footer = exactBlock(
|
|
|
16887
16968
|
FooterWithFloatingActions
|
|
16888
16969
|
);
|
|
16889
16970
|
var hero = exactBlock(
|
|
16890
|
-
{ type: "commodity-hero", name: "Landing \u2014 Hero g\u1ED1c", description: "Hero nguy\xEAn b\u1EA3n.", prefixes: ["landing.hero."], images: heroImages },
|
|
16971
|
+
{ type: "commodity-hero", name: "Landing \u2014 Hero g\u1ED1c", description: "Hero nguy\xEAn b\u1EA3n.", prefixes: ["landing.hero."], images: heroImages, fields: cmsHeroButtonLinkFields, defaults: cmsHeroButtonLinkDefaults },
|
|
16891
16972
|
function OriginalHero() {
|
|
16892
16973
|
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
|
|
16893
16974
|
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(LandingAnimations, {}),
|