@enyxs/wikex-components 0.11.30 → 0.11.31
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 +13 -0
- package/dist/fees-model.d.mts +5 -1
- package/dist/fees-model.d.ts +5 -1
- package/dist/fees-model.js +18 -0
- package/dist/fees-model.js.map +1 -1
- package/dist/fees-model.mjs +16 -0
- package/dist/fees-model.mjs.map +1 -1
- package/dist/fees.d.mts +1 -1
- package/dist/fees.d.ts +1 -1
- package/dist/fees.js +77 -27
- package/dist/fees.js.map +1 -1
- package/dist/fees.mjs +77 -27
- package/dist/fees.mjs.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +91 -37
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +91 -37
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -4,7 +4,7 @@ import { C as CmsBlock, a as CmsRendererProps, b as CmsTextTarget, c as CmsCompo
|
|
|
4
4
|
export { d as CmsComponentCategory, e as CmsComponentPlacement, f as CmsFieldDefinition, g as CmsFieldType, h as CmsListItemField, m as migrateWikexChromeContent } from './chrome-model-BZjSLS8a.mjs';
|
|
5
5
|
export { WikexCommodityPageTemplate, wikexCommodityPageTemplates, wikexCommodityRoutes } from './page-templates.mjs';
|
|
6
6
|
export { F as FeesTable, a as FeesTableProps } from './fees-table-BxHiMpdc.mjs';
|
|
7
|
-
export { FeesFontWeight, FeesTableColumn, FeesTableData, FeesTableRow, FeesTableTypography, FeesTextStyle } from './fees-model.mjs';
|
|
7
|
+
export { FeesFontWeight, FeesTableColumn, FeesTableData, FeesTableRow, FeesTableTypography, FeesTextAlign, FeesTextStyle } from './fees-model.mjs';
|
|
8
8
|
export { ConsultationSubmission } from './consultation-model.mjs';
|
|
9
9
|
|
|
10
10
|
declare const minimalUiBlocks: CmsBlock[];
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { C as CmsBlock, a as CmsRendererProps, b as CmsTextTarget, c as CmsCompo
|
|
|
4
4
|
export { d as CmsComponentCategory, e as CmsComponentPlacement, f as CmsFieldDefinition, g as CmsFieldType, h as CmsListItemField, m as migrateWikexChromeContent } from './chrome-model-CAlcJpU4.js';
|
|
5
5
|
export { WikexCommodityPageTemplate, wikexCommodityPageTemplates, wikexCommodityRoutes } from './page-templates.js';
|
|
6
6
|
export { F as FeesTable, a as FeesTableProps } from './fees-table-i7g0SHgV.js';
|
|
7
|
-
export { FeesFontWeight, FeesTableColumn, FeesTableData, FeesTableRow, FeesTableTypography, FeesTextStyle } from './fees-model.js';
|
|
7
|
+
export { FeesFontWeight, FeesTableColumn, FeesTableData, FeesTableRow, FeesTableTypography, FeesTextAlign, FeesTextStyle } from './fees-model.js';
|
|
8
8
|
export { ConsultationSubmission } from './consultation-model.js';
|
|
9
9
|
|
|
10
10
|
declare const minimalUiBlocks: CmsBlock[];
|
package/dist/index.js
CHANGED
|
@@ -5805,39 +5805,39 @@ var benefitTwoWayDown = (0, import_styled_components4.keyframes)([
|
|
|
5805
5805
|
`0%{transform:translateY(0);}50%{transform:translateY(-3px);}100%{transform:translateY(0);}`
|
|
5806
5806
|
]);
|
|
5807
5807
|
var Hero = import_styled_components4.default.section.withConfig({
|
|
5808
|
-
componentId: "sc-
|
|
5808
|
+
componentId: "sc-8555619f-0"
|
|
5809
5809
|
})([
|
|
5810
5810
|
`position:relative;min-height:820px;overflow:hidden;color:#05080f;background:var( --wikex-hero-background,url("/landing-assets/keyvisual_bg.webp") ) no-repeat center / cover;&::before,&::after{content:"";position:absolute;background:no-repeat center / 100% auto;height:820px;}&::before{top:0;left:-90px;background-image:url("/landing-assets/keyvisual_shape.png");width:50%;opacity:0.8;}@media (min-width:1024px) and (max-width:1329px){min-height:unset;padding-top:80px;padding-bottom:80px;}@media (min-width:768px) and (max-width:1023px){min-height:auto;}@media (max-width:767px){height:unset;min-height:unset;background:var( --wikex-hero-mobile-background,url("/landing-assets/keyvisual-background-mobile@2x.jpg") ) no-repeat center / cover;&::before,&::after{display:none;}.hero-dot-field{display:none;}}`
|
|
5811
5811
|
]);
|
|
5812
5812
|
var HeroInner = import_styled_components4.default.div.withConfig({
|
|
5813
|
-
componentId: "sc-
|
|
5813
|
+
componentId: "sc-8555619f-1"
|
|
5814
5814
|
})([
|
|
5815
5815
|
`position:relative;z-index:1;display:flex;max-width:1230px;padding:0 15px;min-height:820px;justify-content:space-between;margin:0 auto;align-items:center;gap:30px;.specular-button{width:200px;min-height:44px;font-size:16px;font-weight:700;white-space:nowrap;margin-top:32px;}@media (min-width:1480px) and (max-width:1600px){justify-content:space-around;}@media (min-width:1330px) and (max-width:1479px){justify-content:unset;gap:100px;}@media (min-width:1024px) and (max-width:1329px){justify-content:unset;gap:140px;min-height:unset;}@media (min-width:1024px) and (max-width:1111px){gap:80px;}@media (min-width:768px) and (max-width:1023px){min-height:auto;padding:56px 15px 48px;flex-direction:column;align-items:center;gap:40px;}@media (max-width:767px){width:100%;padding:40px 16px;flex-direction:column;justify-content:flex-start;align-items:stretch;gap:35px;overflow:hidden;min-height:unset;.specular-button{order:3;width:100%;min-height:40px;margin-top:0;}}`
|
|
5816
5816
|
]);
|
|
5817
5817
|
var HeroCopy = import_styled_components4.default.div.withConfig({
|
|
5818
|
-
componentId: "sc-
|
|
5818
|
+
componentId: "sc-8555619f-2"
|
|
5819
5819
|
})([
|
|
5820
5820
|
`position:relative;z-index:2;@media (prefers-reduced-motion:no-preference){> *{animation:`,
|
|
5821
5821
|
` 950ms cubic-bezier(0.33,1,0.68,1) backwards;}> :nth-child(1){animation-delay:80ms;}> :nth-child(2){animation-delay:220ms;}> :nth-child(3){animation-delay:360ms;}> :nth-child(4){animation-delay:500ms;}}> p{max-width:570px;margin:18px 0 0;color:#05080f;font-size:16px;font-weight:500;line-height:22px;white-space:pre-line;}@media (max-width:1023px){width:100%;text-align:center;> p{margin-inline:auto;}}@media (max-width:767px){display:contents;> p{order:2;width:100%;max-width:343px;height:72px;min-height:72px;margin:-4px auto 0;flex:0 0 72px;font-size:14px;line-height:18px;text-align:center;}}`
|
|
5822
5822
|
], revealHeroCopy);
|
|
5823
5823
|
var HeroTitle = import_styled_components4.default.h1.withConfig({
|
|
5824
|
-
componentId: "sc-
|
|
5824
|
+
componentId: "sc-8555619f-3"
|
|
5825
5825
|
})([
|
|
5826
5826
|
`color:#05080f;font-size:54px;font-weight:700;line-height:72px;white-space:pre-line;margin:0;@media (max-width:520px){font-size:36px;line-height:46px;br{display:none;}}@media (max-width:767px){order:1;width:100%;min-height:120px;font-size:32px;line-height:40px;text-align:center;br{display:initial;}}`
|
|
5827
5827
|
]);
|
|
5828
5828
|
var HeroMetrics = import_styled_components4.default.div.withConfig({
|
|
5829
|
-
componentId: "sc-
|
|
5829
|
+
componentId: "sc-8555619f-4"
|
|
5830
5830
|
})([
|
|
5831
5831
|
`display:flex;margin-top:62px;.hero-metrics-track,.hero-metrics-group{display:contents;}.hero-metrics-group--duplicate{display:none;}@media (max-width:1023px){margin-top:42px;justify-content:center;}@media (max-width:767px){order:5;width:100%;min-width:100%;margin:0;justify-content:flex-start;overflow:hidden;.hero-metrics-track{display:flex;width:max-content;animation:`,
|
|
5832
5832
|
` 14s linear infinite;will-change:transform;}.hero-metrics-group,.hero-metrics-group--duplicate{display:flex;flex:0 0 auto;gap:16px;padding-right:25px;}}@media (max-width:767px) and (prefers-reduced-motion:reduce){overflow-x:auto;.hero-metrics-track{animation:none;will-change:auto;}.hero-metrics-group{padding-right:0;}.hero-metrics-group--duplicate{display:none;}}`
|
|
5833
5833
|
], moveHeroMetricsMarquee);
|
|
5834
5834
|
var HeroMetric = import_styled_components4.default.div.withConfig({
|
|
5835
|
-
componentId: "sc-
|
|
5835
|
+
componentId: "sc-8555619f-5"
|
|
5836
5836
|
})([
|
|
5837
5837
|
`display:flex;gap:8px;align-items:center;border-right:1px solid #05080f;padding:0 20px;font-size:20px;font-weight:600;line-height:1.25;white-space:pre-line;svg{flex-shrink:0;}&:first-child{padding-left:0;}&:last-child{border-right:0;}@media (min-width:1024px) and (max-width:1329px){font-size:15px;}@media (max-width:767px){width:174px;min-width:174px;min-height:48px;justify-content:flex-start;border-right:0;border-bottom:0;padding:0;gap:10px;font-size:16px;line-height:18px;text-align:left;&:first-child{width:233px;min-width:233px;padding-right:16px;}&:nth-child(2){width:212px;min-width:212px;padding-right:16px;}svg{width:36px;height:36px;}strong{display:block;width:116px;font-weight:600;font-size:20px;line-height:22px;}&:first-child strong{width:159px;}&:nth-child(2) strong{width:138px;}}`
|
|
5838
5838
|
]);
|
|
5839
5839
|
var HeroArt = import_styled_components4.default.div.withConfig({
|
|
5840
|
-
componentId: "sc-
|
|
5840
|
+
componentId: "sc-8555619f-6"
|
|
5841
5841
|
})([
|
|
5842
5842
|
`position:relative;min-height:461px;width:288px;flex-shrink:0;@media (prefers-reduced-motion:no-preference){.hero-phone{animation:`,
|
|
5843
5843
|
` 700ms cubic-bezier(0.33,1,0.68,1) 240ms backwards;}.key-mock-2{animation:`,
|
|
@@ -5845,15 +5845,15 @@ var HeroArt = import_styled_components4.default.div.withConfig({
|
|
|
5845
5845
|
` 560ms cubic-bezier(0.33,1,0.68,1) 920ms backwards;}.label-middle{animation:`,
|
|
5846
5846
|
` 520ms cubic-bezier(0.33,1,0.68,1) 1120ms backwards;}.label-bottom{animation:`,
|
|
5847
5847
|
` 520ms cubic-bezier(0.33,1,0.68,1) 1320ms backwards;}.label-top{animation:`,
|
|
5848
|
-
` 520ms cubic-bezier(0.33,1,0.68,1) 1520ms backwards;}}.key-mock-1,.key-mock-2{position:absolute;width:139px;height:94px;}.key-mock-2{right:-65px;top:24px;}.key-mock-1{left:-28px;top:78px;}.label{--label-height:75px;--label-padding-start:35px;--label-padding-end:35px;position:absolute;display:inline-flex;width:max-content;height:var(--label-height);picture{position:absolute;z-index:0;inset:0;display:block;width:100%;height:100%;}img{display:block;width:100%;height:100%;}p{position:relative;z-index:1;display:flex;align-items:center;color:#392c12;font-size:20px;font-weight:700;line-height:1.2;white-space:nowrap;margin:0;padding:0 var(--label-padding-end) 6px var(--label-padding-start);}}.label-top{bottom:112px;right:226px;--label-padding-end:60px;}.label-middle{top:148px;left:195px;--label-padding-start:45px;--label-padding-end:24px;}.label-bottom{left:143px;bottom:70px;--label-padding-start:45px;--label-padding-end:24px;p{padding-bottom:14px;}}@media (max-width:767px){.key-mock-1,.key-mock-2{width:67px;height:45px;}.key-mock-1{left:-15px;top:38px;}.key-mock-2{right:-34px;top:10px;}.label{--label-height:36px;p{font-size:10px;}}.label-top{bottom:52px;right:106px;--label-padding-start:15px;--label-padding-end:32px;}.label-middle{top:70px;left:92px;--label-padding-start:24px;--label-padding-end:12px;}.label-bottom{left:67px;bottom:30px;--label-height:33px;--label-padding-start:24px;--label-padding-end:12px;p{padding-top:3px;padding-bottom:6px;}}}@media (min-width:1024px) and (max-width:1230px){.key-mock-1,.key-mock-2{width:120px;height:75px;}.key-mock-2{right:-55px;top:64px;}.key-mock-1{left:-24px;top:108px;}.label{p{font-size:13px;}--label-height:4vw;}.label-top{bottom:142px;right:calc(434px - 18vw);--label-padding-start:2vw;--label-padding-end:3vw;}.label-middle{top:168px;left:155px;--label-padding-start:3vw;--label-padding-end:1.5vw;}.label-bottom{left:calc(273px - 15vw);bottom:108px;--label-padding-start:2.5vw;--label-padding-end:1.5vw;}}@media (max-width:767px){order:4;width:137px;height:219px;min-height:auto;margin:0 auto;}`
|
|
5848
|
+
` 520ms cubic-bezier(0.33,1,0.68,1) 1520ms backwards;}}.key-mock-1,.key-mock-2{position:absolute;width:139px;height:94px;}.key-mock-2{right:-65px;top:24px;}.key-mock-1{left:-28px;top:78px;}.label{--label-height:75px;--label-padding-start:35px;--label-padding-end:35px;position:absolute;display:inline-flex;width:max-content;height:var(--label-height);picture{position:absolute;z-index:0;inset:0;display:block;width:100%;height:100%;}img{display:block;width:100%;height:100%;}p{position:relative;z-index:1;min-width:max-content;display:flex;align-items:center;color:#392c12;font-size:20px;font-weight:700;line-height:1.2;white-space:nowrap;margin:0;padding:0 var(--label-padding-end) 6px var(--label-padding-start);}}.label-top{bottom:112px;right:226px;--label-padding-end:60px;}.label-middle{top:148px;left:195px;--label-padding-start:45px;--label-padding-end:24px;}.label-bottom{left:143px;bottom:70px;--label-padding-start:45px;--label-padding-end:24px;p{padding-bottom:14px;}}@media (max-width:767px){.key-mock-1,.key-mock-2{width:67px;height:45px;}.key-mock-1{left:-15px;top:38px;}.key-mock-2{right:-34px;top:10px;}.label{--label-height:36px;p{font-size:10px;}}.label-top{bottom:52px;right:106px;--label-padding-start:15px;--label-padding-end:32px;}.label-middle{top:70px;left:92px;--label-padding-start:24px;--label-padding-end:12px;}.label-bottom{left:67px;bottom:30px;--label-height:33px;--label-padding-start:24px;--label-padding-end:12px;p{padding-top:3px;padding-bottom:6px;}}}@media (min-width:1024px) and (max-width:1230px){.key-mock-1,.key-mock-2{width:120px;height:75px;}.key-mock-2{right:-55px;top:64px;}.key-mock-1{left:-24px;top:108px;}.label{p{font-size:13px;}--label-height:4vw;}.label-top{bottom:142px;right:calc(434px - 18vw);--label-padding-start:2vw;--label-padding-end:3vw;}.label-middle{top:168px;left:155px;--label-padding-start:3vw;--label-padding-end:1.5vw;}.label-bottom{left:calc(273px - 15vw);bottom:108px;--label-padding-start:2.5vw;--label-padding-end:1.5vw;}}@media (max-width:767px){order:4;width:137px;height:219px;min-height:auto;margin:0 auto;}`
|
|
5849
5849
|
], revealHeroArtUp, revealHeroArtFromRight, revealHeroArtFromLeft, revealHeroArtUp, revealHeroArtUp, revealHeroArtUp);
|
|
5850
5850
|
var HeroImage = import_styled_components4.default.div.withConfig({
|
|
5851
|
-
componentId: "sc-
|
|
5851
|
+
componentId: "sc-8555619f-7"
|
|
5852
5852
|
})([
|
|
5853
5853
|
`position:absolute;inset:0;.hero-phone-picture{position:absolute;inset:0;display:block;}img{object-fit:contain;}@media (min-width:1024px) and (max-width:1230px){width:80%;}`
|
|
5854
5854
|
]);
|
|
5855
5855
|
var PageShell = import_styled_components4.default.main.withConfig({
|
|
5856
|
-
componentId: "sc-
|
|
5856
|
+
componentId: "sc-8555619f-8"
|
|
5857
5857
|
})([
|
|
5858
5858
|
`--cream:#fffbf3;--faq-answer-color:#4e5560;--faq-card-background:#fff;--faq-card-foreground:#05080f;--faq-card-shadow-accent:#ffe5aa;--faq-card-shadow-ambient:rgb(0 0 0 / 5%);--footer-contact-icon-filter:none;--footer-desktop-icon-background:#e6e7ea;--footer-desktop-icon-filter:none;--footer-store-badge-background:#05080f;--footer-store-badge-foreground:#f9fafb;--footer-store-monochrome-filter:none;--footer-social-background:#e6e7ea;--footer-social-icon-filter:none;--ink:#05080f;--muted:#707580;--yellow:#f9bb3a;box-sizing:border-box;overflow:clip;color:var(--ink);background:var(--cream);font-family:var(--font-inter),Arial,Helvetica,sans-serif;line-height:normal;*,*::before,*::after{box-sizing:border-box;}button,input,textarea,select{font:inherit;}.container{width:min(1200px,calc(100% - 48px));margin-inline:auto;}.section{padding:80px 0;}.benefits{padding-top:80px;}.benefits .section-heading{margin:0 auto 60px;}.benefit-grid{display:flex;flex-wrap:wrap;gap:60px 32px;}.benefit-card{position:relative;flex:0 0 calc((100% - 96px) / 4);min-width:0;min-height:242px;padding:24px 32px 48px;text-align:center;cursor:pointer;&::before{position:absolute;z-index:1;top:-30px;right:-6px;bottom:-14px;left:-14px;background:url("/landing-assets/benefit-card-short.svg") no-repeat center / 100% 100%;content:"";pointer-events:none;}&::after{position:absolute;z-index:0;right:0;bottom:-16px;left:32px;height:52px;background:url("/landing-assets/benefit-card-accent.svg") no-repeat center / 100% 100%;content:"";pointer-events:none;}}.benefit-card--tall{min-height:308px;}.benefit-card--tall::before{background-image:url("/landing-assets/benefit-card-tall.svg");}.benefit-inner{position:relative;z-index:5;display:flex;flex-direction:column;align-items:center;gap:0;}.benefit-body-clip{min-height:0;}.benefit-toggle{display:none;}.benefit-icon{display:block;width:48px;height:48px;flex:0 0 48px;}.benefit-market-line{stroke-dasharray:1;stroke-dashoffset:0;}.benefit-futures-line,.benefit-economy-reveal{transform-box:fill-box;transform-origin:left center;}.benefit-gavel{transform-box:view-box;transform-origin:44px 40px;}.benefit-risk-square{transform-box:fill-box;transform-origin:center;}.benefit-product-segment{transform-box:view-box;transform-origin:24px 24.5px;}@media (hover:hover) and (prefers-reduced-motion:no-preference){.benefit-card:is(:hover,:focus-within){.benefit-market-line{animation:`,
|
|
5859
5859
|
` 120ms linear both;}.benefit-futures-line{animation:`,
|
|
@@ -7629,6 +7629,7 @@ var import_material = require("@mui/material");
|
|
|
7629
7629
|
var FEES_FONT_SIZE_MIN = 8;
|
|
7630
7630
|
var FEES_FONT_SIZE_MAX = 32;
|
|
7631
7631
|
var FEES_FONT_WEIGHTS = [400, 500, 600, 700, 800];
|
|
7632
|
+
var FEES_TEXT_ALIGNS = ["left", "center", "right"];
|
|
7632
7633
|
var FEES_PAGE_SIZE = 25;
|
|
7633
7634
|
function normalizeFeesSearch(value4) {
|
|
7634
7635
|
return value4.normalize("NFD").replace(/[\u0300-\u036f]/g, "").replace(/đ/g, "d").replace(/Đ/g, "D").toLowerCase().trim();
|
|
@@ -7637,6 +7638,15 @@ function filterFeesRows(data, search, tag) {
|
|
|
7637
7638
|
const query = normalizeFeesSearch(search);
|
|
7638
7639
|
return data.rows.filter((row) => (!tag || row.tags.includes(tag)) && (!query || Object.values(row.cells).some((cell) => normalizeFeesSearch(cell).includes(query))));
|
|
7639
7640
|
}
|
|
7641
|
+
function sortFeesRowsByName(rows, language = "vi") {
|
|
7642
|
+
const collator = new Intl.Collator(language, { sensitivity: "base", numeric: true });
|
|
7643
|
+
return [...rows].sort((a, b) => {
|
|
7644
|
+
const left = (a.cells.name ?? "").trim();
|
|
7645
|
+
const right = (b.cells.name ?? "").trim();
|
|
7646
|
+
if (!left || !right) return left ? -1 : right ? 1 : 0;
|
|
7647
|
+
return collator.compare(left, right);
|
|
7648
|
+
});
|
|
7649
|
+
}
|
|
7640
7650
|
function paginateFeesRows(rows, requestedPage, pageSize = FEES_PAGE_SIZE) {
|
|
7641
7651
|
const size = pageSize === -1 ? Math.max(1, rows.length) : Number.isInteger(pageSize) && pageSize > 0 ? pageSize : FEES_PAGE_SIZE;
|
|
7642
7652
|
const pageCount = Math.max(1, Math.ceil(rows.length / size));
|
|
@@ -7674,6 +7684,10 @@ function validateFeesTypography(value4) {
|
|
|
7674
7684
|
if (!FEES_FONT_WEIGHTS.includes(raw.fontWeight)) throw invalid();
|
|
7675
7685
|
style.fontWeight = raw.fontWeight;
|
|
7676
7686
|
}
|
|
7687
|
+
if (raw.textAlign !== void 0) {
|
|
7688
|
+
if (!FEES_TEXT_ALIGNS.includes(raw.textAlign)) 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.");
|
|
7689
|
+
style.textAlign = raw.textAlign;
|
|
7690
|
+
}
|
|
7677
7691
|
if (Object.keys(style).length) result[part] = style;
|
|
7678
7692
|
}
|
|
7679
7693
|
return Object.keys(result).length ? result : void 0;
|
|
@@ -7803,6 +7817,7 @@ function defaultFeesTable(t) {
|
|
|
7803
7817
|
// src/wikex/fees-typography-controls.tsx
|
|
7804
7818
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
7805
7819
|
var weightLabels = { 400: "Th\u01B0\u1EDDng", 500: "V\u1EEBa", 600: "H\u01A1i \u0111\u1EADm", 700: "\u0110\u1EADm", 800: "R\u1EA5t \u0111\u1EADm" };
|
|
7820
|
+
var alignLabels = { left: "C\u0103n tr\xE1i", center: "C\u0103n gi\u1EEFa", right: "C\u0103n ph\u1EA3i" };
|
|
7806
7821
|
function FontSizeInput({ label, value: value4, onChange }) {
|
|
7807
7822
|
const [draft, setDraft] = (0, import_react17.useState)(String(value4));
|
|
7808
7823
|
const [error, setError] = (0, import_react17.useState)(false);
|
|
@@ -7843,7 +7858,13 @@ function FontSizeInput({ label, value: value4, onChange }) {
|
|
|
7843
7858
|
}
|
|
7844
7859
|
function FeesTypographyControls({ value: value4, onChange }) {
|
|
7845
7860
|
const root = (0, import_react17.useRef)(null);
|
|
7846
|
-
const update = (part, patch) =>
|
|
7861
|
+
const update = (part, patch) => {
|
|
7862
|
+
const style = Object.fromEntries(Object.entries({ ...value4?.[part], ...patch }).filter(([, setting]) => setting !== void 0));
|
|
7863
|
+
const next = { ...value4 };
|
|
7864
|
+
if (Object.keys(style).length) next[part] = style;
|
|
7865
|
+
else delete next[part];
|
|
7866
|
+
onChange(Object.keys(next).length ? next : void 0);
|
|
7867
|
+
};
|
|
7847
7868
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_material.Box, { ref: root, role: "group", "aria-label": "\u0110\u1ECBnh d\u1EA1ng ch\u1EEF b\u1EA3ng ph\xED", sx: { mt: 2, p: { xs: 2, sm: 2.5 }, border: "1px solid", borderColor: "divider", borderRadius: 1.5 }, children: [
|
|
7848
7869
|
/* @__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: [
|
|
7849
7870
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_material.Box, { children: [
|
|
@@ -7851,7 +7872,7 @@ function FeesTypographyControls({ value: value4, onChange }) {
|
|
|
7851
7872
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_material.Typography, { variant: "caption", color: "text.secondary", children: "\xC1p d\u1EE5ng cho to\xE0n b\u1EA3ng, theo ng\xF4n ng\u1EEF \u0111ang ch\u1ECDn. Xem thay \u0111\u1ED5i ngay b\xEAn d\u01B0\u1EDBi." })
|
|
7852
7873
|
] }),
|
|
7853
7874
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_material.Stack, { direction: "row", gap: 1, flexShrink: 0, children: [
|
|
7854
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_material.Button, { size: "small", variant: "outlined", onClick: () => onChange({ thead: { fontSize: 14, fontWeight: 700 }, tbody: { fontSize: 14, fontWeight: 500 } }), children: "D\u1EC5 \u0111\u1ECDc" }),
|
|
7875
|
+
/* @__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" }),
|
|
7855
7876
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_material.Button, { size: "small", color: "inherit", disabled: !value4, onClick: () => onChange(void 0), children: "M\u1EB7c \u0111\u1ECBnh" })
|
|
7856
7877
|
] })
|
|
7857
7878
|
] }),
|
|
@@ -7881,7 +7902,24 @@ function FeesTypographyControls({ value: value4, onChange }) {
|
|
|
7881
7902
|
] }, weight))
|
|
7882
7903
|
}
|
|
7883
7904
|
)
|
|
7884
|
-
] })
|
|
7905
|
+
] }),
|
|
7906
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
7907
|
+
import_material.TextField,
|
|
7908
|
+
{
|
|
7909
|
+
select: true,
|
|
7910
|
+
fullWidth: true,
|
|
7911
|
+
size: "small",
|
|
7912
|
+
label: "C\u0103n l\u1EC1",
|
|
7913
|
+
value: value4?.[part]?.textAlign ?? "",
|
|
7914
|
+
slotProps: { select: { displayEmpty: true, SelectDisplayProps: { "aria-labelledby": void 0 }, MenuProps: { container: () => root.current?.ownerDocument.body ?? document.body }, inputProps: { "aria-label": `C\u0103n l\u1EC1 ${title.toLocaleLowerCase("vi")}` } }, inputLabel: { shrink: true } },
|
|
7915
|
+
helperText: "\xC1p d\u1EE5ng cho t\u1EA5t c\u1EA3 \xF4, c\u1EA3 tr\xEAn \u0111i\u1EC7n tho\u1EA1i",
|
|
7916
|
+
onChange: (event) => update(part, { textAlign: event.target.value ? event.target.value : void 0 }),
|
|
7917
|
+
children: [
|
|
7918
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_material.MenuItem, { value: "", children: "Theo m\u1EB7c \u0111\u1ECBnh" }),
|
|
7919
|
+
FEES_TEXT_ALIGNS.map((align) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_material.MenuItem, { value: align, children: alignLabels[align] }, align))
|
|
7920
|
+
]
|
|
7921
|
+
}
|
|
7922
|
+
)
|
|
7885
7923
|
] }, part)) }),
|
|
7886
7924
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_material.Typography, { variant: "caption", color: "text.secondary", sx: { display: "block", mt: 1 }, children: "C\u1EE1 ch\u1EEF t\xF9y ch\u1EC9nh \xE1p d\u1EE5ng c\u1EA3 tr\xEAn \u0111i\u1EC7n tho\u1EA1i; b\u1EA3ng c\xF3 th\u1EC3 vu\u1ED1t ngang. \u201CM\u1EB7c \u0111\u1ECBnh\u201D kh\xF4i ph\u1EE5c c\u1EE1 ch\u1EEF t\u1EF1 th\xEDch \u1EE9ng theo m\xE0n h\xECnh." })
|
|
7887
7925
|
] });
|
|
@@ -8646,32 +8684,32 @@ var feesTheme = {
|
|
|
8646
8684
|
]))
|
|
8647
8685
|
};
|
|
8648
8686
|
var EditorActions = import_styled_components12.default.div.withConfig({
|
|
8649
|
-
componentId: "sc-
|
|
8687
|
+
componentId: "sc-a14ae83-0"
|
|
8650
8688
|
})([
|
|
8651
8689
|
`display:flex;flex-wrap:wrap;gap:8px;margin-top:16px;`
|
|
8652
8690
|
]);
|
|
8653
8691
|
var EditGroup = import_styled_components12.default.div.withConfig({
|
|
8654
|
-
componentId: "sc-
|
|
8692
|
+
componentId: "sc-a14ae83-1"
|
|
8655
8693
|
})([
|
|
8656
8694
|
`display:flex;flex-direction:column;gap:6px;`
|
|
8657
8695
|
]);
|
|
8658
8696
|
var HeaderGroup = (0, import_styled_components12.default)(EditGroup).withConfig({
|
|
8659
|
-
componentId: "sc-
|
|
8697
|
+
componentId: "sc-a14ae83-2"
|
|
8660
8698
|
})([
|
|
8661
8699
|
`gap:8px;`
|
|
8662
8700
|
]);
|
|
8663
8701
|
var HeaderTitle = import_styled_components12.default.div.withConfig({
|
|
8664
|
-
componentId: "sc-
|
|
8702
|
+
componentId: "sc-a14ae83-3"
|
|
8665
8703
|
})([
|
|
8666
8704
|
`display:flex;align-items:flex-start;min-height:var(--fees-header-title-height,36px);`
|
|
8667
8705
|
]);
|
|
8668
8706
|
var HeaderActions = import_styled_components12.default.div.withConfig({
|
|
8669
|
-
componentId: "sc-
|
|
8707
|
+
componentId: "sc-a14ae83-4"
|
|
8670
8708
|
})([
|
|
8671
8709
|
`display:flex;align-items:center;min-height:24px;`
|
|
8672
8710
|
]);
|
|
8673
8711
|
var AlignedFeesTable = (0, import_styled_components12.default)(FeesAndMarginTable).withConfig({
|
|
8674
|
-
componentId: "sc-
|
|
8712
|
+
componentId: "sc-a14ae83-5"
|
|
8675
8713
|
})([
|
|
8676
8714
|
`&[data-editable] th{vertical-align:top;}--fees-row-background:`,
|
|
8677
8715
|
`;--fees-stripe-background:`,
|
|
@@ -8682,9 +8720,11 @@ var AlignedFeesTable = (0, import_styled_components12.default)(FeesAndMarginTabl
|
|
|
8682
8720
|
`;}&&& thead > tr > th{height:52px;padding:11.5px 8px;color:`,
|
|
8683
8721
|
`;font-size:`,
|
|
8684
8722
|
`px;font-weight:`,
|
|
8723
|
+
`;text-align:`,
|
|
8685
8724
|
`;line-height:`,
|
|
8686
8725
|
`;white-space:pre-line;}tbody > tr{background:var(--fees-row-background);}tbody > tr:nth-child(even){background:var(--fees-stripe-background);}&&& tbody > tr > td{height:32px;padding:7.5px 8px;background:inherit;color:var(--fees-text);font-size:`,
|
|
8687
8726
|
`px;font-weight:`,
|
|
8727
|
+
`;text-align:`,
|
|
8688
8728
|
`;line-height:`,
|
|
8689
8729
|
`;}thead > tr > th:first-child,tbody > tr > td:first-child{padding-left:16px;}@media (max-width:767px){&&:not([data-editable]){table{min-width:100%;width:`,
|
|
8690
8730
|
`px;table-layout:fixed;}`,
|
|
@@ -8692,23 +8732,25 @@ var AlignedFeesTable = (0, import_styled_components12.default)(FeesAndMarginTabl
|
|
|
8692
8732
|
`px;line-height:`,
|
|
8693
8733
|
`;}tbody > tr > td{height:40px;padding-top:5.5px;padding-bottom:5.5px;font-size:`,
|
|
8694
8734
|
`px;line-height:`,
|
|
8695
|
-
`;}thead > tr > th:last-child,tbody > tr > td:last-child{padding-right:12px;}th > span
|
|
8735
|
+
`;}thead > tr > th:last-child,tbody > tr > td:last-child{padding-right:12px;}th > span{text-align:`,
|
|
8736
|
+
`;}td > span{text-align:`,
|
|
8737
|
+
`;}thead > tr > th:first-child,tbody > tr > td:first-child{position:sticky;left:0;padding-left:12px;}thead > tr > th:first-child{z-index:3;background:`,
|
|
8696
8738
|
`;}tbody > tr > td:first-child{z-index:2;background:var(--fees-row-background);}tbody > tr:nth-child(even) > td:first-child{background:var(--fees-stripe-background);}}}`
|
|
8697
|
-
], ({ theme }) => theme.colors.background.deep, ({ theme }) => theme.colors.background.input, ({ theme }) => theme.colors.accent.foreground, ({ theme }) => theme.colors.background.card, ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.accent.primary, ({ theme }) => theme.colors.accent.foreground, ({ $typography }) => $typography?.thead?.fontSize ?? 10, ({ $typography }) => $typography?.thead?.fontWeight ?? 600, ({ $typography }) => $typography?.thead?.fontSize ? 1.4 : "14px", ({ $typography }) => $typography?.tbody?.fontSize ?? 12, ({ $typography }) => $typography?.tbody?.fontWeight ?? 500, ({ $typography }) => $typography?.tbody?.fontSize ? 1.4 : "16px", ({ $mobileColumnWidths }) => $mobileColumnWidths.reduce((sum, width) => sum + width, 0), ({ $mobileColumnWidths }) => $mobileColumnWidths.map((width, index) => `
|
|
8739
|
+
], ({ theme }) => theme.colors.background.deep, ({ theme }) => theme.colors.background.input, ({ theme }) => theme.colors.accent.foreground, ({ theme }) => theme.colors.background.card, ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.accent.primary, ({ theme }) => theme.colors.accent.foreground, ({ $typography }) => $typography?.thead?.fontSize ?? 10, ({ $typography }) => $typography?.thead?.fontWeight ?? 600, ({ $typography }) => $typography?.thead?.textAlign ?? "left", ({ $typography }) => $typography?.thead?.fontSize ? 1.4 : "14px", ({ $typography }) => $typography?.tbody?.fontSize ?? 12, ({ $typography }) => $typography?.tbody?.fontWeight ?? 500, ({ $typography }) => $typography?.tbody?.textAlign ?? "left", ({ $typography }) => $typography?.tbody?.fontSize ? 1.4 : "16px", ({ $mobileColumnWidths }) => $mobileColumnWidths.reduce((sum, width) => sum + width, 0), ({ $mobileColumnWidths }) => $mobileColumnWidths.map((width, index) => `
|
|
8698
8740
|
th:nth-child(${index + 1}), td:nth-child(${index + 1}) {
|
|
8699
8741
|
width: ${width}px;
|
|
8700
8742
|
min-width: ${width}px;
|
|
8701
8743
|
max-width: ${width}px;
|
|
8702
8744
|
}
|
|
8703
|
-
`).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);
|
|
8745
|
+
`).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", ({ $typography }) => $typography?.thead?.textAlign ?? "left", ({ $typography }) => $typography?.tbody?.textAlign ?? "left", ({ theme }) => theme.colors.accent.primary);
|
|
8704
8746
|
var FeesCellContent = import_styled_components12.default.span.withConfig({
|
|
8705
|
-
componentId: "sc-
|
|
8747
|
+
componentId: "sc-a14ae83-6"
|
|
8706
8748
|
})([
|
|
8707
8749
|
`display:block;text-align:`,
|
|
8708
8750
|
`;`
|
|
8709
|
-
], ({ $
|
|
8751
|
+
], ({ $align }) => $align);
|
|
8710
8752
|
var EditorButton = import_styled_components12.default.button.withConfig({
|
|
8711
|
-
componentId: "sc-
|
|
8753
|
+
componentId: "sc-a14ae83-7"
|
|
8712
8754
|
})([
|
|
8713
8755
|
`padding:7px 12px;border:1px solid `,
|
|
8714
8756
|
`;border-radius:6px;background:`,
|
|
@@ -8717,17 +8759,17 @@ var EditorButton = import_styled_components12.default.button.withConfig({
|
|
|
8717
8759
|
`;}&:disabled{cursor:default;opacity:.4;}`
|
|
8718
8760
|
], ({ theme }) => theme.colors.border.line, ({ theme }) => theme.colors.background.input, ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.accent.primary);
|
|
8719
8761
|
var OrderActions = import_styled_components12.default.div.withConfig({
|
|
8720
|
-
componentId: "sc-
|
|
8762
|
+
componentId: "sc-a14ae83-8"
|
|
8721
8763
|
})([
|
|
8722
8764
|
`display:flex;gap:6px;align-items:center;flex-wrap:wrap;`
|
|
8723
8765
|
]);
|
|
8724
8766
|
var PositionLabel = import_styled_components12.default.label.withConfig({
|
|
8725
|
-
componentId: "sc-
|
|
8767
|
+
componentId: "sc-a14ae83-9"
|
|
8726
8768
|
})([
|
|
8727
8769
|
`display:inline-flex;align-items:center;gap:6px;font-size:12px;`
|
|
8728
8770
|
]);
|
|
8729
8771
|
var PositionInput = import_styled_components12.default.input.withConfig({
|
|
8730
|
-
componentId: "sc-
|
|
8772
|
+
componentId: "sc-a14ae83-10"
|
|
8731
8773
|
})([
|
|
8732
8774
|
`width:56px;padding:5px;border:1px solid `,
|
|
8733
8775
|
`;border-radius:4px;background:`,
|
|
@@ -8736,17 +8778,17 @@ var PositionInput = import_styled_components12.default.input.withConfig({
|
|
|
8736
8778
|
`;}`
|
|
8737
8779
|
], ({ theme }) => theme.colors.border.line, ({ theme }) => theme.colors.background.input, ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.accent.primary);
|
|
8738
8780
|
var ColumnRow = import_styled_components12.default.div.withConfig({
|
|
8739
|
-
componentId: "sc-
|
|
8781
|
+
componentId: "sc-a14ae83-11"
|
|
8740
8782
|
})([
|
|
8741
8783
|
`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;}`
|
|
8742
8784
|
]);
|
|
8743
8785
|
var PaginationControls = (0, import_styled_components12.default)(FeesAndMarginPagination).withConfig({
|
|
8744
|
-
componentId: "sc-
|
|
8786
|
+
componentId: "sc-a14ae83-12"
|
|
8745
8787
|
})([
|
|
8746
8788
|
`align-items:center;flex-wrap:wrap;gap:16px 24px;`
|
|
8747
8789
|
]);
|
|
8748
8790
|
var PageSizeLabel = import_styled_components12.default.div.withConfig({
|
|
8749
|
-
componentId: "sc-
|
|
8791
|
+
componentId: "sc-a14ae83-13"
|
|
8750
8792
|
})([
|
|
8751
8793
|
`display:inline-flex;align-items:center;gap:8px;color:`,
|
|
8752
8794
|
`;font:inherit;font-size:13px;`
|
|
@@ -8774,14 +8816,14 @@ function Position({ value: value4, max, label, onMove }) {
|
|
|
8774
8816
|
});
|
|
8775
8817
|
}
|
|
8776
8818
|
var DeleteButton = (0, import_styled_components12.default)(EditorButton).withConfig({
|
|
8777
|
-
componentId: "sc-
|
|
8819
|
+
componentId: "sc-a14ae83-14"
|
|
8778
8820
|
})([
|
|
8779
8821
|
`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;}`
|
|
8780
8822
|
]);
|
|
8781
8823
|
var CellEditorInput = import_styled_components12.default.textarea.withConfig({
|
|
8782
|
-
componentId: "sc-
|
|
8824
|
+
componentId: "sc-a14ae83-15"
|
|
8783
8825
|
})([
|
|
8784
|
-
`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;resize:none;overflow:hidden;&:hover{border-color:`,
|
|
8826
|
+
`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:`,
|
|
8785
8827
|
`;}&:focus{outline:1px solid `,
|
|
8786
8828
|
`;}`
|
|
8787
8829
|
], ({ theme }) => theme.colors.border.line, ({ theme }) => theme.colors.accent.primary);
|
|
@@ -8992,7 +9034,8 @@ function FeesTable({ value: value4, editable = false, onChange, labels, size = "
|
|
|
8992
9034
|
};
|
|
8993
9035
|
const activeTag = tags.includes(tag) ? tag : "";
|
|
8994
9036
|
const filtered = filterFeesRows(value4, search, activeTag);
|
|
8995
|
-
const
|
|
9037
|
+
const displayedRows = canEdit ? filtered : sortFeesRowsByName(filtered, language);
|
|
9038
|
+
const pagination = paginateFeesRows(displayedRows, page, pageSize);
|
|
8996
9039
|
const moveColumn = (from, to) => onChange?.({
|
|
8997
9040
|
...value4,
|
|
8998
9041
|
columns: moveFeesItem(value4.columns, from, to)
|
|
@@ -9069,7 +9112,7 @@ function FeesTable({ value: value4, editable = false, onChange, labels, size = "
|
|
|
9069
9112
|
})
|
|
9070
9113
|
]
|
|
9071
9114
|
}) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(FeesCellContent, {
|
|
9072
|
-
$
|
|
9115
|
+
$align: value4.typography?.thead?.textAlign ?? (rightAlignedColumns.has(column.key) ? "right" : "left"),
|
|
9073
9116
|
children: column.title
|
|
9074
9117
|
}),
|
|
9075
9118
|
render: (_unused, row) => canEdit ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(CellEditor, {
|
|
@@ -9083,7 +9126,7 @@ function FeesTable({ value: value4, editable = false, onChange, labels, size = "
|
|
|
9083
9126
|
}
|
|
9084
9127
|
})
|
|
9085
9128
|
}) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(FeesCellContent, {
|
|
9086
|
-
$
|
|
9129
|
+
$align: value4.typography?.tbody?.textAlign ?? (rightAlignedColumns.has(column.key) ? "right" : "left"),
|
|
9087
9130
|
children: row.cells[column.key] ?? ""
|
|
9088
9131
|
})
|
|
9089
9132
|
}));
|
|
@@ -9200,6 +9243,17 @@ function FeesTable({ value: value4, editable = false, onChange, labels, size = "
|
|
|
9200
9243
|
}),
|
|
9201
9244
|
canEdit && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(EditorActions, {
|
|
9202
9245
|
children: [
|
|
9246
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(EditorButton, {
|
|
9247
|
+
type: "button",
|
|
9248
|
+
onClick: () => {
|
|
9249
|
+
onChange?.({
|
|
9250
|
+
...value4,
|
|
9251
|
+
rows: sortFeesRowsByName(value4.rows, language)
|
|
9252
|
+
});
|
|
9253
|
+
setPage(1);
|
|
9254
|
+
},
|
|
9255
|
+
children: english ? "Sort names A\u2013Z" : "S\u1EAFp x\u1EBFp t\xEAn A\u2013Z"
|
|
9256
|
+
}),
|
|
9203
9257
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(EditorButton, {
|
|
9204
9258
|
type: "button",
|
|
9205
9259
|
onClick: () => {
|